3 * Trusted Network Connect IF-IMC API version 1.20 Revision 8
4 * Microsoft Windows DLL Platform Binding C Header
7 * Copyright(c) 2005-2007, Trusted Computing Group, Inc. All rights
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * - Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * - 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
19 * - 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
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.
37 * Contact the Trusted Computing Group at
38 * admin@trustedcomputinggroup.org for information on specification
39 * licensing through membership agreements.
41 * Any marks and brands contained herein are the property of their
47 * @defgroup tncifimc tncifimc
58 typedef TNC_UInt32 TNC_IMCID
;
60 /* Function pointers */
62 typedef TNC_Result (*TNC_IMC_InitializePointer
)(
64 TNC_Version minVersion
,
65 TNC_Version maxVersion
,
66 TNC_Version
*pOutActualVersion
);
67 typedef TNC_Result (*TNC_IMC_NotifyConnectionChangePointer
)(
69 TNC_ConnectionID connectionID
,
70 TNC_ConnectionState newState
);
71 typedef TNC_Result (*TNC_IMC_BeginHandshakePointer
)(
73 TNC_ConnectionID connectionID
);
74 typedef TNC_Result (*TNC_IMC_ReceiveMessagePointer
)(
76 TNC_ConnectionID connectionID
,
77 TNC_BufferReference message
,
78 TNC_UInt32 messageLength
,
79 TNC_MessageType messageType
);
80 typedef TNC_Result (*TNC_IMC_BatchEndingPointer
)(
82 TNC_ConnectionID connectionID
);
83 typedef TNC_Result (*TNC_IMC_TerminatePointer
)(
85 typedef TNC_Result (*TNC_TNCC_ReportMessageTypesPointer
)(
87 TNC_MessageTypeList supportedTypes
,
88 TNC_UInt32 typeCount
);
89 typedef TNC_Result (*TNC_TNCC_SendMessagePointer
)(
91 TNC_ConnectionID connectionID
,
92 TNC_BufferReference message
,
93 TNC_UInt32 messageLength
,
94 TNC_MessageType messageType
);
95 typedef TNC_Result (*TNC_TNCC_RequestHandshakeRetryPointer
)(
97 TNC_ConnectionID connectionID
,
98 TNC_RetryReason reason
);
99 typedef TNC_Result (*TNC_TNCC_BindFunctionPointer
)(
102 void **pOutfunctionPointer
);
103 typedef TNC_Result (*TNC_IMC_ProvideBindFunctionPointer
)(
105 TNC_TNCC_BindFunctionPointer bindFunction
);
107 #define TNC_IFIMC_VERSION_1 1
109 /* Handshake Retry Reason Values */
111 #define TNC_RETRY_REASON_IMC_REMEDIATION_COMPLETE 0
112 #define TNC_RETRY_REASON_IMC_SERIOUS_EVENT 1
113 #define TNC_RETRY_REASON_IMC_INFORMATIONAL_EVENT 2
114 #define TNC_RETRY_REASON_IMC_PERIODIC 3
115 /* reserved for TNC_RETRY_REASON_IMV_IMPORTANT_POLICY_CHANGE: 4 */
116 /* reserved for TNC_RETRY_REASON_IMV_MINOR_POLICY_CHANGE: 5 */
117 /* reserved for TNC_RETRY_REASON_IMV_SERIOUS_EVENT: 6 */
118 /* reserved for TNC_RETRY_REASON_IMV_MINOR_EVENT: 7 */
119 /* reserved for TNC_RETRY_REASON_IMV_PERIODIC: 8 */
123 TNC_Result
TNC_IMC_Initialize(
124 /*in*/ TNC_IMCID imcID
,
125 /*in*/ TNC_Version minVersion
,
126 /*in*/ TNC_Version maxVersion
,
127 /*out*/ TNC_Version
*pOutActualVersion
);
129 TNC_Result
TNC_IMC_NotifyConnectionChange(
130 /*in*/ TNC_IMCID imcID
,
131 /*in*/ TNC_ConnectionID connectionID
,
132 /*in*/ TNC_ConnectionState newState
);
134 TNC_Result
TNC_IMC_BeginHandshake(
135 /*in*/ TNC_IMCID imcID
,
136 /*in*/ TNC_ConnectionID connectionID
);
138 TNC_Result
TNC_IMC_ReceiveMessage(
139 /*in*/ TNC_IMCID imcID
,
140 /*in*/ TNC_ConnectionID connectionID
,
141 /*in*/ TNC_BufferReference messageBuffer
,
142 /*in*/ TNC_UInt32 messageLength
,
143 /*in*/ TNC_MessageType messageType
);
145 TNC_Result
TNC_IMC_BatchEnding(
146 /*in*/ TNC_IMCID imcID
,
147 /*in*/ TNC_ConnectionID connectionID
);
149 TNC_Result
TNC_IMC_Terminate(
150 /*in*/ TNC_IMCID imcID
);
152 TNC_Result
TNC_IMC_ProvideBindFunction(
153 /*in*/ TNC_IMCID imcID
,
154 /*in*/ TNC_TNCC_BindFunctionPointer bindFunction
);
156 /* TNC Client Functions */
158 TNC_Result
TNC_TNCC_ReportMessageTypes(
159 /*in*/ TNC_IMCID imcID
,
160 /*in*/ TNC_MessageTypeList supportedTypes
,
161 /*in*/ TNC_UInt32 typeCount
);
163 TNC_Result
TNC_TNCC_SendMessage(
164 /*in*/ TNC_IMCID imcID
,
165 /*in*/ TNC_ConnectionID connectionID
,
166 /*in*/ TNC_BufferReference message
,
167 /*in*/ TNC_UInt32 messageLength
,
168 /*in*/ TNC_MessageType messageType
);
170 TNC_Result
TNC_TNCC_RequestHandshakeRetry(
171 /*in*/ TNC_IMCID imcID
,
172 /*in*/ TNC_ConnectionID connectionID
,
173 /*in*/ TNC_RetryReason reason
);
175 TNC_Result
TNC_TNCC_BindFunction(
176 /*in*/ TNC_IMCID imcID
,
177 /*in*/ char *functionName
,
178 /*out*/ void **pOutfunctionPointer
);
180 #endif /** TNCIFIMC_H_ @}*/