summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_parse/parse_misc.c')
-rw-r--r--source3/rpc_parse/parse_misc.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index 5e83cfeaf3..69455b7b42 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -558,6 +558,22 @@ BOOL smb_io_buffer3(char *desc, BUFFER3 *buf3, prs_struct *ps, int depth)
}
/*******************************************************************
+creates a BUFFER4 structure.
+********************************************************************/
+BOOL make_buffer4_str(BUFFER4 *str, const char *buf, int len)
+{
+ ZERO_STRUCTP(str);
+
+ /* set up string lengths. */
+ str->buf_len = len * 2;
+
+ /* store the string (little endian buffer) */
+ ascii_to_unibuf((char*)str->buffer, buf, str->buf_len);
+
+ return True;
+}
+
+/*******************************************************************
reads or writes a BUFFER4 structure.
********************************************************************/
BOOL smb_io_buffer4(char *desc, BUFFER4 *buf4, uint32 buffer, prs_struct *ps, int depth)