aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/encoding/payloads/configuration_attribute.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-10-18 11:46:13 +0000
committerMartin Willi <martin@strongswan.org>2006-10-18 11:46:13 +0000
commit60356f3375da67375e48691bb1d732c02d1681a1 (patch)
tree1bfa3bd28d46c4211a17a831094e7fcbceea8bb6 /src/charon/encoding/payloads/configuration_attribute.c
parent8cdce67afa4bc4b4ff1a05e956db08cddc5dc48e (diff)
downloadstrongswan-60356f3375da67375e48691bb1d732c02d1681a1.tar.bz2
strongswan-60356f3375da67375e48691bb1d732c02d1681a1.tar.xz
introduced new logging subsystem using bus:
passive listeners can register on the bus active listeners wait for signals actively multiplexing allows multiple listeners to receive debug signals a lot more...
Diffstat (limited to 'src/charon/encoding/payloads/configuration_attribute.c')
-rw-r--r--src/charon/encoding/payloads/configuration_attribute.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/src/charon/encoding/payloads/configuration_attribute.c b/src/charon/encoding/payloads/configuration_attribute.c
index 88adbd66f..5982214ac 100644
--- a/src/charon/encoding/payloads/configuration_attribute.c
+++ b/src/charon/encoding/payloads/configuration_attribute.c
@@ -58,27 +58,23 @@ struct private_configuration_attribute_t {
chunk_t attribute_value;
};
-/**
- * String mappings for configuration_attribute_type_t.
- */
-mapping_t configuration_attribute_type_m[] = {
- {INTERNAL_IP4_ADDRESS, "INTERNAL_IP4_ADDRESS"},
- {INTERNAL_IP4_NETMASK, "INTERNAL_IP4_NETMASK"},
- {INTERNAL_IP4_DNS, "INTERNAL_IP4_DNS"},
- {INTERNAL_IP4_NBNS, "INTERNAL_IP4_NBNS"},
- {INTERNAL_ADDRESS_EXPIRY, "INTERNAL_ADDRESS_EXPIRY"},
- {INTERNAL_IP4_DHCP, "INTERNAL_IP4_DHCP"},
- {APPLICATION_VERSION, "APPLICATION_VERSION"},
- {INTERNAL_IP6_ADDRESS, "INTERNAL_IP6_ADDRESS"},
- {INTERNAL_IP6_DNS, "INTERNAL_IP6_DNS"},
- {INTERNAL_IP6_NBNS, "INTERNAL_IP6_NBNS"},
- {INTERNAL_IP6_DHCP, "INTERNAL_IP6_DHCP"},
- {INTERNAL_IP4_SUBNET, "INTERNAL_IP4_SUBNET"},
- {SUPPORTED_ATTRIBUTES, "SUPPORTED_ATTRIBUTES"},
- {INTERNAL_IP6_SUBNET, "INTERNAL_IP6_SUBNET"},
- {MAPPING_END, NULL}
-};
-
+ENUM_BEGIN(configuration_attribute_type_name, INTERNAL_IP4_ADDRESS, INTERNAL_IP6_ADDRESS,
+ "INTERNAL_IP4_ADDRESS",
+ "INTERNAL_IP4_NETMASK",
+ "INTERNAL_IP4_DNS",
+ "INTERNAL_IP4_NBNS",
+ "INTERNAL_ADDRESS_EXPIRY",
+ "INTERNAL_IP4_DHCP",
+ "APPLICATION_VERSION",
+ "INTERNAL_IP6_ADDRESS");
+ENUM_NEXT(configuration_attribute_type_name, INTERNAL_IP6_DNS, INTERNAL_IP6_SUBNET, INTERNAL_IP6_ADDRESS,
+ "INTERNAL_IP6_DNS",
+ "INTERNAL_IP6_NBNS",
+ "INTERNAL_IP6_DHCP",
+ "INTERNAL_IP4_SUBNET",
+ "SUPPORTED_ATTRIBUTES",
+ "INTERNAL_IP6_SUBNET");
+ENUM_END(configuration_attribute_type_name, INTERNAL_IP6_SUBNET);
/**
* Encoding rules to parse or generate a configuration attribute.