Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 1 | // Copyright 2013, Big Switch Networks, Inc. |
| 2 | // |
| 3 | // LoxiGen is licensed under the Eclipse Public License, |
| 4 | // version 1.0 (EPL), with the following special exception: |
| 5 | // |
| 6 | // LOXI Exception |
| 7 | // |
| 8 | // As a special exception to the terms of the EPL, you may |
| 9 | // distribute libraries generated by LoxiGen (LoxiGen Libraries) |
| 10 | // under the terms of your choice, provided that copyright and |
| 11 | // licensing notices generated by LoxiGen are not altered or removed |
| 12 | // from the LoxiGen Libraries and the notice provided below is (i) |
| 13 | // included in the LoxiGen Libraries, if distributed in source code |
| 14 | // form and (ii) included in any documentation for the LoxiGen |
| 15 | // Libraries, if distributed in binary form. |
| 16 | // |
| 17 | // Notice: "Copyright 2013, Big Switch Networks, Inc. |
| 18 | // This library was generated by the LoxiGen Compiler." |
| 19 | // |
| 20 | // You may not use this file except in compliance with the EPL or |
| 21 | // LOXI Exception. You may obtain a copy of the EPL at: |
| 22 | // |
| 23 | // http://www.eclipse.org/legal/epl-v10.html |
| 24 | // |
| 25 | // Unless required by applicable law or agreed to in writing, |
| 26 | // software distributed under the License is distributed on an "AS |
| 27 | // IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 28 | // express or implied. See the EPL for the specific language |
| 29 | // governing permissions and limitations under the EPL. |
| 30 | |
| 31 | #version 4 |
Rich Lane | 4b1d8f4 | 2014-10-31 15:25:14 -0700 | [diff] [blame] | 32 | #version 5 |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 33 | |
| 34 | struct of_bsn_tlv_port : of_bsn_tlv { |
| 35 | uint16_t type == 0; |
| 36 | uint16_t length; |
| 37 | of_port_no_t value; |
| 38 | }; |
| 39 | |
| 40 | struct of_bsn_tlv_mac : of_bsn_tlv { |
| 41 | uint16_t type == 1; |
| 42 | uint16_t length; |
| 43 | of_mac_addr_t value; |
| 44 | }; |
| 45 | |
| 46 | struct of_bsn_tlv_rx_packets : of_bsn_tlv { |
| 47 | uint16_t type == 2; |
| 48 | uint16_t length; |
| 49 | uint64_t value; |
| 50 | }; |
| 51 | |
| 52 | struct of_bsn_tlv_tx_packets : of_bsn_tlv { |
| 53 | uint16_t type == 3; |
| 54 | uint16_t length; |
| 55 | uint64_t value; |
| 56 | }; |
Rich Lane | e052b08 | 2014-01-03 16:43:15 -0800 | [diff] [blame] | 57 | |
| 58 | struct of_bsn_tlv_ipv4 : of_bsn_tlv { |
| 59 | uint16_t type == 4; |
| 60 | uint16_t length; |
| 61 | of_ipv4_t value; |
| 62 | }; |
| 63 | |
| 64 | struct of_bsn_tlv_idle_time : of_bsn_tlv { |
| 65 | uint16_t type == 5; |
| 66 | uint16_t length; |
| 67 | uint64_t value; /* Milliseconds */ |
| 68 | }; |
| 69 | |
| 70 | struct of_bsn_tlv_vlan_vid : of_bsn_tlv { |
| 71 | uint16_t type == 6; |
| 72 | uint16_t length; |
| 73 | uint16_t value; |
| 74 | }; |
| 75 | |
| 76 | struct of_bsn_tlv_idle_notification : of_bsn_tlv { |
| 77 | uint16_t type == 7; |
| 78 | uint16_t length; |
| 79 | }; |
Rich Lane | a125845 | 2014-01-24 14:25:00 -0800 | [diff] [blame] | 80 | |
| 81 | struct of_bsn_tlv_idle_timeout : of_bsn_tlv { |
| 82 | uint16_t type == 8; |
| 83 | uint16_t length; |
| 84 | uint32_t value; /* Milliseconds */ |
| 85 | }; |
| 86 | |
| 87 | struct of_bsn_tlv_unicast_query_timeout : of_bsn_tlv { |
| 88 | uint16_t type == 9; |
| 89 | uint16_t length; |
| 90 | uint32_t value; /* Milliseconds */ |
| 91 | }; |
| 92 | |
| 93 | struct of_bsn_tlv_broadcast_query_timeout : of_bsn_tlv { |
| 94 | uint16_t type == 10; |
| 95 | uint16_t length; |
| 96 | uint32_t value; /* Milliseconds */ |
| 97 | }; |
| 98 | |
| 99 | struct of_bsn_tlv_request_packets : of_bsn_tlv { |
| 100 | uint16_t type == 11; |
| 101 | uint16_t length; |
| 102 | uint64_t value; |
| 103 | }; |
| 104 | |
| 105 | struct of_bsn_tlv_reply_packets : of_bsn_tlv { |
| 106 | uint16_t type == 12; |
| 107 | uint16_t length; |
| 108 | uint64_t value; |
| 109 | }; |
| 110 | |
| 111 | struct of_bsn_tlv_miss_packets : of_bsn_tlv { |
| 112 | uint16_t type == 13; |
| 113 | uint16_t length; |
| 114 | uint64_t value; |
| 115 | }; |
Duc Pham | 9d29ed0 | 2014-01-30 16:23:16 -0800 | [diff] [blame] | 116 | |
| 117 | struct of_bsn_tlv_circuit_id : of_bsn_tlv { |
| 118 | uint16_t type == 14; |
| 119 | uint16_t length; |
| 120 | of_octets_t value; |
| 121 | }; |
Rich Lane | 5151f77 | 2014-03-20 15:32:33 -0700 | [diff] [blame] | 122 | |
| 123 | struct of_bsn_tlv_udf_id : of_bsn_tlv { |
| 124 | uint16_t type == 15; |
| 125 | uint16_t length; |
| 126 | uint16_t value; |
| 127 | }; |
| 128 | |
| 129 | enum ofp_bsn_udf_anchor(wire_type=uint16_t) { |
| 130 | OFP_BSN_UDF_ANCHOR_PACKET_START = 0, |
| 131 | OFP_BSN_UDF_ANCHOR_L3_HEADER_START = 1, |
| 132 | OFP_BSN_UDF_ANCHOR_L4_HEADER_START = 2, |
| 133 | }; |
| 134 | |
| 135 | struct of_bsn_tlv_udf_anchor : of_bsn_tlv { |
| 136 | uint16_t type == 16; |
| 137 | uint16_t length; |
| 138 | enum ofp_bsn_udf_anchor value; |
| 139 | }; |
| 140 | |
| 141 | struct of_bsn_tlv_udf_offset : of_bsn_tlv { |
| 142 | uint16_t type == 17; |
| 143 | uint16_t length; |
| 144 | uint16_t value; |
| 145 | }; |
| 146 | |
| 147 | struct of_bsn_tlv_udf_length : of_bsn_tlv { |
| 148 | uint16_t type == 18; |
| 149 | uint16_t length; |
| 150 | uint16_t value; |
| 151 | }; |
Duc Pham | d07e637 | 2014-04-01 17:54:15 -0700 | [diff] [blame] | 152 | |
Duc Pham | abe23a4 | 2014-04-02 10:39:34 -0700 | [diff] [blame] | 153 | struct of_bsn_tlv_vrf : of_bsn_tlv { |
Duc Pham | d07e637 | 2014-04-01 17:54:15 -0700 | [diff] [blame] | 154 | uint16_t type == 19; |
| 155 | uint16_t length; |
Duc Pham | 48f997f | 2014-04-02 14:48:19 -0700 | [diff] [blame] | 156 | uint32_t value; |
Duc Pham | d07e637 | 2014-04-01 17:54:15 -0700 | [diff] [blame] | 157 | }; |
Duc Pham | 11b1b9d | 2014-05-07 16:56:59 -0700 | [diff] [blame] | 158 | |
| 159 | struct of_bsn_tlv_queue_id : of_bsn_tlv { |
| 160 | uint16_t type == 20; |
| 161 | uint16_t length; |
| 162 | uint32_t value; |
| 163 | }; |
| 164 | |
| 165 | struct of_bsn_tlv_queue_weight : of_bsn_tlv { |
| 166 | uint16_t type == 21; |
| 167 | uint16_t length; |
| 168 | uint32_t value; |
| 169 | }; |
Wilson Ng | 60e38ab | 2014-05-20 19:24:12 -0700 | [diff] [blame] | 170 | |
Wilson Ng | 7c45cd5 | 2014-05-21 10:45:27 -0700 | [diff] [blame] | 171 | struct of_bsn_tlv_crc_enabled : of_bsn_tlv { |
Wilson Ng | 60e38ab | 2014-05-20 19:24:12 -0700 | [diff] [blame] | 172 | uint16_t type == 22; |
| 173 | uint16_t length; |
Wilson Ng | 7c45cd5 | 2014-05-21 10:45:27 -0700 | [diff] [blame] | 174 | uint8_t value; |
Wilson Ng | 60e38ab | 2014-05-20 19:24:12 -0700 | [diff] [blame] | 175 | }; |
Rich Lane | 85b94e8 | 2014-09-24 13:24:53 -0700 | [diff] [blame] | 176 | |
| 177 | struct of_bsn_tlv_external_ip : of_bsn_tlv { |
| 178 | uint16_t type == 23; |
| 179 | uint16_t length; |
| 180 | of_ipv4_t value; |
| 181 | }; |
| 182 | |
| 183 | struct of_bsn_tlv_external_mac : of_bsn_tlv { |
| 184 | uint16_t type == 24; |
| 185 | uint16_t length; |
| 186 | of_mac_addr_t value; |
| 187 | }; |
| 188 | |
| 189 | struct of_bsn_tlv_external_netmask : of_bsn_tlv { |
| 190 | uint16_t type == 25; |
| 191 | uint16_t length; |
| 192 | of_ipv4_t value; |
| 193 | }; |
| 194 | |
| 195 | struct of_bsn_tlv_external_gateway_ip : of_bsn_tlv { |
| 196 | uint16_t type == 26; |
| 197 | uint16_t length; |
| 198 | of_ipv4_t value; |
| 199 | }; |
| 200 | |
| 201 | struct of_bsn_tlv_internal_mac : of_bsn_tlv { |
| 202 | uint16_t type == 27; |
| 203 | uint16_t length; |
| 204 | of_mac_addr_t value; |
| 205 | }; |
| 206 | |
| 207 | struct of_bsn_tlv_internal_gateway_mac : of_bsn_tlv { |
| 208 | uint16_t type == 28; |
| 209 | uint16_t length; |
| 210 | of_mac_addr_t value; |
| 211 | }; |
Rich Lane | b9ccfa1 | 2014-10-01 16:25:12 -0700 | [diff] [blame] | 212 | |
| 213 | struct of_bsn_tlv_external_gateway_mac : of_bsn_tlv { |
| 214 | uint16_t type == 29; |
| 215 | uint16_t length; |
| 216 | of_mac_addr_t value; |
| 217 | }; |
Harshmeet Singh | de7aed9 | 2014-10-06 13:09:40 -0700 | [diff] [blame] | 218 | |
| 219 | struct of_bsn_tlv_sampling_rate : of_bsn_tlv { |
| 220 | uint16_t type == 30; |
| 221 | uint16_t length; |
| 222 | uint32_t value; |
| 223 | }; |
| 224 | |
| 225 | struct of_bsn_tlv_header_size : of_bsn_tlv { |
| 226 | uint16_t type == 31; |
| 227 | uint16_t length; |
| 228 | uint32_t value; /* bytes */ |
| 229 | }; |
| 230 | |
| 231 | struct of_bsn_tlv_eth_src : of_bsn_tlv { |
| 232 | uint16_t type == 32; |
| 233 | uint16_t length; |
| 234 | of_mac_addr_t value; |
| 235 | }; |
| 236 | |
| 237 | struct of_bsn_tlv_eth_dst : of_bsn_tlv { |
| 238 | uint16_t type == 33; |
| 239 | uint16_t length; |
| 240 | of_mac_addr_t value; |
| 241 | }; |
| 242 | |
| 243 | struct of_bsn_tlv_ipv4_src : of_bsn_tlv { |
| 244 | uint16_t type == 34; |
| 245 | uint16_t length; |
| 246 | of_ipv4_t value; |
| 247 | }; |
| 248 | |
| 249 | struct of_bsn_tlv_ipv4_dst : of_bsn_tlv { |
| 250 | uint16_t type == 35; |
| 251 | uint16_t length; |
| 252 | of_ipv4_t value; |
| 253 | }; |
| 254 | |
| 255 | struct of_bsn_tlv_udp_src : of_bsn_tlv { |
| 256 | uint16_t type == 36; |
| 257 | uint16_t length; |
| 258 | uint16_t value; |
| 259 | }; |
| 260 | |
| 261 | struct of_bsn_tlv_udp_dst : of_bsn_tlv { |
| 262 | uint16_t type == 37; |
| 263 | uint16_t length; |
| 264 | uint16_t value; |
| 265 | }; |
| 266 | |
| 267 | struct of_bsn_tlv_sub_agent_id : of_bsn_tlv { |
| 268 | uint16_t type == 38; |
| 269 | uint16_t length; |
| 270 | uint32_t value; |
| 271 | }; |
| 272 | |
| 273 | struct of_bsn_tlv_tx_bytes : of_bsn_tlv { |
| 274 | uint16_t type == 39; |
| 275 | uint16_t length; |
| 276 | uint64_t value; |
| 277 | }; |
Harshmeet Singh | c1f2a39 | 2014-10-10 18:15:11 -0700 | [diff] [blame] | 278 | |
Harshmeet Singh | 23fb16a | 2014-10-14 12:32:46 -0700 | [diff] [blame] | 279 | struct of_bsn_tlv_actor_system_priority: of_bsn_tlv { |
Harshmeet Singh | c1f2a39 | 2014-10-10 18:15:11 -0700 | [diff] [blame] | 280 | uint16_t type == 40; |
| 281 | uint16_t length; |
| 282 | uint16_t value; |
| 283 | }; |
| 284 | |
Harshmeet Singh | 23fb16a | 2014-10-14 12:32:46 -0700 | [diff] [blame] | 285 | struct of_bsn_tlv_actor_system_mac: of_bsn_tlv { |
Harshmeet Singh | c1f2a39 | 2014-10-10 18:15:11 -0700 | [diff] [blame] | 286 | uint16_t type == 41; |
| 287 | uint16_t length; |
| 288 | of_mac_addr_t value; |
| 289 | }; |
| 290 | |
Harshmeet Singh | 23fb16a | 2014-10-14 12:32:46 -0700 | [diff] [blame] | 291 | struct of_bsn_tlv_actor_port_priority: of_bsn_tlv { |
Harshmeet Singh | c1f2a39 | 2014-10-10 18:15:11 -0700 | [diff] [blame] | 292 | uint16_t type == 42; |
| 293 | uint16_t length; |
| 294 | uint16_t value; |
| 295 | }; |
| 296 | |
Harshmeet Singh | 23fb16a | 2014-10-14 12:32:46 -0700 | [diff] [blame] | 297 | struct of_bsn_tlv_actor_port_num: of_bsn_tlv { |
Harshmeet Singh | c1f2a39 | 2014-10-10 18:15:11 -0700 | [diff] [blame] | 298 | uint16_t type == 43; |
| 299 | uint16_t length; |
| 300 | uint16_t value; |
| 301 | }; |
| 302 | |
Harshmeet Singh | 23fb16a | 2014-10-14 12:32:46 -0700 | [diff] [blame] | 303 | struct of_bsn_tlv_actor_key: of_bsn_tlv { |
Harshmeet Singh | c1f2a39 | 2014-10-10 18:15:11 -0700 | [diff] [blame] | 304 | uint16_t type == 44; |
| 305 | uint16_t length; |
| 306 | uint16_t value; |
| 307 | }; |
| 308 | |
| 309 | struct of_bsn_tlv_convergence_status: of_bsn_tlv { |
| 310 | uint16_t type == 45; |
| 311 | uint16_t length; |
| 312 | uint8_t value; |
| 313 | }; |
Harshmeet Singh | 23fb16a | 2014-10-14 12:32:46 -0700 | [diff] [blame] | 314 | |
| 315 | struct of_bsn_tlv_partner_system_priority: of_bsn_tlv { |
| 316 | uint16_t type == 47; |
| 317 | uint16_t length; |
| 318 | uint16_t value; |
| 319 | }; |
| 320 | |
| 321 | struct of_bsn_tlv_partner_system_mac: of_bsn_tlv { |
| 322 | uint16_t type == 48; |
| 323 | uint16_t length; |
| 324 | of_mac_addr_t value; |
| 325 | }; |
| 326 | |
| 327 | struct of_bsn_tlv_partner_port_priority: of_bsn_tlv { |
| 328 | uint16_t type == 49; |
| 329 | uint16_t length; |
| 330 | uint16_t value; |
| 331 | }; |
| 332 | |
| 333 | struct of_bsn_tlv_partner_port_num: of_bsn_tlv { |
| 334 | uint16_t type == 50; |
| 335 | uint16_t length; |
| 336 | uint16_t value; |
| 337 | }; |
| 338 | |
| 339 | struct of_bsn_tlv_partner_key: of_bsn_tlv { |
| 340 | uint16_t type == 51; |
| 341 | uint16_t length; |
| 342 | uint16_t value; |
| 343 | }; |
Rich Lane | 991b9ff | 2014-10-17 12:30:44 -0700 | [diff] [blame] | 344 | |
| 345 | struct of_bsn_tlv_name : of_bsn_tlv { |
| 346 | uint16_t type == 52; |
| 347 | uint16_t length; |
| 348 | of_octets_t value; /* UTF-8 encoded. Not null terminated. */ |
| 349 | }; |
Harshmeet Singh | 24ab88f | 2014-10-27 15:28:27 -0700 | [diff] [blame] | 350 | |
Harshmeet Singh | 7913562 | 2014-10-27 16:11:14 -0700 | [diff] [blame] | 351 | enum ofp_bsn_lacp_state(wire_type=uint8_t, bitmask=True) { |
| 352 | OFP_BSN_LACP_STATE_ACTIVITY = 0x01, |
| 353 | OFP_BSN_LACP_STATE_TIMEOUT = 0x02, |
| 354 | OFP_BSN_LACP_STATE_AGGREGATION = 0x04, |
| 355 | OFP_BSN_LACP_STATE_SYNCHRONIZATION = 0x08, |
| 356 | OFP_BSN_LACP_STATE_COLLECTING = 0x10, |
| 357 | OFP_BSN_LACP_STATE_DISTRIBUTING = 0x20, |
| 358 | OFP_BSN_LACP_STATE_DEFAULTED = 0x40, |
| 359 | OFP_BSN_LACP_STATE_EXPIRED = 0x80, |
| 360 | }; |
| 361 | |
Harshmeet Singh | 24ab88f | 2014-10-27 15:28:27 -0700 | [diff] [blame] | 362 | struct of_bsn_tlv_actor_state: of_bsn_tlv { |
| 363 | uint16_t type == 53; |
| 364 | uint16_t length; |
Harshmeet Singh | 7913562 | 2014-10-27 16:11:14 -0700 | [diff] [blame] | 365 | enum ofp_bsn_lacp_state value; |
Harshmeet Singh | 24ab88f | 2014-10-27 15:28:27 -0700 | [diff] [blame] | 366 | }; |
| 367 | |
| 368 | struct of_bsn_tlv_partner_state: of_bsn_tlv { |
| 369 | uint16_t type == 54; |
| 370 | uint16_t length; |
Harshmeet Singh | 7913562 | 2014-10-27 16:11:14 -0700 | [diff] [blame] | 371 | enum ofp_bsn_lacp_state value; |
Harshmeet Singh | 24ab88f | 2014-10-27 15:28:27 -0700 | [diff] [blame] | 372 | }; |
Rich Lane | d353d24 | 2014-11-05 10:11:19 -0800 | [diff] [blame] | 373 | |
| 374 | struct of_bsn_tlv_data : of_bsn_tlv { |
| 375 | uint16_t type == 55; |
| 376 | uint16_t length; |
| 377 | of_octets_t value; |
| 378 | }; |
Wilson Ng | 453c73a | 2014-11-05 11:35:36 -0800 | [diff] [blame] | 379 | |
Wilson Ng | 6e6da30 | 2014-11-05 11:57:47 -0800 | [diff] [blame] | 380 | struct of_bsn_tlv_mac_mask : of_bsn_tlv { |
Wilson Ng | 453c73a | 2014-11-05 11:35:36 -0800 | [diff] [blame] | 381 | uint16_t type == 56; |
| 382 | uint16_t length; |
| 383 | of_mac_addr_t value; |
| 384 | }; |
| 385 | |
Wilson Ng | 6e6da30 | 2014-11-05 11:57:47 -0800 | [diff] [blame] | 386 | struct of_bsn_tlv_priority : of_bsn_tlv { |
Wilson Ng | 453c73a | 2014-11-05 11:35:36 -0800 | [diff] [blame] | 387 | uint16_t type == 57; |
| 388 | uint16_t length; |
Wilson Ng | 0a2406a | 2014-11-05 14:01:51 -0800 | [diff] [blame] | 389 | uint32_t value; |
Wilson Ng | 453c73a | 2014-11-05 11:35:36 -0800 | [diff] [blame] | 390 | }; |
Harshmeet Singh | 6086fee | 2014-11-20 11:03:46 -0800 | [diff] [blame] | 391 | |
| 392 | struct of_bsn_tlv_interval : of_bsn_tlv { |
| 393 | uint16_t type == 58; |
| 394 | uint16_t length; |
Harshmeet Singh | c717bc0 | 2014-11-20 12:51:38 -0800 | [diff] [blame] | 395 | uint32_t value; /* Milliseconds */ |
Harshmeet Singh | 6086fee | 2014-11-20 11:03:46 -0800 | [diff] [blame] | 396 | }; |