class RipPacket

RIP Packet class. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods


Detailed Description

A container for RIP packet, provides easy to use accessors and modifiers.

typedef A Addr

Addr

const Addr&  address ()

address

[const]

Returns: destination address of packet.

uint16_t  port ()

port

[const]

Returns: destination port of packet.

uint32_t  max_entries ()

max_entries

[const]

Returns: the maximum number of route entries packet may have.

void  set_max_entries (uint32_t max_entries)

set_max_entries

Set the maximum number of route entries a packet may have. This method should be called before using append_data methods as it resizes the internal storage and will cause appended data to be lost.

 RipPacket (const Addr& addr, uint16_t port, uint32_t max_entries = RIPv2_ROUTES_PER_PACKET)

RipPacket

const uint8_t*  header_ptr ()

header_ptr

[const]

Returns: const pointer to the beginning of the RIP packet header.

uint8_t*  header_ptr ()

header_ptr

Returns: pointer to the beginning of the RIP packet header.

const uint8_t*  route_entry_ptr (uint32_t entry_no)

route_entry_ptr

[const]

Route entry accessor.

Parameters:

entry_noindex of route entry to retrive.

Returns: const pointer to route entry, or 0 if entry_no is greater than the maximum route entries associated with packet.

uint8_t*  route_entry_ptr (uint32_t entry_no)

route_entry_ptr

Route entry accessor.

Parameters:

entry_noindex of route entry to retrive.

Returns: pointer to route entry, or 0 if entry_no is greater than the maximum route entries associated with packet.

void  append_data (const uint8_t* data, uint32_t data_bytes)

append_data

void  append_data (const vector<uint8_t>& data)

append_data

vector<uint8_t>&  data ()

data

const vector<uint8_t>&  data ()

data

[const]

uint32_t  data_bytes ()

data_bytes

[const]

const uint8_t*  data_ptr ()

data_ptr

[const]

uint8_t*  data_ptr ()

data_ptr


Generated by: pavlin on kobe.xorp.net on Wed Jan 7 19:11:10 2009, using kdoc 2.0a54+XORP.