Packet Formats
NETBLT packets are divided into three categories, each of which share a common packet header. First, there are those packets that travel only from sender to receiver; these contain the control message sequence numbers which the receiver uses for reliability. These packets are the NULL-ACK, DATA, and LDATA packets. Second, there is a packet that travels only from receiver to sender. This is the CONTROL packet; each CONTROL packet can contain an arbitrary number of control messages (GO, OK, or RESEND), each with its own sequence number. Finally, there are those packets which either have special ways of insuring reliability, or are not reliably transmitted. These are the QUIT, QUITACK, DONE, KEEPALIVE, and ABORT packets. Of these, all save the DONE packet can be sent by both sending and receiving NETBLTs.
Packet type numbers:
OPEN: 0
RESPONSE: 1
KEEPALIVE: 2
DONE: 3
QUIT: 4
QUITACK: 5
ABORT: 6
DATA: 7
LDATA: 8
NULL-ACK: 9
CONTROL: 10
Standard header:
local port: 2 bytes
foreign port: 2 bytes
checksum: 2 bytes
version number: 1 byte
packet type: 1 byte
packet length: 2 bytes
OPEN and RESPONSE packets:
connection unique ID: 4 bytes
standard buffer size: 4 bytes
transfer size: 4 bytes
DATA packet data segment size: 2 bytes
burst size: 2 bytes
burst rate: 2 bytes
death timeout value in seconds: 2 bytes
transfer mode (1 = SEND, 0 = RECEIVE): 1 byte
maximum number of concurrent buffers: 1 byte
checksum entire DATA packet / checksum
DATA packet data only (1/0): 1 byte
client-specific data: arbitrary
DONE, QUITACK, KEEPALIVE:
standard header only
ABORT, QUIT:
reason: arbitrary bytes
CONTROL packet format:
CONTROL packets consist of a standard NETBLT header of type CONTROL, followed by an arbitrary number of control messages with the following formats:
Control message numbers:
GO: 0
OK: 1
RESEND: 2
OK message:
message type (OK): 1 byte
buffer number: 4 bytes
sequence number: 2 bytes
new burst size: 2 bytes
new burst interval: 2 bytes
GO message:
message type (GO): 1 byte
buffer number: 4 bytes
sequence number: 2 bytes
RESEND message:
message type (RESEND): 1 byte
buffer number: 4 bytes
sequence number: 2 bytes
number of missing packets: 2 bytes
packet numbers...: n * 2 bytes
DATA, LDATA packet formats:
buffer number: 4 bytes
highest consecutive sequence number received: 2 bytes
packet number within buffer: 2 bytes
data: arbitrary bytes
NULL-ACK packet format:
highest consecutive sequence number received: 2 bytes
acknowledged new burst size: 2 bytes
acknowledged new burst interval: 2 bytes