Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
macros.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FOR_BLOCKS(length, dst, src, blocksize)
#define LE_READ_UINT16(p)
#define LE_READ_UINT32(p)
#define LE_WRITE_UINT16(p, i)
#define LE_WRITE_UINT32(p, i)
#define READ_UINT16(p)
#define READ_UINT24(p)
#define READ_UINT32(p)
#define WRITE_UINT16(p, i)
#define WRITE_UINT24(p, i)
#define WRITE_UINT32(p, i)

Macro Definition Documentation

#define FOR_BLOCKS (   length,
  dst,
  src,
  blocksize 
)
Value:
assert( !((length) % (blocksize))); \
for (; (length); ((length) -= (blocksize), \
(dst) += (blocksize), \
(src) += (blocksize)) )
#define LE_READ_UINT16 (   p)
Value:
( (((uint32_t) (p)[1]) << 8) \
| ((uint32_t) (p)[0]))
#define LE_READ_UINT32 (   p)
Value:
( (((uint32_t) (p)[3]) << 24) \
| (((uint32_t) (p)[2]) << 16) \
| (((uint32_t) (p)[1]) << 8) \
| ((uint32_t) (p)[0]))
#define LE_WRITE_UINT16 (   p,
  i 
)
Value:
do { \
(p)[1] = ((i) >> 8) & 0xff; \
(p)[0] = (i) & 0xff; \
} while(0)
#define LE_WRITE_UINT32 (   p,
  i 
)
Value:
do { \
(p)[3] = ((i) >> 24) & 0xff; \
(p)[2] = ((i) >> 16) & 0xff; \
(p)[1] = ((i) >> 8) & 0xff; \
(p)[0] = (i) & 0xff; \
} while(0)
#define READ_UINT16 (   p)
Value:
( (((uint32_t) (p)[0]) << 8) \
| ((uint32_t) (p)[1]))
#define READ_UINT24 (   p)
Value:
( (((uint32_t) (p)[0]) << 16) \
| (((uint32_t) (p)[1]) << 8) \
| ((uint32_t) (p)[2]))
#define READ_UINT32 (   p)
Value:
( (((uint32_t) (p)[0]) << 24) \
| (((uint32_t) (p)[1]) << 16) \
| (((uint32_t) (p)[2]) << 8) \
| ((uint32_t) (p)[3]))
#define WRITE_UINT16 (   p,
  i 
)
Value:
do { \
(p)[0] = ((i) >> 8) & 0xff; \
(p)[1] = (i) & 0xff; \
} while(0)
#define WRITE_UINT24 (   p,
  i 
)
Value:
do { \
(p)[0] = ((i) >> 16) & 0xff; \
(p)[1] = ((i) >> 8) & 0xff; \
(p)[2] = (i) & 0xff; \
} while(0)
#define WRITE_UINT32 (   p,
  i 
)
Value:
do { \
(p)[0] = ((i) >> 24) & 0xff; \
(p)[1] = ((i) >> 16) & 0xff; \
(p)[2] = ((i) >> 8) & 0xff; \
(p)[3] = (i) & 0xff; \
} while(0)