123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #ifndef NETLINK_UTILS_H_
- #define NETLINK_UTILS_H_
- #include <netlink/netlink.h>
- #include <netlink/list.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define NL_PROB_MIN 0x0
- #define NL_PROB_MAX 0xffffffff
- extern char * nl_geterror(void);
- extern int nl_get_errno(void);
- extern void nl_perror(const char *);
- extern double nl_cancel_down_bytes(unsigned long long, char **);
- extern double nl_cancel_down_bits(unsigned long long, char **);
- extern double nl_cancel_down_us(uint32_t, char **);
- extern long nl_size2int(const char *);
- extern long nl_prob2int(const char *);
- extern int nl_get_hz(void);
- extern uint32_t nl_us2ticks(uint32_t);
- extern uint32_t nl_ticks2us(uint32_t);
- extern char * nl_msec2str(uint64_t, char *, size_t);
- extern char * nl_llproto2str(int, char *, size_t);
- extern int nl_str2llproto(const char *);
- extern char * nl_ether_proto2str(int, char *, size_t);
- extern int nl_str2ether_proto(const char *);
- extern char * nl_ip_proto2str(int, char *, size_t);
- extern int nl_str2ip_proto(const char *);
- extern void nl_new_line(struct nl_dump_params *, int);
- extern void nl_dump(struct nl_dump_params *, const char *, ...);
- extern void nl_dump_line(struct nl_dump_params *, int, const char *, ...);
- #ifdef __cplusplus
- }
- #endif
- #endif
|