OpenSDN source code
patricia_api.h File Reference
#include "mcast_common.h"
Include dependency graph for patricia_api.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  patroot_
 
struct  patnode_
 

Macros

#define PATNODE_TO_STRUCT(function, structure, pat_node)
 

Typedefs

typedef struct patroot_ patroot
 
typedef struct patnode_ patnode
 

Functions

patrootpatricia_root_init (patroot *root, boolean key_is_ptr, uint16_t klen, uint8_t offset)
 
void patricia_root_delete (patroot *root)
 
boolean patricia_add (patroot *root, patnode *node)
 
boolean patricia_delete (patroot *root, patnode *node)
 
patnodepatricia_lookup (patroot *root, const void *key)
 
patnodepatricia_lookup_least (patroot *root)
 
patnodepatricia_lookup_greatest (patroot *root)
 
patnodepatricia_get_next (patroot *root, patnode *node)
 
patnodepatricia_get_previous (patroot *root, patnode *node)
 
patnodepatricia_lookup_geq (patroot *root, patnode *node)
 

Macro Definition Documentation

◆ PATNODE_TO_STRUCT

#define PATNODE_TO_STRUCT (   function,
  structure,
  pat_node 
)
Value:
static inline structure *(function)(patnode *node) { \
if (node) { \
return (structure *)((char *)node - offsetof(structure, pat_node)); \
} \
return NULL; \
}

Definition at line 18 of file patricia_api.h.

Typedef Documentation

◆ patnode

typedef struct patnode_ patnode

◆ patroot

typedef struct patroot_ patroot

Function Documentation

◆ patricia_add()

boolean patricia_add ( patroot root,
patnode node 
)

Definition at line 49 of file patricia_api.cc.

Here is the call graph for this function:

◆ patricia_delete()

boolean patricia_delete ( patroot root,
patnode node 
)

Definition at line 66 of file patricia_api.cc.

Here is the call graph for this function:

◆ patricia_get_next()

patnode* patricia_get_next ( patroot root,
patnode node 
)

Definition at line 132 of file patricia_api.cc.

Here is the call graph for this function:

◆ patricia_get_previous()

patnode* patricia_get_previous ( patroot root,
patnode node 
)

Definition at line 145 of file patricia_api.cc.

Here is the call graph for this function:

◆ patricia_lookup()

patnode* patricia_lookup ( patroot root,
const void *  key 
)

Definition at line 82 of file patricia_api.cc.

Here is the call graph for this function:

◆ patricia_lookup_geq()

patnode* patricia_lookup_geq ( patroot root,
patnode node 
)

Definition at line 158 of file patricia_api.cc.

Here is the call graph for this function:

◆ patricia_lookup_greatest()

patnode* patricia_lookup_greatest ( patroot root)

Definition at line 118 of file patricia_api.cc.

Here is the call graph for this function:

◆ patricia_lookup_least()

patnode* patricia_lookup_least ( patroot root)

Definition at line 103 of file patricia_api.cc.

Here is the call graph for this function:

◆ patricia_root_delete()

void patricia_root_delete ( patroot root)

Definition at line 35 of file patricia_api.cc.

◆ patricia_root_init()

patroot* patricia_root_init ( patroot root,
boolean  key_is_ptr,
uint16_t  klen,
uint8_t  offset 
)

Definition at line 14 of file patricia_api.cc.