smbXsrv.idl
[metze/samba/wip.git] / source3 / librpc / idl / smbXsrv.idl
1 #include "idl_types.h"
2
3 import "server_id.idl";
4 import "security.idl";
5 import "auth.idl";
6
7 /*
8  * The main server code should just work with
9  * 'struct smbXsrv_session' and never use
10  * smbXsrv_session0, smbXsrv_sessionU
11  * and smbXsrv_sessionB directly.
12  *
13  * We need to change the smbXsrv_session,
14  * we can just point it to smbXsrv_session1
15  * and could implement transparent mapping.
16  */
17 cpp_quote("#define smbXsrv_session smbXsrv_session0")
18
19 [
20         pointer_default(unique)
21 ]
22 interface smbXsrv
23 {
24         typedef struct {
25                 server_id                       server_id;
26                 [charset(UTF8),string] char     *local_address;
27                 [charset(UTF8),string] char     *remote_address;
28                 [charset(UTF8),string] char     *remote_name;
29                 DATA_BLOB signing_key;
30         } smbXsrv_channel_global0;
31
32         typedef struct {
33                 [ignore] db_record              *db_rec;
34                 uint32                          session_global_id;
35                 hyper                           session_wire_id;
36                 NTTIME                          creation_time;
37                 NTTIME                          expiration_time;
38                 /*
39                  * auth_session is NULL until the
40                  * session is valid for the first time.
41                  */
42                 auth_session_info               *auth_session_info;
43                 [range(1, 1024)] uint32         num_channels;
44                 smbXsrv_channel_global0 channels[num_channels];
45         } smbXsrv_session_global0;
46
47         typedef union {
48                 [case(0)] smbXsrv_session_global0 *info0;
49                 [default] hyper *dummy;
50         } smbXsrv_session_globalU;
51
52         typedef [public] struct {
53                 uint32          version;
54                 uint32          seqnum;
55                 [switch_is(version)] smbXsrv_session_globalU info;
56         } smbXsrv_session_globalB;
57
58         void smbXsrv_session_global_decode(
59                 [in] smbXsrv_session_globalB blob
60                 );
61
62         typedef struct {
63                 [ignore] db_record                              *db_rec;
64                 [ignore] smbXsrv_connection                     *connection;
65                 uint32                                          local_id;
66                 [ref] smbXsrv_session_global0                   *global;
67                 NTSTATUS                                        status;
68                 NTTIME                                          idle_time;
69                 [ignore] gensec_security                        *gensec;
70                 [ignore] smbXsrv_tcon_table                     *tcon_table;
71                 [ignore] smbXsrv_open_table                     *open_table;
72         } smbXsrv_session0;
73
74         typedef union {
75                 [case(0)] smbXsrv_session0                      *info0;
76                 [default] hyper                                 *dummy;
77         } smbXsrv_sessionU;
78
79         typedef [public] struct {
80                 uint32                                          version;
81                 [value(0)] uint32                               reserved;
82                 [switch_is(version)] smbXsrv_sessionU   info;
83         } smbXsrv_sessionB;
84
85         void smbXsrv_session_decode(
86                 [in] smbXsrv_sessionB blob
87                 );
88 }