summaryrefslogtreecommitdiffstats
path: root/contrib/tcpdump/smb.h
diff options
context:
space:
mode:
authorfenner <fenner@FreeBSD.org>2002-06-21 00:43:23 +0000
committerfenner <fenner@FreeBSD.org>2002-06-21 00:43:23 +0000
commit91fc581e384bca8ae8831d23b70ab73ab0dc1a21 (patch)
tree89431945035dbd4a9ce74e63c4a1f65ed4166a1a /contrib/tcpdump/smb.h
parentf815ae37f4671c581fdc1c6f99a8490a6dfbb4f6 (diff)
downloadFreeBSD-src-91fc581e384bca8ae8831d23b70ab73ab0dc1a21.zip
FreeBSD-src-91fc581e384bca8ae8831d23b70ab73ab0dc1a21.tar.gz
Import tcpdump 3.7.1, from
http://www.tcpdump.org/release/tcpdump-3.7.1.tar.gz
Diffstat (limited to 'contrib/tcpdump/smb.h')
-rw-r--r--contrib/tcpdump/smb.h51
1 files changed, 10 insertions, 41 deletions
diff --git a/contrib/tcpdump/smb.h b/contrib/tcpdump/smb.h
index 63be64b..3c5ba7d 100644
--- a/contrib/tcpdump/smb.h
+++ b/contrib/tcpdump/smb.h
@@ -1,44 +1,13 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/smb.h,v 1.3 2000/12/17 23:07:50 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/smb.h,v 1.7 2002/01/17 04:38:29 guy Exp $ (LBL) */
/*
- Copyright (C) Andrew Tridgell 1995-1999
+ * Copyright (C) Andrew Tridgell 1995-1999
+ *
+ * This software may be distributed either under the terms of the
+ * BSD-style license that accompanies tcpdump or the GNU GPL version 2
+ * or later
+ */
- This software may be distributed either under the terms of the
- BSD-style license that accompanies tcpdump or the GNU GPL version 2
- or later */
-
-#define CVAL(buf,pos) (((unsigned char *)(buf))[pos])
-#define PVAL(buf,pos) ((unsigned)CVAL(buf,pos))
-#define SCVAL(buf,pos,val) (CVAL(buf,pos) = (val))
-
-#define SVAL(buf,pos) (PVAL(buf,pos)|PVAL(buf,(pos)+1)<<8)
-#define IVAL(buf,pos) (SVAL(buf,pos)|SVAL(buf,(pos)+2)<<16)
-#define SSVALX(buf,pos,val) (CVAL(buf,pos)=(val)&0xFF,CVAL(buf,pos+1)=(val)>>8)
-#define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16))
-#define SVALS(buf,pos) ((int16)SVAL(buf,pos))
-#define IVALS(buf,pos) ((int32)IVAL(buf,pos))
-#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16)(val)))
-#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32)(val)))
-#define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16)(val)))
-#define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32)(val)))
-
-/* now the reverse routines - these are used in nmb packets (mostly) */
-#define SREV(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF))
-#define IREV(x) ((SREV(x)<<16) | (SREV((x)>>16)))
-
-#define RSVAL(buf,pos) SREV(SVAL(buf,pos))
-#define RIVAL(buf,pos) IREV(IVAL(buf,pos))
-#define RSSVAL(buf,pos,val) SSVAL(buf,pos,SREV(val))
-#define RSIVAL(buf,pos,val) SIVAL(buf,pos,IREV(val))
-
-#define uint16 unsigned short
-#define uint32 unsigned int
-#ifndef uchar
-#define uchar unsigned char
-#endif
-
-#ifndef MIN
-#define MIN(a,b) ((a)<(b)?(a):(b))
-#endif
+#define SMBMIN(a,b) ((a)<(b)?(a):(b))
/* the complete */
#define SMBmkdir 0x00 /* create directory */
@@ -147,7 +116,7 @@
#define TRANSACT2_FINDNOTIFYNEXT 12
#define TRANSACT2_MKDIR 13
-#define PTR_DIFF(p1,p2) ((unsigned long)(((char *)(p1)) - (char *)(p2)))
+#define PTR_DIFF(p1, p2) ((size_t)(((char *)(p1)) - (char *)(p2)))
/* some protos */
-const uchar *fdata(const uchar *buf, const char *fmt, const uchar *maxbuf);
+const u_char *smb_fdata(const u_char *, const char *, const u_char *);
OpenPOWER on IntegriCloud