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 uuid("07408340-ae31-11e1-97dc-539f7fddc06f"),
22 pointer_default(unique),
23 helpstring("smbXsrv structures")
28 * smbXsrv_version* is designed to allow
29 * rolling code upgrades in future (within a cluster).
31 * This just adds the infrastructure,
32 * but we does not implement it yet!
34 * Currently it only prevents that
35 * nodes with a different version numbers
36 * cannot run at the same time.
38 * Each node checks at startup, if the version
39 * matches the version of all other nodes.
40 * And it exits if the version does not match
41 * to avoid corruption.
43 * While it would be possible to add versioning
44 * to each of our internal databases it is easier
45 * use a dedicated database "smbXsrv_version_global.tdb"
46 * to hold the global version information.
48 * This removes extra complexity from the individual
49 * databases and allows that we add/remove databases
50 * or use different indexing keys.
53 typedef [v1_enum] enum {
55 * NOTE: Version 0 is designed to be unstable and the format
56 * may change during development.
58 SMBXSRV_VERSION_0
= 0x00000000
59 } smbXsrv_version_values
;
61 const uint32 SMBXSRV_VERSION_CURRENT
= SMBXSRV_VERSION_0
;
65 smbXsrv_version_values min_version
;
66 smbXsrv_version_values max_version
;
67 smbXsrv_version_values current_version
;
68 } smbXsrv_version_node0
;
71 [ignore] db_record
*db_rec
;
72 [range(1, 1024)] uint32 num_nodes
;
73 smbXsrv_version_node0 nodes
[num_nodes
];
74 } smbXsrv_version_global0
;
77 [case(0)] smbXsrv_version_global0
*info0
;
78 [default] hyper *dummy
;
79 } smbXsrv_version_globalU
;
81 typedef [public] struct {
82 smbXsrv_version_values
version;
84 [switch_is(version)] smbXsrv_version_globalU info
;
85 } smbXsrv_version_globalB
;
87 void smbXsrv_version_global_decode
(
88 [in] smbXsrv_version_globalB blob
95 [charset
(UTF8
),string] char local_address
[];
96 [charset
(UTF8
),string] char remote_address
[];
97 [charset
(UTF8
),string] char remote_name
[];
98 [noprint
] DATA_BLOB signing_key
;
99 uint32 auth_session_info_seqnum
;
100 } smbXsrv_channel_global0
;
103 [ignore] db_record
*db_rec
;
104 uint32 session_global_id
;
105 hyper session_wire_id
;
106 NTTIME creation_time
;
107 NTTIME expiration_time
;
109 * auth_session is NULL until the
110 * session is valid for the first time.
112 uint32 auth_session_info_seqnum
;
113 auth_session_info
*auth_session_info
;
114 uint16 connection_dialect
;
115 boolean8 signing_required
;
116 boolean8 encryption_required
;
117 [noprint
] DATA_BLOB signing_key
;
118 [noprint
] DATA_BLOB encryption_key
;
119 [noprint
] DATA_BLOB decryption_key
;
120 [noprint
] DATA_BLOB application_key
;
121 [range(1, 1024)] uint32 num_channels
;
122 smbXsrv_channel_global0 channels
[num_channels
];
123 } smbXsrv_session_global0
;
126 [case(0)] smbXsrv_session_global0
*info0
;
127 [default] hyper *dummy
;
128 } smbXsrv_session_globalU
;
130 typedef [public] struct {
131 smbXsrv_version_values
version;
133 [switch_is(version)] smbXsrv_session_globalU info
;
134 } smbXsrv_session_globalB
;
136 void smbXsrv_session_global_decode
(
137 [in] smbXsrv_session_globalB blob
141 [ignore] smbXsrv_session_table
*table
;
142 [ignore] db_record
*db_rec
;
143 [ignore] smbXsrv_connection
*connection
;
145 [ref] smbXsrv_session_global0
*global
;
148 [ignore] gensec_security
*gensec
;
149 [ignore] user_struct
*compat
;
150 [ignore] smbXsrv_tcon_table
*tcon_table
;
151 [ignore] smbd_smb2_session
*smb2sess
;
155 [case(0)] smbXsrv_session0
*info0
;
156 [default] hyper *dummy
;
159 typedef [public] struct {
160 smbXsrv_version_values
version;
161 [value
(0)] uint32 reserved
;
162 [switch_is(version)] smbXsrv_sessionU info
;
165 void smbXsrv_session_decode
(
166 [in] smbXsrv_sessionB blob