diff options
author | Richard Sharpe <sharpe@ns.aus.com> | 1999-05-09 04:20:59 +0000 |
---|---|---|
committer | Richard Sharpe <sharpe@ns.aus.com> | 1999-05-09 04:20:59 +0000 |
commit | 54e5da8bac9e1f206b6be24a3548eece7ac27899 (patch) | |
tree | 6e4bea4b3afb937cabbb511f0aa6aa1173ac746f /alignment.h | |
parent | 8b00cf57b3072a28fe619342e50f48135b61afc4 (diff) | |
download | wireshark-54e5da8bac9e1f206b6be24a3548eece7ac27899.tar.gz wireshark-54e5da8bac9e1f206b6be24a3548eece7ac27899.tar.bz2 wireshark-54e5da8bac9e1f206b6be24a3548eece7ac27899.zip |
Added new files for SMB decode: packet-smb.c, alignment.h, smb.h
svn path=/trunk/; revision=259
Diffstat (limited to 'alignment.h')
-rw-r--r-- | alignment.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/alignment.h b/alignment.h new file mode 100644 index 0000000000..e585f515e7 --- /dev/null +++ b/alignment.h @@ -0,0 +1,36 @@ + /* + * alignment.h, Copyright, 1998, Richard Sharpe, All Rights Reserved + * + * Please see the file COPYING in the top level for details of copying + * this software. Use of this software is approved only under certain + * conditions. + * + * This file implements the alignment macros for the Threaded SMB Server + * + * For the moment we assume Intel style architecture, but can support + * others. + * + * Modification History + * + * 16-Oct-1998, RJS, Initial Coding + * + */ + +#ifndef __ALIGNMENT_H +#define __ALIGNMENT_H +#ifdef __i386__ + +#define GBYTE(buf, pos) (unsigned char)((char)buf[pos]) +#define PBYTE(buf, pos, val) GBYTE(buf, pos) = (unsigned char)(val) +#define GSHORT(buf, pos) ((unsigned short *)((buf) + pos))[0] +#define PSHORT(buf, pos, val) GSHORT(buf, pos) = (unsigned short)(val) +#define GSSHORT(buf, pos) ((signed short *)((buf) + pos))[0] + +#define GWORD(buf, pos) ((unsigned int *)((buf) + pos))[0] +#define PWORD(buf, pos, val) GWORD(buf, pos) = (unsigned int)(val) + +#else + + +#endif +#endif |