stats.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * linux/include/linux/sunrpc/stats.h
  3. *
  4. * Client statistics collection for SUN RPC
  5. *
  6. * Copyright (C) 1996 Olaf Kirch <okir@monad.swb.de>
  7. */
  8. #ifndef _LINUX_SUNRPC_STATS_H
  9. #define _LINUX_SUNRPC_STATS_H
  10. #include <linux/proc_fs.h>
  11. struct rpc_stat {
  12. struct rpc_program * program;
  13. unsigned int netcnt,
  14. netudpcnt,
  15. nettcpcnt,
  16. nettcpconn,
  17. netreconn;
  18. unsigned int rpccnt,
  19. rpcretrans,
  20. rpcauthrefresh,
  21. rpcgarbage;
  22. };
  23. struct svc_stat {
  24. struct svc_program * program;
  25. unsigned int netcnt,
  26. netudpcnt,
  27. nettcpcnt,
  28. nettcpconn;
  29. unsigned int rpccnt,
  30. rpcbadfmt,
  31. rpcbadauth,
  32. rpcbadclnt;
  33. };
  34. void rpc_proc_init(void);
  35. void rpc_proc_exit(void);
  36. #ifdef MODULE
  37. void rpc_modcount(struct inode *, int);
  38. #endif
  39. #ifdef CONFIG_PROC_FS
  40. struct proc_dir_entry * rpc_proc_register(struct rpc_stat *);
  41. void rpc_proc_unregister(const char *);
  42. void rpc_proc_zero(struct rpc_program *);
  43. struct proc_dir_entry * svc_proc_register(struct svc_stat *,
  44. const struct file_operations *);
  45. void svc_proc_unregister(const char *);
  46. void svc_seq_show(struct seq_file *,
  47. const struct svc_stat *);
  48. extern struct proc_dir_entry *proc_net_rpc;
  49. #else
  50. static inline struct proc_dir_entry *rpc_proc_register(struct rpc_stat *s) { return NULL; }
  51. static inline void rpc_proc_unregister(const char *p) {}
  52. static inline void rpc_proc_zero(struct rpc_program *p) {}
  53. static inline struct proc_dir_entry *svc_proc_register(struct svc_stat *s,
  54. const struct file_operations *f) { return NULL; }
  55. static inline void svc_proc_unregister(const char *p) {}
  56. static inline void svc_seq_show(struct seq_file *seq,
  57. const struct svc_stat *st) {}
  58. #define proc_net_rpc NULL
  59. #endif
  60. #endif /* _LINUX_SUNRPC_STATS_H */