1: /*
2: * Copyright (C) 2015 Andreas Steffen
3: * HSR Hochschule fuer Technik Rapperswil
4: *
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>.
9: *
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
13: * for more details.
14: */
15:
16: /**
17: * @defgroup tnccs_20_client_h tnccs_20_client
18: * @{ @ingroup tnccs_20
19: */
20:
21: #ifndef TNCCS_20_CLIENT_H_
22: #define TNCCS_20_CLIENT_H_
23:
24: #include <library.h>
25:
26: #include <tnc/tnccs/tnccs.h>
27:
28: #include "tnccs_20_handler.h"
29:
30: typedef struct tnccs_20_client_t tnccs_20_client_t;
31:
32: /**
33: * Interface for a TNC client
34: */
35: struct tnccs_20_client_t {
36:
37: /**
38: * IF-TNCCS 2.0 protocol handler interface
39: */
40: tnccs_20_handler_t handler;
41:
42: /**
43: * Get PDP server information if available
44: *
45: * @param port PT-TLS port of the PDP server
46: * @return FQDN of PDP server
47: */
48: chunk_t (*get_pdp_server)(tnccs_20_client_t *this, uint16_t *port);
49:
50: };
51:
52: /**
53: * Create an instance of the TNC IF-TNCCS 2.0 client-side protocol handler.
54: *
55: * @param tnccs TNC IF-TNCCS 2.0 stack
56: * @param send_msg TNF IF-TNCCS 2.0 send message callback function
57: * @param max_batch_len Maximum PB-TNC batch size
58: * @param max_msg_len Maximum PA-TNC message size
59: */
60: tnccs_20_handler_t* tnccs_20_client_create(tnccs_t *tnccs,
61: tnccs_send_message_t send_msg,
62: size_t max_batch_len,
63: size_t max_msg_len);
64:
65: #endif /** TNCCS_20_CLIENT_H_ @}*/
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>