summaryrefslogtreecommitdiff
path: root/source3/include/smb_macros.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-05-16 00:07:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:08 -0500
commit32106b23951e01fb17f814584ebbcc8d7288cb75 (patch)
treee14389fd1be0e7dae592d74f8c8518dd9a1b60a0 /source3/include/smb_macros.h
parent074af4b39d12312fc376e8d2f7bf84f0fd830874 (diff)
downloadsamba-32106b23951e01fb17f814584ebbcc8d7288cb75.tar.gz
samba-32106b23951e01fb17f814584ebbcc8d7288cb75.tar.bz2
samba-32106b23951e01fb17f814584ebbcc8d7288cb75.zip
r22920: Add in the UNIX capability for 24-bit readX, as discussed
with the Apple guys and Linux kernel guys. Still looking at how to do writeX as there's no recvfile(). Jeremy. (This used to be commit a53268fb2082de586e2df250d8ddfcff53379102)
Diffstat (limited to 'source3/include/smb_macros.h')
-rw-r--r--source3/include/smb_macros.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index bfed27c167..646c6bdce0 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -191,6 +191,10 @@
#define _smb_setlen(buf,len) do { buf[0] = 0; buf[1] = (len&0x10000)>>16; \
buf[2] = (len&0xFF00)>>8; buf[3] = len&0xFF; } while (0)
+#define smb_len_large(buf) (PVAL(buf,3)|(PVAL(buf,2)<<8)|(PVAL(buf,1)<<16))
+#define _smb_setlen_large(buf,len) do { buf[0] = 0; buf[1] = (len&0xFF0000)>>16; \
+ buf[2] = (len&0xFF00)>>8; buf[3] = len&0xFF; } while (0)
+
/*******************************************************************
find the difference in milliseconds between two struct timeval
values