s3:libads: use the correct struct sockbuf_io_desc type for 'sbiod' pointer
[samba.git] / source3 / librpc / idl / ads.idl
1 #include "idl_types.h"
2 #include "config.h"
3
4 /*
5   ads interface definition
6 */
7
8 import "nbt.idl";
9
10 cpp_quote("#include <system/network.h>")
11
12 [
13         pointer_default(unique)
14 ]
15 interface ads
16 {
17         typedef [public] enum {
18                 ADS_SASLWRAP_TYPE_PLAIN = 1,
19                 ADS_SASLWRAP_TYPE_SIGN = 2,
20                 ADS_SASLWRAP_TYPE_SEAL = 4
21         } ads_saslwrap_type;
22
23         /* ads auth control flags */
24         typedef [public] bitmap {
25                 ADS_AUTH_DISABLE_KERBEROS       = 0x0001,
26                 ADS_AUTH_NO_BIND                = 0x0002,
27                 ADS_AUTH_ANON_BIND              = 0x0004,
28                 ADS_AUTH_ALLOW_NTLMSSP          = 0x0010,
29                 ADS_AUTH_SASL_SIGN              = 0x0020,
30                 ADS_AUTH_SASL_SEAL              = 0x0040,
31                 ADS_AUTH_SASL_FORCE             = 0x0080,
32                 ADS_AUTH_USER_CREDS             = 0x0100
33         } ads_auth_flags;
34
35         const int ADS_SASL_WRAPPING_IN_MAX_WRAPPED = 0x0FFFFFFF;
36         const int ADS_SASL_WRAPPING_OUT_MAX_WRAPPED = 0x00A00000;
37
38         typedef [nopull,nopush] struct {
39                 string realm;
40                 string workgroup;
41                 string ldap_server;
42                 boolean8 gc;     /* Is this a global catalog server? */
43                 boolean8 no_fallback; /* Bail if the ldap_server is not available */
44         } ads_server;
45
46         typedef [nopull,nopush] struct {
47                 string realm;
48                 string password;
49                 string user_name;
50                 string kdc_server;
51                 ads_auth_flags flags;
52                 int time_offset;
53                 string ccache_name;
54                 time_t tgt_expire;
55                 time_t tgs_expire;
56                 time_t renewable;
57         } ads_auth;
58
59         typedef [nopull,nopush] struct {
60                 nbt_server_type flags; /* cldap flags identifying the services. */
61                 string workgroup;
62                 string realm;
63                 string bind_path;
64                 string ldap_server_name;
65                 string server_site_name;
66                 string client_site_name;
67                 time_t current_time;
68                 string schema_path;
69                 string config_path;
70                 int ldap_page_size;
71         } ads_config;
72
73         typedef [nopull,nopush] struct {
74                 uint32 ofs;
75                 uint32 needed;
76                 uint32 left;
77                 uint32 max_wrapped;
78                 uint32 min_wrapped;
79                 uint32 size;
80                 uint8 *buf;
81         } ads_ldap_buf_in;
82
83         typedef [nopull,nopush] struct {
84                 uint32 ofs;
85                 uint32 left;
86                 uint32 max_unwrapped;
87                 uint32 sig_size;
88                 uint32 size;
89                 uint8 *buf;
90         } ads_ldap_buf_out;
91
92         typedef [nopull,nopush] struct {
93                 ads_saslwrap_type wrap_type;
94                 [ignore] ads_saslwrap_ops *wrap_ops;
95 #ifdef HAVE_LDAP_SASL_WRAPPING
96                 [ignore] struct sockbuf_io_desc *sbiod; /* lowlevel state for LDAP wrapping */
97 #endif /* HAVE_LDAP_SASL_WRAPPING */
98                 [ignore] TALLOC_CTX *mem_ctx;
99                 [ignore] void *wrap_private_data;
100                 ads_ldap_buf_in in;
101                 ads_ldap_buf_out out;
102         } ads_saslwrap;
103
104         typedef [nopull,nopush] struct {
105                 [ignore] ldap *ld;
106                 sockaddr_storage ss; /* the ip of the active connection, if any */
107                 time_t last_attempt; /* last attempt to reconnect, monotonic clock */
108                 int port;
109         } ads_ldap;
110
111         typedef [public,nopull,nopush] struct {
112                 /* info needed to find the server */
113                 ads_server server;
114
115                 /* info needed to authenticate */
116                 ads_auth auth;
117
118                 /* info derived from the servers config */
119                 ads_config config;
120
121 #ifdef HAVE_LDAP
122                 ads_saslwrap ldap_wrap_data;
123                 /* info about the current LDAP connection */
124                 ads_ldap ldap;
125 #endif /* HAVE_LDAP */
126
127         } ads_struct;
128 }
129
130