Revert "s4: Let the "setpassword" script finally use the "samdb_set_password" routine"
[Samba/aatanasov.git] / librpc / gen_ndr / ntlmssp.h
blob45099159749136684fa25c607c8dd68cef612719
1 /* header auto-generated by pidl */
3 #include <stdint.h>
5 #include "libcli/util/ntstatus.h"
7 #ifndef _HEADER_ntlmssp
8 #define _HEADER_ntlmssp
10 #define NTLMSSP_NEGOTIATE_NTLM2 ( NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY )
11 #define NTLMSSP_SIGN_VERSION ( 0x01 )
12 #define NTLMSSP_SIG_SIZE ( 16 )
13 enum ntlmssp_MessageType
14 #ifndef USE_UINT_ENUMS
16 NtLmNegotiate=0x00000001,
17 NtLmChallenge=0x00000002,
18 NtLmAuthenticate=0x00000003
20 #else
21 { __donnot_use_enum_ntlmssp_MessageType=0x7FFFFFFF}
22 #define NtLmNegotiate ( 0x00000001 )
23 #define NtLmChallenge ( 0x00000002 )
24 #define NtLmAuthenticate ( 0x00000003 )
25 #endif
28 /* bitmap NEGOTIATE */
29 #define NTLMSSP_NEGOTIATE_UNICODE ( 0x00000001 )
30 #define NTLMSSP_NEGOTIATE_OEM ( 0x00000002 )
31 #define NTLMSSP_REQUEST_TARGET ( 0x00000004 )
32 #define NTLMSSP_NEGOTIATE_SIGN ( 0x00000010 )
33 #define NTLMSSP_NEGOTIATE_SEAL ( 0x00000020 )
34 #define NTLMSSP_NEGOTIATE_DATAGRAM ( 0x00000040 )
35 #define NTLMSSP_NEGOTIATE_LM_KEY ( 0x00000080 )
36 #define NTLMSSP_NEGOTIATE_NETWARE ( 0x00000100 )
37 #define NTLMSSP_NEGOTIATE_NTLM ( 0x00000200 )
38 #define NTLMSSP_NEGOTIATE_NT_ONLY ( 0x00000400 )
39 #define NTLMSSP_ANONYMOUS ( 0x00000800 )
40 #define NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED ( 0x00001000 )
41 #define NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED ( 0x00002000 )
42 #define NTLMSSP_NEGOTIATE_THIS_IS_LOCAL_CALL ( 0x00004000 )
43 #define NTLMSSP_NEGOTIATE_ALWAYS_SIGN ( 0x00008000 )
44 #define NTLMSSP_TARGET_TYPE_DOMAIN ( 0x00010000 )
45 #define NTLMSSP_TARGET_TYPE_SERVER ( 0x00020000 )
46 #define NTLMSSP_TARGET_TYPE_SHARE ( 0x00040000 )
47 #define NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY ( 0x00080000 )
48 #define NTLMSSP_NEGOTIATE_IDENTIFY ( 0x00100000 )
49 #define NTLMSSP_REQUEST_NON_NT_SESSION_KEY ( 0x00400000 )
50 #define NTLMSSP_NEGOTIATE_TARGET_INFO ( 0x00800000 )
51 #define NTLMSSP_NEGOTIATE_VERSION ( 0x02000000 )
52 #define NTLMSSP_NEGOTIATE_128 ( 0x20000000 )
53 #define NTLMSSP_NEGOTIATE_KEY_EXCH ( 0x40000000 )
54 #define NTLMSSP_NEGOTIATE_56 ( 0x80000000 )
56 enum ntlmssp_WindowsMajorVersion
57 #ifndef USE_UINT_ENUMS
59 NTLMSSP_WINDOWS_MAJOR_VERSION_5=0x05,
60 NTLMSSP_WINDOWS_MAJOR_VERSION_6=0x06
62 #else
63 { __donnot_use_enum_ntlmssp_WindowsMajorVersion=0x7FFFFFFF}
64 #define NTLMSSP_WINDOWS_MAJOR_VERSION_5 ( 0x05 )
65 #define NTLMSSP_WINDOWS_MAJOR_VERSION_6 ( 0x06 )
66 #endif
69 enum ntlmssp_WindowsMinorVersion
70 #ifndef USE_UINT_ENUMS
72 NTLMSSP_WINDOWS_MINOR_VERSION_0=0x00,
73 NTLMSSP_WINDOWS_MINOR_VERSION_1=0x01,
74 NTLMSSP_WINDOWS_MINOR_VERSION_2=0x02
76 #else
77 { __donnot_use_enum_ntlmssp_WindowsMinorVersion=0x7FFFFFFF}
78 #define NTLMSSP_WINDOWS_MINOR_VERSION_0 ( 0x00 )
79 #define NTLMSSP_WINDOWS_MINOR_VERSION_1 ( 0x01 )
80 #define NTLMSSP_WINDOWS_MINOR_VERSION_2 ( 0x02 )
81 #endif
84 enum ntlmssp_NTLMRevisionCurrent
85 #ifndef USE_UINT_ENUMS
87 NTLMSSP_REVISION_W2K3_RC1=0x0A,
88 NTLMSSP_REVISION_W2K3=0x0F
90 #else
91 { __donnot_use_enum_ntlmssp_NTLMRevisionCurrent=0x7FFFFFFF}
92 #define NTLMSSP_REVISION_W2K3_RC1 ( 0x0A )
93 #define NTLMSSP_REVISION_W2K3 ( 0x0F )
94 #endif
97 struct VERSION {
98 enum ntlmssp_WindowsMajorVersion ProductMajorVersion;
99 enum ntlmssp_WindowsMinorVersion ProductMinorVersion;
100 uint16_t ProductBuild;
101 uint8_t Reserved[3];
102 enum ntlmssp_NTLMRevisionCurrent NTLMRevisionCurrent;
105 union ntlmssp_Version {
106 struct VERSION version;/* [case(NTLMSSP_NEGOTIATE_VERSION)] */
107 }/* [nodiscriminant] */;
109 struct NEGOTIATE_MESSAGE {
110 const char *Signature;/* [value("NTLMSSP"),charset(DOS)] */
111 enum ntlmssp_MessageType MessageType;/* [value(NtLmNegotiate)] */
112 uint32_t NegotiateFlags;
113 uint16_t DomainNameLen;/* [value(strlen(DomainName))] */
114 uint16_t DomainNameMaxLen;/* [value(DomainNameLen)] */
115 const char * DomainName;/* [relative,subcontext_size(DomainNameLen),subcontext(0),flag(ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM))] */
116 uint16_t WorkstationLen;/* [value(strlen(Workstation))] */
117 uint16_t WorkstationMaxLen;/* [value(WorkstationLen)] */
118 const char * Workstation;/* [relative,subcontext_size(WorkstationLen),subcontext(0),flag(ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_OEM))] */
119 union ntlmssp_Version Version;/* [switch_is(NegotiateFlags&NTLMSSP_NEGOTIATE_VERSION)] */
120 }/* [public] */;
122 enum ntlmssp_AvId
123 #ifndef USE_UINT_ENUMS
125 MsvAvEOL=0,
126 MsvAvNbComputerName=1,
127 MsvAvNbDomainName=2,
128 MsvAvDnsComputerName=3,
129 MsvAvDnsDomainName=4,
130 MsvAvDnsTreeName=5,
131 MsvAvFlags=6,
132 MsvAvTimestamp=7,
133 MsAvRestrictions=8,
134 MsvAvTargetName=9,
135 MsvChannelBindings=10
137 #else
138 { __donnot_use_enum_ntlmssp_AvId=0x7FFFFFFF}
139 #define MsvAvEOL ( 0 )
140 #define MsvAvNbComputerName ( 1 )
141 #define MsvAvNbDomainName ( 2 )
142 #define MsvAvDnsComputerName ( 3 )
143 #define MsvAvDnsDomainName ( 4 )
144 #define MsvAvDnsTreeName ( 5 )
145 #define MsvAvFlags ( 6 )
146 #define MsvAvTimestamp ( 7 )
147 #define MsAvRestrictions ( 8 )
148 #define MsvAvTargetName ( 9 )
149 #define MsvChannelBindings ( 10 )
150 #endif
153 struct Restriction_Encoding {
154 uint32_t Size;
155 uint32_t Z4;/* [value(0)] */
156 uint32_t IntegrityLevel;
157 uint32_t SubjectIntegrityLevel;
158 uint8_t MachineId[32];
161 /* bitmap ntlmssp_AvFlags */
162 #define NTLMSSP_AVFLAG_CONSTRAINTED_ACCOUNT ( 0x00000001 )
163 #define NTLMSSP_AVFLAG_MIC_IN_AUTHENTICATE_MESSAGE ( 0x00000002 )
165 union ntlmssp_AvValue {
166 const char * AvNbComputerName;/* [flag(ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE)),case(MsvAvNbComputerName)] */
167 const char * AvNbDomainName;/* [flag(ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE)),case(MsvAvNbDomainName)] */
168 const char * AvDnsComputerName;/* [flag(ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE)),case(MsvAvDnsComputerName)] */
169 const char * AvDnsDomainName;/* [flag(ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE)),case(MsvAvDnsDomainName)] */
170 const char * AvDnsTreeName;/* [flag(ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE)),case(MsvAvDnsTreeName)] */
171 uint32_t AvFlags;/* [case(MsvAvFlags)] */
172 NTTIME AvTimestamp;/* [case(MsvAvTimestamp)] */
173 struct Restriction_Encoding AvRestrictions;/* [case(MsAvRestrictions)] */
174 const char * AvTargetName;/* [flag(ndr_ntlmssp_negotiated_string_flags(NTLMSSP_NEGOTIATE_UNICODE)),case(MsvAvTargetName)] */
175 uint8_t ChannelBindings[16];/* [case(MsvChannelBindings)] */
176 DATA_BLOB blob;/* [default,flag(LIBNDR_FLAG_REMAINING)] */
177 }/* [gensize,nodiscriminant,flag(LIBNDR_FLAG_NOALIGN)] */;
179 struct AV_PAIR {
180 enum ntlmssp_AvId AvId;
181 uint16_t AvLen;/* [value(ndr_size_ntlmssp_AvValue(&r->Value,r->AvId,ndr->iconv_convenience,0))] */
182 union ntlmssp_AvValue Value;/* [subcontext_size(AvLen),subcontext(0),switch_is(AvId)] */
183 }/* [public,flag(LIBNDR_FLAG_NOALIGN)] */;
185 struct AV_PAIR_LIST {
186 uint32_t count;
187 struct AV_PAIR *pair;
188 }/* [gensize,nopull,nopush,flag(LIBNDR_FLAG_NOALIGN)] */;
190 struct CHALLENGE_MESSAGE {
191 const char *Signature;/* [value("NTLMSSP"),charset(DOS)] */
192 enum ntlmssp_MessageType MessageType;/* [value(NtLmChallenge)] */
193 uint16_t TargetNameLen;/* [value(ndr_ntlmssp_string_length(NegotiateFlags,TargetName))] */
194 uint16_t TargetNameMaxLen;/* [value(TargetNameLen)] */
195 const char * TargetName;/* [relative,subcontext_size(TargetNameLen),subcontext(0),flag(ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags))] */
196 uint32_t NegotiateFlags;
197 uint8_t ServerChallenge[8];
198 uint8_t Reserved[8];
199 uint16_t TargetInfoLen;/* [value(ndr_size_AV_PAIR_LIST(TargetInfo,ndr->iconv_convenience,ndr->flags))] */
200 uint16_t TargetNameInfoMaxLen;/* [value(TargetInfoLen)] */
201 struct AV_PAIR_LIST *TargetInfo;/* [relative,subcontext_size(TargetInfoLen),subcontext(0)] */
202 union ntlmssp_Version Version;/* [switch_is(NegotiateFlags&NTLMSSP_NEGOTIATE_VERSION)] */
203 }/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
205 struct LM_RESPONSE {
206 uint8_t Response[24];
207 }/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
209 struct LMv2_RESPONSE {
210 uint8_t Response[16];
211 uint8_t ChallengeFromClient[8];
212 }/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
214 union ntlmssp_LM_RESPONSE {
215 struct LM_RESPONSE v1;/* [case(24)] */
216 }/* [nodiscriminant] */;
218 struct NTLM_RESPONSE {
219 uint8_t Response[24];
220 }/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
222 struct NTLMv2_CLIENT_CHALLENGE {
223 uint8_t RespType;/* [value] */
224 uint8_t HiRespType;/* [value] */
225 uint16_t Reserved1;
226 uint32_t Reserved2;
227 NTTIME TimeStamp;
228 uint8_t ChallengeFromClient[8];
229 uint32_t Reserved3;
230 struct AV_PAIR_LIST AvPairs;/* [subcontext(0),flag(LIBNDR_FLAG_REMAINING)] */
231 }/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
233 struct NTLMv2_RESPONSE {
234 uint8_t Response[16];
235 struct NTLMv2_CLIENT_CHALLENGE Challenge;
236 }/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
238 union ntlmssp_NTLM_RESPONSE {
239 struct NTLM_RESPONSE v1;/* [case(0x18)] */
240 struct NTLMv2_RESPONSE v2;/* [default] */
241 }/* [public,nodiscriminant] */;
243 struct MIC {
244 uint8_t MIC[16];
245 }/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
247 struct AUTHENTICATE_MESSAGE {
248 const char *Signature;/* [value("NTLMSSP"),charset(DOS)] */
249 enum ntlmssp_MessageType MessageType;/* [value(NtLmAuthenticate)] */
250 uint16_t LmChallengeResponseLen;
251 uint16_t LmChallengeResponseMaxLen;/* [value(LmChallengeResponseLen)] */
252 union ntlmssp_LM_RESPONSE *LmChallengeResponse;/* [relative,subcontext_size(LmChallengeResponseLen),subcontext(0),switch_is(LmChallengeResponseLen)] */
253 uint16_t NtChallengeResponseLen;
254 uint16_t NtChallengeResponseMaxLen;/* [value(NtChallengeResponseLen)] */
255 union ntlmssp_NTLM_RESPONSE *NtChallengeResponse;/* [relative,subcontext_size(NtChallengeResponseMaxLen),subcontext(0),switch_is(NtChallengeResponseLen)] */
256 uint16_t DomainNameLen;/* [value(ndr_ntlmssp_string_length(NegotiateFlags,DomainName))] */
257 uint16_t DomainNameMaxLen;/* [value(DomainNameLen)] */
258 const char * DomainName;/* [relative,subcontext_size(DomainNameLen),subcontext(0),flag(ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags))] */
259 uint16_t UserNameLen;/* [value(ndr_ntlmssp_string_length(NegotiateFlags,UserName))] */
260 uint16_t UserNameMaxLen;/* [value(UserNameLen)] */
261 const char * UserName;/* [relative,subcontext_size(UserNameLen),subcontext(0),flag(ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags))] */
262 uint16_t WorkstationLen;/* [value(ndr_ntlmssp_string_length(NegotiateFlags,Workstation))] */
263 uint16_t WorkstationMaxLen;/* [value(WorkstationLen)] */
264 const char * Workstation;/* [relative,subcontext_size(WorkstationLen),subcontext(0),flag(ndr_ntlmssp_negotiated_string_flags(r->NegotiateFlags))] */
265 uint16_t EncryptedRandomSessionKeyLen;/* [value(EncryptedRandomSessionKey->length)] */
266 uint16_t EncryptedRandomSessionKeyMaxLen;/* [value(EncryptedRandomSessionKeyLen)] */
267 DATA_BLOB *EncryptedRandomSessionKey;/* [relative,subcontext_size(EncryptedRandomSessionKeyLen),subcontext(0)] */
268 uint32_t NegotiateFlags;
269 union ntlmssp_Version Version;/* [switch_is(NegotiateFlags&NTLMSSP_NEGOTIATE_VERSION)] */
270 }/* [public,flag(LIBNDR_FLAG_REMAINING)] */;
272 struct NTLMSSP_MESSAGE_SIGNATURE {
273 uint32_t Version;/* [value(NTLMSSP_SIGN_VERSION)] */
274 uint32_t RandomPad;
275 uint32_t Checksum;
276 uint32_t SeqNum;
277 }/* [public] */;
279 struct NTLMSSP_MESSAGE_SIGNATURE_NTLMv2 {
280 uint32_t Version;/* [value(NTLMSSP_SIGN_VERSION)] */
281 uint8_t Checksum[8];
282 uint32_t SeqNum;
283 }/* [public,flag(LIBNDR_PRINT_ARRAY_HEX)] */;
286 struct decode_NEGOTIATE_MESSAGE {
287 struct {
288 struct NEGOTIATE_MESSAGE negotiate;
289 } in;
294 struct decode_CHALLENGE_MESSAGE {
295 struct {
296 struct CHALLENGE_MESSAGE challenge;
297 } in;
302 struct decode_AUTHENTICATE_MESSAGE {
303 struct {
304 struct AUTHENTICATE_MESSAGE authenticate;
305 } in;
310 struct decode_NTLMv2_CLIENT_CHALLENGE {
311 struct {
312 struct NTLMv2_CLIENT_CHALLENGE challenge;
313 } in;
317 #endif /* _HEADER_ntlmssp */