tncs.h revision 252726
17129Ssjohanss/* 27129Ssjohanss * EAP-TNC - TNCS (IF-IMV, IF-TNCCS, and IF-TNCCS-SOH) 37129Ssjohanss * Copyright (c) 2007-2008, Jouni Malinen <j@w1.fi> 47129Ssjohanss * 57129Ssjohanss * This software may be distributed under the terms of the BSD license. 67129Ssjohanss * See README for more details. 77129Ssjohanss */ 87129Ssjohanss 97129Ssjohanss#ifndef TNCS_H 107129Ssjohanss#define TNCS_H 117129Ssjohanss 127129Ssjohanssstruct tncs_data; 137129Ssjohanss 147129Ssjohanssstruct tncs_data * tncs_init(void); 157129Ssjohanssvoid tncs_deinit(struct tncs_data *tncs); 167129Ssjohanssvoid tncs_init_connection(struct tncs_data *tncs); 177129Ssjohansssize_t tncs_total_send_len(struct tncs_data *tncs); 187129Ssjohanssu8 * tncs_copy_send_buf(struct tncs_data *tncs, u8 *pos); 197129Ssjohansschar * tncs_if_tnccs_start(struct tncs_data *tncs); 207129Ssjohansschar * tncs_if_tnccs_end(void); 217129Ssjohanss 227129Ssjohanssenum tncs_process_res { 237129Ssjohanss TNCCS_PROCESS_ERROR = -1, 247129Ssjohanss TNCCS_PROCESS_OK_NO_RECOMMENDATION = 0, 257129Ssjohanss TNCCS_RECOMMENDATION_ERROR, 267129Ssjohanss TNCCS_RECOMMENDATION_ALLOW, 277129Ssjohanss TNCCS_RECOMMENDATION_NONE, 287129Ssjohanss TNCCS_RECOMMENDATION_ISOLATE, 297129Ssjohanss TNCCS_RECOMMENDATION_NO_ACCESS, 30 TNCCS_RECOMMENDATION_NO_RECOMMENDATION 31}; 32 33enum tncs_process_res tncs_process_if_tnccs(struct tncs_data *tncs, 34 const u8 *msg, size_t len); 35 36int tncs_global_init(void); 37void tncs_global_deinit(void); 38 39struct wpabuf * tncs_build_soh_request(void); 40struct wpabuf * tncs_process_soh(const u8 *soh_tlv, size_t soh_tlv_len, 41 int *failure); 42 43#endif /* TNCS_H */ 44