xorp

RipPacketHeader Class Reference

Header appearing at the start of each RIP packet. More...

#include <packets.hh>

Inheritance diagram for RipPacketHeader:
RipPacketHeaderWriter

List of all members.

Public Member Functions

 RipPacketHeader (const uint8_t *data)
uint8_t command () const
uint8_t version () const
uint8_t unused0 () const
uint8_t unused1 () const
bool valid_command () const
bool valid_version (uint8_t v) const
bool valid_padding () const

Static Public Member Functions

static size_t size ()
 Get the RIP packet header size.

Static Public Attributes

static const uint8_t REQUEST = 1
static const uint8_t RESPONSE = 2
static const uint8_t IPv4_VERSION = RIP_AF_CONSTANTS<IPv4>::PACKET_VERSION
static const uint8_t IPv6_VERSION = RIP_AF_CONSTANTS<IPv6>::PACKET_VERSION
static const size_t SIZE = 4

Static Protected Attributes

static const size_t _command_sizeof = 1
static const size_t _version_sizeof = 1
static const size_t _unused0_sizeof = 1
static const size_t _unused1_sizeof = 1
static const size_t _command_offset = 0
static const size_t _version_offset = _command_offset + _command_sizeof
static const size_t _unused0_offset = _version_offset + _version_sizeof
static const size_t _unused1_offset = _unused0_offset + _unused0_sizeof

Private Attributes

const uint8_t * _data
const uint8_t * _command
const uint8_t * _version
const uint8_t * _unused0
const uint8_t * _unused1

Detailed Description

Header appearing at the start of each RIP packet.

The RIP packet header has the following content:

command (1 byte): // The command: 1 - request, 2 - response version (1 byte): // 1 - IPv4 RIPv1/IPv6 RIPng, 2 - IPv4 RIP v2 unused0 (1 byte): // Unused unused1 (1 byte): // Unused


Member Function Documentation

static size_t RipPacketHeader::size ( ) [inline, static]

Get the RIP packet header size.

Returns:
the RIP packet header size.

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations