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
ace9c961
Commit
ace9c961
authored
Mar 23, 2009
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for IFALIAS
New 2.6.28 support for text description
parent
1e659af3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
ip/ipaddress.c
ip/ipaddress.c
+4
-0
ip/iplink.c
ip/iplink.c
+7
-0
No files found.
ip/ipaddress.c
View file @
ace9c961
...
...
@@ -281,6 +281,10 @@ int print_linkinfo(const struct sockaddr_nl *who,
if
(
do_link
&&
tb
[
IFLA_LINKINFO
]
&&
show_details
)
print_linktype
(
fp
,
tb
[
IFLA_LINKINFO
]);
if
(
do_link
&&
tb
[
IFLA_IFALIAS
])
fprintf
(
fp
,
"
\n
alias %s"
,
(
const
char
*
)
RTA_DATA
(
tb
[
IFLA_IFALIAS
]));
if
(
do_link
&&
tb
[
IFLA_STATS
]
&&
show_stats
)
{
struct
rtnl_link_stats
slocal
;
struct
rtnl_link_stats
*
s
=
RTA_DATA
(
tb
[
IFLA_STATS
]);
...
...
ip/iplink.c
View file @
ace9c961
...
...
@@ -67,6 +67,7 @@ void iplink_usage(void)
fprintf
(
stderr
,
" [ broadcast LLADDR ]
\n
"
);
fprintf
(
stderr
,
" [ mtu MTU ]
\n
"
);
fprintf
(
stderr
,
" [ netns PID ]
\n
"
);
fprintf
(
stderr
,
" [ alias NAME ]
\n
"
);
fprintf
(
stderr
,
" ip link show [ DEVICE ]
\n
"
);
if
(
iplink_have_newlink
())
{
...
...
@@ -289,6 +290,12 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
*
type
=
*
argv
;
argc
--
;
argv
++
;
break
;
}
else
if
(
matches
(
*
argv
,
"alias"
)
==
0
)
{
NEXT_ARG
();
addattr_l
(
&
req
->
n
,
sizeof
(
*
req
),
IFLA_IFALIAS
,
*
argv
,
strlen
(
*
argv
));
argc
--
;
argv
++
;
break
;
}
else
{
if
(
strcmp
(
*
argv
,
"dev"
)
==
0
)
{
NEXT_ARG
();
...
...
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