2 * Copyright (C) 2011-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
18 * @defgroup imc_state_t imc_state
19 * @{ @ingroup imc_state
31 typedef struct imc_state_t imc_state_t
;
34 * Internal state of an IMC connection instance
39 * Get the TNCS connection ID attached to the state
41 * @return TNCS connection ID of the state
43 TNC_ConnectionID (*get_connection_id
)(imc_state_t
*this);
46 * Checks if long message types are supported for this TNCCS connection
48 * @return TRUE if set, FALSE otherwise
50 bool (*has_long
)(imc_state_t
*this);
53 * Checks if the exclusive delivery is supported for this TNCCS connection
55 * @return TRUE if set, FALSE otherwise
57 bool (*has_excl
)(imc_state_t
*this);
60 * Sets the long message types and exclusive flags for this TNCCS connection
62 * @param has_long TNCCS connection supports long message types
63 * @param has_excl TNCCS connection supports exclusive delivery
64 * @return TRUE if set, FALSE otherwise
66 void (*set_flags
)(imc_state_t
*this, bool has_long
, bool has_excl
);
69 * Set the maximum size of a PA-TNC message for this TNCCS connection
71 * @max_msg_len maximum size of a PA-TNC message
73 void (*set_max_msg_len
)(imc_state_t
*this, u_int32_t max_msg_len
);
76 * Get the maximum size of a PA-TNC message for this TNCCS connection
78 * @return maximum size of a PA-TNC message
80 u_int32_t (*get_max_msg_len
)(imc_state_t
*this);
83 * Change the connection state
85 * @param new_state new connection state
87 void (*change_state
)(imc_state_t
*this, TNC_ConnectionState new_state
);
90 * Set the Assessment/Evaluation Result
93 * @param result Assessment/Evaluation Result
95 void (*set_result
)(imc_state_t
*this, TNC_IMCID id
,
96 TNC_IMV_Evaluation_Result result
);
99 * Get the Assessment/Evaluation Result
102 * @param result Assessment/Evaluation Result
103 * @return TRUE if result is known
105 bool (*get_result
)(imc_state_t
*this, TNC_IMCID id
,
106 TNC_IMV_Evaluation_Result
*result
);
109 * Destroys an imc_state_t object
111 void (*destroy
)(imc_state_t
*this);
114 #endif /** IMC_STATE_H_ @}*/