This document is "work in progress" and being continually updated :)
2. General concepts and background
2.1 Concepts.
2.2 Token Table.
TODO List
[Back]
2. General concepts and background
The undernet P10 protocol uses a scheme of "Numerics" to uniquenly identify a client or server within the network. Each server has its own unique numeric (0 -> 4095) and each client has its own numeric within that server (0->262,143).
The numerics are encoded into a Base64 stream to maintain human readable data flow and reduce the size of the messages. The Base64 character set used in ircu is included below, this defines all valid characters allowed in a Base64 numeric with "A" representing 0 and "]" representing 63.
Server numerics consist of 2 characters, with the minimum, 0, being represented by "AA", and the maximum, 4095, being represented by "]]". Client numerics are 3 characters long, with the minimum, 0, being represented by "AAA", and the maximum, 262,143, being represented by "]]]". The unique identifier of a client on the network consists of a combination of both the server and client numeric in the format SSCCC.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789[]
As an example, consider a server "irc.undernet.org" which has a numeric of 2, translating to "AC" in Base64. On this server exists a client, whom has been allocated the numeric 63 (which translates to "AA]" in Base64). Therefore, the unique identifier of this client on the network is "ACAA]". From this, we can determine which server the message came from, aswell as the client who sent it.
These numerics are used to prefix every message issued on the stream except for the initial "PASS" or "SERVER" message, which are not prefixed. Therefore, every message that can be recieved from a server will consist of the format:
For Example:[NUMERIC PREFIX] [TOKEN] [DATA]
2.2 Token TableA[A5j P ABAAA :Foo.
The following table lists all the acceptable messages, along with their
relevant "Token", which is used in the server<>server protocol. The
aim of tokenisation is to reduce the bandwidth used during network communication
by reducing the length of common message identifiers.
| Message | Token |
| PRIVMSG | P |
| WHO | H |
| WHOIS | W |
| WHOWAS | X |
| USER | USER |
| NICK | N |
| SERVER | S |
| LIST | LIST |
| TOPIC | T |
| INVITE | I |
| VERSION | V |
| QUIT | Q |
| SQUIT | SQ |