Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
decode.h File Reference
#include <linux/err.h>
#include <linux/bug.h>
#include <linux/time.h>
#include <asm/unaligned.h>
#include <linux/ceph/types.h>

Go to the source code of this file.

Macros

#define ceph_decode_need(p, end, n, bad)
 
#define ceph_decode_64_safe(p, end, v, bad)
 
#define ceph_decode_32_safe(p, end, v, bad)
 
#define ceph_decode_16_safe(p, end, v, bad)
 
#define ceph_decode_8_safe(p, end, v, bad)
 
#define ceph_decode_copy_safe(p, end, pv, n, bad)
 
#define ceph_encode_need(p, end, n, bad)
 
#define ceph_encode_64_safe(p, end, v, bad)
 
#define ceph_encode_32_safe(p, end, v, bad)
 
#define ceph_encode_16_safe(p, end, v, bad)
 
#define ceph_encode_copy_safe(p, end, pv, n, bad)
 
#define ceph_encode_string_safe(p, end, s, n, bad)
 

Macro Definition Documentation

#define ceph_decode_16_safe (   p,
  end,
  v,
  bad 
)
Value:
do { \
ceph_decode_need(p, end, sizeof(u16), bad); \
v = ceph_decode_16(p); \
} while (0)

Definition at line 71 of file decode.h.

#define ceph_decode_32_safe (   p,
  end,
  v,
  bad 
)
Value:
do { \
ceph_decode_need(p, end, sizeof(u32), bad); \
v = ceph_decode_32(p); \
} while (0)

Definition at line 66 of file decode.h.

#define ceph_decode_64_safe (   p,
  end,
  v,
  bad 
)
Value:
do { \
ceph_decode_need(p, end, sizeof(u64), bad); \
v = ceph_decode_64(p); \
} while (0)

Definition at line 61 of file decode.h.

#define ceph_decode_8_safe (   p,
  end,
  v,
  bad 
)
Value:
do { \
ceph_decode_need(p, end, sizeof(u8), bad); \
v = ceph_decode_8(p); \
} while (0)

Definition at line 76 of file decode.h.

#define ceph_decode_copy_safe (   p,
  end,
  pv,
  n,
  bad 
)
Value:
do { \
ceph_decode_need(p, end, n, bad); \
ceph_decode_copy(p, pv, n); \
} while (0)

Definition at line 82 of file decode.h.

#define ceph_decode_need (   p,
  end,
  n,
  bad 
)
Value:
do { \
if (!likely(ceph_has_room(p, end, n))) \
goto bad; \
} while (0)

Definition at line 55 of file decode.h.

#define ceph_encode_16_safe (   p,
  end,
  v,
  bad 
)
Value:
do { \
ceph_encode_need(p, end, sizeof(u16), bad); \
ceph_encode_16(p, v); \
} while (0)

Definition at line 236 of file decode.h.

#define ceph_encode_32_safe (   p,
  end,
  v,
  bad 
)
Value:
do { \
ceph_encode_need(p, end, sizeof(u32), bad); \
ceph_encode_32(p, v); \
} while (0)

Definition at line 231 of file decode.h.

#define ceph_encode_64_safe (   p,
  end,
  v,
  bad 
)
Value:
do { \
ceph_encode_need(p, end, sizeof(u64), bad); \
ceph_encode_64(p, v); \
} while (0)

Definition at line 226 of file decode.h.

#define ceph_encode_copy_safe (   p,
  end,
  pv,
  n,
  bad 
)
Value:
do { \
ceph_encode_need(p, end, n, bad); \
ceph_encode_copy(p, pv, n); \
} while (0)

Definition at line 242 of file decode.h.

#define ceph_encode_need (   p,
  end,
  n,
  bad 
)
Value:
do { \
if (!likely(ceph_has_room(p, end, n))) \
goto bad; \
} while (0)

Definition at line 220 of file decode.h.

#define ceph_encode_string_safe (   p,
  end,
  s,
  n,
  bad 
)
Value:
do { \
ceph_encode_need(p, end, n, bad); \
ceph_encode_string(p, end, s, n); \
} while (0)

Definition at line 247 of file decode.h.