netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
utils.h File Reference
#include <netlink/netlink.h>
#include <netlink/list.h>
Include dependency graph for utils.h:

Macros

Probability Constants
#define NL_PROB_MIN   0x0
 Lower probability limit. More...
 
#define NL_PROB_MAX   0xffffffff
 Upper probability limit. More...
 

Functions

double nl_cancel_down_bytes (unsigned long long, char **)
 Cancel down a byte counter. More...
 
double nl_cancel_down_bits (unsigned long long, char **)
 Cancel down a bit counter. More...
 
double nl_cancel_down_us (uint32_t, char **)
 Cancel down a micro second value. More...
 
long nl_size2int (const char *)
 Convert a character string to a size. More...
 
long nl_prob2int (const char *)
 Convert a character string to a probability. More...
 
int nl_get_hz (void)
 Return the value of HZ. More...
 
uint32_t nl_us2ticks (uint32_t)
 Convert micro seconds to ticks. More...
 
uint32_t nl_ticks2us (uint32_t)
 Convert ticks to micro seconds. More...
 
int nl_str2msec (const char *, uint64_t *)
 
char * nl_msec2str (uint64_t, char *, size_t)
 Convert milliseconds to a character string. More...
 
char * nl_llproto2str (int, char *, size_t)
 
int nl_str2llproto (const char *)
 
char * nl_ether_proto2str (int, char *, size_t)
 
int nl_str2ether_proto (const char *)
 
char * nl_ip_proto2str (int, char *, size_t)
 
int nl_str2ip_proto (const char *)
 
void nl_new_line (struct nl_dump_params *)
 Handle a new line while dumping. More...
 
void nl_dump (struct nl_dump_params *, const char *,...)
 Dump a formatted character string. More...
 
void nl_dump_line (struct nl_dump_params *, const char *,...)