From: Andreas Steffen Date: Sun, 4 Dec 2011 11:48:30 +0000 (+0100) Subject: upgraded IF-IMC/IMV inteface definitions to version 1.3 X-Git-Tag: 4.6.2~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db183a92b7a0ad6d00247c610dac557ff48506e1;p=thirdparty%2Fstrongswan.git upgraded IF-IMC/IMV inteface definitions to version 1.3 --- diff --git a/src/libcharon/plugins/tnc_imc/tnc_imc_bind_function.c b/src/libcharon/plugins/tnc_imc/tnc_imc_bind_function.c index 46c131b44d..becd22ab50 100644 --- a/src/libcharon/plugins/tnc_imc/tnc_imc_bind_function.c +++ b/src/libcharon/plugins/tnc_imc/tnc_imc_bind_function.c @@ -19,8 +19,6 @@ #include -#define TNC_IMVID_ANY 0xffff - /** * Called by the IMC to inform a TNCC about the set of message types the IMC * is able to receive diff --git a/src/libcharon/plugins/tnc_imv/tnc_imv_bind_function.c b/src/libcharon/plugins/tnc_imv/tnc_imv_bind_function.c index cde1e4fe19..a1d99e8a36 100644 --- a/src/libcharon/plugins/tnc_imv/tnc_imv_bind_function.c +++ b/src/libcharon/plugins/tnc_imv/tnc_imv_bind_function.c @@ -19,8 +19,6 @@ #include -#define TNC_IMCID_ANY 0xffff - /** * Called by the IMV to inform a TNCS about the set of message types the IMV * is able to receive diff --git a/src/libtncif/tncif.h b/src/libtncif/tncif.h index 3a889962ec..40dd12ca7f 100644 --- a/src/libtncif/tncif.h +++ b/src/libtncif/tncif.h @@ -1,22 +1,25 @@ /* tncif.h * - * Trusted Network Connect IF-IMV API version 1.20 + * Trusted Network Connect IF-IMC/IMV API version 1.30 * Microsoft Windows DLL Platform Binding C Header - * February 5, 2007 + * October 14, 2011 * - * Copyright(c) 2005-2007, Trusted Computing Group, Inc. All rights + * Common definitions for IF-IMC and IF-IMV + * extracted from tncifimc.h and tncifimv.h + * + * Copyright(c) 2005-2011, Trusted Computing Group, Inc. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * - Redistributions of source code must retain the above copyright + * o Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright + * o Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * - Neither the name of the Trusted Computing Group nor the names of + * o Neither the name of the Trusted Computing Group nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -41,32 +44,38 @@ * Any marks and brands contained herein are the property of their * respective owners. * - * Trusted Network Connect IF-IMC/IF-IMV API version 1.00 Revision 3 - * Microsoft Windows DLL Platform Binding C Header - * Common definitions for IF-IMC and IF-IMV - * extracted from tncifimc.h and tncifimv.h - * Feb 12, 2007 + */ + +/** + * @defgroup tncif tncif + * @{ @ingroup libtncif */ #ifndef TNCIF_H_ #define TNCIF_H_ /* Basic Types */ + typedef unsigned long TNC_UInt32; typedef unsigned char *TNC_BufferReference; /* Derived Types */ + typedef TNC_UInt32 TNC_ConnectionID; typedef TNC_UInt32 TNC_ConnectionState; typedef TNC_UInt32 TNC_RetryReason; typedef TNC_UInt32 TNC_MessageType; typedef TNC_MessageType *TNC_MessageTypeList; typedef TNC_UInt32 TNC_VendorID; +typedef TNC_VendorID *TNC_VendorIDList; typedef TNC_UInt32 TNC_MessageSubtype; +typedef TNC_MessageSubtype *TNC_MessageSubtypeList; typedef TNC_UInt32 TNC_Version; typedef TNC_UInt32 TNC_Result; +typedef TNC_UInt32 TNC_AttributeID; /* Result Codes */ + #define TNC_RESULT_SUCCESS 0 #define TNC_RESULT_NOT_INITIALIZED 1 #define TNC_RESULT_ALREADY_INITIALIZED 2 @@ -78,11 +87,17 @@ typedef TNC_UInt32 TNC_Result; #define TNC_RESULT_ILLEGAL_OPERATION 8 #define TNC_RESULT_OTHER 9 #define TNC_RESULT_FATAL 10 +#define TNC_RESULT_EXCEEDED_MAX_ROUND_TRIPS 0x00559700 +#define TNC_RESULT_EXCEEDED_MAX_MESSAGE_SIZE 0x00559701 +#define TNC_RESULT_NO_LONG_MESSAGE_TYPES 0x00559702 +#define TNC_RESULT_NO_SOH_SUPPORT 0x00559703 /* Network Connection ID Values */ + #define TNC_CONNECTIONID_ANY 0xFFFFFFFF /* Network Connection State Values */ + #define TNC_CONNECTION_STATE_CREATE 0 #define TNC_CONNECTION_STATE_HANDSHAKE 1 #define TNC_CONNECTION_STATE_ACCESS_ALLOWED 2 @@ -90,10 +105,38 @@ typedef TNC_UInt32 TNC_Result; #define TNC_CONNECTION_STATE_ACCESS_NONE 4 #define TNC_CONNECTION_STATE_DELETE 5 +/* IMC/IMV ID Values */ + +#define TNC_IMVID_ANY ((TNC_UInt32) 0xffff) +#define TNC_IMCID_ANY ((TNC_UInt32) 0xffff) + /* Vendor ID Values */ + #define TNC_VENDORID_TCG 0 +#define TNC_VENDORID_TCG_NEW 0x005597 #define TNC_VENDORID_ANY ((TNC_VendorID) 0xffffff) + /* Message Subtype Values */ + #define TNC_SUBTYPE_ANY ((TNC_MessageSubtype) 0xff) +/* Message Flags Values */ + +#define TNC_MESSAGE_FLAGS_EXCLUSIVE ((TNC_Uint32) 0x80000000) + +/* Message Attribute ID Values */ + +#define TNC_ATTRIBUTEID_PREFERRED_LANGUAGE ((TNC_AttributeID) 0x00000001) +#define TNC_ATTRIBUTEID_MAX_ROUND_TRIPS ((TNC_AttributeID) 0x00559700) +#define TNC_ATTRIBUTEID_MAX_MESSAGE_SIZE ((TNC_AttributeID) 0x00559701) +#define TNC_ATTRIBUTEID_DHPN ((TNC_AttributeID) 0x00559702) +#define TNC_ATTRIBUTEID_HAS_LONG_TYPES ((TNC_AttributeID) 0x00559703) +#define TNC_ATTRIBUTEID_HAS_EXCLUSIVE ((TNC_AttributeID) 0x00559704) +#define TNC_ATTRIBUTEID_HAS_SOH ((TNC_AttributeID) 0x00559705) +#define TNC_ATTRIBUTEID_IFTNCCS_PROTOCOL ((TNC_AttributeID) 0x0055970A) +#define TNC_ATTRIBUTEID_IFTNCCS_VERSION ((TNC_AttributeID) 0x0055970B) +#define TNC_ATTRIBUTEID_IFT_PROTOCOL ((TNC_AttributeID) 0x0055970C) +#define TNC_ATTRIBUTEID_IFT_VERSION ((TNC_AttributeID) 0x0055970D) +#define TNC_ATTRIBUTEID_TLS_UNIQUE ((TNC_AttributeID) 0x0055970E) + #endif /** TNCIF_H_ @}*/ diff --git a/src/libtncif/tncif_names.h b/src/libtncif/tncif_names.h index a7c9e7be37..9b50a34e9d 100644 --- a/src/libtncif/tncif_names.h +++ b/src/libtncif/tncif_names.h @@ -12,6 +12,16 @@ * for more details. */ +/** + * @defgroup libtncif libtncif + * + * @addtogroup libtncif + * TNC interface definitions + * + * @defgroup tncif_names tncif_names + * @{ @ingroup libtncif + */ + #ifndef TNCIF_NAMES_H_ #define TNCIF_NAMES_H_ diff --git a/src/libtncif/tncif_pa_subtypes.h b/src/libtncif/tncif_pa_subtypes.h index 7719713384..c1b4ae9675 100644 --- a/src/libtncif/tncif_pa_subtypes.h +++ b/src/libtncif/tncif_pa_subtypes.h @@ -12,6 +12,11 @@ * for more details. */ +/** + * @defgroup tncif_pa_subtypes tncif_pa_subtypes + * @{ @ingroup libtncif + */ + #ifndef TNCIF_PA_SUBTYPES_H_ #define TNCIF_PA_SUBTYPES_H_ diff --git a/src/libtncif/tncifimc.h b/src/libtncif/tncifimc.h index c6ddabd454..45af913df9 100644 --- a/src/libtncif/tncifimc.h +++ b/src/libtncif/tncifimc.h @@ -1,22 +1,22 @@ /* tncifimc.h * - * Trusted Network Connect IF-IMC API version 1.20 Revision 8 + * Trusted Network Connect IF-IMC API version 1.30 * Microsoft Windows DLL Platform Binding C Header - * February 5, 2007 + * October 14, 2011 * - * Copyright(c) 2005-2007, Trusted Computing Group, Inc. All rights + * Copyright(c) 2005-2011, Trusted Computing Group, Inc. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * - Redistributions of source code must retain the above copyright + * o Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright + * o Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * - Neither the name of the Trusted Computing Group nor the names of + * o Neither the name of the Trusted Computing Group nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -45,7 +45,7 @@ /** * @defgroup tncifimc tncifimc - * @{ @ingroup tnc + * @{ @ingroup libtncif */ #ifndef TNCIFIMC_H_ @@ -53,6 +53,16 @@ #include "tncif.h" +#ifdef WIN32 +#ifdef TNC_IMC_EXPORTS +#define TNC_IMC_API __declspec(dllexport) +#else +#define TNC_IMC_API __declspec(dllimport) +#endif +#else +#define TNC_IMC_API +#endif + /* Derived Types */ typedef TNC_UInt32 TNC_IMCID; @@ -77,6 +87,22 @@ typedef TNC_Result (*TNC_IMC_ReceiveMessagePointer)( TNC_BufferReference message, TNC_UInt32 messageLength, TNC_MessageType messageType); +typedef TNC_Result (*TNC_IMC_ReceiveMessageSOHPointer)( + TNC_IMCID imcID, + TNC_ConnectionID connectionID, + TNC_BufferReference sohrReportEntry, + TNC_UInt32 sohrRELength, + TNC_MessageType systemHealthID); +typedef TNC_Result (*TNC_IMC_ReceiveMessageLongPointer)( + TNC_IMCID imcID, + TNC_ConnectionID connectionID, + TNC_UInt32 messageFlags, + TNC_BufferReference message, + TNC_UInt32 messageLength, + TNC_VendorID messageVendorID, + TNC_MessageSubtype messageSubtype, + TNC_UInt32 sourceIMVID, + TNC_UInt32 destinationIMCID); typedef TNC_Result (*TNC_IMC_BatchEndingPointer)( TNC_IMCID imcID, TNC_ConnectionID connectionID); @@ -86,16 +112,51 @@ typedef TNC_Result (*TNC_TNCC_ReportMessageTypesPointer)( TNC_IMCID imcID, TNC_MessageTypeList supportedTypes, TNC_UInt32 typeCount); +typedef TNC_Result (*TNC_TNCC_ReportMessageTypesLongPointer)( + TNC_IMCID imcID, + TNC_VendorIDList supportedVendorIDs, + TNC_MessageSubtypeList supportedSubtypes, + TNC_UInt32 typeCount); typedef TNC_Result (*TNC_TNCC_SendMessagePointer)( TNC_IMCID imcID, TNC_ConnectionID connectionID, TNC_BufferReference message, TNC_UInt32 messageLength, TNC_MessageType messageType); +typedef TNC_Result (*TNC_TNCC_SendMessageSOHPointer)( + TNC_IMCID imcID, + TNC_ConnectionID connectionID, + TNC_BufferReference sohReportEntry, + TNC_UInt32 sohRELength); +typedef TNC_Result (*TNC_TNCC_SendMessageLongPointer)( + TNC_IMCID imcID, + TNC_ConnectionID connectionID, + TNC_UInt32 messageFlags, + TNC_BufferReference message, + TNC_UInt32 messageLength, + TNC_VendorID messageVendorID, + TNC_MessageSubtype messageSubtype, + TNC_UInt32 destinationIMVID); typedef TNC_Result (*TNC_TNCC_RequestHandshakeRetryPointer)( TNC_IMCID imcID, TNC_ConnectionID connectionID, TNC_RetryReason reason); +typedef TNC_Result (*TNC_TNCC_GetAttributePointer)( + TNC_IMCID imcID, + TNC_ConnectionID connectionID, + TNC_AttributeID attributeID, + TNC_UInt32 bufferLength, + TNC_BufferReference buffer, + TNC_UInt32 *pOutValueLength); +typedef TNC_Result (*TNC_TNCC_SetAttributePointer)( + TNC_IMCID imcID, + TNC_ConnectionID connectionID, + TNC_AttributeID attributeID, + TNC_UInt32 bufferLength, + TNC_BufferReference buffer); +typedef TNC_Result (*TNC_TNCC_ReserveAdditionalIMCIDPointer)( + TNC_IMCID imcID, + TNC_UInt32 *pOutIMCID); typedef TNC_Result (*TNC_TNCC_BindFunctionPointer)( TNC_IMCID imcID, char *functionName, @@ -104,6 +165,8 @@ typedef TNC_Result (*TNC_IMC_ProvideBindFunctionPointer)( TNC_IMCID imcID, TNC_TNCC_BindFunctionPointer bindFunction); +/* Version Numbers */ + #define TNC_IFIMC_VERSION_1 1 /* Handshake Retry Reason Values */ @@ -118,38 +181,62 @@ typedef TNC_Result (*TNC_IMC_ProvideBindFunctionPointer)( /* reserved for TNC_RETRY_REASON_IMV_MINOR_EVENT: 7 */ /* reserved for TNC_RETRY_REASON_IMV_PERIODIC: 8 */ +/* Message Attribute ID Values */ + +#define TNC_ATTRIBUTEID_SOHR ((TNC_AttributeID) 0x00559708) +#define TNC_ATTRIBUTEID_SSOHR ((TNC_AttributeID) 0x00559709) +#define TNC_ATTRIBUTEID_PRIMARY_IMC_ID ((TNC_AttributeID) 0x00559711) + /* IMC Functions */ -TNC_Result TNC_IMC_Initialize( +TNC_IMC_API TNC_Result TNC_IMC_Initialize( /*in*/ TNC_IMCID imcID, /*in*/ TNC_Version minVersion, /*in*/ TNC_Version maxVersion, /*out*/ TNC_Version *pOutActualVersion); -TNC_Result TNC_IMC_NotifyConnectionChange( +TNC_IMC_API TNC_Result TNC_IMC_NotifyConnectionChange( /*in*/ TNC_IMCID imcID, /*in*/ TNC_ConnectionID connectionID, /*in*/ TNC_ConnectionState newState); -TNC_Result TNC_IMC_BeginHandshake( +TNC_IMC_API TNC_Result TNC_IMC_BeginHandshake( /*in*/ TNC_IMCID imcID, /*in*/ TNC_ConnectionID connectionID); -TNC_Result TNC_IMC_ReceiveMessage( +TNC_IMC_API TNC_Result TNC_IMC_ReceiveMessage( /*in*/ TNC_IMCID imcID, /*in*/ TNC_ConnectionID connectionID, /*in*/ TNC_BufferReference messageBuffer, /*in*/ TNC_UInt32 messageLength, /*in*/ TNC_MessageType messageType); -TNC_Result TNC_IMC_BatchEnding( +TNC_IMC_API TNC_Result TNC_IMC_ReceiveMessageSOH( +/*in*/ TNC_IMCID imcID, +/*in*/ TNC_ConnectionID connectionID, +/*in*/ TNC_BufferReference sohrReportEntry, +/*in*/ TNC_UInt32 sohrRELength, +/*in*/ TNC_MessageType systemHealthID); + +TNC_IMC_API TNC_Result TNC_IMC_ReceiveMessageLong( +/*in*/ TNC_IMCID imcID, +/*in*/ TNC_ConnectionID connectionID, +/*in*/ TNC_UInt32 messageFlags, +/*in*/ TNC_BufferReference message, +/*in*/ TNC_UInt32 messageLength, +/*in*/ TNC_VendorID messageVendorID, +/*in*/ TNC_MessageSubtype messageSubtype, +/*in*/ TNC_UInt32 sourceIMVID, +/*in*/ TNC_UInt32 destinationIMCID); + +TNC_IMC_API TNC_Result TNC_IMC_BatchEnding( /*in*/ TNC_IMCID imcID, /*in*/ TNC_ConnectionID connectionID); -TNC_Result TNC_IMC_Terminate( +TNC_IMC_API TNC_Result TNC_IMC_Terminate( /*in*/ TNC_IMCID imcID); -TNC_Result TNC_IMC_ProvideBindFunction( +TNC_IMC_API TNC_Result TNC_IMC_ProvideBindFunction( /*in*/ TNC_IMCID imcID, /*in*/ TNC_TNCC_BindFunctionPointer bindFunction); @@ -160,6 +247,12 @@ TNC_Result TNC_TNCC_ReportMessageTypes( /*in*/ TNC_MessageTypeList supportedTypes, /*in*/ TNC_UInt32 typeCount); +TNC_Result TNC_TNCC_ReportMessageTypesLong( +/*in*/ TNC_IMCID imcID, +/*in*/ TNC_VendorIDList supportedVendorIDs, +/*in*/ TNC_MessageSubtypeList supportedSubtypes, +/*in*/ TNC_UInt32 typeCount); + TNC_Result TNC_TNCC_SendMessage( /*in*/ TNC_IMCID imcID, /*in*/ TNC_ConnectionID connectionID, @@ -167,11 +260,45 @@ TNC_Result TNC_TNCC_SendMessage( /*in*/ TNC_UInt32 messageLength, /*in*/ TNC_MessageType messageType); +TNC_Result TNC_TNCC_SendMessageSOH( +/*in*/ TNC_IMCID imcID, +/*in*/ TNC_ConnectionID connectionID, +/*in*/ TNC_BufferReference sohReportEntry, +/*in*/ TNC_UInt32 sohRELength); + +TNC_Result TNC_TNCC_SendMessageLong( +/*in*/ TNC_IMCID imcID, +/*in*/ TNC_ConnectionID connectionID, +/*in*/ TNC_UInt32 messageFlags, +/*in*/ TNC_BufferReference message, +/*in*/ TNC_UInt32 messageLength, +/*in*/ TNC_VendorID messageVendorID, +/*in*/ TNC_MessageSubtype messageSubtype, +/*in*/ TNC_UInt32 destinationIMVID); TNC_Result TNC_TNCC_RequestHandshakeRetry( /*in*/ TNC_IMCID imcID, /*in*/ TNC_ConnectionID connectionID, /*in*/ TNC_RetryReason reason); +TNC_Result TNC_TNCC_GetAttribute( +/*in*/ TNC_IMCID imcID, +/*in*/ TNC_ConnectionID connectionID, +/*in*/ TNC_AttributeID attributeID, +/*in*/ TNC_UInt32 bufferLength, +/*out*/ TNC_BufferReference buffer, +/*out*/ TNC_UInt32 *pOutValueLength); + +TNC_Result TNC_TNCC_SetAttribute( +/*in*/ TNC_IMCID imcID, +/*in*/ TNC_ConnectionID connectionID, +/*in*/ TNC_AttributeID attributeID, +/*in*/ TNC_UInt32 bufferLength, +/*in*/ TNC_BufferReference buffer); + +TNC_Result TNC_TNCS_ReserveAdditionalIMCID( +/*in*/ TNC_IMCID imcID, +/*out*/ TNC_UInt32 *pOutIMCID); + TNC_Result TNC_TNCC_BindFunction( /*in*/ TNC_IMCID imcID, /*in*/ char *functionName, diff --git a/src/libtncif/tncifimv.h b/src/libtncif/tncifimv.h index 7a2394c067..3c9db0055e 100644 --- a/src/libtncif/tncifimv.h +++ b/src/libtncif/tncifimv.h @@ -1,22 +1,22 @@ /* tncifimv.h * - * Trusted Network Connect IF-IMV API version 1.20 + * Trusted Network Connect IF-IMV API version 1.30 * Microsoft Windows DLL Platform Binding C Header - * February 5, 2007 + * October 14, 2011 * - * Copyright(c) 2005-2007, Trusted Computing Group, Inc. All rights + * Copyright(c) 2005-2011, Trusted Computing Group, Inc. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * - Redistributions of source code must retain the above copyright + * o Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * - Redistributions in binary form must reproduce the above copyright + * o Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * - Neither the name of the Trusted Computing Group nor the names of + * o Neither the name of the Trusted Computing Group nor the names of * its contributors may be used to endorse or promote products * derived from this software without specific prior written * permission. @@ -42,80 +42,134 @@ * respective owners. */ +/** + * @defgroup tncifimv tncifimv + * @{ @ingroup libtncif + */ + #ifndef TNCIFIMV_H_ #define TNCIFIMV_H_ #include "tncif.h" +#ifdef WIN32 +#ifdef TNC_IMV_EXPORTS +#define TNC_IMV_API __declspec(dllexport) +#else +#define TNC_IMV_API __declspec(dllimport) +#endif +#else +#define TNC_IMV_API +#endif + +/* Derived Types */ + typedef TNC_UInt32 TNC_IMVID; typedef TNC_UInt32 TNC_IMV_Action_Recommendation; typedef TNC_UInt32 TNC_IMV_Evaluation_Result; -typedef TNC_UInt32 TNC_AttributeID; /* Function pointers */ typedef TNC_Result (*TNC_IMV_InitializePointer)( - TNC_IMVID imvID, - TNC_Version minVersion, - TNC_Version maxVersion, - TNC_Version *pOutActualVersion); + TNC_IMVID imvID, + TNC_Version minVersion, + TNC_Version maxVersion, + TNC_Version *pOutActualVersion); typedef TNC_Result (*TNC_IMV_NotifyConnectionChangePointer)( - TNC_IMVID imvID, - TNC_ConnectionID connectionID, - TNC_ConnectionState newState); + TNC_IMVID imvID, + TNC_ConnectionID connectionID, + TNC_ConnectionState newState); typedef TNC_Result (*TNC_IMV_ReceiveMessagePointer)( - TNC_IMVID imvID, - TNC_ConnectionID connectionID, - TNC_BufferReference message, - TNC_UInt32 messageLength, - TNC_MessageType messageType); + TNC_IMVID imvID, + TNC_ConnectionID connectionID, + TNC_BufferReference message, + TNC_UInt32 messageLength, + TNC_MessageType messageType); +typedef TNC_Result (*TNC_IMV_ReceiveMessageSOHPointer)( + TNC_IMVID imvID, + TNC_ConnectionID connectionID, + TNC_BufferReference sohReportEntry, + TNC_UInt32 sohRELength, + TNC_MessageType systemHealthID); +typedef TNC_Result (*TNC_IMV_ReceiveMessageLongPointer)( + TNC_IMVID imvID, + TNC_ConnectionID connectionID, + TNC_UInt32 messageFlags, + TNC_BufferReference message, + TNC_UInt32 messageLength, + TNC_VendorID messageVendorID, + TNC_MessageSubtype messageSubtype, + TNC_UInt32 sourceIMCID, + TNC_UInt32 destinationIMVID); typedef TNC_Result (*TNC_IMV_SolicitRecommendationPointer)( - TNC_IMVID imvID, - TNC_ConnectionID connectionID); + TNC_IMVID imvID, + TNC_ConnectionID connectionID); typedef TNC_Result (*TNC_IMV_BatchEndingPointer)( - TNC_IMVID imvID, - TNC_ConnectionID connectionID); + TNC_IMVID imvID, + TNC_ConnectionID connectionID); typedef TNC_Result (*TNC_IMV_TerminatePointer)( - TNC_IMVID imvID); + TNC_IMVID imvID); typedef TNC_Result (*TNC_TNCS_ReportMessageTypesPointer)( - TNC_IMVID imvID, - TNC_MessageTypeList supportedTypes, - TNC_UInt32 typeCount); + TNC_IMVID imvID, + TNC_MessageTypeList supportedTypes, + TNC_UInt32 typeCount); +typedef TNC_Result (*TNC_TNCS_ReportMessageTypesLongPointer)( + TNC_IMVID imvID, + TNC_VendorIDList supportedVendorIDs, + TNC_MessageSubtypeList supportedSubtypes, + TNC_UInt32 typeCount); typedef TNC_Result (*TNC_TNCS_SendMessagePointer)( - TNC_IMVID imvID, - TNC_ConnectionID connectionID, - TNC_BufferReference message, - TNC_UInt32 messageLength, - TNC_MessageType messageType); + TNC_IMVID imvID, + TNC_ConnectionID connectionID, + TNC_BufferReference message, + TNC_UInt32 messageLength, + TNC_MessageType messageType); +typedef TNC_Result (*TNC_TNCS_SendMessageSOHPointer)( + TNC_IMVID imvID, + TNC_ConnectionID connectionID, + TNC_BufferReference sohrReportEntry, + TNC_UInt32 sohrRELength); +typedef TNC_Result (*TNC_TNCS_SendMessageLongPointer)( + TNC_IMVID imvID, + TNC_ConnectionID connectionID, + TNC_UInt32 messageFlags, + TNC_BufferReference message, + TNC_UInt32 messageLength, + TNC_VendorID messageVendorID, + TNC_MessageSubtype messageSubtype, + TNC_UInt32 destinationIMCID); typedef TNC_Result (*TNC_TNCS_RequestHandshakeRetryPointer)( - TNC_IMVID imvID, - TNC_ConnectionID connectionID, - TNC_RetryReason reason); + TNC_IMVID imvID, + TNC_ConnectionID connectionID, + TNC_RetryReason reason); typedef TNC_Result (*TNC_TNCS_ProvideRecommendationPointer)( - TNC_IMVID imvID, - TNC_ConnectionID connectionID, - TNC_IMV_Action_Recommendation recommendation, - TNC_IMV_Evaluation_Result evaluation); + TNC_IMVID imvID, + TNC_ConnectionID connectionID, + TNC_IMV_Action_Recommendation recommendation, + TNC_IMV_Evaluation_Result evaluation); typedef TNC_Result (*TNC_TNCS_GetAttributePointer)( - TNC_IMVID imvID, -TNC_ConnectionID connectionID, -TNC_AttributeID attributeID, - TNC_UInt32 bufferLength, - TNC_BufferReference buffer, - TNC_UInt32 *pOutValueLength); -typedef TNC_Result (*TNC_TNCS_SetAttributePointer)( - TNC_IMVID imvID, + TNC_IMVID imvID, TNC_ConnectionID connectionID, -TNC_AttributeID attributeID, - TNC_UInt32 bufferLength, - TNC_BufferReference buffer); + TNC_AttributeID attributeID, + TNC_UInt32 bufferLength, + TNC_BufferReference buffer, + TNC_UInt32 *pOutValueLength); +typedef TNC_Result (*TNC_TNCS_SetAttributePointer)( + TNC_IMVID imvID, + TNC_ConnectionID connectionID, + TNC_AttributeID attributeID, + TNC_UInt32 bufferLength, + TNC_BufferReference buffer); +typedef TNC_Result (*TNC_TNCS_ReserveAdditionalIMVIDPointer)( + TNC_IMVID imvID, + TNC_UInt32 *pOutIMVID); typedef TNC_Result (*TNC_TNCS_BindFunctionPointer)( - TNC_IMVID imvID, - char *functionName, - void **pOutfunctionPointer); + TNC_IMVID imvID, + char *functionName, + void **pOutfunctionPointer); typedef TNC_Result (*TNC_IMV_ProvideBindFunctionPointer)( - TNC_IMVID imvID, - TNC_TNCS_BindFunctionPointer bindFunction); + TNC_IMVID imvID, + TNC_TNCS_BindFunctionPointer bindFunction); /* Version Numbers */ @@ -150,42 +204,62 @@ typedef TNC_Result (*TNC_IMV_ProvideBindFunctionPointer)( /* Message Attribute ID Values */ -#define TNC_ATTRIBUTEID_PREFERRED_LANGUAGE ((TNC_AttributeID) 0x00000001) #define TNC_ATTRIBUTEID_REASON_STRING ((TNC_AttributeID) 0x00000002) #define TNC_ATTRIBUTEID_REASON_LANGUAGE ((TNC_AttributeID) 0x00000003) +#define TNC_ATTRIBUTEID_SOH ((TNC_AttributeID) 0x00559706) +#define TNC_ATTRIBUTEID_SSOH ((TNC_AttributeID) 0x00559707) +#define TNC_ATTRIBUTEID_PRIMARY_IMV_ID ((TNC_AttributeID) 0x00559710) /* IMV Functions */ -TNC_Result TNC_IMV_Initialize( +TNC_IMV_API TNC_Result TNC_IMV_Initialize( /*in*/ TNC_IMVID imvID, /*in*/ TNC_Version minVersion, /*in*/ TNC_Version maxVersion, /*in*/ TNC_Version *pOutActualVersion); -TNC_Result TNC_IMV_NotifyConnectionChange( +TNC_IMV_API TNC_Result TNC_IMV_NotifyConnectionChange( /*in*/ TNC_IMVID imvID, /*in*/ TNC_ConnectionID connectionID, /*in*/ TNC_ConnectionState newState); -TNC_Result TNC_IMV_ReceiveMessage( +TNC_IMV_API TNC_Result TNC_IMV_ReceiveMessage( /*in*/ TNC_IMVID imvID, /*in*/ TNC_ConnectionID connectionID, /*in*/ TNC_BufferReference messageBuffer, /*in*/ TNC_UInt32 messageLength, /*in*/ TNC_MessageType messageType); -TNC_Result TNC_IMV_SolicitRecommendation( +TNC_IMV_API TNC_Result TNC_IMV_ReceiveMessageSOH( +/*in*/ TNC_IMVID imvID, +/*in*/ TNC_ConnectionID connectionID, +/*in*/ TNC_BufferReference sohReportEntry, +/*in*/ TNC_UInt32 sohRELength, +/*in*/ TNC_MessageType systemHealthID); + +TNC_IMV_API TNC_Result TNC_IMV_ReceiveMessageLong( +/*in*/ TNC_IMVID imvID, +/*in*/ TNC_ConnectionID connectionID, +/*in*/ TNC_UInt32 messageFlags, +/*in*/ TNC_BufferReference message, +/*in*/ TNC_UInt32 messageLength, +/*in*/ TNC_VendorID messageVendorID, +/*in*/ TNC_MessageSubtype messageSubtype, +/*in*/ TNC_UInt32 sourceIMCID, +/*in*/ TNC_UInt32 destinationIMVID); + +TNC_IMV_API TNC_Result TNC_IMV_SolicitRecommendation( /*in*/ TNC_IMVID imvID, /*in*/ TNC_ConnectionID connectionID); -TNC_Result TNC_IMV_BatchEnding( +TNC_IMV_API TNC_Result TNC_IMV_BatchEnding( /*in*/ TNC_IMVID imvID, /*in*/ TNC_ConnectionID connectionID); -TNC_Result TNC_IMV_Terminate( +TNC_IMV_API TNC_Result TNC_IMV_Terminate( /*in*/ TNC_IMVID imvID); -TNC_Result TNC_IMV_ProvideBindFunction( +TNC_IMV_API TNC_Result TNC_IMV_ProvideBindFunction( /*in*/ TNC_IMVID imvID, /*in*/ TNC_TNCS_BindFunctionPointer bindFunction); @@ -196,6 +270,12 @@ TNC_Result TNC_TNCS_ReportMessageTypes( /*in*/ TNC_MessageTypeList supportedTypes, /*in*/ TNC_UInt32 typeCount); +TNC_Result TNC_TNCS_ReportMessageTypesLong( +/*in*/ TNC_IMVID imvID, +/*in*/ TNC_VendorIDList supportedVendorIDs, +/*in*/ TNC_MessageSubtypeList supportedSubtypes, +/*in*/ TNC_UInt32 typeCount); + TNC_Result TNC_TNCS_SendMessage( /*in*/ TNC_IMVID imvID, /*in*/ TNC_ConnectionID connectionID, @@ -203,6 +283,22 @@ TNC_Result TNC_TNCS_SendMessage( /*in*/ TNC_UInt32 messageLength, /*in*/ TNC_MessageType messageType); +TNC_Result TNC_TNCS_SendMessageSOH( +/*in*/ TNC_IMVID imvID, +/*in*/ TNC_ConnectionID connectionID, +/*in*/ TNC_BufferReference sohrReportEntry, +/*in*/ TNC_UInt32 sohrRELength); + +TNC_Result TNC_TNCS_SendMessageLong( +/*in*/ TNC_IMVID imvID, +/*in*/ TNC_ConnectionID connectionID, +/*in*/ TNC_UInt32 messageFlags, +/*in*/ TNC_BufferReference message, +/*in*/ TNC_UInt32 messageLength, +/*in*/ TNC_VendorID messageVendorID, +/*in*/ TNC_MessageSubtype messageSubtype, +/*in*/ TNC_UInt32 destinationIMCID); + TNC_Result TNC_TNCS_RequestHandshakeRetry( /*in*/ TNC_IMVID imvID, /*in*/ TNC_ConnectionID connectionID, @@ -222,13 +318,16 @@ TNC_Result TNC_TNCS_GetAttribute( /*out*/ TNC_BufferReference buffer, /*out*/ TNC_UInt32 *pOutValueLength); -TNC_Result TNC_TNCS_SetAttribute( +TNC_Result TNC_TNCS_ReserveAdditionalIMVID( /*in*/ TNC_IMVID imvID, -/*in*/ TNC_ConnectionID connectionID, -/*in*/ TNC_AttributeID attributeID, -/*in*/ TNC_UInt32 bufferLength, -/*in*/ TNC_BufferReference buffer); +/*out*/ TNC_UInt32 *pOutIMVID); +TNC_Result TNC_TNCS_SetAttribute( +/*in*/ TNC_IMVID imvID, +/*in*/ TNC_ConnectionID connectionID, +/*in*/ TNC_AttributeID attributeID, +/*in*/ TNC_UInt32 bufferLength, +/*in*/ TNC_BufferReference buffer); TNC_Result TNC_TNCS_BindFunction( /*in*/ TNC_IMVID imvID, /*in*/ char *functionName,