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/lockd.yaml */ 4 /* YNL-GEN kernel source */ 5 6 #include <net/netlink.h> 7 #include <net/genetlink.h> 8 9 #include "netlink.h" 10 11 #include <uapi/linux/lockd_netlink.h> 12 13 /* LOCKD_CMD_SERVER_SET - do */ 14 static const struct nla_policy lockd_server_set_nl_policy[LOCKD_A_SERVER_UDP_PORT + 1] = { 15 [LOCKD_A_SERVER_GRACETIME] = { .type = NLA_U32, }, 16 [LOCKD_A_SERVER_TCP_PORT] = { .type = NLA_U16, }, 17 [LOCKD_A_SERVER_UDP_PORT] = { .type = NLA_U16, }, 18 }; 19 20 /* Ops table for lockd */ 21 static const struct genl_split_ops lockd_nl_ops[] = { 22 { 23 .cmd = LOCKD_CMD_SERVER_SET, 24 .doit = lockd_nl_server_set_doit, 25 .policy = lockd_server_set_nl_policy, 26 .maxattr = LOCKD_A_SERVER_UDP_PORT, 27 .flags = GENL_ADMIN_PERM | GENL_CMD_CAP_DO, 28 }, 29 { 30 .cmd = LOCKD_CMD_SERVER_GET, 31 .doit = lockd_nl_server_get_doit, 32 .flags = GENL_CMD_CAP_DO, 33 }, 34 }; 35 36 struct genl_family lockd_nl_family __ro_after_init = { 37 .name = LOCKD_FAMILY_NAME, 38 .version = LOCKD_FAMILY_VERSION, 39 .netnsok = true, 40 .parallel_ops = true, 41 .module = THIS_MODULE, 42 .split_ops = lockd_nl_ops, 43 .n_split_ops = ARRAY_SIZE(lockd_nl_ops), 44 }; 45