Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
netlabel_addrlist.h File Reference
#include <linux/types.h>
#include <linux/rcupdate.h>
#include <linux/list.h>
#include <linux/in6.h>
#include <linux/audit.h>

Go to the source code of this file.

Data Structures

struct  netlbl_af4list
 
struct  netlbl_af6list
 

Macros

#define __af4list_entry(ptr)   container_of(ptr, struct netlbl_af4list, list)
 
#define netlbl_af4list_foreach(iter, head)
 
#define netlbl_af4list_foreach_rcu(iter, head)
 
#define netlbl_af4list_foreach_safe(iter, tmp, head)
 

Functions

int netlbl_af4list_add (struct netlbl_af4list *entry, struct list_head *head)
 
struct netlbl_af4listnetlbl_af4list_remove (__be32 addr, __be32 mask, struct list_head *head)
 
void netlbl_af4list_remove_entry (struct netlbl_af4list *entry)
 
struct netlbl_af4listnetlbl_af4list_search (__be32 addr, struct list_head *head)
 
struct netlbl_af4listnetlbl_af4list_search_exact (__be32 addr, __be32 mask, struct list_head *head)
 

Macro Definition Documentation

#define __af4list_entry (   ptr)    container_of(ptr, struct netlbl_af4list, list)

Definition at line 71 of file netlabel_addrlist.h.

#define netlbl_af4list_foreach (   iter,
  head 
)
Value:
for (iter = __af4list_valid((head)->next, head); \
&iter->list != (head); \
iter = __af4list_valid(iter->list.next, head))

Definition at line 97 of file netlabel_addrlist.h.

#define netlbl_af4list_foreach_rcu (   iter,
  head 
)
Value:
for (iter = __af4list_valid_rcu((head)->next, head); \
&iter->list != (head); \
iter = __af4list_valid_rcu(iter->list.next, head))

Definition at line 102 of file netlabel_addrlist.h.

#define netlbl_af4list_foreach_safe (   iter,
  tmp,
  head 
)
Value:
for (iter = __af4list_valid((head)->next, head), \
tmp = __af4list_valid(iter->list.next, head); \
&iter->list != (head); \
iter = tmp, tmp = __af4list_valid(iter->list.next, head))

Definition at line 107 of file netlabel_addrlist.h.

Function Documentation

int netlbl_af4list_add ( struct netlbl_af4list entry,
struct list_head head 
)

netlbl_af4list_add - Add a new IPv4 address entry to a list : address entry : the list head

Description: Add a new address entry to the list pointed to by . On success zero is returned, otherwise a negative value is returned. The caller is responsible for calling the necessary locking functions.

Definition at line 163 of file netlabel_addrlist.c.

struct netlbl_af4list* netlbl_af4list_remove ( __be32  addr,
__be32  mask,
struct list_head head 
)
read

netlbl_af4list_remove - Remove an IPv4 address entry : IP address : IP address mask : the list head

Description: Remove an IP address entry from the list pointed to by . Returns the entry on success, NULL on failure. The caller is responsible for calling the necessary locking functions.

Definition at line 254 of file netlabel_addrlist.c.

void netlbl_af4list_remove_entry ( struct netlbl_af4list entry)

netlbl_af4list_remove_entry - Remove an IPv4 address entry : address entry

Description: Remove the specified IP address entry. The caller is responsible for calling the necessary locking functions.

Definition at line 236 of file netlabel_addrlist.c.

struct netlbl_af4list* netlbl_af4list_search ( __be32  addr,
struct list_head head 
)
read

netlbl_af4list_search - Search for a matching IPv4 address entry : IPv4 address : the list head

Description: Searches the IPv4 address list given by . If a matching address entry is found it is returned, otherwise NULL is returned. The caller is responsible for calling the rcu_read_[un]lock() functions.

Definition at line 61 of file netlabel_addrlist.c.

struct netlbl_af4list* netlbl_af4list_search_exact ( __be32  addr,
__be32  mask,
struct list_head head 
)
read

netlbl_af4list_search_exact - Search for an exact IPv4 address entry : IPv4 address : IPv4 address mask : the list head

Description: Searches the IPv4 address list given by . If an exact match if found it is returned, otherwise NULL is returned. The caller is responsible for calling the rcu_read_[un]lock() functions.

Definition at line 85 of file netlabel_addrlist.c.