Midi over a network is actually defined in RFCs. See http://www.cs.berkeley.edu/~lazzaro/sa/pubs/txt/current-rtp-midi.txt for more information.
However, those definitions are only for transferring the MIDI data over RTP once the connection has been made. The next trick is to work out how to initiate the connection.
This is where wireshark comes in useful. I have AC-7 on my iPad which is a MIDI-based DAW interface so I’ve been able to capture the traffic between the iPad and my Mac. The fields used in the initial protocol have been identified are in the standard wireshark release. See http://www.wireshark.org/docs/dfref/a/applemidi.html for those fields.
There are a couple of steps involved here. The first part is to determine where to connect. Zeroconf comes into play here by searching for addresses offering _apple-midi._udp. Once the address has been identified, the connection can be made.
The second part is initiating the session.