diff options
author | Luke Leighton <lkcl@samba.org> | 1997-10-06 13:30:54 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1997-10-06 13:30:54 +0000 |
commit | 0e151792c3289ce2253d1940d07f6caa12774118 (patch) | |
tree | 2ba8e93ecf514d845f72208d9dd17147bf523c24 /source3/smbparse.c | |
parent | 84e362dd132e250ddb5ca0223e2b27dc484b3ff7 (diff) | |
download | samba-0e151792c3289ce2253d1940d07f6caa12774118.tar.gz samba-0e151792c3289ce2253d1940d07f6caa12774118.tar.bz2 samba-0e151792c3289ce2253d1940d07f6caa12774118.zip |
Makefile: added lsaparse.c and smbparse.c
lsaparse.c, smbparse.c, smb.h: more functions / structures.
proto.h: the usual.
(This used to be commit a1c718728c46ebf8916af8985b4dae4d099f4ec2)
Diffstat (limited to 'source3/smbparse.c')
-rw-r--r-- | source3/smbparse.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/source3/smbparse.c b/source3/smbparse.c index e109f09a6f..c44c41c4cd 100644 --- a/source3/smbparse.c +++ b/source3/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. |