MD5PacketRouteEntry4 Class Reference

Route Entry for MD5 data. More...

#include <packets.hh>

Inheritance diagram for MD5PacketRouteEntry4:

List of all members.

Public Member Functions

 MD5PacketRouteEntry4 (const uint8_t *data)
uint16_t addr_family () const
uint16_t auth_type () const
uint16_t auth_off () const
uint8_t key_id () const
uint8_t auth_bytes () const
uint32_t seqno () const

Static Public Member Functions

static size_t size ()
 Get the RIP IPv4 MD5 authentication route entry size.

Static Public Attributes

static const size_t SIZE = 20
static const uint16_t ADDR_FAMILY = 0xffff
static const uint16_t AUTH_TYPE = 3

Static Protected Attributes

static const size_t _af_sizeof = 2
static const size_t _auth_sizeof = 2
static const size_t _auth_off_sizeof = 2
static const size_t _key_id_sizeof = 1
static const size_t _auth_bytes_sizeof = 1
static const size_t _seqno_sizeof = 4
static const size_t _mbz_sizeof = 8
static const size_t _af_offset = 0
static const size_t _auth_offset = _af_offset + _af_sizeof
static const size_t _auth_off_offset = _auth_offset + _auth_sizeof
static const size_t _key_id_offset = _auth_off_offset + _auth_off_sizeof
static const size_t _auth_bytes_offset = _key_id_offset + _key_id_sizeof
static const size_t _seqno_offset = _auth_bytes_offset + _auth_bytes_sizeof
static const size_t _mbz_offset = _seqno_offset + _seqno_sizeof

Private Attributes

const uint8_t * _data
const uint8_t * _af
const uint8_t * _auth
const uint8_t * _auth_off
const uint8_t * _key_id
const uint8_t * _auth_bytes
const uint8_t * _seqno
const uint8_t * _mbz

Detailed Description

Route Entry for MD5 data.

The MD5PacketRouteEntry4 may appear as the first route entry in a RIPv2 packet. It has the same size as an PacketRouteEntry<IPv4>. The address family has the special value 0xffff which implies authentication. The authentication type is overlaid in the route tag field and takes the special value 3. With MD5 the authentication data appears after the remaining route entries. Details are disclosed in RFC2082.

All items in the route entry are stored in network order. The accessor methods provide values in host order, and the modifiers take arguments in host order.

NB We describe the field labelled as "RIP-2 Packet Length" on page 5 of RFC 2082 as the "auth_off". This matches the textual description in the RFC.

The MD5 authentication entry has the following content:

af (2 bytes): // 0xffff - Authentication header auth (2 bytes): // Authentication type auth_off (2 bytes): // Offset of authentication data key_id (1 byte): // Key number used auth_bytes (1 byte): // Auth data length at end of packet seqno (4 bytes): // Monotonically increasing seqno mbz (8 bytes): // Must-be-zero

Member Function Documentation

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

Get the RIP IPv4 MD5 authentication route entry size.

the RIP IPv4 MD5 authentication route entry size.

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