Azinix

Pkt_TcpHdr_t Struct Reference

TCP Packet header. More...

#include <pkt.h>


Data Fields

u_int16_t srcPort
u_int16_t destPort
u_int32_t seqNum
u_int32_t ackNum
u_int16_t res1:4
u_int16_t doff:4
u_int16_t fin:1
u_int16_t syn:1
u_int16_t rst:1
u_int16_t psh:1
u_int16_t ack:1
u_int16_t urg:1
u_int16_t ece:1
u_int16_t cwr:1
u_int16_t advWindow
u_int16_t checkSum
u_int16_t urgPtr


Detailed Description

TCP Packet header.

Taken from p 377 of Peterson and and Davie, 2nd edition.

I've not used bit fields to avoid alignment and big/little endian issues, and have set options to be a single int. Note this is just the header field.

Definition at line 268 of file pkt.h.


Field Documentation

u_int16_t Pkt_TcpHdr_t::srcPort

Definition at line 271 of file pkt.h.

u_int16_t Pkt_TcpHdr_t::destPort

Definition at line 272 of file pkt.h.

u_int32_t Pkt_TcpHdr_t::seqNum

Definition at line 278 of file pkt.h.

u_int32_t Pkt_TcpHdr_t::ackNum

Definition at line 279 of file pkt.h.

u_int16_t Pkt_TcpHdr_t::res1

Definition at line 282 of file pkt.h.

u_int16_t Pkt_TcpHdr_t::doff

Definition at line 282 of file pkt.h.

u_int16_t Pkt_TcpHdr_t::fin

Definition at line 282 of file pkt.h.

u_int16_t Pkt_TcpHdr_t::syn

Definition at line 282 of file pkt.h.

u_int16_t Pkt_TcpHdr_t::rst

Definition at line 282 of file pkt.h.

u_int16_t Pkt_TcpHdr_t::psh

Definition at line 282 of file pkt.h.

u_int16_t Pkt_TcpHdr_t::ack

Definition at line 282 of file pkt.h.

u_int16_t Pkt_TcpHdr_t::urg

Definition at line 282 of file pkt.h.

u_int16_t Pkt_TcpHdr_t::ece

Definition at line 282 of file pkt.h.

u_int16_t Pkt_TcpHdr_t::cwr

Definition at line 282 of file pkt.h.

u_int16_t Pkt_TcpHdr_t::advWindow

Definition at line 292 of file pkt.h.

u_int16_t Pkt_TcpHdr_t::checkSum

Definition at line 294 of file pkt.h.

u_int16_t Pkt_TcpHdr_t::urgPtr

Definition at line 295 of file pkt.h.