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