Plain packet contains either the whole file, or file request (freq), or transition packet or email message. It is called "plain", because it contains plaintext, but plain packets would never be stored on your hard drive.
HEADER +-------------------------------+--...---+ | MAGIC | TYPE | PATHLEN | PATH | PAYLOAD| +-------------------------------+--...---+
XDR type | Value | |
---|---|---|
Magic number | 8-byte, fixed length opaque data | NNCPP0x10x00x00 |
Payload type | unsigned integer | 0 (file), 1 (freq), 2 (mail), 3 (transition) |
Path length | unsigned integer | actual length of following 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: