Passa al contenuto principale

Formati dei pacchetti

I pacchetti NETBLT sono divisi in tre categorie, tutte con un'intestazione di pacchetto comune. In primo luogo ci sono i pacchetti che viaggiano solo dal mittente al ricevente; questi contengono i numeri di sequenza dei messaggi di controllo che il ricevente usa per l'affidabilità. Questi pacchetti sono i pacchetti NULL-ACK, DATA e LDATA. In secondo luogo c'è un pacchetto che viaggia solo dal ricevente al mittente. È il pacchetto CONTROL; ogni pacchetto CONTROL può contenere un numero arbitrario di messaggi di controllo (GO, OK o RESEND), ciascuno con il proprio numero di sequenza. Infine ci sono i pacchetti che hanno modi particolari per garantire l'affidabilità, oppure non sono trasmessi in modo affidabile. Sono i pacchetti QUIT, QUITACK, DONE, KEEPALIVE e ABORT. Di questi, tutti tranne il pacchetto DONE possono essere inviati sia dai NETBLT mittenti sia da quelli riceventi.

Numeri dei tipi di pacchetto:

OPEN:           0
RESPONSE: 1
KEEPALIVE: 2
DONE: 3
QUIT: 4
QUITACK: 5
ABORT: 6
DATA: 7
LDATA: 8
NULL-ACK: 9
CONTROL: 10

Intestazione standard:

local port:       2 bytes
foreign port: 2 bytes
checksum: 2 bytes
version number: 1 byte
packet type: 1 byte
packet length: 2 bytes

Pacchetti OPEN e RESPONSE:

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

Formato del pacchetto CONTROL:

I pacchetti CONTROL sono costituiti da un'intestazione NETBLT standard di tipo CONTROL, seguita da un numero arbitrario di messaggi di controllo con i seguenti formati:

Numeri dei messaggi di controllo:

GO:             0
OK: 1
RESEND: 2

Messaggio OK:

message type (OK):  1 byte
buffer number: 4 bytes
sequence number: 2 bytes
new burst size: 2 bytes
new burst interval: 2 bytes

Messaggio GO:

message type (GO):  1 byte
buffer number: 4 bytes
sequence number: 2 bytes

Messaggio RESEND:

message type (RESEND):     1 byte
buffer number: 4 bytes
sequence number: 2 bytes
number of missing packets: 2 bytes
packet numbers...: n * 2 bytes

Formati dei pacchetti DATA e LDATA:

buffer number:                                4 bytes
highest consecutive sequence number received: 2 bytes
packet number within buffer: 2 bytes
data: arbitrary bytes

Formato del pacchetto NULL-ACK:

highest consecutive sequence number received: 2 bytes
acknowledged new burst size: 2 bytes
acknowledged new burst interval: 2 bytes