Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

sflsq.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sflsq.h"

Go to the source code of this file.

Functions

static void * s_malloc (int n)
static void s_free (void *p)
void sflist_init (SF_LIST *s)
SF_LISTsflist_new ()
SF_STACKsfstack_new ()
SF_QUEUEsfqueue_new ()
int sflist_add_head (SF_LIST *s, NODE_DATA ndata)
int sflist_add_tail (SF_LIST *s, NODE_DATA ndata)
int sflist_add_before (SF_LIST *s, SF_LNODE *lnode, NODE_DATA ndata)
int sfqueue_add (SF_QUEUE *s, NODE_DATA ndata)
int sfstack_add (SF_STACK *s, NODE_DATA ndata)
NODE_DATA sflist_first (SF_LIST *s)
NODE_DATA sflist_next (SF_LIST *s)
NODE_DATA sflist_prev (SF_LIST *s)
SF_LNODEsflist_first_node (SF_LIST *s)
SF_LNODEsflist_next_node (SF_LIST *s)
NODE_DATA sflist_remove_head (SF_LIST *s)
NODE_DATA sflist_remove_tail (SF_LIST *s)
NODE_DATA sflist_remove_current (SF_LIST *s)
NODE_DATA sfqueue_remove (SF_QUEUE *s)
NODE_DATA sfstack_remove (SF_QUEUE *s)
int sfqueue_count (SF_QUEUE *s)
int sflist_count (SF_LIST *s)
int sfstack_count (SF_STACK *s)
void sflist_free_all (SF_LIST *s, void(*nfree)(void *))
void sfqueue_free_all (SF_QUEUE *s, void(*nfree)(void *))
void sfstack_free_all (SF_STACK *s, void(*nfree)(void *))
void sflist_free (SF_LIST *s)
void sfqueue_free (SF_QUEUE *s)
void sfstack_free (SF_STACK *s)
int sfistack_init (SF_ISTACK *s, unsigned *a, int n)
int sfistack_push (SF_ISTACK *s, unsigned value)
int sfistack_pop (SF_ISTACK *s, unsigned *value)
int sfpstack_init (SF_PSTACK *s, void **a, int n)
int sfpstack_push (SF_PSTACK *s, void *value)
int sfpstack_pop (SF_PSTACK *s, void **value)


Function Documentation

static void s_free void *  p  )  [static]
 

Definition at line 34 of file sflsq.c.

static void* s_malloc int  n  )  [static]
 

Definition at line 24 of file sflsq.c.

int sfistack_init SF_ISTACK s,
unsigned *  a,
int  n
 

Definition at line 403 of file sflsq.c.

References SF_ISTACK::imalloc, SF_ISTACK::n, SF_ISTACK::nstack, and SF_ISTACK::stack.

int sfistack_pop SF_ISTACK s,
unsigned *  value
 

Definition at line 426 of file sflsq.c.

References SF_ISTACK::n, and SF_ISTACK::stack.

int sfistack_push SF_ISTACK s,
unsigned  value
 

Definition at line 417 of file sflsq.c.

References SF_ISTACK::n, SF_ISTACK::nstack, and SF_ISTACK::stack.

int sflist_add_before SF_LIST s,
SF_LNODE lnode,
NODE_DATA  ndata
 

Definition at line 136 of file sflsq.c.

References sf_list::count, sf_list::head, sf_lnode::ndata, sf_lnode::next, sf_lnode::prev, s_malloc(), and sflist_add_head().

Referenced by sfthd_create_threshold_local().

int sflist_add_head SF_LIST s,
NODE_DATA  ndata
 

Definition at line 77 of file sflsq.c.

References sf_list::count, sf_list::head, sf_lnode::ndata, sf_lnode::next, sf_lnode::prev, s_malloc(), and sf_list::tail.

Referenced by ipset_add(), sflist_add_before(), and sfthd_create_threshold_local().

int sflist_add_tail SF_LIST s,
NODE_DATA  ndata
 

Definition at line 108 of file sflsq.c.

References sf_list::count, sf_list::head, sf_lnode::ndata, sf_lnode::next, sf_lnode::prev, s_malloc(), and sf_list::tail.

Referenced by ipset_add(), sfqueue_add(), sfstack_add(), and sfthd_create_threshold_local().

int sflist_count SF_LIST s  ) 
 

Definition at line 346 of file sflsq.c.

References sf_list::count.

Referenced by sflist_free(), and sflist_free_all().

NODE_DATA sflist_first SF_LIST s  ) 
 

Definition at line 182 of file sflsq.c.

References sf_list::cur, sf_list::head, and sf_lnode::ndata.

Referenced by ipset_contains(), ipset_copy(), ipset_print(), print_thd_local(), PrintPortscanConf(), sfthd_show_objects(), and sfthd_test_threshold().

SF_LNODE* sflist_first_node SF_LIST s  ) 
 

Definition at line 212 of file sflsq.c.

References sf_list::cur, and sf_list::head.

