|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef __VOM_PREFIX_H__
17 #define __VOM_PREFIX_H__
20 #include <boost/asio/ip/address.hpp>
357 boost::asio::ip::address_v4
operator|(
const boost::asio::ip::address_v4& addr1,
358 const boost::asio::ip::address_v4& addr2);
360 boost::asio::ip::address_v4
operator&(
const boost::asio::ip::address_v4& addr1,
361 const boost::asio::ip::address_v4& addr2);
363 boost::asio::ip::address_v4
operator~(
const boost::asio::ip::address_v4& addr1);
365 boost::asio::ip::address_v6
operator|(
const boost::asio::ip::address_v6& addr1,
366 const boost::asio::ip::address_v6& addr2);
368 boost::asio::ip::address_v6
operator&(
const boost::asio::ip::address_v6& addr1,
369 const boost::asio::ip::address_v6& addr2);
371 boost::asio::ip::address_v6
operator~(
const boost::asio::ip::address_v6& addr1);
392 void to_bytes(
const boost::asio::ip::address_v4&
addr, uint8_t* array);
393 void to_bytes(
const boost::asio::ip::address_v6&
addr, uint8_t* array);
const static l3_proto_t MPLS
bool operator!=(const mprefix_t &o) const
not equal opartor
const static ip_dscp_t DSCP_CS2
boost::asio::ip::address_v4 operator&(const boost::asio::ip::address_v4 &addr1, const boost::asio::ip::address_v4 &addr2)
uint8_t mask_width() const
Get the network mask width.
The VPP Object Model (VOM) library.
const static prefix_t ZERO
The all Zeros prefix.
const static ip_dscp_t DSCP_CS4
boost::asio::ip::address_v4 operator~(const boost::asio::ip::address_v4 &addr1)
const static nh_proto_t MPLS
prefix_t()
Default Constructor - creates ::/0.
void to_bytes(const boost::asio::ip::address_v6 &addr, uint8_t *array)
const static ip_dscp_t DSCP_AF33
const static l3_proto_t IPV4
mprefix_t()
Default Constructor - creates ::/0.
const boost::asio::ip::address & grp_address() const
Get the address.
prefix_t low() const
get the lowest address in the prefix
uint32_t mask_width(const boost::asio::ip::address &addr)
Get the prefix mask length of a host route from the boost address.
uint8_t mask_width() const
Get the network mask width.
boost::asio::ip::address from_bytes(uint8_t is_ip6, const uint8_t *bytes)
Convert a VPP byte stinrg into a boost addresss.
const static ip_dscp_t DSCP_AF21
boost::asio::ip::address_v4 operator|(const boost::asio::ip::address_v4 &addr1, const boost::asio::ip::address_v4 &addr2)
prefix_t & operator=(const prefix_t &)
Assignement.
const static ip_dscp_t DSCP_AF12
l3_proto_t l3_proto() const
Get the L3 protocol.
const boost::asio::ip::address & src_address() const
const boost::asio::ip::address & address() const
Get the address.
std::string to_string() const
convert to string format for debug purposes
const static ip_dscp_t DSCP_AF43
bool operator!=(const prefix_t &o) const
not equal opartor
const static ip_dscp_t DSCP_CS7
const static ip_dscp_t DSCP_AF23
const static mprefix_t ZERO
The all Zeros prefix.
const static nh_proto_t ETHERNET
const static ip_dscp_t DSCP_AF41
A template base class for all enum types.
const static ip_dscp_t DSCP_CS3
bool operator==(const prefix_t &o) const
equals operator
const static ip_dscp_t DSCP_EF
manual_print typedef address
static const l3_proto_t & from_address(const boost::asio::ip::address &addr)
prefix_t high() const
Get the highest address in the prefix.
const static ip_dscp_t DSCP_CS5
const static ip_dscp_t DSCP_AF22
bool operator==(const mprefix_t &o) const
equals operator
const static ip_dscp_t DSCP_AF11
std::ostream & operator<<(std::ostream &os, const std::pair< direction_t, interface::key_t > &key)
l3_proto_t l3_proto() const
Get the L3 protocol.
bool operator<(const mprefix_t &o) const
Less than operator.
const static mprefix_t ZEROv6
The all Zeros v6 prefix.
static const nh_proto_t & from_address(const boost::asio::ip::address &addr)
An L3 protocol can be used to construct a prefix that is used to match packets are part of a route.
const static nh_proto_t IPV6
const static ip_dscp_t DSCP_AF32
boost::asio::ip::address mask() const
Return a address representation of the mask, e.g.
vl_api_ip4_address_t gaddr
Types belonging to Routing.
void to_vpp(uint8_t *is_ip6, uint8_t *addr, uint8_t *len) const
Convert the prefix into VPP API parameters.
ip_dscp_t(int v)
Constructor allows the creation of any DSCP value.
const static ip_dscp_t DSCP_CS0
const static prefix_t ZEROv6
The all Zeros v6 prefix.
const static ip_dscp_t DSCP_AF42
uint32_t table_id_t
type def the table-id
const static ip_dscp_t DSCP_CS6
mprefix_t & operator=(const mprefix_t &)
Assignement.
const static nh_proto_t IPV4
bool operator<(const prefix_t &o) const
Less than operator.
const static table_id_t DEFAULT_TABLE
The table-id for the default table.
const static ip_dscp_t DSCP_CS1
const nh_proto_t & to_nh_proto() const
const static ip_dscp_t DSCP_AF31
const static ip_dscp_t DSCP_AF13
const static l3_proto_t IPV6
std::string to_string() const
convert to string format for debug purposes