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
c6646c1e
Commit
c6646c1e
authored
Oct 16, 2015
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into net-next
parents
d2ccb70a
6f07f3dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
2 deletions
+43
-2
include/libnetlink.h
include/libnetlink.h
+10
-0
ip/ipaddress.c
ip/ipaddress.c
+1
-1
ip/ipneigh.c
ip/ipneigh.c
+1
-1
lib/libnetlink.c
lib/libnetlink.c
+31
-0
No files found.
include/libnetlink.h
View file @
c6646c1e
...
...
@@ -88,7 +88,10 @@ int addattr_nest_end(struct nlmsghdr *n, struct rtattr *nest);
struct
rtattr
*
addattr_nest_compat
(
struct
nlmsghdr
*
n
,
int
maxlen
,
int
type
,
const
void
*
data
,
int
len
);
int
addattr_nest_compat_end
(
struct
nlmsghdr
*
n
,
struct
rtattr
*
nest
);
int
rta_addattr8
(
struct
rtattr
*
rta
,
int
maxlen
,
int
type
,
__u8
data
);
int
rta_addattr16
(
struct
rtattr
*
rta
,
int
maxlen
,
int
type
,
__u16
data
);
int
rta_addattr32
(
struct
rtattr
*
rta
,
int
maxlen
,
int
type
,
__u32
data
);
int
rta_addattr64
(
struct
rtattr
*
rta
,
int
maxlen
,
int
type
,
__u64
data
);
int
rta_addattr_l
(
struct
rtattr
*
rta
,
int
maxlen
,
int
type
,
const
void
*
data
,
int
alen
);
...
...
@@ -100,6 +103,13 @@ int parse_rtattr_byindex(struct rtattr *tb[], int max,
struct
rtattr
*
parse_rtattr_one
(
int
type
,
struct
rtattr
*
rta
,
int
len
);
int
__parse_rtattr_nested_compat
(
struct
rtattr
*
tb
[],
int
max
,
struct
rtattr
*
rta
,
int
len
);
struct
rtattr
*
rta_nest
(
struct
rtattr
*
rta
,
int
maxlen
,
int
type
);
int
rta_nest_end
(
struct
rtattr
*
rta
,
struct
rtattr
*
nest
);
#define RTA_TAIL(rta) \
((struct rtattr *) (((void *) (rta)) + \
RTA_ALIGN((rta)->rta_len)))
#define parse_rtattr_nested(tb, max, rta) \
(parse_rtattr((tb), (max), RTA_DATA(rta), RTA_PAYLOAD(rta)))
...
...
ip/ipaddress.c
View file @
c6646c1e
...
...
@@ -345,7 +345,7 @@ static void print_vfinfo(FILE *fp, struct rtattr *vfinfo)
}
else
vf_linkstate
=
NULL
;
fprintf
(
fp
,
"
\n
vf %d MAC %s"
,
vf_mac
->
vf
,
fprintf
(
fp
,
"
%s vf %d MAC %s"
,
_SL_
,
vf_mac
->
vf
,
ll_addr_n2a
((
unsigned
char
*
)
&
vf_mac
->
mac
,
ETH_ALEN
,
0
,
b1
,
sizeof
(
b1
)));
if
(
vf_vlan
->
vlan
)
...
...
ip/ipneigh.c
View file @
c6646c1e
...
...
@@ -266,7 +266,7 @@ int print_neigh(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
}
if
(
n
->
nlmsg_type
==
RTM_DELNEIGH
)
fprintf
(
fp
,
"
delete
"
);
fprintf
(
fp
,
"
Deleted
"
);
else
if
(
n
->
nlmsg_type
==
RTM_GETNEIGH
)
fprintf
(
fp
,
"miss "
);
if
(
tb
[
NDA_DST
])
{
...
...
lib/libnetlink.c
View file @
c6646c1e
...
...
@@ -742,6 +742,37 @@ int rta_addattr_l(struct rtattr *rta, int maxlen, int type,
return
0
;
}
int
rta_addattr8
(
struct
rtattr
*
rta
,
int
maxlen
,
int
type
,
__u8
data
)
{
return
rta_addattr_l
(
rta
,
maxlen
,
type
,
&
data
,
sizeof
(
__u8
));
}
int
rta_addattr16
(
struct
rtattr
*
rta
,
int
maxlen
,
int
type
,
__u16
data
)
{
return
rta_addattr_l
(
rta
,
maxlen
,
type
,
&
data
,
sizeof
(
__u16
));
}
int
rta_addattr64
(
struct
rtattr
*
rta
,
int
maxlen
,
int
type
,
__u64
data
)
{
return
rta_addattr_l
(
rta
,
maxlen
,
type
,
&
data
,
sizeof
(
__u64
));
}
struct
rtattr
*
rta_nest
(
struct
rtattr
*
rta
,
int
maxlen
,
int
type
)
{
struct
rtattr
*
nest
=
RTA_TAIL
(
rta
);
rta_addattr_l
(
rta
,
maxlen
,
type
,
NULL
,
0
);
return
nest
;
}
int
rta_nest_end
(
struct
rtattr
*
rta
,
struct
rtattr
*
nest
)
{
nest
->
rta_len
=
(
void
*
)
RTA_TAIL
(
rta
)
-
(
void
*
)
nest
;
return
rta
->
rta_len
;
}
int
parse_rtattr
(
struct
rtattr
*
tb
[],
int
max
,
struct
rtattr
*
rta
,
int
len
)
{
return
parse_rtattr_flags
(
tb
,
max
,
rta
,
len
,
0
);
...
...
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