xorp

PacketRouteEntry< IPv4 > Class Template Reference

Route Entry appearing in RIP packets on IPv4. More...

#include <packets.hh>

Inheritance diagram for PacketRouteEntry< IPv4 >:
PacketRouteEntryWriter< IPv4 >

List of all members.

Public Member Functions

 PacketRouteEntry (const uint8_t *data)
uint16_t addr_family () const
uint16_t tag () const
IPv4 addr () const
uint32_t prefix_len () const
IPv4Net net () const
IPv4 nexthop () const
uint32_t metric () const
bool is_table_request () const
bool is_auth_entry () const

Static Public Member Functions

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

Static Public Attributes

static const size_t SIZE = 20
static const uint16_t ADDR_FAMILY = 2
static const uint16_t ADDR_FAMILY_DUMP = 0
static const uint16_t ADDR_FAMILY_AUTH = 0xffff

Static Protected Attributes

static const size_t _af_sizeof = 2
static const size_t _tag_sizeof = 2
static const size_t _addr_sizeof = 4
static const size_t _mask_sizeof = 4
static const size_t _nh_sizeof = 4
static const size_t _metric_sizeof = 4
static const size_t _af_offset = 0
static const size_t _tag_offset = _af_offset + _af_sizeof
static const size_t _addr_offset = _tag_offset + _tag_sizeof
static const size_t _mask_offset = _addr_offset + _addr_sizeof
static const size_t _nh_offset = _mask_offset + _mask_sizeof
static const size_t _metric_offset = _nh_offset + _nh_sizeof

Private Attributes

const uint8_t * _data
const uint8_t * _af
const uint8_t * _tag
const uint8_t * _addr
const uint8_t * _mask
const uint8_t * _nh
const uint8_t * _metric

Detailed Description

template<>
class PacketRouteEntry< IPv4 >

Route Entry appearing in RIP packets on IPv4.

This payload is carried in RIP packets on IPv4. The entry contains all the fields for RIPv2. RIPv1 and RIPv2 use the same size structure, except RIPv1 treats the route tag, subnet mask and nexthop fields as Must-Be-Zero (MBZ) items. The interpretation of the fields is described in RFC2453.

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.

The route entry has the following content:

af (2 bytes): // The address family tag (2 bytes): // Tag addr (4 bytes): // Address mask (4 bytes): // Mask nh (4 bytes): // Next hop metric (4 bytes): // Metric


Member Function Documentation

bool PacketRouteEntry< IPv4 >::is_auth_entry ( ) const [inline]
Returns:
true if route entry has properties of an authentication entry.
bool PacketRouteEntry< IPv4 >::is_table_request ( ) const [inline]
Returns:
true if route entry has properties of a table request.
static size_t PacketRouteEntry< IPv4 >::size ( ) [inline, static]

Get the RIP IPv4 route entry size.

Returns:
the RIP IPv4 route entry size.

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