bind  9.17.5
About: BIND 9.17 implements the Domain Name System (DNS) protocols for the Internet (see the Release Notes). Source code distribution. Unstable development release.
  Fossies Dox: bind-9.17.5.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

radix.c File Reference
#include <inttypes.h>
#include <isc/mem.h>
#include <isc/radix.h>
#include <isc/types.h>
#include <isc/util.h>
Include dependency graph for radix.c:

Go to the source code of this file.


#define BIT_TEST(f, b)   (((f) & (b)) != 0)


static isc_result_t _new_prefix (isc_mem_t *mctx, isc_prefix_t **target, int family, void *dest, int bitlen)
static void _deref_prefix (isc_prefix_t *prefix)
static isc_result_t _ref_prefix (isc_mem_t *mctx, isc_prefix_t **target, isc_prefix_t *prefix)
static int _comp_with_mask (void *addr, void *dest, u_int mask)
static void _clear_radix (isc_radix_tree_t *radix, isc_radix_destroyfunc_t func)
isc_result_t isc_radix_create (isc_mem_t *mctx, isc_radix_tree_t **target, int maxbits)
void isc_radix_destroy (isc_radix_tree_t *radix, isc_radix_destroyfunc_t func)
void isc_radix_process (isc_radix_tree_t *radix, isc_radix_processfunc_t func)
isc_result_t isc_radix_search (isc_radix_tree_t *radix, isc_radix_node_t **target, isc_prefix_t *prefix)
isc_result_t isc_radix_insert (isc_radix_tree_t *radix, isc_radix_node_t **target, isc_radix_node_t *source, isc_prefix_t *prefix)
void isc_radix_remove (isc_radix_tree_t *radix, isc_radix_node_t *node)

Macro Definition Documentation


#define BIT_TEST (   f,
)    (((f) & (b)) != 0)

Definition at line 25 of file radix.c.

Function Documentation

◆ _clear_radix()

◆ _comp_with_mask()

static int _comp_with_mask ( void *  addr,
void *  dest,
u_int  mask 

Definition at line 113 of file radix.c.

Referenced by isc_radix_search().

◆ _deref_prefix()

static void _deref_prefix ( isc_prefix_t prefix)

◆ _new_prefix()

static isc_result_t _new_prefix ( isc_mem_t mctx,
isc_prefix_t **  target,
int  family,
void *  dest,
int  bitlen 

◆ _ref_prefix()

◆ isc_radix_create()

◆ isc_radix_destroy()

void isc_radix_destroy ( isc_radix_tree_t radix,
isc_radix_destroyfunc_t  func 

Definition at line 200 of file radix.c.

References _clear_radix(), isc_mem_putanddetach, isc_radix_tree::mctx, and REQUIRE.

Referenced by destroy_iptable().

◆ isc_radix_insert()

◆ isc_radix_process()

void isc_radix_process ( isc_radix_tree_t radix,
isc_radix_processfunc_t  func 

Definition at line 210 of file radix.c.

References isc_radix_tree::head, RADIX_WALK, RADIX_WALK_END, and REQUIRE.

Referenced by dns_acl_isinsecure().

◆ isc_radix_remove()

◆ isc_radix_search()