rtnetlink.h (c441bfb5f2866de71e092c1b9d866a65978dfe1a) rtnetlink.h (8c713dc93ca9a423d6af8849c9254742a1070c37)
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __NET_RTNETLINK_H
3#define __NET_RTNETLINK_H
4
5#include <linux/rtnetlink.h>
6#include <net/netlink.h>
7
8typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *,

--- 23 unchanged lines hidden (view full) ---

32 * struct rtnl_link_ops - rtnetlink link operations
33 *
34 * @list: Used internally
35 * @kind: Identifier
36 * @netns_refund: Physical device, move to init_net on netns exit
37 * @maxtype: Highest device specific netlink attribute number
38 * @policy: Netlink policy for device specific attribute validation
39 * @validate: Optional validation function for netlink/changelink parameters
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef __NET_RTNETLINK_H
3#define __NET_RTNETLINK_H
4
5#include <linux/rtnetlink.h>
6#include <net/netlink.h>
7
8typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *,

--- 23 unchanged lines hidden (view full) ---

32 * struct rtnl_link_ops - rtnetlink link operations
33 *
34 * @list: Used internally
35 * @kind: Identifier
36 * @netns_refund: Physical device, move to init_net on netns exit
37 * @maxtype: Highest device specific netlink attribute number
38 * @policy: Netlink policy for device specific attribute validation
39 * @validate: Optional validation function for netlink/changelink parameters
40 * @alloc: netdev allocation function, can be %NULL and is then used
41 * in place of alloc_netdev_mqs(), in this case @priv_size
42 * and @setup are unused. Returns a netdev or ERR_PTR().
40 * @priv_size: sizeof net_device private space
41 * @setup: net_device setup function
42 * @newlink: Function for configuring and registering a new device
43 * @changelink: Function for changing parameters of an existing device
44 * @dellink: Function to remove a device
45 * @get_size: Function to calculate required room for dumping device
46 * specific netlink attributes
47 * @fill_info: Function to dump device specific netlink attributes

--- 10 unchanged lines hidden (view full) ---

58 * @fill_linkxstats: Function to dump device-specific extended link stats
59 */
60struct rtnl_link_ops {
61 struct list_head list;
62
63 const char *kind;
64
65 size_t priv_size;
43 * @priv_size: sizeof net_device private space
44 * @setup: net_device setup function
45 * @newlink: Function for configuring and registering a new device
46 * @changelink: Function for changing parameters of an existing device
47 * @dellink: Function to remove a device
48 * @get_size: Function to calculate required room for dumping device
49 * specific netlink attributes
50 * @fill_info: Function to dump device specific netlink attributes

--- 10 unchanged lines hidden (view full) ---

61 * @fill_linkxstats: Function to dump device-specific extended link stats
62 */
63struct rtnl_link_ops {
64 struct list_head list;
65
66 const char *kind;
67
68 size_t priv_size;
69 struct net_device *(*alloc)(struct nlattr *tb[],
70 const char *ifname,
71 unsigned char name_assign_type,
72 unsigned int num_tx_queues,
73 unsigned int num_rx_queues);
66 void (*setup)(struct net_device *dev);
67
68 bool netns_refund;
69 unsigned int maxtype;
70 const struct nla_policy *policy;
71 int (*validate)(struct nlattr *tb[],
72 struct nlattr *data[],
73 struct netlink_ext_ack *extack);

--- 102 unchanged lines hidden ---
74 void (*setup)(struct net_device *dev);
75
76 bool netns_refund;
77 unsigned int maxtype;
78 const struct nla_policy *policy;
79 int (*validate)(struct nlattr *tb[],
80 struct nlattr *data[],
81 struct netlink_ext_ack *extack);

--- 102 unchanged lines hidden ---