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 18 struct tncc_data; 19 20 struct tncc_data * tncc_init(void); 21 void tncc_deinit(struct tncc_data *tncc); 22 void tncc_init_connection(struct tncc_data *tncc); 23 size_t tncc_total_send_len(struct tncc_data *tncc); 24 u8 * tncc_copy_send_buf(struct tncc_data *tncc, u8 *pos); 25 char * tncc_if_tnccs_start(struct tncc_data *tncc); 26 char * tncc_if_tnccs_end(void); 27 28 enum 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 37 enum tncc_process_res tncc_process_if_tnccs(struct tncc_data *tncc, 38 const u8 *msg, size_t len); 39 40 struct wpabuf * tncc_process_soh_request(int ver, const u8 *data, size_t len); 41 42 #endif /* TNCC_H */ 43