MKWii Network Protocol/Server/gpcm.gs.nintendowifi.net/Wiimmfi

From Custom Mario Kart
Jump to: navigation, search

This article is about an extension of the GPCM protocol. The Wiimmfi server add additional information to the stream. It is dedicated to mkw-ana, but can be used by every analysis tool. All tested games simply ignore unknown records.



Overview

Wiimmfi records are always send by the server. Server SV collects data about rooms and create messages for the room members. These message are send to the GPCM instances who add records to the GPCM stream of format:

\wiimmfi\NAME\....PARAMETERS....\final\

All tested games simply ignore unknown records. However, Wiimmfi packets are only activated for Mario Kart Wii. The total traffic to the clients (server to client + client to client) is increased by less than 1%.

Protocol Parameters
Name Param
Type
Description
wiimmfi=clear keyword Start of a Wiimmfi record with a room-left notification.
wiimmfi=race keyword Start of a Wiimmfi record that inform about a race start.
wiimmfi=room keyword Start of a Wiimmfi record with room overview.
wiimmfi=status keyword Start of a Wiimmfi record with collected online status of a player.

Record types

wiimmfi=clear

This record is send to a player who left a room and has no more active connections.

Example, decoded by mkw-ana:

 wiimmfi = clear
     pid = 123456789
   final /
wiimmfi
Begin and identification of the record. Here the value is always clear.
pid
profile id of the player who left the room.

wiimmfi=race

This record inform about a new race.

Example, decoded by mkw-ana:

 wiimmfi = race
    room = 7983
   nrace = 16
   final /
wiimmfi
Begin and identification of the record. Here the value is always race.
room
Room ID. At Wiimmfi portal it is displayed as Nice ID.
nrace
Index of new race. The value is 1-based counter for races in the current room.

wiimmfi=room

This record informs about the status and members of the current room.

Example, decoded by mkw-ana:


 wiimmfi = room
    room = 26
   start = 1473848921
     gid = RMCJ
       n = 2,2,0,0
    slot = 0,1
     pid = 123456789
   times = 0,0,6716,%
   flags = 3,2,0,0,0
   nrace = 0
      hs = 2,0
    slot = 1,1
     pid = 987654321
   times = 6716,6716,6716,%
   flags = 3,1,0,0,0
   nrace = 0
      hs = 0,0
   final /
wiimmfi
Begin and identification of the record. Here the value is always room.
room
Room ID. At Wiimmfi portal it is displayed as Nice ID.
start
Time (seconds since epoch) of room creation.
gid
ID4 of the game (in general a copy of hosts ID4).
n
Number of room members, room players, room races and inactive members (see slot).
slot
The next parameters are valid for this slot (0–11). Slots not counted in the record are empty. The second parameter is either 0 for inactive or 1 for active. A profile becomes inactive, if MASTER-03 records are missed. Usually each client sends at least 1 record every minute.
pid
profile id of the player of slot.
times
Times relative to start: entrance, last update, last connect, last natneg. A '%' means: not set.
flags
5 bit field for local_net (same peer IPv4), connected (GPCMv90 STATUS type 2), NATNEG/CONNECT, NATNEG/CONNECT_ACK and NATNEG/REPORT=success. Each bit correspondents to another slot (bit index). All 5 bit fields together represent the Connection Status.
nrace
Number of races of this player in this room.
hs
dwc_hoststate and dwc_suspend send to MASTER.

wiimmfi=status

This record reflects the online status of a player. It is send, if a player enters a room or change its online status. The last message is repeated every 3–4 minutes.

Example, decoded by mkw-ana:

   wiimmfi = status
       pid = 478873160
      room = 38
    region = 20222
        np = 1
     name1 = bm8gbmFtZQ**   [B64:'no name']
     name2 =
    status = 5     [host]
 ol_status = 259   [oP------h----]
   ol_role = 5     [host]
   ol_slot = 0
      time = 1473923663   [2016-09-15 09:14:23 +0200]
     final /
wiimmfi
Begin and identification of the record. Here the value is always status.
pid
profile id for this record.
room
Room ID. At Wiimmfi portal it is displayed as Nice ID.
region
Region send on login (NAS).
np
Number of players at the console (1 or 2).
name1
Name of first player, encoded by BASE64.
name2
Name of second player, encoded by BASE64. Empty if only 1 player is online.
status
Online status send by client (1–5)
ol_status
Calculated Online Status. This bit field is calculated by server GPCM by analyzing status and locstring sent by the Wii.
ol_role
Calculated online role (0=offline, 1=online, 2=connecting, 3=viewer, 4=guest, 5=host). It is calculated by server GPCM based on ol_status.
ol_slot
Zero based index of slot, -1 for unknown. This slot info is determined by server GPCM.
time
Time (seconds since epoch) of last status change.

mkw-ana

Since v1.13, mkw-ana is able to decode the new records. After starting mkw-ana in the usual way, login into the backend and enter the command »wiimmfi«. For a periodical update use »watch wiimmfi« and for help »help wiimmfi«.

Here you see an example of mkw-ana:

Room-view-example-mkwana.png

And here you see the same room from the servers backend:

Room-view-example-server.png

Other Servers

Nintendo's Servers for Mario Kart Wii
DNS Name IP Address Port Protocol Description
gamestats.gs.nintendowifi.net
mariokartwii.gamestats.gs.nintendowifi.net
69.10.30.240 29920 N/A These are looked up, but never used.
gamestats2.gs.nintendowifi.net
mariokartwii.gamestats2.gs.nintendowifi.net
69.10.30.234 N/A TCP These are looked up, but never used.
gpcm.gs.nintendowifi.net 69.10.30.242 29900 TCP This connection is used to manage friends and to inform about one's status.
gpsp.gs.nintendowifi.net 69.10.30.241 29901 TCP The server exchanges profile ids into user nicks.
mariokartwii.available.gs.nintendowifi.net
mariokartwii.master.gs.nintendowifi.net
69.10.30.248 27900 UDP See pages
mariokartwii.ms19.gs.nintendowifi.net 69.10.30.247 28910 TCP This server handles database requests for online matchmaking.
mariokartwii.natneg1.gs.nintendowifi.net 69.10.30.254 27901 UDP NAT NEGotiation is a way to bypass NAT and firewalls.
mariokartwii.natneg2.gs.nintendowifi.net 69.10.30.253 27901 UDP NAT NEGotiation is a way to bypass NAT and firewalls.
mariokartwii.natneg3.gs.nintendowifi.net 69.10.30.252 27901 UDP NAT NEGotiation is a way to bypass NAT and firewalls.
mariokartwii.sake.gs.nintendowifi.net 69.10.24.119 443 TCP/HTTP(S) This server handles Mii exchange and Ghost up/downloads
naswii.nintendowifi.net 192.195.204.143
69.25.139.143
443 TCP/HTTP(S) The authority DNS server delivers randomly both IP addresses with a TTL (time to live) of 30s to support a kind of load balancing.
mariokartwii.race.gs.nintendowifi.net 69.10.24.125 443 TCP/HTTP(S) This server is used for time trial / competition leaderboards and the actual competition distribution.

Related Topics