sysctl_net_atalk.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. .procname = "aarp-expiry-time",
  14. .data = &sysctl_aarp_expiry_time,
  15. .maxlen = sizeof(int),
  16. .mode = 0644,
  17. .proc_handler = proc_dointvec_jiffies,
  18. },
  19. {
  20. .procname = "aarp-tick-time",
  21. .data = &sysctl_aarp_tick_time,
  22. .maxlen = sizeof(int),
  23. .mode = 0644,
  24. .proc_handler = proc_dointvec_jiffies,
  25. },
  26. {
  27. .procname = "aarp-retransmit-limit",
  28. .data = &sysctl_aarp_retransmit_limit,
  29. .maxlen = sizeof(int),
  30. .mode = 0644,
  31. .proc_handler = proc_dointvec,
  32. },
  33. {
  34. .procname = "aarp-resolve-time",
  35. .data = &sysctl_aarp_resolve_time,
  36. .maxlen = sizeof(int),
  37. .mode = 0644,
  38. .proc_handler = proc_dointvec_jiffies,
  39. },
  40. { },
  41. };
  42. static struct ctl_table_header *atalk_table_header;
  43. int __init atalk_register_sysctl(void)
  44. {
  45. atalk_table_header = register_net_sysctl(&init_net, "net/appletalk", atalk_table);
  46. if (!atalk_table_header)
  47. return -ENOMEM;
  48. return 0;
  49. }
  50. void atalk_unregister_sysctl(void)
  51. {
  52. unregister_net_sysctl_table(atalk_table_header);
  53. }