Motr  M0
keepalive_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from motr/keepalive.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "motr/keepalive.h"
8 #include "motr/keepalive_xc.h"
9 
12 
17  ._type = {
19  .xct_name = "m0_ha_msg_keepalive_req",
20  .xct_sizeof = sizeof (struct m0_ha_msg_keepalive_req),
21  .xct_nr = 1,
22  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
23  }
24 };
25 
28  offsetof(struct m0_xcode_type, xct_child[0]));
29 
34  ._type = {
36  .xct_name = "m0_ha_msg_keepalive_rep",
37  .xct_sizeof = sizeof (struct m0_ha_msg_keepalive_rep),
38  .xct_nr = 2,
39  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_RPC,
40  }
41 };
42 
45  offsetof(struct m0_xcode_type, xct_child[0]));
46 
47 
48 M0_BASSERT(sizeof(struct m0_ha_msg_keepalive_req) == 16U);
49 
50 M0_BASSERT(sizeof ((struct m0_ha_msg_keepalive_req *)0)->kaq_id == 16U);
52 
53 M0_BASSERT(sizeof(struct m0_ha_msg_keepalive_rep) == 24U);
54 
55 M0_BASSERT(sizeof ((struct m0_ha_msg_keepalive_rep *)0)->kap_id == 16U);
57 M0_BASSERT(sizeof ((struct m0_ha_msg_keepalive_rep *)0)->kap_counter == 8U);
59 
60 
61 
63 {
65  .xf_name = "kaq_id",
66 
67  .xf_type = m0_uint128_xc,
68 
69  .xf_tag = 0,
70  .xf_opaque = NULL,
71  .xf_offset = offsetof(struct m0_ha_msg_keepalive_req, kaq_id),
72  .xf_read = NULL,
73  .xf_decor = {
75  }
76  };
78 
80 }
81 
83 {
85  .xf_name = "kap_id",
86 
87  .xf_type = m0_uint128_xc,
88 
89  .xf_tag = 0,
90  .xf_opaque = NULL,
91  .xf_offset = offsetof(struct m0_ha_msg_keepalive_rep, kap_id),
92  .xf_read = NULL,
93  .xf_decor = {
95  }
96  };
98 
100  .xf_name = "kap_counter",
101 
102  .xf_type = &M0_XT_U64,
103 
104  .xf_tag = 0,
105  .xf_opaque = NULL,
106  .xf_offset = offsetof(struct m0_ha_msg_keepalive_rep, kap_counter),
107  .xf_read = NULL,
108  .xf_decor = {
110  }
111  };
112  m0_xc_u64_init();
113 
115 }
116 
117 M0_INTERNAL void m0_xc_motr_keepalive_init(void)
118 {
121 }
122 
123 M0_INTERNAL void m0_xc_motr_keepalive_fini(void)
124 {
125 }
M0_INTERNAL void m0_xc_motr_keepalive_fini(void)
Definition: keepalive_xc.c:123
M0_INTERNAL void m0_xc_m0_ha_msg_keepalive_req_struct_init(void)
Definition: keepalive_xc.c:62
static struct _m0_ha_msg_keepalive_rep_s _m0_ha_msg_keepalive_rep
#define NULL
Definition: misc.h:38
struct m0_xcode_type * m0_ha_msg_keepalive_rep_xc
Definition: keepalive_xc.c:11
struct m0_xcode_field _child[2]
Definition: keepalive_xc.c:32
struct m0_xcode_type * m0_uint128_xc
Definition: types_xc.c:10
struct m0_xcode_field _child[1]
Definition: keepalive_xc.c:15
M0_INTERNAL void m0_xc_m0_ha_msg_keepalive_rep_struct_init(void)
Definition: keepalive_xc.c:82
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
M0_INTERNAL void m0_xc_m0_uint128_struct_init(void)
Definition: types_xc.c:39
struct m0_uint128 kap_id
Definition: keepalive.h:97
uint64_t kap_counter
Definition: keepalive.h:98
M0_BASSERT(offsetof(struct _m0_ha_msg_keepalive_req_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
struct m0_uint128 kaq_id
Definition: keepalive.h:97
M0_INTERNAL void m0_xc_motr_keepalive_init(void)
Definition: keepalive_xc.c:117
static struct _m0_ha_msg_keepalive_req_s _m0_ha_msg_keepalive_req
struct m0_xcode_type _type
Definition: keepalive_xc.c:14
#define M0_POST(cond)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
void m0_xc_u64_init(void)
Definition: xcode.c:904
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
struct m0_xcode_type * m0_ha_msg_keepalive_req_xc
Definition: keepalive_xc.c:10
const char * xf_name
Definition: xcode.h:251
struct m0_xcode_type _type
Definition: keepalive_xc.c:31
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
#define offsetof(typ, memb)
Definition: misc.h:29