Motr  M0
common_u.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_NET_TEST_USER_SPACE_COMMON_U_H__
26 #define __MOTR_NET_TEST_USER_SPACE_COMMON_U_H__
27 
28 #include <stdio.h> /* printf */
29 
30 #include "lib/time.h" /* m0_time_t */
31 
42 
43 #define M0_VERBOSEFLAGARG M0_FLAGARG('v', "Verbose output", \
44  &m0_net_test_u_printf_verbose)
45 #define M0_IFLISTARG(pflag) M0_FLAGARG('l', "List available LNET interfaces", \
46  pflag)
47 
48 char *m0_net_test_u_str_copy(const char *str);
49 void m0_net_test_u_str_free(char *str);
51 void m0_net_test_u_print_error(const char *s, int code);
52 void m0_net_test_u_print_s(const char *fmt, const char *str);
53 void m0_net_test_u_print_time(char *name, m0_time_t time);
54 void m0_net_test_u_lnet_info(void);
55 void m0_net_test_u_print_bsize(double bsize);
56 
57 int m0_net_test_u_printf(const char *fmt, ...);
58 int m0_net_test_u_printf_v(const char *fmt, ...);
59 
64 #endif /* __MOTR_NET_TEST_USER_SPACE_COMMON_U_H__ */
65 
66 /*
67  * Local variables:
68  * c-indentation-style: "K&R"
69  * c-basic-offset: 8
70  * tab-width: 8
71  * fill-column: 79
72  * scroll-step: 1
73  * End:
74  */
void m0_net_test_u_print_s(const char *fmt, const char *str)
Definition: common_u.c:65
uint64_t m0_time_t
Definition: time.h:37
char * m0_net_test_u_str_copy(const char *str)
Definition: common_u.c:45
void m0_net_test_u_str_free(char *str)
Definition: common_u.c:54
void m0_net_test_u_lnet_info(void)
Definition: common_u.c:122
const char * name
Definition: trace.c:110
int m0_net_test_u_printf_v(const char *fmt,...)
Definition: common_u.c:174
void m0_net_test_u_print_time(char *name, m0_time_t time)
Definition: common_u.c:70
char * fmt(const char *format,...) __attribute__((format(printf
void m0_net_test_u_print_error(const char *s, int code)
Definition: common_u.c:59
void m0_net_test_u_print_bsize(double bsize)
Definition: common_u.c:80
int m0_net_test_u_printf(const char *fmt,...)
Definition: common_u.c:163
bool m0_net_test_u_printf_verbose
Definition: common_u.c:43
static struct m0_addb2_source * s
Definition: consumer.c:39