r14739: keep the last request time for the smbsrv_connection,
[ab/samba.git/.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   depends(security,nbt)
10 ] interface irpc
11 {
12         typedef bitmap {
13                 IRPC_FLAG_REPLY    = 0x0001
14         } irpc_flags;
15
16         typedef [public,noejs] struct {
17                 GUID uuid;
18                 uint32 if_version;
19                 uint32 callnum;
20                 uint32 callid;
21                 irpc_flags flags;
22                 NTSTATUS status;
23         } irpc_header;
24
25         /******************************************************
26          uptime call - supported by all messaging servers
27         *******************************************************/
28         void irpc_uptime([out,ref] NTTIME *start_time);
29
30         /******************************************************
31          management calls for the nbt server
32         ******************************************************/
33         typedef [v1_enum] enum {
34                 NBTD_INFO_STATISTICS
35         } nbtd_info_level;
36
37         typedef struct {
38                 hyper total_received;
39                 hyper total_sent;
40                 hyper query_count;
41                 hyper register_count;
42                 hyper release_count;
43         } nbtd_statistics;
44
45         typedef union {
46                 [case(NBTD_INFO_STATISTICS)] nbtd_statistics *stats;
47         } nbtd_info;
48
49         void nbtd_information(
50                 [in]  nbtd_info_level level,
51                 [out,switch_is(level)] nbtd_info info
52                 );
53
54         void nbtd_getdcname(
55                 [in] astring domainname,
56                 [in] astring ip_address,
57                 [in] astring my_computername,
58                 [in] astring my_accountname,
59                 [in] uint32 account_control,
60                 [in] dom_sid *domain_sid,
61                 [out,unique] astring *dcname
62                 );
63
64         typedef [noejs] struct {
65                 ipv4address addr;
66         } nbtd_proxy_wins_addr;
67
68         [noejs] void nbtd_proxy_wins_challenge(
69                 [in] nbt_name name,
70                 [in,out] uint32 num_addrs,
71                 [in,out] nbtd_proxy_wins_addr addrs[num_addrs]
72                 );
73
74         [noejs] void nbtd_proxy_wins_release_demand(
75                 [in] nbt_name name,
76                 [in] uint32 num_addrs,
77                 [in] nbtd_proxy_wins_addr addrs[num_addrs]
78                 );
79
80         /******************************************************
81          management calls for the smb server
82         ******************************************************/
83         typedef [v1_enum] enum {
84                 SMBSRV_INFO_SESSIONS,
85                 SMBSRV_INFO_TCONS
86         } smbsrv_info_level;
87
88         typedef struct {
89                 hyper vuid;
90                 astring account_name;
91                 astring domain_name;
92                 astring client_ip;
93                 NTTIME  connect_time;
94                 NTTIME  auth_time;
95                 NTTIME  last_use_time;
96         } smbsrv_session_info;
97
98         typedef struct {
99                 uint32 num_sessions;
100                 [size_is(num_sessions)] smbsrv_session_info *sessions;
101         } smbsrv_sessions;
102
103         typedef struct {
104                 uint32 tid;
105                 astring share_name;
106                 astring client_ip;
107                 NTTIME  connect_time;
108                 NTTIME  last_use_time;
109         } smbsrv_tcon_info;
110
111         typedef struct {
112                 uint32 num_tcons;
113                 [size_is(num_tcons)] smbsrv_tcon_info *tcons;
114         } smbsrv_tcons;
115
116         typedef union {
117                 [case(SMBSRV_INFO_SESSIONS)] smbsrv_sessions sessions;
118                 [case(SMBSRV_INFO_TCONS)]    smbsrv_tcons    tcons;
119         } smbsrv_info;
120
121         void smbsrv_information(
122                 [in]  smbsrv_info_level level,
123                 [out,switch_is(level)] smbsrv_info info
124                 );
125
126 }