65268971aac9ea80f72cc20a855e783d4bacd9d7
[strongswan.git] / src / libcharon / plugins / tnc_pdp / tnc_pdp_connections.h
1 /*
2 * Copyright (C) 2012 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 tnc_pdp_connections tnc_pdp_connections
18 * @{ @ingroup tnc_pdp
19 */
20
21 #ifndef TNC_PDP_CONNECTIONS_H_
22 #define TNC_PDP_CONNECTIONS_H_
23
24 typedef struct tnc_pdp_connections_t tnc_pdp_connections_t;
25
26 #include <library.h>
27 #include <sa/authenticators/eap/eap_method.h>
28
29 /**
30 * Public interface of a tnc_pdp_connections object
31 */
32 struct tnc_pdp_connections_t {
33
34 /**
35 * Register a new TNC PEP RADIUS Connection
36 *
37 * @param nas_id NAS identifier of Policy Enforcement Point
38 * @param user_name User name of TNC Client
39 * @param method EAP method state for this TNC PEP Connection
40 */
41 void (*add)(tnc_pdp_connections_t *this, chunk_t nas_id, chunk_t user_name,
42 eap_method_t *method);
43
44 /**
45 * Remove a TNC PEP RADIUS Connection
46 *
47 * @param nas_id NAS identifier of Policy Enforcement Point
48 * @param user_name User name of TNC Client
49 */
50 void (*remove)(tnc_pdp_connections_t *this, chunk_t nas_id,
51 chunk_t user_name);
52
53 /**
54 * Get the EAP method of a registered TNC PEP RADIUS Connection
55 *
56 * @param nas_id NAS identifier of Policy Enforcement Point
57 * @param user_name User name of TNC Client
58 * @return EAP method for this connection or NULL if not found
59 */
60 eap_method_t* (*get_method)(tnc_pdp_connections_t *this, chunk_t nas_id,
61 chunk_t user_name);
62
63 /**
64 * Destroys a tnc_pdp_connections_t object.
65 */
66 void (*destroy)(tnc_pdp_connections_t *this);
67 };
68
69 /**
70 * Create a tnc_pdp_connections_t instance
71 */
72 tnc_pdp_connections_t* tnc_pdp_connections_create(void);
73
74 #endif /** TNC_PDP_CONNECTIONS_PLUGIN_H_ @}*/