separated tncif_names from standard TCG TNC header files
authorAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 6 Jun 2011 18:36:58 +0000 (20:36 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 6 Jun 2011 18:36:58 +0000 (20:36 +0200)
13 files changed:
src/libcharon/plugins/tnc_imv/tnc_imv_manager.c
src/libcharon/plugins/tnc_imv/tnc_imv_recommendations.c
src/libcharon/plugins/tnccs_11/tnccs_11.c
src/libcharon/plugins/tnccs_20/tnccs_20.c
src/libimcv/imc/imc_agent.c
src/libimcv/imv/imv_agent.c
src/libtncif/Makefile.am
src/libtncif/tncif.c [deleted file]
src/libtncif/tncif.h
src/libtncif/tncif_names.c [new file with mode: 0644]
src/libtncif/tncif_names.h [new file with mode: 0644]
src/libtncif/tncifimv.c [deleted file]
src/libtncif/tncifimv.h

index 28d7f73..971e80a 100644 (file)
@@ -19,6 +19,7 @@
 #include <tnc/imv/imv_manager.h>
 
 #include <tncifimv.h>
+#include <tncif_names.h>
 
 #include <debug.h>
 #include <daemon.h>
index 9603779..3459619 100644 (file)
@@ -16,6 +16,7 @@
 #include <daemon.h>
 
 #include <tncifimv.h>
+#include <tncif_names.h>
 
 #include <tnc/imv/imv.h>
 #include <tnc/imv/imv_recommendations.h>
index ed25764..ab2fe9b 100644 (file)
@@ -22,6 +22,8 @@
 #include "messages/tnccs_reason_strings_msg.h"
 #include "messages/tnccs_recommendation_msg.h"
 
+#include <tncif_names.h>
+
 #include <daemon.h>
 #include <debug.h>
 #include <threading/mutex.h>
index cc81b96..ef4a9f3 100644 (file)
@@ -26,6 +26,8 @@
 #include "messages/pb_language_preference_msg.h"
 #include "state_machine/pb_tnc_state_machine.h"
 
+#include <tncif_names.h>
+
 #include <debug.h>
 #include <daemon.h>
 #include <threading/mutex.h>
index 17c656d..a19e7ed 100644 (file)
@@ -15,6 +15,8 @@
 #include "imcv.h"
 #include "imc_agent.h"
 
+#include <tncif_names.h>
+
 #include <debug.h>
 #include <utils/linked_list.h>
 #include <threading/rwlock.h>
index 72b0d43..2df4fea 100644 (file)
@@ -15,6 +15,8 @@
 #include "imcv.h"
 #include "imv_agent.h"
 
+#include <tncif_names.h>
+
 #include <debug.h>
 #include <utils/linked_list.h>
 #include <threading/rwlock.h>
index 689f509..706556c 100644 (file)
@@ -2,5 +2,4 @@ INCLUDES = -I$(top_srcdir)/src/libstrongswan
 
 noinst_LTLIBRARIES = libtncif.la
 
-libtncif_la_SOURCES = tncif.h tncif.c tncifimc.h tncifimv.h tncifimv.c
-
+libtncif_la_SOURCES = tncif.h tncifimc.h tncifimv.h tncif_names.h tncif_names.c
diff --git a/src/libtncif/tncif.c b/src/libtncif/tncif.c
deleted file mode 100644 (file)
index b195685..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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 <http://www.fsf.org/copyleft/gpl.txt>.
- *
- * 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 "tncif.h"
-
-ENUM(TNC_Connection_State_names,
-        TNC_CONNECTION_STATE_CREATE, TNC_CONNECTION_STATE_DELETE,
-       "Create",
-       "Handshake",
-       "Allowed",
-       "Isolated",
-       "None",
-       "Delete",
-);
-
index 42a0232..3a88996 100644 (file)
  * Feb 12, 2007
  */
 
-/**
- * @defgroup tnc tnc
- * @ingroup libcharon
- *
- * @defgroup tncif tncif
- * @{ @ingroup tnc
- */
-
 #ifndef TNCIF_H_
 #define TNCIF_H_
 
-#include <library.h>
-
 /* Basic Types */
 typedef unsigned long TNC_UInt32;
 typedef unsigned char *TNC_BufferReference;
@@ -100,8 +90,6 @@ typedef TNC_UInt32 TNC_Result;
 #define TNC_CONNECTION_STATE_ACCESS_NONE 4
 #define TNC_CONNECTION_STATE_DELETE 5
 
-extern enum_name_t *TNC_Connection_State_names;
-
 /* Vendor ID Values */
 #define TNC_VENDORID_TCG 0
 #define TNC_VENDORID_ANY ((TNC_VendorID) 0xffffff)
diff --git a/src/libtncif/tncif_names.c b/src/libtncif/tncif_names.c
new file mode 100644 (file)
index 0000000..c108776
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2010 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 <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * 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 "tncif.h"
+#include "tncifimv.h"
+#include "tncif_names.h"
+
+ENUM(TNC_Connection_State_names,
+        TNC_CONNECTION_STATE_CREATE, TNC_CONNECTION_STATE_DELETE,
+       "Create",
+       "Handshake",
+       "Allowed",
+       "Isolated",
+       "None",
+       "Delete",
+);
+
+ENUM(TNC_IMV_Action_Recommendation_names,
+       TNC_IMV_ACTION_RECOMMENDATION_ALLOW,
+       TNC_IMV_ACTION_RECOMMENDATION_NO_RECOMMENDATION,
+       "allow",
+       "no access",
+       "isolate",
+       "no recommendation"
+);
+
+ENUM(TNC_IMV_Evaluation_Result_names,
+       TNC_IMV_EVALUATION_RESULT_COMPLIANT,
+       TNC_IMV_EVALUATION_RESULT_DONT_KNOW,
+       "compliant",
+       "non-compliant minor",
+       "non-compliant major",
+       "error",
+       "don't know"
+);
diff --git a/src/libtncif/tncif_names.h b/src/libtncif/tncif_names.h
new file mode 100644 (file)
index 0000000..a7c9e7b
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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 <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * 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.
+ */
+
+#ifndef TNCIF_NAMES_H_
+#define TNCIF_NAMES_H_
+
+#include <library.h>
+
+extern enum_name_t *TNC_Connection_State_names;
+extern enum_name_t *TNC_IMV_Action_Recommendation_names;
+extern enum_name_t *TNC_IMV_Evaluation_Result_names;
+
+#endif /** TNCIF_NAME_H_ @}*/
diff --git a/src/libtncif/tncifimv.c b/src/libtncif/tncifimv.c
deleted file mode 100644 (file)
index fbfd565..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2010 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 <http://www.fsf.org/copyleft/gpl.txt>.
- *
- * 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 "tncifimv.h"
-
-ENUM(TNC_IMV_Action_Recommendation_names,
-       TNC_IMV_ACTION_RECOMMENDATION_ALLOW,
-       TNC_IMV_ACTION_RECOMMENDATION_NO_RECOMMENDATION,
-       "allow",
-       "no access",
-       "isolate",
-       "no recommendation"
-);
-
-ENUM(TNC_IMV_Evaluation_Result_names,
-       TNC_IMV_EVALUATION_RESULT_COMPLIANT,
-       TNC_IMV_EVALUATION_RESULT_DONT_KNOW,
-       "compliant",
-       "non-compliant minor",
-       "non-compliant major",
-       "error",
-       "don't know"
-);
-
index 4ec1013..7a2394c 100644 (file)
  * respective owners.
  */
 
-/**
- * @defgroup tncifimv tncifimv
- * @{ @ingroup tnc
- */
-
 #ifndef TNCIFIMV_H_
 #define TNCIFIMV_H_
 
 #include "tncif.h"
 
-#include <library.h>
-
 typedef TNC_UInt32 TNC_IMVID;
 typedef TNC_UInt32 TNC_IMV_Action_Recommendation;
 typedef TNC_UInt32 TNC_IMV_Evaluation_Result;
@@ -147,8 +140,6 @@ typedef TNC_Result (*TNC_IMV_ProvideBindFunctionPointer)(
 #define TNC_IMV_ACTION_RECOMMENDATION_ISOLATE 2
 #define TNC_IMV_ACTION_RECOMMENDATION_NO_RECOMMENDATION 3
 
-extern enum_name_t *TNC_IMV_Action_Recommendation_names;
-
 /* IMV Evaluation Result Values */
 
 #define TNC_IMV_EVALUATION_RESULT_COMPLIANT 0
@@ -157,8 +148,6 @@ extern enum_name_t *TNC_IMV_Action_Recommendation_names;
 #define TNC_IMV_EVALUATION_RESULT_ERROR 3
 #define TNC_IMV_EVALUATION_RESULT_DONT_KNOW 4
 
-extern enum_name_t *TNC_IMV_Evaluation_Result_names;
-
 /* Message Attribute ID Values */
 
 #define TNC_ATTRIBUTEID_PREFERRED_LANGUAGE ((TNC_AttributeID) 0x00000001)