1 | /* AUTOMATICALLY GENERATED, DO NOT MODIFY */ |
2 | |
3 | /* |
4 | * Schema-defined QAPI types |
5 | * |
6 | * Copyright IBM, Corp. 2011 |
7 | * Copyright (c) 2013-2018 Red Hat Inc. |
8 | * |
9 | * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. |
10 | * See the COPYING.LIB file in the top-level directory. |
11 | */ |
12 | |
13 | #ifndef QAPI_TYPES_ROCKER_H |
14 | #define QAPI_TYPES_ROCKER_H |
15 | |
16 | #include "qapi/qapi-builtin-types.h" |
17 | |
18 | typedef struct RockerSwitch RockerSwitch; |
19 | |
20 | typedef struct q_obj_query_rocker_arg q_obj_query_rocker_arg; |
21 | |
22 | typedef enum RockerPortDuplex { |
23 | ROCKER_PORT_DUPLEX_HALF, |
24 | ROCKER_PORT_DUPLEX_FULL, |
25 | ROCKER_PORT_DUPLEX__MAX, |
26 | } RockerPortDuplex; |
27 | |
28 | #define RockerPortDuplex_str(val) \ |
29 | qapi_enum_lookup(&RockerPortDuplex_lookup, (val)) |
30 | |
31 | extern const QEnumLookup RockerPortDuplex_lookup; |
32 | |
33 | typedef enum RockerPortAutoneg { |
34 | ROCKER_PORT_AUTONEG_OFF, |
35 | ROCKER_PORT_AUTONEG_ON, |
36 | ROCKER_PORT_AUTONEG__MAX, |
37 | } RockerPortAutoneg; |
38 | |
39 | #define RockerPortAutoneg_str(val) \ |
40 | qapi_enum_lookup(&RockerPortAutoneg_lookup, (val)) |
41 | |
42 | extern const QEnumLookup RockerPortAutoneg_lookup; |
43 | |
44 | typedef struct RockerPort RockerPort; |
45 | |
46 | typedef struct q_obj_query_rocker_ports_arg q_obj_query_rocker_ports_arg; |
47 | |
48 | typedef struct RockerPortList RockerPortList; |
49 | |
50 | typedef struct RockerOfDpaFlowKey RockerOfDpaFlowKey; |
51 | |
52 | typedef struct RockerOfDpaFlowMask RockerOfDpaFlowMask; |
53 | |
54 | typedef struct RockerOfDpaFlowAction RockerOfDpaFlowAction; |
55 | |
56 | typedef struct RockerOfDpaFlow RockerOfDpaFlow; |
57 | |
58 | typedef struct q_obj_query_rocker_of_dpa_flows_arg q_obj_query_rocker_of_dpa_flows_arg; |
59 | |
60 | typedef struct RockerOfDpaFlowList RockerOfDpaFlowList; |
61 | |
62 | typedef struct RockerOfDpaGroup RockerOfDpaGroup; |
63 | |
64 | typedef struct q_obj_query_rocker_of_dpa_groups_arg q_obj_query_rocker_of_dpa_groups_arg; |
65 | |
66 | typedef struct RockerOfDpaGroupList RockerOfDpaGroupList; |
67 | |
68 | struct RockerSwitch { |
69 | char *name; |
70 | uint64_t id; |
71 | uint32_t ports; |
72 | }; |
73 | |
74 | void qapi_free_RockerSwitch(RockerSwitch *obj); |
75 | |
76 | struct q_obj_query_rocker_arg { |
77 | char *name; |
78 | }; |
79 | |
80 | struct RockerPort { |
81 | char *name; |
82 | bool enabled; |
83 | bool link_up; |
84 | uint32_t speed; |
85 | RockerPortDuplex duplex; |
86 | RockerPortAutoneg autoneg; |
87 | }; |
88 | |
89 | void qapi_free_RockerPort(RockerPort *obj); |
90 | |
91 | struct q_obj_query_rocker_ports_arg { |
92 | char *name; |
93 | }; |
94 | |
95 | struct RockerPortList { |
96 | RockerPortList *next; |
97 | RockerPort *value; |
98 | }; |
99 | |
100 | void qapi_free_RockerPortList(RockerPortList *obj); |
101 | |
102 | struct RockerOfDpaFlowKey { |
103 | uint32_t priority; |
104 | uint32_t tbl_id; |
105 | bool has_in_pport; |
106 | uint32_t in_pport; |
107 | bool has_tunnel_id; |
108 | uint32_t tunnel_id; |
109 | bool has_vlan_id; |
110 | uint16_t vlan_id; |
111 | bool has_eth_type; |
112 | uint16_t eth_type; |
113 | bool has_eth_src; |
114 | char *eth_src; |
115 | bool has_eth_dst; |
116 | char *eth_dst; |
117 | bool has_ip_proto; |
118 | uint8_t ip_proto; |
119 | bool has_ip_tos; |
120 | uint8_t ip_tos; |
121 | bool has_ip_dst; |
122 | char *ip_dst; |
123 | }; |
124 | |
125 | void qapi_free_RockerOfDpaFlowKey(RockerOfDpaFlowKey *obj); |
126 | |
127 | struct RockerOfDpaFlowMask { |
128 | bool has_in_pport; |
129 | uint32_t in_pport; |
130 | bool has_tunnel_id; |
131 | uint32_t tunnel_id; |
132 | bool has_vlan_id; |
133 | uint16_t vlan_id; |
134 | bool has_eth_src; |
135 | char *eth_src; |
136 | bool has_eth_dst; |
137 | char *eth_dst; |
138 | bool has_ip_proto; |
139 | uint8_t ip_proto; |
140 | bool has_ip_tos; |
141 | uint8_t ip_tos; |
142 | }; |
143 | |
144 | void qapi_free_RockerOfDpaFlowMask(RockerOfDpaFlowMask *obj); |
145 | |
146 | struct RockerOfDpaFlowAction { |
147 | bool has_goto_tbl; |
148 | uint32_t goto_tbl; |
149 | bool has_group_id; |
150 | uint32_t group_id; |
151 | bool has_tunnel_lport; |
152 | uint32_t tunnel_lport; |
153 | bool has_vlan_id; |
154 | uint16_t vlan_id; |
155 | bool has_new_vlan_id; |
156 | uint16_t new_vlan_id; |
157 | bool has_out_pport; |
158 | uint32_t out_pport; |
159 | }; |
160 | |
161 | void qapi_free_RockerOfDpaFlowAction(RockerOfDpaFlowAction *obj); |
162 | |
163 | struct RockerOfDpaFlow { |
164 | uint64_t cookie; |
165 | uint64_t hits; |
166 | RockerOfDpaFlowKey *key; |
167 | RockerOfDpaFlowMask *mask; |
168 | RockerOfDpaFlowAction *action; |
169 | }; |
170 | |
171 | void qapi_free_RockerOfDpaFlow(RockerOfDpaFlow *obj); |
172 | |
173 | struct q_obj_query_rocker_of_dpa_flows_arg { |
174 | char *name; |
175 | bool has_tbl_id; |
176 | uint32_t tbl_id; |
177 | }; |
178 | |
179 | struct RockerOfDpaFlowList { |
180 | RockerOfDpaFlowList *next; |
181 | RockerOfDpaFlow *value; |
182 | }; |
183 | |
184 | void qapi_free_RockerOfDpaFlowList(RockerOfDpaFlowList *obj); |
185 | |
186 | struct RockerOfDpaGroup { |
187 | uint32_t id; |
188 | uint8_t type; |
189 | bool has_vlan_id; |
190 | uint16_t vlan_id; |
191 | bool has_pport; |
192 | uint32_t pport; |
193 | bool has_index; |
194 | uint32_t index; |
195 | bool has_out_pport; |
196 | uint32_t out_pport; |
197 | bool has_group_id; |
198 | uint32_t group_id; |
199 | bool has_set_vlan_id; |
200 | uint16_t set_vlan_id; |
201 | bool has_pop_vlan; |
202 | uint8_t pop_vlan; |
203 | bool has_group_ids; |
204 | uint32List *group_ids; |
205 | bool has_set_eth_src; |
206 | char *set_eth_src; |
207 | bool has_set_eth_dst; |
208 | char *set_eth_dst; |
209 | bool has_ttl_check; |
210 | uint8_t ttl_check; |
211 | }; |
212 | |
213 | void qapi_free_RockerOfDpaGroup(RockerOfDpaGroup *obj); |
214 | |
215 | struct q_obj_query_rocker_of_dpa_groups_arg { |
216 | char *name; |
217 | bool has_type; |
218 | uint8_t type; |
219 | }; |
220 | |
221 | struct RockerOfDpaGroupList { |
222 | RockerOfDpaGroupList *next; |
223 | RockerOfDpaGroup *value; |
224 | }; |
225 | |
226 | void qapi_free_RockerOfDpaGroupList(RockerOfDpaGroupList *obj); |
227 | |
228 | #endif /* QAPI_TYPES_ROCKER_H */ |
229 | |