sysctl_net_ipx.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* -*- linux-c -*-
  2. * sysctl_net_ipx.c: sysctl interface to net IPX subsystem.
  3. *
  4. * Begun April 1, 1996, Mike Shaver.
  5. * Added /proc/sys/net/ipx directory entry (empty =) ). [MS]
  6. * Added /proc/sys/net/ipx/ipx_pprop_broadcasting - acme March 4, 2001
  7. */
  8. #include <linux/mm.h>
  9. #include <linux/sysctl.h>
  10. #ifndef CONFIG_SYSCTL
  11. #error This file should not be compiled without CONFIG_SYSCTL defined
  12. #endif
  13. /* From af_ipx.c */
  14. extern int sysctl_ipx_pprop_broadcasting;
  15. static struct ctl_table ipx_table[] = {
  16. {
  17. .ctl_name = NET_IPX_PPROP_BROADCASTING,
  18. .procname = "ipx_pprop_broadcasting",
  19. .data = &sysctl_ipx_pprop_broadcasting,
  20. .maxlen = sizeof(int),
  21. .mode = 0644,
  22. .proc_handler = &proc_dointvec,
  23. },
  24. { 0 },
  25. };
  26. static struct ctl_table ipx_dir_table[] = {
  27. {
  28. .ctl_name = NET_IPX,
  29. .procname = "ipx",
  30. .mode = 0555,
  31. .child = ipx_table,
  32. },
  33. { 0 },
  34. };
  35. static struct ctl_table ipx_root_table[] = {
  36. {
  37. .ctl_name = CTL_NET,
  38. .procname = "net",
  39. .mode = 0555,
  40. .child = ipx_dir_table,
  41. },
  42. { 0 },
  43. };
  44. static struct ctl_table_header *ipx_table_header;
  45. void ipx_register_sysctl(void)
  46. {
  47. ipx_table_header = register_sysctl_table(ipx_root_table);
  48. }
  49. void ipx_unregister_sysctl(void)
  50. {
  51. unregister_sysctl_table(ipx_table_header);
  52. }