162306a36Sopenharmony_ci// SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
262306a36Sopenharmony_ci/* Do not edit directly, auto-generated from: */
362306a36Sopenharmony_ci/*	Documentation/netlink/specs/handshake.yaml */
462306a36Sopenharmony_ci/* YNL-GEN kernel source */
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci#include <net/netlink.h>
762306a36Sopenharmony_ci#include <net/genetlink.h>
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#include "genl.h"
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#include <uapi/linux/handshake.h>
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci/* HANDSHAKE_CMD_ACCEPT - do */
1462306a36Sopenharmony_cistatic const struct nla_policy handshake_accept_nl_policy[HANDSHAKE_A_ACCEPT_HANDLER_CLASS + 1] = {
1562306a36Sopenharmony_ci	[HANDSHAKE_A_ACCEPT_HANDLER_CLASS] = NLA_POLICY_MAX(NLA_U32, 2),
1662306a36Sopenharmony_ci};
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci/* HANDSHAKE_CMD_DONE - do */
1962306a36Sopenharmony_cistatic const struct nla_policy handshake_done_nl_policy[HANDSHAKE_A_DONE_REMOTE_AUTH + 1] = {
2062306a36Sopenharmony_ci	[HANDSHAKE_A_DONE_STATUS] = { .type = NLA_U32, },
2162306a36Sopenharmony_ci	[HANDSHAKE_A_DONE_SOCKFD] = { .type = NLA_U32, },
2262306a36Sopenharmony_ci	[HANDSHAKE_A_DONE_REMOTE_AUTH] = { .type = NLA_U32, },
2362306a36Sopenharmony_ci};
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci/* Ops table for handshake */
2662306a36Sopenharmony_cistatic const struct genl_split_ops handshake_nl_ops[] = {
2762306a36Sopenharmony_ci	{
2862306a36Sopenharmony_ci		.cmd		= HANDSHAKE_CMD_ACCEPT,
2962306a36Sopenharmony_ci		.doit		= handshake_nl_accept_doit,
3062306a36Sopenharmony_ci		.policy		= handshake_accept_nl_policy,
3162306a36Sopenharmony_ci		.maxattr	= HANDSHAKE_A_ACCEPT_HANDLER_CLASS,
3262306a36Sopenharmony_ci		.flags		= GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
3362306a36Sopenharmony_ci	},
3462306a36Sopenharmony_ci	{
3562306a36Sopenharmony_ci		.cmd		= HANDSHAKE_CMD_DONE,
3662306a36Sopenharmony_ci		.doit		= handshake_nl_done_doit,
3762306a36Sopenharmony_ci		.policy		= handshake_done_nl_policy,
3862306a36Sopenharmony_ci		.maxattr	= HANDSHAKE_A_DONE_REMOTE_AUTH,
3962306a36Sopenharmony_ci		.flags		= GENL_CMD_CAP_DO,
4062306a36Sopenharmony_ci	},
4162306a36Sopenharmony_ci};
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_cistatic const struct genl_multicast_group handshake_nl_mcgrps[] = {
4462306a36Sopenharmony_ci	[HANDSHAKE_NLGRP_NONE] = { "none", },
4562306a36Sopenharmony_ci	[HANDSHAKE_NLGRP_TLSHD] = { "tlshd", },
4662306a36Sopenharmony_ci};
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_cistruct genl_family handshake_nl_family __ro_after_init = {
4962306a36Sopenharmony_ci	.name		= HANDSHAKE_FAMILY_NAME,
5062306a36Sopenharmony_ci	.version	= HANDSHAKE_FAMILY_VERSION,
5162306a36Sopenharmony_ci	.netnsok	= true,
5262306a36Sopenharmony_ci	.parallel_ops	= true,
5362306a36Sopenharmony_ci	.module		= THIS_MODULE,
5462306a36Sopenharmony_ci	.split_ops	= handshake_nl_ops,
5562306a36Sopenharmony_ci	.n_split_ops	= ARRAY_SIZE(handshake_nl_ops),
5662306a36Sopenharmony_ci	.mcgrps		= handshake_nl_mcgrps,
5762306a36Sopenharmony_ci	.n_mcgrps	= ARRAY_SIZE(handshake_nl_mcgrps),
5862306a36Sopenharmony_ci};
59