Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
20291389
Commit
20291389
authored
Mar 02, 2003
by
Hideaki Yoshifuji
Committed by
David S. Miller
Mar 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6]: More C99 initializers.
parent
5ec5e62a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
235 additions
and
96 deletions
+235
-96
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+155
-67
net/ipv6/route.c
net/ipv6/route.c
+78
-28
net/ipv6/sit.c
net/ipv6/sit.c
+2
-1
No files found.
net/ipv6/addrconf.c
View file @
20291389
...
@@ -2319,75 +2319,163 @@ static struct addrconf_sysctl_table
...
@@ -2319,75 +2319,163 @@ static struct addrconf_sysctl_table
ctl_table
addrconf_proto_dir
[
2
];
ctl_table
addrconf_proto_dir
[
2
];
ctl_table
addrconf_root_dir
[
2
];
ctl_table
addrconf_root_dir
[
2
];
}
addrconf_sysctl
=
{
}
addrconf_sysctl
=
{
NULL
,
.
sysctl_header
=
NULL
,
{{
NET_IPV6_FORWARDING
,
"forwarding"
,
.
addrconf_vars
=
{
&
ipv6_devconf
.
forwarding
,
sizeof
(
int
),
0644
,
NULL
,
{
&
addrconf_sysctl_forward
},
.
ctl_name
=
NET_IPV6_FORWARDING
,
.
procname
=
"forwarding"
,
{
NET_IPV6_HOP_LIMIT
,
"hop_limit"
,
.
data
=
&
ipv6_devconf
.
forwarding
,
&
ipv6_devconf
.
hop_limit
,
sizeof
(
int
),
0644
,
NULL
,
.
maxlen
=
sizeof
(
int
),
&
proc_dointvec
},
.
mode
=
0644
,
.
proc_handler
=
&
addrconf_sysctl_forward
,
{
NET_IPV6_MTU
,
"mtu"
,
},
&
ipv6_devconf
.
mtu6
,
sizeof
(
int
),
0644
,
NULL
,
{
&
proc_dointvec
},
.
ctl_name
=
NET_IPV6_HOP_LIMIT
,
.
procname
=
"hop_limit"
,
{
NET_IPV6_ACCEPT_RA
,
"accept_ra"
,
.
data
=
&
ipv6_devconf
.
hop_limit
,
&
ipv6_devconf
.
accept_ra
,
sizeof
(
int
),
0644
,
NULL
,
.
maxlen
=
sizeof
(
int
),
&
proc_dointvec
},
.
mode
=
0644
,
.
proc_handler
=
proc_dointvec
,
{
NET_IPV6_ACCEPT_REDIRECTS
,
"accept_redirects"
,
},
&
ipv6_devconf
.
accept_redirects
,
sizeof
(
int
),
0644
,
NULL
,
{
&
proc_dointvec
},
.
ctl_name
=
NET_IPV6_MTU
,
.
procname
=
"mtu"
,
{
NET_IPV6_AUTOCONF
,
"autoconf"
,
.
data
=
&
ipv6_devconf
.
mtu6
,
&
ipv6_devconf
.
autoconf
,
sizeof
(
int
),
0644
,
NULL
,
.
maxlen
=
sizeof
(
int
),
&
proc_dointvec
},
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
{
NET_IPV6_DAD_TRANSMITS
,
"dad_transmits"
,
},
&
ipv6_devconf
.
dad_transmits
,
sizeof
(
int
),
0644
,
NULL
,
{
&
proc_dointvec
},
.
ctl_name
=
NET_IPV6_ACCEPT_RA
,
.
procname
=
"accept_ra"
,
{
NET_IPV6_RTR_SOLICITS
,
"router_solicitations"
,
.
data
=
&
ipv6_devconf
.
accept_ra
,
&
ipv6_devconf
.
rtr_solicits
,
sizeof
(
int
),
0644
,
NULL
,
.
maxlen
=
sizeof
(
int
),
&
proc_dointvec
},
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
{
NET_IPV6_RTR_SOLICIT_INTERVAL
,
"router_solicitation_interval"
,
},
&
ipv6_devconf
.
rtr_solicit_interval
,
sizeof
(
int
),
0644
,
NULL
,
{
&
proc_dointvec_jiffies
},
.
ctl_name
=
NET_IPV6_ACCEPT_REDIRECTS
,
.
procname
=
"accept_redirects"
,
{
NET_IPV6_RTR_SOLICIT_DELAY
,
"router_solicitation_delay"
,
.
data
=
&
ipv6_devconf
.
accept_redirects
,
&
ipv6_devconf
.
rtr_solicit_delay
,
sizeof
(
int
),
0644
,
NULL
,
.
maxlen
=
sizeof
(
int
),
&
proc_dointvec_jiffies
},
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
NET_IPV6_AUTOCONF
,
.
procname
=
"autoconf"
,
.
data
=
&
ipv6_devconf
.
autoconf
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
NET_IPV6_DAD_TRANSMITS
,
.
procname
=
"dad_transmits"
,
.
data
=
&
ipv6_devconf
.
dad_transmits
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
NET_IPV6_RTR_SOLICITS
,
.
procname
=
"router_solicitations"
,
.
data
=
&
ipv6_devconf
.
rtr_solicits
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
NET_IPV6_RTR_SOLICIT_INTERVAL
,
.
procname
=
"router_solicitation_interval"
,
.
data
=
&
ipv6_devconf
.
rtr_solicit_interval
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_jiffies
,
},
{
.
ctl_name
=
NET_IPV6_RTR_SOLICIT_DELAY
,
.
procname
=
"router_solicitation_delay"
,
.
data
=
&
ipv6_devconf
.
rtr_solicit_delay
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_jiffies
,
},
#ifdef CONFIG_IPV6_PRIVACY
#ifdef CONFIG_IPV6_PRIVACY
{
NET_IPV6_USE_TEMPADDR
,
"use_tempaddr"
,
{
&
ipv6_devconf
.
use_tempaddr
,
sizeof
(
int
),
0644
,
NULL
,
.
ctl_name
=
NET_IPV6_USE_TEMPADDR
,
&
proc_dointvec
},
.
procname
=
"use_tempaddr"
,
.
data
=
&
ipv6_devconf
.
use_tempaddr
,
{
NET_IPV6_TEMP_VALID_LFT
,
"temp_valid_lft"
,
.
maxlen
=
sizeof
(
int
),
&
ipv6_devconf
.
temp_valid_lft
,
sizeof
(
int
),
0644
,
NULL
,
.
mode
=
0644
,
&
proc_dointvec
},
.
proc_handler
=
&
proc_dointvec
,
},
{
NET_IPV6_TEMP_PREFERED_LFT
,
"temp_prefered_lft"
,
{
&
ipv6_devconf
.
temp_prefered_lft
,
sizeof
(
int
),
0644
,
NULL
,
.
ctl_name
=
NET_IPV6_TEMP_VALID_LFT
,
&
proc_dointvec
},
.
procname
=
"temp_valid_lft"
,
.
data
=
&
ipv6_devconf
.
temp_valid_lft
,
{
NET_IPV6_REGEN_MAX_RETRY
,
"regen_max_retry"
,
.
maxlen
=
sizeof
(
int
),
&
ipv6_devconf
.
regen_max_retry
,
sizeof
(
int
),
0644
,
NULL
,
.
mode
=
0644
,
&
proc_dointvec
},
.
proc_handler
=
&
proc_dointvec
,
},
{
NET_IPV6_MAX_DESYNC_FACTOR
,
"max_desync_factor"
,
{
&
ipv6_devconf
.
max_desync_factor
,
sizeof
(
int
),
0644
,
NULL
,
.
ctl_name
=
NET_IPV6_TEMP_PREFERED_LFT
,
&
proc_dointvec
},
.
procname
=
"temp_prefered_lft"
,
.
data
=
&
ipv6_devconf
.
temp_prefered_lft
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
NET_IPV6_REGEN_MAX_RETRY
,
.
procname
=
"regen_max_retry"
,
.
data
=
&
ipv6_devconf
.
regen_max_retry
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
{
.
ctl_name
=
NET_IPV6_MAX_DESYNC_FACTOR
,
.
procname
=
"max_desync_factor"
,
.
data
=
&
ipv6_devconf
.
max_desync_factor
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec
,
},
#endif
#endif
},
{
0
}},
.
addrconf_dev
=
{
{
{{
NET_PROTO_CONF_ALL
,
"all"
,
NULL
,
0
,
0555
,
addrconf_sysctl
.
addrconf_vars
},{
0
}},
.
ctl_name
=
NET_PROTO_CONF_ALL
,
{{
NET_IPV6_CONF
,
"conf"
,
NULL
,
0
,
0555
,
addrconf_sysctl
.
addrconf_dev
},{
0
}},
.
procname
=
"all"
,
{{
NET_IPV6
,
"ipv6"
,
NULL
,
0
,
0555
,
addrconf_sysctl
.
addrconf_conf_dir
},{
0
}},
.
mode
=
0555
,
{{
CTL_NET
,
"net"
,
NULL
,
0
,
0555
,
addrconf_sysctl
.
addrconf_proto_dir
},{
0
}}
.
child
=
addrconf_sysctl
.
addrconf_vars
,
},
},
.
addrconf_conf_dir
=
{
{
.
ctl_name
=
NET_IPV6_CONF
,
.
procname
=
"conf"
,
.
mode
=
0555
,
.
child
=
addrconf_sysctl
.
addrconf_dev
,
},
},
.
addrconf_proto_dir
=
{
{
.
ctl_name
=
NET_IPV6
,
.
procname
=
"ipv6"
,
.
mode
=
0555
,
.
child
=
addrconf_sysctl
.
addrconf_conf_dir
,
},
},
.
addrconf_root_dir
=
{
{
.
ctl_name
=
CTL_NET
,
.
procname
=
"net"
,
.
mode
=
0555
,
.
child
=
addrconf_sysctl
.
addrconf_proto_dir
,
},
},
};
};
static
void
addrconf_sysctl_register
(
struct
inet6_dev
*
idev
,
struct
ipv6_devconf
*
p
)
static
void
addrconf_sysctl_register
(
struct
inet6_dev
*
idev
,
struct
ipv6_devconf
*
p
)
...
...
net/ipv6/route.c
View file @
20291389
...
@@ -1777,34 +1777,84 @@ int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, struct file * filp,
...
@@ -1777,34 +1777,84 @@ int ipv6_sysctl_rtcache_flush(ctl_table *ctl, int write, struct file * filp,
}
}
ctl_table
ipv6_route_table
[]
=
{
ctl_table
ipv6_route_table
[]
=
{
{
NET_IPV6_ROUTE_FLUSH
,
"flush"
,
{
&
flush_delay
,
sizeof
(
int
),
0644
,
NULL
,
.
ctl_name
=
NET_IPV6_ROUTE_FLUSH
,
&
ipv6_sysctl_rtcache_flush
},
.
procname
=
"flush"
,
{
NET_IPV6_ROUTE_GC_THRESH
,
"gc_thresh"
,
.
data
=
&
flush_delay
,
&
ip6_dst_ops
.
gc_thresh
,
sizeof
(
int
),
0644
,
NULL
,
.
maxlen
=
sizeof
(
int
),
&
proc_dointvec
},
.
mode
=
0644
,
{
NET_IPV6_ROUTE_MAX_SIZE
,
"max_size"
,
.
proc_handler
=
&
ipv6_sysctl_rtcache_flush
&
ip6_rt_max_size
,
sizeof
(
int
),
0644
,
NULL
,
},
&
proc_dointvec
},
{
{
NET_IPV6_ROUTE_GC_MIN_INTERVAL
,
"gc_min_interval"
,
.
ctl_name
=
NET_IPV6_ROUTE_GC_THRESH
,
&
ip6_rt_gc_min_interval
,
sizeof
(
int
),
0644
,
NULL
,
.
procname
=
"gc_thresh"
,
&
proc_dointvec_jiffies
,
&
sysctl_jiffies
},
.
data
=
&
ip6_dst_ops
.
gc_thresh
,
{
NET_IPV6_ROUTE_GC_TIMEOUT
,
"gc_timeout"
,
.
maxlen
=
sizeof
(
int
),
&
ip6_rt_gc_timeout
,
sizeof
(
int
),
0644
,
NULL
,
.
mode
=
0644
,
&
proc_dointvec_jiffies
,
&
sysctl_jiffies
},
.
proc_handler
=
&
proc_dointvec
,
{
NET_IPV6_ROUTE_GC_INTERVAL
,
"gc_interval"
,
},
&
ip6_rt_gc_interval
,
sizeof
(
int
),
0644
,
NULL
,
{
&
proc_dointvec_jiffies
,
&
sysctl_jiffies
},
.
ctl_name
=
NET_IPV6_ROUTE_MAX_SIZE
,
{
NET_IPV6_ROUTE_GC_ELASTICITY
,
"gc_elasticity"
,
.
procname
=
"max_size"
,
&
ip6_rt_gc_elasticity
,
sizeof
(
int
),
0644
,
NULL
,
.
data
=
&
ip6_rt_max_size
,
&
proc_dointvec_jiffies
,
&
sysctl_jiffies
},
.
maxlen
=
sizeof
(
int
),
{
NET_IPV6_ROUTE_MTU_EXPIRES
,
"mtu_expires"
,
.
mode
=
0644
,
&
ip6_rt_mtu_expires
,
sizeof
(
int
),
0644
,
NULL
,
.
proc_handler
=
&
proc_dointvec
,
&
proc_dointvec_jiffies
,
&
sysctl_jiffies
},
},
{
NET_IPV6_ROUTE_MIN_ADVMSS
,
"min_adv_mss"
,
{
&
ip6_rt_min_advmss
,
sizeof
(
int
),
0644
,
NULL
,
.
ctl_name
=
NET_IPV6_ROUTE_GC_MIN_INTERVAL
,
&
proc_dointvec_jiffies
,
&
sysctl_jiffies
},
.
procname
=
"gc_min_interval"
,
{
0
}
.
data
=
&
ip6_rt_gc_min_interval
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_jiffies
,
.
strategy
=
&
sysctl_jiffies
,
},
{
.
ctl_name
=
NET_IPV6_ROUTE_GC_TIMEOUT
,
.
procname
=
"gc_timeout"
,
.
data
=
&
ip6_rt_gc_timeout
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_jiffies
,
.
strategy
=
&
sysctl_jiffies
,
},
{
.
ctl_name
=
NET_IPV6_ROUTE_GC_INTERVAL
,
.
procname
=
"gc_interval"
,
.
data
=
&
ip6_rt_gc_interval
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_jiffies
,
.
strategy
=
&
sysctl_jiffies
,
},
{
.
ctl_name
=
NET_IPV6_ROUTE_GC_ELASTICITY
,
.
procname
=
"gc_elasticity"
,
.
data
=
&
ip6_rt_gc_elasticity
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_jiffies
,
.
strategy
=
&
sysctl_jiffies
,
},
{
.
ctl_name
=
NET_IPV6_ROUTE_MTU_EXPIRES
,
.
procname
=
"mtu_expires"
,
.
data
=
&
ip6_rt_mtu_expires
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_jiffies
,
.
strategy
=
&
sysctl_jiffies
,
},
{
.
ctl_name
=
NET_IPV6_ROUTE_MIN_ADVMSS
,
.
procname
=
"min_adv_mss"
,
.
data
=
&
ip6_rt_min_advmss
,
.
maxlen
=
sizeof
(
int
),
.
mode
=
0644
,
.
proc_handler
=
&
proc_dointvec_jiffies
,
.
strategy
=
&
sysctl_jiffies
,
},
};
};
#endif
#endif
...
...
net/ipv6/sit.c
View file @
20291389
...
@@ -68,7 +68,8 @@ static struct net_device ipip6_fb_tunnel_dev = {
...
@@ -68,7 +68,8 @@ static struct net_device ipip6_fb_tunnel_dev = {
};
};
static
struct
ip_tunnel
ipip6_fb_tunnel
=
{
static
struct
ip_tunnel
ipip6_fb_tunnel
=
{
NULL
,
&
ipip6_fb_tunnel_dev
,
{
0
,
},
0
,
0
,
0
,
0
,
0
,
0
,
0
,
{
"sit0"
,
}
.
dev
=
&
ipip6_fb_tunnel_dev
,
.
parms
=
{
.
name
=
"sit0"
}
};
};
static
struct
ip_tunnel
*
tunnels_r_l
[
HASH_SIZE
];
static
struct
ip_tunnel
*
tunnels_r_l
[
HASH_SIZE
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment