- struct version {
- enum _v {
- //Number Description Reference
- //------ ---------------------------------------------------- ---------
- // 0 Reserved
- IPv4 = 1, //IP (IP version 4)
- IPv6 = 2, //IP6 (IP version 6)
- // 3 NSAP
- // 4 HDLC (8-bit multidrop)
- // 5 BBN 1822
- // 6 802 (includes all 802 media plus Ethernet "canonical format")
- // 7 E.163
- E164 = 8 //E.164 (SMDS, Frame Relay, ATM)
- // 9 F.69 (Telex)
- // 10 X.121 (X.25, Frame Relay)
- // 11 IPX
- // 12 Appletalk
- // 13 Decnet IV
- // 14 Banyan Vines
- // 15 E.164 with NSAP format subaddress [UNI-3.1] [Andy_Malis]
- // 16 DNS (Domain Name System)
- // 17 Distinguished Name [Charles_Lynn]
- // 18 AS Number [Charles_Lynn]
- // 19 XTP over IP version 4 [Mike_Saul]
- // 20 XTP over IP version 6 [Mike_Saul]
- // 21 XTP native mode XTP [Mike_Saul]
- // 22 Fibre Channel World-Wide Port Name [Mark_Bakke]
- // 23 Fibre Channel World-Wide Node Name [Mark_Bakke]
- // 24 GWID [Subra_Hegde]
- // 25 AFI for L2VPN information [RFC4761][RFC6074]
- // 26-16383 Unassigned
- // 16384 EIGRP Common Service Family [Donnie_Savage] 2008-05-13
- // 16385 EIGRP IPv4 Service Family [Donnie_Savage] 2008-05-13
- // 16386 EIGRP IPv6 Service Family [Donnie_Savage] 2008-05-13
- // 16387 LISP Canonical Address Format (LCAF) [David_Meyer] 2009-11-12
- // 16388-32767 Unassigned
- // 32768-65534 Unassigned
- // 65535 Reserved
- };
-
- /**
- * Version description
- * @param v Version type
- * @return Version description
- */
- static const char* asText(const version::_v v) throw() { // anna_declare_enum is not safe, because labels don't have to match a sequence
- if(v == version::IPv4) return "IPv4";
-
- if(v == version::IPv6) return "IPv6";
-
- if(v == version::E164) return "E164";
-
- return NULL;
- }
- };
+ static const char* asText(const _v v) throw() { // anna_declare_enum is not safe, because labels don't have to match a sequence
+ if(v == IPv4) return "IPv4";
+
+ if(v == IPv6) return "IPv6";
+
+ if(v == E164) return "E164";
+
+ return NULL;
+ }
+
+} iana_address_version_t;
+
+
+/**
+ Struct for IANA Addresses
+*/
+typedef struct {