summaryrefslogtreecommitdiff
path: root/source/smbparse.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1997-10-06 13:30:54 +0000
committerLuke Leighton <lkcl@samba.org>1997-10-06 13:30:54 +0000
commita1c718728c46ebf8916af8985b4dae4d099f4ec2 (patch)
treea73505c059d4249eaad3725b9b332e8e553b6258 /source/smbparse.c
parent2f722fe289051558dbe77aeb0a830bb3ded10a83 (diff)
downloadsamba-a1c718728c46ebf8916af8985b4dae4d099f4ec2.tar.gz
Makefile: added lsaparse.c and smbparse.c
lsaparse.c, smbparse.c, smb.h: more functions / structures. proto.h: the usual.
Diffstat (limited to 'source/smbparse.c')
-rw-r--r--source/smbparse.c37
1 files changed, 36 insertions, 1 deletions
diff --git a/source/smbparse.c b/source/smbparse.c
index e109f09a6f6..c44c41c4cd9 100644
--- a/source/smbparse.c
+++ b/source/smbparse.c
@@ -2,7 +2,7 @@
Unix SMB/Netbios implementation.
Version 1.9.
Samba utility functions
- Copyright (C) Luke Leighton 1996 - 1997
+ Copyright (C) Luke Leighton 1996 - 1997 Paul Ashton 1997
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -498,6 +498,41 @@ char* smb_io_dom_r_ref(BOOL io, DOM_R_REF *r_r, char *q, char *base, int align)
return q;
}
+/*******************************************************************
+reads or writes a DOM_NAME structure.
+********************************************************************/
+char* smb_io_dom_name(BOOL io, DOM_NAME *name, char *q, char *base, int align)
+{
+ if (name == NULL) return NULL;
+
+ q = align_offset(q, base, align);
+
+ RW_IVAL(io, q, name->uni_str_len, 0); q += 4;
+
+ /* don't know if len is specified by uni_str_len member... */
+ /* assume unicode string is unicode-null-terminated, instead */
+
+ q = smb_io_unistr(io, &(name->buffer), q, base, align);
+
+ return q;
+}
+
+
+/*******************************************************************
+reads or writes a structure.
+********************************************************************/
+char* smb_io_neg_flags(BOOL io, NEG_FLAGS *neg, char *q, char *base, int align)
+{
+ if (neg == NULL) return NULL;
+
+ q = align_offset(q, base, align);
+
+ RW_IVAL(io, q, neg->neg_flags, 0); q += 4;
+
+ return q;
+}
+
+
#if 0
/*******************************************************************
reads or writes a structure.