2 * Copyright (C) 2011 Andreas Steffen, HSR Hochschule fuer Technik Rapperswil
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * @defgroup imc_test_state_t imc_test_state
18 * @{ @ingroup imc_test_state
21 #ifndef IMC_TEST_STATE_H_
22 #define IMC_TEST_STATE_H_
24 #include <imc/imc_state.h>
27 typedef struct imc_test_state_t imc_test_state_t
;
30 * Internal state of an imc_test_t connection instance
32 struct imc_test_state_t
{
35 * imc_state_t interface
37 imc_state_t interface
;
40 * get the command to send to IMV
42 * @return commmand to send to IMV
44 char* (*get_command
)(imc_test_state_t
*this);
47 * set the command to send to IMV
49 * @param command commmand to send to IMV
51 void (*set_command
)(imc_test_state_t
*this, char *command
);
54 * Test and reset the first handshake flag
56 * @return TRUE if first handshake
58 bool (*is_first_handshake
)(imc_test_state_t
*this);
61 * Test and reset the retry handshake flag
63 * @return TRUE if a handshake retry should be done
65 bool (*do_handshake_retry
)(imc_test_state_t
*this);
69 * Create an imc_test_state_t instance
71 * @param id connection ID
72 * @param command command to send to IMV
73 * @param retry TRUE if a handshake retry should be done
75 imc_state_t
* imc_test_state_create(TNC_ConnectionID id
, char* command
,
78 #endif /** IMC_TEST_STATE_H_ @}*/