Packet Layout

From Second Life Wiki
Revision as of 14:13, 31 October 2006 by Phoenix Linden (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Packet Structure

Header:

  • Bytes 0: Packet Information
    • LL_ACK_FLAG 0x10
    • LL_RESENT_FLAG 0x20
    • LL_RELIABLE_FLAG 0x40
    • LL_ZERO_CODE_FLAG 0x80
    • LL_SIGNED_FLAG 0x08 | 0x04 - Allows us to have 4 choices for signing (None, UMAC, HMAC, ???)
  • Bytes 1-4: Packet ID, assigned by circuit

If LL_SIGNED_FLAG

  • Bytes 5-13: UMAC Tag
    • 64-bit signature for packet, signed after zero coding
  • Everything beyond this is zerocoded for compression
  • Bytes n thru n+(frequency size)
    • 1/2/4 byte ID of the message the packet contains
  • Bytes n thru n+(data length)
    • Body of packet, possibly zero coded.
  • Bytes n+(data length) thru acks
    • Rest of packet is fill with as many acks as will fit from reliable messages