From afc2c4818834efb1fd45c267515ef26e674f63f8 Mon Sep 17 00:00:00 2001 From: Marius Halden Date: Mon, 11 Jan 2016 01:37:26 +0100 Subject: initial --- data_structures | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 data_structures (limited to 'data_structures') diff --git a/data_structures b/data_structures new file mode 100644 index 0000000..3a1c570 --- /dev/null +++ b/data_structures @@ -0,0 +1,27 @@ + +struct ipv6 { + union { + struct in6_addr addr; + u_int32_t addr32[4]; + } _ipv6; +#define addr32 _ipv6.addr32 +}; + +struct cidr { + sa_family_t ai_family; + union { + u_int32_t addr4; + struct ipv6 addr6; + }; + u_int8_t bits; +}; + +struct bl { + sa_family_t ai_family; + union { + u_int32_t addr4; + struct ipv6 addr6; + }; + int8_t b; + int8_t w; +}; -- cgit v1.2.3