4 Protocol Examples
A standard DN_INTERNAL_MESSAGE_PLAYER_CONNECT_INFO_EX (section 2.2.1.2) for a DirectPlay 8 Protocol: Core and Service Providers game session. This example includes the full Ethernet frame for the packet sent.
In little-endian byte order:
MSGID = 0x000000C1
dwFlags indicates that this is a DN_OBJECT_TYPE_PEER.
Player Name value of "Test User".
0000 00 0A E4 03 27 73 00 0B DB 5C 3F 45 08 00 45 00 ..ä.'s..Û\?E..E. 0010 00 98 3A 4C 00 00 80 11 9F B1 41 34 EF 3D 41 34 .˜:L..€.Ÿ±A4ï=A4 0020 EE B1 08 FE 08 FE 00 84 C2 BF 7F 00 01 00 C1 00 î±.þ.þ.„¿...Á. 0030 00 00 04 00 00 00 08 00 00 00 60 00 00 00 14 00 ..........`..... 0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0060 00 00 23 81 BE 94 AB A1 FB 48 A2 E7 23 85 9E 65 ..#□¾"«¡ûH¢ç#…□e 0070 89 36 DA 80 EF 61 1B 69 47 42 9A DD 1C 7B ED 2B ‰6Ú€ïa.iGBšÝ.{í+ 0080 C1 3E 58 00 00 00 08 00 00 00 07 02 08 FE 41 34 Á>X..........þA4 0090 EF 3D 54 00 65 00 73 00 74 00 20 00 55 00 73 00 ï=T.e.s.t. .U.s. 00A0 65 00 72 00 00 00 e.r...
Upon success, the host will respond with the DN_SEND_CONNECT_INFO (section 2.2.1.4) packet to the connecting peer. This example includes the full Ethernet frame for the packet sent.
MSGID = 0x000000C2
dwFlags indicates that DPNSESSION_MIGRATE_HOST is allowed.
dwMaxPlayers is not specified.
dwCurrentPlayers is set to 2 for the host and connecting peer.
dpnid for the connecting player value is 0x948E8120.
Name table version entry of 0x03.
dwEntryCount is set to 2.
dwMembershipCount is 0, indicating no groups in the game session.
Connecting Peers Name is "Test User".
Host Peers Name is "Test User".
Game session Name is "Test Session".
Player Name value of "Test User".
0000 00 0B DB 5C 3F 45 00 0A E4 03 27 73 08 00 45 00 ..Û\?E..ä.'s..E. 0010 01 94 06 95 00 00 80 11 D2 6C 41 34 EE B1 41 34 .".•..€.ÒlA4î±A4 0020 EF 3D 08 FE 08 FE 01 80 0D 9F 7F 00 01 02 C2 00 ï=.þ.þ.€.Ÿ...Â. 0030 00 00 00 00 00 00 00 00 00 00 50 00 00 00 04 00 ..........P..... 0040 00 00 00 00 00 00 02 00 00 00 56 01 00 00 1A 00 ..........V..... 0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0060 00 00 00 00 00 00 00 00 00 00 23 81 BE 94 AB A1 ..........#□¾"«¡ 0070 FB 48 A2 E7 23 85 9E 65 89 36 DA 80 EF 61 1B 69 ûH¢ç#…□e‰6Ú€ïa.i 0080 47 42 9A DD 1C 7B ED 2B C1 3E 20 81 8E 94 03 00 GBšÝ.{í+Á> □□".. 0090 00 00 00 00 00 00 02 00 00 00 00 00 00 00 21 81 ..............!□ 00A0 9E 94 00 00 00 00 02 01 00 00 02 00 00 00 00 00 □".............. 00B0 00 00 07 00 00 00 42 01 00 00 14 00 00 00 00 00 ......B......... 00C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 81 .............. □ 00D0 8E 94 00 00 00 00 00 01 00 00 03 00 00 00 00 00 □".............. 00E0 00 00 08 00 00 00 2E 01 00 00 14 00 00 00 00 00 ................ 00F0 00 00 00 00 00 00 CC 00 00 00 62 00 00 00 78 2D ......Ì...b...x- 0100 64 69 72 65 63 74 70 6C 61 79 3A 2F 70 72 6F 76 directplay:/prov 0110 69 64 65 72 3D 25 37 42 45 42 46 45 37 42 41 30 ider=%7BEBFE7BA0 0120 2D 36 32 38 44 2D 31 31 44 32 2D 41 45 30 46 2D -628D-11D2-AE0F- 0130 30 30 36 30 39 37 42 30 31 34 31 31 25 37 44 3B 006097B01411%7D; 0140 68 6F 73 74 6E 61 6D 65 3D 36 35 2E 35 32 2E 32 hostname=65.52.2 0150 33 39 2E 36 31 3B 70 6F 72 74 3D 32 33 30 32 00 39.61;port=2302. 0160 54 00 65 00 73 00 74 00 20 00 55 00 73 00 65 00 T.e.s.t. .U.s.e. 0170 72 00 00 00 54 00 65 00 73 00 74 00 20 00 55 00 r...T.e.s.t. .U. 0180 73 00 65 00 72 00 00 00 54 00 65 00 73 00 74 00 s.e.r...T.e.s.t. 0190 20 00 53 00 65 00 73 00 73 00 69 00 6F 00 6E 00 .S.e.s.s.i.o.n. 01A0 00 00 ..
Given a game session with two connected peers, the following is an example of general data passed between the peers. The following is the message "Hi there", where the message includes the full 400-byte buffer. Everything after the plain text in this example is just random memory. This example includes the full Ethernet frame for the packet sent.
-
0000 00 0A E4 03 27 73 00 0B DB 5C 3F 45 08 00 45 00 ..ä.'s..Û\?E..E. 0010 01 B2 DF CD 00 00 80 11 F9 94 41 34 EF 3D 41 34 .²ßÍ..€.ù"A4ï=A4 0020 EE 32 08 FE 08 FE 01 9E 97 D4 3D 00 05 03 01 00 î2.þ.þ.□—Ô=..... 0030 48 00 49 00 20 00 54 00 48 00 45 00 52 00 45 00 H.I. .T.H.E.R.E. 0040 00 00 4E 1C 3F 77 64 00 83 00 00 00 00 00 FC 84 ..N.?wd.ƒ.....ü„ 0050 41 7E A4 85 41 7E 22 06 2B 00 A6 88 41 7E BF 3D A~¤…A~".+.¦ˆA~¿= 0060 3F 77 48 EF CF 00 D1 88 41 7E A8 1B 60 00 00 00 ?wHïÏ.шA~¨.`... 0070 00 00 DA 88 41 7E A6 88 41 7E BF 3D 3F 77 00 00 ..ÚˆA~¦ˆA~¿=?w.. 0080 00 00 24 EF CF 00 01 00 00 00 FC EF CF 00 87 D3 ..$ïÏ.....üïÏ.‡Ó 0090 00 00 78 EF CF 00 90 49 3F 77 20 3E 01 05 C2 00 ..xïÏ.□I?w >..Â. 00A0 00 00 00 00 00 00 18 5E 69 4F BF 3D 3F 77 BF 3D .......^iO¿=?w¿= 00B0 3F 77 00 00 00 00 0D 00 00 00 00 01 00 00 58 5E ?w............X^ 00C0 A8 06 BF 3D 3F 77 01 00 00 00 A4 EF CF 00 34 87 ¨.¿=?w....¤ïÏ.4‡ 00D0 41 7E 22 06 2B 00 C2 00 00 00 00 00 00 00 18 5E A~".+.Â........^ 00E0 69 4F BF 3D 3F 77 CD AB BA DC 00 00 00 00 E0 EF iO¿=?wÍ«ºÜ....àï 00F0 CF 00 BF 3D 3F 77 0C F0 CF 00 16 88 41 7E 00 90 Ï.¿=?w.ðÏ..ˆA~.□ 0100 FD 7F 0C F0 CF 00 5A 88 41 7E CC EF CF 00 2A 88 ý.ðÏ.ZˆA~ÌïÏ.*ˆ 0110 41 7E C2 00 00 00 A8 1B 60 00 BC 1B 60 00 14 00 A~Â...¨.`.¼.`... 0120 00 00 01 00 00 00 00 00 00 00 00 00 00 00 10 00 ................ 0130 00 00 00 00 00 00 30 88 41 7E 00 00 00 00 00 00 ......0ˆA~...... 0140 00 00 01 00 00 00 C0 EF CF 00 BF 3D 3F 77 5C F2 ......ÀïÏ.¿=?w\ò 0150 CF 00 57 04 44 7E C0 F1 CF 00 08 00 00 00 C0 F1 Ï.W.D~ÀñÏ.....Àñ 0160 CF 00 C0 F1 CF 00 C0 F1 CF 00 30 F0 CF 00 85 38 Ï.ÀñÏ.ÀñÏ.0ðÏ.…8 0170 6A 4F 09 00 00 00 C0 F1 CF 00 08 00 00 00 58 5E jO....ÀñÏ.....X^ 0180 A8 06 48 F0 CF 00 2E 3B 6A 4F 58 5E A8 06 08 00 ¨.HðÏ..;jOX^¨... 0190 00 00 08 00 00 00 C0 F1 CF 00 64 F0 CF 00 A6 3F ......ÀñÏ.dðÏ.¦? 01A0 6A 4F 58 5E A8 06 08 00 00 00 CE 3D 42 7E 8E 13 jOX^¨.....Î=B~□. 01B0 00 00 BA B8 41 7E 74 F0 CF 00 BE 7A 6A 4F 00 00 ..º¸A~tðÏ.¾zjO..