Azinix

Pkt_IpHdr_t Struct Reference

IP Packet header. More...

#include <pkt.h>


Data Fields

u_int8_t ihl:4
u_int8_t version:4
u_int8_t TOS
u_int16_t length
u_int16_t id
u_int16_t RB:1
u_int16_t DF:1
u_int16_t MF:1
u_int16_t offset:13
u_int8_t TTL
u_int8_t protocol
u_int16_t checksum
u_int32_t sourceIp
u_int32_t destIp


Detailed Description

IP Packet header.

Taken from p 252 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 109 of file pkt.h.


Field Documentation

u_int8_t Pkt_IpHdr_t::ihl

Definition at line 115 of file pkt.h.

u_int8_t Pkt_IpHdr_t::version

Definition at line 115 of file pkt.h.

u_int8_t Pkt_IpHdr_t::TOS

Definition at line 119 of file pkt.h.

u_int16_t Pkt_IpHdr_t::length

Definition at line 121 of file pkt.h.

u_int16_t Pkt_IpHdr_t::id

Definition at line 123 of file pkt.h.

u_int16_t Pkt_IpHdr_t::RB

Definition at line 140 of file pkt.h.

u_int16_t Pkt_IpHdr_t::DF

Definition at line 140 of file pkt.h.

u_int16_t Pkt_IpHdr_t::MF

Definition at line 140 of file pkt.h.

u_int16_t Pkt_IpHdr_t::offset

Definition at line 140 of file pkt.h.

u_int8_t Pkt_IpHdr_t::TTL

Definition at line 142 of file pkt.h.

u_int8_t Pkt_IpHdr_t::protocol

Definition at line 144 of file pkt.h.

u_int16_t Pkt_IpHdr_t::checksum

Definition at line 150 of file pkt.h.

u_int32_t Pkt_IpHdr_t::sourceIp

Definition at line 152 of file pkt.h.

u_int32_t Pkt_IpHdr_t::destIp

Definition at line 153 of file pkt.h.