Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iproute2
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
iproute2
Commits
7bfc49cf
Commit
7bfc49cf
authored
Aug 04, 2013
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into net-next-3.11
parents
5318b2c6
c4fdf75d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
2 deletions
+28
-2
include/rt_names.h
include/rt_names.h
+1
-0
ip/ipaddress.c
ip/ipaddress.c
+8
-2
lib/rt_names.c
lib/rt_names.c
+19
-0
No files found.
include/rt_names.h
View file @
7bfc49cf
...
@@ -8,6 +8,7 @@ const char *rtnl_rtscope_n2a(int id, char *buf, int len);
...
@@ -8,6 +8,7 @@ const char *rtnl_rtscope_n2a(int id, char *buf, int len);
const
char
*
rtnl_rttable_n2a
(
__u32
id
,
char
*
buf
,
int
len
);
const
char
*
rtnl_rttable_n2a
(
__u32
id
,
char
*
buf
,
int
len
);
const
char
*
rtnl_rtrealm_n2a
(
int
id
,
char
*
buf
,
int
len
);
const
char
*
rtnl_rtrealm_n2a
(
int
id
,
char
*
buf
,
int
len
);
const
char
*
rtnl_dsfield_n2a
(
int
id
,
char
*
buf
,
int
len
);
const
char
*
rtnl_dsfield_n2a
(
int
id
,
char
*
buf
,
int
len
);
const
char
*
rtnl_group_n2a
(
int
id
,
char
*
buf
,
int
len
);
int
rtnl_rtprot_a2n
(
__u32
*
id
,
const
char
*
arg
);
int
rtnl_rtprot_a2n
(
__u32
*
id
,
const
char
*
arg
);
int
rtnl_rtscope_a2n
(
__u32
*
id
,
const
char
*
arg
);
int
rtnl_rtscope_a2n
(
__u32
*
id
,
const
char
*
arg
);
...
...
ip/ipaddress.c
View file @
7bfc49cf
...
@@ -418,7 +418,7 @@ int print_linkinfo(const struct sockaddr_nl *who,
...
@@ -418,7 +418,7 @@ int print_linkinfo(const struct sockaddr_nl *who,
if
(
tb
[
IFLA_GROUP
])
{
if
(
tb
[
IFLA_GROUP
])
{
int
group
=
*
(
int
*
)
RTA_DATA
(
tb
[
IFLA_GROUP
]);
int
group
=
*
(
int
*
)
RTA_DATA
(
tb
[
IFLA_GROUP
]);
if
(
group
!=
filter
.
group
)
if
(
filter
.
group
!=
-
1
&&
group
!=
filter
.
group
)
return
-
1
;
return
-
1
;
}
}
...
@@ -458,6 +458,12 @@ int print_linkinfo(const struct sockaddr_nl *who,
...
@@ -458,6 +458,12 @@ int print_linkinfo(const struct sockaddr_nl *who,
if
(
do_link
&&
tb
[
IFLA_LINKMODE
])
if
(
do_link
&&
tb
[
IFLA_LINKMODE
])
print_linkmode
(
fp
,
tb
[
IFLA_LINKMODE
]);
print_linkmode
(
fp
,
tb
[
IFLA_LINKMODE
]);
if
(
tb
[
IFLA_GROUP
])
{
SPRINT_BUF
(
b1
);
int
group
=
*
(
int
*
)
RTA_DATA
(
tb
[
IFLA_GROUP
]);
fprintf
(
fp
,
"group %s "
,
rtnl_group_n2a
(
group
,
b1
,
sizeof
(
b1
)));
}
if
(
filter
.
showqueue
)
if
(
filter
.
showqueue
)
print_queuelen
(
fp
,
tb
);
print_queuelen
(
fp
,
tb
);
...
@@ -1050,7 +1056,7 @@ static int ipaddr_list_flush_or_save(int argc, char **argv, int action)
...
@@ -1050,7 +1056,7 @@ static int ipaddr_list_flush_or_save(int argc, char **argv, int action)
if
(
filter
.
family
==
AF_UNSPEC
)
if
(
filter
.
family
==
AF_UNSPEC
)
filter
.
family
=
preferred_family
;
filter
.
family
=
preferred_family
;
filter
.
group
=
INIT_NETDEV_GROUP
;
filter
.
group
=
-
1
;
if
(
action
==
IPADD_FLUSH
)
{
if
(
action
==
IPADD_FLUSH
)
{
if
(
argc
<=
0
)
{
if
(
argc
<=
0
)
{
...
...
lib/rt_names.c
View file @
7bfc49cf
...
@@ -500,3 +500,22 @@ int rtnl_group_a2n(int *id, const char *arg)
...
@@ -500,3 +500,22 @@ int rtnl_group_a2n(int *id, const char *arg)
*
id
=
i
;
*
id
=
i
;
return
0
;
return
0
;
}
}
const
char
*
rtnl_group_n2a
(
int
id
,
char
*
buf
,
int
len
)
{
struct
rtnl_hash_entry
*
entry
;
int
i
;
if
(
!
rtnl_group_init
)
rtnl_group_initialize
();
for
(
i
=
0
;
i
<
256
;
i
++
)
{
entry
=
rtnl_group_hash
[
i
];
if
(
entry
&&
entry
->
id
==
id
)
{
return
entry
->
name
;
}
}
snprintf
(
buf
,
len
,
"%d"
,
id
);
return
buf
;
}
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