firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
linux_rbtree.h File Reference
#include <stdlib.h>
Include dependency graph for linux_rbtree.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  rb_node
struct  rb_root


#define RB_RED   0
#define RB_BLACK   1
#define rb_parent(r)   ((struct rb_node *)((r)->rb_parent_color & ~3))
#define rb_color(r)   ((r)->rb_parent_color & 1)
#define rb_is_red(r)   (!rb_color(r))
#define rb_is_black(r)   rb_color(r)
#define rb_set_red(r)   do { (r)->rb_parent_color &= ~1; } while (0)
#define rb_set_black(r)   do { (r)->rb_parent_color |= 1; } while (0)
#define RB_ROOT   { NULL, }
#define rb_entry(ptr, type, member)   container_of(ptr, type, member)
#define RB_EMPTY_ROOT(root)   ((root)->rb_node == NULL)
#define RB_EMPTY_NODE(node)   (rb_parent(node) == node)
#define RB_CLEAR_NODE(node)   (rb_set_parent(node, node))


struct rb_node __attribute__ ((aligned(sizeof(long))))
void rb_insert_color (struct rb_node *, struct rb_root *)
void rb_erase (struct rb_node *, struct rb_root *)
struct rb_noderb_next (struct rb_node *)
struct rb_noderb_prev (struct rb_node *)
struct rb_noderb_first (struct rb_root *)
struct rb_noderb_last (struct rb_root *)
void rb_replace_node (struct rb_node *victim, struct rb_node *new, struct rb_root *root)


unsigned long rb_parent_color
struct rb_noderb_right
struct rb_noderb_left
struct rb_root __attribute__

Macro Definition Documentation

#define RB_BLACK   1

Referenced by rb_erase().

#define RB_CLEAR_NODE (   node)    (rb_set_parent(node, node))
#define rb_color (   r)    ((r)->rb_parent_color & 1)

Referenced by rb_erase().

#define RB_EMPTY_NODE (   node)    (rb_parent(node) == node)
#define RB_EMPTY_ROOT (   root)    ((root)->rb_node == NULL)
#define rb_entry (   ptr,
)    container_of(ptr, type, member)
#define rb_is_black (   r)    rb_color(r)
#define rb_is_red (   r)    (!rb_color(r))

Referenced by rb_insert_color().

#define rb_parent (   r)    ((struct rb_node *)((r)->rb_parent_color & ~3))
#define RB_RED   0
#define RB_ROOT   { NULL, }
#define rb_set_black (   r)    do { (r)->rb_parent_color |= 1; } while (0)

Referenced by rb_insert_color().

#define rb_set_red (   r)    do { (r)->rb_parent_color &= ~1; } while (0)

Referenced by rb_insert_color().

Function Documentation

struct rb_node __attribute__ ( (aligned(sizeof(long)))  )
void rb_erase ( struct rb_node ,
struct rb_root  

Referenced by del_alarm(), do_alarm_run(), ulogd_del_timer(), and ulogd_do_timer_run().

Here is the caller graph for this function:

struct rb_node* rb_first ( struct rb_root )

Referenced by do_alarm_run(), get_next_alarm_run(), ulogd_do_timer_run(), and ulogd_get_next_timer_run().

Here is the caller graph for this function:

void rb_insert_color ( struct rb_node ,
struct rb_root  
struct rb_node* rb_last ( struct rb_root )
struct rb_node* rb_next ( struct rb_node )

Referenced by do_alarm_run(), and ulogd_do_timer_run().

Here is the caller graph for this function:

struct rb_node* rb_prev ( struct rb_node )
void rb_replace_node ( struct rb_node victim,
struct rb_node new,
struct rb_root root 

Variable Documentation

struct rb_root __attribute__
struct rb_node* rb_left

Referenced by rb_erase().

unsigned long rb_parent_color
struct rb_node* rb_right