16 #ifndef __VOM_PREFIX_H__ 17 #define __VOM_PREFIX_H__ 20 #include <boost/asio/ip/address.hpp> 112 prefix_t(
const std::string& s, uint8_t len);
122 prefix_t(uint8_t is_ip6, uint8_t* addr, uint8_t len);
146 bool operator<(
const prefix_t& o)
const;
176 void to_vpp(uint8_t* is_ip6, uint8_t* addr, uint8_t* len)
const;
271 bool operator<(
const mprefix_t& o)
const;
303 void to_vpp(uint8_t* is_ip6,
306 uint16_t* len)
const;
323 boost::asio::ip::address_v4
operator|(
const boost::asio::ip::address_v4& addr1,
324 const boost::asio::ip::address_v4& addr2);
326 boost::asio::ip::address_v4
operator&(
const boost::asio::ip::address_v4& addr1,
327 const boost::asio::ip::address_v4& addr2);
329 boost::asio::ip::address_v4
operator~(
const boost::asio::ip::address_v4& addr1);
331 boost::asio::ip::address_v6
operator|(
const boost::asio::ip::address_v6& addr1,
332 const boost::asio::ip::address_v6& addr2);
334 boost::asio::ip::address_v6
operator&(
const boost::asio::ip::address_v6& addr1,
335 const boost::asio::ip::address_v6& addr2);
337 boost::asio::ip::address_v6
operator~(
const boost::asio::ip::address_v6& addr1);
358 void to_bytes(
const boost::asio::ip::address_v4&
addr, uint8_t* array);
359 void to_bytes(
const boost::asio::ip::address_v6&
addr, uint8_t* array);
uint32_t table_id_t
type def the table-id
bool operator!=(const enum_base &e) const
Comparison operator.
A template base class for all enum types.
static const nh_proto_t IPV6
void to_vpp(const route::path &p, vapi_payload_ip_add_del_route &payload)
static const nh_proto_t IPV4
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 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
Types belonging to Routing.
static const l3_proto_t IPV4
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.
boost::asio::ip::address_v4 operator|(const boost::asio::ip::address_v4 &addr1, const boost::asio::ip::address_v4 &addr2)
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 mprefix_t ZEROv6
The all Zeros v6 prefix.
uint32_t mask_width(const boost::asio::ip::address &addr)
Get the prefix mask length of a host route from the boost address.
const std::string & to_string() const
convert to string format for debug purposes
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.
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 prefix_t ZERO
The all Zeros prefix.
vl_api_address_union_t grp_address
static const nh_proto_t ETHERNET