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