summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-10-20 09:40:01 +0200
committerStefan Metzmacher <metze@samba.org>2011-10-21 08:42:59 +0200
commit32938ce60dff821964dbc199c47abe2e7a8fa1ea (patch)
tree0a2e66c4b4a1cf7761e97a67448ecd1220c09b42
parent1af128bd2bcbc523167e9d91cb26b4dd48020ca5 (diff)
downloadsamba-32938ce60dff821964dbc199c47abe2e7a8fa1ea.tar.gz
samba-32938ce60dff821964dbc199c47abe2e7a8fa1ea.tar.bz2
samba-32938ce60dff821964dbc199c47abe2e7a8fa1ea.zip
libcli/smb: move some common defines to smb_constants.h
metze
-rw-r--r--libcli/smb/smb_constants.h27
-rw-r--r--source3/include/smb.h27
-rw-r--r--source4/libcli/raw/smb.h28
3 files changed, 27 insertions, 55 deletions
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
index 91330ddbae..886e35884f 100644
--- a/libcli/smb/smb_constants.h
+++ b/libcli/smb/smb_constants.h
@@ -32,6 +32,33 @@
#define NBSSretarget 0x84 /* retarget session response */
#define NBSSkeepalive 0x85 /* keepalive */
+#define SMB_MAGIC 0x424D53FF /* 0xFF 'S' 'M' 'B' */
+
+/* the basic packet size, assuming no words or bytes. Does not include the NBT header */
+#define MIN_SMB_SIZE 35
+
+/* when using NBT encapsulation every packet has a 4 byte header */
+#define NBT_HDR_SIZE 4
+
+/* offsets into message header for common items - NOTE: These have
+ changed from being offsets from the base of the NBT packet to the base of the SMB packet.
+ this has reduced all these values by 4
+*/
+#define HDR_COM 4
+#define HDR_RCLS 5
+#define HDR_REH 6
+#define HDR_ERR 7
+#define HDR_FLG 9
+#define HDR_FLG2 10
+#define HDR_PIDHIGH 12
+#define HDR_SS_FIELD 14
+#define HDR_TID 24
+#define HDR_PID 26
+#define HDR_UID 28
+#define HDR_MID 30
+#define HDR_WCT 32
+#define HDR_VWV 33
+
#define smb_len_nbt(buf) (RIVAL(buf, 0) & 0x1FFFF)
#define _smb_setlen_nbt(buf,len) RSIVAL(buf, 0, (len) & 0x1FFFF)
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 4a26a12ee8..8e0e8efa80 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -692,33 +692,6 @@ struct connections_data {
uint32 unused_compatitibility_field;
};
-#define SMB_MAGIC 0x424D53FF /* 0xFF 'S' 'M' 'B' */
-
-/* the basic packet size, assuming no words or bytes. Does not include the NBT header */
-#define MIN_SMB_SIZE 35
-
-/* when using NBT encapsulation every packet has a 4 byte header */
-#define NBT_HDR_SIZE 4
-
-/* offsets into message header for common items - NOTE: These have
- changed from being offsets from the base of the NBT packet to the base of the SMB packet.
- this has reduced all these values by 4
-*/
-#define HDR_COM 4
-#define HDR_RCLS 5
-#define HDR_REH 6
-#define HDR_ERR 7
-#define HDR_FLG 9
-#define HDR_FLG2 10
-#define HDR_PIDHIGH 12
-#define HDR_SS_FIELD 14
-#define HDR_TID 24
-#define HDR_PID 26
-#define HDR_UID 28
-#define HDR_MID 30
-#define HDR_WCT 32
-#define HDR_VWV 33
-
/* offsets into message for common items */
#define smb_com (NBT_HDR_SIZE+HDR_COM)
#define smb_rcls (NBT_HDR_SIZE+HDR_RCLS)
diff --git a/source4/libcli/raw/smb.h b/source4/libcli/raw/smb.h
index ced74133a7..3178c898d6 100644
--- a/source4/libcli/raw/smb.h
+++ b/source4/libcli/raw/smb.h
@@ -206,34 +206,6 @@
incorrect parameters - what does it mean? maybe created temporary file? */
#define NTCREATEX_ACTION_UNKNOWN 5
-#define SMB_MAGIC 0x424D53FF /* 0xFF 'S' 'M' 'B' */
-
-/* the basic packet size, assuming no words or bytes. Does not include the NBT header */
-#define MIN_SMB_SIZE 35
-
-/* when using NBT encapsulation every packet has a 4 byte header */
-#define NBT_HDR_SIZE 4
-
-/* offsets into message header for common items - NOTE: These have
- changed from being offsets from the base of the NBT packet to the base of the SMB packet.
- this has reduced all these values by 4
-*/
-#define HDR_COM 4
-#define HDR_RCLS 5
-#define HDR_REH 6
-#define HDR_ERR 7
-#define HDR_FLG 9
-#define HDR_FLG2 10
-#define HDR_PIDHIGH 12
-#define HDR_SS_FIELD 14
-#define HDR_TID 24
-#define HDR_PID 26
-#define HDR_UID 28
-#define HDR_MID 30
-#define HDR_WCT 32
-#define HDR_VWV 33
-
-
/* types of buffers in core SMB protocol */
#define SMB_DATA_BLOCK 0x1
#define SMB_ASCII4 0x4