aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/netlink/specs/fou.yaml
blob: 266c386eedf3a08949b503a855e76db5ff333ff3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: fou

protocol: genetlink-legacy

doc: |
  Foo-over-UDP.

c-family-name: fou-genl-name
c-version-name: fou-genl-version
max-by-define: true
kernel-policy: global

definitions:
  -
    type: enum
    name: encap_type
    name-prefix: fou-encap-
    enum-name:
    entries: [ unspec, direct, gue ]

attribute-sets:
  -
    name: fou
    name-prefix: fou-attr-
    attributes:
      -
        name: unspec
        type: unused
      -
        name: port
        type: u16
        byte-order: big-endian
      -
        name: af
        type: u8
      -
        name: ipproto
        type: u8
      -
        name: type
        type: u8
      -
        name: remcsum_nopartial
        type: flag
      -
        name: local_v4
        type: u32
      -
        name: local_v6
        type: binary
        checks:
          min-len: 16
      -
        name: peer_v4
        type: u32
      -
        name: peer_v6
        type: binary
        checks:
          min-len: 16
      -
        name: peer_port
        type: u16
        byte-order: big-endian
      -
        name: ifindex
        type: s32

operations:
  list:
    -
      name: unspec
      doc: unused

    -
      name: add
      doc: Add port.
      attribute-set: fou

      dont-validate: [ strict, dump ]
      flags: [ admin-perm ]

      do:
        request: &all_attrs
          attributes:
            - port
            - ipproto
            - type
            - remcsum_nopartial
            - local_v4
            - peer_v4
            - local_v6
            - peer_v6
            - peer_port
            - ifindex

    -
      name: del
      doc: Delete port.
      attribute-set: fou

      dont-validate: [ strict, dump ]
      flags: [ admin-perm ]

      do:
        request:  &select_attrs
          attributes:
          - af
          - ifindex
          - port
          - peer_port
          - local_v4
          - peer_v4
          - local_v6
          - peer_v6

    -
      name: get
      doc: Get tunnel info.
      attribute-set: fou
      dont-validate: [ strict, dump ]

      do:
        request: *select_attrs
        reply: *all_attrs

      dump:
        reply: *all_attrs