net_namespace.c File Reference

Go to the source code of this file.

Defines

#define INITIAL_NET_GEN_PTRS   13

Functions

static LIST_HEAD (pernet_list)
static DEFINE_MUTEX (net_mutex)
 LIST_HEAD (net_namespace_list)
 EXPORT_SYMBOL_GPL (net_namespace_list)
 EXPORT_SYMBOL (init_net)
static __net_init int setup_net (struct net *net)
static struct net_generic * net_alloc_generic (void)
struct net * copy_net_ns (unsigned long flags, struct net *old_net)
static int __init net_ns_init (void)
 pure_initcall (net_ns_init)
static int register_pernet_operations (struct list_head *list, struct pernet_operations *ops)
static void unregister_pernet_operations (struct pernet_operations *ops)
static DEFINE_IDA (net_generic_ids)
int register_pernet_subsys (struct pernet_operations *ops)
 register_pernet_subsys - register a network namespace subsystem : pernet operations structure for the subsystem
 EXPORT_SYMBOL_GPL (register_pernet_subsys)
void unregister_pernet_subsys (struct pernet_operations *module)
 unregister_pernet_subsys - unregister a network namespace subsystem : pernet operations structure to manipulate
 EXPORT_SYMBOL_GPL (unregister_pernet_subsys)
int register_pernet_gen_subsys (int *id, struct pernet_operations *ops)
 EXPORT_SYMBOL_GPL (register_pernet_gen_subsys)
void unregister_pernet_gen_subsys (int id, struct pernet_operations *ops)
 EXPORT_SYMBOL_GPL (unregister_pernet_gen_subsys)
int register_pernet_device (struct pernet_operations *ops)
 register_pernet_device - register a network namespace device : pernet operations structure for the subsystem
 EXPORT_SYMBOL_GPL (register_pernet_device)
int register_pernet_gen_device (int *id, struct pernet_operations *ops)
 EXPORT_SYMBOL_GPL (register_pernet_gen_device)
void unregister_pernet_device (struct pernet_operations *ops)
 unregister_pernet_device - unregister a network namespace netdevice : pernet operations structure to manipulate
 EXPORT_SYMBOL_GPL (unregister_pernet_device)
void unregister_pernet_gen_device (int id, struct pernet_operations *ops)
 EXPORT_SYMBOL_GPL (unregister_pernet_gen_device)
static void net_generic_release (struct rcu_head *rcu)
int net_assign_generic (struct net *net, int id, void *data)
 EXPORT_SYMBOL_GPL (net_assign_generic)

Variables

static struct list_head * first_device = &pernet_list
struct net init_net


Define Documentation

#define INITIAL_NET_GEN_PTRS   13

Definition at line 26 of file net_namespace.c.


Function Documentation

struct net* copy_net_ns ( unsigned long  flags,
struct net *  old_net 
) [read]

Definition at line 197 of file net_namespace.c.

static DEFINE_IDA ( net_generic_ids   )  [static]

static DEFINE_MUTEX ( net_mutex   )  [static]

EXPORT_SYMBOL ( init_net   ) 

EXPORT_SYMBOL_GPL ( net_assign_generic   ) 

EXPORT_SYMBOL_GPL ( unregister_pernet_gen_device   ) 

EXPORT_SYMBOL_GPL ( unregister_pernet_device   ) 

EXPORT_SYMBOL_GPL ( register_pernet_gen_device   ) 

EXPORT_SYMBOL_GPL ( register_pernet_device   ) 

EXPORT_SYMBOL_GPL ( unregister_pernet_gen_subsys   ) 

EXPORT_SYMBOL_GPL ( register_pernet_gen_subsys   ) 

EXPORT_SYMBOL_GPL ( unregister_pernet_subsys   ) 

EXPORT_SYMBOL_GPL ( register_pernet_subsys   ) 

EXPORT_SYMBOL_GPL ( net_namespace_list   ) 

LIST_HEAD ( net_namespace_list   ) 

static LIST_HEAD ( pernet_list   )  [static]

static struct net_generic* net_alloc_generic ( void   )  [static, read]

Definition at line 68 of file net_namespace.c.

int net_assign_generic ( struct net *  net,
int  id,
void *  data 
)

Definition at line 475 of file net_namespace.c.

static void net_generic_release ( struct rcu_head *  rcu  )  [static]

Definition at line 467 of file net_namespace.c.

static int __init net_ns_init ( void   )  [static]

Definition at line 205 of file net_namespace.c.

pure_initcall ( net_ns_init   ) 

int register_pernet_device ( struct pernet_operations *  ops  ) 

register_pernet_device - register a network namespace device : pernet operations structure for the subsystem

Register a device which has init and exit functions that are called when network namespaces are created and destroyed respectively.

When registered all network namespace init functions are called for every existing network namespace. Allowing kernel modules to have a race free view of the set of network namespaces.

When a new network namespace is created all of the init methods are called in the order in which they were registered.

When a network namespace is destroyed all of the exit methods are called in the reverse of the order with which they were registered.

Definition at line 401 of file net_namespace.c.

int register_pernet_gen_device ( int *  id,
struct pernet_operations *  ops 
)

Definition at line 413 of file net_namespace.c.

int register_pernet_gen_subsys ( int *  id,
struct pernet_operations *  ops 
)

Definition at line 350 of file net_namespace.c.

static int register_pernet_operations ( struct list_head *  list,
struct pernet_operations *  ops 
) [static]

Definition at line 287 of file net_namespace.c.

int register_pernet_subsys ( struct pernet_operations *  ops  ) 

register_pernet_subsys - register a network namespace subsystem : pernet operations structure for the subsystem

Register a subsystem which has init and exit functions that are called when network namespaces are created and destroyed respectively.

When registered all network namespace init functions are called for every existing network namespace. Allowing kernel modules to have a race free view of the set of network namespaces.

When a new network namespace is created all of the init methods are called in the order in which they were registered.

When a network namespace is destroyed all of the exit methods are called in the reverse of the order with which they were registered.

Definition at line 323 of file net_namespace.c.

static __net_init int setup_net ( struct net *  net  )  [static]

Definition at line 31 of file net_namespace.c.

void unregister_pernet_device ( struct pernet_operations *  ops  ) 

unregister_pernet_device - unregister a network namespace netdevice : pernet operations structure to manipulate

Remove the pernet operations structure from the list to be used when network namespaces are created or destroyed. In addition run the exit method for all existing network namespaces.

Definition at line 446 of file net_namespace.c.

void unregister_pernet_gen_device ( int  id,
struct pernet_operations *  ops 
)

Definition at line 456 of file net_namespace.c.

void unregister_pernet_gen_subsys ( int  id,
struct pernet_operations *  ops 
)

Definition at line 373 of file net_namespace.c.

static void unregister_pernet_operations ( struct pernet_operations *  ops  )  [static]

Definition at line 295 of file net_namespace.c.

void unregister_pernet_subsys ( struct pernet_operations *  module  ) 

unregister_pernet_subsys - unregister a network namespace subsystem : pernet operations structure to manipulate

Remove the pernet operations structure from the list to be used when network namespaces are created or destroyed. In addition run the exit method for all existing network namespaces.

Definition at line 342 of file net_namespace.c.


Variable Documentation

struct list_head* first_device = &pernet_list [static]

Definition at line 17 of file net_namespace.c.

struct net init_net

Definition at line 23 of file net_namespace.c.


Generated on Wed Apr 11 06:39:15 2012 for DDE - The L4 Device Driver Environment by  doxygen 1.5.6