Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
netlabel_unlabeled.h File Reference
#include <net/netlabel.h>

Go to the source code of this file.

Macros

#define NLBL_UNLABEL_A_MAX   (__NLBL_UNLABEL_A_MAX - 1)
 
#define NETLBL_UNLHSH_BITSIZE   7
 

Enumerations

enum  {
  NLBL_UNLABEL_C_UNSPEC, NLBL_UNLABEL_C_ACCEPT, NLBL_UNLABEL_C_LIST, NLBL_UNLABEL_C_STATICADD,
  NLBL_UNLABEL_C_STATICREMOVE, NLBL_UNLABEL_C_STATICLIST, NLBL_UNLABEL_C_STATICADDDEF, NLBL_UNLABEL_C_STATICREMOVEDEF,
  NLBL_UNLABEL_C_STATICLISTDEF, __NLBL_UNLABEL_C_MAX
}
 
enum  {
  NLBL_UNLABEL_A_UNSPEC, NLBL_UNLABEL_A_ACPTFLG, NLBL_UNLABEL_A_IPV6ADDR, NLBL_UNLABEL_A_IPV6MASK,
  NLBL_UNLABEL_A_IPV4ADDR, NLBL_UNLABEL_A_IPV4MASK, NLBL_UNLABEL_A_IFACE, NLBL_UNLABEL_A_SECCTX,
  __NLBL_UNLABEL_A_MAX
}
 

Functions

int netlbl_unlabel_genl_init (void)
 
int netlbl_unlabel_init (u32 size)
 
int netlbl_unlhsh_add (struct net *net, const char *dev_name, const void *addr, const void *mask, u32 addr_len, u32 secid, struct netlbl_audit *audit_info)
 
int netlbl_unlhsh_remove (struct net *net, const char *dev_name, const void *addr, const void *mask, u32 addr_len, struct netlbl_audit *audit_info)
 
int netlbl_unlabel_getattr (const struct sk_buff *skb, u16 family, struct netlbl_lsm_secattr *secattr)
 
int netlbl_unlabel_defconf (void)
 

Macro Definition Documentation

#define NETLBL_UNLHSH_BITSIZE   7

Definition at line 218 of file netlabel_unlabeled.h.

#define NLBL_UNLABEL_A_MAX   (__NLBL_UNLABEL_A_MAX - 1)

Definition at line 211 of file netlabel_unlabeled.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
NLBL_UNLABEL_C_UNSPEC 
NLBL_UNLABEL_C_ACCEPT 
NLBL_UNLABEL_C_LIST 
NLBL_UNLABEL_C_STATICADD 
NLBL_UNLABEL_C_STATICREMOVE 
NLBL_UNLABEL_C_STATICLIST 
NLBL_UNLABEL_C_STATICADDDEF 
NLBL_UNLABEL_C_STATICREMOVEDEF 
NLBL_UNLABEL_C_STATICLISTDEF 
__NLBL_UNLABEL_C_MAX 

Definition at line 171 of file netlabel_unlabeled.h.

anonymous enum
Enumerator:
NLBL_UNLABEL_A_UNSPEC 
NLBL_UNLABEL_A_ACPTFLG 
NLBL_UNLABEL_A_IPV6ADDR 
NLBL_UNLABEL_A_IPV6MASK 
NLBL_UNLABEL_A_IPV4ADDR 
NLBL_UNLABEL_A_IPV4MASK 
NLBL_UNLABEL_A_IFACE 
NLBL_UNLABEL_A_SECCTX 
__NLBL_UNLABEL_A_MAX 

Definition at line 185 of file netlabel_unlabeled.h.

Function Documentation

int netlbl_unlabel_defconf ( void  )

netlbl_unlabel_defconf - Set the default config to allow unlabeled packets

Description: Set the default NetLabel configuration to allow incoming unlabeled packets and to send unlabeled network traffic by default.

Definition at line 1534 of file netlabel_unlabeled.c.

int netlbl_unlabel_genl_init ( void  )

netlbl_unlabel_genl_init - Register the Unlabeled NetLabel component

Description: Register the unlabeled packet NetLabel component with the Generic NETLINK mechanism. Returns zero on success, negative values on failure.

Definition at line 1403 of file netlabel_unlabeled.c.

int netlbl_unlabel_getattr ( const struct sk_buff skb,
u16  family,
struct netlbl_lsm_secattr secattr 
)

netlbl_unlabel_getattr - Get the security attributes for an unlabled packet : the packet : protocol family : the security attributes

Description: Determine the security attributes, if any, for an unlabled packet and return them in . Returns zero on success and negative values on failure.

Definition at line 1470 of file netlabel_unlabeled.c.

int netlbl_unlabel_init ( u32  size)

netlbl_unlabel_init - Initialize the unlabeled connection hash table : the number of bits to use for the hash buckets

Description: Initializes the unlabeled connection hash table and registers a network device notification handler. This function should only be called by the NetLabel subsystem itself during initialization. Returns zero on success, non-zero values on error.

Definition at line 1428 of file netlabel_unlabeled.c.

int netlbl_unlhsh_add ( struct net net,
const char dev_name,
const void addr,
const void mask,
u32  addr_len,
u32  secid,
struct netlbl_audit audit_info 
)

netlbl_unlhsh_add - Adds a new entry to the unlabeled connection hash table : network namespace : interface name : IP address in network byte order : address mask in network byte order : length of address/mask (4 for IPv4, 16 for IPv6) : LSM secid value for the entry : NetLabel audit information

Description: Adds a new entry to the unlabeled connection hash table. Returns zero on success, negative values on failure.

Definition at line 384 of file netlabel_unlabeled.c.

int netlbl_unlhsh_remove ( struct net net,
const char dev_name,
const void addr,
const void mask,
u32  addr_len,
struct netlbl_audit audit_info 
)

netlbl_unlhsh_remove - Remove an entry from the unlabeled hash table : network namespace : interface name : IP address in network byte order : address mask in network byte order : length of address/mask (4 for IPv4, 16 for IPv6) : NetLabel audit information

Description: Removes and existing entry from the unlabeled connection hash table. Returns zero on success, negative values on failure.

Definition at line 648 of file netlabel_unlabeled.c.