20 vapi_enum_ip_neighbor_flags
26 out =
static_cast<vapi_enum_ip_neighbor_flags
>(out |
29 out =
static_cast<vapi_enum_ip_neighbor_flags
>(
54 to_api(
const boost::asio::ip::address_v4&
a, vapi_type_ip4_address& v)
56 std::copy_n(std::begin(a.to_bytes()), a.to_bytes().size(), v);
59 to_api(
const boost::asio::ip::address_v6&
a, vapi_type_ip6_address& v)
61 std::copy_n(std::begin(a.to_bytes()), a.to_bytes().size(), v);
69 memcpy(v.un.ip4, a.to_v4().to_bytes().data(), 4);
72 memcpy(v.un.ip6, a.to_v6().to_bytes().data(), 16);
78 vapi_union_address_union& u,
79 vapi_enum_address_family& af)
83 memcpy(u.ip4, a.to_v4().to_bytes().data(), 4);
86 memcpy(u.ip6, a.to_v6().to_bytes().data(), 16);
94 memcpy(u.ip4, a.to_v4().to_bytes().data(), 4);
96 memcpy(u.ip6, a.to_v6().to_bytes().data(), 16);
100 boost::asio::ip::address_v6
103 std::array<uint8_t, 16>
a;
104 std::copy(v, v + 16, std::begin(a));
105 boost::asio::ip::address_v6 v6(a);
110 boost::asio::ip::address_v4
113 std::array<uint8_t, 4>
a;
114 std::copy(v, v + 4, std::begin(a));
115 boost::asio::ip::address_v4 v4(a);
126 std::array<uint8_t, 16>
a;
127 std::copy(v.un.ip6, v.un.ip6 + 16, std::begin(a));
128 boost::asio::ip::address_v6 v6(a);
131 std::array<uint8_t, 4>
a;
132 std::copy(v.un.ip6, v.un.ip6 + 4, std::begin(a));
133 boost::asio::ip::address_v4 v4(a);
141 from_api(
const vapi_union_address_union& u, vapi_enum_fib_path_nh_proto
proto)
146 std::array<uint8_t, 16>
a;
147 std::copy(u.ip6, u.ip6 + 16, std::begin(a));
148 boost::asio::ip::address_v6 v6(a);
151 std::array<uint8_t, 4>
a;
152 std::copy(u.ip6, u.ip6 + 4, std::begin(a));
153 boost::asio::ip::address_v4 v4(a);
161 from_api(
const vapi_union_address_union& u, vapi_enum_address_family af)
166 std::array<uint8_t, 16>
a;
167 std::copy(u.ip6, u.ip6 + 16, std::begin(a));
168 boost::asio::ip::address_v6 v6(a);
171 std::array<uint8_t, 4>
a;
172 std::copy(u.ip6, u.ip6 + 4, std::begin(a));
173 boost::asio::ip::address_v4 v4(a);
183 std::copy(std::begin(a.
bytes), std::end(a.
bytes), v);
211 from_api(v.grp_address, v.af), v.grp_address_length);
217 vapi_enum_address_family af;
226 vapi_enum_fib_path_nh_proto
boost::asio::ip::address ip_address_t
const boost::asio::ip::address & address() const
Get the address.
static const nh_proto_t IPV6
static const nh_proto_t IPV4
const boost::asio::ip::address & grp_address() const
Get the address.
static const flags_t STATIC
vapi_enum_ip_neighbor_flags to_api(const neighbour::flags_t &f)
uint8_t mask_width() const
Get the network mask width.
uint8_t mask_width() const
Get the network mask width.
Types belonging to Routing.
static const flags_t NONE
const boost::asio::ip::address & src_address() const
static const flags_t NO_FIB_ENTRY
struct mac_address_t_ mac_address_t
std::array< uint8_t, 6 > bytes
Underlying bytes array.
invalid_decode(const std::string reason)
static const nh_proto_t MPLS
The VPP Object Model (VOM) library.
const neighbour::flags_t from_api(vapi_enum_ip_neighbor_flags f)
Type def of a Ethernet address.
static const nh_proto_t ETHERNET
vl_api_fib_path_nh_proto_t proto