FD.io VPP
v20.05.1-6-gf53edbc3b
Vector Packet Processing
|
A prefix defintion. More...
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_t & | operator= (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... | |
VOM::route::prefix_t::prefix_t | ( | ) |
Default Constructor - creates ::/0.
Definition at line 160 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 136 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 142 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 148 of file prefix.cpp.
VOM::route::prefix_t::prefix_t | ( | const prefix_t & | o | ) |
Copy Constructor.
Definition at line 154 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 243 of file prefix.cpp.
VOM::route::prefix_t::~prefix_t | ( | ) |
Destructor.
Definition at line 166 of file prefix.cpp.
const boost::asio::ip::address & VOM::route::prefix_t::address | ( | ) | const |
Get the address.
Definition at line 180 of file prefix.cpp.
route::prefix_t VOM::route::prefix_t::high | ( | ) | const |
Get the highest address in the prefix.
Definition at line 445 of file prefix.cpp.
l3_proto_t VOM::route::prefix_t::l3_proto | ( | ) | const |
Get the L3 protocol.
Definition at line 289 of file prefix.cpp.
route::prefix_t VOM::route::prefix_t::low | ( | ) | const |
get the lowest address in the prefix
Definition at line 435 of file prefix.cpp.
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.
uint8_t VOM::route::prefix_t::mask_width | ( | ) | const |
Get the network mask width.
Definition at line 186 of file prefix.cpp.
not equal opartor
Definition at line 208 of file prefix.cpp.
Less than operator.
Definition at line 192 of file prefix.cpp.
route::prefix_t & VOM::route::prefix_t::operator= | ( | const prefix_t & | o | ) |
Assignement.
Definition at line 171 of file prefix.cpp.
equals operator
Definition at line 202 of file prefix.cpp.
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.
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.
|
static |
The all Zeros prefix.
Definition at line 205 of file prefix.hpp.
|
static |
The all Zeros v6 prefix.
Definition at line 210 of file prefix.hpp.