sysctl_net_atalk.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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/config.h>
  9. #include <linux/sysctl.h>
  10. #include <net/sock.h>
  11. #include <linux/atalk.h>
  12. static struct ctl_table atalk_table[] = {
  13. {
  14. .ctl_name = NET_ATALK_AARP_EXPIRY_TIME,
  15. .procname = "aarp-expiry-time",
  16. .data = &sysctl_aarp_expiry_time,
  17. .maxlen = sizeof(int),
  18. .mode = 0644,
  19. .proc_handler = &proc_dointvec_jiffies,
  20. .strategy = &sysctl_jiffies,
  21. },
  22. {
  23. .ctl_name = NET_ATALK_AARP_TICK_TIME,
  24. .procname = "aarp-tick-time",
  25. .data = &sysctl_aarp_tick_time,
  26. .maxlen = sizeof(int),
  27. .mode = 0644,
  28. .proc_handler = &proc_dointvec_jiffies,
  29. .strategy = &sysctl_jiffies,
  30. },
  31. {
  32. .ctl_name = NET_ATALK_AARP_RETRANSMIT_LIMIT,
  33. .procname = "aarp-retransmit-limit",
  34. .data = &sysctl_aarp_retransmit_limit,
  35. .maxlen = sizeof(int),
  36. .mode = 0644,
  37. .proc_handler = &proc_dointvec,
  38. },
  39. {
  40. .ctl_name = NET_ATALK_AARP_RESOLVE_TIME,
  41. .procname = "aarp-resolve-time",
  42. .data = &sysctl_aarp_resolve_time,
  43. .maxlen = sizeof(int),
  44. .mode = 0644,
  45. .proc_handler = &proc_dointvec_jiffies,
  46. .strategy = &sysctl_jiffies,
  47. },
  48. { 0 },
  49. };
  50. static struct ctl_table atalk_dir_table[] = {
  51. {
  52. .ctl_name = NET_ATALK,
  53. .procname = "appletalk",
  54. .mode = 0555,
  55. .child = atalk_table,
  56. },
  57. { 0 },
  58. };
  59. static struct ctl_table atalk_root_table[] = {
  60. {
  61. .ctl_name = CTL_NET,
  62. .procname = "net",
  63. .mode = 0555,
  64. .child = atalk_dir_table,
  65. },
  66. { 0 },
  67. };
  68. static struct ctl_table_header *atalk_table_header;
  69. void atalk_register_sysctl(void)
  70. {
  71. atalk_table_header = register_sysctl_table(atalk_root_table, 1);
  72. }
  73. void atalk_unregister_sysctl(void)
  74. {
  75. unregister_sysctl_table(atalk_table_header);
  76. }