OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

#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

typedef struct patnode_ patnode
typedef struct patroot_ patroot

Function Documentation

boolean patricia_add ( patroot root,
patnode node 
)

Definition at line 49 of file patricia_api.cc.

Here is the call graph for this function:

boolean patricia_delete ( patroot root,
patnode node 
)

Definition at line 66 of file patricia_api.cc.

Here is the call graph for this function:

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:

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:

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:

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:

patnode* patricia_lookup_greatest ( patroot root)

Definition at line 118 of file patricia_api.cc.

Here is the call graph for this function:

patnode* patricia_lookup_least ( patroot root)

Definition at line 103 of file patricia_api.cc.

Here is the call graph for this function:

void patricia_root_delete ( patroot root)

Definition at line 35 of file patricia_api.cc.

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.