summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1997-10-14 18:37:55 +0000
committerLuke Leighton <lkcl@samba.org>1997-10-14 18:37:55 +0000
commit8fe499f7752ec2d7f2c1bd71e73077b1f1675125 (patch)
tree416915b01a199a8960303b8bbeee8232959ba065 /source3/include
parent6084046eede3652d7cabafb33227e940f00f92a8 (diff)
downloadsamba-8fe499f7752ec2d7f2c1bd71e73077b1f1675125.tar.gz
samba-8fe499f7752ec2d7f2c1bd71e73077b1f1675125.tar.bz2
samba-8fe499f7752ec2d7f2c1bd71e73077b1f1675125.zip
byteorder.h:
created a RW_PIVAL macro which was missing. smbparse.c: smb_io_dom_sid() was storing its sub-authorities as uint16s instead of uint32s. used the DBG_RW_PIVAL macro instead of DBG_RW_PSVAL. pipentlsa.c: not sure. something to do with the Query Info reply. pipeutil.c: make_rpc_reply() had the packed representation field set to 0x0100 0000 instead of 0x1000 0000, which had the interesting result of turning all uint32 and uint16 field byte ordering the other way round! (This used to be commit eafd6e9e797c5badb07059d7eddabd6a8947c830)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/byteorder.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/source3/include/byteorder.h b/source3/include/byteorder.h
index 06337b91a2..e11771c3ab 100644
--- a/source3/include/byteorder.h
+++ b/source3/include/byteorder.h
@@ -94,6 +94,10 @@ it also defines lots of intermediate macros, just ignore those :-)
if (read) { PCVAL (inbuf,0,outbuf,len) } \
else { PSCVAL(inbuf,0,outbuf,len) }
+#define RW_PIVAL(read,inbuf,outbuf,len) \
+ if (read) { PIVAL (inbuf,0,outbuf,len) } \
+ else { PSIVAL(inbuf,0,outbuf,len) }
+
#define RW_PSVAL(read,inbuf,outbuf,len) \
if (read) { PSVAL (inbuf,0,outbuf,len) } \
else { PSSVAL(inbuf,0,outbuf,len) }
@@ -202,14 +206,21 @@ it also defines lots of intermediate macros, just ignore those :-)
RW_PCVAL(read,inbuf,outbuf,len) \
DEBUG(5,("%s%04x %s: ", \
tab_depth(depth), PTR_DIFF(inbuf,base),string)); \
- { int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%x ", (outbuf)[idx])); } } \
+ { int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%02x ", (outbuf)[idx])); } } \
DEBUG(5,("\n"));
#define DBG_RW_PSVAL(string,depth,base,read,inbuf,outbuf,len) \
RW_PSVAL(read,inbuf,outbuf,len) \
DEBUG(5,("%s%04x %s: ", \
tab_depth(depth), PTR_DIFF(inbuf,base),string)); \
- { int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%02x ", (outbuf)[idx])); } } \
+ { int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%04x ", (outbuf)[idx])); } } \
+ DEBUG(5,("\n"));
+
+#define DBG_RW_PIVAL(string,depth,base,read,inbuf,outbuf,len) \
+ RW_PIVAL(read,inbuf,outbuf,len) \
+ DEBUG(5,("%s%04x %s: ", \
+ tab_depth(depth), PTR_DIFF(inbuf,base),string)); \
+ { int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%08x ", (outbuf)[idx])); } } \
DEBUG(5,("\n"));
#define DBG_RW_CVAL(string,depth,base,read,inbuf,outbuf) \