diff --git a/c_gen/templates/.gitignore b/c_gen/templates/.gitignore
new file mode 100644
index 0000000..c3ed10e
--- /dev/null
+++ b/c_gen/templates/.gitignore
@@ -0,0 +1 @@
+*.cache
diff --git a/c_gen/templates/Doxyfile b/c_gen/templates/Doxyfile
new file mode 100644
index 0000000..983aba9
--- /dev/null
+++ b/c_gen/templates/Doxyfile
@@ -0,0 +1,1551 @@
+# Doxyfile 1.6.3
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME           = "LOCI OpenFlow Interfaces"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER         =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it parses.
+# With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this tag.
+# The format is ext=language, where ext is a file extension, and language is one of
+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS        = YES
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = YES
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES       = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
+# doxygen. The layout file controls the global structure of the generated output files
+# in an output format independent way. The create the layout file that represents
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name
+# of the layout file.
+
+LAYOUT_FILE            =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE           =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT                  = src inc/loci
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS          =
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS       =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.
+# Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER            =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        =
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE               =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING     =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
+# are set, an additional index file will be generated that can be used as input for
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
+# HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
+# For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+#  will be generated, which together with the HTML files, form an Eclipse help
+#  plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be implemented using a PHP enabled web server instead of at the web client using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server based approach is that it scales better to large projects and allows full text search. The disadvances is that it is more difficult to setup
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA             =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD                =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH           =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME           = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS           =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = YES
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP            = YES
diff --git a/c_gen/templates/README b/c_gen/templates/README
new file mode 100644
index 0000000..71c4a48
--- /dev/null
+++ b/c_gen/templates/README
@@ -0,0 +1,73 @@
+Introduction
+============
+
+LOCI is the C language module of LOXI, the Logical OpenFlow Extensible
+Interface. It provides a framework for managing OpenFlow objects in
+an object oriented fashion.
+
+All files in LOCI, even this README, are generated by LOXI. Please make
+modifications to LOXI instead of to these files directly.
+
+Compilation
+===========
+
+It's expected that users of LOCI will want to integrate it into their own build
+system. As an example, here's a simple command line to create a shared library
+on Linux:
+
+    gcc -fPIC -shared -I inc src/*.c -o loci.so
+
+LOCI has no dependencies beyond the C standard library.
+
+Documentation
+=============
+
+A Doxygen configuration file is provided. Just run `doxygen` to generate HTML
+documentation pages. Each OpenFlow object is linked to under the "Modules"
+tab.
+
+Usage
+=====
+
+Currently the best example code for using LOCI is the switchlight-core
+repository.
+
+Here's example code that creates a flow mod:
+
+    /* Create the match */
+    of_match_t match;
+    memset(&match, 0, sizeof(match));
+    match.fields.in_port = 1;
+    OF_MATCH_MASK_IN_PORT_EXACT_SET(&match);
+    match.fields.eth_type = 0x8000;
+    OF_MATCH_MASK_ETH_TYPE_EXACT_SET(&match);
+
+    /* Create a flow mod */
+    of_flow_add_t *flow_add = of_flow_add_new(OF_VERSION_1_0);
+    of_flow_add_idle_timeout_set(flow_add, 5);
+    of_flow_add_cookie_set(flow_add, 42);
+    of_flow_add_priority_set(flow_add, 10000);
+    of_flow_add_buffer_id_set(flow_add, -1);
+    if (of_flow_add_match_set(flow_add, &match)) {
+        fprintf(stderr, "Failed to set the match field\n");
+        abort();
+    }
+
+    /* Populate the action list */
+    of_list_action_t actions;
+    of_flow_add_actions_bind(flow_add, &actions);
+    int i;
+    for (i = 1; i <= 4; i++) {
+        of_action_output_t action;
+        of_action_output_init(&action, flow_add->version, -1, 1);
+        of_list_action_append_bind(&actions, (of_action_t *)&action);
+        of_action_output_port_set(&action, i);
+    }
+
+    /* Use the underlying buffer */
+    void *buf = WBUF_BUF(OF_OBJECT_TO_WBUF(flow_add));
+    uint16_t len = flow_add->length;
+    /* ... */
+
+    /* Free the flow mod */
+    of_flow_add_delete(flow_add);
diff --git a/c_gen/templates/bsn_ext.h b/c_gen/templates/bsn_ext.h
new file mode 100644
index 0000000..6afa211
--- /dev/null
+++ b/c_gen/templates/bsn_ext.h
@@ -0,0 +1,44 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/**
+ * BSN OpenFlow extension definition header file
+ */
+
+#ifndef _LOCI_BSN_EXT_H_
+#define _LOCI_BSN_EXT_H_
+
+/* Mirroring for destination, bit in port_config */
+#define OF_PORT_CONFIG_BSN_MIRROR_DEST (1 << 31) /* Mirror destination only */
+
+/* Point at which mirroring is to occur */
+#define OF_BSN_MIRROR_STAGE_INGRESS 0
+#define OF_BSN_MIRROR_STAGE_EGRESS 1
+
+#endif /* _LOCI_BSN_EXT_H_ */
diff --git a/c_gen/templates/loci_dox.h b/c_gen/templates/loci_dox.h
new file mode 100644
index 0000000..86c29db
--- /dev/null
+++ b/c_gen/templates/loci_dox.h
@@ -0,0 +1,55 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/**************************************************************************//**
+ * 
+ * loci Doxygen Header
+ * 
+ *****************************************************************************/
+#ifndef __LOCI_DOX_H__
+#define __LOCI_DOX_H__
+
+/**
+ * @defgroup loci loci - loci Description
+ *
+
+The documentation overview for this module should go here. 
+
+ *
+ * @{
+ *
+ * @defgroup loci-loci Public Interface
+ * @defgroup loci-config Compile Time Configuration
+ * @defgroup loci-porting Porting Macros
+ * 
+ * @}
+ *
+ */
+
+#endif /* __LOCI_DOX_H__ */
diff --git a/c_gen/templates/loci_dump.h b/c_gen/templates/loci_dump.h
new file mode 100644
index 0000000..12bba6e
--- /dev/null
+++ b/c_gen/templates/loci_dump.h
@@ -0,0 +1,101 @@
+:: # 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.
+::
+/* Copyright 2012, Big Switch Networks, Inc. */
+
+#if !defined(_LOCI_DUMP_H_)
+#define _LOCI_DUMP_H_
+
+#include <loci/loci_base.h>
+#include <loci/of_match.h>
+#include <stdio.h>
+
+/* g++ requires this to pick up PRI, etc.
+ * See  http://gcc.gnu.org/ml/gcc-help/2006-10/msg00223.html
+ */
+#if !defined(__STDC_FORMAT_MACROS)
+#define __STDC_FORMAT_MACROS
+#endif
+#include <inttypes.h>
+
+typedef int (*loci_obj_dump_f)(loci_writer_f writer, void *cookie, of_object_t *obj);
+
+/****************************************************************
+ *
+ * Per-datatype dump macros
+ *
+ ****************************************************************/
+#define LOCI_DUMP_u8(writer, cookie, val) writer(cookie, "%u", (val))
+#define LOCI_DUMP_u16(writer, cookie, val) writer(cookie, "%u (0x%x)", (val), (val))
+#define LOCI_DUMP_u32(writer, cookie, val) writer(cookie, "%u (0x%x)", (val), (val))
+#define LOCI_DUMP_u64(writer, cookie, val) writer(cookie, "%" PRIu64 "(0x%" PRIx64 ")", (val), (val))
+
+/* @todo Add checks for special port numbers */
+#define LOCI_DUMP_port_no(writer, cookie, val) LOCI_DUMP_u32(writer, cookie, val)
+#define LOCI_DUMP_fm_cmd(writer, cookie, val) LOCI_DUMP_u16(writer, cookie, val)
+
+/* @todo Decode wildcards */
+#define LOCI_DUMP_wc_bmap(writer, cookie, val)         \
+    writer(cookie, "0x%" PRIx64, (val))
+#define LOCI_DUMP_match_bmap(writer, cookie, val)      \
+    writer(cookie, "0x%" PRIx64, (val))
+
+/* @todo Dump first N bytes of data */
+#define LOCI_DUMP_octets(writer, cookie, val)                                      \
+    writer(cookie, "%d bytes at location %p", (val).bytes, (val).data)
+
+#define LOCI_DUMP_mac(writer, cookie, val)                                 \
+    writer(cookie, "%02x:%02x:%02x:%02x:%02x:%02x",            \
+               (val).addr[0], (val).addr[1], (val).addr[2],     \
+               (val).addr[3], (val).addr[4], (val).addr[5])
+
+#define LOCI_DUMP_ipv4(writer, cookie, val)                                        \
+    writer(cookie, "%d.%d.%d.%d", val >> 24, (val >> 16) & 0xff,       \
+               (val >> 8) & 0xff, val & 0xff)
+
+#define LOCI_DUMP_ipv6(writer, cookie, val)                                        \
+    writer(cookie, "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", \
+               (val).addr[0], (val).addr[1], (val).addr[2], (val).addr[3], \
+               (val).addr[4], (val).addr[5], (val).addr[6], (val).addr[7], \
+               (val).addr[8], (val).addr[9], (val).addr[10], (val).addr[11], \
+               (val).addr[12], (val).addr[13], (val).addr[14], (val).addr[15])
+
+#define LOCI_DUMP_string(writer, cookie, val) writer(cookie, "%s", val)
+
+#define LOCI_DUMP_port_name(writer, cookie, val) LOCI_DUMP_string(writer, cookie, val)
+#define LOCI_DUMP_tab_name(writer, cookie, val) LOCI_DUMP_string(writer, cookie, val)
+#define LOCI_DUMP_desc_str(writer, cookie, val) LOCI_DUMP_string(writer, cookie, val)
+#define LOCI_DUMP_ser_num(writer, cookie, val) LOCI_DUMP_string(writer, cookie, val)
+
+int loci_dump_match(loci_writer_f writer, void* cookie, of_match_t *match);
+#define LOCI_DUMP_match(writer, cookie, val) loci_dump_match(writer, cookie, &val)
+
+/**
+ * Generic version for any object
+ */
+int of_object_dump(loci_writer_f writer, void *cookie, of_object_t *obj);
+#endif /* _LOCI_DUMP_H_ */
diff --git a/c_gen/templates/loci_int.h b/c_gen/templates/loci_int.h
new file mode 100644
index 0000000..ce5ecb0
--- /dev/null
+++ b/c_gen/templates/loci_int.h
@@ -0,0 +1,45 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/******************************************************************************
+ *
+ *  /module/src/loci_int.h
+ *
+ *  loci Internal Header
+ *
+ *****************************************************************************/
+#ifndef __LOCI_INT_H__
+#define __LOCI_INT_H__
+
+
+
+
+
+#include <loci/loci.h> 
+#endif /* __LOCI_INT_H__ */
diff --git a/c_gen/templates/loci_log.c b/c_gen/templates/loci_log.c
new file mode 100644
index 0000000..cf34eae
--- /dev/null
+++ b/c_gen/templates/loci_log.c
@@ -0,0 +1,44 @@
+:: # 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.
+::
+/* Copyright 2012, Big Switch Networks, Inc. */
+
+#include <stdarg.h>
+
+#include "loci_log.h"
+
+#include <loci/loci.h>
+
+static int
+loci_null_logger(loci_log_level_t level,
+                 const char *fname, const char *file, int line,
+                 const char *format, ...)
+{
+    return 0;
+}
+
+loci_logger_f loci_logger = loci_null_logger;
diff --git a/c_gen/templates/loci_log.h b/c_gen/templates/loci_log.h
new file mode 100644
index 0000000..3e22d81
--- /dev/null
+++ b/c_gen/templates/loci_log.h
@@ -0,0 +1,57 @@
+:: # 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.
+::
+/* Copyright 2012, Big Switch Networks, Inc. */
+
+#if !defined(_LOCI_LOG_H_)
+#define _LOCI_LOG_H_
+
+#include <loci/loci_base.h>
+#include <loci/of_match.h>
+#include <stdio.h>
+
+/* g++ requires this to pick up PRI, etc.
+ * See  http://gcc.gnu.org/ml/gcc-help/2006-10/msg00223.html
+ */
+#if !defined(__STDC_FORMAT_MACROS)
+#define __STDC_FORMAT_MACROS
+#endif
+#include <inttypes.h>
+
+/**
+ * Per level log macros.  printf semantics
+ */
+
+#define LOCI_LOG_COMMON(level, ...) loci_logger(level, __func__, __FILE__, __LINE__, __VA_ARGS__)
+#define LOCI_LOG_TRACE(...) LOCI_LOG_COMMON(LOCI_LOG_LEVEL_TRACE, __VA_ARGS__)
+#define LOCI_LOG_VERBOSE(...) LOCI_LOG_COMMON(LOCI_LOG_LEVEL_VERBOSE, __VA_ARGS__)
+#define LOCI_LOG_INFO(...) LOCI_LOG_COMMON(LOCI_LOG_LEVEL_INFO, __VA_ARGS__)
+#define LOCI_LOG_WARN(...) LOCI_LOG_COMMON(LOCI_LOG_LEVEL_WARN, __VA_ARGS__)
+#define LOCI_LOG_ERROR(...) LOCI_LOG_COMMON(LOCI_LOG_LEVEL_ERROR, __VA_ARGS__)
+#define LOCI_LOG_MSG(...) LOCI_LOG_COMMON(LOCI_LOG_LEVEL_MSG, __VA_ARGS__)
+
+#endif /* _LOCI_LOG_H_ */
diff --git a/c_gen/templates/loci_show.h b/c_gen/templates/loci_show.h
new file mode 100644
index 0000000..86efab1
--- /dev/null
+++ b/c_gen/templates/loci_show.h
@@ -0,0 +1,328 @@
+:: # 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.
+::
+/* Copyright 2012, Big Switch Networks, Inc. */
+
+#if !defined(_LOCI_SHOW_H_)
+#define _LOCI_SHOW_H_
+
+#include <loci/loci_base.h>
+#include <loci/of_match.h>
+#include <stdio.h>
+
+/* g++ requires this to pick up PRI, etc.
+ * See  http://gcc.gnu.org/ml/gcc-help/2006-10/msg00223.html
+ */
+#if !defined(__STDC_FORMAT_MACROS)
+#define __STDC_FORMAT_MACROS
+#endif
+#include <inttypes.h>
+
+typedef int (*loci_obj_show_f)(loci_writer_f writer,
+                               void *cookie, of_object_t *obj);
+
+/****************************************************************
+ *
+ * Per-datatype dump macros
+ *
+ ****************************************************************/
+#define LOCI_SHOW_u8(writer, cookie, val) writer(cookie, "%u", (val))
+#define LOCI_SHOW_u16(writer, cookie, val) writer(cookie, "%u (0x%x)", (val), (val))
+#define LOCI_SHOW_u32(writer, cookie, val) writer(cookie, "%u (0x%x)", (val), (val))
+#define LOCI_SHOW_u64(writer, cookie, val) writer(cookie, "%" PRIu64 "(0x%" PRIx64 ")", (val), (val))
+
+#define LOCI_SHOW_D_INT(cookie, macro, val) writer(cookie, "%" macro , val); 
+#define LOCI_SHOW_X_INT(cookie, macro, val) writer(cookie, "0x%" macro, val); 
+
+#define LOCI_SHOW_x8(writer, cookie, val) LOCI_SHOW_X_INT(cookie,  PRIx8, val)
+#define LOCI_SHOW_x16(writer, cookie, val) LOCI_SHOW_X_INT(cookie, PRIx16, val)
+#define LOCI_SHOW_x32(writer, cookie, val) LOCI_SHOW_X_INT(cookie, PRIx32, val)
+#define LOCI_SHOW_x64(writer, cookie, val) LOCI_SHOW_X_INT(cookie, PRIx64, val)
+#define LOCI_SHOW_d8(writer, cookie, val) LOCI_SHOW_D_INT(cookie, PRId8, val)
+#define LOCI_SHOW_d16(writer, cookie, val) LOCI_SHOW_D_INT(cookie, PRId16, val)
+#define LOCI_SHOW_d32(writer, cookie, val) LOCI_SHOW_D_INT(cookie, PRId32, val)
+#define LOCI_SHOW_d64(writer, cookie, val) LOCI_SHOW_D_INT(cookie, PRId64, val)
+
+
+
+/**
+ * Field-specific show macros. 
+ */
+#define LOCI_SHOW_u32_ipv6_flabel(writer, cookie, val)     LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u8_vlan_pcp(writer, cookie, val)         LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u32_ipv4_src(writer, cookie, val)        LOCI_SHOW_ipv4(writer, cookie, val)
+#define LOCI_SHOW_ipv6_ipv6_dst(writer, cookie, val)       LOCI_SHOW_ipv6(writer, cookie, val)
+#define LOCI_SHOW_u32_arp_tpa(writer, cookie, val)         LOCI_SHOW_ipv4(writer, cookie, val)
+#define LOCI_SHOW_u8_icmpv6_type(writer, cookie, val)      LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_mac_arp_sha(writer, cookie, val)         LOCI_SHOW_mac(writer, cookie, val)
+#define LOCI_SHOW_ipv6_ipv6_src(writer, cookie, val)       LOCI_SHOW_ipv6(writer, cookie, val)
+#define LOCI_SHOW_u16_sctp_src(writer, cookie, val)        LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u8_icmpv6_code(writer, cookie, val)      LOCI_SHOW_x8(writer, cookie, val)
+#define LOCI_SHOW_mac_eth_dst(writer, cookie, val)         LOCI_SHOW_mac(writer, cookie, val)
+#define LOCI_SHOW_mac_ipv6_nd_sll(writer, cookie, val)     LOCI_SHOW_mac(writer, cookie, val)
+#define LOCI_SHOW_u8_mpls_tc(writer, cookie, val)          LOCI_SHOW_x8(writer, cookie, val)
+#define LOCI_SHOW_u16_arp_op(writer, cookie, val)          LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u16_eth_type(writer, cookie, val)        LOCI_SHOW_x16(writer, cookie, val)
+#define LOCI_SHOW_ipv6_ipv6_nd_target(writer, cookie, val) LOCI_SHOW_ipv6(writer, cookie, val)
+#define LOCI_SHOW_u16_vlan_vid(writer, cookie, val)        LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_mac_arp_tha(writer, cookie, val)         LOCI_SHOW_mac(writer, cookie, val)
+#define LOCI_SHOW_port_no_in_port(writer, cookie, val)     LOCI_SHOW_port_no(writer, cookie, val)
+#define LOCI_SHOW_u8_ip_dscp(writer, cookie, val)          LOCI_SHOW_x8(writer, cookie, val)
+#define LOCI_SHOW_u16_sctp_dst(writer, cookie, val)        LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u8_icmpv4_code(writer, cookie, val)      LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u16_tcp_src(writer, cookie, val)         LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u32_arp_spa(writer, cookie, val)         LOCI_SHOW_ipv4(writer, cookie, val)
+#define LOCI_SHOW_u8_ip_ecn(writer, cookie, val)           LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u16_udp_dst(writer, cookie, val)         LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_port_no_in_phy_port(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
+#define LOCI_SHOW_u32_ipv4_dst(writer, cookie, val)        LOCI_SHOW_ipv4(writer, cookie, val)
+#define LOCI_SHOW_mac_eth_src(writer, cookie, val)         LOCI_SHOW_mac(writer, cookie, val)
+#define LOCI_SHOW_u16_udp_src(writer, cookie, val)         LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_mac_ipv6_nd_tll(writer, cookie, val)     LOCI_SHOW_mac(writer, cookie, val)
+#define LOCI_SHOW_u8_icmpv4_type(writer, cookie, val)      LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u32_mpls_label(writer, cookie, val)      LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u16_tcp_dst(writer, cookie, val)         LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u8_ip_proto(writer, cookie, val)         LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u64_metadata(writer, cookie, val)        LOCI_SHOW_x64(writer, cookie, val)
+
+
+
+
+/* @todo Add checks for special port numbers */
+#define LOCI_SHOW_port_no(writer, cookie, val) writer(cookie, "%d", val)
+#define LOCI_SHOW_fm_cmd(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+
+/* @todo Decode wildcards */
+#define LOCI_SHOW_wc_bmap(writer, cookie, val)         \
+    writer(cookie, "0x%" PRIx64, (val))
+#define LOCI_SHOW_match_bmap(writer, cookie, val)      \
+    writer(cookie, "0x%" PRIx64, (val))
+
+/* @todo Dump first N bytes of data */
+#define LOCI_SHOW_octets(writer, cookie, val)                                      \
+    writer(cookie, "%d bytes at location %p", (val).bytes, (val).data)
+
+#define LOCI_SHOW_mac(writer, cookie, val)                                 \
+    writer(cookie, "%02x:%02x:%02x:%02x:%02x:%02x",            \
+               (val).addr[0], (val).addr[1], (val).addr[2],     \
+               (val).addr[3], (val).addr[4], (val).addr[5])
+
+#define LOCI_SHOW_ipv4(writer, cookie, val)                                        \
+    writer(cookie, "%d.%d.%d.%d", val >> 24, (val >> 16) & 0xff,       \
+               (val >> 8) & 0xff, val & 0xff)
+
+#define LOCI_SHOW_ipv6(writer, cookie, val)                                        \
+    writer(cookie, "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", \
+               (val).addr[0], (val).addr[1], (val).addr[2], (val).addr[3], \
+               (val).addr[4], (val).addr[5], (val).addr[6], (val).addr[7], \
+               (val).addr[8], (val).addr[9], (val).addr[10], (val).addr[11], \
+               (val).addr[12], (val).addr[13], (val).addr[14], (val).addr[15])
+
+#define LOCI_SHOW_string(writer, cookie, val) writer(cookie, "%s", val)
+
+#define LOCI_SHOW_port_name(writer, cookie, val) LOCI_SHOW_string(writer, cookie, val)
+#define LOCI_SHOW_tab_name(writer, cookie, val) LOCI_SHOW_string(writer, cookie, val)
+#define LOCI_SHOW_desc_str(writer, cookie, val) LOCI_SHOW_string(writer, cookie, val)
+#define LOCI_SHOW_ser_num(writer, cookie, val) LOCI_SHOW_string(writer, cookie, val)
+
+int loci_show_match(loci_writer_f writer, void *cookie, of_match_t *match);
+#define LOCI_SHOW_match(writer, cookie, val) loci_show_match(writer, cookie, &val)
+
+/**
+ * Generic version for any object
+ */
+int of_object_show(loci_writer_f writer, void *cookie, of_object_t *obj);
+
+
+
+
+/**
+ * Choose a representation for each field that 
+ * makes the most sense for display to the user. 
+ */
+#define LOCI_SHOW_u32_xid(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u16_flags(writer, cookie, val) LOCI_SHOW_x16(writer, cookie, val)
+#define LOCI_SHOW_u64_packet_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_byte_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u32_flow_count(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_match_match(writer, cookie, val) LOCI_SHOW_match(writer, cookie, val)
+#define LOCI_SHOW_u8_table_id(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_port_no_out_port(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
+#define LOCI_SHOW_u32_experimenter(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_subtype(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u8_index(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u32_mask(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u8_report_mirror_ports(writer, cookie, val) LOCI_SHOW_x8(writer, cookie, val)
+#define LOCI_SHOW_desc_str_mfr_desc(writer, cookie, val) LOCI_SHOW_desc_str(writer, cookie, val)
+#define LOCI_SHOW_desc_str_hw_desc(writer, cookie, val) LOCI_SHOW_desc_str(writer, cookie, val)
+#define LOCI_SHOW_desc_str_sw_desc(writer, cookie, val) LOCI_SHOW_desc_str(writer, cookie, val)
+#define LOCI_SHOW_ser_num_serial_num(writer, cookie, val) LOCI_SHOW_ser_num(writer, cookie, val)
+#define LOCI_SHOW_desc_str_dp_desc(writer, cookie, val) LOCI_SHOW_desc_str(writer, cookie, val)
+#define LOCI_SHOW_octets_data(writer, cookie, val) LOCI_SHOW_octets(writer, cookie, val)
+#define LOCI_SHOW_u16_err_type(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u16_code(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u64_datapath_id(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
+#define LOCI_SHOW_u32_n_buffers(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u8_n_tables(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u32_capabilities(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_actions(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u64_cookie(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
+#define LOCI_SHOW_u16_idle_timeout(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u16_hard_timeout(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u16_priority(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u32_buffer_id(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u8_reason(writer, cookie, val) LOCI_SHOW_x8(writer, cookie, val)
+#define LOCI_SHOW_u32_duration_sec(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_duration_nsec(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u16_miss_send_len(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u32_role(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u16_total_len(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_port_no_port_no(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
+#define LOCI_SHOW_mac_hw_addr(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
+#define LOCI_SHOW_u32_config(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_advertise(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_port_no_port(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
+#define LOCI_SHOW_u32_queue_id(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_dest_port(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_vlan_tag(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u8_copy_stage(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u16_max_len(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_mac_dl_addr(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
+#define LOCI_SHOW_u32_nw_addr(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
+#define LOCI_SHOW_u8_nw_tos(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u16_tp_port(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_wc_bmap_wildcards(writer, cookie, val) LOCI_SHOW_wc_bmap(writer, cookie, val)
+#define LOCI_SHOW_port_name_name(writer, cookie, val) LOCI_SHOW_port_name(writer, cookie, val)
+#define LOCI_SHOW_u32_state(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_curr(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_advertised(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_supported(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_peer(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u64_rx_packets(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_tx_packets(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_rx_bytes(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_tx_bytes(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_rx_dropped(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_tx_dropped(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_rx_errors(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_tx_errors(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_rx_frame_err(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_rx_over_err(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_rx_crc_err(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_collisions(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u16_rate(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_tab_name_name(writer, cookie, val) LOCI_SHOW_tab_name(writer, cookie, val)
+#define LOCI_SHOW_u32_max_entries(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_active_count(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u64_lookup_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_matched_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u32_out_group(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u64_cookie_mask(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
+#define LOCI_SHOW_u32_reserved(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u16_command(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u8_group_type(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u32_group_id(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u16_ethertype(writer, cookie, val) LOCI_SHOW_x16(writer, cookie, val)
+#define LOCI_SHOW_u8_mpls_ttl(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u8_nw_ecn(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u8_nw_ttl(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u16_weight(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_port_no_watch_port(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
+#define LOCI_SHOW_u32_watch_group(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_ref_count(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u64_metadata_mask(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
+#define LOCI_SHOW_mac_eth_src_mask(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
+#define LOCI_SHOW_mac_eth_dst_mask(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
+#define LOCI_SHOW_u32_ipv4_src_mask(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
+#define LOCI_SHOW_u32_ipv4_dst_mask(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
+#define LOCI_SHOW_u32_curr_speed(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_max_speed(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_match_bmap_match(writer, cookie, val) LOCI_SHOW_match_bmap(writer, cookie, val)
+#define LOCI_SHOW_u32_instructions(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_write_actions(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_apply_actions(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_types(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_max_groups_all(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_max_groups_select(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_max_groups_indirect(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_max_groups_ff(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_actions_all(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_actions_select(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_actions_indirect(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_actions_ff(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u64_generation_id(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
+#define LOCI_SHOW_octets_field(writer, cookie, val) LOCI_SHOW_octets(writer, cookie, val)
+#define LOCI_SHOW_u16_value(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u16_value_mask(writer, cookie, val) LOCI_SHOW_x16(writer, cookie, val)
+#define LOCI_SHOW_mac_value(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
+#define LOCI_SHOW_mac_value_mask(writer, cookie, val) LOCI_SHOW_mac(writer, cookie, val)
+#define LOCI_SHOW_u32_value(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_value_mask(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_oxm_header(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u8_value(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u8_value_mask(writer, cookie, val) LOCI_SHOW_x8(writer, cookie, val)
+#define LOCI_SHOW_port_no_value(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
+#define LOCI_SHOW_port_no_value_mask(writer, cookie, val) LOCI_SHOW_port_no(writer, cookie, val)
+#define LOCI_SHOW_ipv6_value(writer, cookie, val) LOCI_SHOW_ipv6(writer, cookie, val)
+#define LOCI_SHOW_ipv6_value_mask(writer, cookie, val) LOCI_SHOW_ipv6(writer, cookie, val)
+#define LOCI_SHOW_u64_value(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_value_mask(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
+#define LOCI_SHOW_u64_write_setfields(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
+#define LOCI_SHOW_u64_apply_setfields(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
+#define LOCI_SHOW_u64_metadata_match(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
+#define LOCI_SHOW_u64_metadata_write(writer, cookie, val) LOCI_SHOW_x64(writer, cookie, val)
+#define LOCI_SHOW_u32_packet_in_mask_equal_master(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_packet_in_mask_slave(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_port_status_mask_equal_master(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_port_status_mask_slave(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_flow_removed_mask_equal_master(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u32_flow_removed_mask_slave(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u8_auxiliary_id(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u32_meter_id(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_rate(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_burst_size(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u8_prec_level(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u64_packet_band_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_byte_band_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u32_max_meter(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_band_types(writer, cookie, val) LOCI_SHOW_x32(writer, cookie, val)
+#define LOCI_SHOW_u8_max_bands(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u8_max_color(writer, cookie, val) LOCI_SHOW_u8(writer, cookie, val)
+#define LOCI_SHOW_u64_packet_in_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_u64_byte_in_count(writer, cookie, val) LOCI_SHOW_u64(writer, cookie, val)
+#define LOCI_SHOW_octets_experimenter_data(writer, cookie, val) LOCI_SHOW_octets(writer, cookie, val)
+#define LOCI_SHOW_u32_dst(writer, cookie, val)        LOCI_SHOW_ipv4(writer, cookie, val)
+#define LOCI_SHOW_u32_service(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u32_status(writer, cookie, val) LOCI_SHOW_u32(writer, cookie, val)
+#define LOCI_SHOW_u16_subtype(writer, cookie, val) LOCI_SHOW_u16(writer, cookie, val)
+#define LOCI_SHOW_u32_ipv4_addr(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
+#define LOCI_SHOW_u32_ipv4_netmask(writer, cookie, val) LOCI_SHOW_ipv4(writer, cookie, val)
+
+
+
+
+#endif /* _LOCI_SHOW_H_ */
diff --git a/c_gen/templates/locitest/locitest_config.c b/c_gen/templates/locitest/locitest_config.c
new file mode 100644
index 0000000..c7c6fa2
--- /dev/null
+++ b/c_gen/templates/locitest/locitest_config.c
@@ -0,0 +1,49 @@
+:: # 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.
+::
+/* Copyright 2012, Big Switch Networks, Inc. */
+
+/******************************************************************************
+ *
+ *  /module/src/locitest_config.c
+ *
+ *  locitest Config Information
+ *
+ *****************************************************************************/
+#include <locitest/locitest_config.h> 
+#include <locitest/locitest.h> 
+#include "locitest_int.h" 
+#include <stdlib.h>
+#include <string.h>
+
+
+
+/* <auto.start.cdefs(LOCITEST_CONFIG_HEADER).source> */
+/* <auto.end.cdefs(LOCITEST_CONFIG_HEADER).source> */
+
+
+
diff --git a/c_gen/templates/locitest/locitest_enums.c b/c_gen/templates/locitest/locitest_enums.c
new file mode 100644
index 0000000..7c3f074
--- /dev/null
+++ b/c_gen/templates/locitest/locitest_enums.c
@@ -0,0 +1,47 @@
+:: # 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.
+::
+/* Copyright 2012, Big Switch Networks, Inc. */
+
+/******************************************************************************
+ *
+ *  /module/src/locitest_enums.c
+ *
+ *  locitest Enum Definitions
+ *
+ *****************************************************************************/
+#include <locitest/locitest_config.h> 
+#include <locitest/locitest.h> 
+#include "locitest_int.h" 
+
+
+
+#include <stdlib.h>
+#include <string.h>
+
+/* <auto.start.enum(ALL).source> */
+/* <auto.end.enum(ALL).source> */
diff --git a/c_gen/templates/locitest/locitest_int.h b/c_gen/templates/locitest/locitest_int.h
new file mode 100644
index 0000000..b058604
--- /dev/null
+++ b/c_gen/templates/locitest/locitest_int.h
@@ -0,0 +1,46 @@
+:: # 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.
+::
+/* Copyright 2012, Big Switch Networks, Inc. */
+
+/******************************************************************************
+ *
+ *  /module/src/locitest_int.h
+ *
+ *  locitest Internal Header
+ *
+ *****************************************************************************/
+#ifndef __LOCITEST_INT_H__
+#define __LOCITEST_INT_H__
+
+
+#include <locitest/locitest_config.h>
+
+
+
+#include <locitest/locitest.h> 
+#endif /* __LOCITEST_INT_H__ */
diff --git a/c_gen/templates/locitest/test_ext.c b/c_gen/templates/locitest/test_ext.c
new file mode 100644
index 0000000..1efcaf6
--- /dev/null
+++ b/c_gen/templates/locitest/test_ext.c
@@ -0,0 +1,69 @@
+:: # 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.
+::
+/* Copyright 2012, Big Switch Networks, Inc. */
+
+/**
+ * Test extensions
+ */
+
+#include <locitest/test_common.h>
+
+/**
+ * Simple tests for extension objects
+ */
+
+int
+test_ext_objs(void)
+{
+    of_action_bsn_mirror_t *obj;
+
+    obj = of_action_bsn_mirror_new(OF_VERSION_1_0);
+    TEST_ASSERT(obj != NULL);
+    TEST_ASSERT(obj->object_id == OF_ACTION_BSN_MIRROR);
+
+    TEST_ASSERT(of_action_to_object_id(OF_EXPERIMENTER_TYPE, OF_VERSION_1_0) ==
+                OF_ACTION_EXPERIMENTER);
+
+    TEST_ASSERT(of_action_id_to_object_id(OF_EXPERIMENTER_TYPE, OF_VERSION_1_0) ==
+                OF_ACTION_ID_EXPERIMENTER);
+
+    TEST_ASSERT(of_instruction_to_object_id(OF_EXPERIMENTER_TYPE, OF_VERSION_1_0) ==
+                OF_INSTRUCTION_EXPERIMENTER);
+
+    TEST_ASSERT(of_queue_prop_to_object_id(OF_EXPERIMENTER_TYPE, OF_VERSION_1_0) ==
+                OF_QUEUE_PROP_EXPERIMENTER);
+
+    TEST_ASSERT(of_meter_band_to_object_id(OF_EXPERIMENTER_TYPE, OF_VERSION_1_0) ==
+                OF_METER_BAND_EXPERIMENTER);
+
+    TEST_ASSERT(of_table_feature_prop_to_object_id(OF_EXPERIMENTER_TYPE,
+                                                   OF_VERSION_1_3) ==
+                OF_TABLE_FEATURE_PROP_EXPERIMENTER);
+
+    return TEST_PASS;
+}
diff --git a/c_gen/templates/locitest/test_list_limits.c b/c_gen/templates/locitest/test_list_limits.c
new file mode 100644
index 0000000..aef91d8
--- /dev/null
+++ b/c_gen/templates/locitest/test_list_limits.c
@@ -0,0 +1,100 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/**
+ * Test that list append fails gracefully when running out of wire buffer
+ * space.
+ */
+
+#include <locitest/test_common.h>
+
+static int
+test_list_limits(void)
+{
+    of_flow_stats_reply_t *obj = of_flow_stats_reply_new(OF_VERSION_1_0);
+    of_list_flow_stats_entry_t list;
+    of_flow_stats_entry_t *element = of_flow_stats_entry_new(OF_VERSION_1_0);
+    int i = 0;
+
+    of_flow_stats_reply_entries_bind(obj, &list);
+
+    ASSERT(element != NULL);
+
+
+    while (1) {
+        int rv = of_list_flow_stats_entry_append(&list, element);
+        ASSERT(rv == OF_ERROR_NONE || rv == OF_ERROR_RESOURCE);
+        if (rv != OF_ERROR_NONE) {
+            break;
+        }
+        i++;
+    }
+
+    ASSERT(i == 744);
+
+    of_flow_stats_entry_delete(element);
+    of_flow_stats_reply_delete(obj);
+    return TEST_PASS;
+}
+
+static int
+test_list_limits_bind(void)
+{
+    of_flow_stats_reply_t *obj = of_flow_stats_reply_new(OF_VERSION_1_0);
+    of_list_flow_stats_entry_t list;
+    int i = 0;
+    of_flow_stats_reply_entries_bind(obj, &list);
+
+
+    while (1) {
+        of_flow_stats_entry_t element;
+        int rv; 
+        of_flow_stats_entry_init(&element, OF_VERSION_1_0, -1, 1);
+        rv = of_list_flow_stats_entry_append_bind(&list, &element);
+        ASSERT(rv == OF_ERROR_NONE || rv == OF_ERROR_RESOURCE);
+        if (rv != OF_ERROR_NONE) {
+            break;
+        }
+        i++;
+    }
+
+    ASSERT(i == 744);
+
+    of_flow_stats_reply_delete(obj);
+    return TEST_PASS;
+}
+
+int
+run_list_limits_tests(void)
+{
+    RUN_TEST(list_limits);
+    RUN_TEST(list_limits_bind);
+
+    return TEST_PASS;
+}
diff --git a/c_gen/templates/locitest/test_match_utils.c b/c_gen/templates/locitest/test_match_utils.c
new file mode 100644
index 0000000..6e4a95e
--- /dev/null
+++ b/c_gen/templates/locitest/test_match_utils.c
@@ -0,0 +1,222 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/**
+ *
+ * Match utility test cases
+ *
+ */
+
+#include <locitest/test_common.h>
+
+int
+test_match_utils(void)
+{
+    of_mac_addr_t m1 = {{0,0,1,1,3,3}};
+    of_mac_addr_t m2 = {{0,0,1,1,3,3}};  /* m1 == m2 */
+    of_mac_addr_t m3 = {{0,0,1,1,1,1}};  /* m1 is more specific than m3 */
+    of_mac_addr_t m4 = {{0xf,0,1,1,3,3}};  /* m1 is not more specific m4 */
+    of_mac_addr_t m5 = {{0,0,1,1,3,0xf}};  /* m1 is not more specific m5 */
+
+    of_mac_addr_t m_mask1 = {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}};
+    of_mac_addr_t m_mask2 = {{0xff, 0xff, 0xff, 0xff, 0, 0}};
+
+    /* m1 matches m2 for mask1 */
+    /* m1 matches m2 for mask2 */
+    /* m1 does not match m3, m4, m5 for mask1 */
+    /* m1 matches m3, m5 for mask2 */
+    /* m1 does not match m4 for mask2 */
+
+    of_ipv6_t i1 = {{0,0,0,0,1,1,1,1,3,3,3,3,7,7,7,7}};  /* same as above */
+    of_ipv6_t i2 = {{0,0,0,0,1,1,1,1,3,3,3,3,7,7,7,7}};  
+    of_ipv6_t i3 = {{0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1}};
+    of_ipv6_t i4 = {{0xf,0,0,0,1,1,1,1,3,3,3,3,7,7,7,7}};
+    of_ipv6_t i5 = {{0,0,0,0,1,1,1,1,3,3,3,3,7,7,7,0xf}};
+
+    of_ipv6_t i_mask1 = {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+                          0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}};
+    of_ipv6_t i_mask2 = {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+                          0, 0, 0, 0, 0, 0, 0, 0}};
+
+    /* Same relationships as above */
+
+    uint32_t v1 = 3;  /* same as above */
+    uint32_t v2 = 3;
+    uint32_t v3 = 1;
+    uint32_t v4 = 4;
+    uint32_t v5 = (1 << 31) | 1;
+
+    uint32_t u32_mask1 = -1;
+    uint32_t u32_mask2 = 1;
+
+    uint64_t w1 = 3;  /* same as above */
+    uint64_t w2 = 3;
+    uint64_t w3 = 1;
+    uint64_t w4 = 4;
+    uint64_t w5 = (1LL << 63) | 1LL;
+
+    uint64_t u64_mask1 = -1;
+    uint64_t u64_mask2 = 1;
+
+    /* Match structures */
+    of_match_t match1, match2;
+
+    TEST_ASSERT(OF_MORE_SPECIFIC_MAC_ADDR(&m1, &m2));
+    TEST_ASSERT(OF_MORE_SPECIFIC_MAC_ADDR(&m1, &m3));
+    TEST_ASSERT(!OF_MORE_SPECIFIC_MAC_ADDR(&m1, &m4));
+    TEST_ASSERT(!OF_MORE_SPECIFIC_MAC_ADDR(&m1, &m5));
+
+    TEST_ASSERT(OF_MORE_SPECIFIC_IPV6(&i1, &i2));
+    TEST_ASSERT(OF_MORE_SPECIFIC_IPV6(&i1, &i3));
+    TEST_ASSERT(!OF_MORE_SPECIFIC_IPV6(&i1, &i4));
+    TEST_ASSERT(!OF_MORE_SPECIFIC_IPV6(&i1, &i5));
+
+    TEST_ASSERT(OF_MORE_SPECIFIC_INT(v1, v2));
+    TEST_ASSERT(OF_MORE_SPECIFIC_INT(v1, v3));
+    TEST_ASSERT(!OF_MORE_SPECIFIC_INT(v1, v4));
+    TEST_ASSERT(!OF_MORE_SPECIFIC_INT(v1, v5));
+
+    TEST_ASSERT(OF_MORE_SPECIFIC_INT(w1, w2));
+    TEST_ASSERT(OF_MORE_SPECIFIC_INT(w1, w3));
+    TEST_ASSERT(!OF_MORE_SPECIFIC_INT(w1, w4));
+    TEST_ASSERT(!OF_MORE_SPECIFIC_INT(w1, w5));
+
+    /* Test restricted matches on macs */
+    TEST_ASSERT(OF_RESTRICTED_MATCH_MAC_ADDR(&m1, &m2, &m_mask1));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_MAC_ADDR(&m1, &m3, &m_mask1));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_MAC_ADDR(&m1, &m4, &m_mask1));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_MAC_ADDR(&m1, &m5, &m_mask1));
+
+    TEST_ASSERT(OF_RESTRICTED_MATCH_MAC_ADDR(&m1, &m2, &m_mask2));
+    TEST_ASSERT(OF_RESTRICTED_MATCH_MAC_ADDR(&m1, &m3, &m_mask2));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_MAC_ADDR(&m1, &m4, &m_mask2));
+    TEST_ASSERT(OF_RESTRICTED_MATCH_MAC_ADDR(&m1, &m5, &m_mask2));
+
+    /* Test overlap */
+    TEST_ASSERT(OF_OVERLAP_MAC_ADDR(&m1, &m2, &m_mask1, &m_mask2));
+    TEST_ASSERT(OF_OVERLAP_MAC_ADDR(&m1, &m3, &m_mask1, &m_mask2));
+    TEST_ASSERT(!OF_OVERLAP_MAC_ADDR(&m1, &m3, &m_mask1, &m_mask1));
+    TEST_ASSERT(!OF_OVERLAP_MAC_ADDR(&m1, &m4, &m_mask1, &m_mask2));
+    TEST_ASSERT(OF_OVERLAP_MAC_ADDR(&m1, &m5, &m_mask1, &m_mask2));
+
+    /* Test restricted matches on ipv6 */
+    TEST_ASSERT(OF_RESTRICTED_MATCH_IPV6(&i1, &i2, &i_mask1));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_IPV6(&i1, &i3, &i_mask1));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_IPV6(&i1, &i4, &i_mask1));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_IPV6(&i1, &i5, &i_mask1));
+
+    TEST_ASSERT(OF_RESTRICTED_MATCH_IPV6(&i1, &i2, &i_mask2));
+    TEST_ASSERT(OF_RESTRICTED_MATCH_IPV6(&i1, &i3, &i_mask2));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_IPV6(&i1, &i4, &i_mask2));
+    TEST_ASSERT(OF_RESTRICTED_MATCH_IPV6(&i1, &i5, &i_mask2));
+
+    /* Test overlap */
+    TEST_ASSERT(OF_OVERLAP_IPV6(&i1, &i2, &i_mask1, &i_mask2));
+    TEST_ASSERT(OF_OVERLAP_IPV6(&i1, &i3, &i_mask1, &i_mask2));
+    TEST_ASSERT(!OF_OVERLAP_IPV6(&i1, &i3, &i_mask1, &i_mask1));
+    TEST_ASSERT(!OF_OVERLAP_IPV6(&i1, &i4, &i_mask1, &i_mask2));
+    TEST_ASSERT(OF_OVERLAP_IPV6(&i1, &i5, &i_mask1, &i_mask2));
+
+    /* Test restricted matches on uint32 */
+    TEST_ASSERT(OF_RESTRICTED_MATCH_INT(v1, v2, u32_mask1));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_INT(v1, v3, u32_mask1));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_INT(v1, v4, u32_mask1));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_INT(v1, v5, u32_mask1));
+
+    TEST_ASSERT(OF_RESTRICTED_MATCH_INT(v1, v2, u32_mask2));
+    TEST_ASSERT(OF_RESTRICTED_MATCH_INT(v1, v3, u32_mask2));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_INT(v1, v4, u32_mask2));
+    TEST_ASSERT(OF_RESTRICTED_MATCH_INT(v1, v5, u32_mask2));
+
+    /* Test overlap */
+    TEST_ASSERT(OF_OVERLAP_INT(v1, v2, u32_mask1, u32_mask2));
+    TEST_ASSERT(OF_OVERLAP_INT(v1, v3, u32_mask1, u32_mask2));
+    TEST_ASSERT(!OF_OVERLAP_INT(v1, v3, u32_mask1, u32_mask1));
+    TEST_ASSERT(!OF_OVERLAP_INT(v1, v4, u32_mask1, u32_mask2));
+    TEST_ASSERT(OF_OVERLAP_INT(v1, v5, u32_mask1, u32_mask2));
+
+    /* Test restricted matches on uint64 */
+    TEST_ASSERT(OF_RESTRICTED_MATCH_INT(w1, w2, u64_mask1));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_INT(w1, w3, u64_mask1));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_INT(w1, w4, u64_mask1));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_INT(w1, w5, u64_mask1));
+
+    TEST_ASSERT(OF_RESTRICTED_MATCH_INT(w1, w2, u64_mask2));
+    TEST_ASSERT(OF_RESTRICTED_MATCH_INT(w1, w3, u64_mask2));
+    TEST_ASSERT(!OF_RESTRICTED_MATCH_INT(w1, w4, u64_mask2));
+    TEST_ASSERT(OF_RESTRICTED_MATCH_INT(w1, w5, u64_mask2));
+
+    /* Test overlap */
+    TEST_ASSERT(OF_OVERLAP_INT(w1, w2, u64_mask1, u64_mask2));
+    TEST_ASSERT(OF_OVERLAP_INT(w1, w3, u64_mask1, u64_mask2));
+    TEST_ASSERT(!OF_OVERLAP_INT(w1, w3, u64_mask1, u64_mask1));
+    TEST_ASSERT(!OF_OVERLAP_INT(w1, w4, u64_mask1, u64_mask2));
+    TEST_ASSERT(OF_OVERLAP_INT(w1, w5, u64_mask1, u64_mask2));
+
+    /* Test match stuctures */
+    of_match_populate(&match1, OF_VERSION_1_2, 1);
+    of_match_populate(&match2, OF_VERSION_1_2, 1);
+    TEST_ASSERT(of_match_eq(&match1, &match2));
+    TEST_ASSERT(of_match_eq(&match2, &match1));
+    TEST_ASSERT(of_match_more_specific(&match1, &match2));
+    TEST_ASSERT(of_match_more_specific(&match2, &match1));
+    TEST_ASSERT(of_match_overlap(&match1, &match2));
+    TEST_ASSERT(of_match_overlap(&match2, &match1));
+
+    /* Change match2 so it still is extended by match1 */
+    memset(&match2.masks.eth_dst, 0, sizeof(of_mac_addr_t));
+    TEST_ASSERT(of_match_more_specific(&match1, &match2));
+    TEST_ASSERT(!of_match_more_specific(&match2, &match1));
+    TEST_ASSERT(!of_match_eq(&match1, &match2));
+    TEST_ASSERT(of_match_overlap(&match1, &match2));
+    TEST_ASSERT(of_match_overlap(&match2, &match1));
+
+    /* Now change a value so that matches disagree */
+    match2.fields.in_port++;
+    TEST_ASSERT(!of_match_more_specific(&match1, &match2));
+    TEST_ASSERT(!of_match_overlap(&match1, &match2));
+    TEST_ASSERT(!of_match_overlap(&match2, &match1));
+    /* Clear inport mask on match2 and should extend again */
+    match2.masks.in_port = 0;
+    TEST_ASSERT(of_match_more_specific(&match1, &match2));
+    TEST_ASSERT(of_match_overlap(&match1, &match2));
+    TEST_ASSERT(of_match_overlap(&match2, &match1));
+
+    /* Now change mask so the overlap, but not more specific */
+    match1.fields.in_port = 0x7;
+    match1.masks.in_port = 0x7;
+    match2.fields.in_port = 0xe;
+    match2.masks.in_port = 0xe;
+    TEST_ASSERT(!of_match_more_specific(&match1, &match2));
+    TEST_ASSERT(!of_match_more_specific(&match2, &match1));
+    TEST_ASSERT(of_match_overlap(&match1, &match2));
+    TEST_ASSERT(of_match_overlap(&match2, &match1));
+    
+    return TEST_PASS;
+}
diff --git a/c_gen/templates/locitest/test_setup_from_add.c b/c_gen/templates/locitest/test_setup_from_add.c
new file mode 100644
index 0000000..6988572
--- /dev/null
+++ b/c_gen/templates/locitest/test_setup_from_add.c
@@ -0,0 +1,132 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/**
+ * Test code for setup from flow add routines
+ */
+
+#include <locitest/test_common.h>
+
+#if !defined(__APPLE__)
+#include <mcheck.h>
+#define MCHECK_INIT mcheck(NULL)
+#else /* mcheck not available under OS X */
+#define MCHECK_INIT do { } while (0)
+#endif
+
+
+static int
+test_removed_setup_from_add(void)
+{
+    of_flow_removed_t *removed;
+    of_flow_add_t *add;
+    of_match_t m1, m2;
+
+    TEST_ASSERT((add = of_flow_add_new(OF_VERSION_1_0)) != NULL);
+    TEST_ASSERT((removed = of_flow_removed_new(OF_VERSION_1_0)) != NULL);
+
+    TEST_ASSERT(of_flow_add_OF_VERSION_1_0_populate(add, 1) != 0);
+    TEST_ASSERT(of_flow_add_match_get(add, &m1) == 0);
+
+    TEST_ASSERT(of_flow_removed_setup_from_flow_add(removed, add) == 0);
+    TEST_ASSERT(of_flow_removed_match_get(removed, &m2) == 0);
+    TEST_ASSERT(memcmp(&m1, &m2, sizeof(m1)) == 0);
+
+    of_flow_add_delete(add);
+    of_flow_removed_delete(removed);
+
+    return TEST_PASS;
+}
+
+
+static int
+test_stats_entry_setup_from_add(void)
+{
+    of_flow_add_t *add;
+    of_flow_stats_entry_t *entry;
+    of_match_t m1, m2;
+    of_list_action_t *list;
+    of_list_action_t list_out;
+
+    TEST_ASSERT((add = of_flow_add_new(OF_VERSION_1_0)) != NULL);
+    TEST_ASSERT((entry = of_flow_stats_entry_new(OF_VERSION_1_0)) != NULL);
+
+    TEST_ASSERT(of_flow_add_OF_VERSION_1_0_populate(add, 1) != 0);
+    TEST_ASSERT(of_flow_add_match_get(add, &m1) == 0);
+
+    TEST_ASSERT(of_flow_stats_entry_setup_from_flow_add(entry, add, NULL) == 0);
+    TEST_ASSERT(of_flow_stats_entry_match_get(entry, &m2) == 0);
+    TEST_ASSERT(memcmp(&m1, &m2, sizeof(m1)) == 0);
+
+    of_flow_add_delete(add);
+    of_flow_stats_entry_delete(entry);
+
+    /* @todo check action lists agree */
+
+    /* Same with an external action list */
+
+    TEST_ASSERT((add = of_flow_add_new(OF_VERSION_1_0)) != NULL);
+    TEST_ASSERT((entry = of_flow_stats_entry_new(OF_VERSION_1_0)) != NULL);
+
+    TEST_ASSERT(of_flow_add_OF_VERSION_1_0_populate(add, 1) != 0);
+    TEST_ASSERT(of_flow_add_match_get(add, &m1) == 0);
+
+    list = of_list_action_new(OF_VERSION_1_0);
+    TEST_ASSERT(list != NULL);
+    TEST_ASSERT(of_list_action_OF_VERSION_1_0_populate(list, 1) != 0);
+
+    /* Verify matches agree */
+    TEST_ASSERT(of_flow_stats_entry_setup_from_flow_add(entry, add, list) == 0);
+    TEST_ASSERT(of_flow_stats_entry_match_get(entry, &m2) == 0);
+    TEST_ASSERT(memcmp(&m1, &m2, sizeof(m1)) == 0);
+
+    of_list_action_init(&list_out, OF_VERSION_1_0, 0, 1);
+    of_flow_stats_entry_actions_bind(entry, &list_out);
+
+    /* Verify lists agree */
+    TEST_ASSERT(list->length == list_out.length);
+    TEST_ASSERT(memcmp(WBUF_BUF(list->wire_object.wbuf),
+                       WBUF_BUF(list_out.wire_object.wbuf),
+                       list->length));
+
+    of_flow_add_delete(add);
+    of_list_action_delete(list);
+    of_flow_stats_entry_delete(entry);
+
+    return TEST_PASS;
+}
+
+
+int run_setup_from_add_tests(void)
+{
+    RUN_TEST(removed_setup_from_add);
+    RUN_TEST(stats_entry_setup_from_add);
+
+    return TEST_PASS;
+}
diff --git a/c_gen/templates/locitest/test_utils.c b/c_gen/templates/locitest/test_utils.c
new file mode 100644
index 0000000..adc6d42
--- /dev/null
+++ b/c_gen/templates/locitest/test_utils.c
@@ -0,0 +1,128 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/**
+ *
+ * Test utility functions
+ *
+ */
+
+#include <locitest/test_common.h>
+#include <loci/of_utils.h>
+
+/**
+ * Test has output port utility function
+ */
+int
+test_has_outport(void)
+{
+    of_list_action_t *list;
+    of_action_t elt;
+    of_action_set_dl_src_t *set_dl_src;
+    of_action_output_t *output;
+
+    set_dl_src = &elt.set_dl_src;
+    output = &elt.output;
+
+    list = of_list_action_new(OF_VERSION_1_0);
+    TEST_ASSERT(list != NULL);
+
+    TEST_ASSERT(of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD));
+    TEST_ASSERT(!of_action_list_has_out_port(list, 1));
+
+    /* Add some other action */
+    of_action_set_dl_src_init(set_dl_src, OF_VERSION_1_0, -1, 1);
+    TEST_OK(of_list_action_append_bind(list, (of_action_t *)set_dl_src));
+
+    TEST_ASSERT(of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD));
+    TEST_ASSERT(!of_action_list_has_out_port(list, 1));
+
+    /* Add port 2 */
+    of_action_output_init(output, OF_VERSION_1_0, -1, 1);
+    TEST_OK(of_list_action_append_bind(list, (of_action_t *)output));
+    of_action_output_port_set(output, 2);
+
+    TEST_ASSERT(of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD));
+    TEST_ASSERT(!of_action_list_has_out_port(list, 1));
+    TEST_ASSERT(of_action_list_has_out_port(list, 2));
+
+    /* Add port 1 */
+    of_action_output_init(output, OF_VERSION_1_0, -1, 1);
+    TEST_OK(of_list_action_append_bind(list, (of_action_t *)output));
+    of_action_output_port_set(output, 1);
+
+    TEST_ASSERT(of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD));
+    TEST_ASSERT(of_action_list_has_out_port(list, 1));
+    TEST_ASSERT(of_action_list_has_out_port(list, 2));
+
+    /* Start over and put action at front of list */
+    of_list_action_delete(list);
+
+    list = of_list_action_new(OF_VERSION_1_0);
+    TEST_ASSERT(list != NULL);
+
+    /* Add port 2 */
+    of_action_output_init(output, OF_VERSION_1_0, -1, 1);
+    TEST_OK(of_list_action_append_bind(list, (of_action_t *)output));
+    of_action_output_port_set(output, 2);
+
+    TEST_ASSERT(of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD));
+    TEST_ASSERT(!of_action_list_has_out_port(list, 1));
+    TEST_ASSERT(of_action_list_has_out_port(list, 2));
+
+    /* Add some other action */
+    of_action_set_dl_src_init(set_dl_src, OF_VERSION_1_0, -1, 1);
+    TEST_OK(of_list_action_append_bind(list, (of_action_t *)set_dl_src));
+
+    TEST_ASSERT(of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD));
+    TEST_ASSERT(!of_action_list_has_out_port(list, 1));
+    TEST_ASSERT(of_action_list_has_out_port(list, 2));
+
+    /* Add port 1 */
+    of_action_output_init(output, OF_VERSION_1_0, -1, 1);
+    TEST_OK(of_list_action_append_bind(list, (of_action_t *)output));
+    of_action_output_port_set(output, 1);
+
+    TEST_ASSERT(of_action_list_has_out_port(list, OF_PORT_DEST_WILDCARD));
+    TEST_ASSERT(of_action_list_has_out_port(list, 1));
+    TEST_ASSERT(of_action_list_has_out_port(list, 2));
+
+    of_list_action_delete(list);
+
+    return TEST_PASS;
+}
+
+int
+run_utility_tests(void)
+{
+    RUN_TEST(has_outport);
+    RUN_TEST(dump_objs);
+
+    return TEST_PASS;
+}
diff --git a/c_gen/templates/locitest/test_validator.c b/c_gen/templates/locitest/test_validator.c
new file mode 100644
index 0000000..cac67f7
--- /dev/null
+++ b/c_gen/templates/locitest/test_validator.c
@@ -0,0 +1,113 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/**
+ * Test message validator
+ *
+ * Run the message validator on corrupt messages to ensure it catches them.
+ */
+
+#include "loci_log.h"
+
+#include <locitest/test_common.h>
+#include <loci/loci_validator.h>
+
+static int
+test_validate_fixed_length(void)
+{
+    of_table_stats_request_t *obj = of_table_stats_request_new(OF_VERSION_1_0);
+    of_message_t msg = OF_OBJECT_TO_MESSAGE(obj);
+
+    TEST_ASSERT(of_validate_message(msg, of_message_length_get(msg)) == 0);
+
+    of_message_length_set(msg, of_message_length_get(msg) - 1);
+    TEST_ASSERT(of_validate_message(msg, of_message_length_get(msg)) == -1);
+
+    of_table_stats_request_delete(obj);
+    return TEST_PASS;
+}
+
+static int
+test_validate_fixed_length_list(void)
+{
+    of_table_stats_reply_t *obj = of_table_stats_reply_new(OF_VERSION_1_0);
+    of_list_table_stats_entry_t list;
+    of_table_stats_entry_t element;
+    of_message_t msg; 
+    of_table_stats_reply_entries_bind(obj, &list);
+    of_table_stats_entry_init(&element, OF_VERSION_1_0, -1, 1);
+    of_list_table_stats_entry_append_bind(&list, &element);
+    of_list_table_stats_entry_append_bind(&list, &element);
+    msg = OF_OBJECT_TO_MESSAGE(obj);
+
+    TEST_ASSERT(of_validate_message(msg, of_message_length_get(msg)) == 0);
+
+    of_message_length_set(msg, of_message_length_get(msg) - 1);
+    TEST_ASSERT(of_validate_message(msg, of_message_length_get(msg)) == -1);
+
+    of_table_stats_reply_delete(obj);
+    return TEST_PASS;
+}
+
+static int
+test_validate_tlv16_list(void)
+{
+    of_flow_modify_t *obj = of_flow_modify_new(OF_VERSION_1_0);
+    of_list_action_t list;
+    of_action_set_tp_dst_t element1;
+    of_action_output_t element2;
+    of_message_t msg; 
+    of_flow_modify_actions_bind(obj, &list);
+    of_action_set_tp_dst_init(&element1, OF_VERSION_1_0, -1, 1);
+    of_list_action_append_bind(&list, (of_action_t *)&element1);
+    of_action_output_init(&element2, OF_VERSION_1_0, -1, 1);
+    of_list_action_append_bind(&list, (of_action_t *)&element2);
+    msg = OF_OBJECT_TO_MESSAGE(obj);
+
+    TEST_ASSERT(of_validate_message(msg, of_message_length_get(msg)) == 0);
+
+    of_message_length_set(msg, of_message_length_get(msg) - 1);
+    TEST_ASSERT(of_validate_message(msg, of_message_length_get(msg)) == -1);
+
+    of_message_length_set(msg, of_message_length_get(msg) + 2);
+    TEST_ASSERT(of_validate_message(msg, of_message_length_get(msg)) == -1);
+
+    of_flow_modify_delete(obj);
+    return TEST_PASS;
+}
+
+int
+run_validator_tests(void)
+{
+    RUN_TEST(validate_fixed_length);
+    RUN_TEST(validate_fixed_length_list);
+    RUN_TEST(validate_tlv16_list);
+
+    return TEST_PASS;
+}
diff --git a/c_gen/templates/locitest/unittest.h b/c_gen/templates/locitest/unittest.h
new file mode 100644
index 0000000..7ffc413
--- /dev/null
+++ b/c_gen/templates/locitest/unittest.h
@@ -0,0 +1,56 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+#ifndef UNITTEST_H
+#define UNITTEST_H
+
+#include <stdio.h>
+
+#define TEST_PASS 1
+#define TEST_FAIL 0
+
+#define TESTCASE(foo, rv) do {                                          \
+        fprintf(stderr, "test %s:", #foo);                              \
+        fprintf(stderr, "  %s\n", (rv = test_##foo()) ? "PASS" : "FAIL"); \
+    } while (0)
+
+#define TEST_ASSERT(result) if (!(result)) do {                         \
+        fprintf(stderr, "\nTEST ASSERT FAILURE "                        \
+               #result " :: %s:%d\n",__FILE__,__LINE__);                \
+        ASSERT(0);                                                      \
+        return TEST_FAIL;                                               \
+    } while (0)
+
+#define TEST_ASSERT_EQUAL(expected, result) \
+    TEST_ASSERT(((expected) == (result)))
+
+#define TEST_ASSERT_NOT_EQUAL(expected, result) \
+    TEST_ASSERT(((expected) != (result)))
+
+#endif
diff --git a/c_gen/templates/of_buffer.h b/c_gen/templates/of_buffer.h
new file mode 100644
index 0000000..05cc587
--- /dev/null
+++ b/c_gen/templates/of_buffer.h
@@ -0,0 +1,139 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/****************************************************************
+ *
+ * Low level buffer manipulation functions
+ * Requires low level type defs
+ *
+ ****************************************************************/
+
+#ifndef _OF_BUFFER_H_
+#define _OF_BUFFER_H_
+
+#include <loci/loci_base.h>
+#include <stdio.h>
+
+/* Function type used for a "free" operation of a low level buffer */
+typedef void (*of_buffer_free_f)(void *buf);
+
+
+/****************************************************************
+ *
+ * Low level buffers accessors handling endian and alignment
+ *
+ ****************************************************************/
+
+static inline void
+buf_ipv6_get(uint8_t *buf, of_ipv6_t *val) {
+    MEMCPY(val, buf, sizeof(*val));
+    IPV6_NTOH(val, val); /* probably a no-op */
+}
+
+static inline void
+buf_mac_get(uint8_t *buf, of_mac_addr_t *val) {
+    MEMCPY(val, buf, sizeof(*val));
+}
+
+static inline void
+buf_u64_get(uint8_t *buf, uint64_t *val) {
+    MEMCPY(val, buf, sizeof(*val));
+    *val = U64_NTOH(*val);
+}
+
+static inline void
+buf_u32_get(uint8_t *buf, uint32_t *val) {
+    MEMCPY(val, buf, sizeof(*val));
+    *val = U32_NTOH(*val);
+}
+
+static inline void
+buf_u16_get(uint8_t *buf, uint16_t *val) {
+    MEMCPY(val, buf, sizeof(uint16_t));
+    *val = U16_NTOH(*val);
+}
+
+static inline void
+buf_u8_get(uint8_t *buf, uint8_t *val) {
+    *val = *buf;
+}
+
+static inline void
+buf_octets_get(uint8_t *buf, uint8_t *dst, int bytes) {
+    MEMCPY(dst, buf, bytes);
+}
+
+static inline void
+buf_ipv6_set(uint8_t *buf, of_ipv6_t *val) {
+    /* FIXME:  If this is not a NO-OP, need to change the code */
+#if 1
+    MEMCPY(buf, val, sizeof(*val));
+#else
+    of_ipv6_t w_val;
+    MEMCPY(&w_val, val sizeof(w_val));
+    IPV6_HTON(w_val, w_val);
+    MEMCPY(buf, &w_val, sizeof(w_val));
+#endif
+}
+
+static inline void
+buf_mac_addr_set(uint8_t *buf, of_mac_addr_t *val) {
+    MEMCPY(buf, val, sizeof(of_mac_addr_t));
+}
+
+static inline void
+buf_u64_set(uint8_t *buf, uint64_t val) {
+    val = U64_HTON(val);
+    MEMCPY(buf, &val, sizeof(uint64_t));
+}
+
+static inline void
+buf_u32_set(uint8_t *buf, uint32_t val) {
+    val = U32_HTON(val);
+    MEMCPY(buf, &val, sizeof(uint32_t));
+}
+
+static inline void
+buf_u16_set(uint8_t *buf, uint16_t val) {
+    val = U16_NTOH(val);
+    MEMCPY(buf, &val, sizeof(uint16_t));
+}
+
+static inline void
+buf_u8_set(uint8_t *buf, uint8_t val) {
+    *buf = val;
+}
+
+static inline void
+buf_octets_set(uint8_t *buf, uint8_t *src, int bytes) {
+    MEMCPY(buf, src, bytes);
+}
+
+
+#endif /* _OF_BUFFER_H_ */
diff --git a/c_gen/templates/of_doc.h b/c_gen/templates/of_doc.h
new file mode 100644
index 0000000..9e352f0
--- /dev/null
+++ b/c_gen/templates/of_doc.h
@@ -0,0 +1,439 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/**
+ * @file of_doc.h
+ * @brief Documentation of sample functions
+ *
+ * This file is for documentation purposes only
+ *
+ * Once the code is in a working state, this documentation will be 
+ * transfered to the actual source files
+ *
+ * The functions documented here are simple templates for accessors that
+ * are used for all accessor members of LOCI objects.  Data types are
+ * divided into:
+ *
+ * @li @c scalar Things like uint8_t, uint16_t, of_mac_addr_t as well as
+ * fixed length strings
+ * @li @c octets Arbitrary length strings of binary data
+ * @li @c composite Data members which are structures
+ * @li @c list The list abstraction for data members
+ * @li @c list_element An element of a list (usually a composite object)
+ *
+ * List elements get special treatment for iterating across a list or 
+ * appending new entries to the list.  All others have 'set' and 'get'
+ * operations.  
+ *
+ * Scalars operations are "stateless" in that they simply
+ * update the underlying data or return that data.  
+ *
+ * Composites and list members update structures to point to the
+ * underlying data.  As a result, care must be taken that objects are
+ * not freed when linked composite or list members remain referring to
+ * the underlying data structure.  Currently: Note that reference
+ * counting won't solve this with the current approach as the
+ * referring objects may be automatic and not subject to alloc/free
+ * operations.
+ */
+
+
+
+/**
+ * Generic documentation for scalar get methods
+ * @param obj The object being accessed
+ * @param value A pointer to a scalar instance of the proper type
+ * @return OF_ERROR_XXX
+ *
+ * Accesses the underlying wire buffer at the appropriate offset to
+ * retrieve and convert the value, placing the result in *value.
+ *
+ * Examples of scalar types include:
+ * @li uint8_t
+ * @li uint16_t
+ * @li uint32_t
+ * @li uint64_t
+ * @li of_mac_addr_t
+ *
+ * Examples calls include:
+ * @li rv = of_port_status_reason_get(obj, &reason)
+ * @li rv = of_table_mod_config_get(obj, &config)
+ *
+ * An object instance can call directly as:
+ * @li rv = obj->reason_get(obj, &reason);    obj is an of_table_mod_t *
+ * @li rv = obj->config_get(obj, &config);    obj is an of_table_mod_t *
+ */
+extern int of_object_scalar_member_get(of_object_t *obj, uint32_t *value);
+
+/**
+ * Generic documentation for scalar set methods
+ * @param obj The object being accessed
+ * @param value Call by value parameter with the value to set
+ * @return OF_ERROR_XXX
+ *
+ * Converts value to the proper wire representation and writes it to
+ * the underlying wire buffer at the appropriate offset.
+ */
+extern int of_object_scalar_member_set(of_object_t *obj, uint32_t value);
+
+/**
+ * Generic documentation for an octets data get method
+ * @param obj The object being accessed
+ * @param value A pointer to an of_octets_t structure to be filled out 
+ * @return OF_ERROR_XXX
+ *
+ * NOTE: 
+ * Sets *bytes to the number of bytes in the octet string.
+ */
+extern int of_object_octets_member_data_get(of_object_t *obj, of_octets_t *value);
+
+/**
+ * Generic documentation for an octets data set method
+ * @param obj The object being accessed
+ * @param value Pointer to an of_octets_t structure pointing to memory from
+ * which data will be copied to wire buffer
+ * @return OF_ERROR_XXX
+ *
+ * Copies data from the memory pointed to by value into the underlying 
+ * wire buffer, extending the buffer if necessary.  The length of obj 
+ * is updated.
+ *
+ * If the length of obj changes (because the existing octets instance is of
+ * a different length) its internal length accessor is called to update
+ * anything tracking its length.  This may call the object's parent
+ * length accessor with the update.
+ */
+extern int of_object_octets_member_data_set(of_object_t *obj, of_octets_t *value);
+
+/**
+ * Generic documentation for an octets pointer get method
+ * @param obj The object being accessed
+ * @param value Pointer to an of_octets_t structure to be initialized
+ * @return OF_ERROR_XXX
+ *
+ * Set the octets object *value to point to the underlying data buffer.  The
+ * length member of *value is set as well.
+ *
+ * The result should be treated as READ ONLY information as modifying
+ * the buffer could cause corruption of the underlying LOCI object.
+ * To change the value (especially the length) of an octets data member,
+ * allocate and set a memory buffer and use the octets_member_data_set 
+ * function.
+ */
+extern int of_object_octets_member_ptr_get(of_object_t *obj, of_octets_t *value);
+
+/**
+ * Generic documentation for a composite sub-object get method
+ * @param obj The object being accessed
+ * @param value Pointer to an object (the sub-object) of the proper type
+ * @return OF_ERROR_XXX
+ *
+ * A composite is a structure with multiple components.  On a 'get'
+ * operation, a pointer (value) to an unused instance of the appropriate 
+ * type is passed to this routine.  That instance is intialized with the
+ * proper accessor functions for the sub-object type and the wire object
+ * is set up to point to obj's wire buffer at the appropriate offset.
+ *
+ * If changes are made to the sub-object (*value) and those changes
+ * affect the length, then the corresponding composite_set must be
+ * called to commit those changes to the parent.
+ */
+extern int of_object_composite_member_get(of_object_t *obj, 
+                                          of_object_t *value);
+
+/**
+ * Generic documentation for a composite sub-object set method
+ * @param obj The object being accessed
+ * @param value Pointer to an object (the sub-object) of the proper type
+ * @return OF_ERROR_XXX
+ *
+ * A composite is a structure with multiple components.  On a 'set'
+ * operation, a pointer (value) to an instance of the appropriate type
+ * is passed to this routine.  
+ *
+ * If the parent (obj) and the child (value) point to the same underlying
+ * wire object, then the changes to the underlying buffer are already
+ * recorded.
+ *
+ * Otherwise, any existing value of the sub-object is replaced
+ * by copying the wire buffer contents from value's wire buffer to obj's
+ * wire buffer at the appropriate offset.
+ *
+ * In either case, the length of the parent will be updated if it changes.
+ */
+extern int of_object_composite_member_set(of_object_t *obj, 
+                                          of_object_t *value);
+
+/**
+ * Generic documentation for a list sub-object get method
+ * @param obj The object being accessed
+ * @param value Pointer to an object (the list sub-object)
+ * @return OF_ERROR_XXX
+ *
+ * A list is an array of instances of objects of a common (possibly
+ * polymorphic) type.  On a 'get' operation, a pointer (value) to an
+ *  unused instance of the appropriate list type is passed to this
+ * routine.  That instance is intialized with the proper accessor
+ * functions for the list type and the wire object is set up to point
+ * to obj's wire buffer at the appropriate offset.
+ *
+ * Currently, the list object returned by a 'get' operation should not
+ * be altered, although changes that do not affect the length of
+ * sub-objects will work.
+ *
+ * Rather, lists should either be cleared and set from completely new
+ * instances using 'list_set', or they may be built using the append
+ * operations described below.
+ *
+ * @sa of_object_list_append_bind
+ * @sa of_object_list_append
+ */
+extern int of_object_list_member_get(of_object_t *obj, 
+                                     of_list_object_t *value);
+
+/**
+ * Generic documentation for a list entry first call
+ * @param obj The list object being accessed
+ * @param value Pointer to a generic list entry instance
+ * @return OF_ERROR_RANGE if the list is empty
+ *
+ * A list is an array of instances of objects of a common (possibly
+ * polymorphic) type.  
+ *
+ * This routine is intended for iterating through a list for
+ * reading.  Normally a 'get' operation will be done on the parent
+ * of the list to retrieve (a pointer to) the list, and then this routine
+ * will be called to set up a generic entry representing the first 
+ * element of the list.
+ *
+ * @sa of_object_list_entry_next
+ */
+extern int of_object_list_entry_first(of_list_object_t *obj, 
+                                      of_object_t *value);
+
+/**
+ * Generic documentation for a list entry next call
+ * @param obj The list object being accessed
+ * @param value Pointer to a generic list entry instance
+ * @return OF_ERROR_RANGE if the value already points to the last item 
+ * in the list
+
+ * A list is an array of instances of objects of a common (possibly
+ * polymorphic) type.  
+ *
+ * The corresponding list_entry_first must be called on the pair of
+ * parameters initially.  There after, this routine will advance the
+ * pointers in the wire object of value to the subsequent entry in the
+ * list.
+ *
+ * Changes should not be made to list items using these routines,
+ * although 'set' operations which do not change the length of the
+ * instance will work.
+ *
+ * @sa of_object_list_entry_first
+ */
+extern int of_object_list_entry_next(of_list_object_t *obj, 
+                                     of_object_t *value);
+
+/**
+ * Generic documentation for a list append bind function
+ * @param obj The list object being accessed
+ * @param value Pointer to a generic list entry instance
+ * @return OF_ERROR_XXX
+ *
+ * A list is an array of instances of objects of a common (possibly
+ * polymorphic) type.
+ *
+ * This function prepares the list for the process of appending an
+ * item to its tail.  The parameter value is a pointer to a generic
+ * list entry instance.  Its wire buffer is bound to that of the list
+ * at the end of the list.  The length of the list is updated according
+ * to the current value setting which must be accurate.
+ *
+ * Note that since the child has not been bound to a buffer, no
+ * values have been properly recorded for the object; they must
+ * be set after this _bind call.
+ *
+ * @sa of_object_list_entry_append
+ */
+extern int of_object_list_entry_append_bind(of_list_object_t *obj, 
+                                            of_object_t *value);
+
+/**
+ * Generic documentation for a list append function
+ * @param obj The list object being accessed
+ * @param value Pointer to a list object to be appended
+ * @return OF_ERROR_XXX
+ *
+ * A list is an array of instances of objects of a common (possibly
+ * polymorphic) type.
+ *
+ * This function takes a fully formed list entry, value, and copies
+ * that value to the end of the list.  No object ownership changes
+ * with this call.
+ *
+ * @sa of_object_list_entry_append_bind
+ */
+extern int of_object_list_entry_append(of_list_object_t *obj, 
+                                       of_object_t *value);
+
+/* This is from loci.h */
+
+/**
+ * Inheritance super class for of_queue_prop
+ *
+ * This class is the union of of_queue_prop classes.  You can refer
+ * to it untyped by refering to the member 'header' whose structure
+ * is common across all sub-classes.
+ */
+
+union of_queue_prop_u {
+    of_queue_prop_header_t header; /* Generic instance */
+    of_queue_prop_min_rate_t min_rate;
+    of_queue_prop_max_rate_t max_rate;
+    of_queue_prop_experimenter_t experimenter;
+};
+
+/**
+ * Inheritance super class for of_action
+ *
+ * This class is the union of of_action classes.  You can refer
+ * to it untyped by refering to the member 'header' whose structure
+ * is common across all sub-classes.
+ */
+
+union of_action_u {
+    of_action_header_t header; /* Generic instance */
+    of_action_copy_ttl_out_t copy_ttl_out;
+    of_action_set_mpls_tc_t set_mpls_tc;
+    of_action_set_field_t set_field;
+    of_action_set_nw_tos_t set_nw_tos;
+    of_action_dec_mpls_ttl_t dec_mpls_ttl;
+    of_action_set_nw_dst_t set_nw_dst;
+    of_action_set_mpls_label_t set_mpls_label;
+    of_action_group_t group;
+    of_action_set_nw_src_t set_nw_src;
+    of_action_set_vlan_vid_t set_vlan_vid;
+    of_action_set_mpls_ttl_t set_mpls_ttl;
+    of_action_pop_vlan_t pop_vlan;
+    of_action_set_tp_dst_t set_tp_dst;
+    of_action_pop_mpls_t pop_mpls;
+    of_action_push_vlan_t push_vlan;
+    of_action_set_vlan_pcp_t set_vlan_pcp;
+    of_action_enqueue_t enqueue;
+    of_action_set_tp_src_t set_tp_src;
+    of_action_experimenter_t experimenter;
+    of_action_set_nw_ttl_t set_nw_ttl;
+    of_action_copy_ttl_in_t copy_ttl_in;
+    of_action_set_nw_ecn_t set_nw_ecn;
+    of_action_strip_vlan_t strip_vlan;
+    of_action_set_dl_dst_t set_dl_dst;
+    of_action_push_mpls_t push_mpls;
+    of_action_dec_nw_ttl_t dec_nw_ttl;
+    of_action_set_dl_src_t set_dl_src;
+    of_action_set_queue_t set_queue;
+    of_action_output_t output;
+};
+
+/**
+ * Inheritance super class for of_instruction
+ *
+ * This class is the union of of_instruction classes.  You can refer
+ * to it untyped by refering to the member 'header' whose structure
+ * is common across all sub-classes.
+ */
+
+union of_instruction_u {
+    of_instruction_header_t header; /* Generic instance */
+    of_instruction_clear_actions_t clear_actions;
+    of_instruction_write_actions_t write_actions;
+    of_instruction_goto_table_t goto_table;
+    of_instruction_apply_actions_t apply_actions;
+    of_instruction_experimenter_t experimenter;
+    of_instruction_write_metadata_t write_metadata;
+};
+
+/**
+ * Inheritance super class for of_oxm
+ *
+ * This class is the union of of_oxm classes.  You can refer
+ * to it untyped by refering to the member 'header' whose structure
+ * is common across all sub-classes.
+ */
+
+union of_oxm_u {
+    of_oxm_header_t header; /* Generic instance */
+    of_oxm_ipv6_flabel_t ipv6_flabel;
+    of_oxm_ipv6_dst_masked_t ipv6_dst_masked;
+    of_oxm_vlan_pcp_t vlan_pcp;
+    of_oxm_ipv4_src_t ipv4_src;
+    of_oxm_ipv6_dst_t ipv6_dst;
+    of_oxm_arp_tpa_t arp_tpa;
+    of_oxm_icmpv6_type_t icmpv6_type;
+    of_oxm_arp_sha_t arp_sha;
+    of_oxm_ipv6_src_t ipv6_src;
+    of_oxm_sctp_src_t sctp_src;
+    of_oxm_icmpv6_code_t icmpv6_code;
+    of_oxm_metadata_masked_t metadata_masked;
+    of_oxm_eth_src_masked_t eth_src_masked;
+    of_oxm_eth_dst_t eth_dst;
+    of_oxm_ipv6_nd_sll_t ipv6_nd_sll;
+    of_oxm_mpls_tc_t mpls_tc;
+    of_oxm_arp_op_t arp_op;
+    of_oxm_vlan_vid_masked_t vlan_vid_masked;
+    of_oxm_eth_type_t eth_type;
+    of_oxm_in_phy_port_t in_phy_port;
+    of_oxm_vlan_vid_t vlan_vid;
+    of_oxm_arp_tha_t arp_tha;
+    of_oxm_arp_tpa_masked_t arp_tpa_masked;
+    of_oxm_in_port_t in_port;
+    of_oxm_ip_dscp_t ip_dscp;
+    of_oxm_sctp_dst_t sctp_dst;
+    of_oxm_icmpv4_code_t icmpv4_code;
+    of_oxm_eth_dst_masked_t eth_dst_masked;
+    of_oxm_tcp_src_t tcp_src;
+    of_oxm_ip_ecn_t ip_ecn;
+    of_oxm_ipv6_src_masked_t ipv6_src_masked;
+    of_oxm_ipv4_src_masked_t ipv4_src_masked;
+    of_oxm_udp_dst_t udp_dst;
+    of_oxm_arp_spa_t arp_spa;
+    of_oxm_ipv6_nd_target_t ipv6_nd_target;
+    of_oxm_ipv4_dst_t ipv4_dst;
+    of_oxm_ipv4_dst_masked_t ipv4_dst_masked;
+    of_oxm_eth_src_t eth_src;
+    of_oxm_udp_src_t udp_src;
+    of_oxm_ipv6_nd_tll_t ipv6_nd_tll;
+    of_oxm_icmpv4_type_t icmpv4_type;
+    of_oxm_mpls_label_t mpls_label;
+    of_oxm_tcp_dst_t tcp_dst;
+    of_oxm_ip_proto_t ip_proto;
+    of_oxm_metadata_t metadata;
+    of_oxm_arp_spa_masked_t arp_spa_masked;
+};
+
diff --git a/c_gen/templates/of_message.h b/c_gen/templates/of_message.h
new file mode 100644
index 0000000..77066bc
--- /dev/null
+++ b/c_gen/templates/of_message.h
@@ -0,0 +1,252 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/*
+ * These routines manipulate a low level buffer assuming it holds
+ * an OpenFlow message. 
+ */
+
+#if !defined(_OF_MESSAGE_H_)
+#define _OF_MESSAGE_H_
+
+#include <loci/of_buffer.h>
+
+typedef uint8_t *of_message_t;
+
+/* A few key common header offsets */
+#define OF_MESSAGE_VERSION_OFFSET 0
+#define OF_MESSAGE_TYPE_OFFSET 1
+#define OF_MESSAGE_LENGTH_OFFSET 2
+#define OF_MESSAGE_XID_OFFSET 4
+#define OF_MESSAGE_HEADER_LENGTH 8
+#define OF_MESSAGE_STATS_TYPE_OFFSET 8
+#define OF_MESSAGE_FLOW_MOD_COMMAND_OFFSET(version) ((version) == 1 ? 56 : 25)
+
+#define OF_MESSAGE_MIN_LENGTH 8
+#define OF_MESSAGE_MIN_STATS_LENGTH (OF_MESSAGE_STATS_TYPE_OFFSET + 2)
+#define OF_MESSAGE_MIN_FLOW_MOD_LENGTH(version)  ((version) == 1 ? 57 : 26)
+
+#define OF_MESSAGE_EXPERIMENTER_ID_OFFSET 8
+#define OF_MESSAGE_EXPERIMENTER_SUBTYPE_OFFSET 12
+#define OF_MESSAGE_EXPERIMENTER_MIN_LENGTH 16
+
+/**
+ * The "default" free message function; NULL means use nominal malloc/free
+ */
+#define OF_MESSAGE_FREE_FUNCTION NULL
+
+/**
+ * Map a message to the uint8_t * start of the message
+ */
+#define OF_MESSAGE_TO_BUFFER(msg) ((uint8_t *)(msg))
+
+/**
+ * Map a uint8_t * to a message object
+ */
+#define OF_BUFFER_TO_MESSAGE(buf) ((of_message_t)(buf))
+
+/****************************************************************
+ *
+ * Message field accessors.
+ *
+ * These do no range checking and assume a buffer with sufficient
+ * length to access the data.  These are low level accessors used
+ * during the parsing and coersion stage of message processing.
+ *
+ * Fields include:  version, message type, message length,
+ * transaction id, stats type (now multi-part type), experimenter id,
+ * experimenter type
+ *
+ ****************************************************************/
+
+/**
+ * @brief Get/set version of a message
+ * @param msg Pointer to the message buffer of sufficient length
+ * @param version Data for set operation
+ * @returns get returns version
+ */
+
+static inline of_version_t
+of_message_version_get(of_message_t msg) {
+    return (of_version_t)msg[OF_MESSAGE_VERSION_OFFSET];
+}
+
+static inline void
+of_message_version_set(of_message_t msg, of_version_t version) {
+    buf_u8_set(msg, (uint8_t)version);
+}
+
+/**
+ * @brief Get/set OpenFlow type of a message
+ * @param msg Pointer to the message buffer of sufficient length
+ * @param value Data for set operation
+ * @returns get returns message type
+ */
+
+static inline uint8_t
+of_message_type_get(of_message_t msg) {
+    return msg[OF_MESSAGE_TYPE_OFFSET];
+}
+
+static inline void
+of_message_type_set(of_message_t msg, uint8_t value) {
+    buf_u8_set(msg + OF_MESSAGE_TYPE_OFFSET, value);
+}
+
+/**
+ * @brief Get/set in-buffer length of a message
+ * @param msg Pointer to the message buffer of sufficient length
+ * @param len Data for set operation
+ * @returns get returns length in host order
+ */
+
+static inline uint16_t
+of_message_length_get(of_message_t msg) {
+    uint16_t val;
+    buf_u16_get(msg + OF_MESSAGE_LENGTH_OFFSET, &val);
+    return val;
+}
+
+static inline void
+of_message_length_set(of_message_t msg, uint16_t len) {
+    buf_u16_set(msg + OF_MESSAGE_LENGTH_OFFSET, len);
+}
+
+
+/**
+ * @brief Get/set transaction ID of a message
+ * @param msg Pointer to the message buffer of sufficient length
+ * @param xid Data for set operation
+ * @returns get returns xid in host order
+ */
+
+static inline uint32_t
+of_message_xid_get(of_message_t msg) {
+    uint32_t val;
+    buf_u32_get(msg + OF_MESSAGE_XID_OFFSET, &val);
+    return val;
+}
+
+static inline void
+of_message_xid_set(of_message_t msg, uint32_t xid) {
+    buf_u32_set(msg + OF_MESSAGE_XID_OFFSET, xid);
+}
+
+/**
+ * @brief Get/set stats type of a message
+ * @param msg Pointer to the message buffer of sufficient length
+ * @param type Data for set operation
+ * @returns get returns stats type in host order
+ */
+
+static inline uint16_t
+of_message_stats_type_get(of_message_t msg) {
+    uint16_t val;
+    buf_u16_get(msg + OF_MESSAGE_STATS_TYPE_OFFSET, &val);
+    return val;
+}
+
+static inline void
+of_message_stats_type_set(of_message_t msg, uint16_t type) {
+    buf_u16_set(msg + OF_MESSAGE_STATS_TYPE_OFFSET, type);
+}
+
+
+/**
+ * @brief Get/set experimenter ID of a message
+ * @param msg Pointer to the message buffer of sufficient length
+ * @param experimenter_id Data for set operation
+ * @returns get returns experimenter id in host order
+ */
+
+static inline uint32_t
+of_message_experimenter_id_get(of_message_t msg) {
+    uint32_t val;
+    buf_u32_get(msg + OF_MESSAGE_EXPERIMENTER_ID_OFFSET, &val);
+    return val;
+}
+
+static inline void
+of_message_experimenter_id_set(of_message_t msg, uint32_t experimenter_id) {
+    buf_u32_set(msg + OF_MESSAGE_EXPERIMENTER_ID_OFFSET, experimenter_id);
+}
+
+
+/**
+ * @brief Get/set experimenter message type (subtype) of a message
+ * @param msg Pointer to the message buffer of sufficient length
+ * @param subtype Data for set operation
+ * @returns get returns experimenter message type in host order
+ */
+
+static inline uint32_t
+of_message_experimenter_subtype_get(of_message_t msg) {
+    uint32_t val;
+    buf_u32_get(msg + OF_MESSAGE_EXPERIMENTER_SUBTYPE_OFFSET, &val);
+    return val;
+}
+
+static inline void
+of_message_experimenter_subtype_set(of_message_t msg,
+                                    uint32_t subtype) {
+    buf_u32_set(msg + OF_MESSAGE_EXPERIMENTER_SUBTYPE_OFFSET,
+                subtype);
+}
+
+/**
+ * Flow mod command changed from 16 to 8 bits on the wire from 1.0 to 1.1
+ */
+static inline uint8_t
+of_message_flow_mod_command_get(of_message_t msg, of_version_t version) {
+    uint16_t val16;
+    uint8_t val8;
+
+    if (version == OF_VERSION_1_0) {
+        buf_u16_get(msg + OF_MESSAGE_FLOW_MOD_COMMAND_OFFSET(version), &val16);
+        val8 = val16;
+    } else {
+        buf_u8_get(msg + OF_MESSAGE_FLOW_MOD_COMMAND_OFFSET(version), &val8);
+    }
+    return val8;
+}
+
+static inline void
+of_message_flow_mod_command_set(of_message_t msg, of_version_t version, 
+                                uint8_t command) {
+    uint16_t val16;
+
+    if (version == OF_VERSION_1_0) {
+        val16 = command;
+        buf_u16_set(msg + OF_MESSAGE_FLOW_MOD_COMMAND_OFFSET(version), val16);
+    } else {
+        buf_u8_set(msg + OF_MESSAGE_FLOW_MOD_COMMAND_OFFSET(version), command);
+    }
+}
+
+#endif /* _OF_MESSAGE_H_ */
diff --git a/c_gen/templates/of_object.c b/c_gen/templates/of_object.c
new file mode 100644
index 0000000..a5cfecd
--- /dev/null
+++ b/c_gen/templates/of_object.c
@@ -0,0 +1,728 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/****************************************************************
+ *
+ * of_object.c
+ *
+ * These are the low level object constructor/destructor operators.
+ *
+ ****************************************************************/
+
+#include "loci_log.h"
+#include <loci/loci.h>
+#include <loci/loci_validator.h>
+
+#if defined(OF_OBJECT_TRACKING)
+#include <BigList/biglist.h>
+
+loci_object_track_t loci_global_tracking;
+
+#define TRACK (&loci_global_tracking)
+#define TRACK_OBJS (TRACK->objects)
+#define CHECK_MAX(val, max) if ((val) > (max)) (max) = (val)
+
+#endif
+
+/**
+ * Create a generic new object and possibly underlying wire buffer
+ * @param bytes The number of bytes to allocate in the underlying buffer
+ *
+ * If bytes <= 0, do not allocate a wire buffer.
+ *
+ * Note that this is an internal function.  The class specific
+ * new functions should be called to properly initialize and track an
+ * OF object.
+ */
+
+of_object_t *
+of_object_new(int bytes)
+{
+    of_object_t *obj;
+
+    if ((obj = (of_object_t *)MALLOC(sizeof(of_generic_t))) == NULL) {
+        return NULL;
+    }
+    MEMSET(obj, 0, sizeof(of_generic_t));
+
+    if (bytes > 0) {
+        if ((obj->wire_object.wbuf = of_wire_buffer_new(bytes)) == NULL) {
+            FREE(obj);
+            return NULL;
+        }
+        obj->wire_object.owned = 1;
+    }
+
+    return obj;
+}
+
+/**
+ * The delete function for LOCI objects
+ *
+ * @param obj Pointer to the object to be deleted
+ *
+ * This can be called on any LOCI object; it should not need to be
+ * overridden.
+ */
+
+void
+of_object_delete(of_object_t *obj)
+{
+    if (obj == NULL) {
+        return;
+    }
+
+#if defined(OF_OBJECT_TRACKING)
+    ASSERT(obj->track_info.magic == OF_OBJECT_TRACKING_MAGIC &&
+           "of_object double free?");
+    LOCI_LOG_TRACE("OF obj delete %p.  Wire buf %p.\n", obj,
+                   obj->wire_object.wbuf);
+    ASSERT(TRACK->count_current > 0);
+    TRACK->count_current -= 1;
+    TRACK->deletes += 1;
+
+    TRACK_OBJS = biglist_remove_link_free(TRACK_OBJS,
+                                          obj->track_info.bl_entry);
+    obj->track_info.magic = 0;
+#endif
+
+    /*
+     * Make callback if present
+     */
+    if (obj->track_info.delete_cb != NULL) {
+        obj->track_info.delete_cb(obj);
+    }
+
+    if (obj->wire_object.owned) {
+        of_wire_buffer_free(obj->wire_object.wbuf);
+    }
+
+    FREE(obj);
+}
+
+/**
+ * Duplicate an object
+ * @param src The object to be duplicated
+ * @returns Pointer to the duplicate or NULL on error.  Caller is responsible
+ * for freeing the returned object.
+ */
+
+of_object_t *
+of_object_dup_(of_object_t *src)
+{
+    of_object_t *dst;
+    of_object_init_f init_fn;
+
+    if ((dst = (of_object_t *)MALLOC(sizeof(of_generic_t))) == NULL) {
+        return NULL;
+    }
+
+    MEMSET(dst, 0, sizeof(*dst));
+
+    /* Allocate a minimal wire buffer assuming we will not write to it. */
+    if ((dst->wire_object.wbuf = of_wire_buffer_new(src->length)) == NULL) {
+        FREE(dst);
+        return NULL;
+    }
+
+    dst->wire_object.owned = 1;
+
+    init_fn = of_object_init_map[src->object_id];
+    init_fn(dst, src->version, src->length, 0);
+
+    MEMCPY(OF_OBJECT_BUFFER_INDEX(dst, 0),
+           OF_OBJECT_BUFFER_INDEX(src, 0),
+           src->length);
+
+    return dst;
+}
+
+#if defined(OF_OBJECT_TRACKING)
+
+/**
+ * Record an object for tracking
+ *
+ * @param obj The object being tracked
+ * @param file The file name where the allocation is happening
+ * @param line The line number in the file where the alloc is happening
+ */
+
+void
+of_object_track(of_object_t *obj, const char *file, int line)
+{
+    if (obj != NULL) {
+        LOCI_LOG_TRACE("OF obj track %p, wire buf %p\n%s:%d\\n",
+                      obj, obj->wire_object.wbuf, file, line);
+        obj->track_info.file = file;
+        obj->track_info.line = line;
+        TRACK_OBJS = biglist_prepend(TRACK_OBJS, (void *)obj);
+        obj->track_info.bl_entry = TRACK_OBJS;
+        obj->track_info.magic = OF_OBJECT_TRACKING_MAGIC;
+
+        TRACK->allocs += 1;
+        TRACK->count_current += 1;
+        CHECK_MAX(TRACK->count_current, TRACK->count_max);
+    }
+}
+
+/**
+ * The dup function when tracking is enabled
+ */
+
+of_object_t *
+of_object_dup_tracking(of_object_t *src, const char *file, int line)
+{
+    of_object_t *obj;
+
+    obj = of_object_dup_(src);
+    of_object_track(obj, file, line);
+
+    return obj;
+}
+
+/**
+ * Display track info for one object
+ */
+
+void
+of_object_track_output(of_object_t *obj, loci_writer_f writer, void* cookie)
+{
+    const char *offset;
+    static const char *unknown = "Unknown file";
+
+    if (obj->track_info.file) {
+        offset = strstr(obj->track_info.file, "Modules/");
+        if (offset == NULL) {
+            offset = obj->track_info.file;
+        } else {
+            offset += 8; /* Jump over Modules/ too */
+        }
+    } else {
+        offset = unknown;
+    }
+    writer(cookie, "obj %p. type %s.\n%s:%d\n",
+               obj, of_object_id_str[obj->object_id],
+               offset, obj->track_info.line);
+}
+
+/**
+ * Dump out the current object list from LOCI
+ *
+ * @param log_fn The output printf vector
+ *
+ */
+
+void
+of_object_track_report(loci_writer_f writer, void* cookie)
+{
+    biglist_t *elt;
+    of_object_t *obj;
+    int count = 0;
+
+    writer(cookie, "\nLOCI Outstanding object list.\n");
+    writer(cookie, "Objs: Current %d. Max %d. Created %d. Deleted %d\n",
+               TRACK->count_current, TRACK->count_max, TRACK->allocs,
+               TRACK->deletes);
+    if (TRACK_OBJS) {
+        BIGLIST_FOREACH_DATA(elt, TRACK_OBJS, of_object_t *, obj) {
+            of_object_track_output(obj, writer, cookie);
+            ++count;
+        }
+    }
+    if (count != TRACK->count_current) {
+        writer(cookie, "\nERROR:  List has %d, but track count is %d\n",
+                   count, TRACK->count_current);
+    }
+    writer(cookie, "\nEnd of outstanding object list\n");
+}
+
+#endif
+
+/**
+ * Generic new from message call
+ */
+
+of_object_t *
+of_object_new_from_message(of_message_t msg, int len)
+{
+    of_object_id_t object_id;
+    of_object_t *obj;
+    of_version_t version;
+
+    version = of_message_version_get(msg);
+    if (!OF_VERSION_OKAY(version)) {
+        return NULL;
+    }
+
+    if (of_validate_message(msg, len) != 0) {
+        LOCI_LOG_ERROR("message validation failed\n");
+        return NULL;
+    }
+
+    object_id = of_message_to_object_id(msg, len);
+    ASSERT(object_id != OF_OBJECT_INVALID);
+
+    if ((obj = of_object_new(-1)) == NULL) {
+        return NULL;
+    }
+
+    of_object_init_map[object_id](obj, version, 0, 0);
+
+    if (of_object_buffer_bind(obj, OF_MESSAGE_TO_BUFFER(msg), len, 
+                              OF_MESSAGE_FREE_FUNCTION) < 0) {
+        FREE(obj);
+        return NULL;
+    }
+    obj->length = len;
+    obj->version = version;
+
+#if defined(OF_OBJECT_TRACKING)
+    /* @FIXME Would be nice to get caller; for now only in cxn_instance */
+    of_object_track(obj, __FILE__, __LINE__);
+#endif
+
+    return obj;
+}
+
+/**
+ * Bind an existing buffer to an LOCI object
+ *
+ * @param obj Pointer to the object to be updated
+ * @param buf Pointer to the buffer to bind to obj
+ * @param bytes Length of buf
+ * @param buf_free An optional free function to be applied to
+ * buf on deallocation
+ *
+ * This can be called on any LOCI object; it should not need to be
+ * overridden.
+ */
+
+int
+of_object_buffer_bind(of_object_t *obj, uint8_t *buf, int bytes, 
+                      of_buffer_free_f buf_free)
+{
+    of_wire_object_t *wobj;
+    of_wire_buffer_t *wbuf;
+
+    ASSERT(buf != NULL);
+    ASSERT(bytes > 0);
+    // ASSERT(wobj is not bound);
+
+    wobj = &obj->wire_object;
+    MEMSET(wobj, 0, sizeof(*wobj));
+
+    wbuf = of_wire_buffer_new_bind(buf, bytes, buf_free);
+    if (wbuf == NULL) {
+        return OF_ERROR_RESOURCE;
+    }
+
+    wobj->wbuf = wbuf;
+    wobj->owned = 1;
+    obj->length = bytes;
+
+    return OF_ERROR_NONE;
+}
+
+/**
+ * Connect a child to a parent at the wire buffer level
+ *
+ * @param parent The top level object to bind to
+ * @param child The sub-object connecting to the parent
+ * @param offset The offset at which to attach the child RELATIVE 
+ * TO THE PARENT in the buffer
+ * @param bytes The amount of the buffer dedicated to the child; see below
+ * @param inc_ref_count Should the ref count of the parent be incremented
+ * 
+ * This is used for 'get' accessors for composite types as well as
+ * iterator functions for lists, both read (first/next) and write
+ * (append_init, append_advance).
+ *
+ * Connect a child object to a parent by setting up the child's
+ * wire_object to point to the parent's underlying buffer.  The value
+ * of the parameter bytes is important in determining how the child
+ * is initialized:
+ * @li If bytes <= 0, the length and type of the child are not modified;
+ * no additional space is added to the buffer.
+ * @li If bytes > 0, the current wire buffer is grown to 
+ * accomodate this many bytes.  This is to support append operations.
+ *
+ * If an error is returned, future references to the child object
+ * (until it is reinitialized) are undefined.
+ */
+static void
+object_child_attach(of_object_t *parent, of_object_t *child, 
+                       int offset, int bytes)
+{
+    of_wire_object_t *c_wobj; /* Pointer to child's wire object */
+    of_wire_buffer_t *wbuf; /* Pointer to common wire buffer manager */
+
+    child->parent = parent;
+    wbuf = parent->wire_object.wbuf;
+
+    /* Set up the child's wire buf to point to same as parent */
+    c_wobj = &child->wire_object;
+    c_wobj->wbuf = wbuf;
+    c_wobj->obj_offset = parent->wire_object.obj_offset + offset;
+    c_wobj->owned = 0;
+
+    /*
+     * bytes determines if this is a read or write setup.
+     * If > 0, grow the buffer to accomodate the space
+     * Otherwise do nothing
+     */
+    if (bytes > 0) { /* Set internal length, request buffer space */
+        int tot_bytes; /* Total bytes to request for buffer if updated */
+
+        /* Set up space for the child in the parent's buffer */
+        tot_bytes = parent->wire_object.obj_offset + offset + bytes;
+
+        of_wire_buffer_grow(wbuf, tot_bytes);
+        child->length = bytes;
+    }
+    /* if bytes == 0 don't do anything */
+}
+
+/**
+ * Check for room in an object's wire buffer.
+ * @param obj The object being checked
+ * @param new_len The desired length
+ * @return Boolean
+ */
+
+int
+of_object_can_grow(of_object_t *obj, int new_len)
+{
+    return OF_OBJECT_ABSOLUTE_OFFSET(obj, new_len) <=
+        WBUF_ALLOC_BYTES(obj->wire_object.wbuf);
+}
+
+/**
+ * Set the xid of a message object
+ * @param obj The object being accessed
+ * @param xid The xid value to store in the wire buffer
+ * @return OF_ERROR_
+ * Since the XID is common across all versions, this is used
+ * for all XID accessors.
+ */
+
+int
+of_object_xid_set(of_object_t *obj, uint32_t xid)
+{
+    of_wire_buffer_t *wbuf;
+
+    if ((wbuf = OF_OBJECT_TO_WBUF(obj)) == NULL) {
+        return OF_ERROR_PARAM;
+    }
+    of_wire_buffer_u32_set(wbuf, 
+        OF_OBJECT_ABSOLUTE_OFFSET(obj, OF_MESSAGE_XID_OFFSET), xid);
+    return OF_ERROR_NONE;
+}
+
+/**
+ * Get the xid of a message object
+ * @param obj The object being accessed
+ * @param xid Pointer to where to store the xid value
+ * @return OF_ERROR_
+ * Since the XID is common across all versions, this is used
+ * for all XID accessors.
+ */
+
+int
+of_object_xid_get(of_object_t *obj, uint32_t *xid)
+{
+    of_wire_buffer_t *wbuf;
+
+    if ((wbuf = OF_OBJECT_TO_WBUF(obj)) == NULL) {
+        return OF_ERROR_PARAM;
+    }
+    of_wire_buffer_u32_get(wbuf, 
+        OF_OBJECT_ABSOLUTE_OFFSET(obj, OF_MESSAGE_XID_OFFSET), xid);
+    return OF_ERROR_NONE;
+}
+
+/****************************************************************
+ *
+ * Generic list operation implementations
+ *
+ ****************************************************************/
+
+/**
+ * Set up a child for appending to a parent list
+ * @param parent The parent; must be a list object
+ * @param child The child object; must be of type list element
+ * @return OF_ERROR_
+ *
+ * Attaches the wire buffer of the parent to the child by pointing
+ * the child to the end of the parent.
+ * 
+ * Set the wire length and type from the child.
+ * Update the parent length adding the current child length
+ *
+ * After calling this function, the child object may be updated
+ * resulting in changes to the parent's wire buffer
+ * 
+ */ 
+
+int
+of_list_append_bind(of_object_t *parent, of_object_t *child)
+{
+    if (parent == NULL || child == NULL ||
+           parent->wire_object.wbuf == NULL) {
+        return OF_ERROR_PARAM;
+    }
+
+    if (!of_object_can_grow(parent, parent->length + child->length)) {
+        return OF_ERROR_RESOURCE;
+    }
+
+    object_child_attach(parent, child, parent->length, 
+                        child->length);
+
+    /* Update the wire length and type if needed */
+    if (child->wire_length_set) {
+        child->wire_length_set(child, child->length);
+    }
+
+    if (child->wire_type_set) {
+        child->wire_type_set(child, child->object_id);
+    }
+
+    /* Update the parent's length */
+    of_object_parent_length_update(parent, child->length);
+
+    OF_LENGTH_CHECK_ASSERT(parent);
+
+    return OF_ERROR_NONE;
+}
+
+/**
+ * Generic atomic list append operation
+ * @param list The list to which an item is being appended
+ * @param item THe item to append to the list
+ *
+ * The contents of the item are copied to the end of the list.
+ * Currently assumes the list is at the end of its parent.
+ */
+int
+of_list_append(of_object_t *list, of_object_t *item)
+{
+    int new_len;
+
+    new_len = list->length + item->length;
+
+    if (!of_object_can_grow(list, new_len)) {
+        return OF_ERROR_RESOURCE;
+    }
+
+    of_wire_buffer_grow(list->wire_object.wbuf,
+                        OF_OBJECT_ABSOLUTE_OFFSET(list, new_len));
+
+    MEMCPY(OF_OBJECT_BUFFER_INDEX(list, list->length),
+           OF_OBJECT_BUFFER_INDEX(item, 0), item->length);
+
+    /* Update the list's length */
+    of_object_parent_length_update(list, item->length);
+
+    OF_LENGTH_CHECK_ASSERT(list);
+
+    return OF_ERROR_NONE;
+}
+
+/**
+ * Generic list first function
+ * @param parent The parent; must be a list object
+ * @param child The child object; must be of type list element
+ * @return OF_ERROR_RANGE if list is empty
+ * @return OF_ERROR_
+ *
+ * Sets up the child to point to the first element in the list
+ *
+ * Child init must be called before this is called.
+ *
+ * @note TREAT AS PRIVATE
+ * Does not fully initialized object
+ */
+int
+of_list_first(of_object_t *parent, of_object_t *child)
+{
+    if (parent->length == 0) { /* Empty list */
+        return OF_ERROR_RANGE;
+    }
+
+    object_child_attach(parent, child, 0, 0);
+
+    return OF_ERROR_NONE;
+}
+
+/**
+ * Return boolean indicating if child is pointing to last entry in parent
+ * @param parent The parent; must be a list object
+ * @param child The child object; must be of type list element
+ * @return OF_ERROR_RANGE if list is empty
+ * @return OF_ERROR_
+ *
+ */
+static int
+of_list_is_last(of_object_t *parent, of_object_t *child)
+{
+    if (child->wire_object.obj_offset + child->length >= 
+        parent->wire_object.obj_offset + parent->length) {
+        return 1;
+    }
+
+    return 0;
+}
+
+/**
+ * Generic list next function
+ * @param parent The parent; must be a list object
+ * @param child The child object; must be of type list element
+ * @return OF_ERROR_RANGE if at end of list
+ * @return OF_ERROR_
+ *
+ * Advances the child to point to the subsequent element in the list.
+ * The wire buffer object must not have been modified since the 
+ * previous call to _first or _next.
+ *
+ * @note TREAT AS PRIVATE
+ * Does not fully initialized object
+ */ 
+int
+of_list_next(of_object_t *parent, of_object_t *child)
+{
+    int offset;
+
+    ASSERT(child->length > 0);
+
+    /* Get offset of parent */
+    if (of_list_is_last(parent, child)) {
+        return OF_ERROR_RANGE; /* We were on the last object */
+    }
+
+    /* Offset is relative to parent start */
+    offset = (child->wire_object.obj_offset - parent->wire_object.obj_offset) +
+        child->length;
+    object_child_attach(parent, child, offset, 0);
+
+    return OF_ERROR_NONE;
+}
+
+void
+of_object_wire_buffer_steal(of_object_t *obj, uint8_t **buffer)
+{
+    ASSERT(obj != NULL);
+    of_wire_buffer_steal(obj->wire_object.wbuf, buffer);
+    obj->wire_object.wbuf = NULL;
+}
+
+/*
+ * Set member:
+ *    get_wbuf_extent
+ *    find offset of start of member
+ *    if offset is at wbuf_extent (append new data)
+ *        copy data at extent
+ *        update parent length
+ *    else
+ *        find length of current entry
+ *        move from end of current to extent to create (or remove) space
+ *        copy data to offset
+ *        update my length -- NEED LOCAL INFO TO DO THIS for some cases
+ */
+
+/* Also need: get offset of member for all combinations */
+/* Also need: get length of member for all combinations */
+#if 0
+/**
+ * Append the wire buffer data from src to the end of dst's wire buffer
+ */
+int
+of_object_append_buffer(of_object_t *dst, of_object_t *src)
+{
+    of_wire_buffer_t *s_wbuf, *d_wbuf;
+    int orig_len, dst_offset, src_offset;
+
+    d_wbuf = OF_OBJECT_TO_WBUF(dst);
+    s_wbuf = OF_OBJECT_TO_WBUF(src);
+    dst_offset = dst->wire_object.obj_offset + dst_length;
+    src_offset = src->wire_object.obj_offset;
+    OF_WIRE_BUFFER_INIT_CHECK(d_wbuf, dst_offset + src->length);
+    MEMCPY(OF_WBUF_BUFFER_POINTER(d_wbuf, dst_offset),
+           OF_WBUF_BUFFER_POINTER(s_wbuf, 0), src->length);
+
+    orig_len = dst->length;
+    dst->length += src->length;
+
+    return OF_ERROR_NONE;
+}
+
+/**
+ * Set the length of the actions object in a packet_in object
+ */
+
+int
+of_packet_out_actions_length_set(of_packet_t *obj, int len)
+{
+    if (obj == NULL || obj->object_id != OF_PACKET_IN ||
+        obj->wire_object.wbuf == NULL) {
+        return OF_ERROR_PARAM;
+    }
+
+    obj->actions_len_set(obj, len);
+}
+
+int
+_packet_out_data_offset_get(of_packet_t *obj)
+{
+    if (obj == NULL || obj->object_id != OF_PACKET_IN ||
+        obj->wire_object.wbuf == NULL) {
+        return -1;
+    }
+
+    return OF_PACKET_OUT_FIXED_LENGTH + _packet_out_actions_length_get(obj);
+}
+
+
+/**
+ * Simple length derivation function
+ *
+ * Most variable length fields are alone at the end of a structure.
+ * Their length is a simple calculation, just the total length of
+ * the parent minus the length of the non-variable part of the 
+ * parent's class type.
+ *
+ * @param parent The parent object
+ * @param length (out) Where to store the length of the final 
+ * variable length member
+ */
+int
+of_object_simple_length_derive(of_object_t *obj, int *length)
+{
+    
+}
+#endif
diff --git a/c_gen/templates/of_object.h b/c_gen/templates/of_object.h
new file mode 100644
index 0000000..cb9342e
--- /dev/null
+++ b/c_gen/templates/of_object.h
@@ -0,0 +1,176 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/*
+ * @fixme THIS FILE NEEDS CLEANUP.  It may just go away.
+ * 
+ * Low level internal header file.  Defines inheritance mechanism for
+ * LOCI objects.  In general, the routines in this file should not be
+ * called directly.  Rather the class-specific operations should be 
+ * used from loci.h.
+ *
+ * TREAT THESE FUNCTIONS AS PRIVATE.  THEY ARE GENERALLY HELPER
+ * FUNCTIONS FOR LOCI TYPE SPECIFIC IMPLEMENTATIONS
+ */
+
+#if !defined(_OF_OBJECT_H_)
+#define _OF_OBJECT_H_
+
+#include <loci/of_buffer.h>
+#include <loci/of_match.h>
+#include <loci/loci_base.h>
+#include <loci/of_message.h>
+
+#if defined(OF_OBJECT_TRACKING)
+#include <BigList/biglist.h>
+#endif
+
+/**
+ * This is the number of bytes reserved for metadata in each
+ * of_object_t instance.
+ */
+#define OF_OBJECT_METADATA_BYTES 32
+
+/****************************************************************
+ * General list operations: first, next, append_setup, append_advance
+ ****************************************************************/
+
+/* General list first operation */
+extern int of_list_first(of_object_t *parent, of_object_t *child);
+
+/* General list next operation */
+extern int of_list_next(of_object_t *parent, of_object_t *child);
+
+/* General list append bind operation */
+extern int of_list_append_bind(of_object_t *parent, of_object_t *child);
+
+/* Append a copy of item to list */
+extern int of_list_append(of_object_t *list, of_object_t *item);
+
+extern of_object_t *of_object_new(int bytes);
+extern of_object_t * of_object_dup_(of_object_t *src);
+
+/**
+ * Callback function prototype for deleting an object
+ */
+typedef void (*of_object_delete_callback_f)(of_object_t *obj);
+
+#if defined(OF_OBJECT_TRACKING)
+/**
+ * When tracking is enabled, the location of each new or dup
+ * call of an OF object is recorded and a list is kept of all
+ * outstanding objects.
+ *
+ * This dovetails with using objects to track outstanding operations
+ * for barrier processing.
+ */
+
+/**
+ * Global tracking stats
+ */
+typedef struct loci_object_track_s {
+    biglist_t *objects;
+    int count_current;
+    uint32_t count_max;
+    uint32_t allocs;
+    uint32_t deletes;
+} loci_object_track_t;
+
+extern loci_object_track_t loci_global_tracking;
+
+/* Remap dup call to tracking */
+extern of_object_t * of_object_dup_tracking(of_object_t *src,
+                                            const char *file, int line);
+#define of_object_dup(src) of_object_dup_tracking(src, __FILE__, __LINE__)
+extern void of_object_track(of_object_t *obj, const char *file, int line);
+
+extern void of_object_track_output(of_object_t *obj, loci_writer_f writer, void* cookie); 
+extern void of_object_track_report(loci_writer_f writer, void* cookie); 
+
+/**
+ * The data stored in each object related to tracking and
+ * The LOCI client may install a delete callback function to allow
+ * the notification of an object's destruction.
+ */
+
+typedef struct of_object_track_info_s {
+    of_object_delete_callback_f delete_cb;  /* To be implemented */
+    void *delete_cookie;
+
+    /* Track file and line where allocated */
+    const char *file;
+    int line;
+    biglist_t *bl_entry; /* Pointer to self */
+    uint32_t magic; /* validation value */
+} of_object_track_info_t;
+
+#define OF_OBJECT_TRACKING_MAGIC 0x11235813
+#else
+
+/* Use native dup call */
+#define of_object_dup of_object_dup_
+
+/**
+ * When tracking is not enabled, we still support a delete callback
+ */
+
+typedef struct of_object_track_info_s {
+    of_object_delete_callback_f delete_cb;  /* To be implemented */
+    void *delete_cookie;
+} of_object_track_info_t;
+
+#endif
+
+extern int of_object_xid_set(of_object_t *obj, uint32_t xid);
+extern int of_object_xid_get(of_object_t *obj, uint32_t *xid);
+
+/* Bind a buffer to an object, usually for parsing the buffer */
+extern int of_object_buffer_bind(of_object_t *obj, uint8_t *buf, 
+                                 int bytes, of_buffer_free_f buf_free);
+
+
+/**
+ * Steal a wire buffer from an object.
+ * @param obj The object whose buffer is being removed
+ * @param buffer[out] A handle for the pointer to the uint8_t * returned
+ *
+ * The wire buffer is taken from the object and its wirebuffer is set to
+ * NULL.  The ref_count of the wire buffer is not changed.
+ */
+extern void of_object_wire_buffer_steal(of_object_t *obj, uint8_t **buffer);
+extern int of_object_append_buffer(of_object_t *dst, of_object_t *src);
+
+extern of_object_t *of_object_new_from_message(of_message_t msg, int len);
+
+/* Delete an OpenFlow object without reference to its type */
+extern void of_object_delete(of_object_t *obj);
+
+int of_object_can_grow(of_object_t *obj, int new_len);
+
+#endif /* _OF_OBJECT_H_ */
diff --git a/c_gen/templates/of_type_maps.c b/c_gen/templates/of_type_maps.c
new file mode 100644
index 0000000..ef1df37
--- /dev/null
+++ b/c_gen/templates/of_type_maps.c
@@ -0,0 +1,799 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/****************************************************************
+ *
+ * Functions related to mapping wire values to object types
+ * and lengths
+ *
+ ****************************************************************/
+
+#include <loci/loci.h>
+#include <loci/of_message.h>
+
+/****************************************************************
+ * Top level OpenFlow message length functions
+ ****************************************************************/
+
+/**
+ * Get the length of a message object as reported on the wire
+ * @param obj The object to check
+ * @param bytes (out) Where the length is stored
+ * @returns OF_ERROR_ code
+ */
+void
+of_object_message_wire_length_get(of_object_t *obj, int *bytes)
+{
+    of_wire_buffer_t *wbuf = OF_OBJECT_TO_WBUF(obj);
+    ASSERT(wbuf != NULL);
+    // ASSERT(obj is message)
+    *bytes = of_message_length_get(OF_OBJECT_TO_MESSAGE(obj));
+}
+
+/**
+ * Set the length of a message object as reported on the wire
+ * @param obj The object to check
+ * @param bytes The new length of the object
+ * @returns OF_ERROR_ code
+ */
+void
+of_object_message_wire_length_set(of_object_t *obj, int bytes)
+{
+    of_wire_buffer_t *wbuf = OF_OBJECT_TO_WBUF(obj);
+    ASSERT(wbuf != NULL);
+
+    // ASSERT(obj is message)
+    of_message_length_set(OF_OBJECT_TO_MESSAGE(obj), bytes);
+}
+
+/****************************************************************
+ * TLV16 type/length functions
+ ****************************************************************/
+
+/**
+ * Many objects are TLVs and use uint16 for the type and length values
+ * stored on the wire at the beginning of the buffer.
+ */
+#define TLV16_WIRE_TYPE_OFFSET 0
+#define TLV16_WIRE_LENGTH_OFFSET 2
+
+/**
+ * Get the length field from the wire for a standard TLV
+ * object that uses uint16 for both type and length.
+ * @param obj The object being referenced
+ * @param bytes (out) Where to store the length
+ */
+
+void
+of_tlv16_wire_length_get(of_object_t *obj, int *bytes)
+{
+    uint16_t val16;
+    of_wire_buffer_t *wbuf = OF_OBJECT_TO_WBUF(obj);
+    ASSERT(wbuf != NULL);
+
+    of_wire_buffer_u16_get(wbuf, 
+           OF_OBJECT_ABSOLUTE_OFFSET(obj, TLV16_WIRE_LENGTH_OFFSET), &val16);
+    *bytes = val16;
+}
+
+/**
+ * Set the length field in the wire buffer for a standard TLV
+ * object that uses uint16 for both type and length.
+ * @param obj The object being referenced
+ * @param bytes The length value to use
+ */
+
+void
+of_tlv16_wire_length_set(of_object_t *obj, int bytes)
+{
+    of_wire_buffer_t *wbuf = OF_OBJECT_TO_WBUF(obj);
+    ASSERT(wbuf != NULL);
+
+    of_wire_buffer_u16_set(wbuf, 
+        OF_OBJECT_ABSOLUTE_OFFSET(obj, TLV16_WIRE_LENGTH_OFFSET), bytes);
+}
+
+/**
+ * Get the type field from the wire for a standard TLV object that uses
+ * uint16 for both type and length.
+ * @param obj The object being referenced
+ * @param wire_type (out) Where to store the type
+ */
+
+static void
+of_tlv16_wire_type_get(of_object_t *obj, int *wire_type)
+{
+    uint16_t val16;
+    of_wire_buffer_t *wbuf = OF_OBJECT_TO_WBUF(obj);
+
+    of_wire_buffer_u16_get(wbuf, OF_OBJECT_ABSOLUTE_OFFSET(obj, 
+           TLV16_WIRE_TYPE_OFFSET), &val16);
+
+    *wire_type = val16;
+}
+
+/**
+ * Set the object ID based on the wire buffer for any TLV object
+ * @param obj The object being referenced
+ * @param id The ID value representing what should be stored.
+ */
+
+void
+of_tlv16_wire_object_id_set(of_object_t *obj, of_object_id_t id)
+{
+    int wire_type;
+    of_wire_buffer_t *wbuf = OF_OBJECT_TO_WBUF(obj);
+    ASSERT(wbuf != NULL);
+
+    wire_type = of_object_to_type_map[obj->version][id];
+    ASSERT(wire_type >= 0);
+
+    of_wire_buffer_u16_set(wbuf, 
+        OF_OBJECT_ABSOLUTE_OFFSET(obj, TLV16_WIRE_TYPE_OFFSET), wire_type);
+
+    if (wire_type == OF_EXPERIMENTER_TYPE) {
+        of_extension_object_id_set(obj, id);
+    }
+}
+
+/**
+ * Get the object ID of an extended action
+ * @param obj The object being referenced
+ * @param id Where to store the object ID
+ * @fixme:  This should be auto generated
+ *
+ * If unable to map to known extension, set id to generic "experimenter"
+ */
+
+#define OF_ACTION_EXPERIMENTER_ID_OFFSET 4
+#define OF_ACTION_EXPERIMENTER_SUBTYPE_OFFSET 8
+
+
+static void
+extension_action_object_id_get(of_object_t *obj, of_object_id_t *id)
+{
+    uint32_t exp_id;
+    uint8_t *buf;
+
+    *id = OF_ACTION_EXPERIMENTER;
+
+    buf = OF_OBJECT_BUFFER_INDEX(obj, 0);
+    
+    buf_u32_get(buf + OF_ACTION_EXPERIMENTER_ID_OFFSET, &exp_id);
+
+    switch (exp_id) {
+    case OF_EXPERIMENTER_ID_BSN: {
+        uint32_t subtype;
+        buf_u32_get(buf + OF_ACTION_EXPERIMENTER_SUBTYPE_OFFSET, &subtype);
+        switch (subtype) {
+        case 1: *id = OF_ACTION_BSN_MIRROR; break;
+        case 2: *id = OF_ACTION_BSN_SET_TUNNEL_DST; break;
+        }
+        break;
+    }
+    case OF_EXPERIMENTER_ID_NICIRA: {
+        uint16_t subtype;
+        buf_u16_get(buf + OF_ACTION_EXPERIMENTER_SUBTYPE_OFFSET, &subtype);
+        switch (subtype) {
+        case 18: *id = OF_ACTION_NICIRA_DEC_TTL; break;
+        }
+        break;
+    }
+    }
+}
+
+/**
+ * Set wire data for extension objects, not messages.
+ *
+ * Currently only handles BSN mirror; ignores all others
+ */
+
+void
+of_extension_object_id_set(of_object_t *obj, of_object_id_t id)
+{
+    uint8_t *buf = OF_OBJECT_BUFFER_INDEX(obj, 0);
+    
+    switch (id) {
+    case OF_ACTION_BSN_MIRROR:
+    case OF_ACTION_ID_BSN_MIRROR:
+        buf_u32_set(buf + OF_ACTION_EXPERIMENTER_ID_OFFSET,
+                    OF_EXPERIMENTER_ID_BSN);
+        buf_u32_set(buf + OF_ACTION_EXPERIMENTER_SUBTYPE_OFFSET, 1);
+        break;
+    case OF_ACTION_BSN_SET_TUNNEL_DST:
+    case OF_ACTION_ID_BSN_SET_TUNNEL_DST:
+        buf_u32_set(buf + OF_ACTION_EXPERIMENTER_ID_OFFSET,
+                    OF_EXPERIMENTER_ID_BSN);
+        buf_u32_set(buf + OF_ACTION_EXPERIMENTER_SUBTYPE_OFFSET, 2);
+        break;
+    case OF_ACTION_NICIRA_DEC_TTL:
+    case OF_ACTION_ID_NICIRA_DEC_TTL:
+        buf_u32_set(buf + OF_ACTION_EXPERIMENTER_ID_OFFSET,
+                    OF_EXPERIMENTER_ID_NICIRA);
+        buf_u16_set(buf + OF_ACTION_EXPERIMENTER_SUBTYPE_OFFSET, 18);
+        break;
+    default:
+        break;
+    }
+}
+
+/**
+ * Get the object ID of an extended action
+ * @param obj The object being referenced
+ * @param id Where to store the object ID
+ * @fixme:  This should be auto generated
+ *
+ * If unable to map to known extension, set id to generic "experimenter"
+ */
+
+static void
+extension_action_id_object_id_get(of_object_t *obj, of_object_id_t *id)
+{
+    uint32_t exp_id;
+    uint8_t *buf;
+
+    *id = OF_ACTION_ID_EXPERIMENTER;
+
+    buf = OF_OBJECT_BUFFER_INDEX(obj, 0);
+    
+    buf_u32_get(buf + OF_ACTION_EXPERIMENTER_ID_OFFSET, &exp_id);
+
+    switch (exp_id) {
+    case OF_EXPERIMENTER_ID_BSN: {
+        uint32_t subtype;
+        buf_u32_get(buf + OF_ACTION_EXPERIMENTER_SUBTYPE_OFFSET, &subtype);
+        switch (subtype) {
+        case 1: *id = OF_ACTION_ID_BSN_MIRROR; break;
+        case 2: *id = OF_ACTION_ID_BSN_SET_TUNNEL_DST; break;
+        }
+        break;
+    }
+    case OF_EXPERIMENTER_ID_NICIRA: {
+        uint16_t subtype;
+        buf_u16_get(buf + OF_ACTION_EXPERIMENTER_SUBTYPE_OFFSET, &subtype);
+        switch (subtype) {
+        case 18: *id = OF_ACTION_ID_NICIRA_DEC_TTL; break;
+        }
+        break;
+    }
+    }
+}
+
+
+/**
+ * Get the object ID based on the wire buffer for an action object
+ * @param obj The object being referenced
+ * @param id Where to store the object ID
+ */
+
+
+void
+of_action_wire_object_id_get(of_object_t *obj, of_object_id_t *id)
+{
+    int wire_type;
+
+    of_tlv16_wire_type_get(obj, &wire_type);
+    if (wire_type == OF_EXPERIMENTER_TYPE) {
+        extension_action_object_id_get(obj, id);
+        return;
+    }
+
+    ASSERT(wire_type >= 0 && wire_type < OF_ACTION_ITEM_COUNT);
+
+    *id = of_action_type_to_id[obj->version][wire_type];
+    ASSERT(*id != OF_OBJECT_INVALID);
+}
+
+/**
+ * Get the object ID based on the wire buffer for an action ID object
+ * @param obj The object being referenced
+ * @param id Where to store the object ID
+ */
+
+
+void
+of_action_id_wire_object_id_get(of_object_t *obj, of_object_id_t *id)
+{
+    int wire_type;
+
+    of_tlv16_wire_type_get(obj, &wire_type);
+    if (wire_type == OF_EXPERIMENTER_TYPE) {
+        extension_action_id_object_id_get(obj, id);
+        return;
+    }
+
+    ASSERT(wire_type >= 0 && wire_type < OF_ACTION_ID_ITEM_COUNT);
+
+    *id = of_action_id_type_to_id[obj->version][wire_type];
+    ASSERT(*id != OF_OBJECT_INVALID);
+}
+
+/**
+ * @fixme to do when we have instruction extensions
+ * See extension_action above
+ */
+
+static int
+extension_instruction_object_id_get(of_object_t *obj, of_object_id_t *id)
+{
+    (void)obj;
+
+    *id = OF_INSTRUCTION_EXPERIMENTER;
+
+    return OF_ERROR_NONE;
+}
+
+/**
+ * Get the object ID based on the wire buffer for an instruction object
+ * @param obj The object being referenced
+ * @param id Where to store the object ID
+ */
+
+void
+of_instruction_wire_object_id_get(of_object_t *obj, of_object_id_t *id)
+{
+    int wire_type;
+
+    of_tlv16_wire_type_get(obj, &wire_type);
+    if (wire_type == OF_EXPERIMENTER_TYPE) {
+        extension_instruction_object_id_get(obj, id);
+        return;
+    }
+
+    ASSERT(wire_type >= 0 && wire_type < OF_INSTRUCTION_ITEM_COUNT);
+
+    *id = of_instruction_type_to_id[obj->version][wire_type];
+    ASSERT(*id != OF_OBJECT_INVALID);
+}
+
+
+/**
+ * @fixme to do when we have queue_prop extensions
+ * See extension_action above
+ */
+
+static void
+extension_queue_prop_object_id_get(of_object_t *obj, of_object_id_t *id)
+{
+    (void)obj;
+
+    *id = OF_QUEUE_PROP_EXPERIMENTER;
+}
+
+/**
+ * Get the object ID based on the wire buffer for an queue_prop object
+ * @param obj The object being referenced
+ * @param id Where to store the object ID
+ */
+
+void
+of_queue_prop_wire_object_id_get(of_object_t *obj, of_object_id_t *id)
+{
+    int wire_type;
+
+    of_tlv16_wire_type_get(obj, &wire_type);
+    if (wire_type == OF_EXPERIMENTER_TYPE) {
+        extension_queue_prop_object_id_get(obj, id);
+        return;
+    }
+
+    ASSERT(wire_type >= 0 && wire_type < OF_QUEUE_PROP_ITEM_COUNT);
+
+    *id = of_queue_prop_type_to_id[obj->version][wire_type];
+    ASSERT(*id != OF_OBJECT_INVALID);
+}
+
+
+/**
+ * @fixme to do when we have table_feature_prop extensions
+ * See extension_action above
+ */
+
+static void
+extension_table_feature_prop_object_id_get(of_object_t *obj, of_object_id_t *id)
+{
+    (void)obj;
+
+    *id = OF_TABLE_FEATURE_PROP_EXPERIMENTER;
+}
+
+/**
+ * Table feature property object ID determination
+ *
+ * @param obj The object being referenced
+ * @param id Where to store the object ID
+ */
+
+void
+of_table_feature_prop_wire_object_id_get(of_object_t *obj, of_object_id_t *id)
+{
+    int wire_type;
+
+    of_tlv16_wire_type_get(obj, &wire_type);
+    if (wire_type == OF_EXPERIMENTER_TYPE) {
+        extension_table_feature_prop_object_id_get(obj, id);
+        return;
+    }
+
+    ASSERT(wire_type >= 0 && wire_type < OF_TABLE_FEATURE_PROP_ITEM_COUNT);
+
+    *id = of_table_feature_prop_type_to_id[obj->version][wire_type];
+    ASSERT(*id != OF_OBJECT_INVALID);
+}
+
+/**
+ * Get the object ID based on the wire buffer for meter_band object
+ * @param obj The object being referenced
+ * @param id Where to store the object ID
+ */
+
+void
+of_meter_band_wire_object_id_get(of_object_t *obj, of_object_id_t *id)
+{
+    int wire_type;
+
+    of_tlv16_wire_type_get(obj, &wire_type);
+    if (wire_type == OF_EXPERIMENTER_TYPE) {
+        *id = OF_METER_BAND_EXPERIMENTER;
+        return;
+    }
+
+    ASSERT(wire_type >= 0 && wire_type < OF_METER_BAND_ITEM_COUNT);
+
+    *id = of_meter_band_type_to_id[obj->version][wire_type];
+    ASSERT(*id != OF_OBJECT_INVALID);
+}
+
+/**
+ * Get the object ID based on the wire buffer for a hello_elem object
+ * @param obj The object being referenced
+ * @param id Where to store the object ID
+ */
+
+void
+of_hello_elem_wire_object_id_get(of_object_t *obj, of_object_id_t *id)
+{
+    int wire_type;
+
+    of_tlv16_wire_type_get(obj, &wire_type);
+    ASSERT(wire_type >= 0 && wire_type < OF_HELLO_ELEM_ITEM_COUNT);
+    *id = of_hello_elem_type_to_id[obj->version][wire_type];
+    ASSERT(*id != OF_OBJECT_INVALID);
+}
+
+/****************************************************************
+ * OXM type/length functions.
+ ****************************************************************/
+
+/* Where does the OXM type-length header lie in the buffer */
+#define OXM_HDR_OFFSET 0
+
+/**
+ * Get the OXM header (type-length fields) from the wire buffer
+ * associated with an OXM object
+ *
+ * Will return if error; set hdr to the OXM header
+ */
+
+#define _GET_OXM_TYPE_LEN(obj, tl_p, wbuf) do {                         \
+        wbuf = OF_OBJECT_TO_WBUF(obj);                                  \
+        ASSERT(wbuf != NULL);                                           \
+        of_wire_buffer_u32_get(wbuf,                                    \
+            OF_OBJECT_ABSOLUTE_OFFSET(obj, OXM_HDR_OFFSET), (tl_p));    \
+    } while (0)
+
+#define _SET_OXM_TYPE_LEN(obj, tl_p, wbuf) do {                         \
+        wbuf = OF_OBJECT_TO_WBUF(obj);                                  \
+        ASSERT(wbuf != NULL);                                           \
+        of_wire_buffer_u32_set(wbuf,                                    \
+            OF_OBJECT_ABSOLUTE_OFFSET(obj, OXM_HDR_OFFSET), (tl_p));    \
+    } while (0)
+
+/**
+ * Get the length of an OXM object from the wire buffer
+ * @param obj The object whose wire buffer is an OXM type
+ * @param bytes (out) Where length is stored 
+ */
+
+void
+of_oxm_wire_length_get(of_object_t *obj, int *bytes)
+{
+    uint32_t type_len;
+    of_wire_buffer_t *wbuf;
+
+    _GET_OXM_TYPE_LEN(obj, &type_len, wbuf);
+    *bytes = OF_OXM_LENGTH_GET(type_len);
+}
+
+/**
+ * Set the length of an OXM object in the wire buffer
+ * @param obj The object whose wire buffer is an OXM type
+ * @param bytes Value to store in wire buffer
+ */
+
+void
+of_oxm_wire_length_set(of_object_t *obj, int bytes)
+{
+    uint32_t type_len;
+    of_wire_buffer_t *wbuf;
+
+    ASSERT(bytes >= 0 && bytes < 256);
+
+    /* Read-modify-write */
+    _GET_OXM_TYPE_LEN(obj, &type_len, wbuf);
+    OF_OXM_LENGTH_SET(type_len, bytes);
+    of_wire_buffer_u32_set(wbuf, 
+           OF_OBJECT_ABSOLUTE_OFFSET(obj, OXM_HDR_OFFSET), type_len);
+}
+
+/**
+ * Get the object ID of an OXM object based on the wire buffer type
+ * @param obj The object whose wire buffer is an OXM type
+ * @param id (out) Where the ID is stored 
+ */
+
+void
+of_oxm_wire_object_id_get(of_object_t *obj, of_object_id_t *id)
+{
+    uint32_t type_len;
+    int wire_type;
+    of_wire_buffer_t *wbuf;
+
+    _GET_OXM_TYPE_LEN(obj, &type_len, wbuf);
+    wire_type = OF_OXM_MASKED_TYPE_GET(type_len);
+    *id = of_oxm_to_object_id(wire_type, obj->version);
+}
+
+/**
+ * Set the wire type of an OXM object based on the object ID passed
+ * @param obj The object whose wire buffer is an OXM type
+ * @param id The object ID mapped to an OXM wire type which is stored
+ */
+
+void
+of_oxm_wire_object_id_set(of_object_t *obj, of_object_id_t id)
+{
+    uint32_t type_len;
+    int wire_type;
+    of_wire_buffer_t *wbuf;
+
+    ASSERT(OF_OXM_VALID_ID(id));
+
+    /* Read-modify-write */
+    _GET_OXM_TYPE_LEN(obj, &type_len, wbuf);
+    wire_type = of_object_to_wire_type(id, obj->version);
+    ASSERT(wire_type >= 0);
+    OF_OXM_MASKED_TYPE_SET(type_len, wire_type);
+    of_wire_buffer_u32_set(wbuf, 
+           OF_OBJECT_ABSOLUTE_OFFSET(obj, OXM_HDR_OFFSET), type_len);
+}
+
+
+
+#define OF_U16_LEN_LENGTH_OFFSET 0
+
+/**
+ * Get the wire length for an object with a uint16 length as first member
+ * @param obj The object being referenced
+ * @param bytes Pointer to location to store length
+ */
+void
+of_u16_len_wire_length_get(of_object_t *obj, int *bytes)
+{
+    of_wire_buffer_t *wbuf = OF_OBJECT_TO_WBUF(obj);
+    uint16_t u16;
+
+    ASSERT(wbuf != NULL);
+
+    of_wire_buffer_u16_get(wbuf, 
+           OF_OBJECT_ABSOLUTE_OFFSET(obj, OF_U16_LEN_LENGTH_OFFSET),
+           &u16);
+
+    *bytes = u16;
+}
+
+/**
+ * Set the wire length for an object with a uint16 length as first member
+ * @param obj The object being referenced
+ * @param bytes The length of the object
+ */
+
+void
+of_u16_len_wire_length_set(of_object_t *obj, int bytes)
+{
+    of_wire_buffer_t *wbuf = OF_OBJECT_TO_WBUF(obj);
+    ASSERT(wbuf != NULL);
+
+    /* ASSERT(obj is u16-len entry) */
+
+    of_wire_buffer_u16_set(wbuf, 
+           OF_OBJECT_ABSOLUTE_OFFSET(obj, OF_U16_LEN_LENGTH_OFFSET),
+           bytes);
+}
+
+
+#define OF_PACKET_QUEUE_LENGTH_OFFSET(ver) \
+    (((ver) >= OF_VERSION_1_2) ? 8 : 4)
+
+/**
+ * Get the wire length for a packet queue object
+ * @param obj The object being referenced
+ * @param bytes Pointer to location to store length
+ *
+ * The length is a uint16 at the offset indicated above
+ */
+void
+of_packet_queue_wire_length_get(of_object_t *obj, int *bytes)
+{
+    of_wire_buffer_t *wbuf = OF_OBJECT_TO_WBUF(obj);
+    uint16_t u16;
+    int offset;
+
+    ASSERT(wbuf != NULL);
+
+    /* ASSERT(obj is packet queue obj) */
+    offset = OF_PACKET_QUEUE_LENGTH_OFFSET(obj->version);
+    of_wire_buffer_u16_get(wbuf, OF_OBJECT_ABSOLUTE_OFFSET(obj, offset),
+                           &u16);
+
+    *bytes = u16;
+}
+
+/**
+ * Set the wire length for a 1.2 packet queue object
+ * @param obj The object being referenced
+ * @param bytes The length of the object
+ *
+ * The length is a uint16 at the offset indicated above
+ */
+
+void
+of_packet_queue_wire_length_set(of_object_t *obj, int bytes)
+{
+    of_wire_buffer_t *wbuf = OF_OBJECT_TO_WBUF(obj);
+    int offset;
+
+    ASSERT(wbuf != NULL);
+
+    /* ASSERT(obj is packet queue obj) */
+    offset = OF_PACKET_QUEUE_LENGTH_OFFSET(obj->version);
+    of_wire_buffer_u16_set(wbuf, OF_OBJECT_ABSOLUTE_OFFSET(obj, offset),
+                                  bytes);
+}
+
+/**
+ * Get the wire length for a meter band stats list
+ * @param obj The object being referenced
+ * @param bytes Pointer to location to store length
+ *
+ * Must a meter_stats object as a parent
+ */
+
+void
+of_list_meter_band_stats_wire_length_get(of_object_t *obj, int *bytes)
+{
+    ASSERT(obj->parent != NULL);
+    ASSERT(obj->parent->object_id == OF_METER_STATS);
+
+    /* We're counting on the parent being properly initialized already.
+     * The length is stored in a uint16 at offset 4 of the parent.
+     */
+    *bytes = obj->parent->length - OF_OBJECT_FIXED_LENGTH(obj->parent);
+}
+
+#define OF_METER_STATS_LENGTH_OFFSET 4
+
+/**
+ * Get/set the wire length for a meter stats object
+ * @param obj The object being referenced
+ * @param bytes Pointer to location to store length
+ *
+ * It's almost a TLV....
+ */
+
+void
+of_meter_stats_wire_length_get(of_object_t *obj, int *bytes)
+{
+    uint16_t val16;
+    of_wire_buffer_t *wbuf = OF_OBJECT_TO_WBUF(obj);
+    ASSERT(wbuf != NULL);
+    of_wire_buffer_u16_get(wbuf, 
+               OF_OBJECT_ABSOLUTE_OFFSET(obj, OF_METER_STATS_LENGTH_OFFSET),
+               &val16);
+    *bytes = val16;
+}
+
+void
+of_meter_stats_wire_length_set(of_object_t *obj, int bytes)
+{
+    of_wire_buffer_t *wbuf = OF_OBJECT_TO_WBUF(obj);
+    ASSERT(wbuf != NULL);
+
+    of_wire_buffer_u16_set(wbuf, 
+        OF_OBJECT_ABSOLUTE_OFFSET(obj, OF_METER_STATS_LENGTH_OFFSET), bytes);
+}
+
+/*
+ * Non-message extension push wire values
+ */
+
+int
+of_extension_object_wire_push(of_object_t *obj)
+{
+    of_action_bsn_mirror_t *action_mirror;
+    of_action_id_bsn_mirror_t *action_id_mirror;
+    of_action_bsn_set_tunnel_dst_t *action_set_tunnel_dst;
+    of_action_id_bsn_set_tunnel_dst_t *action_id_set_tunnel_dst;
+    of_action_nicira_dec_ttl_t *action_nicira_dec_ttl;
+    of_action_id_nicira_dec_ttl_t *action_id_nicira_dec_ttl;
+
+    /* Push exp type, subtype */
+    switch (obj->object_id) {
+    case OF_ACTION_BSN_MIRROR:
+        action_mirror = (of_action_bsn_mirror_t *)obj;
+        of_action_bsn_mirror_experimenter_set(action_mirror,
+            OF_EXPERIMENTER_ID_BSN);
+        of_action_bsn_mirror_subtype_set(action_mirror, 1);
+        break;
+    case OF_ACTION_ID_BSN_MIRROR:
+        action_id_mirror = (of_action_id_bsn_mirror_t *)obj;
+        of_action_id_bsn_mirror_experimenter_set(action_id_mirror,
+            OF_EXPERIMENTER_ID_BSN);
+        of_action_id_bsn_mirror_subtype_set(action_id_mirror, 1);
+        break;
+    case OF_ACTION_BSN_SET_TUNNEL_DST:
+        action_set_tunnel_dst = (of_action_bsn_set_tunnel_dst_t *)obj;
+        of_action_bsn_set_tunnel_dst_experimenter_set(action_set_tunnel_dst,
+            OF_EXPERIMENTER_ID_BSN);
+        of_action_bsn_set_tunnel_dst_subtype_set(action_set_tunnel_dst, 2);
+        break;
+    case OF_ACTION_ID_BSN_SET_TUNNEL_DST:
+        action_id_set_tunnel_dst = (of_action_id_bsn_set_tunnel_dst_t *)obj;
+        of_action_id_bsn_set_tunnel_dst_experimenter_set(action_id_set_tunnel_dst,
+            OF_EXPERIMENTER_ID_BSN);
+        of_action_id_bsn_set_tunnel_dst_subtype_set(action_id_set_tunnel_dst, 2);
+        break;
+    case OF_ACTION_NICIRA_DEC_TTL:
+        action_nicira_dec_ttl = (of_action_nicira_dec_ttl_t *)obj;
+        of_action_nicira_dec_ttl_experimenter_set(action_nicira_dec_ttl,
+            OF_EXPERIMENTER_ID_NICIRA);
+        of_action_nicira_dec_ttl_subtype_set(action_nicira_dec_ttl, 18);
+        break;
+    case OF_ACTION_ID_NICIRA_DEC_TTL:
+        action_id_nicira_dec_ttl = (of_action_id_nicira_dec_ttl_t *)obj;
+        of_action_id_nicira_dec_ttl_experimenter_set(action_id_nicira_dec_ttl,
+            OF_EXPERIMENTER_ID_NICIRA);
+        of_action_id_nicira_dec_ttl_subtype_set(action_id_nicira_dec_ttl, 18);
+        break;
+    default:
+        break;
+    }
+
+    return OF_ERROR_NONE;
+}
diff --git a/c_gen/templates/of_utils.c b/c_gen/templates/of_utils.c
new file mode 100644
index 0000000..f9c1972
--- /dev/null
+++ b/c_gen/templates/of_utils.c
@@ -0,0 +1,78 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/****************************************************************
+ * File: of_utils.h
+ *
+ * Some utilities provided based on LOCI code generation
+ *
+ ****************************************************************/
+
+#include <loci/of_utils.h>
+
+
+/**
+ * Check if the given port is used as an output for any entry on the list
+ * @param actions The list of actions being checked
+ * @param outport The port being sought
+ * @returns Boolean, true if entry has an output action to outport
+ *
+ * @fixme VERSION Currently only OF 1.0 supported
+ * @fixme Check for error return in accessor
+ *
+ * If outport is "wildcard", the test should be ignored, so return true
+ */
+
+int
+of_action_list_has_out_port(of_list_action_t *actions, of_port_no_t outport)
+{
+    of_action_t elt;
+    of_action_output_t *output;
+    int loop_rv;
+    of_port_no_t port_no;
+    int rv = 0;
+
+    if (outport == OF_PORT_DEST_WILDCARD) { /* Same as OFPP_ANY */
+        return 1;
+    }
+
+    output = &elt.output;
+    OF_LIST_ACTION_ITER(actions, &elt, loop_rv) {
+        if (output->object_id == OF_ACTION_OUTPUT) {
+            of_action_output_port_get(output, &port_no);
+            if (port_no == outport) {
+                rv = 1;
+                break;
+            }
+        }
+    }
+
+    return rv;
+}
+
diff --git a/c_gen/templates/of_utils.h b/c_gen/templates/of_utils.h
new file mode 100644
index 0000000..1a3a29a
--- /dev/null
+++ b/c_gen/templates/of_utils.h
@@ -0,0 +1,45 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/****************************************************************
+ * File: of_utils.h
+ *
+ * Header file for some utilities provided based on LOCI code generation
+ *
+ ****************************************************************/
+
+#ifndef OF_UTILS_H
+#define OF_UTILS_H
+
+#include <loci/loci.h>
+
+extern int of_action_list_has_out_port(of_list_action_t *actions, 
+                                       of_port_no_t outport);
+
+#endif
diff --git a/c_gen/templates/of_wire_buf.c b/c_gen/templates/of_wire_buf.c
new file mode 100644
index 0000000..acfcb84
--- /dev/null
+++ b/c_gen/templates/of_wire_buf.c
@@ -0,0 +1,159 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+/****************************************************************
+ *
+ * of_wire_buf.c
+ *
+ * Implementation of more complicated of_wire_buf operations
+ *
+ ****************************************************************/
+
+#include <loci/loci.h>
+
+#if 0
+static of_match_v1_t *
+wire_buf_v1_to_match(of_wire_buffer_t *wbuf, int offset)
+{
+    of_match_v1_t *match;
+    match = of_match_v1_new(OF_VERSION_1_0);
+    return match;
+}
+
+/*
+ * First pass at wire buf to match conversions.  These involve a lot
+ * of copying and could be made more efficient.
+ */
+int
+of_wire_buffer_of_match_get(of_object_t *obj, int offset, of_match_t *match)
+{
+    switch (obj->version) {
+    case OF_VERSION_1_0:
+        break;
+    case OF_VERSION_1_1:
+        break;
+    case OF_VERSION_1_2:
+        break;
+    default:
+        return OF_ERROR_VERSION;
+        break;
+    }
+
+    return OF_ERROR_NONE;
+}
+
+/**
+ * Write a host match structure into the wire buffer
+ * @param obj The object that owns the buffer to write to
+ * @param offset The start location in the wire buffer
+ * @param match Pointer to the host match object
+ * @param cur_len The current length of the object in the buffer
+ *
+ * If the current length is different than the length of the new data
+ * being written, then move the remains of the buffer.  This only applies
+ * to version 1.2 (though it should apply to 1.1).
+ */
+
+int
+of_wire_buffer_of_match_set(of_object_t *obj, int offset, 
+                            of_match_t *match, int cur_len)
+{
+    // of_octets_t octets;
+
+    switch (obj->version) {
+    case OF_VERSION_1_0:
+        break;
+    case OF_VERSION_1_1:
+        break;
+    case OF_VERSION_1_2:
+        // of_match_v3_serialize(match, &octets);
+        break;
+    default:
+        return OF_ERROR_VERSION;
+        break;
+    }
+
+    return OF_ERROR_NONE;
+}
+#endif
+
+/**
+ * Replace data in the data buffer, possibly with a new
+ * length or appending to buffer.
+ *
+ * @param wbuf The wire buffer being updated.
+ * @param offset The start point of the update
+ * @param old_len The number of bytes being replaced
+ * @param data Source of bytes to write into the buffer
+ * @param new_len The number of bytes to write
+ *
+ * The buffer may grow for this operation.  Current byte count
+ * is pre-grow for the replace.
+ *
+ * The current byte count for the buffer is updated.
+ * 
+ */
+
+void
+of_wire_buffer_replace_data(of_wire_buffer_t *wbuf, 
+                            int offset, 
+                            int old_len,
+                            uint8_t *data,
+                            int new_len)
+{
+    int bytes;
+    uint8_t *src_ptr, *dst_ptr;
+    int cur_bytes;
+
+    ASSERT(wbuf != NULL);
+
+    cur_bytes = wbuf->current_bytes;
+
+    /* Doesn't make sense; mismatch in current buffer info */
+    ASSERT(old_len + offset <= wbuf->current_bytes);
+
+    if (old_len < new_len) {
+        of_wire_buffer_grow(wbuf, offset + new_len);
+    } else {
+        wbuf->current_bytes += (new_len - old_len); // may decrease size
+    }
+
+    if ((old_len + offset < cur_bytes) && (old_len != new_len)) {
+        /* Need to move back of buffer */
+        src_ptr = &wbuf->buf[offset + old_len];
+        dst_ptr = &wbuf->buf[offset + new_len];
+        bytes = cur_bytes - (offset + old_len);
+        MEMMOVE(dst_ptr, src_ptr, bytes);
+    }
+
+    dst_ptr = &wbuf->buf[offset];
+    MEMCPY(dst_ptr, data, new_len);
+
+    ASSERT(wbuf->current_bytes == cur_bytes + (new_len - old_len));
+}
diff --git a/c_gen/templates/of_wire_buf.h b/c_gen/templates/of_wire_buf.h
new file mode 100644
index 0000000..cf1ee17
--- /dev/null
+++ b/c_gen/templates/of_wire_buf.h
@@ -0,0 +1,884 @@
+:: # 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.
+::
+/* Copyright 2013, Big Switch Networks, Inc. */
+
+#if !defined(_OF_WIRE_BUF_H_)
+#define _OF_WIRE_BUF_H_
+
+#include <string.h>
+#include <loci/loci_base.h>
+#include <loci/of_object.h>
+#include <loci/of_match.h>
+#include <loci/of_buffer.h>
+
+/****************************************************************
+ *
+ * Wire buffer declaration, constructor, data alloc, delete
+ *
+ ****************************************************************/
+
+/* Maximum length of an OpenFlow message. All wire buffers allocated for
+ * new objects (that don't come from a message) are this length to avoid
+ * needing to grow the buffers. */
+#define OF_WIRE_BUFFER_MAX_LENGTH 65535
+
+/**
+ * Buffer management structure
+ */
+typedef struct of_wire_buffer_s {
+    /** Pointer to a monolithic data buffer */
+    uint8_t *buf;
+
+    /** Length of buffer actually allocated */
+    int alloc_bytes;
+    /** Current extent actually used */
+    int current_bytes;
+    /** If not NULL, use this to dealloc buf */
+    of_buffer_free_f free;
+} of_wire_buffer_t;
+
+/**
+ * Decouples object from underlying wire buffer
+ *
+ * Called a 'slice' in some places.
+ */
+typedef struct of_wire_object_s {
+    /** A pointer to the underlying buffer's management structure. */
+    of_wire_buffer_t *wbuf;  
+    /** The start offset for this object relative to the start of the
+     * underlying buffer */
+    int obj_offset;
+    /* Boolean, whether the object owns the wire buffer. */
+    char owned;
+} of_wire_object_t;
+
+#define WBUF_BUF(wbuf) (wbuf)->buf
+#define WBUF_ALLOC_BYTES(wbuf) (wbuf)->alloc_bytes
+#define WBUF_CURRENT_BYTES(wbuf) (wbuf)->current_bytes
+
+/**
+ * For read access, throw an error code if current buffer
+ * is not big enough.
+ * @param wbuf Pointer to an of_wire_buffer_t structure
+ * @param offset The extent of the buffer required
+ */
+#define OF_WIRE_BUFFER_ACCESS_CHECK(wbuf, offset)                      \
+    ASSERT(((wbuf) != NULL) && (WBUF_BUF(wbuf) != NULL) &&             \
+           (offset > 0) && (WBUF_CURRENT_BYTES(wbuf) >= offset))
+
+/*
+ * Index a wire buffer
+ * Index a wire object (from obj_offset)
+ * Index a LOCI object
+ */
+
+/**
+ * Return a pointer to a particular offset in a wire buffer's data
+ * @param wbuf Pointer to an of_wire_buffer_t structure
+ * @param offset The location to reference
+ */
+#define OF_WIRE_BUFFER_INDEX(wbuf, offset) (&((WBUF_BUF(wbuf))[offset]))
+
+/**
+ * Return a pointer to a particular offset in the underlying buffer
+ * associated with a wire object
+ * @param wobj Pointer to an of_wire_object_t structure
+ * @param offset The location to reference relative to the start of the object
+ */
+#define OF_WIRE_OBJECT_INDEX(wobj, offset) \
+    OF_WIRE_BUFFER_INDEX((wobj)->wbuf, (offset) + (wobj)->obj_offset)
+
+/****************************************************************
+ * Object specific macros; of_object_t includes a wire_object
+ ****************************************************************/
+
+/**
+ * Return a pointer to a particular offset in the underlying buffer
+ * associated with a wire object
+ * @param obj Pointer to an of_object_t object
+ * @param offset The location to reference relative to the start of the object
+ */
+#define OF_OBJECT_BUFFER_INDEX(obj, offset) \
+    OF_WIRE_OBJECT_INDEX(&((obj)->wire_object), offset)
+
+/**
+ * Return the absolute offset as an integer from a object-relative offset
+ * @param obj Pointer to an of_wire_object_t structure
+ * @param offset The location to reference relative to the start of the object
+ */
+#define OF_OBJECT_ABSOLUTE_OFFSET(obj, offset) \
+    ((obj)->wire_object.obj_offset + offset)
+
+
+/**
+ * Map a generic object to the underlying wire buffer object (not the octets)
+ *
+ * Treat as private
+ */
+#define OF_OBJECT_TO_WBUF(obj) ((obj)->wire_object.wbuf)
+
+
+
+/**
+ * Minimum allocation size for wire buffer object
+ */
+#define OF_WIRE_BUFFER_MIN_ALLOC_BYTES 128
+
+/**
+ * Allocate a wire buffer object and the underlying data buffer.
+ * The wire buffer is initally empty (current_bytes == 0).
+ * @param a_bytes The number of bytes to allocate.
+ * @returns A wire buffer object if successful or NULL
+ */
+static inline of_wire_buffer_t *
+of_wire_buffer_new(int a_bytes)
+{
+    of_wire_buffer_t *wbuf;
+
+    wbuf = (of_wire_buffer_t *)MALLOC(sizeof(of_wire_buffer_t));
+    if (wbuf == NULL) {
+        return NULL;
+    }
+    MEMSET(wbuf, 0, sizeof(of_wire_buffer_t));
+
+    if (a_bytes < OF_WIRE_BUFFER_MIN_ALLOC_BYTES) {
+        a_bytes = OF_WIRE_BUFFER_MIN_ALLOC_BYTES;
+    }
+
+    if ((wbuf->buf = (uint8_t *)MALLOC(a_bytes)) == NULL) {
+        FREE(wbuf);
+        return NULL;
+    }
+    MEMSET(wbuf->buf, 0, a_bytes);
+    wbuf->current_bytes = 0;
+    wbuf->alloc_bytes = a_bytes;
+
+    return (of_wire_buffer_t *)wbuf;
+}
+
+/**
+ * Allocate a wire buffer object and bind it to an existing buffer.
+ * @param buf       Existing buffer.
+ * @param bytes     Size of buf.
+ * @param buf_free  Function called to deallocate buf.
+ * @returns A wire buffer object if successful or NULL
+ */
+static inline of_wire_buffer_t *
+of_wire_buffer_new_bind(uint8_t *buf, int bytes, of_buffer_free_f buf_free)
+{
+    of_wire_buffer_t *wbuf;
+
+    wbuf = (of_wire_buffer_t *)MALLOC(sizeof(of_wire_buffer_t));
+    if (wbuf == NULL) {
+        return NULL;
+    }
+
+    wbuf->buf = buf;
+    wbuf->free = buf_free;
+    wbuf->current_bytes = bytes;
+    wbuf->alloc_bytes = bytes;
+
+    return (of_wire_buffer_t *)wbuf;
+}
+
+static inline void
+of_wire_buffer_free(of_wire_buffer_t *wbuf)
+{
+    if (wbuf == NULL) return;
+
+    if (wbuf->buf != NULL) {
+        if (wbuf->free != NULL) {
+            wbuf->free(wbuf->buf);
+        } else {
+            FREE(wbuf->buf);
+        }
+    }
+
+    FREE(wbuf);
+}
+
+static inline void
+of_wire_buffer_steal(of_wire_buffer_t *wbuf, uint8_t **buffer)
+{
+    *buffer = wbuf->buf;
+    /* Mark underlying data buffer as taken */
+    wbuf->buf = NULL;
+    of_wire_buffer_free(wbuf);
+}
+
+/**
+ * Increase the currently used length of the wire buffer.
+ * Will fail an assertion if the allocated length is not long enough.
+ *
+ * @param wbuf Pointer to the wire buffer structure
+ * @param bytes Total number of bytes buffer should grow to
+ */
+
+static inline void
+of_wire_buffer_grow(of_wire_buffer_t *wbuf, int bytes)
+{
+    ASSERT(wbuf != NULL);
+    ASSERT(wbuf->alloc_bytes >= bytes);
+    if (bytes > wbuf->current_bytes) {
+        wbuf->current_bytes = bytes;
+    }
+}
+
+/* TBD */
+
+
+/**
+ * Get a uint8_t scalar from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value Pointer to where to put value
+ *
+ * The underlying buffer accessor funtions handle endian and alignment.
+ */
+
+static inline void
+of_wire_buffer_u8_get(of_wire_buffer_t *wbuf, int offset, uint8_t *value)
+{
+    OF_WIRE_BUFFER_ACCESS_CHECK(wbuf, offset + (int) sizeof(uint8_t));
+    buf_u8_get(OF_WIRE_BUFFER_INDEX(wbuf, offset), value);
+}
+
+/**
+ * Set a uint8_t scalar in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value The value to store
+ *
+ * The underlying buffer accessor funtions handle endian and alignment.
+ */
+
+static inline void
+of_wire_buffer_u8_set(of_wire_buffer_t *wbuf, int offset, uint8_t value)
+{
+    OF_WIRE_BUFFER_ACCESS_CHECK(wbuf, offset + (int) sizeof(uint8_t));
+    buf_u8_set(OF_WIRE_BUFFER_INDEX(wbuf, offset), value);
+}
+
+/**
+ * Get a uint16_t scalar from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value Pointer to where to put value
+ *
+ * The underlying buffer accessor funtions handle endian and alignment.
+ */
+
+static inline void
+of_wire_buffer_u16_get(of_wire_buffer_t *wbuf, int offset, uint16_t *value)
+{
+    OF_WIRE_BUFFER_ACCESS_CHECK(wbuf, offset + (int) sizeof(uint16_t));
+    buf_u16_get(OF_WIRE_BUFFER_INDEX(wbuf, offset), value);
+}
+
+/**
+ * Set a uint16_t scalar in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value The value to store
+ *
+ * The underlying buffer accessor funtions handle endian and alignment.
+ */
+
+static inline void
+of_wire_buffer_u16_set(of_wire_buffer_t *wbuf, int offset, uint16_t value)
+{
+    OF_WIRE_BUFFER_ACCESS_CHECK(wbuf, offset + (int) sizeof(uint16_t));
+    buf_u16_set(OF_WIRE_BUFFER_INDEX(wbuf, offset), value);
+}
+
+/**
+ * Get a uint32_t scalar from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value Pointer to where to put value
+ *
+ * The underlying buffer accessor funtions handle endian and alignment.
+ */
+
+static inline void
+of_wire_buffer_u32_get(of_wire_buffer_t *wbuf, int offset, uint32_t *value)
+{
+    OF_WIRE_BUFFER_ACCESS_CHECK(wbuf, offset + (int) sizeof(uint32_t));
+    buf_u32_get(OF_WIRE_BUFFER_INDEX(wbuf, offset), value);
+}
+
+/**
+ * Set a uint32_t scalar in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value The value to store
+ *
+ * The underlying buffer accessor funtions handle endian and alignment.
+ */
+
+static inline void
+of_wire_buffer_u32_set(of_wire_buffer_t *wbuf, int offset, uint32_t value)
+{
+    OF_WIRE_BUFFER_ACCESS_CHECK(wbuf, offset + (int) sizeof(uint32_t));
+    buf_u32_set(OF_WIRE_BUFFER_INDEX(wbuf, offset), value);
+}
+
+/**
+ * Get a uint64_t scalar from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value Pointer to where to put value
+ *
+ * The underlying buffer accessor funtions handle endian and alignment.
+ */
+
+static inline void
+of_wire_buffer_u64_get(of_wire_buffer_t *wbuf, int offset, uint64_t *value)
+{
+    OF_WIRE_BUFFER_ACCESS_CHECK(wbuf, offset + (int) sizeof(uint64_t));
+    buf_u64_get(OF_WIRE_BUFFER_INDEX(wbuf, offset), value);
+}
+
+/**
+ * Set a uint64_t scalar in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value The value to store
+ *
+ * The underlying buffer accessor funtions handle endian and alignment.
+ */
+
+static inline void
+of_wire_buffer_u64_set(of_wire_buffer_t *wbuf, int offset, uint64_t value)
+{
+    OF_WIRE_BUFFER_ACCESS_CHECK(wbuf, offset + (int) sizeof(uint64_t));
+    buf_u64_set(OF_WIRE_BUFFER_INDEX(wbuf, offset), value);
+}
+
+/**
+ * Get a generic OF match structure from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value Pointer to the structure to update
+ *
+ * NOT IMPLEMENTED.
+ *
+ */
+
+static inline void
+of_wire_buffer_match_get(int version, of_wire_buffer_t *wbuf, int offset,
+                      of_match_t *value)
+{
+    ASSERT(0);
+}
+
+/**
+ * Set a generic OF match structure in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value Pointer to the structure to store
+ *
+ * NOT IMPLEMENTED.
+ *
+ */
+
+static inline void
+of_wire_buffer_match_set(int version, of_wire_buffer_t *wbuf, int offset,
+                      of_match_t *value)
+{
+    ASSERT(0);
+}
+
+/**
+ * Get a port description object from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value Pointer to the structure to fill out
+ *
+ * NOT IMPLEMENTED.
+ *
+ * @fixme Where should this go?
+ */
+
+static inline void
+of_wire_buffer_of_port_desc_get(int version, of_wire_buffer_t *wbuf, int offset,
+                             void *value)
+{
+    ASSERT(0);
+}
+
+/**
+ * Set a port description object in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value Pointer to the structure to fill out
+ *
+ * NOT IMPLEMENTED.
+ *
+ * @fixme Where should this go?
+ */
+
+static inline void
+of_wire_buffer_of_port_desc_set(int version, of_wire_buffer_t *wbuf, int offset,
+                             void *value)
+{
+    ASSERT(0);
+}
+
+/**
+ * Get a port number scalar from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value Pointer to where to put value
+ *
+ * Port numbers are version specific.
+ */
+
+static inline void
+of_wire_buffer_port_no_get(int version, of_wire_buffer_t *wbuf, int offset,
+                        of_port_no_t *value)
+{
+    uint16_t v16;
+    uint32_t v32;
+
+    switch (version) {
+    case OF_VERSION_1_0:
+        of_wire_buffer_u16_get(wbuf, offset, &v16);
+        *value = v16;
+        break;
+    case OF_VERSION_1_1:
+    case OF_VERSION_1_2:
+    case OF_VERSION_1_3:
+        of_wire_buffer_u32_get(wbuf, offset, &v32);
+        *value = v32;
+        break;
+    default:
+        ASSERT(0);
+    }
+}
+
+/**
+ * Set a port number scalar from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value The value to store in the buffer
+ *
+ * Port numbers are version specific.
+ */
+
+static inline void
+of_wire_buffer_port_no_set(int version, of_wire_buffer_t *wbuf, int offset,
+                      of_port_no_t value)
+{
+
+    switch (version) {
+    case OF_VERSION_1_0:
+        of_wire_buffer_u16_set(wbuf, offset, (uint16_t)value);
+        break;
+    case OF_VERSION_1_1:
+    case OF_VERSION_1_2:
+    case OF_VERSION_1_3:
+        of_wire_buffer_u32_set(wbuf, offset, (uint32_t)value);
+        break;
+    default:
+        ASSERT(0);
+    }
+}
+
+/**
+ * Get a flow mod command value from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value Pointer to where to put value
+ */
+
+static inline void
+of_wire_buffer_fm_cmd_get(int version, of_wire_buffer_t *wbuf, int offset,
+                        of_fm_cmd_t *value)
+{
+    uint16_t v16;
+    uint8_t v8;
+
+    switch (version) {
+    case OF_VERSION_1_0:
+        of_wire_buffer_u16_get(wbuf, offset, &v16);
+        *value = v16;
+        break;
+    case OF_VERSION_1_1:
+    case OF_VERSION_1_2:
+    case OF_VERSION_1_3:
+        of_wire_buffer_u8_get(wbuf, offset, &v8);
+        *value = v8;
+        break;
+    default:
+        ASSERT(0);
+    }
+}
+
+/**
+ * Set a flow mod command value in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value The value to store
+ */
+
+static inline void
+of_wire_buffer_fm_cmd_set(int version, of_wire_buffer_t *wbuf, int offset,
+                      of_fm_cmd_t value)
+{
+    switch (version) {
+    case OF_VERSION_1_0:
+        of_wire_buffer_u16_set(wbuf, offset, (uint16_t)value);
+        break;
+    case OF_VERSION_1_1:
+    case OF_VERSION_1_2:
+    case OF_VERSION_1_3:
+        of_wire_buffer_u8_set(wbuf, offset, (uint8_t)value);
+        break;
+    default:
+        ASSERT(0);
+    }
+}
+
+/**
+ * Get a wild card bitmap value from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value Pointer to where to store the value
+ */
+
+static inline void
+of_wire_buffer_wc_bmap_get(int version, of_wire_buffer_t *wbuf, int offset,
+                        of_wc_bmap_t *value)
+{
+    uint32_t v32;
+    uint64_t v64;
+
+    switch (version) {
+    case OF_VERSION_1_0:
+    case OF_VERSION_1_1:
+        of_wire_buffer_u32_get(wbuf, offset, &v32);
+        *value = v32;
+        break;
+    case OF_VERSION_1_2:
+    case OF_VERSION_1_3:
+        of_wire_buffer_u64_get(wbuf, offset, &v64);
+        *value = v64;
+        break;
+    default:
+        ASSERT(0);
+    }
+}
+
+/**
+ * Set a wild card bitmap value in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value The value to store
+ */
+
+static inline void
+of_wire_buffer_wc_bmap_set(int version, of_wire_buffer_t *wbuf, int offset,
+                      of_wc_bmap_t value)
+{
+    switch (version) {
+    case OF_VERSION_1_0:
+    case OF_VERSION_1_1:
+        of_wire_buffer_u32_set(wbuf, offset, (uint32_t)value);
+        break;
+    case OF_VERSION_1_2:
+    case OF_VERSION_1_3:
+        of_wire_buffer_u64_set(wbuf, offset, (uint64_t)value);
+        break;
+    default:
+        ASSERT(0);
+    }
+}
+
+/* match bitmap and wildcard bitmaps followed the same pattern */
+#define of_wire_buffer_match_bmap_get of_wire_buffer_wc_bmap_get
+#define of_wire_buffer_match_bmap_set of_wire_buffer_wc_bmap_set
+
+/* Derived functions, mostly for fixed length name strings */
+#define of_wire_buffer_char_get of_wire_buffer_u8_get
+#define of_wire_buffer_char_set of_wire_buffer_u8_set
+
+
+/**
+ * Get an octet object from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value Pointer to where to put value
+ *
+ * of_octets_t is treated specially as the high level functions pass around
+ * pointers for "get" operators.
+ *
+ * Important: The length of data to copy is stored in the value->bytes
+ * variable.
+ */
+
+static inline void
+of_wire_buffer_octets_data_get(of_wire_buffer_t *wbuf, int offset,
+                               of_octets_t *value)
+{
+    OF_WIRE_BUFFER_ACCESS_CHECK(wbuf, offset + OF_OCTETS_BYTES_GET(value));
+    buf_octets_get(OF_WIRE_BUFFER_INDEX(wbuf, offset),
+                   OF_OCTETS_POINTER_GET(value),
+                   OF_OCTETS_BYTES_GET(value));
+}
+
+/**
+ * Set an octet object in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param value Pointer to the octet stream to store
+ * @param cur_len Current length of data in the buffer
+ *
+ * of_octets_t is treated specially as the high level functions pass around
+ * pointers for "get" operators.
+ *
+ * @fixme Need to take into account cur_len
+ */
+
+static inline void
+of_wire_buffer_octets_data_set(of_wire_buffer_t *wbuf, int offset,
+                               of_octets_t *value, int cur_len)
+{
+    // FIXME need to adjust length of octets member in buffer
+    ASSERT(cur_len == 0 || cur_len == value->bytes);
+
+    OF_WIRE_BUFFER_ACCESS_CHECK(wbuf, offset + OF_OCTETS_BYTES_GET(value));
+    buf_octets_set(OF_WIRE_BUFFER_INDEX(wbuf, offset),
+                   OF_OCTETS_POINTER_GET(value),
+                   OF_OCTETS_BYTES_GET(value));
+}
+
+static inline void
+_wbuf_octets_set(of_wire_buffer_t *wbuf, int offset, uint8_t *src, int bytes) {
+    of_octets_t octets;
+    OF_OCTETS_POINTER_SET(&octets, src);
+    OF_OCTETS_BYTES_SET(&octets, bytes);
+    of_wire_buffer_octets_data_set(wbuf, offset, &octets, bytes);
+}
+
+static inline void
+_wbuf_octets_get(of_wire_buffer_t *wbuf, int offset, uint8_t *dst, int bytes) {
+    of_octets_t octets;
+    OF_OCTETS_POINTER_SET(&octets, dst);
+    OF_OCTETS_BYTES_SET(&octets, bytes);
+    of_wire_buffer_octets_data_get(wbuf, offset, &octets);
+}
+
+
+/**
+ * Get a MAC address from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param mac Pointer to the mac address location
+ *
+ * Uses the octets function.
+ */
+
+#define of_wire_buffer_mac_get(buf, offset, mac) \
+    _wbuf_octets_get(buf, offset, (uint8_t *)mac, 6)
+
+/**
+ * Set a MAC address in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param mac The variable holding the mac address to store
+ *
+ * Uses the octets function.
+ */
+
+#define of_wire_buffer_mac_set(buf, offset, mac) \
+    _wbuf_octets_set(buf, offset, (uint8_t *)&mac, 6)
+
+
+/**
+ * Get a port name string from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param mac The mac address
+ *
+ * Uses the octets function.
+ */
+#define of_wire_buffer_port_name_get(buf, offset, portname) \
+    _wbuf_octets_get(buf, offset, (uint8_t *)portname, \
+                           OF_MAX_PORT_NAME_LEN)
+
+/**
+ * Set a port name address in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param portname Where to store the port name
+ *
+ * Uses the octets function.
+ */
+
+#define of_wire_buffer_port_name_set(buf, offset, portname) \
+    _wbuf_octets_set(buf, offset, (uint8_t *)portname, \
+                           OF_MAX_PORT_NAME_LEN)
+
+
+/**
+ * Get a table name string from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param portname The port name
+ *
+ * Uses the octets function.
+ */
+
+#define of_wire_buffer_tab_name_get(buf, offset, tabname) \
+    _wbuf_octets_get(buf, offset, (uint8_t *)tabname, \
+                           OF_MAX_TABLE_NAME_LEN)
+
+/**
+ * Set a table name address in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param mac Where to store the table name
+ *
+ * Uses the octets function.
+ */
+
+#define of_wire_buffer_tab_name_set(buf, offset, tabname) \
+    _wbuf_octets_set(buf, offset, (uint8_t *)tabname, \
+                           OF_MAX_TABLE_NAME_LEN)
+
+/**
+ * Get a description string from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param desc Where to store the description string
+ *
+ * Uses the octets function.
+ */
+
+#define of_wire_buffer_desc_str_get(buf, offset, desc) \
+    _wbuf_octets_get(buf, offset, (uint8_t *)desc, OF_DESC_STR_LEN)
+
+/**
+ * Set a description string in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param desc The description string
+ *
+ * Uses the octets function.
+ */
+
+#define of_wire_buffer_desc_str_set(buf, offset, desc) \
+    _wbuf_octets_set(buf, offset, (uint8_t *)desc, OF_DESC_STR_LEN)
+
+/**
+ * Get a serial number string from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param sernum Where to store the serial number string
+ *
+ * Uses the octets function.
+ */
+
+#define of_wire_buffer_ser_num_get(buf, offset, sernum) \
+    _wbuf_octets_get(buf, offset, (uint8_t *)sernum, OF_SERIAL_NUM_LEN)
+
+/**
+ * Set a serial number string in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param desc The serial number string
+ *
+ * Uses the octets function.
+ */
+
+#define of_wire_buffer_ser_num_set(buf, offset, sernum) \
+    _wbuf_octets_set(buf, offset, (uint8_t *)sernum, OF_SERIAL_NUM_LEN)
+
+/**
+ * Get an ipv6 address from a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param addr Pointer to where to store the ipv6 address
+ *
+ * Uses the octets function.
+ */
+
+#define of_wire_buffer_ipv6_get(buf, offset, addr) \
+    _wbuf_octets_get(buf, offset, (uint8_t *)addr, sizeof(of_ipv6_t))
+
+/**
+ * Set an ipv6 address in a wire buffer
+ * @param wbuf The pointer to the wire buffer structure
+ * @param offset Offset in the wire buffer
+ * @param addr The variable holding ipv6 address to store
+ *
+ * Uses the octets function.
+ */
+
+#define of_wire_buffer_ipv6_set(buf, offset, addr) \
+    _wbuf_octets_set(buf, offset, (uint8_t *)&addr, sizeof(of_ipv6_t))
+
+/* Relocate data from start offset to the end of the buffer to a new position */
+static inline void
+of_wire_buffer_move_end(of_wire_buffer_t *wbuf, int start_offset, int new_offset)
+{
+    int bytes;
+    int new_length;
+
+    if (new_offset > start_offset) {
+        bytes =  new_offset - start_offset;
+        new_length = wbuf->alloc_bytes + bytes;
+        OF_WIRE_BUFFER_ACCESS_CHECK(wbuf, new_length);
+    } else {
+        bytes =  start_offset - new_offset;
+        new_length = wbuf->alloc_bytes - bytes;
+    }
+
+    MEMMOVE(&wbuf->buf[new_offset], &wbuf->buf[start_offset], bytes);
+    wbuf->alloc_bytes = new_length;
+}
+
+/* Given a wire buffer object and the offset of the start of an of_match struct,
+ * return its total length in the buffer
+ */
+static inline int
+of_match_bytes(of_wire_buffer_t *wbuf, int offset) {
+    uint16_t len;
+    of_wire_buffer_u16_get(wbuf, offset + 2, &len);
+    return OF_MATCH_BYTES(len);
+}
+
+extern void
+of_wire_buffer_replace_data(of_wire_buffer_t *wbuf, 
+                            int offset, 
+                            int old_len,
+                            uint8_t *data,
+                            int new_len);
+
+#endif /* _OF_WIRE_BUF_H_ */
