Difference between revisions of "Network Protocol/HANDSHAKE"

From Custom Mario Kart
Jump to navigation Jump to search
m
Line 1: Line 1:
This pages is related to [[MKWii Network Protocol]] and describes the record type '''HANDSHAKE''' in GNU C notation.  
+
This pages is related to [[MKWii Network Protocol]] and describes the record type '''NATNEG''' in GNU C notation.  
  
This record '''HANDSHAKE''' is very similar with the [[MKWii_Network_Protocol/Server/mariokartwii.natneg.gs.nintendowifi.net|NAT negotiation]] with the servers.  
+
This record '''NATNEG''' is the same as the [[MKWii_Network_Protocol/Server/mariokartwii.natneg.gs.nintendowifi.net|NAT negotiation]] with the servers - but only describes the packet "CONNECT_PING" which is sent peer-to-peer.  
  
 
<pre>
 
<pre>
Line 23: Line 23:
 
<br/>
 
<br/>
 
{{MKWii Network Protocol}}
 
{{MKWii Network Protocol}}
[[category: Network Protocol|C]]
+
[[category: Network Protocol|N]]

Revision as of 09:24, 14 June 2015

This pages is related to MKWii Network Protocol and describes the record type NATNEG in GNU C notation.

This record NATNEG is the same as the NAT negotiation with the servers - but only describes the packet "CONNECT_PING" which is sent peer-to-peer.

typedef struct udp_connect_t
{
  /*00*/    u8[6]	natneg_magic;	// always 0xfdfc1e666ab2 (be)
  /*06*/    u8		version;	// always 0x03
  /*07*/    u8		type;		//   type of data: 0x05: CONNECT
					//   0x07: CONNECT_PING
  /*08*/    u32		client_id;	// client ID. Last two bytes of ID are last two bytes of Friendcode
  /*0c*/    u32		ip4;		// IP4 of client
  /*10*/    u16		port;		// UDP port of client
  /*12*/    u8		counter;	// CONNECT_PING: sequence counter: 0|1
					// CONNECT: x42
  /*13*/    u8		error;		// 0x00: no error, 0x01: client timeout, 0x02: INIT timeout
  /*14*/
}
__attribute__ ((packed)) udp_connect_t;


Template:MKWii Network Protocol