Linux Kernel
3.7.1
|
#include <linux/types.h>
#include <linux/rcupdate.h>
#include <linux/list.h>
#include "netlabel_addrlist.h"
Go to the source code of this file.
Data Structures | |
struct | netlbl_domaddr4_map |
struct | netlbl_domaddr6_map |
struct | netlbl_domaddr_map |
struct | netlbl_dom_map |
Macros | |
#define | NETLBL_DOMHSH_BITSIZE 7 |
#define | netlbl_domhsh_addr4_entry(iter) container_of(iter, struct netlbl_domaddr4_map, list) |
#define | netlbl_domhsh_addr6_entry(iter) container_of(iter, struct netlbl_domaddr6_map, list) |
Functions | |
int | netlbl_domhsh_init (u32 size) |
int | netlbl_domhsh_add (struct netlbl_dom_map *entry, struct netlbl_audit *audit_info) |
int | netlbl_domhsh_add_default (struct netlbl_dom_map *entry, struct netlbl_audit *audit_info) |
int | netlbl_domhsh_remove_entry (struct netlbl_dom_map *entry, struct netlbl_audit *audit_info) |
int | netlbl_domhsh_remove_af4 (const char *domain, const struct in_addr *addr, const struct in_addr *mask, struct netlbl_audit *audit_info) |
int | netlbl_domhsh_remove (const char *domain, struct netlbl_audit *audit_info) |
int | netlbl_domhsh_remove_default (struct netlbl_audit *audit_info) |
struct netlbl_dom_map * | netlbl_domhsh_getentry (const char *domain) |
struct netlbl_domaddr4_map * | netlbl_domhsh_getentry_af4 (const char *domain, __be32 addr) |
int | netlbl_domhsh_walk (u32 *skip_bkt, u32 *skip_chain, int(*callback)(struct netlbl_dom_map *entry, void *arg), void *cb_arg) |
#define netlbl_domhsh_addr4_entry | ( | iter | ) | container_of(iter, struct netlbl_domaddr4_map, list) |
Definition at line 46 of file netlabel_domainhash.h.
#define netlbl_domhsh_addr6_entry | ( | iter | ) | container_of(iter, struct netlbl_domaddr6_map, list) |
Definition at line 56 of file netlabel_domainhash.h.
#define NETLBL_DOMHSH_BITSIZE 7 |
Definition at line 43 of file netlabel_domainhash.h.
int netlbl_domhsh_add | ( | struct netlbl_dom_map * | entry, |
struct netlbl_audit * | audit_info | ||
) |
netlbl_domhsh_add - Adds a entry to the domain hash table : the entry to add : NetLabel audit information
Description: Adds a new entry to the domain hash table and handles any updates to the lower level protocol handler (i.e. CIPSO). Returns zero on success, negative on failure.
Definition at line 302 of file netlabel_domainhash.c.
int netlbl_domhsh_add_default | ( | struct netlbl_dom_map * | entry, |
struct netlbl_audit * | audit_info | ||
) |
netlbl_domhsh_add_default - Adds the default entry to the domain hash table : the entry to add : NetLabel audit information
Description: Adds a new default entry to the domain hash table and handles any updates to the lower level protocol handler (i.e. CIPSO). Returns zero on success, negative on failure.
Definition at line 421 of file netlabel_domainhash.c.
|
read |
netlbl_domhsh_getentry - Get an entry from the domain hash table : the domain name to search for
Description: Look through the domain hash table searching for an entry to match , return a pointer to a copy of the entry or NULL. The caller is responsible for ensuring that rcu_read_[un]lock() is called.
Definition at line 611 of file netlabel_domainhash.c.
|
read |
netlbl_domhsh_getentry_af4 - Get an entry from the domain hash table : the domain name to search for : the IP address to search for
Description: Look through the domain hash table searching for an entry to match and , return a pointer to a copy of the entry or NULL. The caller is responsible for ensuring that rcu_read_[un]lock() is called.
Definition at line 627 of file netlabel_domainhash.c.
netlbl_domhsh_init - Init for the domain hash : the number of bits to use for the hash buckets
Description: Initializes the domain hash table, should be called only by netlbl_user_init() during initialization. Returns zero on success, non-zero values on error.
Definition at line 262 of file netlabel_domainhash.c.
int netlbl_domhsh_remove | ( | const char * | domain, |
struct netlbl_audit * | audit_info | ||
) |
netlbl_domhsh_remove - Removes an entry from the domain hash table : the domain to remove : NetLabel audit information
Description: Removes an entry from the domain hash table and handles any updates to the lower level protocol handler (i.e. CIPSO). Returns zero on success, negative on failure.
Definition at line 570 of file netlabel_domainhash.c.
int netlbl_domhsh_remove_af4 | ( | const char * | domain, |
const struct in_addr * | addr, | ||
const struct in_addr * | mask, | ||
struct netlbl_audit * | audit_info | ||
) |
netlbl_domhsh_remove_af4 - Removes an address selector entry : the domain : IPv4 address : IPv4 address mask : NetLabel audit information
Description: Removes an individual address selector from a domain mapping and potentially the entire mapping if it is empty. Returns zero on success, negative values on failure.
Definition at line 505 of file netlabel_domainhash.c.
int netlbl_domhsh_remove_default | ( | struct netlbl_audit * | audit_info | ) |
netlbl_domhsh_remove_default - Removes the default entry from the table : NetLabel audit information
Description: Removes/resets the default entry for the domain hash table and handles any updates to the lower level protocol handler (i.e. CIPSO). Returns zero on success, non-zero on failure.
Definition at line 596 of file netlabel_domainhash.c.
int netlbl_domhsh_remove_entry | ( | struct netlbl_dom_map * | entry, |
struct netlbl_audit * | audit_info | ||
) |
netlbl_domhsh_remove_entry - Removes a given entry from the domain table : the entry to remove : NetLabel audit information
Description: Removes an entry from the domain hash table and handles any updates to the lower level protocol handler (i.e. CIPSO). Caller is responsible for ensuring that the RCU read lock is held. Returns zero on success, negative on failure.
Definition at line 439 of file netlabel_domainhash.c.
int netlbl_domhsh_walk | ( | u32 * | skip_bkt, |
u32 * | skip_chain, | ||
int(*)(struct netlbl_dom_map *entry, void *arg) | callback, | ||
void * | cb_arg | ||
) |
netlbl_domhsh_walk - Iterate through the domain mapping hash table : the number of buckets to skip at the start : the number of entries to skip in the first iterated bucket : callback for each entry : argument for the callback function
Description: Interate over the domain mapping hash table, skipping the first buckets and entries. For each entry in the table call , if returns a negative value stop 'walking' through the table and return. Updates the values in and on return. Returns zero on success, negative values on failure.
Definition at line 695 of file netlabel_domainhash.c.