Annotation of embedaddon/strongswan/src/libtnccs/tnc/tnc.h, revision 1.1
1.1 ! misho 1: /*
! 2: * Copyright (C) 2011 Andreas Steffen
! 3: * HSR Hochschule fuer Technik Rapperswil
! 4: *
! 5: * This program is free software; you can redistribute it and/or modify it
! 6: * under the terms of the GNU General Public License as published by the
! 7: * Free Software Foundation; either version 2 of the License, or (at your
! 8: * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
! 9: *
! 10: * This program is distributed in the hope that it will be useful, but
! 11: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
! 12: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
! 13: * for more details.
! 14: */
! 15:
! 16: /**
! 17: * @defgroup libtnccs libtnccs
! 18: *
! 19: * @defgroup tplugins plugins
! 20: * @ingroup libtnccs
! 21: *
! 22: * @addtogroup libtnccs
! 23: * @{
! 24: */
! 25:
! 26: #ifndef TNC_H_
! 27: #define TNC_H_
! 28:
! 29: typedef struct tnc_t tnc_t;
! 30:
! 31: #include "tnc/imc/imc_manager.h"
! 32: #include "tnc/imv/imv_manager.h"
! 33: #include "tnc/tnccs/tnccs_manager.h"
! 34:
! 35: #include <library.h>
! 36:
! 37: /**
! 38: * TNC management support object.
! 39: */
! 40: struct tnc_t {
! 41:
! 42: /**
! 43: * TNC-IMC manager controlling Integrity Measurement Collectors
! 44: */
! 45: imc_manager_t *imcs;
! 46:
! 47: /**
! 48: * TNC-IMV manager controlling Integrity Measurement Verifiers
! 49: */
! 50: imv_manager_t *imvs;
! 51:
! 52: /**
! 53: * TNC-TNCCS manager controlling the TNC Server and Client protocols
! 54: */
! 55: tnccs_manager_t *tnccs;
! 56:
! 57: };
! 58:
! 59: /**
! 60: * The single instance of tnc_t.
! 61: *
! 62: * Exists between calls to libtnccs_init() and libtnccs_deinit().
! 63: */
! 64: extern tnc_t *tnc;
! 65:
! 66: /**
! 67: * Initialize libtnccs.
! 68: */
! 69: void libtnccs_init(void);
! 70:
! 71: /**
! 72: * Deinitialize libtnccs
! 73: */
! 74: void libtnccs_deinit(void);
! 75:
! 76: /**
! 77: * Helper function to (un-)register TNC managers from plugin features.
! 78: *
! 79: * This function is a plugin_feature_callback_t and can be used with the
! 80: * PLUGIN_CALLBACK macro to register a TNC manager constructor.
! 81: *
! 82: * @param plugin plugin registering the TNC manager
! 83: * @param feature associated plugin feature
! 84: * @param reg TRUE to register, FALSE to unregister.
! 85: * @param data data passed to callback, a TNC manager constructor
! 86: */
! 87: bool tnc_manager_register(plugin_t *plugin, plugin_feature_t *feature,
! 88: bool reg, void *data);
! 89:
! 90: #endif /** TNC_H_ @}*/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>