diff options
author | Frode Nordahl <frode.nordahl@canonical.com> | 2021-08-20 15:43:15 +0200 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2021-08-20 11:32:52 -0700 |
commit | bfee9f6c011518c7690d3ce3b290a2b7189a377d (patch) | |
tree | 6bde0b6ed5dea505e96615b5f420f8d9d64c386d /include/openvswitch | |
parent | 9ab5075bffa2c3ec83f5450460f71b1d5d7e4652 (diff) | |
download | openvswitch-bfee9f6c011518c7690d3ce3b290a2b7189a377d.tar.gz |
netlink: Add support for parsing link layer address.
Data retrieved from netlink and friends may include link layer
address. Add type to nl_attr_type and min/max functions to allow
use of nl_policy_parse with this type of data.
While this will not be used by Open vSwitch itself at this time,
sibling and derived projects want to use the great netlink library
that OVS provides, and it is not possible to safely override the
global nl_attr_type symbol at link time.
Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'include/openvswitch')
-rw-r--r-- | include/openvswitch/types.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/openvswitch/types.h b/include/openvswitch/types.h index 45e70790e..8c5ec94a6 100644 --- a/include/openvswitch/types.h +++ b/include/openvswitch/types.h @@ -168,6 +168,14 @@ struct eth_addr { }; }; +/* Similar to struct eth_addr, for Infiniband LL addresses. */ +struct ib_addr { + union { + uint8_t ia[20]; + ovs_be16 be16[10]; + }; +}; + /* Ethernet address constant, e.g. ETH_ADDR_C(01,23,45,67,89,ab) is * 01:23:45:67:89:ab. */ #define ETH_ADDR_C(A,B,C,D,E,F) \ |