summaryrefslogtreecommitdiffstats
path: root/librpc
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-06-05 10:57:36 +0000
committerJeremy Allison <jra@samba.org>2014-06-12 03:34:41 +0200
commit1dda098401a208d792bccc4a3f9e1b56571e6309 (patch)
tree4c35ada460fef7f84342a0ec498a3b01c1b19b1c /librpc
parent4e95d785277439a4deb93029581cbd7ab0163680 (diff)
downloadsamba-1dda098401a208d792bccc4a3f9e1b56571e6309.tar.gz
samba-1dda098401a208d792bccc4a3f9e1b56571e6309.tar.xz
samba-1dda098401a208d792bccc4a3f9e1b56571e6309.zip
libsmb: Put the "smb2_lease" struct into idl
This will make it easier in the future to NDR_PRINT a lease and a lease key Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jun 12 03:34:41 CEST 2014 on sn-devel-104
Diffstat (limited to 'librpc')
-rw-r--r--librpc/idl/smb2_lease_struct.idl33
-rw-r--r--librpc/idl/wscript_build1
-rw-r--r--librpc/wscript_build6
3 files changed, 40 insertions, 0 deletions
diff --git a/librpc/idl/smb2_lease_struct.idl b/librpc/idl/smb2_lease_struct.idl
new file mode 100644
index 00000000000..ea28548956c
--- /dev/null
+++ b/librpc/idl/smb2_lease_struct.idl
@@ -0,0 +1,33 @@
+#include "idl_types.h"
+
+/*
+ miscellaneous IDL structures
+*/
+
+[
+ pointer_default(unique)
+]
+interface smb2_lease_struct
+{
+ /*
+ * SMB2 lease structure (per MS-SMB2 2.2.13)
+ */
+ typedef [public] struct {
+ hyper data[2];
+ } smb2_lease_key;
+
+ typedef [public,bitmap32bit] bitmap {
+ SMB2_LEASE_READ = 0x01,
+ SMB2_LEASE_WRITE = 0x02,
+ SMB2_LEASE_HANDLE = 0x04
+ } smb2_lease_state;
+
+ typedef [public] struct {
+ smb2_lease_key lease_key;
+ smb2_lease_state lease_state;
+ uint32 lease_flags;
+ uint32 lease_duration; /* should be 0 */
+ smb2_lease_key parent_lease_key;
+ uint16 lease_epoch;
+ } smb2_lease;
+}; \ No newline at end of file
diff --git a/librpc/idl/wscript_build b/librpc/idl/wscript_build
index d1484afcda5..1bac9a74d2b 100644
--- a/librpc/idl/wscript_build
+++ b/librpc/idl/wscript_build
@@ -11,6 +11,7 @@ bld.SAMBA_PIDL_LIST('PIDL',
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
+ smb2_lease_struct.idl
policyagent.idl scerpc.idl svcctl.idl wkssvc.idl eventlog6.idl backupkey.idl
fsrvp.idl witness.idl''',
options='--header --ndr-parser --samba3-ndr-server --server --client --python',
diff --git a/librpc/wscript_build b/librpc/wscript_build
index 393f57979a6..b21619e244c 100644
--- a/librpc/wscript_build
+++ b/librpc/wscript_build
@@ -353,6 +353,12 @@ bld.SAMBA_SUBSYSTEM('NDR_XATTR',
public_deps='ndr NDR_SECURITY'
)
+bld.SAMBA_SUBSYSTEM('NDR_SMB2_LEASE_STRUCT',
+ source='gen_ndr/ndr_smb2_lease_struct.c',
+ public_deps='ndr',
+ public_headers='gen_ndr/smb2_lease_struct.h'
+ )
+
bld.SAMBA_SUBSYSTEM('NDR_SCHANNEL',
source='ndr/ndr_schannel.c gen_ndr/ndr_schannel.c',
public_deps='ndr ndr_nbt'