openvswitch.h revision 38062f954c637861348dd8078cefb73554e6f12c
1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI__LINUX_OPENVSWITCH_H
20#define _UAPI__LINUX_OPENVSWITCH_H 1
21#include <linux/types.h>
22#include <linux/if_ether.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24struct ovs_header {
25 int dp_ifindex;
26};
27#define OVS_DATAPATH_FAMILY "ovs_datapath"
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define OVS_DATAPATH_MCGROUP "ovs_datapath"
30#define OVS_DATAPATH_VERSION 2
31#define OVS_DP_VER_FEATURES 2
32enum ovs_datapath_cmd {
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 OVS_DP_CMD_UNSPEC,
35 OVS_DP_CMD_NEW,
36 OVS_DP_CMD_DEL,
37 OVS_DP_CMD_GET,
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 OVS_DP_CMD_SET
40};
41enum ovs_datapath_attr {
42 OVS_DP_ATTR_UNSPEC,
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 OVS_DP_ATTR_NAME,
45 OVS_DP_ATTR_UPCALL_PID,
46 OVS_DP_ATTR_STATS,
47 OVS_DP_ATTR_MEGAFLOW_STATS,
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 OVS_DP_ATTR_USER_FEATURES,
50 __OVS_DP_ATTR_MAX
51};
52#define OVS_DP_ATTR_MAX (__OVS_DP_ATTR_MAX - 1)
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54struct ovs_dp_stats {
55 __u64 n_hit;
56 __u64 n_missed;
57 __u64 n_lost;
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 __u64 n_flows;
60};
61struct ovs_dp_megaflow_stats {
62 __u64 n_mask_hit;
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 __u32 n_masks;
65 __u32 pad0;
66 __u64 pad1;
67 __u64 pad2;
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69};
70struct ovs_vport_stats {
71 __u64 rx_packets;
72 __u64 tx_packets;
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 __u64 rx_bytes;
75 __u64 tx_bytes;
76 __u64 rx_errors;
77 __u64 tx_errors;
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 __u64 rx_dropped;
80 __u64 tx_dropped;
81};
82#define OVS_DP_F_UNALIGNED (1 << 0)
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84#define OVSP_LOCAL ((__u32)0)
85#define OVS_PACKET_FAMILY "ovs_packet"
86#define OVS_PACKET_VERSION 0x1
87enum ovs_packet_cmd {
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 OVS_PACKET_CMD_UNSPEC,
90 OVS_PACKET_CMD_MISS,
91 OVS_PACKET_CMD_ACTION,
92 OVS_PACKET_CMD_EXECUTE
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94};
95enum ovs_packet_attr {
96 OVS_PACKET_ATTR_UNSPEC,
97 OVS_PACKET_ATTR_PACKET,
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 OVS_PACKET_ATTR_KEY,
100 OVS_PACKET_ATTR_ACTIONS,
101 OVS_PACKET_ATTR_USERDATA,
102 __OVS_PACKET_ATTR_MAX
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104};
105#define OVS_PACKET_ATTR_MAX (__OVS_PACKET_ATTR_MAX - 1)
106#define OVS_VPORT_FAMILY "ovs_vport"
107#define OVS_VPORT_MCGROUP "ovs_vport"
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109#define OVS_VPORT_VERSION 0x1
110enum ovs_vport_cmd {
111 OVS_VPORT_CMD_UNSPEC,
112 OVS_VPORT_CMD_NEW,
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 OVS_VPORT_CMD_DEL,
115 OVS_VPORT_CMD_GET,
116 OVS_VPORT_CMD_SET
117};
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119enum ovs_vport_type {
120 OVS_VPORT_TYPE_UNSPEC,
121 OVS_VPORT_TYPE_NETDEV,
122 OVS_VPORT_TYPE_INTERNAL,
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 OVS_VPORT_TYPE_GRE,
125 OVS_VPORT_TYPE_VXLAN,
126 __OVS_VPORT_TYPE_MAX
127};
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129#define OVS_VPORT_TYPE_MAX (__OVS_VPORT_TYPE_MAX - 1)
130enum ovs_vport_attr {
131 OVS_VPORT_ATTR_UNSPEC,
132 OVS_VPORT_ATTR_PORT_NO,
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 OVS_VPORT_ATTR_TYPE,
135 OVS_VPORT_ATTR_NAME,
136 OVS_VPORT_ATTR_OPTIONS,
137 OVS_VPORT_ATTR_UPCALL_PID,
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 OVS_VPORT_ATTR_STATS,
140 __OVS_VPORT_ATTR_MAX
141};
142#define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1)
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144enum {
145 OVS_TUNNEL_ATTR_UNSPEC,
146 OVS_TUNNEL_ATTR_DST_PORT,
147 __OVS_TUNNEL_ATTR_MAX
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149};
150#define OVS_TUNNEL_ATTR_MAX (__OVS_TUNNEL_ATTR_MAX - 1)
151#define OVS_FLOW_FAMILY "ovs_flow"
152#define OVS_FLOW_MCGROUP "ovs_flow"
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154#define OVS_FLOW_VERSION 0x1
155enum ovs_flow_cmd {
156 OVS_FLOW_CMD_UNSPEC,
157 OVS_FLOW_CMD_NEW,
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 OVS_FLOW_CMD_DEL,
160 OVS_FLOW_CMD_GET,
161 OVS_FLOW_CMD_SET
162};
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164struct ovs_flow_stats {
165 __u64 n_packets;
166 __u64 n_bytes;
167};
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169enum ovs_key_attr {
170 OVS_KEY_ATTR_UNSPEC,
171 OVS_KEY_ATTR_ENCAP,
172 OVS_KEY_ATTR_PRIORITY,
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 OVS_KEY_ATTR_IN_PORT,
175 OVS_KEY_ATTR_ETHERNET,
176 OVS_KEY_ATTR_VLAN,
177 OVS_KEY_ATTR_ETHERTYPE,
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179 OVS_KEY_ATTR_IPV4,
180 OVS_KEY_ATTR_IPV6,
181 OVS_KEY_ATTR_TCP,
182 OVS_KEY_ATTR_UDP,
183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184 OVS_KEY_ATTR_ICMP,
185 OVS_KEY_ATTR_ICMPV6,
186 OVS_KEY_ATTR_ARP,
187 OVS_KEY_ATTR_ND,
188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189 OVS_KEY_ATTR_SKB_MARK,
190 OVS_KEY_ATTR_TUNNEL,
191 OVS_KEY_ATTR_SCTP,
192 OVS_KEY_ATTR_TCP_FLAGS,
193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194 __OVS_KEY_ATTR_MAX
195};
196#define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1)
197enum ovs_tunnel_key_attr {
198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199 OVS_TUNNEL_KEY_ATTR_ID,
200 OVS_TUNNEL_KEY_ATTR_IPV4_SRC,
201 OVS_TUNNEL_KEY_ATTR_IPV4_DST,
202 OVS_TUNNEL_KEY_ATTR_TOS,
203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204 OVS_TUNNEL_KEY_ATTR_TTL,
205 OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT,
206 OVS_TUNNEL_KEY_ATTR_CSUM,
207 __OVS_TUNNEL_KEY_ATTR_MAX
208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209};
210#define OVS_TUNNEL_KEY_ATTR_MAX (__OVS_TUNNEL_KEY_ATTR_MAX - 1)
211enum ovs_frag_type {
212 OVS_FRAG_TYPE_NONE,
213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214 OVS_FRAG_TYPE_FIRST,
215 OVS_FRAG_TYPE_LATER,
216 __OVS_FRAG_TYPE_MAX
217};
218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219#define OVS_FRAG_TYPE_MAX (__OVS_FRAG_TYPE_MAX - 1)
220struct ovs_key_ethernet {
221 __u8 eth_src[ETH_ALEN];
222 __u8 eth_dst[ETH_ALEN];
223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224};
225struct ovs_key_ipv4 {
226 __be32 ipv4_src;
227 __be32 ipv4_dst;
228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229 __u8 ipv4_proto;
230 __u8 ipv4_tos;
231 __u8 ipv4_ttl;
232 __u8 ipv4_frag;
233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234};
235struct ovs_key_ipv6 {
236 __be32 ipv6_src[4];
237 __be32 ipv6_dst[4];
238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239 __be32 ipv6_label;
240 __u8 ipv6_proto;
241 __u8 ipv6_tclass;
242 __u8 ipv6_hlimit;
243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244 __u8 ipv6_frag;
245};
246struct ovs_key_tcp {
247 __be16 tcp_src;
248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249 __be16 tcp_dst;
250};
251struct ovs_key_udp {
252 __be16 udp_src;
253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
254 __be16 udp_dst;
255};
256struct ovs_key_sctp {
257 __be16 sctp_src;
258/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
259 __be16 sctp_dst;
260};
261struct ovs_key_icmp {
262 __u8 icmp_type;
263/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
264 __u8 icmp_code;
265};
266struct ovs_key_icmpv6 {
267 __u8 icmpv6_type;
268/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
269 __u8 icmpv6_code;
270};
271struct ovs_key_arp {
272 __be32 arp_sip;
273/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
274 __be32 arp_tip;
275 __be16 arp_op;
276 __u8 arp_sha[ETH_ALEN];
277 __u8 arp_tha[ETH_ALEN];
278/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
279};
280struct ovs_key_nd {
281 __u32 nd_target[4];
282 __u8 nd_sll[ETH_ALEN];
283/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
284 __u8 nd_tll[ETH_ALEN];
285};
286enum ovs_flow_attr {
287 OVS_FLOW_ATTR_UNSPEC,
288/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
289 OVS_FLOW_ATTR_KEY,
290 OVS_FLOW_ATTR_ACTIONS,
291 OVS_FLOW_ATTR_STATS,
292 OVS_FLOW_ATTR_TCP_FLAGS,
293/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
294 OVS_FLOW_ATTR_USED,
295 OVS_FLOW_ATTR_CLEAR,
296 OVS_FLOW_ATTR_MASK,
297 __OVS_FLOW_ATTR_MAX
298/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
299};
300#define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1)
301enum ovs_sample_attr {
302 OVS_SAMPLE_ATTR_UNSPEC,
303/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
304 OVS_SAMPLE_ATTR_PROBABILITY,
305 OVS_SAMPLE_ATTR_ACTIONS,
306 __OVS_SAMPLE_ATTR_MAX,
307};
308/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
309#define OVS_SAMPLE_ATTR_MAX (__OVS_SAMPLE_ATTR_MAX - 1)
310enum ovs_userspace_attr {
311 OVS_USERSPACE_ATTR_UNSPEC,
312 OVS_USERSPACE_ATTR_PID,
313/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
314 OVS_USERSPACE_ATTR_USERDATA,
315 __OVS_USERSPACE_ATTR_MAX
316};
317#define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1)
318/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
319struct ovs_action_push_vlan {
320 __be16 vlan_tpid;
321 __be16 vlan_tci;
322};
323/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
324enum ovs_action_attr {
325 OVS_ACTION_ATTR_UNSPEC,
326 OVS_ACTION_ATTR_OUTPUT,
327 OVS_ACTION_ATTR_USERSPACE,
328/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
329 OVS_ACTION_ATTR_SET,
330 OVS_ACTION_ATTR_PUSH_VLAN,
331 OVS_ACTION_ATTR_POP_VLAN,
332 OVS_ACTION_ATTR_SAMPLE,
333/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
334 __OVS_ACTION_ATTR_MAX
335};
336#define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1)
337#endif
338/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
339