Rich Lane | bdd8e29 | 2013-12-06 17:37:39 -0800 | [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 | Code generation |
| 30 | |
| 31 | These functions extract data from the IR and render templates with it. |
| 32 | """ |
| 33 | |
| 34 | from collections import namedtuple |
| 35 | from itertools import groupby |
Rich Lane | def2e51 | 2013-12-15 15:54:02 -0800 | [diff] [blame] | 36 | from StringIO import StringIO |
Rich Lane | bdd8e29 | 2013-12-06 17:37:39 -0800 | [diff] [blame] | 37 | import template_utils |
Rich Lane | f51062b | 2014-02-24 23:08:26 -0800 | [diff] [blame] | 38 | from generic_utils import chunks |
Rich Lane | bdd8e29 | 2013-12-06 17:37:39 -0800 | [diff] [blame] | 39 | import loxi_globals |
| 40 | import loxi_ir.ir as ir |
| 41 | import util |
Rich Lane | ce2e464 | 2013-12-15 12:05:45 -0800 | [diff] [blame] | 42 | import c_code_gen |
Rich Lane | 8c4c23f | 2013-12-15 13:22:13 -0800 | [diff] [blame] | 43 | import c_gen.of_g_legacy as of_g |
Rich Lane | cce961d | 2013-12-15 14:20:42 -0800 | [diff] [blame] | 44 | import c_gen.type_maps as type_maps |
Rich Lane | c0e20ff | 2013-12-15 23:40:31 -0800 | [diff] [blame] | 45 | import c_gen.c_type_maps as c_type_maps |
Rich Lane | bdd8e29 | 2013-12-06 17:37:39 -0800 | [diff] [blame] | 46 | |
Rich Lane | f51062b | 2014-02-24 23:08:26 -0800 | [diff] [blame] | 47 | CLASS_CHUNK_SIZE = 32 |
| 48 | |
Rich Lane | 22811f5 | 2013-12-15 15:28:03 -0800 | [diff] [blame] | 49 | PushWireTypesData = namedtuple('PushWireTypesData', |
Rich Lane | bdd8e29 | 2013-12-06 17:37:39 -0800 | [diff] [blame] | 50 | ['class_name', 'versioned_type_members']) |
| 51 | PushWireTypesMember = namedtuple('PushWireTypesMember', |
| 52 | ['name', 'offset', 'length', 'value']) |
| 53 | |
Rich Lane | 22811f5 | 2013-12-15 15:28:03 -0800 | [diff] [blame] | 54 | def push_wire_types_data(uclass): |
| 55 | if uclass.virtual or not uclass.has_type_members: |
| 56 | return None |
Rich Lane | bdd8e29 | 2013-12-06 17:37:39 -0800 | [diff] [blame] | 57 | |
Rich Lane | 22811f5 | 2013-12-15 15:28:03 -0800 | [diff] [blame] | 58 | # Generate a dict of version -> list of PushWireTypesMember |
| 59 | type_members_by_version = {} |
| 60 | for version, ofclass in sorted(uclass.version_classes.items()): |
| 61 | pwtms = [] |
| 62 | for m in ofclass.members: |
| 63 | if isinstance(m, ir.OFTypeMember): |
| 64 | if m.name == "version" and m.value == version.wire_version: |
| 65 | # Special case for version |
| 66 | pwtms.append(PushWireTypesMember(m.name, m.offset, m.length, "obj->version")) |
| 67 | else: |
Rich Lane | d0c5871 | 2013-12-18 10:02:47 -0800 | [diff] [blame] | 68 | pwtms.append(PushWireTypesMember(m.name, m.offset, m.length, hex(m.value))) |
Rich Lane | 22811f5 | 2013-12-15 15:28:03 -0800 | [diff] [blame] | 69 | type_members_by_version[version] = pwtms |
Rich Lane | bdd8e29 | 2013-12-06 17:37:39 -0800 | [diff] [blame] | 70 | |
Rich Lane | 22811f5 | 2013-12-15 15:28:03 -0800 | [diff] [blame] | 71 | # Merge versions with identical type members |
| 72 | all_versions = sorted(type_members_by_version.keys()) |
| 73 | versioned_type_members = [] |
| 74 | for pwtms, versions in groupby(all_versions, type_members_by_version.get): |
| 75 | versioned_type_members.append((pwtms, list(versions))) |
Rich Lane | bdd8e29 | 2013-12-06 17:37:39 -0800 | [diff] [blame] | 76 | |
Rich Lane | 22811f5 | 2013-12-15 15:28:03 -0800 | [diff] [blame] | 77 | return PushWireTypesData( |
| 78 | class_name=uclass.name, |
| 79 | versioned_type_members=versioned_type_members) |
Rich Lane | ce2e464 | 2013-12-15 12:05:45 -0800 | [diff] [blame] | 80 | |
Rich Lane | b9fab4b | 2014-03-04 18:44:08 -0800 | [diff] [blame] | 81 | ParseWireTypesData = namedtuple('ParseWireTypesData', |
| 82 | ['class_name', 'versioned']) |
| 83 | ParseWireTypesVersion = namedtuple('ParseWireTypesVersion', |
| 84 | ['discriminator', 'subclasses']) |
| 85 | ParseWireTypesSubclass = namedtuple('ParseWireTypesSubclass', |
| 86 | ['class_name', 'value', 'virtual']) |
| 87 | |
| 88 | def parse_wire_types_data(uclass): |
| 89 | if not uclass.virtual: |
| 90 | return None |
| 91 | |
Rich Lane | b9fab4b | 2014-03-04 18:44:08 -0800 | [diff] [blame] | 92 | # Generate a dict of version -> ParseWireTypesVersion |
| 93 | versioned = {} |
| 94 | for version, ofclass in sorted(uclass.version_classes.items()): |
Rich Lane | a4b6830 | 2014-03-12 15:17:58 -0700 | [diff] [blame] | 95 | discriminator = ofclass.discriminator |
Rich Lane | b9fab4b | 2014-03-04 18:44:08 -0800 | [diff] [blame] | 96 | subclasses = [ParseWireTypesSubclass(class_name=subclass.name, |
| 97 | value=subclass.member_by_name(discriminator.name).value, |
| 98 | virtual=subclass.virtual) |
| 99 | for subclass in ofclass.protocol.classes if subclass.superclass and subclass.superclass.name == ofclass.name] |
| 100 | |
| 101 | subclasses.sort(key=lambda x: x.value) |
| 102 | versioned[version] = ParseWireTypesVersion(discriminator=discriminator, |
| 103 | subclasses=subclasses) |
| 104 | |
| 105 | return ParseWireTypesData(class_name=uclass.name, |
| 106 | versioned=sorted(versioned.items())) |
| 107 | |
Rich Lane | f51062b | 2014-02-24 23:08:26 -0800 | [diff] [blame] | 108 | # Output multiple LOCI classes into each C file. This reduces the overhead of |
| 109 | # parsing header files, which takes longer than compiling the actual code |
| 110 | # for many classes. It also reduces the compiled code size. |
Rich Lane | ce2e464 | 2013-12-15 12:05:45 -0800 | [diff] [blame] | 111 | def generate_classes(install_dir): |
Rich Lane | f51062b | 2014-02-24 23:08:26 -0800 | [diff] [blame] | 112 | for i, chunk in enumerate(chunks(loxi_globals.unified.classes, CLASS_CHUNK_SIZE)): |
| 113 | with template_utils.open_output(install_dir, "loci/src/class%02d.c" % i) as out: |
| 114 | for uclass in chunk: |
| 115 | util.render_template(out, "class.c", |
Rich Lane | b9fab4b | 2014-03-04 18:44:08 -0800 | [diff] [blame] | 116 | push_wire_types_data=push_wire_types_data(uclass), |
| 117 | parse_wire_types_data=parse_wire_types_data(uclass)) |
Rich Lane | f51062b | 2014-02-24 23:08:26 -0800 | [diff] [blame] | 118 | # Append legacy generated code |
| 119 | c_code_gen.gen_new_function_definitions(out, uclass.name) |
| 120 | c_code_gen.gen_accessor_definitions(out, uclass.name) |
Rich Lane | 8c4c23f | 2013-12-15 13:22:13 -0800 | [diff] [blame] | 121 | |
Rich Lane | 573d2b2 | 2013-12-15 13:31:27 -0800 | [diff] [blame] | 122 | # TODO remove header classes and use the corresponding class instead |
| 123 | def generate_header_classes(install_dir): |
| 124 | for cls in of_g.standard_class_order: |
Rich Lane | cba60d8 | 2014-04-17 16:05:23 -0700 | [diff] [blame] | 125 | if cls.find("_header") < 0 or cls in ["of_header", "of_bsn_header", "of_nicira_header"]: |
Rich Lane | 573d2b2 | 2013-12-15 13:31:27 -0800 | [diff] [blame] | 126 | continue |
| 127 | with template_utils.open_output(install_dir, "loci/src/%s.c" % cls) as out: |
Rich Lane | 22811f5 | 2013-12-15 15:28:03 -0800 | [diff] [blame] | 128 | util.render_template(out, "class.c", |
Rich Lane | b9fab4b | 2014-03-04 18:44:08 -0800 | [diff] [blame] | 129 | push_wire_types_data=None, |
| 130 | parse_wire_types_data=None) |
Rich Lane | 573d2b2 | 2013-12-15 13:31:27 -0800 | [diff] [blame] | 131 | # Append legacy generated code |
| 132 | c_code_gen.gen_new_function_definitions(out, cls) |
| 133 | c_code_gen.gen_accessor_definitions(out, cls) |
| 134 | |
Rich Lane | def2e51 | 2013-12-15 15:54:02 -0800 | [diff] [blame] | 135 | def generate_classes_header(install_dir): |
| 136 | # Collect legacy code |
| 137 | tmp = StringIO() |
| 138 | c_code_gen.gen_struct_typedefs(tmp) |
| 139 | c_code_gen.gen_new_function_declarations(tmp) |
| 140 | c_code_gen.gen_accessor_declarations(tmp) |
Rich Lane | def2e51 | 2013-12-15 15:54:02 -0800 | [diff] [blame] | 141 | c_code_gen.gen_generics(tmp) |
| 142 | |
| 143 | with template_utils.open_output(install_dir, "loci/inc/loci/loci_classes.h") as out: |
| 144 | util.render_template(out, "loci_classes.h", |
| 145 | legacy_code=tmp.getvalue()) |
| 146 | |
Rich Lane | 8c4c23f | 2013-12-15 13:22:13 -0800 | [diff] [blame] | 147 | def generate_lists(install_dir): |
| 148 | for cls in of_g.ordered_list_objects: |
| 149 | with template_utils.open_output(install_dir, "loci/src/%s.c" % cls) as out: |
Rich Lane | 22811f5 | 2013-12-15 15:28:03 -0800 | [diff] [blame] | 150 | util.render_template(out, "class.c", |
Rich Lane | b9fab4b | 2014-03-04 18:44:08 -0800 | [diff] [blame] | 151 | push_wire_types_data=None, |
| 152 | parse_wire_types_data=None) |
Rich Lane | 8c4c23f | 2013-12-15 13:22:13 -0800 | [diff] [blame] | 153 | # Append legacy generated code |
Rich Lane | b604e33 | 2013-12-15 13:23:51 -0800 | [diff] [blame] | 154 | c_code_gen.gen_new_function_definitions(out, cls) |
Rich Lane | 8c4c23f | 2013-12-15 13:22:13 -0800 | [diff] [blame] | 155 | c_code_gen.gen_list_accessors(out, cls) |
Rich Lane | 8a82273 | 2013-12-15 14:06:32 -0800 | [diff] [blame] | 156 | |
| 157 | def generate_strings(install_dir): |
| 158 | object_id_strs = [] |
| 159 | object_id_strs.append("of_object") |
| 160 | object_id_strs.extend(of_g.ordered_messages) |
| 161 | object_id_strs.extend(of_g.ordered_non_messages) |
| 162 | object_id_strs.extend(of_g.ordered_list_objects) |
| 163 | object_id_strs.extend(of_g.ordered_pseudo_objects) |
| 164 | object_id_strs.append("of_unknown_object") |
| 165 | |
| 166 | with template_utils.open_output(install_dir, "loci/src/loci_strings.c") as out: |
| 167 | util.render_template(out, "loci_strings.c", object_id_strs=object_id_strs) |
Rich Lane | cce961d | 2013-12-15 14:20:42 -0800 | [diff] [blame] | 168 | |
| 169 | def generate_init_map(install_dir): |
| 170 | with template_utils.open_output(install_dir, "loci/src/loci_init_map.c") as out: |
| 171 | util.render_template(out, "loci_init_map.c", classes=of_g.standard_class_order) |
Rich Lane | c0e20ff | 2013-12-15 23:40:31 -0800 | [diff] [blame] | 172 | |
| 173 | def generate_type_maps(install_dir): |
| 174 | # Collect legacy code |
| 175 | tmp = StringIO() |
| 176 | c_type_maps.gen_type_to_obj_map_functions(tmp) |
| 177 | c_type_maps.gen_type_maps(tmp) |
| 178 | c_type_maps.gen_length_array(tmp) |
| 179 | c_type_maps.gen_extra_length_array(tmp) |
| 180 | |
| 181 | with template_utils.open_output(install_dir, "loci/src/of_type_maps.c") as out: |
| 182 | util.render_template(out, "of_type_maps.c", legacy_code=tmp.getvalue()) |
Rich Lane | dc46fe2 | 2014-04-03 15:10:38 -0700 | [diff] [blame] | 183 | |
| 184 | ClassMetadata = namedtuple('ClassMetadata', |
| 185 | ['name', 'wire_length_get', 'wire_length_set', 'wire_type_get', 'wire_type_set']) |
| 186 | |
| 187 | def generate_class_metadata(install_dir): |
| 188 | with template_utils.open_output(install_dir, "loci/inc/loci/loci_class_metadata.h") as out: |
| 189 | util.render_template(out, "loci_class_metadata.h") |
| 190 | |
| 191 | with template_utils.open_output(install_dir, "loci/src/loci_class_metadata.c") as out: |
| 192 | class_metadata = [] |
| 193 | for uclass in loxi_globals.unified.classes: |
| 194 | wire_length_get = 'NULL' |
| 195 | wire_length_set = 'NULL' |
| 196 | wire_type_get = 'NULL' |
| 197 | wire_type_set = 'NULL' |
| 198 | |
| 199 | if uclass and not uclass.virtual and uclass.has_type_members: |
| 200 | wire_type_set = '%s_push_wire_types' % uclass.name |
| 201 | |
| 202 | if uclass.is_message and uclass.name != "of_header": |
| 203 | wire_length_get = 'of_object_message_wire_length_get' |
| 204 | wire_length_set = 'of_object_message_wire_length_set' |
| 205 | elif uclass.is_action: |
| 206 | wire_length_set = 'of_tlv16_wire_length_set' |
| 207 | wire_length_get = 'of_tlv16_wire_length_get' |
| 208 | wire_type_get = 'of_action_wire_object_id_get' |
Wilson Ng | 734a1d6 | 2014-04-17 18:34:17 -0700 | [diff] [blame] | 209 | elif uclass.is_instanceof('of_bsn_vport'): |
| 210 | wire_length_set = 'of_tlv16_wire_length_set' |
| 211 | wire_length_get = 'of_tlv16_wire_length_get' |
| 212 | wire_type_get = 'of_bsn_vport_wire_object_id_get' |
Rich Lane | dc46fe2 | 2014-04-03 15:10:38 -0700 | [diff] [blame] | 213 | elif uclass.is_action_id: |
| 214 | wire_length_set = 'of_tlv16_wire_length_set' |
| 215 | wire_length_get = 'of_tlv16_wire_length_get' |
| 216 | wire_type_get = 'of_action_id_wire_object_id_get' |
| 217 | elif uclass.is_instruction: |
| 218 | wire_length_set = 'of_tlv16_wire_length_set' |
| 219 | wire_length_get = 'of_tlv16_wire_length_get' |
| 220 | wire_type_get = 'of_instruction_wire_object_id_get' |
| 221 | elif uclass.is_instanceof('of_instruction_id'): |
| 222 | wire_length_set = 'of_tlv16_wire_length_set' |
| 223 | wire_length_get = 'of_tlv16_wire_length_get' |
| 224 | wire_type_get = 'of_instruction_id_wire_object_id_get' |
| 225 | elif uclass.is_instanceof('of_queue_prop'): |
| 226 | wire_length_set = 'of_tlv16_wire_length_set' |
| 227 | wire_length_get = 'of_tlv16_wire_length_get' |
| 228 | wire_type_get = 'of_queue_prop_wire_object_id_get' |
| 229 | elif uclass.is_instanceof('of_table_feature_prop'): |
| 230 | wire_length_set = 'of_tlv16_wire_length_set' |
| 231 | wire_length_get = 'of_tlv16_wire_length_get' |
| 232 | wire_type_get = 'of_table_feature_prop_wire_object_id_get' |
| 233 | elif uclass.is_instanceof('of_meter_band'): |
| 234 | wire_length_set = 'of_tlv16_wire_length_set' |
| 235 | wire_length_get = 'of_tlv16_wire_length_get' |
| 236 | wire_type_get = 'of_meter_band_wire_object_id_get' |
| 237 | elif uclass.is_instanceof('of_hello_elem'): |
| 238 | wire_length_set = 'of_tlv16_wire_length_set' |
| 239 | wire_length_get = 'of_tlv16_wire_length_get' |
| 240 | wire_type_get = 'of_hello_elem_wire_object_id_get' |
| 241 | elif uclass.is_instanceof('of_bsn_tlv'): |
| 242 | wire_length_set = 'of_tlv16_wire_length_set' |
| 243 | wire_length_get = 'of_tlv16_wire_length_get' |
| 244 | wire_type_get = 'of_bsn_tlv_wire_object_id_get' |
| 245 | elif uclass.is_oxm: |
| 246 | wire_length_get = 'of_oxm_wire_length_get' |
| 247 | wire_type_get = 'of_oxm_wire_object_id_get' |
| 248 | elif uclass.name == "of_packet_queue": |
| 249 | wire_length_get = 'of_packet_queue_wire_length_get' |
| 250 | wire_length_set = 'of_packet_queue_wire_length_set' |
Rich Lane | dc46fe2 | 2014-04-03 15:10:38 -0700 | [diff] [blame] | 251 | elif uclass.name == "of_meter_stats": |
| 252 | wire_length_get = 'of_meter_stats_wire_length_get' |
| 253 | wire_length_set = 'of_meter_stats_wire_length_set' |
| 254 | elif uclass.name in ["of_group_desc_stats_entry", "of_group_stats_entry", |
| 255 | "of_flow_stats_entry", "of_bucket", "of_table_features", |
| 256 | "of_bsn_port_counter_stats_entry", "of_bsn_vlan_counter_stats_entry", |
| 257 | "of_bsn_gentable_entry_desc_stats_entry", "of_bsn_gentable_entry_stats_entry", |
| 258 | "of_bsn_gentable_desc_stats_entry"]: |
| 259 | wire_length_get = "of_u16_len_wire_length_get" |
| 260 | wire_length_set = "of_u16_len_wire_length_set" |
| 261 | elif uclass.name == 'of_match_v3': |
| 262 | wire_length_set = 'of_tlv16_wire_length_set' |
| 263 | wire_length_get = 'of_tlv16_wire_length_get' |
| 264 | wire_type_set = 'of_match_v3_push_wire_types' |
| 265 | |
| 266 | class_metadata.append(ClassMetadata( |
| 267 | name=uclass.name, |
| 268 | wire_length_get=wire_length_get, |
| 269 | wire_length_set=wire_length_set, |
| 270 | wire_type_get=wire_type_get, |
| 271 | wire_type_set=wire_type_set)) |
| 272 | |
| 273 | class_metadata.extend([ |
| 274 | ClassMetadata( |
| 275 | name="of_action_header", |
| 276 | wire_length_set='of_tlv16_wire_length_set', |
| 277 | wire_length_get='of_tlv16_wire_length_get', |
| 278 | wire_type_get='of_action_wire_object_id_get', |
| 279 | wire_type_set='NULL'), |
| 280 | ClassMetadata( |
| 281 | name="of_action_id_header", |
| 282 | wire_length_set='of_tlv16_wire_length_set', |
| 283 | wire_length_get='of_tlv16_wire_length_get', |
| 284 | wire_type_get='of_action_id_wire_object_id_get', |
| 285 | wire_type_set='NULL'), |
| 286 | ClassMetadata( |
Wilson Ng | 734a1d6 | 2014-04-17 18:34:17 -0700 | [diff] [blame] | 287 | name="of_bsn_vport_header", |
| 288 | wire_length_set='of_tlv16_wire_length_set', |
| 289 | wire_length_get='of_tlv16_wire_length_get', |
| 290 | wire_type_get='of_bsn_vport_wire_object_id_get', |
| 291 | wire_type_set='NULL'), |
| 292 | ClassMetadata( |
Rich Lane | dc46fe2 | 2014-04-03 15:10:38 -0700 | [diff] [blame] | 293 | name="of_instruction_header", |
| 294 | wire_length_set='of_tlv16_wire_length_set', |
| 295 | wire_length_get='of_tlv16_wire_length_get', |
| 296 | wire_type_get='of_instruction_wire_object_id_get', |
| 297 | wire_type_set='NULL'), |
| 298 | ClassMetadata( |
| 299 | name="of_instruction_id_header", |
| 300 | wire_length_set='of_tlv16_wire_length_set', |
| 301 | wire_length_get='of_tlv16_wire_length_get', |
| 302 | wire_type_get='of_instruction_id_wire_object_id_get', |
| 303 | wire_type_set='NULL'), |
| 304 | ClassMetadata( |
| 305 | name="of_queue_prop_header", |
| 306 | wire_length_set='of_tlv16_wire_length_set', |
| 307 | wire_length_get='of_tlv16_wire_length_get', |
| 308 | wire_type_get='of_queue_prop_wire_object_id_get', |
| 309 | wire_type_set='NULL'), |
| 310 | ClassMetadata( |
| 311 | name="of_table_feature_prop_header", |
| 312 | wire_length_set='of_tlv16_wire_length_set', |
| 313 | wire_length_get='of_tlv16_wire_length_get', |
| 314 | wire_type_get='of_table_feature_prop_wire_object_id_get', |
| 315 | wire_type_set='NULL'), |
| 316 | ClassMetadata( |
| 317 | name="of_meter_band_header", |
| 318 | wire_length_set='of_tlv16_wire_length_set', |
| 319 | wire_length_get='of_tlv16_wire_length_get', |
| 320 | wire_type_get='of_meter_band_wire_object_id_get', |
| 321 | wire_type_set='NULL'), |
| 322 | ClassMetadata( |
| 323 | name="of_hello_elem_header", |
| 324 | wire_length_set='of_tlv16_wire_length_set', |
| 325 | wire_length_get='of_tlv16_wire_length_get', |
| 326 | wire_type_get='of_hello_elem_wire_object_id_get', |
| 327 | wire_type_set='NULL'), |
| 328 | ClassMetadata( |
| 329 | name="of_bsn_tlv_header", |
| 330 | wire_length_set='of_tlv16_wire_length_set', |
| 331 | wire_length_get='of_tlv16_wire_length_get', |
| 332 | wire_type_get='of_bsn_tlv_wire_object_id_get', |
| 333 | wire_type_set='NULL'), |
| 334 | ClassMetadata( |
| 335 | name="of_oxm_header", |
| 336 | wire_length_set='NULL', |
| 337 | wire_length_get='of_oxm_wire_length_get', |
| 338 | wire_type_get='of_oxm_wire_object_id_get', |
| 339 | wire_type_set='NULL'), |
| 340 | ]) |
| 341 | |
| 342 | util.render_template(out, "loci_class_metadata.c", class_metadata=class_metadata) |