FD.io VPP  v19.08.3-2-gbabecb413
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 131 of file prefix.hpp.

Constructor & Destructor Documentation

◆ prefix_t() [1/6]

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

Default Constructor - creates ::/0.

Definition at line 160 of file prefix.cpp.

◆ prefix_t() [2/6]

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

Constructor with address and length.

Definition at line 136 of file prefix.cpp.

◆ prefix_t() [3/6]

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 142 of file prefix.cpp.

◆ prefix_t() [4/6]

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

Constructor with string and length.

Definition at line 148 of file prefix.cpp.

◆ prefix_t() [5/6]

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

Copy Constructor.

Definition at line 154 of file prefix.cpp.

◆ prefix_t() [6/6]

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 243 of file prefix.cpp.

◆ ~prefix_t()

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

Destructor.

Definition at line 166 of file prefix.cpp.

Member Function Documentation

◆ address()

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

Get the address.

Definition at line 180 of file prefix.cpp.

+ Here is the caller graph for this function:

◆ high()

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

Get the highest address in the prefix.

Definition at line 445 of file prefix.cpp.

+ Here is the call graph for this function:

◆ l3_proto()

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

Get the L3 protocol.

Definition at line 289 of file prefix.cpp.

◆ low()

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

get the lowest address in the prefix

Definition at line 435 of file prefix.cpp.

+ Here is the call graph for this function:

◆ mask()

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 406 of file prefix.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mask_width()

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

Get the network mask width.

Definition at line 186 of file prefix.cpp.

+ Here is the caller graph for this function:

◆ operator!=()

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

not equal opartor

Definition at line 208 of file prefix.cpp.

◆ operator<()

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

Less than operator.

Definition at line 192 of file prefix.cpp.

◆ operator=()

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

Assignement.

Definition at line 171 of file prefix.cpp.

◆ operator==()

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

equals operator

Definition at line 202 of file prefix.cpp.

◆ to_string()

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

convert to string format for debug purposes

Definition at line 214 of file prefix.cpp.

+ Here is the caller graph for this function:

◆ to_vpp()

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 282 of file prefix.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ ZERO

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

The all Zeros prefix.

Definition at line 205 of file prefix.hpp.

◆ ZEROv6

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

The all Zeros v6 prefix.

Definition at line 210 of file prefix.hpp.


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