History

net: rtnetlink: add linkprop commands to add and delete alternative ifnames

Add two commands to add and delete list of link properties. Implement the first property type along - alternative ifnames. Each net device can have multiple alternative names.

Jiri Pirko committed 7 years ago

Commit 36fbf1e1 parent ff927417 files · +177 −2Browse files

Showing the changes to include/uapi/linux (3 of 7 files). Show all

Unified · Split

3 files
  1. include/uapi/linux/if.h +1 −0
  2. include/uapi/linux/if_link.h +2 −0
  3. include/uapi/linux/rtnetlink.h +7 −0
include/uapi/linux/if.h+1−0
@@ -33,6 +33,7 @@ · 32 unmodified lines
3333 #define IFNAMSIZ 16
3434 #endif /* __UAPI_DEF_IF_IFNAMSIZ */
3535 #define IFALIASZ 256
36+#define ALTIFNAMSIZ 128
3637 #include <linux/hdlc/ioctl.h>
3738
3839 /* For glibc compatibility. An empty enum does not compile. */
include/uapi/linux/if_link.h+2−0
@@ -167,6 +167,8 @@ enum { · 166 unmodified lines
167167 IFLA_NEW_IFINDEX,
168168 IFLA_MIN_MTU,
169169 IFLA_MAX_MTU,
170+ IFLA_PROP_LIST,
171+ IFLA_ALT_IFNAME, /* Alternative ifname */
170172 __IFLA_MAX
171173 };
172174
include/uapi/linux/rtnetlink.h+7−0
@@ -164,6 +164,13 @@ enum { · 163 unmodified lines
164164 RTM_GETNEXTHOP,
165165 #define RTM_GETNEXTHOP RTM_GETNEXTHOP
166166
167+ RTM_NEWLINKPROP = 108,
168+#define RTM_NEWLINKPROP RTM_NEWLINKPROP
169+ RTM_DELLINKPROP,
170+#define RTM_DELLINKPROP RTM_DELLINKPROP
171+ RTM_GETLINKPROP,
172+#define RTM_GETLINKPROP RTM_GETLINKPROP
173+
167174 __RTM_MAX,
168175 #define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
169176 };