xorp

ElemCom32 Class Reference

32bit unsigned integer with BGP communities friendly syntax. More...

#include <element.hh>

Inheritance diagram for ElemCom32:
Element

List of all members.

Public Member Functions

 ElemCom32 (const char *)
 Element constructor with a parser for a BGP community syntax.
 ElemCom32 (const uint32_t val)
string str () const
 Every element must be representable by a string.
uint32_t val () const
const char * type () const
bool operator== (const ElemCom32 &rhs) const
bool operator< (const ElemCom32 &rhs) const

Static Public Attributes

static const char * id = "com32"
static Hash _hash = HASH_ELEM_COM32

Private Attributes

uint32_t _val

Detailed Description

32bit unsigned integer with BGP communities friendly syntax.

"X" -> (uint32_t) X ":X" -> (uint16_t) X "X:" -> ((uint16_t) X) << 16 "X:Y" -> (((uint16_t) X) << 16) + (uint16_t) Y


Constructor & Destructor Documentation

ElemCom32::ElemCom32 ( const char *  c_str)

Element constructor with a parser for a BGP community syntax.

"N" -> (uint32_t) N ":N" -> (uint16_t) N "N:" -> ((uint16_t) N) << 16 "N:M" -> (((uint16_t) N) << 16) + (uint16_t) M


Member Function Documentation

string ElemCom32::str ( ) const [virtual]

Every element must be representable by a string.

This is a requirement to enable the policy manager to send elements to the backend filters via XRL calls for example.

Returns:
string representation of the element.

Implements Element.

const char* ElemCom32::type ( ) const [inline, virtual]
Returns:
string representation of element type.

Implements Element.


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