1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Add IPv6 addresses to NetworkInterface::Info

This commit is contained in:
Matias Fontanini
2016-03-02 21:13:50 -08:00
parent 186d23c920
commit ad71158268
3 changed files with 90 additions and 35 deletions

View File

@@ -36,6 +36,7 @@
#include "macros.h"
#include "hw_address.h"
#include "ip_address.h"
#include "ipv6_address.h"
namespace Tins {
@@ -55,11 +56,20 @@ public:
*/
typedef HWAddress<6> address_type;
/**
*
*/
struct IPv6AddressPrefix {
IPv6Address address;
uint32_t prefix_length;
};
/**
* \brief Struct that holds an interface's addresses.
*/
struct Info {
IPv4Address ip_addr, netmask, bcast_addr;
std::vector<IPv6AddressPrefix> ipv6_addrs;
address_type hw_addr;
bool is_up;
};