Linux Kernel
3.7.1
|
#include <linux/atomic.h>
#include <linux/workqueue.h>
#include <linux/list.h>
#include <linux/sysctl.h>
#include <net/netns/core.h>
#include <net/netns/mib.h>
#include <net/netns/unix.h>
#include <net/netns/packet.h>
#include <net/netns/ipv4.h>
#include <net/netns/ipv6.h>
#include <net/netns/sctp.h>
#include <net/netns/dccp.h>
#include <net/netns/x_tables.h>
#include <net/netns/xfrm.h>
#include <linux/seq_file_net.h>
Go to the source code of this file.
Data Structures | |
struct | net |
struct | pernet_operations |
Macros | |
#define | NETDEV_HASHBITS 8 |
#define | NETDEV_HASHENTRIES (1 << NETDEV_HASHBITS) |
#define | LOOPBACK_IFINDEX 1 |
#define | net_drop_ns NULL |
#define | write_pnet(pnet, net) do { (void)(net);} while (0) |
#define | read_pnet(pnet) (&init_net) |
#define | for_each_net(VAR) list_for_each_entry(VAR, &net_namespace_list, list) |
#define | for_each_net_rcu(VAR) list_for_each_entry_rcu(VAR, &net_namespace_list, list) |
#define | __net_init __init |
#define | __net_exit __exit_refok |
#define | __net_initdata __initdata |
#define | __net_initconst __initconst |
Variables | |
struct net | init_net |
struct list_head | net_namespace_list |
#define __net_exit __exit_refok |
Definition at line 263 of file net_namespace.h.
#define __net_init __init |
Definition at line 262 of file net_namespace.h.
#define __net_initconst __initconst |
Definition at line 265 of file net_namespace.h.
#define __net_initdata __initdata |
Definition at line 264 of file net_namespace.h.
#define for_each_net | ( | VAR | ) | list_for_each_entry(VAR, &net_namespace_list, list) |
Definition at line 250 of file net_namespace.h.
#define for_each_net_rcu | ( | VAR | ) | list_for_each_entry_rcu(VAR, &net_namespace_list, list) |
Definition at line 253 of file net_namespace.h.
#define LOOPBACK_IFINDEX 1 |
Definition at line 122 of file net_namespace.h.
#define net_drop_ns NULL |
Definition at line 203 of file net_namespace.h.
#define NETDEV_HASHBITS 8 |
Definition at line 35 of file net_namespace.h.
#define NETDEV_HASHENTRIES (1 << NETDEV_HASHBITS) |
Definition at line 36 of file net_namespace.h.
#define read_pnet | ( | pnet | ) | (&init_net) |
Definition at line 246 of file net_namespace.h.
Definition at line 245 of file net_namespace.h.
Definition at line 357 of file net_namespace.c.
Definition at line 363 of file net_namespace.c.
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 579 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 533 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 600 of file net_namespace.c.
void unregister_pernet_subsys | ( | struct pernet_operations * | ops | ) |
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 552 of file net_namespace.c.
Definition at line 30 of file net_namespace.c.