refactored TNC framework

This commit is contained in:
Andreas Steffen
2011-10-25 01:10:16 +02:00
parent c008d2cc46
commit f0a8bf47f7
52 changed files with 971 additions and 605 deletions
@@ -1,14 +1,19 @@
INCLUDES = -I$(top_srcdir)/src/libstrongswan -I$(top_srcdir)/src/libhydra \
-I$(top_srcdir)/src/libcharon -I$(top_srcdir)/src/libtls \
-I$(top_srcdir)/src/libtncif
INCLUDES = \
-I$(top_srcdir)/src/libstrongswan \
-I$(top_srcdir)/src/libtls \
-I$(top_srcdir)/src/libtncif \
-I$(top_srcdir)/src/libtnccs
AM_CFLAGS = -DUSE_TNC -rdynamic
AM_CFLAGS = -rdynamic
if MONOLITHIC
noinst_LTLIBRARIES = libstrongswan-tnccs-dynamic.la
else
plugin_LTLIBRARIES = libstrongswan-tnccs-dynamic.la
libstrongswan_tnccs_dynamic_la_LIBADD = \
$(top_builddir)/src/libtncif/libtncif.la \
$(top_builddir)/src/libtnccs/libtnccs.la
endif
libstrongswan_tnccs_dynamic_la_SOURCES = \
@@ -15,8 +15,9 @@
#include "tnccs_dynamic.h"
#include <tnc/tnccs/tnccs.h>
#include <daemon.h>
#include <tnc/tnc.h>
#include <debug.h>
typedef struct private_tnccs_dynamic_t private_tnccs_dynamic_t;
@@ -75,8 +76,7 @@ METHOD(tls_t, process, status_t,
type = determine_tnccs_protocol(*(char*)buf);
DBG1(DBG_TNC, "%N protocol detected dynamically",
tnccs_type_names, type);
this->tls = (tls_t*)charon->tnccs->create_instance(charon->tnccs,
type, TRUE);
this->tls = (tls_t*)tnc->tnccs->create_instance(tnc->tnccs, type, TRUE);
if (!this->tls)
{
DBG1(DBG_TNC, "N% protocol not supported", tnccs_type_names, type);
@@ -16,7 +16,7 @@
#include "tnccs_dynamic_plugin.h"
#include "tnccs_dynamic.h"
#include <daemon.h>
#include <tnc/tnccs/tnccs_manager.h>
METHOD(plugin_t, get_name, char*,
tnccs_dynamic_plugin_t *this)