netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
utils.c File Reference
#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <nftables.h>
#include <utils.h>
Include dependency graph for utils.c:

Functions

void __noreturn __memory_allocation_error (const char *filename, uint32_t line)
 
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)
 

Function Documentation

void __noreturn __memory_allocation_error ( const char *  filename,
uint32_t  line 
)

References NFT_EXIT_NOMEM.

void xfree ( const void *  ptr)

Referenced by nft_fprintf().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

void* xrealloc ( void *  ptr,
size_t  size 
)

References memory_allocation_error, and NULL.

Referenced by rt_symbol_table_init().

Here is the caller graph for this function:

char* xstrdup ( const char *  s)
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().

Here is the call graph for this function:

Here is the caller graph for this function: