Undernet P10 Protocol and Interface Specification

(As of ircu 2.10.11)

Undernet Coder-com, coder-com@undernet.org

$Id: p10.html,v 1.6 2002/02/14 00:20:40 ghostwolf Exp $


This document aims to be a practical guide for implementing and maintaining the protocol, not just a reference manual.

This document is "work in progress" and being continually updated :)



1. Introduction

2. General concepts and background

2.1 Concepts.
2.2 Token Table.

3. Registration and syncronisation

4. Continous operation

4. Programmers reference: Function headers

5. Programmers reference: Client/Server Structures

6. FAQ

7. Acknowledgements and disclaimer

8. Update History

  • TODO List

  • 1. Introduction

    [Back]


    2. General concepts and background

    2.1 Concepts

    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.

    ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789[]
    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.

    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:

    [NUMERIC PREFIX] [TOKEN] [DATA]
    For Example:
    A[A5j P ABAAA :Foo.
    2.2 Token Table

    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