|
#define | CAREFUL_ALIGNMENT 1 |
|
#define | CVAL(buf, pos) ((unsigned) (((const unsigned char *) (buf))[pos])) |
|
#define | CVAL_NC(buf, pos) (((unsigned char *) (buf))[pos]) /* Non-const version of CVAL */ |
|
#define | PVAL(buf, pos) (CVAL (buf, pos)) |
|
#define | SCVAL(buf, pos, val) (CVAL_NC (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) |
|
#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))) |
|
#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 | RSVALS(buf, pos) SREV (SVALS (buf, pos)) |
|
#define | RIVAL(buf, pos) IREV (IVAL (buf, pos)) |
|
#define | RIVALS(buf, pos) IREV (IVALS (buf, pos)) |
|
#define | RSSVAL(buf, pos, val) SSVAL (buf, pos, SREV (val)) |
|
#define | RSSVALS(buf, pos, val) SSVALS (buf, pos, SREV (val)) |
|
#define | RSIVAL(buf, pos, val) SIVAL (buf, pos, IREV (val)) |
|
#define | RSIVALS(buf, pos, val) SIVALS (buf, pos, IREV (val)) |
|
#define | ALIGN4(p, base) ((p) + ((4 - (PTR_DIFF ((p), (base)) & 3)) & 3)) |
|
#define | ALIGN2(p, base) ((p) + ((2 - (PTR_DIFF ((p), (base)) & 1)) & 1)) |
|
Unix SMB/CIFS implementation. SMB Byte handling.