Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sysctl_net_x25.c
Go to the documentation of this file.
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 
15 static int min_timer[] = { 1 * HZ };
16 static int max_timer[] = { 300 * HZ };
17 
18 static struct ctl_table_header *x25_table_header;
19 
20 static struct ctl_table x25_table[] = {
21  {
22  .procname = "restart_request_timeout",
24  .maxlen = sizeof(int),
25  .mode = 0644,
27  .extra1 = &min_timer,
28  .extra2 = &max_timer,
29  },
30  {
31  .procname = "call_request_timeout",
33  .maxlen = sizeof(int),
34  .mode = 0644,
36  .extra1 = &min_timer,
37  .extra2 = &max_timer,
38  },
39  {
40  .procname = "reset_request_timeout",
42  .maxlen = sizeof(int),
43  .mode = 0644,
45  .extra1 = &min_timer,
46  .extra2 = &max_timer,
47  },
48  {
49  .procname = "clear_request_timeout",
51  .maxlen = sizeof(int),
52  .mode = 0644,
54  .extra1 = &min_timer,
55  .extra2 = &max_timer,
56  },
57  {
58  .procname = "acknowledgement_hold_back_timeout",
60  .maxlen = sizeof(int),
61  .mode = 0644,
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,
72  },
73  { 0, },
74 };
75 
77 {
78  x25_table_header = register_net_sysctl(&init_net, "net/x25", x25_table);
79 }
80 
82 {
83  unregister_net_sysctl_table(x25_table_header);
84 }