vfs_default: implement FSCTL_DUP_EXTENTS_TO_FILE with copy_reflink()
[samba4-gss.git] / librpc / idl / schannel.idl
blob3bc8a92c92f6a5597b0e6ccdd5e43c8d287fb003
1 #include "idl_types.h"
3 /*
4 schannel structures
5 */
7 import "netlogon.idl", "nbt.idl", "misc.idl", "security.idl";
10 pointer_default(unique),
11 helper("../librpc/ndr/ndr_schannel.h", "../librpc/ndr/ndr_nbt.h")
13 interface schannel
15 /* this structure is used internally in the NETLOGON server */
17 typedef [public,flag(NDR_PAHEX)] struct {
18 netr_NegotiateFlags negotiate_flags;
19 uint8 session_key[16];
20 uint32 sequence;
21 netr_Credential seed;
22 netr_Credential client;
23 netr_Credential server;
24 netr_SchannelType secure_channel_type;
25 [string,charset(UTF8)] uint8 computer_name[];
26 [string,charset(UTF8)] uint8 account_name[];
27 dom_sid *sid;
28 } netlogon_creds_CredentialState;
30 /* This is used in the schannel_store.tdb */
31 typedef [public] struct {
32 [string,charset(UTF16)] uint16 *computer_name;
33 netr_Credential server_challenge;
34 netr_Credential client_challenge;
35 } netlogon_cache_entry;
37 /* MS-NRPC 2.2.1.3.1 NL_AUTH_MESSAGE */
39 typedef [v1_enum] enum {
40 NL_NEGOTIATE_REQUEST = 0x00000000,
41 NL_NEGOTIATE_RESPONSE = 0x00000001
42 } NL_AUTH_MESSAGE_TYPE;
44 typedef [bitmap32bit] bitmap {
45 NL_FLAG_OEM_NETBIOS_DOMAIN_NAME = 0x00000001,
46 NL_FLAG_OEM_NETBIOS_COMPUTER_NAME = 0x00000002,
47 NL_FLAG_UTF8_DNS_DOMAIN_NAME = 0x00000004,
48 NL_FLAG_UTF8_DNS_HOST_NAME = 0x00000008,
49 NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME = 0x00000010
50 } NL_AUTH_MESSAGE_FLAGS;
52 typedef [public,nodiscriminant,noprint] union {
53 [case (NL_FLAG_OEM_NETBIOS_DOMAIN_NAME)] astring a;
54 [case (NL_FLAG_OEM_NETBIOS_COMPUTER_NAME)] astring a;
55 [case (NL_FLAG_UTF8_DNS_DOMAIN_NAME)] nbt_string u;
56 [case (NL_FLAG_UTF8_DNS_HOST_NAME)] nbt_string u;
57 [case (NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME)] nbt_string u;
58 [default] ;
59 } NL_AUTH_MESSAGE_BUFFER;
61 typedef [public,nodiscriminant,noprint] union {
62 [case (NL_NEGOTIATE_RESPONSE)] uint32 dummy;
63 [default] ;
64 } NL_AUTH_MESSAGE_BUFFER_REPLY;
66 typedef [public,flag(NDR_PAHEX)] struct {
67 NL_AUTH_MESSAGE_TYPE MessageType;
68 NL_AUTH_MESSAGE_FLAGS Flags;
69 [switch_is(Flags & NL_FLAG_OEM_NETBIOS_DOMAIN_NAME)] NL_AUTH_MESSAGE_BUFFER oem_netbios_domain;
70 [switch_is(Flags & NL_FLAG_OEM_NETBIOS_COMPUTER_NAME)] NL_AUTH_MESSAGE_BUFFER oem_netbios_computer;
71 [switch_is(Flags & NL_FLAG_UTF8_DNS_DOMAIN_NAME)] NL_AUTH_MESSAGE_BUFFER utf8_dns_domain;
72 [switch_is(Flags & NL_FLAG_UTF8_DNS_HOST_NAME)] NL_AUTH_MESSAGE_BUFFER utf8_dns_host;
73 [switch_is(Flags & NL_FLAG_UTF8_NETBIOS_COMPUTER_NAME)] NL_AUTH_MESSAGE_BUFFER utf8_netbios_computer;
74 [switch_is(MessageType & NL_NEGOTIATE_RESPONSE)] NL_AUTH_MESSAGE_BUFFER_REPLY Buffer;
75 } NL_AUTH_MESSAGE;
77 /* MS-NRPC 2.2.1.3.2 NL_AUTH_SIGNATURE */
79 typedef enum {
80 NL_SIGN_HMAC_SHA256 = 0x0013,
81 NL_SIGN_HMAC_MD5 = 0x0077
82 } NL_SIGNATURE_ALGORITHM;
84 typedef enum {
85 NL_SEAL_AES128 = 0x001A,
86 NL_SEAL_RC4 = 0x007A,
87 NL_SEAL_NONE = 0xFFFF
88 } NL_SEAL_ALGORITHM;
90 typedef [public,flag(NDR_PAHEX)] struct {
91 [value(NL_SIGN_HMAC_MD5)] NL_SIGNATURE_ALGORITHM SignatureAlgorithm;
92 NL_SEAL_ALGORITHM SealAlgorithm;
93 uint16 Pad;
94 uint16 Flags;
95 uint8 SequenceNumber[8];
96 uint8 Checksum[8];
97 uint8 Confounder[8];
98 } NL_AUTH_SIGNATURE;
100 const int NL_AUTH_SIGNATURE_SIZE = 0x20;
102 /* MS-NRPC 2.2.1.3.3 NL_AUTH_SHA2_SIGNATURE */
104 typedef [public,flag(NDR_PAHEX)] struct {
105 [value(NL_SIGN_HMAC_SHA256)] NL_SIGNATURE_ALGORITHM SignatureAlgorithm;
106 NL_SEAL_ALGORITHM SealAlgorithm;
107 uint16 Pad;
108 uint16 Flags;
109 uint8 SequenceNumber[8];
110 uint8 Checksum[32];
111 uint8 Confounder[8];
112 } NL_AUTH_SHA2_SIGNATURE;