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
cd635074
Commit
cd635074
authored
Aug 04, 2014
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'net-next'
parents
a9ae4224
ff7c2084
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
1 deletion
+36
-1
include/linux/can/netlink.h
include/linux/can/netlink.h
+2
-1
include/linux/if_link.h
include/linux/if_link.h
+6
-0
include/linux/netdevice.h
include/linux/netdevice.h
+6
-0
ip/iplink.c
ip/iplink.c
+22
-0
No files found.
include/linux/can/netlink.h
View file @
cd635074
...
@@ -97,6 +97,7 @@ struct can_ctrlmode {
...
@@ -97,6 +97,7 @@ struct can_ctrlmode {
#define CAN_CTRLMODE_ONE_SHOT 0x08
/* One-Shot mode */
#define CAN_CTRLMODE_ONE_SHOT 0x08
/* One-Shot mode */
#define CAN_CTRLMODE_BERR_REPORTING 0x10
/* Bus-error reporting */
#define CAN_CTRLMODE_BERR_REPORTING 0x10
/* Bus-error reporting */
#define CAN_CTRLMODE_FD 0x20
/* CAN FD mode */
#define CAN_CTRLMODE_FD 0x20
/* CAN FD mode */
#define CAN_CTRLMODE_PRESUME_ACK 0x40
/* Ignore missing CAN ACKs */
/*
/*
* CAN device statistics
* CAN device statistics
...
...
include/linux/if_link.h
View file @
cd635074
...
@@ -202,11 +202,17 @@ enum {
...
@@ -202,11 +202,17 @@ enum {
IFLA_INET6_CACHEINFO
,
/* time values and max reasm size */
IFLA_INET6_CACHEINFO
,
/* time values and max reasm size */
IFLA_INET6_ICMP6STATS
,
/* statistics (icmpv6) */
IFLA_INET6_ICMP6STATS
,
/* statistics (icmpv6) */
IFLA_INET6_TOKEN
,
/* device token */
IFLA_INET6_TOKEN
,
/* device token */
IFLA_INET6_ADDR_GEN_MODE
,
/* implicit address generator mode */
__IFLA_INET6_MAX
__IFLA_INET6_MAX
};
};
#define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
#define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
enum
in6_addr_gen_mode
{
IN6_ADDR_GEN_MODE_EUI64
,
IN6_ADDR_GEN_MODE_NONE
,
};
enum
{
enum
{
BRIDGE_MODE_UNSPEC
,
BRIDGE_MODE_UNSPEC
,
BRIDGE_MODE_HAIRPIN
,
BRIDGE_MODE_HAIRPIN
,
...
...
include/linux/netdevice.h
View file @
cd635074
...
@@ -37,6 +37,12 @@
...
@@ -37,6 +37,12 @@
#define INIT_NETDEV_GROUP 0
#define INIT_NETDEV_GROUP 0
/* interface name assignment types (sysfs name_assign_type attribute) */
#define NET_NAME_UNKNOWN 0
/* unknown origin (not exposed to userspace) */
#define NET_NAME_ENUM 1
/* enumerated by kernel */
#define NET_NAME_PREDICTABLE 2
/* predictably named by the kernel */
#define NET_NAME_USER 3
/* provided by user-space */
#define NET_NAME_RENAMED 4
/* renamed by user-space */
/* Media selection options. */
/* Media selection options. */
enum
{
enum
{
...
...
ip/iplink.c
View file @
cd635074
...
@@ -81,6 +81,7 @@ void iplink_usage(void)
...
@@ -81,6 +81,7 @@ void iplink_usage(void)
fprintf
(
stderr
,
" [ state { auto | enable | disable} ] ]
\n
"
);
fprintf
(
stderr
,
" [ state { auto | enable | disable} ] ]
\n
"
);
fprintf
(
stderr
,
" [ master DEVICE ]
\n
"
);
fprintf
(
stderr
,
" [ master DEVICE ]
\n
"
);
fprintf
(
stderr
,
" [ nomaster ]
\n
"
);
fprintf
(
stderr
,
" [ nomaster ]
\n
"
);
fprintf
(
stderr
,
" [ addrgenmode { eui64 | none } ]
\n
"
);
fprintf
(
stderr
,
" ip link show [ DEVICE | group GROUP ] [up]
\n
"
);
fprintf
(
stderr
,
" ip link show [ DEVICE | group GROUP ] [up]
\n
"
);
if
(
iplink_have_newlink
())
{
if
(
iplink_have_newlink
())
{
...
@@ -161,6 +162,15 @@ static int get_link_mode(const char *mode)
...
@@ -161,6 +162,15 @@ static int get_link_mode(const char *mode)
return
-
1
;
return
-
1
;
}
}
static
int
get_addr_gen_mode
(
const
char
*
mode
)
{
if
(
strcasecmp
(
mode
,
"eui64"
)
==
0
)
return
IN6_ADDR_GEN_MODE_EUI64
;
if
(
strcasecmp
(
mode
,
"none"
)
==
0
)
return
IN6_ADDR_GEN_MODE_NONE
;
return
-
1
;
}
#if IPLINK_IOCTL_COMPAT
#if IPLINK_IOCTL_COMPAT
static
int
have_rtnl_newlink
=
-
1
;
static
int
have_rtnl_newlink
=
-
1
;
...
@@ -561,6 +571,18 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
...
@@ -561,6 +571,18 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
invarg
(
"Invalid
\"
numrxqueues
\"
value
\n
"
,
*
argv
);
invarg
(
"Invalid
\"
numrxqueues
\"
value
\n
"
,
*
argv
);
addattr_l
(
&
req
->
n
,
sizeof
(
*
req
),
IFLA_NUM_RX_QUEUES
,
addattr_l
(
&
req
->
n
,
sizeof
(
*
req
),
IFLA_NUM_RX_QUEUES
,
&
numrxqueues
,
4
);
&
numrxqueues
,
4
);
}
else
if
(
matches
(
*
argv
,
"addrgenmode"
)
==
0
)
{
struct
rtattr
*
afs
,
*
afs6
;
int
mode
;
NEXT_ARG
();
mode
=
get_addr_gen_mode
(
*
argv
);
if
(
mode
<
0
)
invarg
(
"Invalid address generation mode
\n
"
,
*
argv
);
afs
=
addattr_nest
(
&
req
->
n
,
sizeof
(
*
req
),
IFLA_AF_SPEC
);
afs6
=
addattr_nest
(
&
req
->
n
,
sizeof
(
*
req
),
AF_INET6
);
addattr8
(
&
req
->
n
,
sizeof
(
*
req
),
IFLA_INET6_ADDR_GEN_MODE
,
mode
);
addattr_nest_end
(
&
req
->
n
,
afs6
);
addattr_nest_end
(
&
req
->
n
,
afs
);
}
else
{
}
else
{
if
(
strcmp
(
*
argv
,
"dev"
)
==
0
)
{
if
(
strcmp
(
*
argv
,
"dev"
)
==
0
)
{
NEXT_ARG
();
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