The payload hi is two bytes, and those two bytes advance the client count.

highlighted = computed this step

Payload bytes are counted

The payload is hex 0x6869, the two ASCII bytes for hi.

payload bytes=2\text{payload bytes}=2
Payload lengthThe toy TCP data segment is decoded from exact header and payload bytes.TCP header160 bits / 20 bytes0x9c4001bb000003e9000013895018100000000000byte 0byte 1byte 2byte 310011100010000000000000110111011byte 4byte 5byte 6byte 700000000000000000000001111101001byte 8byte 9byte 10byte 1100000000000000000001001110001001byte 12byte 13byte 14byte 1501010000000110000001000000000000byte 16byte 17byte 18byte 1900000000000000000000000000000000source-port40000destination-port443sequence-number1001acknowledgment-number5001data-offset5reserved0x0flags0x18window0x1000checksum0x0000urgent-pointer0Payload16 bits / 2 bytes0x6869byte 0byte 10110100001101001payload0x6869

hi has length two

The byte h is one byte and i is one byte, so this payload length is 2.

hi=2|hi|=2
Payload lengthThe toy TCP data segment is decoded from exact header and payload bytes.TCP header160 bits / 20 bytes0x9c4001bb000003e9000013895018100000000000byte 0byte 1byte 2byte 310011100010000000000000110111011byte 4byte 5byte 6byte 700000000000000000000001111101001byte 8byte 9byte 10byte 1100000000000000000001001110001001byte 12byte 13byte 14byte 1501010000000110000001000000000000byte 16byte 17byte 18byte 1900000000000000000000000000000000source-port40000destination-port443sequence-number1001acknowledgment-number5001data-offset5reserved0x0flags0x18window0x1000checksum0x0000urgent-pointer0Payload16 bits / 2 bytes0x6869byte 0byte 10110100001101001payload0x6869

Two bytes advance the count by two

Because the payload length is 2, the next client byte after this segment is two positions later.

1001+2=10031001+2=1003
Payload lengthThe toy TCP data segment is decoded from exact header and payload bytes.TCP header160 bits / 20 bytes0x9c4001bb000003e9000013895018100000000000byte 0byte 1byte 2byte 310011100010000000000000110111011byte 4byte 5byte 6byte 700000000000000000000001111101001byte 8byte 9byte 10byte 1100000000000000000001001110001001byte 12byte 13byte 14byte 1501010000000110000001000000000000byte 16byte 17byte 18byte 1900000000000000000000000000000000source-port40000destination-port443sequence-number1001acknowledgment-number5001data-offset5reserved0x0flags0x18window0x1000checksum0x0000urgent-pointer0Payload16 bits / 2 bytes0x6869byte 0byte 10110100001101001payload0x6869

Summary

TCP ACK arithmetic counts payload bytes, not messages.

bytes counted=2\text{bytes counted}=2
Payload lengthThe toy TCP data segment is decoded from exact header and payload bytes.TCP header160 bits / 20 bytes0x9c4001bb000003e9000013895018100000000000byte 0byte 1byte 2byte 310011100010000000000000110111011byte 4byte 5byte 6byte 700000000000000000000001111101001byte 8byte 9byte 10byte 1100000000000000000001001110001001byte 12byte 13byte 14byte 1501010000000110000001000000000000byte 16byte 17byte 18byte 1900000000000000000000000000000000source-port40000destination-port443sequence-number1001acknowledgment-number5001data-offset5reserved0x0flags0x18window0x1000checksum0x0000urgent-pointer0Payload16 bits / 2 bytes0x6869byte 0byte 10110100001101001payload0x6869