xref: /linux/Documentation/netlink/specs/fou.yaml (revision af0bc3ac9a9e830cb52b718ecb237c4e76a466be)
1# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2---
3name: fou
4
5protocol: genetlink-legacy
6
7doc: |
8  Foo-over-UDP.
9
10c-family-name: fou-genl-name
11c-version-name: fou-genl-version
12max-by-define: true
13kernel-policy: global
14
15definitions:
16  -
17    type: enum
18    name: encap-type
19    name-prefix: fou-encap-
20    enum-name:
21    entries: [unspec, direct, gue]
22
23attribute-sets:
24  -
25    name: fou
26    name-prefix: fou-attr-
27    attributes:
28      -
29        name: unspec
30        type: unused
31        value: 0
32      -
33        name: port
34        type: u16
35        byte-order: big-endian
36      -
37        name: af
38        type: u8
39      -
40        name: ipproto
41        type: u8
42        checks:
43          min: 1
44      -
45        name: type
46        type: u8
47      -
48        name: remcsum-nopartial
49        type: flag
50      -
51        name: local-v4
52        type: u32
53      -
54        name: local-v6
55        type: binary
56        checks:
57          exact-len: 16
58      -
59        name: peer-v4
60        type: u32
61      -
62        name: peer-v6
63        type: binary
64        checks:
65          exact-len: 16
66      -
67        name: peer-port
68        type: u16
69        byte-order: big-endian
70      -
71        name: ifindex
72        type: s32
73
74operations:
75  list:
76    -
77      name: unspec
78      doc: unused
79      value: 0
80
81    -
82      name: add
83      doc: Add port.
84      attribute-set: fou
85
86      dont-validate: [strict, dump]
87      flags: [admin-perm]
88
89      do:
90        request: &all_attrs
91          attributes:
92            - port
93            - ipproto
94            - type
95            - remcsum-nopartial
96            - local-v4
97            - peer-v4
98            - local-v6
99            - peer-v6
100            - peer-port
101            - ifindex
102
103    -
104      name: del
105      doc: Delete port.
106      attribute-set: fou
107
108      dont-validate: [strict, dump]
109      flags: [admin-perm]
110
111      do:
112        request: &select_attrs
113          attributes:
114            - af
115            - ifindex
116            - port
117            - peer-port
118            - local-v4
119            - peer-v4
120            - local-v6
121            - peer-v6
122
123    -
124      name: get
125      doc: Get tunnel info.
126      attribute-set: fou
127      dont-validate: [strict, dump]
128
129      do:
130        request: *select_attrs
131        reply: *all_attrs
132
133      dump:
134        reply: *all_attrs
135