sysctl_net_ipx.c
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  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. ctl_table ipx_table[] = {
  17. { NET_IPX_PPROP_BROADCASTING, "ipx_pprop_broadcasting",
  18.   &sysctl_ipx_pprop_broadcasting, sizeof(int), 0644, NULL,
  19.   &proc_dointvec },
  20. { 0 }
  21. };
  22. static ctl_table ipx_dir_table[] = {
  23. { NET_IPX, "ipx", NULL, 0, 0555, ipx_table },
  24. { 0 }
  25. };
  26. static ctl_table ipx_root_table[] = {
  27. { CTL_NET, "net", NULL, 0, 0555, ipx_dir_table },
  28. { 0 }
  29. };
  30. static struct ctl_table_header *ipx_table_header;
  31. void ipx_register_sysctl(void)
  32. {
  33. ipx_table_header = register_sysctl_table(ipx_root_table, 1);
  34. }
  35. void ipx_unregister_sysctl(void)
  36. {
  37. unregister_sysctl_table(ipx_table_header);
  38. }