sysctl_net_unix.c
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:1k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  * NET4: Sysctl interface to net af_unix subsystem.
  3.  *
  4.  * Authors: Mike Shaver.
  5.  *
  6.  * This program is free software; you can redistribute it and/or
  7.  * modify it under the terms of the GNU General Public License
  8.  * as published by the Free Software Foundation; either version
  9.  * 2 of the License, or (at your option) any later version.
  10.  */
  11. #include <linux/mm.h>
  12. #include <linux/sysctl.h>
  13. extern int sysctl_unix_max_dgram_qlen;
  14. ctl_table unix_table[] = {
  15. {NET_UNIX_MAX_DGRAM_QLEN, "max_dgram_qlen",
  16. &sysctl_unix_max_dgram_qlen, sizeof(int), 0600, NULL, 
  17.  &proc_dointvec },
  18. {0}
  19. };
  20. static ctl_table unix_net_table[] = {
  21. {NET_UNIX, "unix", NULL, 0, 0555, unix_table},
  22. {0}
  23. };
  24. static ctl_table unix_root_table[] = {
  25. {CTL_NET, "net", NULL, 0, 0555, unix_net_table},
  26. {0}
  27. };
  28. static struct ctl_table_header * unix_sysctl_header;
  29. void unix_sysctl_register(void)
  30. {
  31. unix_sysctl_header = register_sysctl_table(unix_root_table, 0);
  32. }
  33. void unix_sysctl_unregister(void)
  34. {
  35. unregister_sysctl_table(unix_sysctl_header);
  36. }