FD.io VPP  v19.01.2-3-gf61a1a8
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 92 of file prefix.hpp.

Constructor & Destructor Documentation

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

Default Constructor - creates ::/0.

Definition at line 129 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 105 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 111 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 117 of file prefix.cpp.

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

Copy Constructor.

Definition at line 123 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 212 of file prefix.cpp.

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

Destructor.

Definition at line 135 of file prefix.cpp.

Member Function Documentation

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

Get the address.

Definition at line 149 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 414 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 258 of file prefix.cpp.

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

get the lowest address in the prefix

Definition at line 404 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 375 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 155 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 177 of file prefix.cpp.

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

Less than operator.

Definition at line 161 of file prefix.cpp.

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

Assignement.

Definition at line 140 of file prefix.cpp.

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

equals operator

Definition at line 171 of file prefix.cpp.

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

convert to string format for debug purposes

Definition at line 183 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 251 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 166 of file prefix.hpp.

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

The all Zeros v6 prefix.

Definition at line 171 of file prefix.hpp.


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