blob: 7ec10b92bea149b2d1b15a150302621039182569 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Pavel Emelyanov2f72c9b2010-09-27 14:01:27 +04002#ifndef __SUNRPC_NETNS_H__
3#define __SUNRPC_NETNS_H__
4
5#include <net/net_namespace.h>
6#include <net/netns/generic.h>
7
Pavel Emelyanov90d51b02010-09-27 14:02:29 +04008struct cache_detail;
9
Pavel Emelyanov2f72c9b2010-09-27 14:01:27 +040010struct sunrpc_net {
Pavel Emelyanov4f42d0d2010-09-27 14:01:58 +040011 struct proc_dir_entry *proc_net_rpc;
Pavel Emelyanov90d51b02010-09-27 14:02:29 +040012 struct cache_detail *ip_map_cache;
Stanislav Kinsbursky73393232012-01-19 21:42:29 +040013 struct cache_detail *unix_gid_cache;
Stanislav Kinsburskya1db4102012-01-19 21:42:37 +040014 struct cache_detail *rsc_cache;
15 struct cache_detail *rsi_cache;
Stanislav Kinsbursky90c4e822011-12-26 15:39:30 +030016
17 struct super_block *pipefs_sb;
Jeff Layton4b9a4452013-11-14 07:25:17 -050018 struct rpc_pipe *gssd_dummy;
Stanislav Kinsburskyc21a5882011-12-26 15:39:39 +030019 struct mutex pipefs_sb_lock;
Stanislav Kinsbursky70abc492012-01-12 22:07:51 +040020
21 struct list_head all_clients;
22 spinlock_t rpc_client_lock;
Stanislav Kinsburskydff02d42012-01-13 12:52:10 +040023
24 struct rpc_clnt *rpcb_local_clnt;
25 struct rpc_clnt *rpcb_local_clnt4;
26 spinlock_t rpcb_clnt_lock;
27 unsigned int rpcb_users;
Trond Myklebust786615b2013-08-05 16:04:47 -040028 unsigned int rpcb_is_af_local : 1;
Simo Sorce1d658332012-05-25 18:09:55 -040029
30 struct mutex gssp_lock;
31 struct rpc_clnt *gssp_clnt;
Simo Sorce030d7942012-05-25 18:09:56 -040032 int use_gss_proxy;
Trond Myklebust2aed8b42013-05-15 10:27:32 -070033 int pipe_version;
34 atomic_t pipe_users;
Simo Sorce030d7942012-05-25 18:09:56 -040035 struct proc_dir_entry *use_gssp_proc;
Pavel Emelyanov2f72c9b2010-09-27 14:01:27 +040036};
37
Alexey Dobriyanc7d03a02016-11-17 04:58:21 +030038extern unsigned int sunrpc_net_id;
Pavel Emelyanov2f72c9b2010-09-27 14:01:27 +040039
Pavel Emelyanov90d51b02010-09-27 14:02:29 +040040int ip_map_cache_create(struct net *);
41void ip_map_cache_destroy(struct net *);
42
Pavel Emelyanov2f72c9b2010-09-27 14:01:27 +040043#endif