20 static vapi_type_ip4_address
21 to_api(
const boost::asio::ip::address_v4&
a)
23 vapi_type_ip4_address
v;
25 std::copy_n(a.to_bytes().data(), 4, v.address);
30 static vapi_type_ip6_address
31 to_api(
const boost::asio::ip::address_v6&
a)
33 vapi_type_ip6_address
v;
35 std::copy_n(a.to_bytes().data(), 16, v.address);
44 vapi_type_address
v = {
53 vapi_type_address
v = {
70 std::array<uint8_t, 16>
a;
71 std::copy(v.un.ip6.address, v.un.ip6.address + 16, std::begin(a));
72 boost::asio::ip::address_v6 v6(a);
75 std::array<uint8_t, 4>
a;
76 std::copy(v.un.ip6.address, v.un.ip6.address + 4, std::begin(a));
77 boost::asio::ip::address_v4 v4(a);
87 vapi_type_mac_address
v;
89 std::copy(std::begin(a.
bytes), std::end(a.
bytes), v.bytes);
109 vapi_type_prefix
v = {
boost::asio::ip::address ip_address_t
ip_address_t from_api(const vapi_type_address &v)
struct mac_address_t_ mac_address_t
std::array< uint8_t, 6 > bytes
Underlying bytes array.
static vapi_type_ip4_address to_api(const boost::asio::ip::address_v4 &a)
The VPP Object Model (VOM) library.
uint8_t mask_width() const
Get the network mask width.
const boost::asio::ip::address & address() const
Get the address.
Type def of a Ethernet address.