#ifndef __CEPH_DECODE_H
#define __CEPH_DECODE_H
#include <linux/err.h>
#include <linux/bug.h>
#include <linux/slab.h>
#include <linux/time.h>
#include <linux/unaligned.h>
#include <linux/ceph/types.h>
static inline u64 ceph_decode_64(void **p)
{ … }
static inline u32 ceph_decode_32(void **p)
{ … }
static inline u16 ceph_decode_16(void **p)
{ … }
static inline u8 ceph_decode_8(void **p)
{ … }
static inline void ceph_decode_copy(void **p, void *pv, size_t n)
{ … }
static inline bool ceph_has_room(void **p, void *end, size_t n)
{ … }
#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) …
static inline char *ceph_extract_encoded_string(void **p, void *end,
size_t *lenp, gfp_t gfp)
{ … }
#define ceph_decode_skip_n(p, end, n, bad) …
#define ceph_decode_skip_64(p, end, bad) …
#define ceph_decode_skip_32(p, end, bad) …
#define ceph_decode_skip_16(p, end, bad) …
#define ceph_decode_skip_8(p, end, bad) …
#define ceph_decode_skip_string(p, end, bad) …
#define ceph_decode_skip_set(p, end, type, bad) …
#define ceph_decode_skip_map(p, end, ktype, vtype, bad) …
#define ceph_decode_skip_map_of_map(p, end, ktype1, ktype2, vtype2, bad) …
static inline void ceph_decode_timespec64(struct timespec64 *ts,
const struct ceph_timespec *tv)
{ … }
static inline void ceph_encode_timespec64(struct ceph_timespec *tv,
const struct timespec64 *ts)
{ … }
#define CEPH_ENTITY_ADDR_TYPE_NONE …
#define CEPH_ENTITY_ADDR_TYPE_LEGACY …
#define CEPH_ENTITY_ADDR_TYPE_MSGR2 …
#define CEPH_ENTITY_ADDR_TYPE_ANY …
static inline void ceph_encode_banner_addr(struct ceph_entity_addr *a)
{ … }
static inline void ceph_decode_banner_addr(struct ceph_entity_addr *a)
{ … }
extern int ceph_decode_entity_addr(void **p, void *end,
struct ceph_entity_addr *addr);
int ceph_decode_entity_addrvec(void **p, void *end, bool msgr2,
struct ceph_entity_addr *addr);
int ceph_entity_addr_encoding_len(const struct ceph_entity_addr *addr);
void ceph_encode_entity_addr(void **p, const struct ceph_entity_addr *addr);
static inline void ceph_encode_64(void **p, u64 v)
{ … }
static inline void ceph_encode_32(void **p, u32 v)
{ … }
static inline void ceph_encode_16(void **p, u16 v)
{ … }
static inline void ceph_encode_8(void **p, u8 v)
{ … }
static inline void ceph_encode_copy(void **p, const void *s, int len)
{ … }
static inline void ceph_encode_filepath(void **p, void *end,
u64 ino, const char *path)
{ … }
static inline void ceph_encode_string(void **p, void *end,
const char *s, u32 len)
{ … }
#define CEPH_ENCODING_START_BLK_LEN …
static inline void ceph_start_encoding(void **p, u8 struct_v, u8 struct_compat,
u32 struct_len)
{ … }
static inline int ceph_start_decoding(void **p, void *end, u8 v,
const char *name, u8 *struct_v,
u32 *struct_len)
{ … }
#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_8_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) …
#endif