wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
tnc.h
Go to the documentation of this file.
1 
5 #ifndef TNC_H
6 #define TNC_H
7 
8 typedef unsigned long TNC_UInt32;
9 typedef unsigned char *TNC_BufferReference;
10 
11 typedef TNC_UInt32 TNC_IMVID;
12 typedef TNC_UInt32 TNC_IMCID;
13 typedef TNC_UInt32 TNC_ConnectionID;
14 typedef TNC_UInt32 TNC_ConnectionState;
15 typedef TNC_UInt32 TNC_RetryReason;
16 typedef TNC_UInt32 TNC_IMV_Action_Recommendation;
17 typedef TNC_UInt32 TNC_IMV_Evaluation_Result;
18 typedef TNC_UInt32 TNC_MessageType;
19 typedef TNC_MessageType *TNC_MessageTypeList;
20 typedef TNC_UInt32 TNC_VendorID;
21 typedef TNC_UInt32 TNC_Subtype;
22 typedef TNC_UInt32 TNC_MessageSubtype;
23 typedef TNC_UInt32 TNC_Version;
24 typedef TNC_UInt32 TNC_Result;
25 typedef TNC_UInt32 TNC_AttributeID;
26 
27 typedef TNC_Result (*TNC_TNCS_BindFunctionPointer)(
28  TNC_IMVID imvID,
29  char *functionName,
30  void **pOutfunctionPointer);
31 typedef TNC_Result (*TNC_TNCS_ReportMessageTypesPointer)(
32  TNC_IMVID imvID,
33  TNC_MessageTypeList supportedTypes,
34  TNC_UInt32 typeCount);
35 typedef TNC_Result (*TNC_TNCS_SendMessagePointer)(
36  TNC_IMVID imvID,
37  TNC_ConnectionID connectionID,
38  TNC_BufferReference message,
39  TNC_UInt32 messageLength,
40  TNC_MessageType messageType);
41 typedef TNC_Result (*TNC_TNCS_RequestHandshakeRetryPointer)(
42  TNC_IMVID imvID,
43  TNC_ConnectionID connectionID,
44  TNC_RetryReason reason);
45 typedef TNC_Result (*TNC_TNCS_ProvideRecommendationPointer)(
46  TNC_IMVID imvID,
47  TNC_ConnectionID connectionID,
48  TNC_IMV_Action_Recommendation recommendation,
49  TNC_IMV_Evaluation_Result evaluation);
50 typedef TNC_Result (*TNC_TNCC_BindFunctionPointer)(
51  TNC_IMCID imcID,
52  char *functionName,
53  void **pOutfunctionPointer);
54 typedef TNC_Result (*TNC_TNCC_SendMessagePointer)(
55  TNC_IMCID imcID,
56  TNC_ConnectionID connectionID,
57  TNC_BufferReference message,
58  TNC_UInt32 messageLength,
59  TNC_MessageType messageType);
60 typedef TNC_Result (*TNC_TNCC_ReportMessageTypesPointer)(
61  TNC_IMCID imcID,
62  TNC_MessageTypeList supportedTypes,
63  TNC_UInt32 typeCount);
64 typedef TNC_Result (*TNC_TNCC_RequestHandshakeRetryPointer)(
65  TNC_IMCID imcID,
66  TNC_ConnectionID connectionID,
67  TNC_RetryReason reason);
68 
69 #define TNC_IFIMV_VERSION_1 1
70 #define TNC_IFIMC_VERSION_1 1
71 
72 #define TNC_RESULT_SUCCESS 0
73 #define TNC_RESULT_NOT_INITIALIZED 1
74 #define TNC_RESULT_ALREADY_INITIALIZED 2
75 #define TNC_RESULT_NO_COMMON_VERSION 3
76 #define TNC_RESULT_CANT_RETRY 4
77 #define TNC_RESULT_WONT_RETRY 5
78 #define TNC_RESULT_INVALID_PARAMETER 6
79 #define TNC_RESULT_CANT_RESPOND 7
80 #define TNC_RESULT_ILLEGAL_OPERATION 8
81 #define TNC_RESULT_OTHER 9
82 #define TNC_RESULT_FATAL 10
83 
84 #define TNC_CONNECTION_STATE_CREATE 0
85 #define TNC_CONNECTION_STATE_HANDSHAKE 1
86 #define TNC_CONNECTION_STATE_ACCESS_ALLOWED 2
87 #define TNC_CONNECTION_STATE_ACCESS_ISOLATED 3
88 #define TNC_CONNECTION_STATE_ACCESS_NONE 4
89 #define TNC_CONNECTION_STATE_DELETE 5
90 
91 #define TNC_VENDORID_ANY ((TNC_VendorID) 0xffffff)
92 #define TNC_SUBTYPE_ANY ((TNC_Subtype) 0xff)
93 
94 /* TNCC-TNCS Message Types */
95 #define TNC_TNCCS_RECOMMENDATION 0x00000001
96 #define TNC_TNCCS_ERROR 0x00000002
97 #define TNC_TNCCS_PREFERREDLANGUAGE 0x00000003
98 #define TNC_TNCCS_REASONSTRINGS 0x00000004
99 
100 /* Possible TNC_IMV_Action_Recommendation values: */
101 enum IMV_Action_Recommendation {
102  TNC_IMV_ACTION_RECOMMENDATION_ALLOW,
103  TNC_IMV_ACTION_RECOMMENDATION_NO_ACCESS,
104  TNC_IMV_ACTION_RECOMMENDATION_ISOLATE,
105  TNC_IMV_ACTION_RECOMMENDATION_NO_RECOMMENDATION
106 };
107 
108 /* Possible TNC_IMV_Evaluation_Result values: */
109 enum IMV_Evaluation_Result {
110  TNC_IMV_EVALUATION_RESULT_COMPLIANT,
111  TNC_IMV_EVALUATION_RESULT_NONCOMPLIANT_MINOR,
112  TNC_IMV_EVALUATION_RESULT_NONCOMPLIANT_MAJOR,
113  TNC_IMV_EVALUATION_RESULT_ERROR,
114  TNC_IMV_EVALUATION_RESULT_DONT_KNOW
115 };
116 
117 #endif /* TNC_H */