Motr  M0
node_k.c
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2013-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 #include <linux/module.h>
24 #include <linux/kernel.h>
25 #include <linux/init.h>
26 
27 #include "net/test/node.h"
28 
29 /*
30  * We are using Apache license for complete motr code but for MODULE_LICENSE
31  * marker there is no provision to mention Apache for this marker. But as this
32  * marker is necessary to remove the warnings, keeping this blank to make
33  * compiler happy.
34  */
36 
37 static char *addr = NULL;
38 static char *addr_console = NULL;
39 static unsigned long timeout = 3;
40 
41 module_param(addr, charp, S_IRUGO);
42 MODULE_PARM_DESC(addr, "endpoint address for node commands");
43 
44 module_param(addr_console, charp, S_IRUGO);
45 MODULE_PARM_DESC(addr_console, "endpoint address for console commands");
46 
47 module_param(timeout, ulong, S_IRUGO);
48 MODULE_PARM_DESC(timeout, "command send timeout, seconds");
49 
50 static int __init m0_net_test_module_init(void)
51 {
52  struct m0_net_test_node_cfg cfg = {
53  .ntnc_addr = addr,
54  .ntnc_addr_console = addr_console,
55  .ntnc_send_timeout = M0_MKTIME(timeout, 0),
56  };
59 }
60 
61 static void __exit m0_net_test_module_fini(void)
62 {
65 }
66 
69 
70 /*
71  * Local variables:
72  * c-indentation-style: "K&R"
73  * c-basic-offset: 8
74  * tab-width: 8
75  * fill-column: 79
76  * scroll-step: 1
77  * End:
78  */
int m0_net_test_node_module_initfini(struct m0_net_test_node_cfg *cfg)
Definition: node.c:954
#define NULL
Definition: misc.h:38
static void __exit m0_net_test_module_fini(void)
Definition: node_k.c:61
MODULE_PARM_DESC(addr, "endpoint address for node commands")
char * ntnc_addr
Definition: node.h:193
static char * addr
Definition: node_k.c:37
module_init(motr_init)
M0_THREAD_ENTER
Definition: dir.c:336
Definition: xcode.h:73
MODULE_LICENSE()
module_param(addr, charp, S_IRUGO)
static unsigned long timeout
Definition: node_k.c:39
module_exit(motr_exit)
static char * addr_console
Definition: node_k.c:38
static int __init m0_net_test_module_init(void)
Definition: node_k.c:50
#define M0_MKTIME(secs, ns)
Definition: time.h:86