From b5efeac0b3a652cff74e1325ea55bf93bca9b084 Mon Sep 17 00:00:00 2001 From: Marius Halden Date: Mon, 11 Jan 2016 15:30:06 +0100 Subject: Update datastructures --- data_structures | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/data_structures b/data_structures index 3a1c570..1920773 100644 --- a/data_structures +++ b/data_structures @@ -2,8 +2,10 @@ struct ipv6 { union { struct in6_addr addr; + u_int8_t addr8[16]; // To be removed (I hope) u_int32_t addr32[4]; } _ipv6; +#define addr8 _ipv6.addr8 #define addr32 _ipv6.addr32 }; @@ -12,7 +14,7 @@ struct cidr { union { u_int32_t addr4; struct ipv6 addr6; - }; + } _addr; u_int8_t bits; }; @@ -21,7 +23,10 @@ struct bl { union { u_int32_t addr4; struct ipv6 addr6; - }; + } _addr; int8_t b; int8_t w; }; + +#define addr4 _addr.addr4 +#define addr6 _addr.addr6 -- cgit v1.2.3