1e5b75505Sopenharmony_ci/* 2e5b75505Sopenharmony_ci * TNC - Common defines 3e5b75505Sopenharmony_ci * Copyright (c) 2007-2014, 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 TNC_H 10e5b75505Sopenharmony_ci#define TNC_H 11e5b75505Sopenharmony_ci 12e5b75505Sopenharmony_citypedef unsigned long TNC_UInt32; 13e5b75505Sopenharmony_citypedef unsigned char *TNC_BufferReference; 14e5b75505Sopenharmony_ci 15e5b75505Sopenharmony_citypedef TNC_UInt32 TNC_IMVID; 16e5b75505Sopenharmony_citypedef TNC_UInt32 TNC_IMCID; 17e5b75505Sopenharmony_citypedef TNC_UInt32 TNC_ConnectionID; 18e5b75505Sopenharmony_citypedef TNC_UInt32 TNC_ConnectionState; 19e5b75505Sopenharmony_citypedef TNC_UInt32 TNC_RetryReason; 20e5b75505Sopenharmony_citypedef TNC_UInt32 TNC_IMV_Action_Recommendation; 21e5b75505Sopenharmony_citypedef TNC_UInt32 TNC_IMV_Evaluation_Result; 22e5b75505Sopenharmony_citypedef TNC_UInt32 TNC_MessageType; 23e5b75505Sopenharmony_citypedef TNC_MessageType *TNC_MessageTypeList; 24e5b75505Sopenharmony_citypedef TNC_UInt32 TNC_VendorID; 25e5b75505Sopenharmony_citypedef TNC_UInt32 TNC_Subtype; 26e5b75505Sopenharmony_citypedef TNC_UInt32 TNC_MessageSubtype; 27e5b75505Sopenharmony_citypedef TNC_UInt32 TNC_Version; 28e5b75505Sopenharmony_citypedef TNC_UInt32 TNC_Result; 29e5b75505Sopenharmony_citypedef TNC_UInt32 TNC_AttributeID; 30e5b75505Sopenharmony_ci 31e5b75505Sopenharmony_citypedef TNC_Result (*TNC_TNCS_BindFunctionPointer)( 32e5b75505Sopenharmony_ci TNC_IMVID imvID, 33e5b75505Sopenharmony_ci char *functionName, 34e5b75505Sopenharmony_ci void **pOutfunctionPointer); 35e5b75505Sopenharmony_citypedef TNC_Result (*TNC_TNCS_ReportMessageTypesPointer)( 36e5b75505Sopenharmony_ci TNC_IMVID imvID, 37e5b75505Sopenharmony_ci TNC_MessageTypeList supportedTypes, 38e5b75505Sopenharmony_ci TNC_UInt32 typeCount); 39e5b75505Sopenharmony_citypedef TNC_Result (*TNC_TNCS_SendMessagePointer)( 40e5b75505Sopenharmony_ci TNC_IMVID imvID, 41e5b75505Sopenharmony_ci TNC_ConnectionID connectionID, 42e5b75505Sopenharmony_ci TNC_BufferReference message, 43e5b75505Sopenharmony_ci TNC_UInt32 messageLength, 44e5b75505Sopenharmony_ci TNC_MessageType messageType); 45e5b75505Sopenharmony_citypedef TNC_Result (*TNC_TNCS_RequestHandshakeRetryPointer)( 46e5b75505Sopenharmony_ci TNC_IMVID imvID, 47e5b75505Sopenharmony_ci TNC_ConnectionID connectionID, 48e5b75505Sopenharmony_ci TNC_RetryReason reason); 49e5b75505Sopenharmony_citypedef TNC_Result (*TNC_TNCS_ProvideRecommendationPointer)( 50e5b75505Sopenharmony_ci TNC_IMVID imvID, 51e5b75505Sopenharmony_ci TNC_ConnectionID connectionID, 52e5b75505Sopenharmony_ci TNC_IMV_Action_Recommendation recommendation, 53e5b75505Sopenharmony_ci TNC_IMV_Evaluation_Result evaluation); 54e5b75505Sopenharmony_citypedef TNC_Result (*TNC_TNCC_BindFunctionPointer)( 55e5b75505Sopenharmony_ci TNC_IMCID imcID, 56e5b75505Sopenharmony_ci char *functionName, 57e5b75505Sopenharmony_ci void **pOutfunctionPointer); 58e5b75505Sopenharmony_citypedef TNC_Result (*TNC_TNCC_SendMessagePointer)( 59e5b75505Sopenharmony_ci TNC_IMCID imcID, 60e5b75505Sopenharmony_ci TNC_ConnectionID connectionID, 61e5b75505Sopenharmony_ci TNC_BufferReference message, 62e5b75505Sopenharmony_ci TNC_UInt32 messageLength, 63e5b75505Sopenharmony_ci TNC_MessageType messageType); 64e5b75505Sopenharmony_citypedef TNC_Result (*TNC_TNCC_ReportMessageTypesPointer)( 65e5b75505Sopenharmony_ci TNC_IMCID imcID, 66e5b75505Sopenharmony_ci TNC_MessageTypeList supportedTypes, 67e5b75505Sopenharmony_ci TNC_UInt32 typeCount); 68e5b75505Sopenharmony_citypedef TNC_Result (*TNC_TNCC_RequestHandshakeRetryPointer)( 69e5b75505Sopenharmony_ci TNC_IMCID imcID, 70e5b75505Sopenharmony_ci TNC_ConnectionID connectionID, 71e5b75505Sopenharmony_ci TNC_RetryReason reason); 72e5b75505Sopenharmony_ci 73e5b75505Sopenharmony_ci#define TNC_IFIMV_VERSION_1 1 74e5b75505Sopenharmony_ci#define TNC_IFIMC_VERSION_1 1 75e5b75505Sopenharmony_ci 76e5b75505Sopenharmony_ci#define TNC_RESULT_SUCCESS 0 77e5b75505Sopenharmony_ci#define TNC_RESULT_NOT_INITIALIZED 1 78e5b75505Sopenharmony_ci#define TNC_RESULT_ALREADY_INITIALIZED 2 79e5b75505Sopenharmony_ci#define TNC_RESULT_NO_COMMON_VERSION 3 80e5b75505Sopenharmony_ci#define TNC_RESULT_CANT_RETRY 4 81e5b75505Sopenharmony_ci#define TNC_RESULT_WONT_RETRY 5 82e5b75505Sopenharmony_ci#define TNC_RESULT_INVALID_PARAMETER 6 83e5b75505Sopenharmony_ci#define TNC_RESULT_CANT_RESPOND 7 84e5b75505Sopenharmony_ci#define TNC_RESULT_ILLEGAL_OPERATION 8 85e5b75505Sopenharmony_ci#define TNC_RESULT_OTHER 9 86e5b75505Sopenharmony_ci#define TNC_RESULT_FATAL 10 87e5b75505Sopenharmony_ci 88e5b75505Sopenharmony_ci#define TNC_CONNECTION_STATE_CREATE 0 89e5b75505Sopenharmony_ci#define TNC_CONNECTION_STATE_HANDSHAKE 1 90e5b75505Sopenharmony_ci#define TNC_CONNECTION_STATE_ACCESS_ALLOWED 2 91e5b75505Sopenharmony_ci#define TNC_CONNECTION_STATE_ACCESS_ISOLATED 3 92e5b75505Sopenharmony_ci#define TNC_CONNECTION_STATE_ACCESS_NONE 4 93e5b75505Sopenharmony_ci#define TNC_CONNECTION_STATE_DELETE 5 94e5b75505Sopenharmony_ci 95e5b75505Sopenharmony_ci#define TNC_VENDORID_ANY ((TNC_VendorID) 0xffffff) 96e5b75505Sopenharmony_ci#define TNC_SUBTYPE_ANY ((TNC_Subtype) 0xff) 97e5b75505Sopenharmony_ci 98e5b75505Sopenharmony_ci/* TNCC-TNCS Message Types */ 99e5b75505Sopenharmony_ci#define TNC_TNCCS_RECOMMENDATION 0x00000001 100e5b75505Sopenharmony_ci#define TNC_TNCCS_ERROR 0x00000002 101e5b75505Sopenharmony_ci#define TNC_TNCCS_PREFERREDLANGUAGE 0x00000003 102e5b75505Sopenharmony_ci#define TNC_TNCCS_REASONSTRINGS 0x00000004 103e5b75505Sopenharmony_ci 104e5b75505Sopenharmony_ci/* Possible TNC_IMV_Action_Recommendation values: */ 105e5b75505Sopenharmony_cienum IMV_Action_Recommendation { 106e5b75505Sopenharmony_ci TNC_IMV_ACTION_RECOMMENDATION_ALLOW, 107e5b75505Sopenharmony_ci TNC_IMV_ACTION_RECOMMENDATION_NO_ACCESS, 108e5b75505Sopenharmony_ci TNC_IMV_ACTION_RECOMMENDATION_ISOLATE, 109e5b75505Sopenharmony_ci TNC_IMV_ACTION_RECOMMENDATION_NO_RECOMMENDATION 110e5b75505Sopenharmony_ci}; 111e5b75505Sopenharmony_ci 112e5b75505Sopenharmony_ci/* Possible TNC_IMV_Evaluation_Result values: */ 113e5b75505Sopenharmony_cienum IMV_Evaluation_Result { 114e5b75505Sopenharmony_ci TNC_IMV_EVALUATION_RESULT_COMPLIANT, 115e5b75505Sopenharmony_ci TNC_IMV_EVALUATION_RESULT_NONCOMPLIANT_MINOR, 116e5b75505Sopenharmony_ci TNC_IMV_EVALUATION_RESULT_NONCOMPLIANT_MAJOR, 117e5b75505Sopenharmony_ci TNC_IMV_EVALUATION_RESULT_ERROR, 118e5b75505Sopenharmony_ci TNC_IMV_EVALUATION_RESULT_DONT_KNOW 119e5b75505Sopenharmony_ci}; 120e5b75505Sopenharmony_ci 121e5b75505Sopenharmony_ci#endif /* TNC_H */ 122