|
MAC header |
IP header |
UDP header |
Data ::: |
UDP header:
|
00 |
01 |
02 |
03 |
04 |
05 |
06 |
07 |
08 |
09 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
|
Data ::: |
|||||||||||||||||||||||||||||||
The port number of the sender. Cleared
to zero if not used.
The port this packet is addressed to.
Length.
16 bits.
The length in bytes of the UDP header and the encapsulated
data. The minimum value for this field is 8.
Checksum.
16 bits.
Computed as the 16-bit one's complement of the one's complement sum of a pseudo
header of information from the IP header, the UDP header, and the data, padded
as needed with zero bytes at the end to make a multiple of two bytes. If the
checksum is cleared to zero, then checksuming is
disabled. If the computed checksum is zero, then this field must be set to
0xFFFF.
When transported by IPv4, the pseudo header contains the following fields:
|
00 |
01 |
02 |
03 |
04 |
05 |
06 |
07 |
08 |
09 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
|
Source IPv4 address |
|||||||||||||||||||||||||||||||
|
Destination IPv4 address |
|||||||||||||||||||||||||||||||
|
0 |
Protocol |
Total length |
|||||||||||||||||||||||||||||
The checksum is not optional when transported by IPv6. In this case, the pseudo header contains the following fields:
|
00 |
01 |
02 |
03 |
04 |
05 |
06 |
07 |
08 |
09 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
|
Source IPv6 address ::: |
|||||||||||||||||||||||||||||||
|
Destination IPv6 address ::: |
|||||||||||||||||||||||||||||||
|
Upper layer packet length |
|||||||||||||||||||||||||||||||
|
0 |
Next header |
||||||||||||||||||||||||||||||