linux/net/x25/sysctl_net_x25.c
<<
>>
Prefs
   1/* -*- linux-c -*-
   2 * sysctl_net_x25.c: sysctl interface to net X.25 subsystem.
   3 *
   4 * Begun April 1, 1996, Mike Shaver.
   5 * Added /proc/sys/net/x25 directory entry (empty =) ). [MS]
   6 */
   7
   8#include <linux/sysctl.h>
   9#include <linux/skbuff.h>
  10#include <linux/socket.h>
  11#include <linux/netdevice.h>
  12#include <linux/init.h>
  13#include <net/x25.h>
  14
  15static int min_timer[] = {   1 * HZ };
  16static int max_timer[] = { 300 * HZ };
  17
  18static struct ctl_table_header *x25_table_header;
  19
  20static struct ctl_table x25_table[] = {
  21        {
  22                .procname =     "restart_request_timeout",
  23                .data =         &sysctl_x25_restart_request_timeout,
  24                .maxlen =       sizeof(int),
  25                .mode =         0644,
  26                .proc_handler = proc_dointvec_minmax,
  27                .extra1 =       &min_timer,
  28                .extra2 =       &max_timer,
  29        },
  30        {
  31                .procname =     "call_request_timeout",
  32                .data =         &sysctl_x25_call_request_timeout,
  33                .maxlen =       sizeof(int),
  34                .mode =         0644,
  35                .proc_handler = proc_dointvec_minmax,
  36                .extra1 =       &min_timer,
  37                .extra2 =       &max_timer,
  38        },
  39        {
  40                .procname =     "reset_request_timeout",
  41                .data =         &sysctl_x25_reset_request_timeout,
  42                .maxlen =       sizeof(int),
  43                .mode =         0644,
  44                .proc_handler = proc_dointvec_minmax,
  45                .extra1 =       &min_timer,
  46                .extra2 =       &max_timer,
  47        },
  48        {
  49                .procname =     "clear_request_timeout",
  50                .data =         &sysctl_x25_clear_request_timeout,
  51                .maxlen =       sizeof(int),
  52                .mode =         0644,
  53                .proc_handler = proc_dointvec_minmax,
  54                .extra1 =       &min_timer,
  55                .extra2 =       &max_timer,
  56        },
  57        {
  58                .procname =     "acknowledgement_hold_back_timeout",
  59                .data =         &sysctl_x25_ack_holdback_timeout,
  60                .maxlen =       sizeof(int),
  61                .mode =         0644,
  62                .proc_handler = proc_dointvec_minmax,
  63                .extra1 =       &min_timer,
  64                .extra2 =       &max_timer,
  65        },
  66        {
  67                .procname =     "x25_forward",
  68                .data =         &sysctl_x25_forward,
  69                .maxlen =       sizeof(int),
  70                .mode =         0644,
  71                .proc_handler = proc_dointvec,
  72        },
  73        { 0, },
  74};
  75
  76void __init x25_register_sysctl(void)
  77{
  78        x25_table_header = register_net_sysctl(&init_net, "net/x25", x25_table);
  79}
  80
  81void x25_unregister_sysctl(void)
  82{
  83        unregister_net_sysctl_table(x25_table_header);
  84}
  85
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.