aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-04-15 03:35:23 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-15 03:35:23 -0400
commitc93cf61fd1d5378134f9b06703f7078067542e00 (patch)
tree5ea9e584aa2c10b9c395730ee5bb944902d3e760 /include
parent31efdf0530b6351b0658d35a602a0f2d6bc2ed6f (diff)
[NETNS]: The net-subsys IDs generator.
To make some per-net generic pointers, we need some way to address them, i.e. - IDs. This is simple IDA-based IDs generator for pernet subsystems. Addressing questions about potential checkpoint/restart problems: these IDs are "lite-offsets" within the net structure and are by no means supposed to be exported to the userspace. Since it will be used in the nearest future by devices only (tun, vlan, tunnels, bridge, etc), I make it resemble the functionality of register_pernet_device(). The new ids is stored in the *id pointer _before_ calling the init callback to make this id available in this callback. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/net_namespace.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index e2aee2689abe..72fad1a0956b 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -185,6 +185,8 @@ extern int register_pernet_subsys(struct pernet_operations *);
185extern void unregister_pernet_subsys(struct pernet_operations *); 185extern void unregister_pernet_subsys(struct pernet_operations *);
186extern int register_pernet_device(struct pernet_operations *); 186extern int register_pernet_device(struct pernet_operations *);
187extern void unregister_pernet_device(struct pernet_operations *); 187extern void unregister_pernet_device(struct pernet_operations *);
188extern int register_pernet_gen_device(int *id, struct pernet_operations *);
189extern void unregister_pernet_gen_device(int id, struct pernet_operations *);
188 190
189struct ctl_path; 191struct ctl_path;
190struct ctl_table; 192struct ctl_table;