summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'librpc')
-rw-r--r--librpc/idl/notify.idl84
-rw-r--r--librpc/idl/wscript_build1
-rw-r--r--librpc/wscript_build8
3 files changed, 92 insertions, 1 deletions
diff --git a/librpc/idl/notify.idl b/librpc/idl/notify.idl
new file mode 100644
index 0000000000..845010601e
--- /dev/null
+++ b/librpc/idl/notify.idl
@@ -0,0 +1,84 @@
+#include "idl_types.h"
+
+import "file_id.idl", "server_id.idl";
+
+/*
+ IDL structures for notify change code
+
+ this defines the structures used in the notify database code, and
+ the change notify buffers
+*/
+
+[
+ pointer_default(unique)
+]
+interface notify
+{
+
+ /* structure used in the notify database */
+ typedef [public] struct {
+ server_id server;
+ uint32 filter; /* filter to apply in this directory */
+ uint32 subdir_filter; /* filter to apply in child directories */
+ uint32 dir_fd; /* fd of open directory */
+ file_id dir_id; /* file_id of open directory */
+ utf8string path;
+ uint32 path_len; /* saves some computation on search */
+ pointer private_data;
+ } notify_entry;
+
+ typedef [public] struct {
+ uint32 num_entries;
+ notify_entry entries[num_entries];
+ } notify_entry_array;
+
+ /*
+ to allow for efficient search for matching entries, we
+ divide them by the directory depth, with a separate array
+ per depth. The entries within each depth are sorted by path,
+ allowing for a bisection search.
+
+ The max_mask and max_mask_subdir at each depth is the
+ bitwise or of the filters and subdir filters for all entries
+ at that depth. This allows a depth to be quickly skipped if
+ no entries will match the target filter
+ */
+ typedef struct {
+ uint32 max_mask;
+ uint32 max_mask_subdir;
+ uint32 num_entries;
+ notify_entry entries[num_entries];
+ } notify_depth;
+
+ typedef [public] struct {
+ uint32 num_depths;
+ notify_depth depth[num_depths];
+ } notify_array;
+
+ /* structure sent between servers in notify messages */
+ typedef [public] struct {
+ uint32 action;
+ utf8string path;
+ pointer private_data;
+ } notify_event;
+
+ typedef [v1_enum] enum {
+ FILE_ACTION_ADDED = 0x00000001,
+ FILE_ACTION_REMOVED = 0x00000002,
+ FILE_ACTION_MODIFIED = 0x00000003,
+ FILE_ACTION_RENAMED_OLD_NAME = 0x00000004,
+ FILE_ACTION_RENAMED_NEW_NAME = 0x00000005,
+ FILE_ACTION_ADDED_STREAM = 0x00000006,
+ FILE_ACTION_REMOVED_STREAM = 0x00000007,
+ FILE_ACTION_MODIFIED_STREAM = 0x00000008
+ } FILE_NOTIFY_ACTION;
+
+ /* structure sent at the CIFS layer */
+ /* Align on 4-byte boundary according to MS-CIFS 2.2.7.4.2 */
+ typedef [public,gensize,flag(NDR_ALIGN4)] struct {
+ uint32 NextEntryOffset;
+ FILE_NOTIFY_ACTION Action;
+ [value(strlen_m(FileName1)*2)] uint32 FileNameLength;
+ [charset(UTF16),flag(STR_NOTERM)] uint16 FileName1[FileNameLength];
+ } FILE_NOTIFY_INFORMATION;
+}
diff --git a/librpc/idl/wscript_build b/librpc/idl/wscript_build
index 1c5d6ec746..ffb7a9c808 100644
--- a/librpc/idl/wscript_build
+++ b/librpc/idl/wscript_build
@@ -10,6 +10,7 @@ bld.SAMBA_PIDL_LIST('PIDL',
dbgidl.idl dnsserver.idl echo.idl frsrpc.idl lsa.idl nbt.idl dns.idl
oxidresolver.idl samr.idl server_id.idl srvsvc.idl winreg.idl dcerpc.idl
drsblobs.idl efs.idl frstrans.idl mgmt.idl netlogon.idl
+ notify.idl
policyagent.idl scerpc.idl svcctl.idl wkssvc.idl eventlog6.idl backupkey.idl
printcap.idl''',
options='--header --ndr-parser --samba3-ndr-server --server --client --python',
diff --git a/librpc/wscript_build b/librpc/wscript_build
index 56959062f2..a68ce477dd 100644
--- a/librpc/wscript_build
+++ b/librpc/wscript_build
@@ -202,6 +202,11 @@ bld.SAMBA_SUBSYSTEM('NDR_IDMAP',
public_deps='ndr ndr-standard'
)
+bld.SAMBA_SUBSYSTEM('NDR_NOTIFY',
+ source='gen_ndr/ndr_notify.c',
+ public_deps='ndr ndr-standard NDR_SERVER_ID NDR_FILE_ID'
+ )
+
bld.SAMBA_SUBSYSTEM('NDR_NTLMSSP',
source='ndr/ndr_ntlmssp.c gen_ndr/ndr_ntlmssp.c',
public_deps='ndr ndr-standard'
@@ -312,7 +317,8 @@ bld.SAMBA_LIBRARY('ndr-standard',
pc_files='ndr_standard.pc',
deps='''NDR_SECURITY NDR_LSA NDR_SAMR NDR_NETLOGON NDR_EVENTLOG NDR_DFS
NDR_NTSVCS NDR_SVCCTL NDR_INITSHUTDOWN NDR_WKSSVC NDR_SRVSVC NDR_WINREG
- NDR_ECHO security NDR_DNS NDR_ATSVC NDR_SPOOLSS NDR_DSSETUP''',
+ NDR_ECHO security NDR_DNS NDR_ATSVC NDR_SPOOLSS NDR_DSSETUP
+ NDR_SERVER_ID NDR_NOTIFY''',
public_deps='ndr',
public_headers='gen_ndr/samr.h gen_ndr/ndr_samr.h gen_ndr/lsa.h gen_ndr/netlogon.h gen_ndr/atsvc.h gen_ndr/ndr_atsvc.h gen_ndr/ndr_svcctl.h gen_ndr/svcctl.h',
header_path='gen_ndr'