Packet 0xB1

The server sends clients a Packet 0xB1 to tell them the current time on the server (upon request from the client). The clients send Packet 0xB1 to request said timestamp from the server.

Dreamcast Packet Format (Server->Client)

BytesMeaning
0x00Packet Type (0xB1)
0x01Flags (0x00)
0x02-0x03Packet Size (0x0020)
0x04-0x1FTimestamp (see below for format)

Timestamp Format

C code to format the timestamp (from a struct timeval (rawtime) and struct tm (cooked)):

sprintf(pkt->timestamp, "%u:%02u:%02u: %02u:%02u:%02u.%03u",
        cooked.tm_year + 1900, cooked.tm_mon + 1, cooked.tm_mday,
        cooked.tm_hour, cooked.tm_min, cooked.tm_sec,
        (unsigned int)(rawtime.tv_usec / 1000));

Dreamcast Packet Format (Client->Server)

BytesMeaning
0x00Packet Type (0xB1)
0x01Flags (0x00)
0x02-0x03Packet Size (0x0004)