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
>(
35 const neighbour::flags_t
53 to_api(
const boost::asio::ip::address_v4&
a, vapi_type_ip4_address& v)
55 std::copy_n(std::begin(
a.to_bytes()),
a.to_bytes().size(), v);
58 to_api(
const boost::asio::ip::address_v6&
a, vapi_type_ip6_address& v)
60 std::copy_n(std::begin(
a.to_bytes()),
a.to_bytes().size(), v);
68 memcpy(v.un.ip4,
a.to_v4().to_bytes().data(), 4);
71 memcpy(v.un.ip6,
a.to_v6().to_bytes().data(), 16);
77 vapi_union_address_union& u,
78 vapi_enum_address_family& af)
82 memcpy(u.ip4,
a.to_v4().to_bytes().data(), 4);
85 memcpy(u.ip6,
a.to_v6().to_bytes().data(), 16);
93 memcpy(u.ip4,
a.to_v4().to_bytes().data(), 4);
95 memcpy(u.ip6,
a.to_v6().to_bytes().data(), 16);
99 boost::asio::ip::address_v6
102 std::array<uint8_t, 16>
a;
103 std::copy(v, v + 16, std::begin(
a));
104 boost::asio::ip::address_v6 v6(
a);
109 boost::asio::ip::address_v4
112 std::array<uint8_t, 4>
a;
113 std::copy(v, v + 4, std::begin(
a));
114 boost::asio::ip::address_v4 v4(
a);
125 std::array<uint8_t, 16>
a;
126 std::copy(v.un.ip6, v.un.ip6 + 16, std::begin(
a));
127 boost::asio::ip::address_v6 v6(
a);
130 std::array<uint8_t, 4>
a;
131 std::copy(v.un.ip6, v.un.ip6 + 4, std::begin(
a));
132 boost::asio::ip::address_v4 v4(
a);
140 from_api(
const vapi_union_address_union& u, vapi_enum_fib_path_nh_proto
proto)
145 std::array<uint8_t, 16>
a;
146 std::copy(u.ip6, u.ip6 + 16, std::begin(
a));
147 boost::asio::ip::address_v6 v6(
a);
150 std::array<uint8_t, 4>
a;
151 std::copy(u.ip6, u.ip6 + 4, std::begin(
a));
152 boost::asio::ip::address_v4 v4(
a);
160 from_api(
const vapi_union_address_union& u, vapi_enum_address_family af)
165 std::array<uint8_t, 16>
a;
166 std::copy(u.ip6, u.ip6 + 16, std::begin(
a));
167 boost::asio::ip::address_v6 v6(
a);
170 std::array<uint8_t, 4>
a;
171 std::copy(u.ip6, u.ip6 + 4, std::begin(
a));
172 boost::asio::ip::address_v4 v4(
a);
182 std::copy(std::begin(
a.bytes),
std::end(
a.bytes), v);
211 v.grp_address_length);
217 vapi_enum_address_family af;
226 vapi_enum_fib_path_nh_proto
242 vapi_enum_address_family