Annotation of embedaddon/strongswan/src/libimcv/imv/imv_agent_if.h, revision 1.1.1.1
1.1 misho 1: /*
2: * Copyright (C) 2013 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 imv_agent_if_t imv_agent_if
18: * @{ @ingroup imv_os
19: */
20:
21: #ifndef IMV_AGENT_IF_H_
22: #define IMV_AGENT_IF_H_
23:
24: #include <tncifimv.h>
25:
26: #include <library.h>
27:
28: typedef struct imv_agent_if_t imv_agent_if_t;
29:
30: /**
31: * IF-IMV interface for IMV agents
32: */
33: struct imv_agent_if_t {
34:
35: /**
36: * Implements the TNC_IMV_ProvideBindFunction function of the IMV
37: *
38: * @param bind_function Function offered by the TNCS
39: * @return TNC result code
40: */
41: TNC_Result (*bind_functions)(imv_agent_if_t *this,
42: TNC_TNCS_BindFunctionPointer bind_function);
43:
44: /**
45: * Implements the TNC_IMV_NotifyConnectionChange() function of the IMV
46: *
47: * @param id Network connection ID assigned by TNCS
48: * @param new_state New connection state to be set
49: * @return TNC result code
50: */
51: TNC_Result (*notify_connection_change)(imv_agent_if_t *this,
52: TNC_ConnectionID id,
53: TNC_ConnectionState new_state);
54:
55: /**
56: * Implements the TNC_IMV_ReceiveMessage() function of the IMV
57: *
58: * @param id Network connection ID assigned by TNCS
59: * @param msg_type PA-TNC message type
60: * @param msg Received message
61: * @return TNC result code
62: */
63: TNC_Result (*receive_message)(imv_agent_if_t *this, TNC_ConnectionID id,
64: TNC_MessageType msg_type, chunk_t msg);
65:
66: /**
67: * Implements the TNC_IMV_ReceiveMessageLong() function of the IMV
68: *
69: * @param id Network connection ID assigned by TNCS
70: * @param src_imc_id ID of source IMC
71: * @param dst_imv_id ID of destination IMV
72: * @param msg_vid Vendor ID of message type
73: * @param msg_subtype PA-TNC message subtype
74: * @param msg Received message
75: * @return TNC result code
76: */
77: TNC_Result (*receive_message_long)(imv_agent_if_t *this,
78: TNC_ConnectionID id,
79: TNC_UInt32 src_imc_id,
80: TNC_UInt32 dst_imv_id,
81: TNC_VendorID msg_vid,
82: TNC_MessageSubtype msg_subtype,
83: chunk_t msg);
84:
85: /**
86: * Implements the TNC_IMV_BatchEnding() function of the IMV
87: *
88: * @param id Network connection ID assigned by TNCS
89: * @return TNC result code
90: */
91: TNC_Result (*batch_ending)(imv_agent_if_t *this, TNC_ConnectionID id);
92:
93: /**
94: * Implements the TNC_IMV_SolicitRecommendation() function of the IMV
95: *
96: * @param id Network connection ID assigned by TNCS
97: * @return TNC result code
98: */
99: TNC_Result (*solicit_recommendation)(imv_agent_if_t *this,
100: TNC_ConnectionID id);
101:
102: /**
103: * Destroys an imv_agent_if_t object
104: */
105: void (*destroy)(imv_agent_if_t *this);
106:
107: };
108:
109: /**
110: * Constructor template
111: */
112: typedef imv_agent_if_t* (*imv_agent_create_t)(const char* name, TNC_IMVID id,
113: TNC_Version *actual_version);
114:
115: #endif /** IMV_AGENT_IF_H_ @}*/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>