blacklists.h File Reference

Kamailio Blacklist functions. More...

#include "ip_addr.h"
#include "str.h"
#include "locking.h"

Include dependency graph for blacklists.h:

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

Go to the source code of this file.

Data Structures

struct  bl_head
struct  bl_rule

Defines

#define BL_BY_DEFAULT   (1<<2)
#define BL_CORE_ID   13
#define BL_DO_EXPIRE   (1<<1)
#define BL_READONLY_LIST   (1<<0)
#define BLR_APPLY_CONTRARY   (1<<0)

Functions

int add_list_to_head (struct bl_head *elem, struct bl_rule *first, struct bl_rule *last, int truncate, int expire_limit)
int add_rule_to_list (struct bl_rule **first, struct bl_rule **last, struct net *ip_net, str *body, unsigned short port, unsigned short proto, int flags)
 adds a new rule to a list of rules
int check_against_blacklist (struct ip_addr *ip, str *text, unsigned short port, unsigned short proto)
static int check_blacklists (unsigned short proto, union sockaddr_union *to, char *body_s, int body_len)
struct bl_headcreate_bl_head (int owner, int flags, struct bl_rule *head, struct bl_rule *tail, str *name)
void destroy_black_lists (void)
struct bl_headget_bl_head_by_name (str *name)
int init_black_lists (void)
int mark_for_search (struct bl_head *list, unsigned int set)
int preinit_black_lists (void)
void reset_bl_markers (void)


Detailed Description

Kamailio Blacklist functions.

Definition in file blacklists.h.


Define Documentation

#define BL_BY_DEFAULT   (1<<2)

Definition at line 38 of file blacklists.h.

Referenced by create_bl_head(), and resolv_blacklist_init().

#define BL_CORE_ID   13

Definition at line 65 of file blacklists.h.

#define BL_DO_EXPIRE   (1<<1)

#define BL_READONLY_LIST   (1<<0)

#define BLR_APPLY_CONTRARY   (1<<0)

Definition at line 40 of file blacklists.h.

Referenced by check_against_rule_list().


Function Documentation

int add_list_to_head ( struct bl_head elem,
struct bl_rule first,
struct bl_rule last,
int  truncate,
int  expire_limit 
)

int add_rule_to_list ( struct bl_rule **  first,
struct bl_rule **  last,
struct net ip_net,
str body,
unsigned short  port,
unsigned short  proto,
int  flags 
)

int check_against_blacklist ( struct ip_addr ip,
str text,
unsigned short  port,
unsigned short  proto 
)

Definition at line 665 of file blacklists.c.

References bl_marker, check_against_rule_list(), and used_heads.

Referenced by check_blacklists().

static int check_blacklists ( unsigned short  proto,
union sockaddr_union to,
char *  body_s,
int  body_len 
) [inline, static]

Definition at line 95 of file blacklists.h.

References check_against_blacklist(), _str::len, port, _str::s, su2ip_addr(), and su_getport().

Referenced by forward_request(), and t_forward_nonack().

struct bl_head* create_bl_head ( int  owner,
int  flags,
struct bl_rule head,
struct bl_rule tail,
str name 
) [read]

void destroy_black_lists ( void   ) 

Definition at line 218 of file blacklists.c.

References bl_head::first, bl_head::last, lock, bl_rule::next, no_shm, NULL, shm_free, and used_heads.

Referenced by cleanup().

struct bl_head* get_bl_head_by_name ( str name  )  [read]

Definition at line 573 of file blacklists.c.

References _str::len, bl_head::name, NULL, _str::s, and used_heads.

Referenced by create_bl_head(), and fix_actions().

int init_black_lists ( void   ) 

int mark_for_search ( struct bl_head list,
unsigned int  set 
)

int preinit_black_lists ( void   ) 

Definition at line 64 of file blacklists.c.

References LM_ERR, max_heads, NULL, pkg_malloc, and used_heads.

Referenced by main().

void reset_bl_markers ( void   ) 

Definition at line 611 of file blacklists.c.

References bl_default_marker, and bl_marker.

Referenced by run_top_route().


Generated on Thu May 17 12:00:36 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6