diff options
author | Yves-Alexis Perez <corsac@corsac.net> | 2012-06-28 21:16:07 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@corsac.net> | 2012-06-28 21:16:07 +0200 |
commit | b34738ed08c2227300d554b139e2495ca5da97d6 (patch) | |
tree | 62f33b52820f2e49f0e53c0f8c636312037c8054 /src/libimcv/imc/imc_state.h | |
parent | 0a9d51a49042a68daa15b0c74a2b7f152f52606b (diff) | |
download | vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.tar.gz vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.zip |
Imported Upstream version 4.6.4
Diffstat (limited to 'src/libimcv/imc/imc_state.h')
-rw-r--r-- | src/libimcv/imc/imc_state.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/libimcv/imc/imc_state.h b/src/libimcv/imc/imc_state.h new file mode 100644 index 000000000..f1b0358c9 --- /dev/null +++ b/src/libimcv/imc/imc_state.h @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2011 Andreas Steffen, HSR Hochschule fuer Technik Rapperswil + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +/** + * + * @defgroup imc_state_t imc_state + * @{ @ingroup imc_state + */ + +#ifndef IMC_STATE_H_ +#define IMC_STATE_H_ + +#include <tncif.h> + +#include <library.h> + +typedef struct imc_state_t imc_state_t; + +/** + * Internal state of an IMC connection instance + */ +struct imc_state_t { + + /** + * Get the TNCS connection I +D attached to the state + * + * @return TNCS connection ID of the state + */ + TNC_ConnectionID (*get_connection_id)(imc_state_t *this); + + /** + * Checks if long message types are supported for this TNCCS connection + * + * @return TRUE if set, FALSE otherwise + */ + bool (*has_long)(imc_state_t *this); + + /** + * Checks if the exclusive delivery is supported for this TNCCS connection + * + * @return TRUE if set, FALSE otherwise + */ + bool (*has_excl)(imc_state_t *this); + + /** + * Sets the long message types and exclusive flags for this TNCCS connection + * + * @param has_long TNCCS connection supports long message types + * @param has_excl TNCCS connection supports exclusive delivery + * @return TRUE if set, FALSE otherwise + */ + void (*set_flags)(imc_state_t *this, bool has_long, bool has_excl); + + /** + * Change the connection state + * + * @param new_state new connection state + */ + void (*change_state)(imc_state_t *this, TNC_ConnectionState new_state); + + /** + * Destroys an imc_state_t object + */ + void (*destroy)(imc_state_t *this); +}; + +#endif /** IMC_STATE_H_ @}*/ |