# Copyright 2013, Big Switch Networks, Inc.
#
# LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
# the following special exception:
#
# LOXI Exception
#
# As a special exception to the terms of the EPL, you may distribute libraries
# generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
# that copyright and licensing notices generated by LoxiGen are not altered or removed
# from the LoxiGen Libraries and the notice provided below is (i) included in
# the LoxiGen Libraries, if distributed in source code form and (ii) included in any
# documentation for the LoxiGen Libraries, if distributed in binary form.
#
# Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
#
# You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
# a copy of the EPL at:
#
# http://www.eclipse.org/legal/epl-v10.html
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# EPL for the specific language governing permissions and limitations
# under the EPL.

"""
Wireshark dissector backend for LOXI

Target directory structure:
    wireshark:
        openflow.lua

The user will copy openflow.lua into ~/.wireshark/plugins, where it will be
loaded automatically by Wireshark.
"""

import os
import loxi_utils.loxi_utils as loxi_utils
import wireshark_gen

targets = {
    'wireshark/openflow.lua' : wireshark_gen.generate
}

def generate():
    for (name, fn) in targets.items():
        with loxi_utils.open_output(name) as outfile:
            fn(outfile, os.path.basename(name))
