~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/nfsd/netlink.c

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  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/nfsd.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/nfsd_netlink.h>
 12 
 13 /* Common nested types */
 14 const struct nla_policy nfsd_sock_nl_policy[NFSD_A_SOCK_TRANSPORT_NAME + 1] = {
 15         [NFSD_A_SOCK_ADDR] = { .type = NLA_BINARY, },
 16         [NFSD_A_SOCK_TRANSPORT_NAME] = { .type = NLA_NUL_STRING, },
 17 };
 18 
 19 const struct nla_policy nfsd_version_nl_policy[NFSD_A_VERSION_ENABLED + 1] = {
 20         [NFSD_A_VERSION_MAJOR] = { .type = NLA_U32, },
 21         [NFSD_A_VERSION_MINOR] = { .type = NLA_U32, },
 22         [NFSD_A_VERSION_ENABLED] = { .type = NLA_FLAG, },
 23 };
 24 
 25 /* NFSD_CMD_THREADS_SET - do */
 26 static const struct nla_policy nfsd_threads_set_nl_policy[NFSD_A_SERVER_SCOPE + 1] = {
 27         [NFSD_A_SERVER_THREADS] = { .type = NLA_U32, },
 28         [NFSD_A_SERVER_GRACETIME] = { .type = NLA_U32, },
 29         [NFSD_A_SERVER_LEASETIME] = { .type = NLA_U32, },
 30         [NFSD_A_SERVER_SCOPE] = { .type = NLA_NUL_STRING, },
 31 };
 32 
 33 /* NFSD_CMD_VERSION_SET - do */
 34 static const struct nla_policy nfsd_version_set_nl_policy[NFSD_A_SERVER_PROTO_VERSION + 1] = {
 35         [NFSD_A_SERVER_PROTO_VERSION] = NLA_POLICY_NESTED(nfsd_version_nl_policy),
 36 };
 37 
 38 /* NFSD_CMD_LISTENER_SET - do */
 39 static const struct nla_policy nfsd_listener_set_nl_policy[NFSD_A_SERVER_SOCK_ADDR + 1] = {
 40         [NFSD_A_SERVER_SOCK_ADDR] = NLA_POLICY_NESTED(nfsd_sock_nl_policy),
 41 };
 42 
 43 /* NFSD_CMD_POOL_MODE_SET - do */
 44 static const struct nla_policy nfsd_pool_mode_set_nl_policy[NFSD_A_POOL_MODE_MODE + 1] = {
 45         [NFSD_A_POOL_MODE_MODE] = { .type = NLA_NUL_STRING, },
 46 };
 47 
 48 /* Ops table for nfsd */
 49 static const struct genl_split_ops nfsd_nl_ops[] = {
 50         {
 51                 .cmd    = NFSD_CMD_RPC_STATUS_GET,
 52                 .dumpit = nfsd_nl_rpc_status_get_dumpit,
 53                 .flags  = GENL_CMD_CAP_DUMP,
 54         },
 55         {
 56                 .cmd            = NFSD_CMD_THREADS_SET,
 57                 .doit           = nfsd_nl_threads_set_doit,
 58                 .policy         = nfsd_threads_set_nl_policy,
 59                 .maxattr        = NFSD_A_SERVER_SCOPE,
 60                 .flags          = GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
 61         },
 62         {
 63                 .cmd    = NFSD_CMD_THREADS_GET,
 64                 .doit   = nfsd_nl_threads_get_doit,
 65                 .flags  = GENL_CMD_CAP_DO,
 66         },
 67         {
 68                 .cmd            = NFSD_CMD_VERSION_SET,
 69                 .doit           = nfsd_nl_version_set_doit,
 70                 .policy         = nfsd_version_set_nl_policy,
 71                 .maxattr        = NFSD_A_SERVER_PROTO_VERSION,
 72                 .flags          = GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
 73         },
 74         {
 75                 .cmd    = NFSD_CMD_VERSION_GET,
 76                 .doit   = nfsd_nl_version_get_doit,
 77                 .flags  = GENL_CMD_CAP_DO,
 78         },
 79         {
 80                 .cmd            = NFSD_CMD_LISTENER_SET,
 81                 .doit           = nfsd_nl_listener_set_doit,
 82                 .policy         = nfsd_listener_set_nl_policy,
 83                 .maxattr        = NFSD_A_SERVER_SOCK_ADDR,
 84                 .flags          = GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
 85         },
 86         {
 87                 .cmd    = NFSD_CMD_LISTENER_GET,
 88                 .doit   = nfsd_nl_listener_get_doit,
 89                 .flags  = GENL_CMD_CAP_DO,
 90         },
 91         {
 92                 .cmd            = NFSD_CMD_POOL_MODE_SET,
 93                 .doit           = nfsd_nl_pool_mode_set_doit,
 94                 .policy         = nfsd_pool_mode_set_nl_policy,
 95                 .maxattr        = NFSD_A_POOL_MODE_MODE,
 96                 .flags          = GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
 97         },
 98         {
 99                 .cmd    = NFSD_CMD_POOL_MODE_GET,
100                 .doit   = nfsd_nl_pool_mode_get_doit,
101                 .flags  = GENL_CMD_CAP_DO,
102         },
103 };
104 
105 struct genl_family nfsd_nl_family __ro_after_init = {
106         .name           = NFSD_FAMILY_NAME,
107         .version        = NFSD_FAMILY_VERSION,
108         .netnsok        = true,
109         .parallel_ops   = true,
110         .module         = THIS_MODULE,
111         .split_ops      = nfsd_nl_ops,
112         .n_split_ops    = ARRAY_SIZE(nfsd_nl_ops),
113 };
114 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php