diff options
author | Ying Xue <ying.xue@windriver.com> | 2015-01-09 02:27:09 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-12 16:24:33 -0500 |
commit | 4ac1c8d0ee9faf3a4be185cc4db1381fa0d81280 (patch) | |
tree | 361ea817ed30f0dd959ea2d87d658c8d85feebb2 /net/tipc/server.h | |
parent | e05b31f4bf8994d49322e9afb004ad479a129db0 (diff) |
tipc: name tipc name table support net namespace
TIPC name table is used to store the mapping relationship between
TIPC service name and socket port ID. When tipc supports namespace,
it allows users to publish service names only owned by a certain
namespace. Therefore, every namespace must have its private name
table to prevent service names published to one namespace from being
contaminated by other service names in another namespace. Therefore,
The name table global variable (ie, nametbl) and its lock must be
moved to tipc_net structure, and a parameter of namespace must be
added for necessary functions so that they can obtain name table
variable defined in tipc_net structure.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Tested-by: Tero Aho <Tero.Aho@coriant.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/server.h')
-rw-r--r-- | net/tipc/server.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/tipc/server.h b/net/tipc/server.h index 87bc05c70dce..9c979a01997c 100644 --- a/net/tipc/server.h +++ b/net/tipc/server.h | |||
@@ -38,6 +38,7 @@ | |||
38 | 38 | ||
39 | #include <linux/idr.h> | 39 | #include <linux/idr.h> |
40 | #include <linux/tipc.h> | 40 | #include <linux/tipc.h> |
41 | #include <net/net_namespace.h> | ||
41 | 42 | ||
42 | #define TIPC_SERVER_NAME_LEN 32 | 43 | #define TIPC_SERVER_NAME_LEN 32 |
43 | 44 | ||
@@ -66,10 +67,11 @@ struct tipc_server { | |||
66 | struct workqueue_struct *rcv_wq; | 67 | struct workqueue_struct *rcv_wq; |
67 | struct workqueue_struct *send_wq; | 68 | struct workqueue_struct *send_wq; |
68 | int max_rcvbuf_size; | 69 | int max_rcvbuf_size; |
69 | void *(*tipc_conn_new) (int conid); | 70 | void *(*tipc_conn_new)(int conid); |
70 | void (*tipc_conn_shutdown) (int conid, void *usr_data); | 71 | void (*tipc_conn_shutdown)(int conid, void *usr_data); |
71 | void (*tipc_conn_recvmsg) (int conid, struct sockaddr_tipc *addr, | 72 | void (*tipc_conn_recvmsg)(struct net *net, int conid, |
72 | void *usr_data, void *buf, size_t len); | 73 | struct sockaddr_tipc *addr, void *usr_data, |
74 | void *buf, size_t len); | ||
73 | struct sockaddr_tipc *saddr; | 75 | struct sockaddr_tipc *saddr; |
74 | const char name[TIPC_SERVER_NAME_LEN]; | 76 | const char name[TIPC_SERVER_NAME_LEN]; |
75 | int imp; | 77 | int imp; |