RIP Packet class.
More...
#include <packets.hh>
List of all members.
Public Types |
|
typedef A | Addr |
Public Member Functions |
| const Addr & | address () const |
| uint16_t | port () const |
| uint32_t | max_entries () const |
| void | set_max_entries (uint32_t max_entries) |
| | Set the maximum number of route entries a packet may have.
|
|
| RipPacket (const Addr &addr, uint16_t port, uint32_t max_entries=RIPv2_ROUTES_PER_PACKET) |
| const uint8_t * | header_ptr () const |
| uint8_t * | header_ptr () |
| const uint8_t * | route_entry_ptr (uint32_t entry_no) const |
| | Route entry accessor.
|
| uint8_t * | route_entry_ptr (uint32_t entry_no) |
| | Route entry accessor.
|
|
void | append_data (const uint8_t *data, uint32_t data_bytes) |
|
void | append_data (const vector< uint8_t > &data) |
|
vector< uint8_t > & | data () |
|
const vector< uint8_t > & | data () const |
|
uint32_t | data_bytes () const |
|
const uint8_t * | data_ptr () const |
|
uint8_t * | data_ptr () |
Private Member Functions |
|
const uint8_t * | base_ptr () const |
|
uint8_t * | base_ptr () |
Private Attributes |
|
Addr | _addr |
|
uint16_t | _port |
|
vector< uint8_t > | _data |
|
uint32_t | _max_entries |
Detailed Description
template<typename A>
class RipPacket< A >
RIP Packet class.
A container for RIP packet, provides easy to use accessors and modifiers.
Member Function Documentation
template<typename A>
| const Addr& RipPacket< A >::address |
( |
| ) |
const [inline] |
- Returns:
- destination address of packet.
- Returns:
- pointer to the beginning of the RIP packet header.
template<typename A >
| const uint8_t * RipPacket< A >::header_ptr |
( |
| ) |
const |
- Returns:
- const pointer to the beginning of the RIP packet header.
template<typename A>
| uint32_t RipPacket< A >::max_entries |
( |
| ) |
const [inline] |
- Returns:
- the maximum number of route entries packet may have.
template<typename A>
| uint16_t RipPacket< A >::port |
( |
| ) |
const [inline] |
- Returns:
- destination port of packet.
template<typename A >
| const uint8_t * RipPacket< A >::route_entry_ptr |
( |
uint32_t |
entry_no | ) |
const |
Route entry accessor.
- Parameters:
-
| entry_no | index 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.
template<typename A >
| uint8_t * RipPacket< A >::route_entry_ptr |
( |
uint32_t |
entry_no | ) |
|
Route entry accessor.
- Parameters:
-
| entry_no | index 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.
template<typename A >
| void RipPacket< A >::set_max_entries |
( |
uint32_t |
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.
The documentation for this class was generated from the following file:
- /home/greearb/git/xorp.ct.github/xorp/rip/packets.hh