12 #ifndef NETLINK_UTILS_H_
13 #define NETLINK_UTILS_H_
15 #include <netlink/netlink.h>
16 #include <netlink/list.h>
31 #define NL_PROB_MIN 0x0
37 #define NL_PROB_MAX 0xffffffff
42 extern int nl_get_errno(
void);
58 extern char *
nl_msec2str(uint64_t,
char *,
size_t);
61 extern char * nl_llproto2str(
int,
char *,
size_t);
62 extern int nl_str2llproto(
const char *);
65 extern char * nl_ether_proto2str(
int,
char *,
size_t);
66 extern int nl_str2ether_proto(
const char *);
69 extern char * nl_ip_proto2str(
int,
char *,
size_t);
70 extern int nl_str2ip_proto(
const char *);
75 extern void nl_dump_line(
struct nl_dump_params *,
int,
const char *, ...);
long nl_size2int(const char *)
Convert a character string to a size.
double nl_cancel_down_bits(unsigned long long, char **)
Cancel down a bit counter.
char * nl_msec2str(uint64_t, char *, size_t)
Convert milliseconds to a character string.
double nl_cancel_down_bytes(unsigned long long, char **)
Cancel down a byte counter.
double nl_cancel_down_us(uint32_t, char **)
Cancel down a micro second value.
uint32_t nl_ticks2us(uint32_t)
Convert ticks to micro seconds.
void nl_new_line(struct nl_dump_params *, int)
Handle a new line while dumping.
long nl_prob2int(const char *)
Convert a character string to a probability.
char * nl_geterror(void)
Return error message for an error code.
uint32_t nl_us2ticks(uint32_t)
Convert micro seconds to ticks.
void nl_dump(struct nl_dump_params *, const char *,...)
Dump a formatted character string.
void nl_perror(const char *)
Print a libnl error message.
int nl_get_hz(void)
Return the value of HZ.