OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [uclinux/] [uClinux-2.0.x/] [net/] [netrom/] [sysctl_net_netrom.c] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
/* -*- linux-c -*-
2
 * sysctl_net_netrom.c: sysctl interface to net NET/ROM subsystem.
3
 *
4
 * Begun April 1, 1996, Mike Shaver.
5
 * Added /proc/sys/net/netrom directory entry (empty =) ). [MS]
6
 */
7
 
8
#include <linux/mm.h>
9
#include <linux/sysctl.h>
10
#include <net/ax25.h>
11
#include <net/netrom.h>
12
 
13
/*
14
 *      Values taken from NET/ROM documentation.
15
 */
16
static int min_quality[] = {0}, max_quality[] = {255};
17
static int min_obs[]     = {0}, max_obs[]     = {255};
18
static int min_ttl[]     = {0}, max_ttl[]     = {255};
19
static int min_t1[]      = {5 * NR_SLOWHZ};
20
static int max_t1[]      = {600 * NR_SLOWHZ};
21
static int min_n2[]      = {2}, max_n2[]      = {127};
22
static int min_t2[]      = {1 * NR_SLOWHZ};
23
static int max_t2[]      = {60 * NR_SLOWHZ};
24
static int min_t4[]      = {1 * NR_SLOWHZ};
25
static int max_t4[]      = {1000 * NR_SLOWHZ};
26
static int min_window[]  = {1}, max_window[]  = {127};
27
static int min_route[]   = {0}, max_route[]   = {1};
28
static int min_fails[]   = {1}, max_fails[]   = {10};
29
 
30
static struct ctl_table_header *nr_table_header;
31
 
32
static ctl_table nr_table[] = {
33
        {NET_NETROM_DEFAULT_PATH_QUALITY, "default_path_quality",
34
         &sysctl_netrom_default_path_quality, sizeof(int), 0644, NULL,
35
         &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_quality, &max_quality},
36
        {NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER, "obsolescence_count_initialiser",
37
         &sysctl_netrom_obsolescence_count_initialiser, sizeof(int), 0644, NULL,
38
         &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_obs, &max_obs},
39
        {NET_NETROM_NETWORK_TTL_INITIALISER, "network_ttl_initialiser",
40
         &sysctl_netrom_network_ttl_initialiser, sizeof(int), 0644, NULL,
41
         &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_ttl, &max_ttl},
42
        {NET_NETROM_TRANSPORT_TIMEOUT, "transport_timeout",
43
         &sysctl_netrom_transport_timeout, sizeof(int), 0644, NULL,
44
         &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_t1, &max_t1},
45
        {NET_NETROM_TRANSPORT_MAXIMUM_TRIES, "transport_maximum_tries",
46
         &sysctl_netrom_transport_maximum_tries, sizeof(int), 0644, NULL,
47
         &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_n2, &max_n2},
48
        {NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY, "transport_acknowledge_delay",
49
         &sysctl_netrom_transport_acknowledge_delay, sizeof(int), 0644, NULL,
50
         &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_t2, &max_t2},
51
        {NET_NETROM_TRANSPORT_BUSY_DELAY, "transport_busy_delay",
52
         &sysctl_netrom_transport_busy_delay, sizeof(int), 0644, NULL,
53
         &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_t4, &max_t4},
54
        {NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE, "transport_requested_window_size",
55
         &sysctl_netrom_transport_requested_window_size, sizeof(int), 0644, NULL,
56
         &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_window, &max_window},
57
        {NET_NETROM_ROUTING_CONTROL, "routing_control",
58
         &sysctl_netrom_routing_control, sizeof(int), 0644, NULL,
59
         &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_route, &max_route},
60
        {NET_NETROM_LINK_FAILS_COUNT, "link_fails_count",
61
         &sysctl_netrom_link_fails_count, sizeof(int), 0644, NULL,
62
         &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_fails, &max_fails},
63
        {0}
64
};
65
 
66
static ctl_table nr_dir_table[] = {
67
        {NET_NETROM, "netrom", NULL, 0, 0555, nr_table},
68
        {0}
69
};
70
 
71
static ctl_table nr_root_table[] = {
72
        {CTL_NET, "net", NULL, 0, 0555, nr_dir_table},
73
        {0}
74
};
75
 
76
void nr_register_sysctl(void)
77
{
78
        nr_table_header = register_sysctl_table(nr_root_table, 1);
79
}
80
 
81
void nr_unregister_sysctl(void)
82
{
83
        unregister_sysctl_table(nr_table_header);
84
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.