diff options
author | Jiri Pirko <jiri@resnulli.us> | 2014-01-22 08:05:55 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-23 05:57:05 (GMT) |
commit | ba7d49b1f0f8e5f24294a880ed576964059af5ef (patch) | |
tree | dbd5c9c4418d4a72fe44a5f9af0e51e0d2be747a /include/net | |
parent | df7dbcbbafc0b8f3fb31a40c6f3c4a7e15cb0b40 (diff) | |
download | linux-ba7d49b1f0f8e5f24294a880ed576964059af5ef.tar.xz |
rtnetlink: provide api for getting and setting slave info
Recent patch
bonding: add netlink attributes to slave link dev (1d3ee88ae0d6)
Introduced yet another device specific way to access slave information
over rtnetlink. There is one already there for bridge.
This patch introduces generic way to do this, for getting and setting
info as well by extending link_ops. Later on, this new interface will
be used for bridge ports as well.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/rtnetlink.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h index 8fb4207..661e45d 100644 --- a/include/net/rtnetlink.h +++ b/include/net/rtnetlink.h @@ -79,6 +79,20 @@ struct rtnl_link_ops { const struct net_device *dev); unsigned int (*get_num_tx_queues)(void); unsigned int (*get_num_rx_queues)(void); + + int slave_maxtype; + const struct nla_policy *slave_policy; + int (*slave_validate)(struct nlattr *tb[], + struct nlattr *data[]); + int (*slave_changelink)(struct net_device *dev, + struct net_device *slave_dev, + struct nlattr *tb[], + struct nlattr *data[]); + size_t (*get_slave_size)(const struct net_device *dev, + const struct net_device *slave_dev); + int (*fill_slave_info)(struct sk_buff *skb, + const struct net_device *dev, + const struct net_device *slave_dev); }; int __rtnl_link_register(struct rtnl_link_ops *ops); |