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
>(
49 to_api(
const boost::asio::ip::address_v4&
a, vapi_type_ip4_address& v)
51 std::copy_n(std::begin(a.to_bytes()), a.to_bytes().size(), v);
54 to_api(
const boost::asio::ip::address_v6&
a, vapi_type_ip6_address& v)
56 std::copy_n(std::begin(a.to_bytes()), a.to_bytes().size(), v);
64 memcpy(v.un.ip4, a.to_v4().to_bytes().data(), 4);
67 memcpy(v.un.ip6, a.to_v6().to_bytes().data(), 16);
73 vapi_union_address_union& u,
74 vapi_enum_address_family& af)
78 memcpy(u.ip4, a.to_v4().to_bytes().data(), 4);
81 memcpy(u.ip6, a.to_v6().to_bytes().data(), 16);
85 boost::asio::ip::address_v6
88 std::array<uint8_t, 16>
a;
89 std::copy(v, v + 16, std::begin(a));
90 boost::asio::ip::address_v6 v6(a);
95 boost::asio::ip::address_v4
98 std::array<uint8_t, 4>
a;
99 std::copy(v, v + 4, std::begin(a));
100 boost::asio::ip::address_v4 v4(a);
111 std::array<uint8_t, 16>
a;
112 std::copy(v.un.ip6, v.un.ip6 + 16, std::begin(a));
113 boost::asio::ip::address_v6 v6(a);
116 std::array<uint8_t, 4>
a;
117 std::copy(v.un.ip6, v.un.ip6 + 4, std::begin(a));
118 boost::asio::ip::address_v4 v4(a);
126 from_api(
const vapi_union_address_union& u, vapi_enum_address_family af)
131 std::array<uint8_t, 16>
a;
132 std::copy(u.ip6, u.ip6 + 16, std::begin(a));
133 boost::asio::ip::address_v6 v6(a);
136 std::array<uint8_t, 4>
a;
137 std::copy(u.ip6, u.ip6 + 4, std::begin(a));
138 boost::asio::ip::address_v4 v4(a);
148 std::copy(std::begin(a.
bytes), std::end(a.
bytes), v);
176 from_api(v.grp_address, v.af), v.grp_address_length);
182 vapi_enum_address_family af;
boost::asio::ip::address ip_address_t
const boost::asio::ip::address & address() const
Get the address.
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.
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.
The VPP Object Model (VOM) library.
const neighbour::flags_t from_api(vapi_enum_ip_neighbor_flags f)
Type def of a Ethernet address.