sysctl_net_ipx.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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/config.h>
  9. #include <linux/mm.h>
  10. #include <linux/sysctl.h>
  11. #ifndef CONFIG_SYSCTL
  12. #error This file should not be compiled without CONFIG_SYSCTL defined
  13. #endif
  14. /* From af_ipx.c */
  15. extern int sysctl_ipx_pprop_broadcasting;
  16. static struct ctl_table ipx_table[] = {
  17. {
  18. .ctl_name = NET_IPX_PPROP_BROADCASTING,
  19. .procname = "ipx_pprop_broadcasting",
  20. .data = &sysctl_ipx_pprop_broadcasting,
  21. .maxlen = sizeof(int),
  22. .mode = 0644,
  23. .proc_handler = &proc_dointvec,
  24. },
  25. { 0 },
  26. };
  27. static struct ctl_table ipx_dir_table[] = {
  28. {
  29. .ctl_name = NET_IPX,
  30. .procname = "ipx",
  31. .mode = 0555,
  32. .child = ipx_table,
  33. },
  34. { 0 },
  35. };
  36. static struct ctl_table ipx_root_table[] = {
  37. {
  38. .ctl_name = CTL_NET,
  39. .procname = "net",
  40. .mode = 0555,
  41. .child = ipx_dir_table,
  42. },
  43. { 0 },
  44. };
  45. static struct ctl_table_header *ipx_table_header;
  46. void ipx_register_sysctl(void)
  47. {
  48. ipx_table_header = register_sysctl_table(ipx_root_table, 1);
  49. }
  50. void ipx_unregister_sysctl(void)
  51. {
  52. unregister_sysctl_table(ipx_table_header);
  53. }