Plain packet contains either the whole file, or file request (freq), or transition packet or exec message. It is called "plain", because it contains plaintext, but plain packets would never be stored on your hard drive.
HEADER +--------------------------------------+--...---+ | MAGIC | TYPE | NICE | PATHLEN | PATH | PAYLOAD| +--------------------------------------+--...---+
XDR type | Value | |
---|---|---|
Magic number | 8-byte, fixed length opaque data | N N C P P 0x00 0x00 0x03 |
Payload type | unsigned integer | 0 (file), 1 (freq), 2 (exec), 3 (transition) |
Niceness | unsigned integer | 1-255, preferred packet niceness level |
Path length | unsigned integer | actual length of path field’s payload |
Path | 255 byte, fixed length opaque data |
|
Path has fixed size because of hiding its actual length – it is valuable metadata. Payload is appended to the header – it is not stored as XDR field, because most XDR libraries will store all that data in the memory.
Depending on the packet’s type, payload could store:
Also depending on packet’s type, niceness level means:
NNCP_NICE
variable’s value passed during CfgExec invocation.