1. Source Port (16 bits):
• Identifies the sender's port number. It is used to enable the recipient to send a response back to the sender if necessary.
2. Destination Port (16 bits):
• Specifies the port number of the destination application or service on the recipient's device.
3. Length (16 bits):
• Indicates the total length of the UDP datagram, including the header and the data, in bytes.
4. Checksum (16 bits):
• Used for error-checking purposes. The checksum is calculated based on the header and data fields to ensure the integrity of the UDP datagram during transmission.
5. Data (variable length):
• Contains the actual payload or data being transmitted. The length of the data field can vary based on the application or service using UDP.