Annotation of embedaddon/strongswan/src/libtncif/tncifimc.h, revision 1.1

1.1     ! misho       1: /* tncifimc.h
        !             2:  *
        !             3:  * Trusted Network Connect IF-IMC API version 1.30
        !             4:  * Microsoft Windows DLL Platform Binding C Header
        !             5:  * October 14, 2011
        !             6:  *
        !             7:  * Copyright(c) 2005-2011, Trusted Computing Group, Inc. All rights
        !             8:  * reserved.
        !             9:  *
        !            10:  * Redistribution and use in source and binary forms, with or without
        !            11:  * modification, are permitted provided that the following conditions
        !            12:  * are met:
        !            13:  * o Redistributions of source code must retain the above copyright
        !            14:  *   notice, this list of conditions and the following disclaimer.
        !            15:  * o Redistributions in binary form must reproduce the above copyright
        !            16:  *   notice, this list of conditions and the following disclaimer in
        !            17:  *   the documentation and/or other materials provided with the
        !            18:  *   distribution.
        !            19:  * o Neither the name of the Trusted Computing Group nor the names of
        !            20:  *   its contributors may be used to endorse or promote products
        !            21:  *   derived from this software without specific prior written
        !            22:  *   permission.
        !            23:  *
        !            24:  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
        !            25:  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
        !            26:  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
        !            27:  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
        !            28:  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
        !            29:  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
        !            30:  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
        !            31:  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        !            32:  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        !            33:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
        !            34:  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
        !            35:  * POSSIBILITY OF SUCH DAMAGE.
        !            36:  *
        !            37:  * Contact the Trusted Computing Group at
        !            38:  * admin@trustedcomputinggroup.org for information on specification
        !            39:  * licensing through membership agreements.
        !            40:  *
        !            41:  * Any marks and brands contained herein are the property of their
        !            42:  * respective owners.
        !            43:  *
        !            44:  */
        !            45: 
        !            46: /**
        !            47:  * @defgroup tncifimc tncifimc
        !            48:  * @{ @ingroup libtncif
        !            49:  */
        !            50: 
        !            51: #ifndef TNCIFIMC_H_
        !            52: #define TNCIFIMC_H_
        !            53: 
        !            54: #include "tncif.h"
        !            55: 
        !            56: #ifdef WIN32
        !            57: #ifdef TNC_IMC_EXPORTS
        !            58: #define TNC_IMC_API __declspec(dllexport)
        !            59: #else
        !            60: #define TNC_IMC_API __declspec(dllimport)
        !            61: #endif
        !            62: #else
        !            63: #define TNC_IMC_API
        !            64: #endif
        !            65: 
        !            66: /* Derived Types */
        !            67: 
        !            68: typedef TNC_UInt32 TNC_IMCID;
        !            69: 
        !            70: /* Function pointers */
        !            71: 
        !            72: typedef TNC_Result (*TNC_IMC_InitializePointer)(
        !            73:     TNC_IMCID imcID,
        !            74:     TNC_Version minVersion,
        !            75:     TNC_Version maxVersion,
        !            76:     TNC_Version *pOutActualVersion);
        !            77: typedef TNC_Result (*TNC_IMC_NotifyConnectionChangePointer)(
        !            78:     TNC_IMCID imcID,
        !            79:     TNC_ConnectionID connectionID,
        !            80:     TNC_ConnectionState newState);
        !            81: typedef TNC_Result (*TNC_IMC_BeginHandshakePointer)(
        !            82:     TNC_IMCID imcID,
        !            83:     TNC_ConnectionID connectionID);
        !            84: typedef TNC_Result (*TNC_IMC_ReceiveMessagePointer)(
        !            85:     TNC_IMCID imcID,
        !            86:     TNC_ConnectionID connectionID,
        !            87:     TNC_BufferReference message,
        !            88:     TNC_UInt32 messageLength,
        !            89:     TNC_MessageType messageType);
        !            90: typedef TNC_Result (*TNC_IMC_ReceiveMessageSOHPointer)(
        !            91:     TNC_IMCID imcID,
        !            92:     TNC_ConnectionID connectionID,
        !            93:     TNC_BufferReference sohrReportEntry,
        !            94:     TNC_UInt32 sohrRELength,
        !            95:     TNC_MessageType systemHealthID);
        !            96: typedef TNC_Result (*TNC_IMC_ReceiveMessageLongPointer)(
        !            97:     TNC_IMCID imcID,
        !            98:     TNC_ConnectionID connectionID,
        !            99:     TNC_UInt32 messageFlags,
        !           100:     TNC_BufferReference message,
        !           101:     TNC_UInt32 messageLength,
        !           102:     TNC_VendorID messageVendorID,
        !           103:     TNC_MessageSubtype messageSubtype,
        !           104:     TNC_UInt32 sourceIMVID,
        !           105:     TNC_UInt32 destinationIMCID);
        !           106: typedef TNC_Result (*TNC_IMC_BatchEndingPointer)(
        !           107:     TNC_IMCID imcID,
        !           108:     TNC_ConnectionID connectionID);
        !           109: typedef TNC_Result (*TNC_IMC_TerminatePointer)(
        !           110:     TNC_IMCID imcID);
        !           111: typedef TNC_Result (*TNC_TNCC_ReportMessageTypesPointer)(
        !           112:     TNC_IMCID imcID,
        !           113:     TNC_MessageTypeList supportedTypes,
        !           114:     TNC_UInt32 typeCount);
        !           115: typedef TNC_Result (*TNC_TNCC_ReportMessageTypesLongPointer)(
        !           116:     TNC_IMCID imcID,
        !           117:     TNC_VendorIDList supportedVendorIDs,
        !           118:     TNC_MessageSubtypeList supportedSubtypes,
        !           119:     TNC_UInt32 typeCount);
        !           120: typedef TNC_Result (*TNC_TNCC_SendMessagePointer)(
        !           121:     TNC_IMCID imcID,
        !           122:     TNC_ConnectionID connectionID,
        !           123:     TNC_BufferReference message,
        !           124:     TNC_UInt32 messageLength,
        !           125:     TNC_MessageType messageType);
        !           126: typedef TNC_Result (*TNC_TNCC_SendMessageSOHPointer)(
        !           127:     TNC_IMCID imcID,
        !           128:     TNC_ConnectionID connectionID,
        !           129:     TNC_BufferReference sohReportEntry,
        !           130:     TNC_UInt32 sohRELength);
        !           131: typedef TNC_Result (*TNC_TNCC_SendMessageLongPointer)(
        !           132:     TNC_IMCID imcID,
        !           133:     TNC_ConnectionID connectionID,
        !           134:     TNC_UInt32 messageFlags,
        !           135:     TNC_BufferReference message,
        !           136:     TNC_UInt32 messageLength,
        !           137:     TNC_VendorID messageVendorID,
        !           138:     TNC_MessageSubtype messageSubtype,
        !           139:     TNC_UInt32 destinationIMVID);
        !           140: typedef TNC_Result (*TNC_TNCC_RequestHandshakeRetryPointer)(
        !           141:     TNC_IMCID imcID,
        !           142:     TNC_ConnectionID connectionID,
        !           143:     TNC_RetryReason reason);
        !           144: typedef TNC_Result (*TNC_TNCC_GetAttributePointer)(
        !           145:     TNC_IMCID imcID,
        !           146:     TNC_ConnectionID connectionID,
        !           147:     TNC_AttributeID attributeID,
        !           148:     TNC_UInt32 bufferLength,
        !           149:     TNC_BufferReference buffer,
        !           150:     TNC_UInt32 *pOutValueLength);
        !           151: typedef TNC_Result (*TNC_TNCC_SetAttributePointer)(
        !           152:     TNC_IMCID imcID,
        !           153:     TNC_ConnectionID connectionID,
        !           154:     TNC_AttributeID attributeID,
        !           155:     TNC_UInt32 bufferLength,
        !           156:     TNC_BufferReference buffer);
        !           157: typedef TNC_Result (*TNC_TNCC_ReserveAdditionalIMCIDPointer)(
        !           158:     TNC_IMCID imcID,
        !           159:     TNC_UInt32 *pOutIMCID);
        !           160: typedef TNC_Result (*TNC_TNCC_BindFunctionPointer)(
        !           161:     TNC_IMCID imcID,
        !           162:     char *functionName,
        !           163:     void **pOutfunctionPointer);
        !           164: typedef TNC_Result (*TNC_IMC_ProvideBindFunctionPointer)(
        !           165:     TNC_IMCID imcID,
        !           166:     TNC_TNCC_BindFunctionPointer bindFunction);
        !           167: 
        !           168: /* Version Numbers */
        !           169: 
        !           170: #define TNC_IFIMC_VERSION_1 1
        !           171: 
        !           172: /* Handshake Retry Reason Values */
        !           173: 
        !           174: #define TNC_RETRY_REASON_IMC_REMEDIATION_COMPLETE 0
        !           175: #define TNC_RETRY_REASON_IMC_SERIOUS_EVENT 1
        !           176: #define TNC_RETRY_REASON_IMC_INFORMATIONAL_EVENT 2
        !           177: #define TNC_RETRY_REASON_IMC_PERIODIC 3
        !           178: /* reserved for TNC_RETRY_REASON_IMV_IMPORTANT_POLICY_CHANGE: 4 */
        !           179: /* reserved for TNC_RETRY_REASON_IMV_MINOR_POLICY_CHANGE: 5 */
        !           180: /* reserved for TNC_RETRY_REASON_IMV_SERIOUS_EVENT: 6 */
        !           181: /* reserved for TNC_RETRY_REASON_IMV_MINOR_EVENT: 7 */
        !           182: /* reserved for TNC_RETRY_REASON_IMV_PERIODIC: 8 */
        !           183: 
        !           184: /* Message Attribute ID Values */
        !           185: 
        !           186: #define TNC_ATTRIBUTEID_SOHR ((TNC_AttributeID) 0x00559708)
        !           187: #define TNC_ATTRIBUTEID_SSOHR ((TNC_AttributeID) 0x00559709)
        !           188: #define TNC_ATTRIBUTEID_PRIMARY_IMC_ID ((TNC_AttributeID) 0x00559711)
        !           189: 
        !           190: /* IMC Functions */
        !           191: 
        !           192: TNC_IMC_API TNC_Result TNC_IMC_Initialize(
        !           193: /*in*/  TNC_IMCID imcID,
        !           194: /*in*/  TNC_Version minVersion,
        !           195: /*in*/  TNC_Version maxVersion,
        !           196: /*out*/ TNC_Version *pOutActualVersion);
        !           197: 
        !           198: TNC_IMC_API TNC_Result TNC_IMC_NotifyConnectionChange(
        !           199: /*in*/  TNC_IMCID imcID,
        !           200: /*in*/  TNC_ConnectionID connectionID,
        !           201: /*in*/  TNC_ConnectionState newState);
        !           202: 
        !           203: TNC_IMC_API TNC_Result TNC_IMC_BeginHandshake(
        !           204: /*in*/  TNC_IMCID imcID,
        !           205: /*in*/  TNC_ConnectionID connectionID);
        !           206: 
        !           207: TNC_IMC_API TNC_Result TNC_IMC_ReceiveMessage(
        !           208: /*in*/  TNC_IMCID imcID,
        !           209: /*in*/  TNC_ConnectionID connectionID,
        !           210: /*in*/  TNC_BufferReference messageBuffer,
        !           211: /*in*/  TNC_UInt32 messageLength,
        !           212: /*in*/  TNC_MessageType messageType);
        !           213: 
        !           214: TNC_IMC_API TNC_Result TNC_IMC_ReceiveMessageSOH(
        !           215: /*in*/  TNC_IMCID imcID,
        !           216: /*in*/  TNC_ConnectionID connectionID,
        !           217: /*in*/  TNC_BufferReference sohrReportEntry,
        !           218: /*in*/  TNC_UInt32 sohrRELength,
        !           219: /*in*/  TNC_MessageType systemHealthID);
        !           220: 
        !           221: TNC_IMC_API TNC_Result TNC_IMC_ReceiveMessageLong(
        !           222: /*in*/  TNC_IMCID imcID,
        !           223: /*in*/  TNC_ConnectionID connectionID,
        !           224: /*in*/  TNC_UInt32 messageFlags,
        !           225: /*in*/  TNC_BufferReference message,
        !           226: /*in*/  TNC_UInt32 messageLength,
        !           227: /*in*/  TNC_VendorID messageVendorID,
        !           228: /*in*/  TNC_MessageSubtype messageSubtype,
        !           229: /*in*/  TNC_UInt32 sourceIMVID,
        !           230: /*in*/  TNC_UInt32 destinationIMCID);
        !           231: 
        !           232: TNC_IMC_API TNC_Result TNC_IMC_BatchEnding(
        !           233: /*in*/  TNC_IMCID imcID,
        !           234: /*in*/  TNC_ConnectionID connectionID);
        !           235: 
        !           236: TNC_IMC_API TNC_Result TNC_IMC_Terminate(
        !           237: /*in*/  TNC_IMCID imcID);
        !           238: 
        !           239: TNC_IMC_API TNC_Result TNC_IMC_ProvideBindFunction(
        !           240: /*in*/  TNC_IMCID imcID,
        !           241: /*in*/  TNC_TNCC_BindFunctionPointer bindFunction);
        !           242: 
        !           243: /* TNC Client Functions */
        !           244: 
        !           245: TNC_Result TNC_TNCC_ReportMessageTypes(
        !           246: /*in*/  TNC_IMCID imcID,
        !           247: /*in*/  TNC_MessageTypeList supportedTypes,
        !           248: /*in*/  TNC_UInt32 typeCount);
        !           249: 
        !           250: TNC_Result TNC_TNCC_ReportMessageTypesLong(
        !           251: /*in*/  TNC_IMCID imcID,
        !           252: /*in*/  TNC_VendorIDList supportedVendorIDs,
        !           253: /*in*/  TNC_MessageSubtypeList supportedSubtypes,
        !           254: /*in*/  TNC_UInt32 typeCount);
        !           255: 
        !           256: TNC_Result TNC_TNCC_SendMessage(
        !           257: /*in*/  TNC_IMCID imcID,
        !           258: /*in*/  TNC_ConnectionID connectionID,
        !           259: /*in*/  TNC_BufferReference message,
        !           260: /*in*/  TNC_UInt32 messageLength,
        !           261: /*in*/  TNC_MessageType messageType);
        !           262: 
        !           263: TNC_Result TNC_TNCC_SendMessageSOH(
        !           264: /*in*/  TNC_IMCID imcID,
        !           265: /*in*/  TNC_ConnectionID connectionID,
        !           266: /*in*/  TNC_BufferReference sohReportEntry,
        !           267: /*in*/  TNC_UInt32 sohRELength);
        !           268: 
        !           269: TNC_Result TNC_TNCC_SendMessageLong(
        !           270: /*in*/  TNC_IMCID imcID,
        !           271: /*in*/  TNC_ConnectionID connectionID,
        !           272: /*in*/  TNC_UInt32 messageFlags,
        !           273: /*in*/  TNC_BufferReference message,
        !           274: /*in*/  TNC_UInt32 messageLength,
        !           275: /*in*/  TNC_VendorID messageVendorID,
        !           276: /*in*/  TNC_MessageSubtype messageSubtype,
        !           277: /*in*/  TNC_UInt32 destinationIMVID);
        !           278: TNC_Result TNC_TNCC_RequestHandshakeRetry(
        !           279: /*in*/  TNC_IMCID imcID,
        !           280: /*in*/  TNC_ConnectionID connectionID,
        !           281: /*in*/  TNC_RetryReason reason);
        !           282: 
        !           283: TNC_Result TNC_TNCC_GetAttribute(
        !           284: /*in*/  TNC_IMCID imcID,
        !           285: /*in*/  TNC_ConnectionID connectionID,
        !           286: /*in*/  TNC_AttributeID attributeID,
        !           287: /*in*/  TNC_UInt32 bufferLength,
        !           288: /*out*/ TNC_BufferReference buffer,
        !           289: /*out*/ TNC_UInt32 *pOutValueLength);
        !           290: 
        !           291: TNC_Result TNC_TNCC_SetAttribute(
        !           292: /*in*/  TNC_IMCID imcID,
        !           293: /*in*/  TNC_ConnectionID connectionID,
        !           294: /*in*/  TNC_AttributeID attributeID,
        !           295: /*in*/  TNC_UInt32 bufferLength,
        !           296: /*in*/  TNC_BufferReference buffer);
        !           297: 
        !           298: TNC_Result TNC_TNCS_ReserveAdditionalIMCID(
        !           299: /*in*/  TNC_IMCID imcID,
        !           300: /*out*/ TNC_UInt32 *pOutIMCID);
        !           301: 
        !           302: TNC_Result TNC_TNCC_BindFunction(
        !           303: /*in*/  TNC_IMCID imcID,
        !           304: /*in*/  char *functionName,
        !           305: /*out*/ void **pOutfunctionPointer);
        !           306: 
        !           307: #endif /** TNCIFIMC_H_ @}*/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>