UDP (User datagram protocol)

+--------+--------+--------+--------+ 
|     Source      |   Destination   | 
|      Port       |      Port       | 
+--------+--------+--------+--------+ 
|                 |                 | 
|     Length      |    Checksum     | 
+--------+--------+--------+--------+

UDP psuedo header
+--------+--------+--------+--------+
|          source address           |
+--------+--------+--------+--------+
|        destination address        |
+--------+--------+--------+--------+
|  zero  |protocol|   UDP length    |
+--------+--------+--------+--------+

UDP header is 8 byte in length.

Checksum is an optional field and if the checksum is calculated then UDP calculates checksum by adding a psuedo header. Psuedo header is of 12 byte with 1 byte as padding. If the checksum value is 0 then it means that checksum is not calculated and if checksum is calculated and it comes out to be 0 then checksum field is filled as 65535.

Advertisements
This entry was posted in Networking. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s