2 * Copyright (C) 2012 Andreas Steffen
3 * HSR Hochschule fuer Technik Rapperswil
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>.
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
17 * @defgroup tnc_pdp_connections tnc_pdp_connections
21 #ifndef TNC_PDP_CONNECTIONS_H_
22 #define TNC_PDP_CONNECTIONS_H_
24 typedef struct tnc_pdp_connections_t tnc_pdp_connections_t
;
27 #include <sa/ike_sa.h>
28 #include <sa/authenticators/eap/eap_method.h>
31 * Public interface of a tnc_pdp_connections object
33 struct tnc_pdp_connections_t
{
36 * Register a new TNC PEP RADIUS Connection
38 * @param nas_id NAS identifier of Policy Enforcement Point
39 * @param user_name User name of TNC Client
40 * @param peer Peer identity
41 * @param method EAP method state for this TNC PEP Connection
43 void (*add
)(tnc_pdp_connections_t
*this, chunk_t nas_id
, chunk_t user_name
,
44 identification_t
*peer
, eap_method_t
*method
);
47 * Remove a TNC PEP RADIUS Connection
49 * @param nas_id NAS identifier of Policy Enforcement Point
50 * @param user_name User name of TNC Client
52 void (*remove
)(tnc_pdp_connections_t
*this, chunk_t nas_id
,
56 * Get the EAP method and IKE_SA of a registered TNC PEP RADIUS Connection
58 * @param nas_id NAS identifier of Policy Enforcement Point
59 * @param user_name User name of TNC Client
60 * @param ike_sa IKE_SA used for bus communication only
61 * @return EAP method for this connection or NULL if not found
63 eap_method_t
* (*get_state
)(tnc_pdp_connections_t
*this, chunk_t nas_id
,
64 chunk_t user_name
, ike_sa_t
**ike_sa
);
67 * Destroys a tnc_pdp_connections_t object.
69 void (*destroy
)(tnc_pdp_connections_t
*this);
73 * Create a tnc_pdp_connections_t instance
75 tnc_pdp_connections_t
* tnc_pdp_connections_create(void);
77 #endif /** TNC_PDP_CONNECTIONS_PLUGIN_H_ @}*/