modules/userblacklist/db.h File Reference

USERBLACKLIST :: database access

More...

#include "../../sr_module.h"
#include "../../trie/dtrie.h"

Include dependency graph for modules/userblacklist/db.h:

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

Go to the source code of this file.

Defines

#define MARK_BLACKLIST   2
#define MARK_WHITELIST   1

Functions

int db_build_userbl_tree (const str *user, const str *domain, const str *table, struct dtrie_node_t *root, int use_domain)
int db_reload_source (const str *table, struct dtrie_node_t *root)


Detailed Description

USERBLACKLIST :: database access

Definition in file modules/userblacklist/db.h.


Define Documentation

#define MARK_BLACKLIST   2

Definition at line 37 of file modules/userblacklist/db.h.

Referenced by db_build_userbl_tree(), and db_reload_source().

#define MARK_WHITELIST   1


Function Documentation

int db_build_userbl_tree ( const str username,
const str domain,
const str table,
struct dtrie_node_t *  root,
int  use_domain 
)

int db_reload_source ( const str table,
struct dtrie_node_t *  root 
)

Rebuild d-tree using database entries

Returns:
negative on failure, positive on success, indicating the number of d-tree entries

Definition at line 102 of file modules/userblacklist/db.c.

References columns, DB_INT, DB_STRING, db_func::free_result, globalblacklist_prefix_col, globalblacklist_whitelist_col, _str::len, LM_ERR, MARK_BLACKLIST, MARK_WHITELIST, NULL, db_func::query, RES_COL_N, RES_ROW_N, RES_ROWS, _str::s, db_func::use_table, userblacklist_dbf, and userblacklist_dbh.

Referenced by reload_sources().


Generated on Wed May 23 20:00:37 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6