Network Protocol/USER
Jump to navigation
Jump to search
This pages is related to MKWii Network Protocol and describes the record type USER in GNU C notation.
typedef struct udp_user_t { /*00*/ u32 record_id; // bitfield for present miis (previously record ID) /*04*/ u16 max_mii_count; // max amount of Miis in packet (always 0x0002) /*06*/ u16 unknown_06; // always 0x0000 ? /*08*/ mii_t mii[2]; // Mii data, 2*76 = 2*0x4c = 0x98 bytes // 0x0a,0x56: Mii name (10*u16) // 0x3e,0x8a: Creator name (10*u16) // ==> 76 instead of 74 bytes // because of alignment /*a0*/ u64 wii_fc; // Wii Friend code /*a8*/ u64 friend_code; // FC, decimal view: 1234-5678-9012 /*b0*/ u8 country; // country flag code of user /*b1*/ u8 state; // state / province code of user /*b2*/ u16 city; // always 0x0000 because MKWii doesn't transmit the city ID. only used in apps like the weather channel where the city matters // ==> country, state and city are "0xFF FF FFFF" // ==> if the user disabled sharing his country information /*b4*/ u16 location_lon; // longitude on world map (the actual degree value is approximately multiplied by 182.25) /*b6*/ u16 location_lat; // latitude on world map (the actual degree value is approximately multiplied by 182.25) /*b8*/ u16 racing_rankpts; // online race ranking points /*ba*/ u16 battle_rankpts; // online battle ranking points /*bc*/ u8 game_id3; // 3. char of game_id, E|P /*bd*/ u8 region; // Region. 0=NTSC-J, 1=NTSC-U, 2=PAL/EUR, 3=PAL/AUS, 4=Taiwan 5=South Korea /*be*/ u16 unknown_be; // always 0 } __attribute__ ((packed)) udp_user_t;
See country codes for the country codes and state codes for the state codes