xref: /freebsd/contrib/wpa/src/eap_peer/tncc.h (revision 4436b51dff5736e74da464946049ea6899a88938)
1 /*
2  * EAP-TNC - TNCC (IF-IMC and IF-TNCCS)
3  * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef TNCC_H
10 #define TNCC_H
11 
12 struct tncc_data;
13 
14 struct tncc_data * tncc_init(void);
15 void tncc_deinit(struct tncc_data *tncc);
16 void tncc_init_connection(struct tncc_data *tncc);
17 size_t tncc_total_send_len(struct tncc_data *tncc);
18 u8 * tncc_copy_send_buf(struct tncc_data *tncc, u8 *pos);
19 char * tncc_if_tnccs_start(struct tncc_data *tncc);
20 char * tncc_if_tnccs_end(void);
21 
22 enum tncc_process_res {
23 	TNCCS_PROCESS_ERROR = -1,
24 	TNCCS_PROCESS_OK_NO_RECOMMENDATION = 0,
25 	TNCCS_RECOMMENDATION_ERROR,
26 	TNCCS_RECOMMENDATION_ALLOW,
27 	TNCCS_RECOMMENDATION_NONE,
28 	TNCCS_RECOMMENDATION_ISOLATE
29 };
30 
31 enum tncc_process_res tncc_process_if_tnccs(struct tncc_data *tncc,
32 					    const u8 *msg, size_t len);
33 
34 struct wpabuf * tncc_process_soh_request(int ver, const u8 *data, size_t len);
35 
36 #endif /* TNCC_H */
37