tncif.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /* tncif.h
  2. *
  3. * Trusted Network Connect IF-IMC/IMV API version 1.30
  4. * Microsoft Windows DLL Platform Binding C Header
  5. * October 14, 2011
  6. *
  7. * Common definitions for IF-IMC and IF-IMV
  8. * extracted from tncifimc.h and tncifimv.h
  9. *
  10. * Copyright(c) 2005-2011, Trusted Computing Group, Inc. All rights
  11. * reserved.
  12. *
  13. * Redistribution and use in source and binary forms, with or without
  14. * modification, are permitted provided that the following conditions
  15. * are met:
  16. * o Redistributions of source code must retain the above copyright
  17. * notice, this list of conditions and the following disclaimer.
  18. * o Redistributions in binary form must reproduce the above copyright
  19. * notice, this list of conditions and the following disclaimer in
  20. * the documentation and/or other materials provided with the
  21. * distribution.
  22. * o Neither the name of the Trusted Computing Group nor the names of
  23. * its contributors may be used to endorse or promote products
  24. * derived from this software without specific prior written
  25. * permission.
  26. *
  27. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  28. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  29. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  30. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  31. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  32. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  33. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  34. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  35. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  36. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  37. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  38. * POSSIBILITY OF SUCH DAMAGE.
  39. *
  40. * Contact the Trusted Computing Group at
  41. * admin@trustedcomputinggroup.org for information on specification
  42. * licensing through membership agreements.
  43. *
  44. * Any marks and brands contained herein are the property of their
  45. * respective owners.
  46. *
  47. */
  48. /**
  49. * @defgroup tncif tncif
  50. * @{ @ingroup libtncif
  51. */
  52. #ifndef TNCIF_H_
  53. #define TNCIF_H_
  54. /* Basic Types */
  55. typedef unsigned long TNC_UInt32;
  56. typedef unsigned char *TNC_BufferReference;
  57. /* Derived Types */
  58. typedef TNC_UInt32 TNC_ConnectionID;
  59. typedef TNC_UInt32 TNC_ConnectionState;
  60. typedef TNC_UInt32 TNC_RetryReason;
  61. typedef TNC_UInt32 TNC_MessageType;
  62. typedef TNC_MessageType *TNC_MessageTypeList;
  63. typedef TNC_UInt32 TNC_VendorID;
  64. typedef TNC_VendorID *TNC_VendorIDList;
  65. typedef TNC_UInt32 TNC_MessageSubtype;
  66. typedef TNC_MessageSubtype *TNC_MessageSubtypeList;
  67. typedef TNC_UInt32 TNC_Version;
  68. typedef TNC_UInt32 TNC_Result;
  69. typedef TNC_UInt32 TNC_AttributeID;
  70. /* Result Codes */
  71. #define TNC_RESULT_SUCCESS 0
  72. #define TNC_RESULT_NOT_INITIALIZED 1
  73. #define TNC_RESULT_ALREADY_INITIALIZED 2
  74. #define TNC_RESULT_NO_COMMON_VERSION 3
  75. #define TNC_RESULT_CANT_RETRY 4
  76. #define TNC_RESULT_WONT_RETRY 5
  77. #define TNC_RESULT_INVALID_PARAMETER 6
  78. #define TNC_RESULT_CANT_RESPOND 7
  79. #define TNC_RESULT_ILLEGAL_OPERATION 8
  80. #define TNC_RESULT_OTHER 9
  81. #define TNC_RESULT_FATAL 10
  82. #define TNC_RESULT_EXCEEDED_MAX_ROUND_TRIPS 0x00559700
  83. #define TNC_RESULT_EXCEEDED_MAX_MESSAGE_SIZE 0x00559701
  84. #define TNC_RESULT_NO_LONG_MESSAGE_TYPES 0x00559702
  85. #define TNC_RESULT_NO_SOH_SUPPORT 0x00559703
  86. /* Network Connection ID Values */
  87. #define TNC_CONNECTIONID_ANY 0xFFFFFFFF
  88. /* Network Connection State Values */
  89. #define TNC_CONNECTION_STATE_CREATE 0
  90. #define TNC_CONNECTION_STATE_HANDSHAKE 1
  91. #define TNC_CONNECTION_STATE_ACCESS_ALLOWED 2
  92. #define TNC_CONNECTION_STATE_ACCESS_ISOLATED 3
  93. #define TNC_CONNECTION_STATE_ACCESS_NONE 4
  94. #define TNC_CONNECTION_STATE_DELETE 5
  95. /* IMC/IMV ID Values */
  96. #define TNC_IMVID_ANY ((TNC_UInt32) 0xffff)
  97. #define TNC_IMCID_ANY ((TNC_UInt32) 0xffff)
  98. /* Vendor ID Values */
  99. #define TNC_VENDORID_TCG 0
  100. #define TNC_VENDORID_TCG_NEW 0x005597
  101. #define TNC_VENDORID_ANY ((TNC_VendorID) 0xffffff)
  102. /* Message Subtype Values */
  103. #define TNC_SUBTYPE_ANY ((TNC_MessageSubtype) 0xff)
  104. /* Message Flags Values */
  105. #define TNC_MESSAGE_FLAGS_EXCLUSIVE ((TNC_UInt32) 0x80000000)
  106. /* Message Attribute ID Values */
  107. #define TNC_ATTRIBUTEID_PREFERRED_LANGUAGE ((TNC_AttributeID) 0x00000001)
  108. #define TNC_ATTRIBUTEID_MAX_ROUND_TRIPS ((TNC_AttributeID) 0x00559700)
  109. #define TNC_ATTRIBUTEID_MAX_MESSAGE_SIZE ((TNC_AttributeID) 0x00559701)
  110. #define TNC_ATTRIBUTEID_DHPN ((TNC_AttributeID) 0x00559702)
  111. #define TNC_ATTRIBUTEID_HAS_LONG_TYPES ((TNC_AttributeID) 0x00559703)
  112. #define TNC_ATTRIBUTEID_HAS_EXCLUSIVE ((TNC_AttributeID) 0x00559704)
  113. #define TNC_ATTRIBUTEID_HAS_SOH ((TNC_AttributeID) 0x00559705)
  114. #define TNC_ATTRIBUTEID_IFTNCCS_PROTOCOL ((TNC_AttributeID) 0x0055970A)
  115. #define TNC_ATTRIBUTEID_IFTNCCS_VERSION ((TNC_AttributeID) 0x0055970B)
  116. #define TNC_ATTRIBUTEID_IFT_PROTOCOL ((TNC_AttributeID) 0x0055970C)
  117. #define TNC_ATTRIBUTEID_IFT_VERSION ((TNC_AttributeID) 0x0055970D)
  118. #define TNC_ATTRIBUTEID_TLS_UNIQUE ((TNC_AttributeID) 0x0055970E)
  119. #endif /** TNCIF_H_ @}*/