summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-05-14 14:44:59 +0000
committerAndrew Tridgell <tridge@samba.org>2000-05-14 14:44:59 +0000
commit62a24c4bb39845d2e8a5096e4845148cbd6ae075 (patch)
treedc6dde23053e422b8eab9083c9663c530be62062
parent13371c4859046b9c8ea50b79b885c29adb6b7e4e (diff)
downloadsamba-62a24c4bb39845d2e8a5096e4845148cbd6ae075.tar.gz
samba-62a24c4bb39845d2e8a5096e4845148cbd6ae075.tar.bz2
samba-62a24c4bb39845d2e8a5096e4845148cbd6ae075.zip
add uint16 support, start to parse more of spoolss
(This used to be commit 05fa3ea50ab384ab8eebad87a538b3301ea65fa3)
-rw-r--r--source3/aparser/parser.c16
-rw-r--r--source3/aparser/parser.h1
-rw-r--r--source3/aparser/spool.struct33
3 files changed, 49 insertions, 1 deletions
diff --git a/source3/aparser/parser.c b/source3/aparser/parser.c
index 72042ba9f7..a324f804f8 100644
--- a/source3/aparser/parser.c
+++ b/source3/aparser/parser.c
@@ -304,3 +304,19 @@ BOOL prs_uint32s(BOOL charmode, char *name, prs_struct *ps, int depth, uint32 *d
return True;
}
+
+/*******************************************************************
+ Stream a uint16.
+ ********************************************************************/
+
+BOOL prs_uint16(char *name, prs_struct *ps, int depth, uint16 *data16)
+{
+ char *q = prs_mem_get(ps, sizeof(uint16));
+ if (q == NULL)
+ return False;
+
+ DBG_RW_SVAL(name, depth, ps->data_offset, ps->io, ps->bigendian_data, q, *data16)
+ ps->data_offset += sizeof(uint16);
+
+ return True;
+}
diff --git a/source3/aparser/parser.h b/source3/aparser/parser.h
index ec3fc7edc2..843d0c7a11 100644
--- a/source3/aparser/parser.h
+++ b/source3/aparser/parser.h
@@ -63,4 +63,5 @@ void dump_data(int level,char *buf1,int len);
BOOL prs_uint16s(BOOL charmode, char *name, prs_struct *ps, int depth, uint16 *data16s, int len);
BOOL prs_uint32s(BOOL charmode, char *name, prs_struct *ps, int depth, uint32 *data32s, int len);
BOOL prs_pointer(char *desc, prs_struct *ps, int depth, void **p);
+BOOL prs_uint16(char *name, prs_struct *ps, int depth, uint16 *data16);
diff --git a/source3/aparser/spool.struct b/source3/aparser/spool.struct
index 319a09941d..3e959e8f44 100644
--- a/source3/aparser/spool.struct
+++ b/source3/aparser/spool.struct
@@ -1,5 +1,5 @@
module spool
-test PRINTER_DRIVER_INFO_LEVEL_3
+test SPOOL_NOTIFY_INFO
struct BUFFER5 {
.align 4;
@@ -74,3 +74,34 @@ struct PRINTER_DRIVER_INFO {
case 6 PRINTER_DRIVER_INFO_LEVEL_6 info_6;
}
};
+
+
+struct NOTIFY_DATA_VALUE {
+ uint32 value0;
+ uint32 value1;
+};
+
+struct NOTIFY_DATA_STRING {
+ uint32 length;
+ {length} uint16 string;
+};
+
+struct SPOOL_NOTIFY_INFO_DATA {
+ uint16 type;
+ uint16 field;
+ uint32 reserved;
+ uint32 id;
+ union enc_type *notify_data {
+ case 1 NOTIFY_DATA_VALUE value;
+ case 0 NOTIFY_DATA_STRING string;
+ }
+ uint32 size;
+ uint32 enc_type;
+};
+
+struct SPOOL_NOTIFY_INFO {
+ uint32 version;
+ uint32 flags;
+ uint32 count;
+ SPOOL_NOTIFY_INFO_DATA *data;
+};