summaryrefslogtreecommitdiff
path: root/lib/rtnetlink.h
Commit message (Collapse)AuthorAgeFilesLines
* rtnetlink: Remove executable bit from rtnetlink.hTimothy Redaelli2018-11-101-0/+0
| | | | | | | | | | | | | In commit 135ee7ef362f ("rtnetlink: extend parser to include kind of master and slave") the file mode of rtnetlink.h accidentaly changed from 0644 to 0755. This commit restores the previous file mode (0644) on rtnetlink.h. CC: John Hurley <john.hurley@netronome.com> Fixes: 135ee7ef362f ("rtnetlink: extend parser to include kind of master and slave") Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rtnetlink: extend parser to include kind of master and slaveJohn Hurley2018-06-291-0/+4
| | | | | | | | | | | | Extend the rtnetlink_parse function to look for linkinfo attributes and, in turn, store pointers to the master and slave kinds (if any) in the rtnetlink_change struct. Signed-off-by: John Hurley <john.hurley@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com>
* netdev-linux: Report netdev change events when mac changed.Tonghao Zhang2018-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | When mac addr of ports on bridge has been changed, for example, $ ip link set dev eth0 address 00:11:22:33:44:55 we should reconfigure the datapath id and mac addr of local port. But now openvswitch dont do that as expected. A simple example of how to reproduce it: $ ovs-vsctl add-br br0 $ ifconfig br0 # for example, mac is c6:c6:d7:46:b4:4b $ ip link set dev br0 address 00:11:22:33:44:55 $ ifconfig br0 # mac of br0 will be 00:11:22:33:44:55 then repeat: $ ip link set dev br0 address 00:11:22:33:44:55 $ ifconfig br0 # mac of br0 will be c6:c6:d7:46:b4:4b This patch reports the mac changed event when ports changed, then openvswitch will reconfigure the datapath id and mac addr of local port. Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* userspace: Define and use struct eth_addr.Jarno Rajahalme2015-08-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Define struct eth_addr and use it instead of a uint8_t array for all ethernet addresses in OVS userspace. The struct is always the right size, and it can be assigned without an explicit memcpy, which makes code more readable. "struct eth_addr" is a good type name for this as many utility functions are already named accordingly. struct eth_addr can be accessed as bytes as well as ovs_be16's, which makes the struct 16-bit aligned. All use seems to be 16-bit aligned, so some algorithms on the ethernet addresses can be made a bit more efficient making use of this fact. As the struct fits into a register (in 64-bit systems) we pass it by value when possible. This patch also changes the few uses of Linux specific ETH_ALEN to OVS's own ETH_ADDR_LEN, and removes the OFP_ETH_ALEN, as it is no longer needed. This work stemmed from a desire to make all struct flow members assignable for unrelated exploration purposes. However, I think this might be a nice code readability improvement by itself. Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
* rtnetlink: Extend rtnetlink to support RTNLGRP_IPV4_IFADDR andAlex Wang2015-07-281-0/+68
| | | | | | | | | | | | RTNLGRP_IPV6_IFADDR. This commit renames the rtnetlink-link.{c,h} to rtnetlink.{c,h} and extends the module to support RTNLGRP_IPV4_IFADDR and RTNLGRP_IPV4_IFADDR multicast groups. A later patch will start using this module to react to interface address changes. Signed-off-by: Alex Wang <alexw@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* lib: Rename rtnetlink.[ch] files.Ethan Jackson2011-09-011-59/+0
| | | | | | | | | | The only rtnetlink specific functionality contained in the rtnetlink module is the use of the NETLINK_ROUTE protocol. This can easily be passed in by callers. In preparation for generalization, this patch renames rtnetlink.[ch] to netlink-notifier.[ch]. Future patches will complete the transition.
* retnetlink: Add rtnetlink_destroy function.Ethan Jackson2011-01-131-0/+1
| | | | | | This commit adds a function to rtnetlink which may be used to destroy struct rtnetlink handles. This function will be used in a future commit.
* rtnetlink: Remove LINK specific messages from rtnetlinkEthan Jackson2011-01-041-24/+24
| | | | | | | Abstracted rtnetlink so that it may be used for messages other than RTM LINK messages. Created a new rtnetlink-link module which specifically deals with these kinds of messages and follows the old rtnetlink API.
* rtnetlink: Fix typo in comments referencing rtnetlink_notifier_register()Justin Pettit2010-01-161-1/+1
|
* rtnetlink: Move into separate source and header file.Ben Pfaff2009-07-301-0/+58
Now that rtnetlink isn't named similarly to netdev_linux, it might as well have its own source and header files to avoid confusing everyone.