aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_server/tncs.h
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-03-09 08:37:18 (GMT)
committerJouni Malinen <j@w1.fi>2008-03-09 08:37:18 (GMT)
commitda08a7c732263621d2b18ac6482fdc148031c0d9 (patch)
tree09f23b9a7d212c5a2e951e5192e328a7f9b15f6d /src/eap_server/tncs.h
parent8e888179e1dcfc53e6770be53226668a4137ee5f (diff)
downloadhostap-da08a7c732263621d2b18ac6482fdc148031c0d9.zip
hostap-da08a7c732263621d2b18ac6482fdc148031c0d9.tar.gz
hostap-da08a7c732263621d2b18ac6482fdc148031c0d9.tar.bz2
TNC: Added preliminary TNC implementation for hostapd
This adds EAP-TNC method and TNCS (IF-IMV and IF-TNCCS) functionality. There is no integration with EAP-TTLS and EAP-FAST at this point, so this version is not yet suitable for real use (i.e., EAP-TNC can only be tested outside a tunnel which is not an allowed configuration for deployment). However, the basic TNCS functionality is more or less complete and this version seems to interoperate with wpa_supplicant.
Diffstat (limited to 'src/eap_server/tncs.h')
-rw-r--r--src/eap_server/tncs.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/eap_server/tncs.h b/src/eap_server/tncs.h
new file mode 100644
index 0000000..f4e2074
--- /dev/null
+++ b/src/eap_server/tncs.h
@@ -0,0 +1,45 @@
+/*
+ * EAP-TNC - TNCS (IF-IMV and IF-TNCCS)
+ * Copyright (c) 2007-2008, Jouni Malinen <j@w1.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
+ */
+
+#ifndef TNCS_H
+#define TNCS_H
+
+struct tncs_data;
+
+struct tncs_data * tncs_init(void);
+void tncs_deinit(struct tncs_data *tncs);
+void tncs_init_connection(struct tncs_data *tncs);
+size_t tncs_total_send_len(struct tncs_data *tncs);
+u8 * tncs_copy_send_buf(struct tncs_data *tncs, u8 *pos);
+char * tncs_if_tnccs_start(struct tncs_data *tncs);
+char * tncs_if_tnccs_end(void);
+
+enum tncs_process_res {
+ TNCCS_PROCESS_ERROR = -1,
+ TNCCS_PROCESS_OK_NO_RECOMMENDATION = 0,
+ TNCCS_RECOMMENDATION_ERROR,
+ TNCCS_RECOMMENDATION_ALLOW,
+ TNCCS_RECOMMENDATION_NONE,
+ TNCCS_RECOMMENDATION_ISOLATE,
+ TNCCS_RECOMMENDATION_NO_ACCESS,
+ TNCCS_RECOMMENDATION_NO_RECOMMENDATION
+};
+
+enum tncs_process_res tncs_process_if_tnccs(struct tncs_data *tncs,
+ const u8 *msg, size_t len);
+
+int tncs_global_init(void);
+void tncs_global_deinit(void);
+
+#endif /* TNCS_H */