メインコンテンツまでスキップ

パケット形式

NETBLT のパケットは 3 つのカテゴリに分けられ、いずれも共通のパケットヘッダを共有する。第一に、送信側から受信側へのみ流れるパケットがあり、これらには受信側が信頼性のために使用するコントロールメッセージのシーケンス番号が含まれる。これらのパケットは NULL-ACK、DATA、LDATA パケットである。第二に、受信側から送信側へのみ流れるパケットがある。これは CONTROL パケットであり、各 CONTROL パケットには任意の数のコントロールメッセージ (GO、OK、または RESEND) を含めることができ、それぞれが固有のシーケンス番号を持つ。最後に、信頼性を確保する特別な方法を持つか、あるいは信頼性のある送信が行われないパケットがある。これらは QUIT、QUITACK、DONE、KEEPALIVE、ABORT パケットである。このうち、DONE パケットを除くすべては、送信側と受信側の両方の NETBLT が送信できる。

パケットタイプ番号:

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

標準ヘッダ:

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

OPEN パケットと 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

CONTROL パケット形式:

CONTROL パケットは、タイプが CONTROL の標準 NETBLT ヘッダと、それに続く任意の数のコントロールメッセージから成り、コントロールメッセージの形式は次のとおりである。

コントロールメッセージ番号:

GO:             0
OK: 1
RESEND: 2

OK メッセージ:

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 type (GO):  1 byte
buffer number: 4 bytes
sequence number: 2 bytes

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

DATA、LDATA パケット形式:

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

NULL-ACK パケット形式:

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