$search
00001 /* 00002 * EAP-TNC - TNCS (IF-IMV, IF-TNCCS, and IF-TNCCS-SOH) 00003 * Copyright (c) 2007-2008, Jouni Malinen <j@w1.fi> 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License version 2 as 00007 * published by the Free Software Foundation. 00008 * 00009 * Alternatively, this software may be distributed under the terms of BSD 00010 * license. 00011 * 00012 * See README and COPYING for more details. 00013 */ 00014 00015 #ifndef TNCS_H 00016 #define TNCS_H 00017 00018 struct tncs_data; 00019 00020 struct tncs_data * tncs_init(void); 00021 void tncs_deinit(struct tncs_data *tncs); 00022 void tncs_init_connection(struct tncs_data *tncs); 00023 size_t tncs_total_send_len(struct tncs_data *tncs); 00024 u8 * tncs_copy_send_buf(struct tncs_data *tncs, u8 *pos); 00025 char * tncs_if_tnccs_start(struct tncs_data *tncs); 00026 char * tncs_if_tnccs_end(void); 00027 00028 enum tncs_process_res { 00029 TNCCS_PROCESS_ERROR = -1, 00030 TNCCS_PROCESS_OK_NO_RECOMMENDATION = 0, 00031 TNCCS_RECOMMENDATION_ERROR, 00032 TNCCS_RECOMMENDATION_ALLOW, 00033 TNCCS_RECOMMENDATION_NONE, 00034 TNCCS_RECOMMENDATION_ISOLATE, 00035 TNCCS_RECOMMENDATION_NO_ACCESS, 00036 TNCCS_RECOMMENDATION_NO_RECOMMENDATION 00037 }; 00038 00039 enum tncs_process_res tncs_process_if_tnccs(struct tncs_data *tncs, 00040 const u8 *msg, size_t len); 00041 00042 int tncs_global_init(void); 00043 void tncs_global_deinit(void); 00044 00045 struct wpabuf * tncs_build_soh_request(void); 00046 struct wpabuf * tncs_process_soh(const u8 *soh_tlv, size_t soh_tlv_len, 00047 int *failure); 00048 00049 #endif /* TNCS_H */