sysctl_net_atalk.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * sysctl_net_atalk.c: sysctl interface to net AppleTalk subsystem.
  3. *
  4. * Begun April 1, 1996, Mike Shaver.
  5. * Added /proc/sys/net/atalk directory entry (empty =) ). [MS]
  6. * Dynamic registration, added aarp entries. (5/30/97 Chris Horn)
  7. */
  8. #include <linux/sysctl.h>
  9. #include <net/sock.h>
  10. #include <linux/atalk.h>
  11. static struct ctl_table atalk_table[] = {
  12. {
  13. .ctl_name = NET_ATALK_AARP_EXPIRY_TIME,
  14. .procname = "aarp-expiry-time",
  15. .data = &sysctl_aarp_expiry_time,
  16. .maxlen = sizeof(int),
  17. .mode = 0644,
  18. .proc_handler = &proc_dointvec_jiffies,
  19. .strategy = &sysctl_jiffies,
  20. },
  21. {
  22. .ctl_name = NET_ATALK_AARP_TICK_TIME,
  23. .procname = "aarp-tick-time",
  24. .data = &sysctl_aarp_tick_time,
  25. .maxlen = sizeof(int),
  26. .mode = 0644,
  27. .proc_handler = &proc_dointvec_jiffies,
  28. .strategy = &sysctl_jiffies,
  29. },
  30. {
  31. .ctl_name = NET_ATALK_AARP_RETRANSMIT_LIMIT,
  32. .procname = "aarp-retransmit-limit",
  33. .data = &sysctl_aarp_retransmit_limit,
  34. .maxlen = sizeof(int),
  35. .mode = 0644,
  36. .proc_handler = &proc_dointvec,
  37. },
  38. {
  39. .ctl_name = NET_ATALK_AARP_RESOLVE_TIME,
  40. .procname = "aarp-resolve-time",
  41. .data = &sysctl_aarp_resolve_time,
  42. .maxlen = sizeof(int),
  43. .mode = 0644,
  44. .proc_handler = &proc_dointvec_jiffies,
  45. .strategy = &sysctl_jiffies,
  46. },
  47. { 0 },
  48. };
  49. static struct ctl_table atalk_dir_table[] = {
  50. {
  51. .ctl_name = NET_ATALK,
  52. .procname = "appletalk",
  53. .mode = 0555,
  54. .child = atalk_table,
  55. },
  56. { 0 },
  57. };
  58. static struct ctl_table atalk_root_table[] = {
  59. {
  60. .ctl_name = CTL_NET,
  61. .procname = "net",
  62. .mode = 0555,
  63. .child = atalk_dir_table,
  64. },
  65. { 0 },
  66. };
  67. static struct ctl_table_header *atalk_table_header;
  68. void atalk_register_sysctl(void)
  69. {
  70. atalk_table_header = register_sysctl_table(atalk_root_table);
  71. }
  72. void atalk_unregister_sysctl(void)
  73. {
  74. unregister_sysctl_table(atalk_table_header);
  75. }