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
nexedi
linux
Commits
33e93c96
Commit
33e93c96
authored
Oct 14, 2006
by
YOSHIFUJI Hideaki
Committed by
David S. Miller
Dec 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPV6] ROUTE: Use macros to format /proc/net/ipv6_route.
Signed-off-by:
YOSHIFUJI Hideaki
<
yoshfuji@linux-ipv6.org
>
parent
d83ca5ac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
24 deletions
+13
-24
net/ipv6/route.c
net/ipv6/route.c
+13
-24
No files found.
net/ipv6/route.c
View file @
33e93c96
...
@@ -2246,7 +2246,6 @@ struct rt6_proc_arg
...
@@ -2246,7 +2246,6 @@ struct rt6_proc_arg
static
int
rt6_info_route
(
struct
rt6_info
*
rt
,
void
*
p_arg
)
static
int
rt6_info_route
(
struct
rt6_info
*
rt
,
void
*
p_arg
)
{
{
struct
rt6_proc_arg
*
arg
=
(
struct
rt6_proc_arg
*
)
p_arg
;
struct
rt6_proc_arg
*
arg
=
(
struct
rt6_proc_arg
*
)
p_arg
;
int
i
;
if
(
arg
->
skip
<
arg
->
offset
/
RT6_INFO_LEN
)
{
if
(
arg
->
skip
<
arg
->
offset
/
RT6_INFO_LEN
)
{
arg
->
skip
++
;
arg
->
skip
++
;
...
@@ -2256,38 +2255,28 @@ static int rt6_info_route(struct rt6_info *rt, void *p_arg)
...
@@ -2256,38 +2255,28 @@ static int rt6_info_route(struct rt6_info *rt, void *p_arg)
if
(
arg
->
len
>=
arg
->
length
)
if
(
arg
->
len
>=
arg
->
length
)
return
0
;
return
0
;
for
(
i
=
0
;
i
<
16
;
i
++
)
{
arg
->
len
+=
sprintf
(
arg
->
buffer
+
arg
->
len
,
sprintf
(
arg
->
buffer
+
arg
->
len
,
"%02x"
,
NIP6_SEQFMT
" %02x "
,
rt
->
rt6i_dst
.
addr
.
s6_addr
[
i
]);
NIP6
(
rt
->
rt6i_dst
.
addr
),
arg
->
len
+=
2
;
}
arg
->
len
+=
sprintf
(
arg
->
buffer
+
arg
->
len
,
" %02x "
,
rt
->
rt6i_dst
.
plen
);
rt
->
rt6i_dst
.
plen
);
#ifdef CONFIG_IPV6_SUBTREES
#ifdef CONFIG_IPV6_SUBTREES
for
(
i
=
0
;
i
<
16
;
i
++
)
{
arg
->
len
+=
sprintf
(
arg
->
buffer
+
arg
->
len
,
sprintf
(
arg
->
buffer
+
arg
->
len
,
"%02x"
,
NIP6_SEQFMT
" %02x "
,
rt
->
rt6i_src
.
addr
.
s6_addr
[
i
]);
NIP6
(
rt
->
rt6i_src
.
addr
),
arg
->
len
+=
2
;
}
arg
->
len
+=
sprintf
(
arg
->
buffer
+
arg
->
len
,
" %02x "
,
rt
->
rt6i_src
.
plen
);
rt
->
rt6i_src
.
plen
);
#else
#else
sprintf
(
arg
->
buffer
+
arg
->
len
,
arg
->
len
+=
sprintf
(
arg
->
buffer
+
arg
->
len
,
"00000000000000000000000000000000 00 "
);
"00000000000000000000000000000000 00 "
);
arg
->
len
+=
36
;
#endif
#endif
if
(
rt
->
rt6i_nexthop
)
{
if
(
rt
->
rt6i_nexthop
)
{
for
(
i
=
0
;
i
<
16
;
i
++
)
{
arg
->
len
+=
sprintf
(
arg
->
buffer
+
arg
->
len
,
sprintf
(
arg
->
buffer
+
arg
->
len
,
"%02x"
,
NIP6_SEQFMT
,
rt
->
rt6i_nexthop
->
primary_key
[
i
]);
NIP6
(
*
((
struct
in6_addr
*
)
rt
->
rt6i_nexthop
->
primary_key
)));
arg
->
len
+=
2
;
}
}
else
{
}
else
{
sprintf
(
arg
->
buffer
+
arg
->
len
,
arg
->
len
+=
sprintf
(
arg
->
buffer
+
arg
->
len
,
"00000000000000000000000000000000"
);
"00000000000000000000000000000000"
);
arg
->
len
+=
32
;
}
}
arg
->
len
+=
sprintf
(
arg
->
buffer
+
arg
->
len
,
arg
->
len
+=
sprintf
(
arg
->
buffer
+
arg
->
len
,
" %08x %08x %08x %08x %8s
\n
"
,
" %08x %08x %08x %08x %8s
\n
"
,
...
...
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