Motr  M0
net.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2015-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_ADDB2_NET_H__
26 #define __MOTR_ADDB2_NET_H__
27 
45 /* import */
46 struct m0_rpc_conn;
47 struct m0_addb2_trace_obj;
48 
49 /* export */
50 struct m0_addb2_net;
51 
55 M0_INTERNAL struct m0_addb2_net *m0_addb2_net_init(void);
56 M0_INTERNAL void m0_addb2_net_fini (struct m0_addb2_net *net);
57 
69 M0_INTERNAL int m0_addb2_net_add (struct m0_addb2_net *net,
70  struct m0_rpc_conn *conn);
76 M0_INTERNAL void m0_addb2_net_del (struct m0_addb2_net *net,
77  struct m0_rpc_conn *conn);
84 M0_INTERNAL int m0_addb2_net_submit(struct m0_addb2_net *net,
85  struct m0_addb2_trace_obj *obj);
96 M0_INTERNAL void m0_addb2_net_tick (struct m0_addb2_net *net);
97 
103 M0_INTERNAL void m0_addb2_net_stop (struct m0_addb2_net *net,
104  void (*callback)(struct m0_addb2_net *,
105  void *),
106  void *datum);
107 M0_INTERNAL int m0_addb2_net_module_init(void);
108 M0_INTERNAL void m0_addb2_net_module_fini(void);
109 
111 #endif /* __MOTR_ADDB2_NET_H__ */
112 
113 /*
114  * Local variables:
115  * c-indentation-style: "K&R"
116  * c-basic-offset: 8
117  * tab-width: 8
118  * fill-column: 80
119  * scroll-step: 1
120  * End:
121  */
122 /*
123  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
124  */
M0_INTERNAL void m0_addb2_net_fini(struct m0_addb2_net *net)
Definition: net.c:142
static struct foo * obj
Definition: tlist.c:302
M0_INTERNAL struct m0_addb2_net * m0_addb2_net_init(void)
Definition: net.c:128
M0_INTERNAL int m0_addb2_net_submit(struct m0_addb2_net *net, struct m0_addb2_trace_obj *obj)
Definition: net.c:204
struct m0_rpc_conn conn
Definition: fsync.c:96
M0_INTERNAL void m0_addb2_net_del(struct m0_addb2_net *net, struct m0_rpc_conn *conn)
Definition: net.c:192
M0_INTERNAL int m0_addb2_net_add(struct m0_addb2_net *net, struct m0_rpc_conn *conn)
Definition: net.c:166
M0_INTERNAL void m0_addb2_net_module_fini(void)
Definition: net.c:284
M0_INTERNAL void m0_addb2_net_stop(struct m0_addb2_net *net, void(*callback)(struct m0_addb2_net *, void *), void *datum)
Definition: net.c:225
static struct m0_addb2_net * net
Definition: net.c:27
M0_INTERNAL int m0_addb2_net_module_init(void)
Definition: net.c:271
M0_INTERNAL void m0_addb2_net_tick(struct m0_addb2_net *net)
Definition: net.c:214