next up previous contents
Next: ICMP header Up: Packet construction Previous: TCP header   Contents

UDP header

The macro UDP_HDR builds a UDP header, as defined in [RFC768]. The macro UDP_PCK prepends an IPv4 header to the UDP header.

\begin{displaymath}
\begin{tabular}{\vert cccccccccccccccccccccccccccccccc\vert}...
...rt}{0} &
\multicolumn{16}{c\vert}{0} \\
\hline
\end{tabular}\end{displaymath}

Example:

$udp_sport=53   /* DNS */

send UDP_PCK($ip_src=198.41.0.4 $udp_sport=5432)



Martin A. Brown 2003-11-06