Difference between revisions of "Packet Layout"

From Second Life Wiki
Jump to navigation Jump to search
Line 5: Line 5:
** LL_RELIABLE_FLAG 0x40  
** LL_RELIABLE_FLAG 0x40  
** LL_ZERO_CODE_FLAG    0x80  
** LL_ZERO_CODE_FLAG    0x80  
* Bytes 0, (4 least significant bits)  to byte 3: Packet ID, assigned by circuit
* Bytes 0, (4 least significant bits)  to byte 3: (for a total of 28 bit) Packet ID, assigned by circuit
* Everything beyond this is zerocoded for compression
* Everything beyond this is potentially zerocoded for compression
 
* Bytes n thru n+(frequency size)
* Bytes n thru n+(frequency size)
** 1/2/4 byte ID of the message the packet contains
** 1/2/4 byte ID of the message the packet contains
* Bytes n thru n+(data length)
* Bytes n thru n+(data length)
** Body of packet, possibly zero coded.
** Body of packet, possibly zero coded.
* Bytes n+(data length) thru acks
* Bytes n+(data length) thru acks
** Rest of packet is fill with as many acks as will fit from reliable messages
** Rest of packet is fill with as many acks as will fit from reliable messages

Revision as of 14:20, 31 October 2006

Header:

  • Byte 0, most 4 significant bits: Packet Information
    • LL_ACK_FLAG 0x10
    • LL_RESENT_FLAG 0x20
    • LL_RELIABLE_FLAG 0x40
    • LL_ZERO_CODE_FLAG 0x80
  • Bytes 0, (4 least significant bits) to byte 3: (for a total of 28 bit) Packet ID, assigned by circuit
  • Everything beyond this is potentially 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