Modules | |
Abstract Address | |
| |
Caching | |
Cache Management | | Type Specific Cache Operations | | +----------------+ +------------+ | request update | | msg_parser | | | +----------------+ +------------+ +- - - - -^- - - - - - - -^- -|- - - - nl_cache_update: | | | | 1) --------- co_request_update ------+ | | | | | 2) destroy old cache +----------- pp_cb ---------|---+ | | | 3) ---------- nl_recvmsgs ----------+ +- cb_valid -+ +--------------+ | | | | | nl_cache_add |<-----+ + - - -v- -|- - - - - - - - - - - +--------------+ | | +-------------+ | nl_recvmsgs | | | +-----|-^-----+ +---v-|---+ | | | nl_recv | +---------+ | | Core Netlink | |
Cache Management | |
Abstract Data | |
Data Structures | |
struct | nl_dump_params |
Dumping parameters. More... | |
Error Code Helpers | |
char * | nl_geterror (void) |
Return error message for an error code. | |
Time Translations | |
int | nl_get_hz (void) |
Return the value of HZ. | |
uint32_t | nl_us2ticks (uint32_t us) |
Convert micro seconds to ticks. | |
uint32_t | nl_ticks2us (uint32_t ticks) |
Convert ticks to micro seconds. | |
long | nl_time2int (const char *str) |
char * | nl_msec2str (uint64_t msec, char *buf, size_t len) |
Convert milliseconds to a character string. | |
Link Layer Protocol Translations | |
char * | nl_llproto2str (int llproto, char *buf, size_t len) |
Convert a link layer protocol to a character string (Reentrant). | |
int | nl_str2llproto (const char *name) |
Convert a character string to a link layer protocol. | |
Ethernet Protocol Translations | |
char * | nl_ether_proto2str (int eproto, char *buf, size_t len) |
Convert a ethernet protocol to a character string (Reentrant). | |
int | nl_str2ether_proto (const char *name) |
Convert a character string to a ethernet protocol. | |
Unit Pretty-Printing | |
double | nl_cancel_down_bytes (unsigned long long l, char **unit) |
Cancel down a byte counter. | |
double | nl_cancel_down_bits (unsigned long long l, char **unit) |
Cancel down a bit counter. | |
double | nl_cancel_down_us (uint32_t l, char **unit) |
Cancel down a micro second value. | |
Generic Unit Translations | |
long | nl_size2int (const char *str) |
Convert a character string to a size. | |
long | nl_prob2int (const char *str) |
Convert a character string to a probability. | |
Probability Constants | |
#define | NL_PROB_MIN 0x0 |
Lower probability limit. | |
#define | NL_PROB_MAX 0xffffffff |
Upper probability limit. | |
Enumerations | |
enum | nl_dump_type { NL_DUMP_BRIEF, NL_DUMP_FULL, NL_DUMP_STATS, NL_DUMP_XML, NL_DUMP_ENV, NL_DUMP_EVENTS, __NL_DUMP_MAX } |
Dumping types (dp_type). More... | |
Variables | |
int | nl_debug = 0 |
Debug level. |
#define NL_PROB_MAX 0xffffffff |
enum nl_dump_type |
Dumping types (dp_type).
char* nl_geterror | ( | void | ) |
Return error message for an error code.
Definition at line 80 of file utils.c.
Referenced by nl_cache_pickup().
double nl_cancel_down_bytes | ( | unsigned long long | l, | |
char ** | unit | |||
) |
double nl_cancel_down_bits | ( | unsigned long long | l, | |
char ** | unit | |||
) |
double nl_cancel_down_us | ( | uint32_t | l, | |
char ** | unit | |||
) |
long nl_size2int | ( | const char * | str | ) |
Convert a character string to a size.
str | size encoded as character string |
Supported formats are:
long nl_prob2int | ( | const char * | str | ) |
Convert a character string to a probability.
str | probability encoded as character string |
Supported formats are:
Definition at line 245 of file utils.c.
References NL_PROB_MAX.
uint32_t nl_us2ticks | ( | uint32_t | us | ) |
Convert micro seconds to ticks.
us | micro seconds |
Definition at line 349 of file utils.c.
Referenced by rtnl_netem_set_delay(), and rtnl_netem_set_jitter().
uint32_t nl_ticks2us | ( | uint32_t | ticks | ) |
Convert ticks to micro seconds.
ticks | number of ticks |
Definition at line 360 of file utils.c.
Referenced by rtnl_netem_get_delay(), and rtnl_netem_get_jitter().
char* nl_msec2str | ( | uint64_t | msec, | |
char * | buf, | |||
size_t | len | |||
) |
Convert milliseconds to a character string.
msec | number of milliseconds | |
buf | destination buffer | |
len | buffer length |
char* nl_llproto2str | ( | int | llproto, | |
char * | buf, | |||
size_t | len | |||
) |
Convert a link layer protocol to a character string (Reentrant).
llproto | link layer protocol | |
buf | destination buffer | |
len | buffer length |
int nl_str2llproto | ( | const char * | name | ) |
Convert a character string to a link layer protocol.
name | name of link layer protocol |
char* nl_ether_proto2str | ( | int | eproto, | |
char * | buf, | |||
size_t | len | |||
) |
Convert a ethernet protocol to a character string (Reentrant).
eproto | ethernet protocol | |
buf | destination buffer | |
len | buffer length |
int nl_str2ether_proto | ( | const char * | name | ) |
Convert a character string to a ethernet protocol.
name | name of ethernet protocol |