Motr  M0
ping_fop.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2020 Seagate Technology LLC and/or its Affiliates
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * For any questions about this software or licensing,
17  * please email opensource@seagate.com or cortx-questions@seagate.com.
18  *
19  */
20 
21 
22 #include "lib/errno.h"
23 #include "lib/memory.h"
24 #include "fop/fom.h"
25 #include "fop/fop.h"
26 #include "rpc/it/ping_fop.h"
27 #include "rpc/it/ping_fop_xc.h"
28 #include "rpc/it/ping_fom.h"
29 #include "lib/errno.h"
30 #include "rpc/rpc.h"
31 #include "fop/fop_item_type.h"
32 #include "fop/fom_generic.h"
33 
36 
37 M0_INTERNAL void m0_ping_fop_fini(void)
38 {
41  m0_xc_rpc_it_ping_fop_fini();
42 }
43 
44 extern const struct m0_fom_type_ops m0_fom_ping_type_ops;
46 
47 M0_INTERNAL void m0_ping_fop_init(void)
48 {
49  m0_xc_rpc_it_ping_fop_init();
51  .name = "Ping fop",
53  .xt = m0_fop_ping_xc,
54  .rpc_flags = M0_RPC_ITEM_TYPE_REQUEST,
55  .fom_ops = &m0_fom_ping_type_ops,
56  .sm = &m0_generic_conf,
57  .svc_type = &m0_rpc_service_type);
59  .name = "Ping fop reply",
61  .xt = m0_fop_ping_rep_xc,
62  .rpc_flags = M0_RPC_ITEM_TYPE_REPLY,
63  .svc_type = &m0_rpc_service_type);
64 }
65 
66 
67 /*
68  * Local variables:
69  * c-indentation-style: "K&R"
70  * c-basic-offset: 8
71  * tab-width: 8
72  * fill-column: 80
73  * scroll-step: 1
74  * End:
75  */
M0_INTERNAL void m0_ping_fop_init(void)
Definition: ping_fop.c:47
#define M0_FOP_TYPE_INIT(ft,...)
Definition: fop.h:307
const struct m0_fom_type_ops m0_fom_ping_type_ops
Definition: ping_fom.c:41
void m0_fop_type_fini(struct m0_fop_type *fopt)
Definition: fop.c:232
static struct m0_xcode_type ** xt[]
Definition: protocol.c:64
const struct m0_sm_conf m0_generic_conf
Definition: fom_generic.c:838
int opcode
Definition: crate.c:301
struct m0_fop_type m0_fop_ping_rep_fopt
Definition: ping_fop.c:35
M0_INTERNAL void m0_ping_fop_fini(void)
Definition: ping_fop.c:37
const char * name
Definition: trace.c:110
struct m0_fop_type m0_fop_ping_fopt
Definition: ping_fop.c:34
struct m0_reqh_service_type m0_rpc_service_type
Definition: service.c:120