source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/authif.h

Last change on this file was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 5.8 KB
RevLine 
[1166]1/**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5
6#include <winapifamily.h>
7
8#ifndef _AUTHIF_H_
9#define _AUTHIF_H_
10
11#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
12typedef enum _RADIUS_ATTRIBUTE_TYPE {
13 ratMinimum = 0,
14 ratUserName = 1,
15 ratUserPassword = 2,
16 ratCHAPPassword = 3,
17 ratNASIPAddress = 4,
18 ratNASPort = 5,
19 ratServiceType = 6,
20 ratFramedProtocol = 7,
21 ratFramedIPAddress = 8,
22 ratFramedIPNetmask = 9,
23 ratFramedRouting = 10,
24 ratFilterId = 11,
25 ratFramedMTU = 12,
26 ratFramedCompression = 13,
27 ratLoginIPHost = 14,
28 ratLoginService = 15,
29 ratLoginPort = 16,
30 ratReplyMessage = 18,
31 ratCallbackNumber = 19,
32 ratCallbackId = 20,
33 ratFramedRoute = 22,
34 ratFramedIPXNetwork = 23,
35 ratState = 24,
36 ratClass = 25,
37 ratVendorSpecific = 26,
38 ratSessionTimeout = 27,
39 ratIdleTimeout = 28,
40 ratTerminationAction = 29,
41 ratCalledStationId = 30,
42 ratCallingStationId = 31,
43 ratNASIdentifier = 32,
44 ratProxyState = 33,
45 ratLoginLATService = 34,
46 ratLoginLATNode = 35,
47 ratLoginLATGroup = 36,
48 ratFramedAppleTalkLink = 37,
49 ratFramedAppleTalkNetwork = 38,
50 ratFramedAppleTalkZone = 39,
51 ratAcctStatusType = 40,
52 ratAcctDelayTime = 41,
53 ratAcctInputOctets = 42,
54 ratAcctOutputOctets = 43,
55 ratAcctSessionId = 44,
56 ratAcctAuthentic = 45,
57 ratAcctSessionTime = 46,
58 ratAcctInputPackets = 47,
59 ratAcctOutputPackets = 48,
60 ratAcctTerminationCause = 49,
61 ratCHAPChallenge = 60,
62 ratNASPortType = 61,
63 ratPortLimit = 62,
64 ratTunnelType = 64,
65 ratMediumType = 65,
66 ratTunnelPassword = 69,
67 ratTunnelPrivateGroupID = 81,
68 ratNASIPv6Address = 95,
69 ratFramedInterfaceId,
70 ratFramedIPv6Prefix,
71 ratLoginIPv6Host,
72 ratFramedIPv6Route,
73 ratFramedIPv6Pool,
74 ratCode = 262,
75 ratIdentifier = 263,
76 ratAuthenticator = 264,
77 ratSrcIPAddress = 265,
78 ratSrcPort = 266,
79 ratProvider = 267,
80 ratStrippedUserName = 268,
81 ratFQUserName = 269,
82 ratPolicyName = 270,
83 ratUniqueId = 271,
84 ratExtensionState = 272,
85 ratEAPTLV = 273,
86 ratRejectReasonCode = 274,
87 ratCRPPolicyName = 275,
88 ratProviderName = 276,
89 ratClearTextPassword = 277,
90 ratSrcIPv6Address = 278
91} RADIUS_ATTRIBUTE_TYPE;
92
93typedef enum _RADIUS_CODE {
94 rcUnknown = 0,
95 rcAccessRequest = 1,
96 rcAccessAccept = 2,
97 rcAccessReject = 3,
98 rcAccountingRequest = 4,
99 rcAccountingResponse = 5,
100 rcAccessChallenge = 11,
101 rcDiscard = 256
102} RADIUS_CODE;
103
104typedef enum _RADIUS_AUTHENTICATION_PROVIDER {
105 rapUnknown,
106 rapUsersFile,
107 rapProxy,
108 rapWindowsNT,
109 rapMCIS,
110 rapODBC,
111 rapNone
112} RADIUS_AUTHENTICATION_PROVIDER;
113typedef enum _RADIUS_REJECT_REASON_CODE {
114 rrrcUndefined = 0,
115 rrrcAccountUnknown = 1,
116 rrrcAccountDisabled = 2,
117 rrrcAccountExpired = 3,
118 rrrcAuthenticationFailure = 4
119} RADIUS_REJECT_REASON_CODE;
120
121typedef enum _RADIUS_DATA_TYPE {
122 rdtUnknown,
123 rdtString,
124 rdtAddress,
125 rdtInteger,
126 rdtTime,
127 rdtIpv6Address
128} RADIUS_DATA_TYPE;
129
130typedef struct _RADIUS_ATTRIBUTE {
131 DWORD dwAttrType;
132 RADIUS_DATA_TYPE fDataType;
133 DWORD cbDataLength;
134 __C89_NAMELESS union {
135 DWORD dwValue;
136 CONST BYTE *lpValue;
137 };
138} RADIUS_ATTRIBUTE,*PRADIUS_ATTRIBUTE;
139
140typedef struct _RADIUS_VSA_FORMAT {
141 BYTE VendorId[4];
142 BYTE VendorType;
143 BYTE VendorLength;
144 BYTE AttributeSpecific[1];
145} RADIUS_VSA_FORMAT;
146
147typedef enum _RADIUS_ACTION {
148 raContinue,
149 raReject,
150 raAccept
151} RADIUS_ACTION,*PRADIUS_ACTION;
152
153#define RADIUS_EXTENSION_INIT "RadiusExtensionInit"
154#define RADIUS_EXTENSION_TERM "RadiusExtensionTerm"
155#define RADIUS_EXTENSION_PROCESS "RadiusExtensionProcess"
156#define RADIUS_EXTENSION_PROCESS_EX "RadiusExtensionProcessEx"
157#define RADIUS_EXTENSION_FREE_ATTRIBUTES "RadiusExtensionFreeAttributes"
158#define RADIUS_EXTENSION_PROCESS2 "RadiusExtensionProcess2"
159
160typedef DWORD (WINAPI *PRADIUS_EXTENSION_INIT) (VOID);
161typedef VOID (WINAPI *PRADIUS_EXTENSION_TERM) (VOID);
162typedef DWORD (WINAPI *PRADIUS_EXTENSION_PROCESS) (const RADIUS_ATTRIBUTE *pAttrs, PRADIUS_ACTION pfAction);
163typedef DWORD (WINAPI *PRADIUS_EXTENSION_PROCESS_EX) (const RADIUS_ATTRIBUTE *pInAttrs, PRADIUS_ATTRIBUTE *pOutAttrs, PRADIUS_ACTION pfAction);
164typedef VOID (WINAPI *PRADIUS_EXTENSION_FREE_ATTRIBUTES) (PRADIUS_ATTRIBUTE pAttrs);
165
166#define AUTHSRV_PARAMETERS_KEY_W L"System\\CurrentControlSet\\Services\\AuthSrv\\Parameters"
167#define AUTHSRV_EXTENSIONS_VALUE_W L"ExtensionDLLs"
168#define AUTHSRV_AUTHORIZATION_VALUE_W L"AuthorizationDLLs"
169
170#define RADIUS_EXTENSION_VERSION (1)
171
172typedef enum _RADIUS_EXTENSION_POINT {
173 repAuthentication,
174 repAuthorization
175} RADIUS_EXTENSION_POINT;
176
177typedef struct _RADIUS_ATTRIBUTE_ARRAY {
178 DWORD cbSize;
179 DWORD (WINAPI *Add) (struct _RADIUS_ATTRIBUTE_ARRAY *_This, const RADIUS_ATTRIBUTE *pAttr);
180 const RADIUS_ATTRIBUTE *(WINAPI *AttributeAt) (const struct _RADIUS_ATTRIBUTE_ARRAY *_This, DWORD dwIndex);
181 DWORD (WINAPI *GetSize) (const struct _RADIUS_ATTRIBUTE_ARRAY *_This);
182 DWORD (WINAPI *InsertAt) (struct _RADIUS_ATTRIBUTE_ARRAY *_This, DWORD dwIndex, const RADIUS_ATTRIBUTE *pAttr);
183 DWORD (WINAPI *RemoveAt) (struct _RADIUS_ATTRIBUTE_ARRAY *_This, DWORD dwIndex);
184 DWORD (WINAPI *SetAt) (struct _RADIUS_ATTRIBUTE_ARRAY *_This, DWORD dwIndex, const RADIUS_ATTRIBUTE *pAttr);
185} RADIUS_ATTRIBUTE_ARRAY,*PRADIUS_ATTRIBUTE_ARRAY;
186
187typedef struct _RADIUS_EXTENSION_CONTROL_BLOCK {
188 DWORD cbSize;
189 DWORD dwVersion;
190 RADIUS_EXTENSION_POINT repPoint;
191 RADIUS_CODE rcRequestType;
192 RADIUS_CODE rcResponseType;
193 PRADIUS_ATTRIBUTE_ARRAY (WINAPI *GetRequest) (struct _RADIUS_EXTENSION_CONTROL_BLOCK *This);
194 PRADIUS_ATTRIBUTE_ARRAY (WINAPI *GetResponse) (struct _RADIUS_EXTENSION_CONTROL_BLOCK *This, RADIUS_CODE rcResponseType);
195 DWORD (WINAPI *SetResponseType) (struct _RADIUS_EXTENSION_CONTROL_BLOCK *This, RADIUS_CODE rcResponseType);
196} RADIUS_EXTENSION_CONTROL_BLOCK,*PRADIUS_EXTENSION_CONTROL_BLOCK;
197
198typedef DWORD (WINAPI *PRADIUS_EXTENSION_PROCESS_2) (PRADIUS_EXTENSION_CONTROL_BLOCK pECB);
199
200#endif
201
202#endif
Note: See TracBrowser for help on using the repository browser.