25 #ifndef __MOTR_XCODE_XCODE_H__ 26 #define __MOTR_XCODE_XCODE_H__ 156 struct m0_xcode_field_ops;
514 M0_INTERNAL
struct m0_xcode_cursor_frame *
645 void *),
void *datum);
780 uint32_t on, uint32_t off,
781 uint64_t aggr_umask);
821 #define M0_XCODE_VAL(obj, fieldno, elno, __type) \ 822 ((__type *)m0_xcode_addr(obj, fieldno, elno)) 890 const char *discriminator,
958 size_t magix_field, uint64_t
magix);
962 #define M0_XCODE_OBJ(type, ptr) (struct m0_xcode_obj){ \ void(* xcx_free)(struct m0_xcode_cursor *ctx)
struct m0_xcode_cursor xcx_it
M0_INTERNAL struct m0_xcode_cursor_frame * m0_xcode_cursor_top(struct m0_xcode_cursor *it)
struct m0_xcode_obj s_obj
M0_INTERNAL int m0_xcode_encdec(struct m0_xcode_obj *obj, struct m0_bufvec_cursor *cur, enum m0_xcode_what what)
M0_INTERNAL void * m0_xcode_addr(const struct m0_xcode_obj *obj, int fileno, uint64_t elno)
M0_INTERNAL int m0_xcode_print(const struct m0_xcode_obj *obj, char *str, int nr)
M0_INTERNAL void * m0_xcode_ctx_top(const struct m0_xcode_ctx *ctx)
const struct m0_xcode_type * xo_type
const struct m0_xcode_type * xf_type
M0_EXTERN ssize_t m0_xcode_alloc_obj(struct m0_xcode_cursor *it, void *(*alloc)(struct m0_xcode_cursor *, size_t))
M0_INTERNAL void m0_xcode_type_iterate(struct m0_xcode_type *xt, void(*t)(struct m0_xcode_type *, void *), void(*f)(struct m0_xcode_type *, struct m0_xcode_field *, void *), void *datum)
M0_INTERNAL void m0_xcode_union_close(struct m0_xcode_type *un)
static struct buffer * cur(struct m0_addb2_mach *mach, m0_bcount_t space)
static uint64_t tag(uint8_t code, uint64_t id)
M0_INTERNAL int m0_xcode_read(struct m0_xcode_obj *obj, const char *str)
void m0_xc_u16_init(void)
M0_INTERNAL int m0_xcode_subobj(struct m0_xcode_obj *subobj, const struct m0_xcode_obj *obj, int fieldno, uint64_t elno)
static struct m0_be_emap_cursor it
struct m0_bufvec_cursor xcx_buf
struct m0_xcode_field xct_child[0]
int(* xto_length)(struct m0_xcode_ctx *ctx, const void *obj)
M0_INTERNAL void m0_xcode_free_obj(struct m0_xcode_obj *obj)
struct m0_xcode_cursor::m0_xcode_cursor_frame xcu_stack[M0_XCODE_DEPTH_MAX]
M0_INTERNAL int m0_xcode_decode(struct m0_xcode_ctx *ctx)
const struct m0_xcode_type_ops * xct_ops
static struct m0_xcode_type ** xt[]
void m0_xc_void_init(void)
const char * m0_xcode_endianness_name[M0_XEND_NR]
M0_INTERNAL int m0_xcode_dup(struct m0_xcode_ctx *dest, struct m0_xcode_ctx *src)
const char * m0_xcode_cursor_flag_name[M0_XCODE_CURSOR_NR]
M0_INTERNAL int m0_xcode_length(struct m0_xcode_ctx *ctx)
void * xf_decor[M0_XCODE_DECOR_MAX]
M0_INTERNAL void m0_xcode_union_fini(struct m0_xcode_type *un)
int(* xto_read)(const struct m0_xcode_cursor *it, struct m0_xcode_obj *obj, const char *str)
M0_INTERNAL bool m0_xcode_is_byte_array(const struct m0_xcode_type *xt)
M0_INTERNAL uint64_t m0_xcode_tag(const struct m0_xcode_obj *obj)
const struct m0_xcode_type M0_XT_OPAQUE
M0_INTERNAL void m0_xcode_union_add(struct m0_xcode_type *un, const char *name, const struct m0_xcode_type *xt, uint64_t tag)
M0_INTERNAL int m0_xcode_cmp(const struct m0_xcode_obj *o0, const struct m0_xcode_obj *o1)
enum m0_xode_atom_type xct_atype
static struct m0_thread t[8]
const struct m0_xcode_type M0_XT_VOID
M0_INTERNAL int m0_xcode_obj_enc_to_buf(struct m0_xcode_obj *obj, void **buf, m0_bcount_t *len)
static struct ff2c_term * alloc(void)
void * xct_decor[M0_XCODE_DECOR_MAX]
int(* xf_opaque)(const struct m0_xcode_obj *par, const struct m0_xcode_type **out)
M0_INTERNAL void m0_xcode_union_init(struct m0_xcode_type *un, const char *name, const char *discriminator, size_t maxbranches)
M0_INTERNAL int m0_xcode_next(struct m0_xcode_cursor *it)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
M0_INTERNAL void * m0_xcode_alloc(struct m0_xcode_cursor *it, size_t nob)
static struct fdmi_ctx ctx
const char * m0_xcode_atom_type_name[M0_XAT_NR]
M0_INTERNAL void m0_xcode_bob_type_init(struct m0_bob_type *bt, const struct m0_xcode_type *xt, size_t magix_field, uint64_t magix)
void m0_xc_u64_init(void)
const char * m0_xcode_aggr_name[M0_XA_NR]
M0_INTERNAL void m0_xcode_free(struct m0_xcode_ctx *ctx)
M0_INTERNAL int m0_xcode_data_size(struct m0_xcode_ctx *ctx, const struct m0_xcode_obj *obj)
int(* xcx_iter)(const struct m0_xcode_cursor *it)
M0_INTERNAL uint64_t m0_xcode_atom(const struct m0_xcode_obj *obj)
int(* xto_decode)(struct m0_xcode_ctx *ctx, void *obj)
const struct m0_xcode_type M0_XT_U32
enum m0_xcode_endianness xcx_end
void(* xcx_iter_end)(const struct m0_xcode_cursor *it)
M0_INTERNAL void m0_xcode_cursor_init(struct m0_xcode_cursor *it, const struct m0_xcode_obj *obj)
M0_INTERNAL int m0_xcode_decor_register(void)
int(* xf_read)(const struct m0_xcode_cursor *it, struct m0_xcode_obj *obj, const char *str)
enum m0_xcode_aggr xct_aggr
M0_INTERNAL int m0_xcode_obj_dec_from_buf(struct m0_xcode_obj *obj, void *buf, m0_bcount_t len)
M0_BASSERT(sizeof(struct in_addr)<=sizeof(struct in6_addr))
M0_INTERNAL int m0_xcode_find(struct m0_xcode_obj *obj, const struct m0_xcode_type *xt, void **place)
M0_INTERNAL int m0_xcode_encode(struct m0_xcode_ctx *ctx)
const struct m0_xcode_type M0_XT_U8
M0_INTERNAL void m0_xcode_skip(struct m0_xcode_cursor *it)
M0_INTERNAL const struct m0_xcode_field * m0_xcode_cursor_field(const struct m0_xcode_cursor *it)
enum m0_xcode_cursor_flag s_flag
void m0_xc_u32_init(void)
M0_INTERNAL void m0_xcode_ctx_init(struct m0_xcode_ctx *ctx, const struct m0_xcode_obj *obj)
const struct m0_xcode_type M0_XT_U64
void m0_xc_opaque_init(void)
struct m0_pdclust_src_addr src
int(* xto_encode)(struct m0_xcode_ctx *ctx, const void *obj)