3 import
"server_id.idl";
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.
13 * If we need to change the smbXsrv_session,
14 * we can just point it to smbXsrv_session1
15 * and could implement transparent mapping.
17 cpp_quote
("#define smbXsrv_session smbXsrv_session0")
20 * The main server code should just work with
21 * 'struct smbXsrv_tcon' and never use
22 * smbXsrv_tcon0, smbXsrv_tconU
23 * and smbXsrv_tconB directly.
25 * If we need to change the smbXsrv_tcon,
26 * we can just point it to smbXsrv_tcon1
27 * and could implement transparent mapping.
29 cpp_quote
("#define smbXsrv_tcon smbXsrv_tcon0")
32 uuid("07408340-ae31-11e1-97dc-539f7fddc06f"),
34 pointer_default(unique),
35 helpstring("smbXsrv structures")
40 * smbXsrv_version* is designed to allow
41 * rolling code upgrades in future (within a cluster).
43 * This just adds the infrastructure,
44 * but we does not implement it yet!
46 * Currently it only prevents that
47 * nodes with a different version numbers
48 * cannot run at the same time.
50 * Each node checks at startup, if the version
51 * matches the version of all other nodes.
52 * And it exits if the version does not match
53 * to avoid corruption.
55 * While it would be possible to add versioning
56 * to each of our internal databases it is easier
57 * use a dedicated database "smbXsrv_version_global.tdb"
58 * to hold the global version information.
60 * This removes extra complexity from the individual
61 * databases and allows that we add/remove databases
62 * or use different indexing keys.
65 typedef [v1_enum] enum {
67 * NOTE: Version 0 is designed to be unstable and the format
68 * may change during development.
70 SMBXSRV_VERSION_0
= 0x00000000
71 } smbXsrv_version_values
;
73 const uint32 SMBXSRV_VERSION_CURRENT
= SMBXSRV_VERSION_0
;
77 smbXsrv_version_values min_version
;
78 smbXsrv_version_values max_version
;
79 smbXsrv_version_values current_version
;
80 } smbXsrv_version_node0
;
83 [ignore] db_record
*db_rec
;
84 [range(1, 1024)] uint32 num_nodes
;
85 smbXsrv_version_node0 nodes
[num_nodes
];
86 } smbXsrv_version_global0
;
89 [case(0)] smbXsrv_version_global0
*info0
;
90 [default] hyper *dummy
;
91 } smbXsrv_version_globalU
;
93 typedef [public] struct {
94 smbXsrv_version_values
version;
96 [switch_is(version)] smbXsrv_version_globalU info
;
97 } smbXsrv_version_globalB
;
99 void smbXsrv_version_global_decode
(
100 [in] smbXsrv_version_globalB blob
107 [charset
(UTF8
),string] char local_address
[];
108 [charset
(UTF8
),string] char remote_address
[];
109 [charset
(UTF8
),string] char remote_name
[];
110 [noprint
] DATA_BLOB signing_key
;
111 uint32 auth_session_info_seqnum
;
112 } smbXsrv_channel_global0
;
115 [ignore] db_record
*db_rec
;
116 uint32 session_global_id
;
117 hyper session_wire_id
;
118 NTTIME creation_time
;
119 NTTIME expiration_time
;
121 * auth_session is NULL until the
122 * session is valid for the first time.
124 uint32 auth_session_info_seqnum
;
125 auth_session_info
*auth_session_info
;
126 uint16 connection_dialect
;
127 boolean8 signing_required
;
128 boolean8 encryption_required
;
129 [noprint
] DATA_BLOB signing_key
;
130 [noprint
] DATA_BLOB encryption_key
;
131 [noprint
] DATA_BLOB decryption_key
;
132 [noprint
] DATA_BLOB application_key
;
133 [range(1, 1024)] uint32 num_channels
;
134 smbXsrv_channel_global0 channels
[num_channels
];
135 } smbXsrv_session_global0
;
138 [case(0)] smbXsrv_session_global0
*info0
;
139 [default] hyper *dummy
;
140 } smbXsrv_session_globalU
;
142 typedef [public] struct {
143 smbXsrv_version_values
version;
145 [switch_is(version)] smbXsrv_session_globalU info
;
146 } smbXsrv_session_globalB
;
148 void smbXsrv_session_global_decode
(
149 [in] smbXsrv_session_globalB blob
153 [ignore] smbXsrv_session_table
*table
;
154 [ignore] db_record
*db_rec
;
155 [ignore] smbXsrv_connection
*connection
;
157 [ref] smbXsrv_session_global0
*global
;
160 [ignore] gensec_security
*gensec
;
161 [ignore] user_struct
*compat
;
162 [ignore] smbXsrv_tcon_table
*tcon_table
;
166 [case(0)] smbXsrv_session0
*info0
;
167 [default] hyper *dummy
;
170 typedef [public] struct {
171 smbXsrv_version_values
version;
172 [value
(0)] uint32 reserved
;
173 [switch_is(version)] smbXsrv_sessionU info
;
176 void smbXsrv_session_decode
(
177 [in] smbXsrv_sessionB blob
183 [ignore] db_record
*db_rec
;
184 uint32 tcon_global_id
;
187 NTTIME creation_time
;
188 [charset
(UTF8
),string] char share_name
[];
189 } smbXsrv_tcon_global0
;
192 [case(0)] smbXsrv_tcon_global0
*info0
;
193 [default] hyper *dummy
;
194 } smbXsrv_tcon_globalU
;
196 typedef [public] struct {
197 smbXsrv_version_values
version;
199 [switch_is(version)] smbXsrv_tcon_globalU info
;
200 } smbXsrv_tcon_globalB
;
202 void smbXsrv_tcon_global_decode
(
203 [in] smbXsrv_tcon_globalB blob
207 [ignore] smbXsrv_tcon_table
*table
;
208 [ignore] db_record
*db_rec
;
210 [ref] smbXsrv_tcon_global0
*global
;
213 [ignore] connection_struct
*compat
;
217 [case(0)] smbXsrv_tcon0
*info0
;
218 [default] hyper *dummy
;
221 typedef [public] struct {
222 smbXsrv_version_values
version;
223 [value
(0)] uint32 reserved
;
224 [switch_is(version)] smbXsrv_tconU info
;
227 void smbXsrv_tcon_decode
(
228 [in] smbXsrv_tconB blob