0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _LINUX_SUNRPC_STATS_H
0011 #define _LINUX_SUNRPC_STATS_H
0012
0013 #include <linux/proc_fs.h>
0014
0015 struct rpc_stat {
0016 const struct rpc_program *program;
0017
0018 unsigned int netcnt,
0019 netudpcnt,
0020 nettcpcnt,
0021 nettcpconn,
0022 netreconn;
0023 unsigned int rpccnt,
0024 rpcretrans,
0025 rpcauthrefresh,
0026 rpcgarbage;
0027 };
0028
0029 struct svc_stat {
0030 struct svc_program * program;
0031
0032 unsigned int netcnt,
0033 netudpcnt,
0034 nettcpcnt,
0035 nettcpconn;
0036 unsigned int rpccnt,
0037 rpcbadfmt,
0038 rpcbadauth,
0039 rpcbadclnt;
0040 };
0041
0042 struct net;
0043 #ifdef CONFIG_PROC_FS
0044 int rpc_proc_init(struct net *);
0045 void rpc_proc_exit(struct net *);
0046 #else
0047 static inline int rpc_proc_init(struct net *net)
0048 {
0049 return 0;
0050 }
0051
0052 static inline void rpc_proc_exit(struct net *net)
0053 {
0054 }
0055 #endif
0056
0057 #ifdef MODULE
0058 void rpc_modcount(struct inode *, int);
0059 #endif
0060
0061 #ifdef CONFIG_PROC_FS
0062 struct proc_dir_entry * rpc_proc_register(struct net *,struct rpc_stat *);
0063 void rpc_proc_unregister(struct net *,const char *);
0064 void rpc_proc_zero(const struct rpc_program *);
0065 struct proc_dir_entry * svc_proc_register(struct net *, struct svc_stat *,
0066 const struct proc_ops *);
0067 void svc_proc_unregister(struct net *, const char *);
0068
0069 void svc_seq_show(struct seq_file *,
0070 const struct svc_stat *);
0071 #else
0072
0073 static inline struct proc_dir_entry *rpc_proc_register(struct net *net, struct rpc_stat *s) { return NULL; }
0074 static inline void rpc_proc_unregister(struct net *net, const char *p) {}
0075 static inline void rpc_proc_zero(const struct rpc_program *p) {}
0076
0077 static inline struct proc_dir_entry *svc_proc_register(struct net *net, struct svc_stat *s,
0078 const struct proc_ops *proc_ops) { return NULL; }
0079 static inline void svc_proc_unregister(struct net *net, const char *p) {}
0080
0081 static inline void svc_seq_show(struct seq_file *seq,
0082 const struct svc_stat *st) {}
0083 #endif
0084
0085 #endif