Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/net/ipv4/fou_nl.c
48890 views
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/fou.yaml */
4
/* YNL-GEN kernel source */
5
/* To regenerate run: tools/net/ynl/ynl-regen.sh */
6
7
#include <net/netlink.h>
8
#include <net/genetlink.h>
9
10
#include "fou_nl.h"
11
12
#include <uapi/linux/fou.h>
13
14
/* Global operation policy for fou */
15
const struct nla_policy fou_nl_policy[FOU_ATTR_IFINDEX + 1] = {
16
[FOU_ATTR_PORT] = { .type = NLA_BE16, },
17
[FOU_ATTR_AF] = { .type = NLA_U8, },
18
[FOU_ATTR_IPPROTO] = NLA_POLICY_MIN(NLA_U8, 1),
19
[FOU_ATTR_TYPE] = { .type = NLA_U8, },
20
[FOU_ATTR_REMCSUM_NOPARTIAL] = { .type = NLA_FLAG, },
21
[FOU_ATTR_LOCAL_V4] = { .type = NLA_U32, },
22
[FOU_ATTR_LOCAL_V6] = NLA_POLICY_EXACT_LEN(16),
23
[FOU_ATTR_PEER_V4] = { .type = NLA_U32, },
24
[FOU_ATTR_PEER_V6] = NLA_POLICY_EXACT_LEN(16),
25
[FOU_ATTR_PEER_PORT] = { .type = NLA_BE16, },
26
[FOU_ATTR_IFINDEX] = { .type = NLA_S32, },
27
};
28
29
/* Ops table for fou */
30
const struct genl_small_ops fou_nl_ops[3] = {
31
{
32
.cmd = FOU_CMD_ADD,
33
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
34
.doit = fou_nl_add_doit,
35
.flags = GENL_ADMIN_PERM,
36
},
37
{
38
.cmd = FOU_CMD_DEL,
39
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
40
.doit = fou_nl_del_doit,
41
.flags = GENL_ADMIN_PERM,
42
},
43
{
44
.cmd = FOU_CMD_GET,
45
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
46
.doit = fou_nl_get_doit,
47
.dumpit = fou_nl_get_dumpit,
48
},
49
};
50
51