summaryrefslogtreecommitdiffstats
path: root/net/tipc/server.h
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2015-01-09 15:27:09 +0800
committerDavid S. Miller <davem@davemloft.net>2015-01-12 16:24:33 -0500
commit4ac1c8d0ee9faf3a4be185cc4db1381fa0d81280 (patch)
tree361ea817ed30f0dd959ea2d87d658c8d85feebb2 /net/tipc/server.h
parente05b31f4bf8994d49322e9afb004ad479a129db0 (diff)
downloadblackbird-op-linux-4ac1c8d0ee9faf3a4be185cc4db1381fa0d81280.tar.gz
blackbird-op-linux-4ac1c8d0ee9faf3a4be185cc4db1381fa0d81280.zip
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.h10
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 @@
#include <linux/idr.h>
#include <linux/tipc.h>
+#include <net/net_namespace.h>
#define TIPC_SERVER_NAME_LEN 32
@@ -66,10 +67,11 @@ struct tipc_server {
struct workqueue_struct *rcv_wq;
struct workqueue_struct *send_wq;
int max_rcvbuf_size;
- void *(*tipc_conn_new) (int conid);
- void (*tipc_conn_shutdown) (int conid, void *usr_data);
- void (*tipc_conn_recvmsg) (int conid, struct sockaddr_tipc *addr,
- void *usr_data, void *buf, size_t len);
+ void *(*tipc_conn_new)(int conid);
+ void (*tipc_conn_shutdown)(int conid, void *usr_data);
+ void (*tipc_conn_recvmsg)(struct net *net, int conid,
+ struct sockaddr_tipc *addr, void *usr_data,
+ void *buf, size_t len);
struct sockaddr_tipc *saddr;
const char name[TIPC_SERVER_NAME_LEN];
int imp;
OpenPOWER on IntegriCloud