aboutsummaryrefslogtreecommitdiffstats
path: root/alignment.h
blob: 5918638885e8f52b6a2bc005fad1e66abe492ba0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 /*
  * alignment.h, Copyright, 1998, Richard Sharpe, All Rights Reserved
  *
  * $Id: alignment.h,v 1.4 2002/08/28 21:00:05 jmayer Exp $
  *
  * 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

#define GBYTE(buf, pos)        (unsigned char)((char)buf[pos])
#define GSHORT(buf, pos)       pletohs(&buf[pos])
#define GSSHORT(buf, pos)      (signed)pletohs(&buf[pos])
#define GWORD(buf, pos)        pletohl(&buf[pos])

#endif