summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-10-19 13:48:09 +0200
committerStefan Metzmacher <metze@samba.org>2011-10-19 15:44:29 +0200
commitda32fb6b404a38b2043bfe55bc97e94e6ae68f7f (patch)
treeb575135f1ae1f58bf46ec1da79fb7751dfd7ab3b /source3/include
parentcd227634408c54a917d7cb5f8877b373a688eb8e (diff)
downloadsamba-da32fb6b404a38b2043bfe55bc97e94e6ae68f7f.tar.gz
samba-da32fb6b404a38b2043bfe55bc97e94e6ae68f7f.tar.bz2
samba-da32fb6b404a38b2043bfe55bc97e94e6ae68f7f.zip
s3:include: use smb_[set]len_[nbt|tcp]() macros
metze
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/smb_macros.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 3be02243e9..bed463d136 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -132,11 +132,11 @@
/* Note that chain_size must be available as an extern int to this macro. */
#define smb_offset(p,buf) (PTR_DIFF(p,buf+4))
-#define smb_len(buf) (RIVAL(buf, 0) & 0x1FFFF)
-#define _smb_setlen(buf,len) RSIVAL(buf, 0, (len) & 0x1FFFF)
+#define smb_len(buf) smb_len_nbt(buf)
+#define _smb_setlen(buf, len) _smb_setlen_nbt(buf, len)
-#define smb_len_large(buf) (RIVAL(buf, 0) & 0xFFFFFF)
-#define _smb_setlen_large(buf,len) RSIVAL(buf, 0, (len) & 0xFFFFFF)
+#define smb_len_large(buf) smb_len_tcp(buf)
+#define _smb_setlen_large(buf, len) _smb_setlen_tcp(buf, len)
#define ENCRYPTION_REQUIRED(conn) ((conn) ? ((conn)->encrypt_level == Required) : false)
#define IS_CONN_ENCRYPTED(conn) ((conn) ? (conn)->encrypted_tid : false)