Commit 85322863 authored by Art Haas's avatar Art Haas Committed by David S. Miller

[PATCH] C99 initializers for net/ax25/sysctl_net_ax25.c

parent eb99b9dd
...@@ -33,73 +33,168 @@ static ctl_table *ax25_table; ...@@ -33,73 +33,168 @@ static ctl_table *ax25_table;
static int ax25_table_size; static int ax25_table_size;
static ctl_table ax25_dir_table[] = { static ctl_table ax25_dir_table[] = {
{NET_AX25, "ax25", NULL, 0, 0555, NULL}, {
{0} .ctl_name = NET_AX25,
.procname = "ax25",
.maxlen = 0,
.mode = 0555,
},
{ .ctl_name = 0 }
}; };
static ctl_table ax25_root_table[] = { static ctl_table ax25_root_table[] = {
{CTL_NET, "net", NULL, 0, 0555, ax25_dir_table}, {
{0} .ctl_name = CTL_NET,
.procname = "net",
.maxlen = 0,
.mode = 0555,
.child = ax25_dir_table
},
{ .ctl_name = 0 }
}; };
static const ctl_table ax25_param_table[] = { static const ctl_table ax25_param_table[] = {
{NET_AX25_IP_DEFAULT_MODE, "ip_default_mode", {
NULL, sizeof(int), 0644, NULL, .ctl_name = NET_AX25_IP_DEFAULT_MODE,
&proc_dointvec_minmax, &sysctl_intvec, NULL, .procname = "ip_default_mode",
&min_ipdefmode, &max_ipdefmode}, .maxlen = sizeof(int),
{NET_AX25_DEFAULT_MODE, "ax25_default_mode", .mode = 0644,
NULL, sizeof(int), 0644, NULL, .proc_handler = &proc_dointvec_minmax,
&proc_dointvec_minmax, &sysctl_intvec, NULL, .strategy = &sysctl_intvec,
&min_axdefmode, &max_axdefmode}, .extra1 = &min_ipdefmode,
{NET_AX25_BACKOFF_TYPE, "backoff_type", .extra2 = &max_ipdefmode
NULL, sizeof(int), 0644, NULL, },
&proc_dointvec_minmax, &sysctl_intvec, NULL, {
&min_backoff, &max_backoff}, .ctl_name = NET_AX25_DEFAULT_MODE,
{NET_AX25_CONNECT_MODE, "connect_mode", .procname = "ax25_default_mode",
NULL, sizeof(int), 0644, NULL, .maxlen = sizeof(int),
&proc_dointvec_minmax, &sysctl_intvec, NULL, .mode = 0644,
&min_conmode, &max_conmode}, .proc_handler = &proc_dointvec_minmax,
{NET_AX25_STANDARD_WINDOW, "standard_window_size", .strategy = &sysctl_intvec,
NULL, sizeof(int), 0644, NULL, .extra1 = &min_axdefmode,
&proc_dointvec_minmax, &sysctl_intvec, NULL, .extra2 = &max_axdefmode
&min_window, &max_window}, },
{NET_AX25_EXTENDED_WINDOW, "extended_window_size", {
NULL, sizeof(int), 0644, NULL, .ctl_name = NET_AX25_BACKOFF_TYPE,
&proc_dointvec_minmax, &sysctl_intvec, NULL, .procname = "backoff_type",
&min_ewindow, &max_ewindow}, .maxlen = sizeof(int),
{NET_AX25_T1_TIMEOUT, "t1_timeout", .mode = 0644,
NULL, sizeof(int), 0644, NULL, .proc_handler = &proc_dointvec_minmax,
&proc_dointvec_minmax, &sysctl_intvec, NULL, .strategy = &sysctl_intvec,
&min_t1, &max_t1}, .extra1 = &min_backoff,
{NET_AX25_T2_TIMEOUT, "t2_timeout", .extra2 = &max_backoff
NULL, sizeof(int), 0644, NULL, },
&proc_dointvec_minmax, &sysctl_intvec, NULL, {
&min_t2, &max_t2}, .ctl_name = NET_AX25_CONNECT_MODE,
{NET_AX25_T3_TIMEOUT, "t3_timeout", .procname = "connect_mode",
NULL, sizeof(int), 0644, NULL, .maxlen = sizeof(int),
&proc_dointvec_minmax, &sysctl_intvec, NULL, .mode = 0644,
&min_t3, &max_t3}, .proc_handler = &proc_dointvec_minmax,
{NET_AX25_IDLE_TIMEOUT, "idle_timeout", .strategy = &sysctl_intvec,
NULL, sizeof(int), 0644, NULL, .extra1 = &min_conmode,
&proc_dointvec_minmax, &sysctl_intvec, NULL, .extra2 = &max_conmode
&min_idle, &max_idle}, },
{NET_AX25_N2, "maximum_retry_count", {
NULL, sizeof(int), 0644, NULL, .ctl_name = NET_AX25_STANDARD_WINDOW,
&proc_dointvec_minmax, &sysctl_intvec, NULL, .procname = "standard_window_size",
&min_n2, &max_n2}, .maxlen = sizeof(int),
{NET_AX25_PACLEN, "maximum_packet_length", .mode = 0644,
NULL, sizeof(int), 0644, NULL, .proc_handler = &proc_dointvec_minmax,
&proc_dointvec_minmax, &sysctl_intvec, NULL, .strategy = &sysctl_intvec,
&min_paclen, &max_paclen}, .extra1 = &min_window,
{NET_AX25_PROTOCOL, "protocol", .extra2 = &max_window
NULL, sizeof(int), 0644, NULL, },
&proc_dointvec_minmax, &sysctl_intvec, NULL, {
&min_proto, &max_proto}, .ctl_name = NET_AX25_EXTENDED_WINDOW,
{NET_AX25_DAMA_SLAVE_TIMEOUT, "dama_slave_timeout", .procname = "extended_window_size",
NULL, sizeof(int), 0644, NULL, .maxlen = sizeof(int),
&proc_dointvec_minmax, &sysctl_intvec, NULL, .mode = 0644,
&min_ds_timeout, &max_ds_timeout}, .proc_handler = &proc_dointvec_minmax,
{0} /* that's all, folks! */ .strategy = &sysctl_intvec,
.extra1 = &min_ewindow,
.extra2 = &max_ewindow
},
{
.ctl_name = NET_AX25_T1_TIMEOUT,
.procname = "t1_timeout",
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_t1,
.extra2 = &max_t1
},
{
.ctl_name = NET_AX25_T2_TIMEOUT,
.procname = "t2_timeout",
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_t2,
.extra2 = &max_t2
},
{
.ctl_name = NET_AX25_T3_TIMEOUT,
.procname = "t3_timeout",
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_t3,
.extra2 = &max_t3
},
{
.ctl_name = NET_AX25_IDLE_TIMEOUT,
.procname = "idle_timeout",
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_idle,
.extra2 = &max_idle
},
{
.ctl_name = NET_AX25_N2,
.procname = "maximum_retry_count",
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_n2,
.extra2 = &max_n2
},
{
.ctl_name = NET_AX25_PACLEN,
.procname = "maximum_packet_length",
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_paclen,
.extra2 = &max_paclen
},
{
.ctl_name = NET_AX25_PROTOCOL,
.procname = "protocol",
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_proto,
.extra2 = &max_proto
},
{
.ctl_name = NET_AX25_DAMA_SLAVE_TIMEOUT,
.procname = "dama_slave_timeout",
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec_minmax,
.strategy = &sysctl_intvec,
.extra1 = &min_ds_timeout,
.extra2 = &max_ds_timeout
},
{ .ctl_name = 0 } /* that's all, folks! */
}; };
void ax25_register_sysctl(void) void ax25_register_sysctl(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment