diff options
author | Jean-François Micouleau <jfm@samba.org> | 2000-02-07 16:25:15 +0000 |
---|---|---|
committer | Jean-François Micouleau <jfm@samba.org> | 2000-02-07 16:25:15 +0000 |
commit | 195e3d44daccc3b6457486018ba0322ac9d44566 (patch) | |
tree | aa6de6d3e640dc029b41deabc1a87e02a0ffebff /source3/rpc_parse/parse_misc.c | |
parent | 59ac32c2556e970ea1fe171e7b76cfee2142fbf0 (diff) | |
download | samba-195e3d44daccc3b6457486018ba0322ac9d44566.tar.gz samba-195e3d44daccc3b6457486018ba0322ac9d44566.tar.bz2 samba-195e3d44daccc3b6457486018ba0322ac9d44566.zip |
spoolss definitions.
also added some prs_struct functions, 'cause I'm handling buffers as
prs_struct.
J.F.
(This used to be commit 81e375bbbe0fb022a44a2aaaa3729a9518b7a854)
Diffstat (limited to 'source3/rpc_parse/parse_misc.c')
-rw-r--r-- | source3/rpc_parse/parse_misc.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c index 5277825767..21d97b444c 100644 --- a/source3/rpc_parse/parse_misc.c +++ b/source3/rpc_parse/parse_misc.c @@ -593,6 +593,31 @@ BOOL smb_io_buffer3(char *desc, BUFFER3 *buf3, prs_struct *ps, int depth) } /******************************************************************* +reads or writes a BUFFER5 structure. +the buf_len member tells you how large the buffer is. +********************************************************************/ +BOOL smb_io_buffer5(char *desc, BUFFER5 *buf5, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "smb_io_buffer4"); + depth++; + + if (buf5 == NULL) return False; + + prs_align(ps); + prs_uint32("buf_len", ps, depth, &(buf5->buf_len)); + + /* reading: alloc the buffer first */ + if ( ps->io ) + { + buf5->buffer=(uint16 *)malloc( sizeof(uint16)*buf5->buf_len ); + } + + prs_uint16s(True, "buffer", ps, depth, buf5->buffer, buf5->buf_len); + + return True; +} + +/******************************************************************* Inits a BUFFER2 structure. ********************************************************************/ |