ip_tree.h File Reference

#include <stdio.h>
#include "../../locking.h"
#include "timer.h"

Include dependency graph for ip_tree.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ip_node
struct  ip_tree
struct  ip_tree::entry

Defines

#define CURR_POS   1
#define ll2ipnode(ptr)
#define MAX_IP_BRANCHES   256
#define NEW_NODE   (1<<0)
#define NEWRED_NODE   (1<<2)
#define NO_UPDATE   (1<<3)
#define NODE_EXPIRED_FLAG   (1<<0)
#define NODE_INTIMER_FLAG   (1<<1)
#define NODE_IPLEAF_FLAG   (1<<2)
#define NODE_ISRED_FLAG   (1<<3)
#define PREV_POS   0
#define RED_NODE   (1<<1)

Functions

void destroy_ip_tree (void)
struct ip_nodeget_tree_branch (unsigned char b)
int init_ip_tree (int)
int is_node_hot_leaf (struct ip_node *node)
void lock_tree_branch (unsigned char b)
struct ip_nodemark_node (unsigned char *ip, int ip_len, struct ip_node **father, unsigned char *flag)
void remove_node (struct ip_node *node)
void unlock_tree_branch (unsigned char b)


Define Documentation

#define CURR_POS   1

Definition at line 49 of file ip_tree.h.

Referenced by clean_routine(), mark_node(), pike_check_req(), refresh_node(), and split_node().

#define ll2ipnode ( ptr   ) 

Value:

((struct ip_node*)((char *)(ptr)-\
      (unsigned long)(&((struct ip_node*)0)->timer_ll)))

Definition at line 83 of file ip_tree.h.

Referenced by check_and_split_timer(), and clean_routine().

#define MAX_IP_BRANCHES   256

Definition at line 46 of file ip_tree.h.

Referenced by clean_routine(), destroy_ip_tree(), init_ip_tree(), mi_pike_list(), and swap_routine().

#define NEW_NODE   (1<<0)

Definition at line 41 of file ip_tree.h.

Referenced by mark_node(), and pike_check_req().

#define NEWRED_NODE   (1<<2)

Definition at line 43 of file ip_tree.h.

Referenced by mark_node(), and pike_check_req().

#define NO_UPDATE   (1<<3)

Definition at line 44 of file ip_tree.h.

Referenced by mark_node(), and pike_check_req().

#define NODE_EXPIRED_FLAG   (1<<0)

Definition at line 52 of file ip_tree.h.

Referenced by check_and_split_timer(), clean_routine(), and pike_check_req().

#define NODE_INTIMER_FLAG   (1<<1)

Definition at line 53 of file ip_tree.h.

Referenced by check_and_split_timer(), clean_routine(), and pike_check_req().

#define NODE_IPLEAF_FLAG   (1<<2)

Definition at line 54 of file ip_tree.h.

Referenced by clean_routine(), mark_node(), and pike_check_req().

#define NODE_ISRED_FLAG   (1<<3)

Definition at line 55 of file ip_tree.h.

Referenced by mark_node(), print_red_ips(), and refresh_node().

#define PREV_POS   0

Definition at line 48 of file ip_tree.h.

Referenced by clean_routine(), pike_check_req(), refresh_node(), and split_node().

#define RED_NODE   (1<<1)

Definition at line 42 of file ip_tree.h.

Referenced by mark_node(), and pike_check_req().


Function Documentation

void destroy_ip_tree ( void   ) 

struct ip_node* get_tree_branch ( unsigned char  b  )  [read]

Definition at line 67 of file ip_tree.c.

References prv_get_tree_branch().

Referenced by mi_pike_list(), and swap_routine().

int init_ip_tree ( int   ) 

int is_node_hot_leaf ( struct ip_node node  ) 

Definition at line 261 of file ip_tree.c.

References is_hot_leaf.

Referenced by refresh_node().

void lock_tree_branch ( unsigned char  b  ) 

Definition at line 71 of file ip_tree.c.

References prv_lock_tree_branch().

Referenced by clean_routine(), mi_pike_list(), pike_check_req(), and swap_routine().

struct ip_node* mark_node ( unsigned char *  ip,
int  ip_len,
struct ip_node **  father,
unsigned char *  flag 
) [read]

void remove_node ( struct ip_node node  ) 

void unlock_tree_branch ( unsigned char  b  ) 

Definition at line 75 of file ip_tree.c.

References prv_unlock_tree_branch().

Referenced by clean_routine(), mi_pike_list(), pike_check_req(), and swap_routine().


Generated on Wed May 23 08:01:16 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6