Motr  M0
onwire.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2012-2020 Seagate Technology LLC and/or its Affiliates
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * For any questions about this software or licensing,
18  * please email opensource@seagate.com or cortx-questions@seagate.com.
19  *
20  */
21 
22 
23 #pragma once
24 
25 #ifndef __MOTR_RPC_ONWIRE_H__
26 #define __MOTR_RPC_ONWIRE_H__
27 
28 #include "lib/types.h" /* uint64_t */
29 #include "lib/types_xc.h" /* m0_uint128_xc */
30 #include "lib/cookie.h"
31 #include "lib/cookie_xc.h"
32 #include "xcode/xcode_attr.h" /* M0_XCA_RECORD */
33 #include "format/format.h" /* struct m0_format_header */
34 #include "format/format_xc.h"
35 
41 enum {
43 };
44 
45 enum {
46  /*
47  * Version of RPC packet
48  */
49 
51 
52  /* future versions, uncomment and update M0_RPC_PACKET_FORMAT_VERSION */
53  /*M0_RPC_PACKET_FORMAT_VERSION_2,*/
54  /*M0_RPC_PACKET_FORMAT_VERSION_3,*/
55 
61 
62  /*
63  * Version of RPC item
64  */
65 
68 };
69 
72  /* Version */
73  uint32_t poh_version;
75  uint32_t poh_nr_items;
76  uint64_t poh_magic;
77 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
78 
81 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
82 
86  uint32_t ioh_opcode;
88  uint32_t ioh_flags;
90  uint64_t ioh_ha_epoch;
91  uint64_t ioh_magic;
92 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
93 
96  uint64_t osr_sender_id;
97  uint64_t osr_session_id;
105  uint64_t osr_xid;
107 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
108 
111 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
112 
113 M0_INTERNAL int m0_rpc_item_header1_encdec(struct m0_rpc_item_header1 *ioh,
114  struct m0_bufvec_cursor *cur,
115  enum m0_xcode_what what);
116 M0_INTERNAL int m0_rpc_item_footer_encdec (struct m0_rpc_item_footer *iof,
117  struct m0_bufvec_cursor *cur,
118  enum m0_xcode_what what);
119 
122 #endif /* __MOTR_RPC_ONWIRE_H__ */
uint64_t ioh_ha_epoch
Definition: onwire.h:90
static struct buffer * cur(struct m0_addb2_mach *mach, m0_bcount_t space)
Definition: addb2.c:791
M0_INTERNAL int m0_rpc_item_header1_encdec(struct m0_rpc_item_header1 *ioh, struct m0_bufvec_cursor *cur, enum m0_xcode_what what)
Definition: onwire.c:42
uint64_t osr_session_id
Definition: onwire.h:97
struct m0_format_header ioh_header
Definition: onwire.h:84
m0_xcode_what
Definition: xcode.h:647
uint64_t osr_xid
Definition: onwire.h:105
uint64_t osr_sender_id
Definition: onwire.h:96
struct m0_format_header poh_header
Definition: onwire.h:71
enum @124 M0_XCA_DOMAIN
struct m0_uint128 osr_uuid
Definition: onwire.h:95
uint32_t ioh_opcode
Definition: onwire.h:86
uint64_t osr_session_xid_min
Definition: onwire.h:104
M0_INTERNAL int m0_rpc_item_footer_encdec(struct m0_rpc_item_footer *iof, struct m0_bufvec_cursor *cur, enum m0_xcode_what what)
Definition: onwire.c:58
struct m0_cookie osr_cookie
Definition: onwire.h:106
uint64_t ioh_magic
Definition: onwire.h:91
uint32_t ioh_flags
Definition: onwire.h:88