Rich Lane | 7b49e3b | 2014-02-05 13:44:03 -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 | 7b49e3b | 2014-02-05 13:44:03 -0800 | [diff] [blame] | 33 | |
| 34 | // Retrieves the checksum for every bucket in a table. The entries are ordered |
| 35 | // by bucket index. |
| 36 | // |
Rich Lane | 7f6288b | 2014-06-30 17:23:59 -0700 | [diff] [blame] | 37 | // The checksum of a bucket is the sum of the cookies of all entries in the |
Rich Lane | 7b49e3b | 2014-02-05 13:44:03 -0800 | [diff] [blame] | 38 | // bucket. Flows are bucketed based on a prefix of the cookie. |
| 39 | struct of_bsn_flow_checksum_bucket_stats_request : of_bsn_stats_request { |
| 40 | uint8_t version; |
| 41 | uint8_t type == 18; |
| 42 | uint16_t length; |
| 43 | uint32_t xid; |
| 44 | uint16_t stats_type == 0xffff; |
| 45 | enum ofp_stats_request_flags flags; |
| 46 | pad(4); |
| 47 | uint32_t experimenter == 0x5c16c7; |
| 48 | uint32_t subtype == 10; |
| 49 | uint8_t table_id; |
| 50 | }; |
| 51 | |
| 52 | struct of_bsn_flow_checksum_bucket_stats_entry { |
| 53 | uint64_t checksum; |
| 54 | }; |
| 55 | |
| 56 | struct of_bsn_flow_checksum_bucket_stats_reply : of_bsn_stats_reply { |
| 57 | uint8_t version; |
| 58 | uint8_t type == 19; |
| 59 | uint16_t length; |
| 60 | uint32_t xid; |
| 61 | uint16_t stats_type == 0xffff; |
| 62 | enum ofp_stats_reply_flags flags; |
| 63 | pad(4); |
| 64 | uint32_t experimenter == 0x5c16c7; |
| 65 | uint32_t subtype == 10; |
| 66 | list(of_bsn_flow_checksum_bucket_stats_entry_t) entries; |
| 67 | }; |
| 68 | |
| 69 | |
| 70 | // Retrieves the checksum for every table. |
| 71 | // |
Rich Lane | 7f6288b | 2014-06-30 17:23:59 -0700 | [diff] [blame] | 72 | // The checksum of a table is the sum of the cookies of all entries in the |
Rich Lane | 7b49e3b | 2014-02-05 13:44:03 -0800 | [diff] [blame] | 73 | // table. |
| 74 | struct of_bsn_table_checksum_stats_request : of_bsn_stats_request { |
| 75 | uint8_t version; |
| 76 | uint8_t type == 18; |
| 77 | uint16_t length; |
| 78 | uint32_t xid; |
| 79 | uint16_t stats_type == 0xffff; |
| 80 | enum ofp_stats_request_flags flags; |
| 81 | pad(4); |
| 82 | uint32_t experimenter == 0x5c16c7; |
| 83 | uint32_t subtype == 11; |
| 84 | }; |
| 85 | |
| 86 | struct of_bsn_table_checksum_stats_entry { |
| 87 | uint8_t table_id; |
| 88 | uint64_t checksum; |
| 89 | }; |
| 90 | |
| 91 | struct of_bsn_table_checksum_stats_reply : of_bsn_stats_reply { |
| 92 | uint8_t version; |
| 93 | uint8_t type == 19; |
| 94 | uint16_t length; |
| 95 | uint32_t xid; |
| 96 | uint16_t stats_type == 0xffff; |
| 97 | enum ofp_stats_reply_flags flags; |
| 98 | pad(4); |
| 99 | uint32_t experimenter == 0x5c16c7; |
| 100 | uint32_t subtype == 11; |
| 101 | list(of_bsn_table_checksum_stats_entry_t) entries; |
| 102 | }; |
| 103 | |
| 104 | |
| 105 | // This message sets the size of the buckets array. The switch may reject this |
| 106 | // message if the table has entries. buckets_size must be a power of 2. |
| 107 | struct of_bsn_table_set_buckets_size : of_bsn_header { |
| 108 | uint8_t version; |
| 109 | uint8_t type == 4; |
| 110 | uint16_t length; |
| 111 | uint32_t xid; |
| 112 | uint32_t experimenter == 0x5c16c7; |
| 113 | uint32_t subtype == 61; |
Rich Lane | 2a66845 | 2014-06-09 17:14:26 -0700 | [diff] [blame] | 114 | pad(1); |
| 115 | uint8_t table_id; |
Rich Lane | 7b49e3b | 2014-02-05 13:44:03 -0800 | [diff] [blame] | 116 | pad(2); |
| 117 | uint32_t buckets_size; |
| 118 | }; |