diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-11-01 13:32:07 +0100 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-11-01 13:32:07 +0100 |
commit | a54780509260a8cb6f0344f531da168b34410dd5 (patch) | |
tree | 477239a312679174252f39f7a80bc8bf33836d9a /src/libtnccs/tnc/tnccs/tnccs.h | |
parent | 6e50941f7ce9c6f2d6888412968c7f4ffb495379 (diff) | |
parent | 5313d2d78ca150515f7f5eb39801c100690b6b29 (diff) | |
download | vyos-strongswan-a54780509260a8cb6f0344f531da168b34410dd5.tar.gz vyos-strongswan-a54780509260a8cb6f0344f531da168b34410dd5.zip |
Merge tag 'upstream/5.1.1'
Upstream version 5.1.1
Diffstat (limited to 'src/libtnccs/tnc/tnccs/tnccs.h')
-rw-r--r-- | src/libtnccs/tnc/tnccs/tnccs.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/src/libtnccs/tnc/tnccs/tnccs.h b/src/libtnccs/tnc/tnccs/tnccs.h index fd3e5cabb..eefd5565d 100644 --- a/src/libtnccs/tnc/tnccs/tnccs.h +++ b/src/libtnccs/tnc/tnccs/tnccs.h @@ -38,6 +38,17 @@ typedef enum tnc_ift_type_t tnc_ift_type_t; #include <tls.h> /** + * Callback function to communicate action recommendation and evaluation result + * generated by TNC server + * + * @param rec TNC Action Recommendation + * @param eval TNC Evaluation Result + * @return TRUE to terminate TNCCS connection, FALSE to keep it + */ +typedef bool (*tnccs_cb_t)(TNC_IMV_Action_Recommendation rec, + TNC_IMV_Evaluation_Result eval); + +/** * Type of TNC Client/Server protocol */ enum tnccs_type_t { @@ -103,6 +114,21 @@ struct tnccs_t { */ void (*set_auth_type)(tnccs_t *this, u_int32_t auth_type); + /** + * Get PDP server name and port number + * + * @param port PDP port number + * @return PDP server name + */ + chunk_t (*get_pdp_server)(tnccs_t *this, u_int16_t *port); + + /** + * Get a new reference to the TNCCS object. + * + * @return this, with an increased refcount + */ + tnccs_t* (*get_ref)(tnccs_t *this); + }; /** @@ -112,12 +138,14 @@ struct tnccs_t { * @param server Server identity * @param peer Client identity * @param transport Underlying TNC IF-T transport protocol used + * @param cb Callback function if TNC Server, NULL if TNC Client * @return implementation of the tnccs_t interface */ typedef tnccs_t *(*tnccs_constructor_t)(bool is_server, identification_t *server, identification_t *peer, - tnc_ift_type_t transport); + tnc_ift_type_t transport, + tnccs_cb_t cb); /** * Callback function adding a message to a TNCCS batch |