16 #ifndef __VOM_PREFIX_H__ 17 #define __VOM_PREFIX_H__ 20 #include <boost/asio/ip/address.hpp> 151 prefix_t(
const std::string& s, uint8_t len);
161 prefix_t(uint8_t is_ip6, uint8_t* addr, uint8_t len);
185 bool operator<(
const prefix_t& o)
const;
215 void to_vpp(uint8_t* is_ip6, uint8_t* addr, uint8_t* len)
const;
310 bool operator<(
const mprefix_t& o)
const;
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);
uint32_t table_id_t
type def the table-id
static const ip_dscp_t DSCP_AF21
static const ip_dscp_t DSCP_CS4
static const ip_dscp_t DSCP_AF11
bool operator!=(const enum_base &e) const
Comparison operator.
A template base class for all enum types.
static const nh_proto_t IPV6
static const nh_proto_t IPV4
static const ip_dscp_t DSCP_AF33
static const prefix_t ZEROv6
The all Zeros v6 prefix.
An L3 protocol can be used to construct a prefix that is used to match packets are part of a route...
static const ip_dscp_t DSCP_AF12
static const nh_proto_t & from_address(const boost::asio::ip::address &addr)
boost::asio::ip::address_v4 operator &(const boost::asio::ip::address_v4 &addr1, const boost::asio::ip::address_v4 &addr2)
bool operator==(const enum_base &e) const
Comparison operator.
static const l3_proto_t MPLS
static const ip_dscp_t DSCP_AF13
static const ip_dscp_t DSCP_CS2
enum_base operator|(const enum_base &e1) const
bitwise or
static const ip_dscp_t DSCP_AF32
Types belonging to Routing.
static const l3_proto_t IPV4
static const ip_dscp_t DSCP_CS5
static const l3_proto_t IPV6
void to_bytes(const boost::asio::ip::address_v6 &addr, uint8_t *array)
static const table_id_t DEFAULT_TABLE
The table-id for the default table.
static void to_vpp(const l2_rule &rule, vapi_type_macip_acl_rule &payload)
static const ip_dscp_t DSCP_CS7
static const mprefix_t ZERO
The all Zeros prefix.
boost::asio::ip::address_v4 operator~(const boost::asio::ip::address_v4 &addr1)
vl_api_address_union_t src_address
static const ip_dscp_t DSCP_CS6
static const mprefix_t ZEROv6
The all Zeros v6 prefix.
static const ip_dscp_t DSCP_AF41
uint32_t mask_width(const boost::asio::ip::address &addr)
Get the prefix mask length of a host route from the boost address.
static const ip_dscp_t DSCP_AF43
static const ip_dscp_t DSCP_CS1
static const ip_dscp_t DSCP_AF22
const std::string & to_string() const
convert to string format for debug purposes
static const ip_dscp_t DSCP_AF23
static const ip_dscp_t DSCP_EF
static const ip_dscp_t DSCP_AF42
enum ip_dscp_t_ ip_dscp_t
boost::asio::ip::address from_bytes(uint8_t is_ip6, const uint8_t *bytes)
Convert a VPP byte stinrg into a boost addresss.
enum_base & operator=(const enum_base &e)
Assignment.
static const ip_dscp_t DSCP_AF31
std::ostream & operator<<(std::ostream &os, const std::pair< direction_t, interface::key_t > &key)
static const nh_proto_t MPLS
The VPP Object Model (VOM) library.
static const ip_dscp_t DSCP_CS0
static const prefix_t ZERO
The all Zeros prefix.
static const ip_dscp_t DSCP_CS3
vl_api_address_union_t grp_address
static const nh_proto_t ETHERNET