IPv4 packet. More...

#include <senf/Packets/DefaultBundle/IPv4Packet.hh>

Inheritance diagram for senf::IPv4PacketType:

Public Types

typedef PacketTypeMixin< IPv4PacketType, IPTypesmixin
 
typedef ConcretePacket< IPv4PacketTypepacket
 IPv4 packet typedef. More...
 
typedef IPv4PacketParser parser
 typedef to the parser of IPv4 packet More...
 
- Public Types inherited from senf::PacketTypeBase
typedef Packet packet
 
typedef senf::detail::packet::iterator iterator
 
typedef senf::detail::packet::const_iterator const_iterator
 
typedef senf::detail::packet::size_type size_type
 
typedef senf::detail::packet::difference_type difference_type
 
typedef senf::detail::packet::byte byte
 
typedef PacketInterpreterBase::range range
 
typedef PacketInterpreterBase::optional_range optional_range
 
typedef PacketInterpreterBase::factory_t factory_t
 
typedef VoidPacketParser parser
 Parser to parser packet fields. More...
 
- Public Types inherited from senf::PacketTypeMixin< IPv4PacketType, IPTypes >
typedef IPTypes ::key_t key_t
 
typedef boost::optional< key_toptional_key_t
 

Static Public Member Functions

static key_t nextPacketKey (packet p)
 
static void dump (packet p, std::ostream &os)
 Dump given IPv4Packet in readable form to given output stream. More...
 
static void finalize (packet p)
 Finalize packet. More...
 
- Static Public Member Functions inherited from senf::PacketTypeBase
static optional_range no_range ()
 
static factory_t no_factory ()
 
template<class PacketType >
static factory_t factory ()
 
static size_type initSize ()
 Get size of new (empty) packet. More...
 
static size_type initHeadSize ()
 Get size of new (empty) packet header. More...
 
static void init (packet p)
 Initialize new packet. More...
 
static optional_range nextPacketRange (packet p)
 Get next packet placement. More...
 
static factory_t nextPacketType (packet p)
 Get type of next packet. More...
 
static void finalize (packet p)
 Finalize packet. More...
 
static void dump (packet p, std::ostream &os)
 Dump packet data in readable form. More...
 
- Static Public Member Functions inherited from senf::PacketTypeMixin< IPv4PacketType, IPTypes >
static optional_key_t key (Packet const &p)
 Find key of packet from registry. More...
 
static PacketTypeBase::factory_t lookup (key_t key)
 Lookup the key in the registry. More...
 
static PacketInterpreterBase::optional_range nextPacketRange (ConcretePacket< IPv4PacketType > const &p)
 
static PacketInterpreterBase::factory_t nextPacketType (ConcretePacket< IPv4PacketType > const &p)
 
static PacketInterpreterBase::size_type initSize ()
 
static void init (ConcretePacket< IPv4PacketType > const &p)
 

Static Public Attributes

static const EtherTypes::key_t etherType = 0x0800
 

Detailed Description

IPv4 packet.

Packet type (typedef):
IPv4Packet
Fields:
see IPv4PacketParser
0 4 8 12 16 20 24 28 31
Version IHL TOS Length
Identifier R DF MF Fragment Offset
Time to Live (ttl) Protocol Header Checksum
Source Address
Destination Address
Associated registries:
IPTypes
Finalize action:

Definition at line 143 of file IPv4Packet.hh.

Member Typedef Documentation

◆ mixin

◆ packet

IPv4 packet typedef.

Definition at line 148 of file IPv4Packet.hh.

◆ parser

typedef to the parser of IPv4 packet

Definition at line 149 of file IPv4Packet.hh.

Member Function Documentation

◆ dump()

void senf::IPv4PacketType::dump ( packet  p,
std::ostream &  os 
)
static

Dump given IPv4Packet in readable form to given output stream.

Definition at line 50 of file IPv4Packet.cc.

◆ finalize()

void senf::IPv4PacketType::finalize ( packet  p)
static

Finalize packet.

Definition at line 71 of file IPv4Packet.cc.

◆ nextPacketKey()

static key_t senf::IPv4PacketType::nextPacketKey ( packet  p)
inlinestatic

Definition at line 156 of file IPv4Packet.hh.

Member Data Documentation

◆ etherType

const EtherTypes::key_t senf::IPv4PacketType::etherType = 0x0800
static

Definition at line 170 of file IPv4Packet.hh.


The documentation for this struct was generated from the following files: