xref: /openbmc/linux/net/core/netdev-genl-gen.c (revision 6e9b7cd6)
1 // SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2 /* Do not edit directly, auto-generated from: */
3 /*	Documentation/netlink/specs/netdev.yaml */
4 /* YNL-GEN kernel source */
5 
6 #include <net/netlink.h>
7 #include <net/genetlink.h>
8 
9 #include "netdev-genl-gen.h"
10 
11 #include <linux/netdev.h>
12 
13 /* NETDEV_CMD_DEV_GET - do */
14 static const struct nla_policy netdev_dev_get_nl_policy[NETDEV_A_DEV_IFINDEX + 1] = {
15 	[NETDEV_A_DEV_IFINDEX] = NLA_POLICY_MIN(NLA_U32, 1),
16 };
17 
18 /* Ops table for netdev */
19 static const struct genl_split_ops netdev_nl_ops[] = {
20 	{
21 		.cmd		= NETDEV_CMD_DEV_GET,
22 		.doit		= netdev_nl_dev_get_doit,
23 		.policy		= netdev_dev_get_nl_policy,
24 		.maxattr	= NETDEV_A_DEV_IFINDEX,
25 		.flags		= GENL_CMD_CAP_DO,
26 	},
27 	{
28 		.cmd	= NETDEV_CMD_DEV_GET,
29 		.dumpit	= netdev_nl_dev_get_dumpit,
30 		.flags	= GENL_CMD_CAP_DUMP,
31 	},
32 };
33 
34 static const struct genl_multicast_group netdev_nl_mcgrps[] = {
35 	[NETDEV_NLGRP_MGMT] = { "mgmt", },
36 };
37 
38 struct genl_family netdev_nl_family __ro_after_init = {
39 	.name		= NETDEV_FAMILY_NAME,
40 	.version	= NETDEV_FAMILY_VERSION,
41 	.netnsok	= true,
42 	.parallel_ops	= true,
43 	.module		= THIS_MODULE,
44 	.split_ops	= netdev_nl_ops,
45 	.n_split_ops	= ARRAY_SIZE(netdev_nl_ops),
46 	.mcgrps		= netdev_nl_mcgrps,
47 	.n_mcgrps	= ARRAY_SIZE(netdev_nl_mcgrps),
48 };
49