FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
VOM::route::prefix_t Class Reference

A prefix defintion. More...

+ Collaboration diagram for VOM::route::prefix_t:

Public Member Functions

 prefix_t ()
 Default Constructor - creates ::/0. More...
 
 prefix_t (const boost::asio::ip::address &addr, uint8_t len)
 Constructor with address and length. More...
 
 prefix_t (const boost::asio::ip::address &addr)
 Constructor with just the address, this creates a host prefix. More...
 
 prefix_t (const std::string &s, uint8_t len)
 Constructor with string and length. More...
 
 prefix_t (const prefix_t &)
 Copy Constructor. More...
 
 prefix_t (uint8_t is_ip6, uint8_t *addr, uint8_t len)
 Constructor with VPP API prefix representation. More...
 
 ~prefix_t ()
 Destructor. More...
 
const boost::asio::ip::address & address () const
 Get the address. More...
 
uint8_t mask_width () const
 Get the network mask width. More...
 
prefix_toperator= (const prefix_t &)
 Assignement. More...
 
bool operator< (const prefix_t &o) const
 Less than operator. More...
 
bool operator== (const prefix_t &o) const
 equals operator More...
 
bool operator!= (const prefix_t &o) const
 not equal opartor More...
 
std::string to_string () const
 convert to string format for debug purposes More...
 
void to_vpp (uint8_t *is_ip6, uint8_t *addr, uint8_t *len) const
 Convert the prefix into VPP API parameters. More...
 
boost::asio::ip::address mask () const
 Return a address representation of the mask, e.g. More...
 
prefix_t low () const
 get the lowest address in the prefix More...
 
prefix_t high () const
 Get the highest address in the prefix. More...
 
l3_proto_t l3_proto () const
 Get the L3 protocol. More...
 

Static Public Attributes

static const prefix_t ZERO
 The all Zeros prefix. More...
 
static const prefix_t ZEROv6
 The all Zeros v6 prefix. More...
 

Detailed Description

A prefix defintion.

Address + length

Definition at line 91 of file prefix.hpp.

Constructor & Destructor Documentation

VOM::route::prefix_t::prefix_t ( )

Default Constructor - creates ::/0.

Definition at line 116 of file prefix.cpp.

VOM::route::prefix_t::prefix_t ( const boost::asio::ip::address &  addr,
uint8_t  len 
)

Constructor with address and length.

Definition at line 92 of file prefix.cpp.

VOM::route::prefix_t::prefix_t ( const boost::asio::ip::address &  addr)

Constructor with just the address, this creates a host prefix.

Definition at line 98 of file prefix.cpp.

VOM::route::prefix_t::prefix_t ( const std::string &  s,
uint8_t  len 
)

Constructor with string and length.

Definition at line 104 of file prefix.cpp.

VOM::route::prefix_t::prefix_t ( const prefix_t o)

Copy Constructor.

Definition at line 110 of file prefix.cpp.

VOM::route::prefix_t::prefix_t ( uint8_t  is_ip6,
uint8_t *  addr,
uint8_t  len 
)

Constructor with VPP API prefix representation.

Definition at line 199 of file prefix.cpp.

VOM::route::prefix_t::~prefix_t ( )

Destructor.

Definition at line 122 of file prefix.cpp.

Member Function Documentation

const boost::asio::ip::address & VOM::route::prefix_t::address ( ) const

Get the address.

Definition at line 136 of file prefix.cpp.

+ Here is the caller graph for this function:

route::prefix_t VOM::route::prefix_t::high ( ) const

Get the highest address in the prefix.

Definition at line 401 of file prefix.cpp.

+ Here is the call graph for this function:

l3_proto_t VOM::route::prefix_t::l3_proto ( ) const

Get the L3 protocol.

Definition at line 245 of file prefix.cpp.

route::prefix_t VOM::route::prefix_t::low ( ) const

get the lowest address in the prefix

Definition at line 391 of file prefix.cpp.

+ Here is the call graph for this function:

boost::asio::ip::address VOM::route::prefix_t::mask ( ) const

Return a address representation of the mask, e.g.

255.255.0.0

Definition at line 362 of file prefix.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint8_t VOM::route::prefix_t::mask_width ( ) const

Get the network mask width.

Definition at line 142 of file prefix.cpp.

+ Here is the caller graph for this function:

bool VOM::route::prefix_t::operator!= ( const prefix_t o) const

not equal opartor

Definition at line 164 of file prefix.cpp.

bool VOM::route::prefix_t::operator< ( const prefix_t o) const

Less than operator.

Definition at line 148 of file prefix.cpp.

route::prefix_t & VOM::route::prefix_t::operator= ( const prefix_t o)

Assignement.

Definition at line 127 of file prefix.cpp.

bool VOM::route::prefix_t::operator== ( const prefix_t o) const

equals operator

Definition at line 158 of file prefix.cpp.

std::string VOM::route::prefix_t::to_string ( void  ) const

convert to string format for debug purposes

Definition at line 170 of file prefix.cpp.

+ Here is the caller graph for this function:

void VOM::route::prefix_t::to_vpp ( uint8_t *  is_ip6,
uint8_t *  addr,
uint8_t *  len 
) const

Convert the prefix into VPP API parameters.

Definition at line 238 of file prefix.cpp.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

const route::prefix_t VOM::route::prefix_t::ZERO
static

The all Zeros prefix.

Definition at line 163 of file prefix.hpp.

const route::prefix_t VOM::route::prefix_t::ZEROv6
static

The all Zeros v6 prefix.

Definition at line 168 of file prefix.hpp.


The documentation for this class was generated from the following files: