summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr/ndr_notify.c
diff options
context:
space:
mode:
authorSteven Danneman <steven.danneman@isilon.com>2009-02-20 13:23:53 -0800
committerSteven Danneman <steven.danneman@isilon.com>2009-02-20 14:10:30 -0800
commitb329ea1cf35cfe151ac026eefc8ff82b2dfd711c (patch)
tree486f0d6d63c189e42b4bcac004ff0f20e39a4026 /source3/librpc/gen_ndr/ndr_notify.c
parent1a0aed36c0fc3815c832be1086a3a66256426414 (diff)
downloadsamba-b329ea1cf35cfe151ac026eefc8ff82b2dfd711c.tar.gz
samba-b329ea1cf35cfe151ac026eefc8ff82b2dfd711c.tar.bz2
samba-b329ea1cf35cfe151ac026eefc8ff82b2dfd711c.zip
s3: Modifications to generic notify structures to allow implementation of OneFS notify.
The OneFS kernel based change notify system takes an fd of the directory to watch in it's initialization syscall. Since we already have this directory open, this commit plumbs that fd down to the VFS layer via the notify_entry struct. We also need to know if the watch is taken out on a snapshot directory. The full file_id struct is also passed down to make this determination. The file_id marshalling wrappers are hand written here, but should eventually be auto-generated by moving the struct file_id into the idl.
Diffstat (limited to 'source3/librpc/gen_ndr/ndr_notify.c')
-rw-r--r--source3/librpc/gen_ndr/ndr_notify.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/librpc/gen_ndr/ndr_notify.c b/source3/librpc/gen_ndr/ndr_notify.c
index 00ba8bc293..d4ac42e961 100644
--- a/source3/librpc/gen_ndr/ndr_notify.c
+++ b/source3/librpc/gen_ndr/ndr_notify.c
@@ -10,6 +10,8 @@ _PUBLIC_ enum ndr_err_code ndr_push_notify_entry(struct ndr_push *ndr, int ndr_f
NDR_CHECK(ndr_push_server_id(ndr, NDR_SCALARS, &r->server));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->filter));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->subdir_filter));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dir_fd));
+ NDR_CHECK(ndr_push_file_id(ndr, NDR_SCALARS, &r->dir_id));
{
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
@@ -21,6 +23,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_notify_entry(struct ndr_push *ndr, int ndr_f
}
if (ndr_flags & NDR_BUFFERS) {
NDR_CHECK(ndr_push_server_id(ndr, NDR_BUFFERS, &r->server));
+ NDR_CHECK(ndr_push_file_id(ndr, NDR_BUFFERS, &r->dir_id));
}
return NDR_ERR_SUCCESS;
}
@@ -32,6 +35,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_notify_entry(struct ndr_pull *ndr, int ndr_f
NDR_CHECK(ndr_pull_server_id(ndr, NDR_SCALARS, &r->server));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->filter));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->subdir_filter));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dir_fd));
+ NDR_CHECK(ndr_pull_file_id(ndr, NDR_SCALARS, &r->dir_id));
{
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM);
@@ -43,6 +48,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_notify_entry(struct ndr_pull *ndr, int ndr_f
}
if (ndr_flags & NDR_BUFFERS) {
NDR_CHECK(ndr_pull_server_id(ndr, NDR_BUFFERS, &r->server));
+ NDR_CHECK(ndr_pull_file_id(ndr, NDR_BUFFERS, &r->dir_id));
}
return NDR_ERR_SUCCESS;
}
@@ -54,6 +60,8 @@ _PUBLIC_ void ndr_print_notify_entry(struct ndr_print *ndr, const char *name, co
ndr_print_server_id(ndr, "server", &r->server);
ndr_print_uint32(ndr, "filter", r->filter);
ndr_print_uint32(ndr, "subdir_filter", r->subdir_filter);
+ ndr_print_uint32(ndr, "dir_fd", r->dir_fd);
+ ndr_print_file_id(ndr, "dir_id", &r->dir_id);
ndr_print_string(ndr, "path", r->path);
ndr_print_uint32(ndr, "path_len", r->path_len);
ndr_print_pointer(ndr, "private_data", r->private_data);