X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=libeap%2Ftests%2Fhwsim%2Ftnc%2Fhostap_imc.c;fp=libeap%2Ftests%2Fhwsim%2Ftnc%2Fhostap_imc.c;h=0000000000000000000000000000000000000000;hb=852a32fe63bc7d0271cca4df1bdb7634fd494b53;hp=d28183a016f5bfd3ec64bc2a56f5b234e01c2fb8;hpb=88e34eecb5769da6526361b35df00fdbe823eac5;p=mech_eap.git diff --git a/libeap/tests/hwsim/tnc/hostap_imc.c b/libeap/tests/hwsim/tnc/hostap_imc.c deleted file mode 100644 index d28183a..0000000 --- a/libeap/tests/hwsim/tnc/hostap_imc.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Minimal example IMC for TNC testing - * Copyright (c) 2014, Jouni Malinen - * - * This software may be distributed under the terms of the BSD license. - * See README for more details. - */ - -#include "includes.h" - -#include "common.h" -#include "common/tnc.h" - -static int initialized = 0; -static TNC_IMCID my_id = -1; - -TNC_Result TNC_IMC_Initialize( - /*in*/ TNC_IMCID imcID, - /*in*/ TNC_Version minVersion, - /*in*/ TNC_Version maxVersion, - /*out*/ TNC_Version *pOutActualVersion) -{ - wpa_printf(MSG_INFO, "IMC(hostap) %s", __func__); - - if (initialized) - return TNC_RESULT_ALREADY_INITIALIZED; - - if (minVersion < TNC_IFIMC_VERSION_1 || - maxVersion > TNC_IFIMC_VERSION_1) - return TNC_RESULT_NO_COMMON_VERSION; - - if (!pOutActualVersion) - return TNC_RESULT_INVALID_PARAMETER; - *pOutActualVersion = TNC_IFIMC_VERSION_1; - my_id = imcID; - - initialized = 1; - - return TNC_RESULT_SUCCESS; -} - - -TNC_Result TNC_IMC_BeginHandshake( - /*in*/ TNC_IMCID imcID, - /*in*/ TNC_ConnectionID connectionID) -{ - wpa_printf(MSG_INFO, "IMC(hostap) %s", __func__); - - if (!initialized) - return TNC_RESULT_NOT_INITIALIZED; - - if (imcID != my_id) - return TNC_RESULT_INVALID_PARAMETER; - - return TNC_RESULT_SUCCESS; -} - - -TNC_Result TNC_IMC_ProvideBindFunction( - /*in*/ TNC_IMCID imcID, - /*in*/ TNC_TNCC_BindFunctionPointer bindFunction) -{ - wpa_printf(MSG_INFO, "IMC(hostap) %s", __func__); - - if (!initialized) - return TNC_RESULT_NOT_INITIALIZED; - - if (imcID != my_id) - return TNC_RESULT_INVALID_PARAMETER; - - return TNC_RESULT_SUCCESS; -}