r10705: fixed a crash bug in the getdcname irpc server for winbind. The
[kai/samba.git] / source4 / librpc / idl / irpc.idl
1 #include "idl_types.h"
2
3 /*
4   definitions for irpc primitives
5 */
6 [ uuid("e770c620-0b06-4b5e-8d87-a26e20f28340"),
7   version(1.0),
8   pointer_default(unique),
9   pointer_default_top(unique),
10   depends(security)
11 ] interface irpc
12 {
13         typedef bitmap {
14                 IRPC_FLAG_REPLY    = 0x0001
15         } irpc_flags;
16
17         typedef [public,noejs] struct {
18                 GUID uuid;
19                 uint32 if_version;
20                 uint32 callnum;
21                 uint32 callid;
22                 irpc_flags flags;
23                 NTSTATUS status;
24         } irpc_header;
25
26         /******************************************************
27          uptime call - supported by all messaging servers
28         *******************************************************/
29         void irpc_uptime([out,ref] NTTIME *start_time);
30
31         /******************************************************
32          management calls for the nbt server
33         ******************************************************/
34         typedef [v1_enum] enum {
35                 NBTD_INFO_STATISTICS
36         } nbtd_info_level;
37
38         typedef struct {
39                 hyper total_received;
40                 hyper total_sent;
41                 hyper query_count;
42                 hyper register_count;
43                 hyper release_count;
44         } nbtd_statistics;
45
46         typedef union {
47                 [case(NBTD_INFO_STATISTICS)] nbtd_statistics *stats;
48         } nbtd_info;
49
50         void nbtd_information(
51                 [in]  nbtd_info_level level,
52                 [out,switch_is(level)] nbtd_info info
53                 );
54
55         void nbtd_getdcname(
56                 [in] astring domainname,
57                 [in] astring ip_address,
58                 [in] astring my_computername,
59                 [in] astring my_accountname,
60                 [in] uint32 account_control,
61                 [in,ref] dom_sid *domain_sid,
62                 [out] astring *dcname
63                 );
64
65         /******************************************************
66          management calls for the smb server
67         ******************************************************/
68         typedef [v1_enum] enum {
69                 SMBSRV_INFO_SESSIONS,
70                 SMBSRV_INFO_TREES
71         } smbsrv_info_level;
72
73         typedef struct {
74                 uint16 vuid;
75                 astring account_name;
76                 astring domain_name;
77                 astring client_ip;
78                 NTTIME  connect_time;
79         } smbsrv_session_info;
80
81         typedef struct {
82                 uint32 num_sessions;
83                 [size_is(num_sessions)] smbsrv_session_info *sessions;
84         } smbsrv_sessions;
85
86         typedef struct {
87                 uint16 tid;
88                 astring share_name;
89                 astring client_ip;
90                 NTTIME  connect_time;
91         } smbsrv_tree_info;
92
93         typedef struct {
94                 uint32 num_trees;
95                 [size_is(num_trees)] smbsrv_tree_info *trees;
96         } smbsrv_trees;
97
98         typedef union {
99                 [case(SMBSRV_INFO_SESSIONS)] smbsrv_sessions sessions;
100                 [case(SMBSRV_INFO_TREES)]    smbsrv_trees    trees;
101         } smbsrv_info;
102
103         void smbsrv_information(
104                 [in]  smbsrv_info_level level,
105                 [out,switch_is(level)] smbsrv_info info
106                 );
107
108 }