#include <asm/byteorder.h>#include <stdint.h>#include <stdbool.h>#include <stdarg.h>#include <stdio.h>#include <unistd.h>#include <assert.h>#include <list.h>#include <gmputil.h>

Macros | |
| #define | BITS_PER_BYTE 8 |
| #define | pr_debug(fmt, arg...) ({ if (false) {}; 0; }) |
| #define | pr_gmp_debug(fmt, arg...) ({ if (false) {}; 0; }) |
| #define | __fmtstring(x, y) __attribute__((format(printf, x, y))) |
| #define | __gmp_fmtstring(x, y) |
| #define | __init __attribute__((constructor)) |
| #define | __exit __attribute__((destructor)) |
| #define | __must_check __attribute__((warn_unused_result)) |
| #define | __noreturn __attribute__((__noreturn__)) |
| #define | BUG(fmt, arg...) assert(0) |
| #define | BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) |
| #define | BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1) |
| #define | __must_be_array(a) BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0]))) |
| #define | container_of(ptr, type, member) |
| #define | field_sizeof(t, f) (sizeof(((t *)NULL)->f)) |
| Return a pointer to a constant variable of a size smaller than the variable. More... | |
| #define | array_size(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
| #define | div_round_up(n, d) (((n) + (d) - 1) / (d)) |
| #define | min(x, y) |
| #define | max(x, y) |
| #define | memory_allocation_error() __memory_allocation_error(__FILE__, __LINE__); |
Functions | |
| void | __memory_allocation_error (const char *filename, uint32_t line) __noreturn |
| void | xfree (const void *ptr) |
| void * | xmalloc (size_t size) |
| void * | xrealloc (void *ptr, size_t size) |
| void * | xzalloc (size_t size) |
| char * | xstrdup (const char *s) |
| #define __exit __attribute__((destructor)) |
| #define __fmtstring | ( | x, | |
| y | |||
| ) | __attribute__((format(printf, x, y))) |
| #define __gmp_fmtstring | ( | x, | |
| y | |||
| ) |
| #define __init __attribute__((constructor)) |
| #define __must_be_array | ( | a | ) | BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0]))) |
| #define __must_check __attribute__((warn_unused_result)) |
| #define __noreturn __attribute__((__noreturn__)) |
| #define array_size | ( | arr | ) | (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
| #define BITS_PER_BYTE 8 |
| #define BUG | ( | fmt, | |
| arg... | |||
| ) | assert(0) |
| #define BUILD_BUG_ON | ( | condition | ) | ((void)sizeof(char[1 - 2*!!(condition)])) |
Referenced by datatype_register().
| #define BUILD_BUG_ON_ZERO | ( | e | ) | (sizeof(char[1 - 2 * !!(e)]) - 1) |
| #define container_of | ( | ptr, | |
| type, | |||
| member | |||
| ) |
| #define div_round_up | ( | n, | |
| d | |||
| ) | (((n) + (d) - 1) / (d)) |
| #define field_sizeof | ( | t, | |
| f | |||
| ) | (sizeof(((t *)NULL)->f)) |
Return a pointer to a constant variable of a size smaller than the variable.
| #define max | ( | x, | |
| y | |||
| ) |
| #define memory_allocation_error | ( | ) | __memory_allocation_error(__FILE__, __LINE__); |
Referenced by alloc_nft_chain(), alloc_nft_expr(), alloc_nft_rule(), alloc_nft_set(), alloc_nft_table(), mnl_nft_chain_dump(), mnl_nft_rule_dump(), mnl_nft_ruleset_dump(), mnl_nft_set_dump(), mnl_nft_setelem_add(), mnl_nft_setelem_batch_add(), mnl_nft_table_dump(), xmalloc(), xrealloc(), and xstrdup().
| #define min | ( | x, | |
| y | |||
| ) |
| #define pr_debug | ( | fmt, | |
| arg... | |||
| ) | ({ if (false) {}; 0; }) |
| #define pr_gmp_debug | ( | fmt, | |
| arg... | |||
| ) | ({ if (false) {}; 0; }) |
Referenced by set_to_intervals().
| void __memory_allocation_error | ( | const char * | filename, |
| uint32_t | line | ||
| ) |
References NFT_EXIT_NOMEM.
| void xfree | ( | const void * | ptr | ) |
| void* xmalloc | ( | size_t | size | ) |
References memory_allocation_error, and NULL.
Referenced by __attribute__(), export_alloc(), mnl_batch_init(), monitor_alloc(), netlink_delinearize_rule(), rt_symbol_table_init(), and xzalloc().

| void* xrealloc | ( | void * | ptr, |
| size_t | size | ||
| ) |
References memory_allocation_error, and NULL.
Referenced by rt_symbol_table_init().

| char* xstrdup | ( | const char * | s | ) |
References memory_allocation_error, and NULL.
Referenced by chain_alloc(), concat_type_alloc(), handle_merge(), netlink_delinearize_rule(), rt_symbol_table_init(), symbol_bind(), and symbol_expr_alloc().

| void* xzalloc | ( | size_t | size | ) |
References xmalloc().
Referenced by chain_alloc(), cmd_alloc(), expr_alloc(), main(), rule_alloc(), set_alloc(), stmt_alloc(), symbol_bind(), and table_alloc().

