next up previous contents
Next: UDP header Up: TCP/IP header fields Previous: IPv4 header   Contents

TCP header

The following fields are defined for the TCP header, as described in [RFC793]:


\begin{displaymath}
\begin{tabular}{l\vert cccccccccccccccccccccccccccccccc\vert...
...e{2-33}
\multicolumn{33}{l}{{\tt tcp\_data}} \\
\end{tabular}\end{displaymath}

TCP flags:


\begin{displaymath}
\begin{tabular}{\vert c\vert c\vert c\vert c\vert c\vert c\v...
...ST} & {\tt tcp\_SYN} & {\tt tcp\_FIN} \\
\hline
\end{tabular}\end{displaymath}

All fields listed above are based on tcp_hdr, which in turn is defined as follows:

field tcp_hdr = ip_nexthdr if ip_proto == IPPROTO_TCP;

Therefore, accessing any TCP header field automatically adds the precondition (see section 2.6.2) ip_proto == IPPROTO_TCP.

fields.tc defines a few additional fields for TCP options. Because tcng has currently no mechanism for iterating over a list of options, these fields are of no practical use and are therefore not documented.



Martin A. Brown 2003-11-06