separated tncif_names from standard TCG TNC header files
[strongswan.git] / src / libtncif / tncif.h
1 /* tncif.h
2 *
3 * Trusted Network Connect IF-IMV API version 1.20
4 * Microsoft Windows DLL Platform Binding C Header
5 * February 5, 2007
6 *
7 * Copyright(c) 2005-2007, 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 * - 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
18 * distribution.
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
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 * Trusted Network Connect IF-IMC/IF-IMV API version 1.00 Revision 3
45 * Microsoft Windows DLL Platform Binding C Header
46 * Common definitions for IF-IMC and IF-IMV
47 * extracted from tncifimc.h and tncifimv.h
48 * Feb 12, 2007
49 */
50
51 #ifndef TNCIF_H_
52 #define TNCIF_H_
53
54 /* Basic Types */
55 typedef unsigned long TNC_UInt32;
56 typedef unsigned char *TNC_BufferReference;
57
58 /* Derived Types */
59 typedef TNC_UInt32 TNC_ConnectionID;
60 typedef TNC_UInt32 TNC_ConnectionState;
61 typedef TNC_UInt32 TNC_RetryReason;
62 typedef TNC_UInt32 TNC_MessageType;
63 typedef TNC_MessageType *TNC_MessageTypeList;
64 typedef TNC_UInt32 TNC_VendorID;
65 typedef TNC_UInt32 TNC_MessageSubtype;
66 typedef TNC_UInt32 TNC_Version;
67 typedef TNC_UInt32 TNC_Result;
68
69 /* Result Codes */
70 #define TNC_RESULT_SUCCESS 0
71 #define TNC_RESULT_NOT_INITIALIZED 1
72 #define TNC_RESULT_ALREADY_INITIALIZED 2
73 #define TNC_RESULT_NO_COMMON_VERSION 3
74 #define TNC_RESULT_CANT_RETRY 4
75 #define TNC_RESULT_WONT_RETRY 5
76 #define TNC_RESULT_INVALID_PARAMETER 6
77 #define TNC_RESULT_CANT_RESPOND 7
78 #define TNC_RESULT_ILLEGAL_OPERATION 8
79 #define TNC_RESULT_OTHER 9
80 #define TNC_RESULT_FATAL 10
81
82 /* Network Connection ID Values */
83 #define TNC_CONNECTIONID_ANY 0xFFFFFFFF
84
85 /* Network Connection State Values */
86 #define TNC_CONNECTION_STATE_CREATE 0
87 #define TNC_CONNECTION_STATE_HANDSHAKE 1
88 #define TNC_CONNECTION_STATE_ACCESS_ALLOWED 2
89 #define TNC_CONNECTION_STATE_ACCESS_ISOLATED 3
90 #define TNC_CONNECTION_STATE_ACCESS_NONE 4
91 #define TNC_CONNECTION_STATE_DELETE 5
92
93 /* Vendor ID Values */
94 #define TNC_VENDORID_TCG 0
95 #define TNC_VENDORID_ANY ((TNC_VendorID) 0xffffff)
96 /* Message Subtype Values */
97 #define TNC_SUBTYPE_ANY ((TNC_MessageSubtype) 0xff)
98
99 #endif /** TNCIF_H_ @}*/