History

rtnl: Add support for netdev event to link messages

When netdev events happen, a rtnetlink_event() handler will send messages for every event in it's white list. These messages contain current information about a particular device, but they do not include the iformation about which event just happened. So, it is impossible to tell what just happend for these events. This patch adds a new extension to RTM_NEWLINK message called IFLA_EVENT that would have an encoding of event that triggered this message. This would allow the the message consumer to easily determine if it needs to perform certain actions.

Vlad Yasevich committed 9 years ago

Commit 3d3ea5a1 parent 34aa83c4 files · +70 −11Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/if_link.h+11−0
@@ -157,6 +157,7 @@ enum { · 156 unmodified lines
157157 IFLA_GSO_MAX_SIZE,
158158 IFLA_PAD,
159159 IFLA_XDP,
160+ IFLA_EVENT,
160161 __IFLA_MAX
161162 };
162163
@@ -911,4 +912,14 @@ enum { · 748 unmodified lines
911912
912913 #define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1)
913914
915+enum {
916+ IFLA_EVENT_NONE,
917+ IFLA_EVENT_REBOOT, /* internal reset / reboot */
918+ IFLA_EVENT_FEATURES, /* change in offload features */
919+ IFLA_EVENT_BONDING_FAILOVER, /* change in active slave */
920+ IFLA_EVENT_NOTIFY_PEERS, /* re-sent grat. arp/ndisc */
921+ IFLA_EVENT_IGMP_RESEND, /* re-sent IGMP JOIN */
922+ IFLA_EVENT_BONDING_OPTIONS, /* change in bonding options */
923+};
924+
914925 #endif /* _UAPI_LINUX_IF_LINK_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t