wire / wire-format / udp-header
The UDP header is a fixed 8 bytes: 16-bit source port, 16-bit destination port, 16-bit length (header + data), and 16-bit checksum. There is no sequencing, acknowledgement, or connection state — UDP is a thin, connectionless datagram wrapper over IP.
aka: UDP datagram header · User Datagram Protocol header
spec: RFC 768
An 8-byte connectionless header. Length covers the header plus data; the checksum is optional in IPv4 (zero means not computed) but mandatory in IPv6.
| field | size | meaning |
|---|---|---|
| Source Port | 16 bits | Sending port; may be zero if no reply is expected. |
| Destination Port | 16 bits | Receiving port. |
| Length | 16 bits | Length in bytes of the UDP header plus data (minimum 8). |
| Checksum | 16 bits | Ones-complement checksum over a pseudo-header, the UDP header, and data. Optional in IPv4 (0 = unused); required in IPv6. |
example:
00 35 00 35 00 1C 00 00
src port 0x0035 = 53 (DNS), dst port 53, length 0x001C = 28 bytes (8 header + 20 data), checksum 0x0000 (not computed).
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/udp-header
or /wire-format/udp-header.json