summaryrefslogtreecommitdiffstats
path: root/data_structures
diff options
context:
space:
mode:
Diffstat (limited to 'data_structures')
-rw-r--r--data_structures9
1 files 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