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