output PEP device addresses as metadata
[strongswan.git] / src / libcharon / plugins / tnc_ifmap / tnc_ifmap_soap.h
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 tnc_ifmap_soap tnc_ifmap_soap
18 * @{ @ingroup tnc_ifmap
19 */
20
21 #ifndef TNC_IFMAP_SOAP_H_
22 #define TNC_IFMAP_SOAP_H_
23
24 #include <library.h>
25 #include <utils/host.h>
26
27 typedef struct tnc_ifmap_soap_t tnc_ifmap_soap_t;
28
29 /**
30 * Implements the TNC IF-MAP 2.0 SOAP Binding
31 */
32 struct tnc_ifmap_soap_t {
33
34 /**
35 * Creates a new IF-MAP session
36 *
37 * @return TRUE if command was successful
38 */
39 bool (*newSession)(tnc_ifmap_soap_t *this);
40
41 /**
42 * Purges all metadata published by this publisher
43 *
44 * @return TRUE if command was successful
45 */
46 bool (*purgePublisher)(tnc_ifmap_soap_t *this);
47
48 /**
49 * Publish metadata about established/deleted IKE_SAs
50 *
51 * @param ike_sa_id unique IKE_SA id
52 * @param id id of remote endpoint
53 * @param is_user TRUE if id is an EAP username
54 * @param host IP address of remote endpoint
55 * @param up TRUE if IKE_SEA is up, FALSE if down
56 * @return TRUE if command was successful
57 */
58
59 bool (*publish_ike_sa)(tnc_ifmap_soap_t *this, u_int32_t ike_sa_id,
60 identification_t *id, bool is_user,
61 host_t *host, bool up);
62
63 /**
64 * Publish PEP device-ip metadata
65 *
66 * @param host IP address of local endpoint
67 * @return TRUE if command was successful
68 */
69
70 bool (*publish_device_ip)(tnc_ifmap_soap_t *this, host_t *host);
71
72 /**
73 * Ends an IF-MAP session
74 *
75 * @return TRUE if command was successful
76 */
77 bool (*endSession)(tnc_ifmap_soap_t *this);
78
79 /**
80 * Destroy a tnc_ifmap_soap_t.
81 */
82 void (*destroy)(tnc_ifmap_soap_t *this);
83 };
84
85 /**
86 * Create a tnc_ifmap_soap instance.
87 */
88 tnc_ifmap_soap_t *tnc_ifmap_soap_create();
89
90 #endif /** TNC_IFMAP_SOAP_H_ @}*/