RouterLink Class Reference

Defines a link/interface, carried in a RouterLsa. More...

#include <lsa.hh>

List of all members.

Public Types

enum  Type { p2p = 1, transit = 2, stub = 3, vlink = 4 }

Public Member Functions

 RouterLink (OspfTypes::Version version)
 RouterLink (const RouterLink &rhs)
RouterLink operator= (const RouterLink &rhs)
void copy (const RouterLink &rhs)
bool operator== (const RouterLink &rhs)
size_t length () const
RouterLink decode (uint8_t *ptr, size_t &len) const throw (InvalidPacket)
 Decode a RouterLink.
size_t copy_out (uint8_t *to_uint8) const
 Copy a wire format representation to the pointer provided.
OspfTypes::Version get_version () const
void set_type (Type t)
Type get_type () const
void set_metric (uint16_t metric)
uint16_t get_metric () const
void set_link_id (uint32_t link_id)
uint32_t get_link_id () const
void set_link_data (uint32_t link_data)
uint32_t get_link_data () const
void set_interface_id (uint32_t interface_id)
uint32_t get_interface_id () const
void set_neighbour_interface_id (uint32_t neighbour_interface_id)
uint32_t get_neighbour_interface_id () const
void set_neighbour_router_id (uint32_t neighbour_router_id)
uint32_t get_neighbour_router_id () const
string str () const
 Generate a printable representation of the header.

Private Attributes

const OspfTypes::Version _version
Type _type
uint16_t _metric
uint32_t _link_id
uint32_t _link_data
uint32_t _interface_id
uint32_t _neighbour_interface_id
uint32_t _neighbour_router_id

Detailed Description

Defines a link/interface, carried in a RouterLsa.

Member Function Documentation

size_t RouterLink::copy_out ( uint8_t *  to_uint8) const

Copy a wire format representation to the pointer provided.

The caller should have called length() to pre-allocate the space required.

length() should be called by the caller to verify enough space is available.

the number of bytes written.
RouterLink RouterLink::decode ( uint8_t *  ptr,
size_t &  len 
) const throw (InvalidPacket)

Decode a RouterLink.

bufpointer to buffer.
lenlength of the buffer on input set to the number of bytes consumed on output.
A RouterLink.
size_t RouterLink::length ( ) const
the number of bytes the encoded data will occupy.

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