Added tap functionality to UDP
[obnox/wireshark/wip.git] / alignment.h
1  /*
2   * alignment.h, Copyright, 1998, Richard Sharpe, All Rights Reserved
3   *
4   * $Id: alignment.h,v 1.4 2002/08/28 21:00:05 jmayer Exp $
5   *
6   * Please see the file COPYING in the top level for details of copying
7   * this software. Use of this software is approved only under certain
8   * conditions.
9   *
10   * This file implements the alignment macros for the Threaded SMB Server
11   *
12   * For the moment we assume Intel style architecture, but can support
13   * others.
14   *
15   * Modification History
16   *
17   * 16-Oct-1998, RJS, Initial Coding
18   *
19   */
20
21 #ifndef __ALIGNMENT_H
22 #define __ALIGNMENT_H
23
24 #define GBYTE(buf, pos)        (unsigned char)((char)buf[pos])
25 #define GSHORT(buf, pos)       pletohs(&buf[pos])
26 #define GSSHORT(buf, pos)      (signed)pletohs(&buf[pos])
27 #define GWORD(buf, pos)        pletohl(&buf[pos])
28
29 #endif