diff options
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 |