Manually marshall dom_sid, so we can use a fixed size array for
[samba.git] / source4 / librpc / idl / dom_sid.idl
1 /*
2    use the same structure for dom_sid2 as dom_sid. A dom_sid2 is really
3    just a dom sid, but with the sub_auths represented as a conformant
4    array. As with all in-structure conformant arrays, the array length
5    is placed before the start of the structure. That's what gives rise
6    to the extra num_auths elemenent. We don't want the Samba code to
7    have to bother with such esoteric NDR details, so its easier to just
8    define it as a dom_sid and use pidl magic to make it all work. It
9    just means you need to mark a sid as a "dom_sid2" in the IDL when you
10    know it is of the conformant array variety
11 */
12 cpp_quote("#define dom_sid2 dom_sid")
13
14 /* same struct as dom_sid but inside a 28 bytes fixed buffer in NDR */
15 cpp_quote("#define dom_sid28 dom_sid")
16
17 /* same struct as dom_sid but in a variable byte buffer, which is maybe empty in NDR */
18 cpp_quote("#define dom_sid0 dom_sid")
19
20 [
21         pointer_default(unique)
22 ]
23 interface dom_sid
24 {
25         typedef [public,gensize,noprint,nosize,nopull,nopush] struct {
26                 uint8  sid_rev_num;             /**< SID revision number */
27                 [range(0,15)] int8  num_auths;  /**< Number of sub-authorities */
28                 uint8  id_auth[6];              /**< Identifier Authority */
29                 uint32 sub_auths[15];
30         } dom_sid;
31
32         /* id used to identify a endpoint, possibly in a cluster */
33         typedef [public] struct {
34                 hyper id;
35                 uint32 id2;
36                 uint32 node;
37         } server_id;
38 }