1/*
2 * EAP-TNC - TNCC (IF-IMC and IF-TNCCS)
3 * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
11 *
12 * See README and COPYING for more details.
13 */
14
15#ifndef TNCC_H
16#define TNCC_H
17
18struct tncc_data;
19
20struct tncc_data * tncc_init(void);
21void tncc_deinit(struct tncc_data *tncc);
22void tncc_init_connection(struct tncc_data *tncc);
23size_t tncc_total_send_len(struct tncc_data *tncc);
24u8 * tncc_copy_send_buf(struct tncc_data *tncc, u8 *pos);
25char * tncc_if_tnccs_start(struct tncc_data *tncc);
26char * tncc_if_tnccs_end(void);
27
28enum tncc_process_res {
29	TNCCS_PROCESS_ERROR = -1,
30	TNCCS_PROCESS_OK_NO_RECOMMENDATION = 0,
31	TNCCS_RECOMMENDATION_ERROR,
32	TNCCS_RECOMMENDATION_ALLOW,
33	TNCCS_RECOMMENDATION_NONE,
34	TNCCS_RECOMMENDATION_ISOLATE
35};
36
37enum tncc_process_res tncc_process_if_tnccs(struct tncc_data *tncc,
38					    const u8 *msg, size_t len);
39
40struct wpabuf * tncc_process_soh_request(int ver, const u8 *data, size_t len);
41
42#endif /* TNCC_H */
43