Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 1 | # Copyright 2013, Big Switch Networks, Inc. |
| 2 | # |
| 3 | # LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with |
| 4 | # the following special exception: |
| 5 | # |
| 6 | # LOXI Exception |
| 7 | # |
| 8 | # As a special exception to the terms of the EPL, you may distribute libraries |
| 9 | # generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided |
| 10 | # that copyright and licensing notices generated by LoxiGen are not altered or removed |
| 11 | # from the LoxiGen Libraries and the notice provided below is (i) included in |
| 12 | # the LoxiGen Libraries, if distributed in source code form and (ii) included in any |
| 13 | # documentation for the LoxiGen Libraries, if distributed in binary form. |
| 14 | # |
| 15 | # Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler." |
| 16 | # |
| 17 | # You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain |
| 18 | # a copy of the EPL at: |
| 19 | # |
| 20 | # http://www.eclipse.org/legal/epl-v10.html |
| 21 | # |
| 22 | # Unless required by applicable law or agreed to in writing, software |
| 23 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 24 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 25 | # EPL for the specific language governing permissions and limitations |
| 26 | # under the EPL. |
| 27 | |
| 28 | ## |
| 29 | # @brief Global data structs for LOXI code generation |
| 30 | # |
| 31 | # @fixme This needs to be refactored and brought into the 21st century. |
| 32 | # |
| 33 | |
Rich Lane | f1a8984 | 2014-10-12 10:04:13 -0700 | [diff] [blame] | 34 | import loxi_globals |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 35 | |
| 36 | ################################################################ |
| 37 | # |
| 38 | # Configuration global parameters |
| 39 | # |
| 40 | ################################################################ |
| 41 | |
| 42 | ## |
| 43 | # The map from wire protocol to enum identifier generated from input |
| 44 | # This is built from the version-specific structs file info. |
| 45 | # @fixme This should go away when the process structs file is updated |
| 46 | wire_ver_map = {} |
| 47 | |
| 48 | ## |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 49 | # The list of wire versions which are to be supported |
| 50 | target_version_list = [] |
| 51 | |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 52 | ## |
| 53 | # The dictionary of config variables related to code |
| 54 | # |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 55 | # @param use_obj_id Use object IDs in struct defns CURRENTLY NOT SUPPORTED |
Andreas Wundsam | 5325616 | 2013-05-02 14:05:53 -0700 | [diff] [blame] | 56 | # |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 57 | # @param return_base_types For 'get' accessors, return values when possible. |
| 58 | # Otherwise all values are returned thru a call by variable parameter |
| 59 | # |
| 60 | # @param use_static_inlines Generate low level accessors as static inline |
| 61 | # and put them in header files rather than .c files. |
| 62 | # |
| 63 | # @param copy_semantics One of "read", "write" or "grow". This defines the |
| 64 | # way that buffer references are managed. Currently on "read" is supported. |
| 65 | # |
| 66 | # @param encode_typedefs Use object and member IDs (rather than names) |
| 67 | # when generating the names used for accessor function typedefs |
| 68 | # |
Andreas Wundsam | 5325616 | 2013-05-02 14:05:53 -0700 | [diff] [blame] | 69 | # @param get_returns One of "error", "value", or "void"; |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 70 | # CURRENTLY ONLY "error" IS SUPPORTED. "error" means |
| 71 | # all get operations return an error code. "value" means return a base_type |
| 72 | # value when possible or void if not. "void" means always return void |
| 73 | # and use a call-by-variable parameter |
| 74 | # |
| 75 | |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 76 | ## These members do not get normal accessors |
| 77 | |
Rob Vaterlaus | b3f49d9 | 2013-10-01 17:57:31 -0700 | [diff] [blame] | 78 | skip_members = ["version", "type", "length", "err_type", "stats_type", "len", |
Rich Lane | 713d928 | 2013-12-30 15:21:35 -0800 | [diff] [blame] | 79 | "type_len", "actions_len", "_command", "command", "key_length"] |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 80 | |
| 81 | ## Some OpenFlow string length constants |
| 82 | # |
| 83 | # These are a few length constants needed for array processing |
| 84 | ofp_constants = dict( |
| 85 | OF_MAX_TABLE_NAME_LEN = 32, |
| 86 | OF_MAX_PORT_NAME_LEN = 16, |
| 87 | OF_ETH_ALEN = 6, |
| 88 | OF_DESC_STR_LEN = 256, |
Praseed Balakrishnan | 7f71878 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 89 | OF_SERIAL_NUM_LEN = 32, |
| 90 | OF_APP_CODE_LEN = 15, |
Praseed Balakrishnan | 2ed6da0 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 91 | OF_SIGID_LEN=6, |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 92 | ) |
| 93 | |
| 94 | ## List of mixed data types |
| 95 | # |
| 96 | # This is a list of data types which require special treatment |
| 97 | # because the underlying datatype has changed between versions. |
| 98 | # The main example is port which went from 16 to 32 bits. We |
| 99 | # define per-version accessors for these types and those are |
| 100 | # used in place of the normal ones. |
| 101 | # |
| 102 | # The wire protocol number is used to identify versions. For now, |
| 103 | # the value is the name of the type to use for that version |
| 104 | # |
| 105 | # This is the map between the external type (like of_port_no_t) |
Andreas Wundsam | 5325616 | 2013-05-02 14:05:53 -0700 | [diff] [blame] | 106 | # which is used by customers of this code and the internal |
| 107 | # datatypes (like uint16_t) that appear on the wire for a |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 108 | # particular version. |
| 109 | # |
| 110 | of_mixed_types = dict( |
| 111 | of_port_no_t = { |
| 112 | 1: "uint16_t", |
| 113 | 2: "uint32_t", |
| 114 | 3: "uint32_t", |
| 115 | 4: "uint32_t", |
Rich Lane | 2dd1701 | 2014-10-16 09:55:10 -0700 | [diff] [blame] | 116 | 5: "uint32_t", |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 117 | "short_name":"port_no" |
| 118 | }, |
| 119 | of_port_desc_t = { |
| 120 | 1: "of_port_desc_t", |
| 121 | 2: "of_port_desc_t", |
| 122 | 3: "of_port_desc_t", |
| 123 | 4: "of_port_desc_t", |
Rich Lane | 2dd1701 | 2014-10-16 09:55:10 -0700 | [diff] [blame] | 124 | 5: "of_port_desc_t", |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 125 | "short_name":"port_desc" |
| 126 | }, |
Dan Talayco | c0e802e | 2013-05-18 23:52:39 -0700 | [diff] [blame] | 127 | of_bsn_vport_t = { |
| 128 | 1: "of_bsn_vport_t", |
| 129 | 2: "of_bsn_vport_t", |
| 130 | 3: "of_bsn_vport_t", |
| 131 | 4: "of_bsn_vport_t", |
Rich Lane | 2dd1701 | 2014-10-16 09:55:10 -0700 | [diff] [blame] | 132 | 5: "of_bsn_vport_t", |
Dan Talayco | c0e802e | 2013-05-18 23:52:39 -0700 | [diff] [blame] | 133 | "short_name":"bsn_vport" |
| 134 | }, |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 135 | of_fm_cmd_t = { # Flow mod command went from u16 to u8 |
| 136 | 1: "uint16_t", |
| 137 | 2: "uint8_t", |
| 138 | 3: "uint8_t", |
| 139 | 4: "uint8_t", |
Rich Lane | 2dd1701 | 2014-10-16 09:55:10 -0700 | [diff] [blame] | 140 | 5: "uint8_t", |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 141 | "short_name":"fm_cmd" |
| 142 | }, |
| 143 | of_wc_bmap_t = { # Wildcard bitmap |
| 144 | 1: "uint32_t", |
| 145 | 2: "uint32_t", |
| 146 | 3: "uint64_t", |
| 147 | 4: "uint64_t", |
Rich Lane | 2dd1701 | 2014-10-16 09:55:10 -0700 | [diff] [blame] | 148 | 5: "uint64_t", |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 149 | "short_name":"wc_bmap" |
| 150 | }, |
| 151 | of_match_bmap_t = { # Match bitmap |
| 152 | 1: "uint32_t", |
| 153 | 2: "uint32_t", |
| 154 | 3: "uint64_t", |
| 155 | 4: "uint64_t", |
Rich Lane | 2dd1701 | 2014-10-16 09:55:10 -0700 | [diff] [blame] | 156 | 5: "uint64_t", |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 157 | "short_name":"match_bmap" |
| 158 | }, |
| 159 | of_match_t = { # Match object |
| 160 | 1: "of_match_v1_t", |
| 161 | 2: "of_match_v2_t", |
| 162 | 3: "of_match_v3_t", |
| 163 | 4: "of_match_v3_t", # Currently uses same match as 1.2 (v3). |
Rich Lane | 2dd1701 | 2014-10-16 09:55:10 -0700 | [diff] [blame] | 164 | 5: "of_match_v3_t", # Currently uses same match as 1.2 (v3). |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 165 | "short_name":"match" |
| 166 | }, |
Marc De Leenheer | 88c0bcb | 2015-07-24 15:49:19 -0700 | [diff] [blame] | 167 | of_calient_port_desc_stats_entry_t = { |
| 168 | 1: "of_calient_port_desc_stats_entry_t", |
| 169 | 2: "of_calient_port_desc_stats_entry_t", |
| 170 | 3: "of_calient_port_desc_stats_entry_t", |
| 171 | 4: "of_calient_port_desc_stats_entry_t", |
| 172 | 5: "of_calient_port_desc_stats_entry_t", |
| 173 | "short_name":"calient_port_desc_stats_entry" |
| 174 | }, |
Brian O'Connor | a259e3f | 2015-09-03 15:17:18 -0700 | [diff] [blame] | 175 | of_odu_sig_id_t = { |
| 176 | 1: "of_odu_sig_id_t", |
| 177 | 2: "of_odu_sig_id_t", |
| 178 | 3: "of_odu_sig_id_t", |
| 179 | 4: "of_odu_sig_id_t", |
| 180 | 5: "of_odu_sig_id_t", |
| 181 | "short_name":"odu_sig_id" |
| 182 | }, |
| 183 | of_och_sig_id_t = { |
| 184 | 1: "of_sig_id_t", |
| 185 | 2: "of_sig_id_t", |
| 186 | 3: "of_sig_id_t", |
| 187 | 4: "of_sig_id_t", |
| 188 | 5: "of_sig_id_t", |
| 189 | "short_name":"sig_id" |
| 190 | }, |
Marc De Leenheer | 88c0bcb | 2015-07-24 15:49:19 -0700 | [diff] [blame] | 191 | |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 192 | ) |
| 193 | |
| 194 | ## Base data types |
| 195 | # |
| 196 | # The basic types; Value is a list: bytes, to_wire, from_wire |
| 197 | # The accessors deal with endian, alignment and any other host/network |
| 198 | # considerations. These are common across all versions |
| 199 | # |
| 200 | # For get accessors, assume we memcpy from wire buf and then apply ntoh |
| 201 | # For set accessors, assume we apply hton and then memcpy to wire buf |
| 202 | # |
| 203 | # to/from wire functions take a pointer to class and change in place |
| 204 | of_base_types = dict( |
| 205 | char = dict(bytes=1, use_as_rv=1, short_name="char"), |
| 206 | uint8_t = dict(bytes=1, use_as_rv=1, short_name="u8"), |
| 207 | uint16_t = dict(bytes=2, to_w="u16_hton", from_w="u16_ntoh", use_as_rv=1, |
| 208 | short_name="u16"), |
| 209 | uint32_t = dict(bytes=4, to_w="u32_hton", from_w="u32_ntoh", use_as_rv=1, |
| 210 | short_name="u32"), |
| 211 | uint64_t = dict(bytes=8, to_w="u64_hton", from_w="u64_ntoh", use_as_rv=1, |
| 212 | short_name="u64"), |
| 213 | # of_cookie_t = dict(bytes=8, to_w="u64_hton", from_w="u64_ntoh", use_as_rv=1#, |
| 214 | # short_name="cookie"), |
| 215 | # of_counter_t = dict(bytes=8, to_w="u64_hton", from_w="u64_ntoh", use_as_rv=1, |
| 216 | # short_name="counter"), |
| 217 | of_mac_addr_t = dict(bytes=6, short_name="mac"), |
Andreas Wundsam | b566a16 | 2013-07-18 19:30:23 -0700 | [diff] [blame] | 218 | of_ipv4_t = dict(bytes=4, short_name="ipv4"), |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 219 | of_ipv6_t = dict(bytes=16, short_name="ipv6"), |
| 220 | of_port_name_t = dict(bytes=ofp_constants["OF_MAX_PORT_NAME_LEN"], |
| 221 | short_name="port_name"), |
| 222 | of_table_name_t = dict(bytes=ofp_constants["OF_MAX_TABLE_NAME_LEN"], |
| 223 | short_name="tab_name"), |
| 224 | of_desc_str_t = dict(bytes=ofp_constants["OF_DESC_STR_LEN"], |
| 225 | short_name="desc_str"), |
| 226 | of_serial_num_t = dict(bytes=ofp_constants["OF_SERIAL_NUM_LEN"], |
| 227 | short_name="ser_num"), |
Rich Lane | f8a3d00 | 2014-03-19 13:33:52 -0700 | [diff] [blame] | 228 | of_str64_t = dict(bytes=64, short_name="str64"), |
Brian O'Connor | 58a73e3 | 2015-05-28 11:51:27 -0700 | [diff] [blame] | 229 | of_str32_t = dict(bytes=32, short_name="str32"), |
| 230 | of_str6_t = dict(bytes=6, short_name="str6"), |
Andreas Wundsam | 5325616 | 2013-05-02 14:05:53 -0700 | [diff] [blame] | 231 | of_match_v1_t = dict(bytes=40, to_w="match_v1_hton", |
| 232 | from_w="match_v1_ntoh", |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 233 | short_name="match_v1"), |
Andreas Wundsam | 5325616 | 2013-05-02 14:05:53 -0700 | [diff] [blame] | 234 | of_match_v2_t = dict(bytes=88, to_w="match_v2_hton", |
| 235 | from_w="match_v2_ntoh", |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 236 | short_name="match_v2"), |
Andreas Wundsam | 5325616 | 2013-05-02 14:05:53 -0700 | [diff] [blame] | 237 | of_match_v3_t = dict(bytes=-1, to_w="match_v3_hton", |
| 238 | from_w="match_v3_ntoh", |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 239 | short_name="match_v3"), |
Andreas Wundsam | 5325616 | 2013-05-02 14:05:53 -0700 | [diff] [blame] | 240 | # of_match_v4_t = dict(bytes=-1, to_w="match_v4_hton", |
| 241 | # from_w="match_v4_ntoh", |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 242 | # short_name="match_v4"), |
Rich Lane | 3b2fd83 | 2013-09-24 13:44:08 -0700 | [diff] [blame] | 243 | of_octets_t = dict(bytes=-1, short_name="octets"), |
| 244 | of_bitmap_128_t = dict(bytes=16, short_name="bitmap_128"), |
Rich Lane | 119289c | 2014-12-01 13:44:08 -0800 | [diff] [blame] | 245 | of_bitmap_512_t = dict(bytes=64, short_name="bitmap_512"), |
Rich Lane | fab0c82 | 2013-12-30 11:46:48 -0800 | [diff] [blame] | 246 | of_checksum_128_t = dict(bytes=16, short_name="checksum_128"), |
Praseed Balakrishnan | 7f71878 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 247 | of_app_code_t = dict(bytes=ofp_constants["OF_APP_CODE_LEN"], |
| 248 | short_name="app_code"), |
Praseed Balakrishnan | 2ed6da0 | 2014-09-18 17:02:48 -0700 | [diff] [blame] | 249 | of_sig_id_t = dict(bytes=ofp_constants["OF_SIGID_LEN"], |
| 250 | short_name="sig_id"), |
Brian O'Connor | a259e3f | 2015-09-03 15:17:18 -0700 | [diff] [blame] | 251 | of_odu_sig_id_t = dict(bytes=1, short_name="odu_sig_id"), |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 252 | ) |
| 253 | |
| 254 | of_scalar_types = ["char", "uint8_t", "uint16_t", "uint32_t", "uint64_t", |
| 255 | "of_port_no_t", "of_fm_cmd_t", "of_wc_bmap_t", |
| 256 | "of_match_bmap_t", "of_port_name_t", "of_table_name_t", |
Andreas Wundsam | 5325616 | 2013-05-02 14:05:53 -0700 | [diff] [blame] | 257 | "of_desc_str_t", "of_serial_num_t", "of_mac_addr_t", |
Rich Lane | f8a3d00 | 2014-03-19 13:33:52 -0700 | [diff] [blame] | 258 | "of_ipv6_t", "of_ipv4_t", "of_bitmap_128_t", "of_checksum_128_t", |
Brian O'Connor | 58a73e3 | 2015-05-28 11:51:27 -0700 | [diff] [blame] | 259 | "of_str64_t", "of_str32_t", "of_str6_t", "of_bitmap_512_t"] |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 260 | |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 261 | ## |
| 262 | # LOXI identifiers |
| 263 | # |
| 264 | # Dict indexed by identifier name. Each entry contains the information |
| 265 | # as a DotDict with the following keys: |
| 266 | # values: A dict indexed by wire version giving each verion's value or None |
| 267 | # common: The common value to use for this identifier at the LOXI top level (TBD) |
| 268 | # all_same: If True, all the values across all versions are the same |
| 269 | # ofp_name: The original name for the identifier |
| 270 | # ofp_group: The ofp enumerated type if defined |
| 271 | |
| 272 | identifiers = {} |
| 273 | |
| 274 | ## |
| 275 | # Identifiers by original group |
| 276 | # Keys are the original group names. Value is a list of LOXI identifiers |
| 277 | |
| 278 | identifiers_by_group = {} |
| 279 | |
| 280 | ## Ordered list of class names |
| 281 | # This is per-wire-version and is a list of the classes in the order |
| 282 | # they appear in the file. That is important because of the assumption |
| 283 | # that data members are defined before they are included in a superclass. |
| 284 | ordered_classes = {} # Indexed by wire version |
| 285 | |
| 286 | ## Per class ordered list of member names |
| 287 | ordered_members = {} |
| 288 | |
| 289 | ## Ordered list of message classes |
| 290 | ordered_messages = [] |
| 291 | |
| 292 | ## Ordered list of non message classes |
| 293 | ordered_non_messages = [] |
| 294 | |
| 295 | ## The objects that need list support |
| 296 | ordered_list_objects = [] |
| 297 | |
| 298 | ## Stats request/reply are pseudo objects |
| 299 | ordered_pseudo_objects = [] |
| 300 | |
| 301 | ## Standard order is normally messages followed by non-messages |
| 302 | standard_class_order = [] |
| 303 | |
| 304 | ## All classes in order, including psuedo classes for which most code |
| 305 | # is not generated. |
| 306 | all_class_order = [] |
| 307 | |
| 308 | ## Map from class, wire_version to size of fixed part of class |
| 309 | base_length = {} |
| 310 | |
Andreas Wundsam | 5325616 | 2013-05-02 14:05:53 -0700 | [diff] [blame] | 311 | ## Boolean indication of variable length, per class, wire_version, |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 312 | is_fixed_length = set() |
| 313 | |
| 314 | ## The global object ID counter |
| 315 | object_id = 1 # Reserve 0 for root object |
| 316 | |
| 317 | ## The unified view of all classes. See internal readme. |
| 318 | unified = {} |
| 319 | |
| 320 | ## Indicates data members with non-fixed start offsets |
| 321 | # Indexed by (cls, version, member-name) and value is prev-member-name |
| 322 | special_offsets = {} |
| 323 | |
Rich Lane | f1a8984 | 2014-10-12 10:04:13 -0700 | [diff] [blame] | 324 | # Map from wire version to OF_1_x |
| 325 | short_version_names = {} |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 326 | |
| 327 | # The iteration object that gives the wire versions supported |
Rich Lane | f1a8984 | 2014-10-12 10:04:13 -0700 | [diff] [blame] | 328 | of_version_range = [] |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 329 | |
Rich Lane | f1a8984 | 2014-10-12 10:04:13 -0700 | [diff] [blame] | 330 | # Map from wire version to OF_VERSION_1_x |
| 331 | of_version_wire2name = {} |
| 332 | |
| 333 | for version in loxi_globals.OFVersions.all_supported: |
Murat Parlakisik | f95672c | 2016-12-05 00:53:17 -0800 | [diff] [blame] | 334 | globals()[version.constant] = version.wire_version |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 335 | |
| 336 | |
| 337 | ################################################################ |
| 338 | # |
| 339 | # Experimenters, vendors, extensions |
| 340 | # |
Andreas Wundsam | 5325616 | 2013-05-02 14:05:53 -0700 | [diff] [blame] | 341 | # Although the term "experimenter" is used for identifying |
Rich Lane | a06d0c3 | 2013-03-25 08:52:03 -0700 | [diff] [blame] | 342 | # external extension definitions, we generally use the term |
| 343 | # extension when refering to the messages or objects themselves. |
| 344 | # |
| 345 | # Conventions: |
| 346 | # |
| 347 | # Extension messages should start with of_<experimenter>_ |
| 348 | # Extension actions should start with of_<experimenter>_action_ |
| 349 | # Extension instructions should start with of_<experimenter>_instructions_ |
| 350 | # |
| 351 | # Currently, the above conventions are not enforced; the mapping |
| 352 | # is done brute force in type_maps.py |
| 353 | # |
| 354 | ################################################################ |
| 355 | |
| 356 | # The map of known experimenters to their experimenter IDs |
| 357 | experimenter_name_to_id = dict( |
| 358 | bsn = 0x005c16c7, |
| 359 | nicira = 0x00002320, |
| 360 | openflow = 0x000026e1 |
| 361 | ) |