Referenced by sfthd_create_threshold_local().

void sflist_free SF_LIST s  ) 
 

Definition at line 384 of file sflsq.c.

References sflist_count(), and sflist_remove_head().

Referenced by ipset_free(), sfqueue_free(), and sfstack_free().

void sflist_free_all SF_LIST s,
void(*)(void *)  nfree
 

Definition at line 361 of file sflsq.c.

References sflist_count(), and sflist_remove_head().

Referenced by sfqueue_free_all(), and sfstack_free_all().

void sflist_init SF_LIST s  ) 
 

Definition at line 42 of file sflsq.c.

References sf_list::count, sf_list::cur, sf_list::head, and sf_list::tail.

Referenced by ipset6_init(), ipset_init(), and sflist_new().

SF_LIST* sflist_new void   ) 
 

Definition at line 51 of file sflsq.c.

References s_malloc(), and sflist_init().

Referenced by sfqueue_new(), sfstack_new(), and sfthd_create_threshold_local().

NODE_DATA sflist_next SF_LIST s  ) 
 

Definition at line 189 of file sflsq.c.

References sf_list::cur, sf_lnode::ndata, and sf_lnode::next.

Referenced by ipset_contains(), ipset_copy(), ipset_print(), print_thd_local(), PrintPortscanConf(), sfthd_show_objects(), and sfthd_test_threshold().

SF_LNODE* sflist_next_node SF_LIST s  ) 
 

Definition at line 219 of file sflsq.c.

References sf_list::cur, and sf_lnode::next.

Referenced by sfthd_create_threshold_local().

NODE_DATA sflist_prev SF_LIST s  ) 
 

Definition at line 199 of file sflsq.c.

References sf_list::cur, sf_lnode::ndata, and sf_lnode::prev.

NODE_DATA sflist_remove_current SF_LIST s  ) 
 

Definition at line 286 of file sflsq.c.

References sf_lnode::ndata, sf_lnode::next, NULL, sf_lnode::prev, and s_free().

NODE_DATA sflist_remove_head SF_LIST s  ) 
 

Definition at line 233 of file sflsq.c.

References sf_list::count, sf_list::head, sf_lnode::ndata, sf_lnode::next, s_free(), and sf_list::tail.

Referenced by sflist_free(), sflist_free_all(), and sfqueue_remove().

NODE_DATA sflist_remove_tail SF_LIST s  ) 
 

Definition at line 256 of file sflsq.c.

References sf_lnode::ndata, sf_lnode::next, sf_lnode::prev, and s_free().

Referenced by sfstack_remove().

int sfpstack_init SF_PSTACK s,
void **  a,
int  n
 

Definition at line 440 of file sflsq.c.

References SF_PSTACK::imalloc, SF_PSTACK::n, SF_PSTACK::nstack, and SF_PSTACK::stack.

int sfpstack_pop SF_PSTACK s,
void **  value
 

Definition at line 464 of file sflsq.c.

References SF_PSTACK::n, and SF_PSTACK::stack.

int sfpstack_push SF_PSTACK s,
void *  value
 

Definition at line 455 of file sflsq.c.

References SF_PSTACK::n, SF_PSTACK::nstack, and SF_PSTACK::stack.

int sfqueue_add SF_QUEUE s,
NODE_DATA  ndata
 

Definition at line 169 of file sflsq.c.

References sflist_add_tail().

int sfqueue_count SF_QUEUE s  ) 
 

Definition at line 341 of file sflsq.c.

References sf_list::count.

void sfqueue_free SF_QUEUE s  ) 
 

Definition at line 391 of file sflsq.c.

References sflist_free().

void sfqueue_free_all SF_QUEUE s,
void(*)(void *)  nfree
 

Definition at line 370 of file sflsq.c.

References sflist_free_all().

SF_QUEUE* sfqueue_new void   ) 
 

Definition at line 64 of file sflsq.c.

References sflist_new().

NODE_DATA sfqueue_remove SF_QUEUE s  ) 
 

Definition at line 325 of file sflsq.c.

References sflist_remove_head().

int sfstack_add SF_STACK s,
NODE_DATA  ndata
 

Definition at line 174 of file sflsq.c.

References sflist_add_tail().

int sfstack_count SF_STACK s  ) 
 

Definition at line 351 of file sflsq.c.

References sf_list::count.

void sfstack_free SF_STACK s  ) 
 

Definition at line 395 of file sflsq.c.

References sflist_free().

void sfstack_free_all SF_STACK s,
void(*)(void *)  nfree
 

Definition at line 374 of file sflsq.c.

References sflist_free_all().

SF_STACK* sfstack_new void   ) 
 

Definition at line 59 of file sflsq.c.

References sflist_new().

NODE_DATA sfstack_remove SF_QUEUE s  ) 
 

Definition at line 333 of file sflsq.c.

References sflist_remove_tail().


Generated on Sun May 14 14:51:26 2006 by  doxygen 1.4.2