From 3cfd8393bfb9f9a17ed645fbb8e094a9be24781c Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Sun, 5 Jun 2011 14:17:47 +0200 Subject: [PATCH] enum names for ietf_attr_t --- src/libimcv/Makefile.am | 2 +- src/libimcv/ietf/ietf_attr.c | 32 ++++++++++++++++++++++++++++++++ src/libimcv/ietf/ietf_attr.h | 7 +++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 src/libimcv/ietf/ietf_attr.c diff --git a/src/libimcv/Makefile.am b/src/libimcv/Makefile.am index 1f0b02838..5697354b5 100644 --- a/src/libimcv/Makefile.am +++ b/src/libimcv/Makefile.am @@ -9,7 +9,7 @@ libimcv_la_SOURCES = \ imcv.h imcv.c \ imc/imc_agent.h imc/imc_agent.c imc/imc_state.h \ imv/imv_agent.h imv/imv_agent.c imv/imv_state.h \ - ietf/ietf_attr.h \ + ietf/ietf_attr.h ietf/ietf_attr.c \ ietf/ietf_attr_pa_tnc_error.h ietf/ietf_attr_pa_tnc_error.c \ ita/ita_attr_command.h ita/ita_attr_command.c \ pa_tnc/pa_tnc_msg.h pa_tnc/pa_tnc_msg.c \ diff --git a/src/libimcv/ietf/ietf_attr.c b/src/libimcv/ietf/ietf_attr.c new file mode 100644 index 000000000..08f7ea27a --- /dev/null +++ b/src/libimcv/ietf/ietf_attr.c @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2011 Andreas Steffen, HSR Hochschule fuer Technik Rapperswil + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. See . + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#include "ietf_attr.h" + +ENUM(ietf_attr_names, IETF_ATTR_TESTING, IETF_ATTR_FACTORY_DEFAULT_PWD_ENABLED, + "Testing", + "Attribute Request", + "Product Information", + "Numeric Version", + "String Version", + "Operational Status", + "Port Filter", + "Installed Packages", + "PA-TNC error", + "Assessment Result", + "Remediation Instructions", + "Forwarding Enabled", + "Factory Default Password Enabled", +); + diff --git a/src/libimcv/ietf/ietf_attr.h b/src/libimcv/ietf/ietf_attr.h index 35e006e90..facfbf1a8 100644 --- a/src/libimcv/ietf/ietf_attr.h +++ b/src/libimcv/ietf/ietf_attr.h @@ -21,6 +21,8 @@ #ifndef IETF_ATTR_H_ #define IETF_ATTR_H_ +#include + typedef enum ietf_attr_t ietf_attr_t; /** @@ -43,4 +45,9 @@ enum ietf_attr_t { IETF_ATTR_RESERVED = 0xffffffff, }; +/** + * enum name for ietf_attr_t. + */ +extern enum_name_t *ietf_attr_names; + #endif /** IETF_ATTR_H_ @}*/