Updating with latest loxi including openflow1.5 ONOS-4770

Squashed commit of the following from upstream loxigen:

commit 72569023213f58dc45b4ea0af769d32845ee8b58
Merge: 0f662f2 52d95e1
Author: abat <abat@bigswitch.com>
Date:   Thu Apr 13 15:49:25 2017 -0700

    Merge into master from pull request #547:
    [SWL-3678] Add a new TLV force_link_up for port_config gentable (https://github.com/floodlight/loxigen/pull/547)

commit 52d95e118b2ef0f393f5bf1ab48d91bd625d332d
Author: Nick Wang <ning.wang@bigswitch.com>
Date:   Thu Apr 13 15:34:23 2017 -0700

    SWL-3678 Add a new TLV force_link_up for port_config gentable

commit 0f662f260c86ef8f5a5ac0f7acf34efd4a40dd8d
Merge: f413699 8297c58
Author: abat <abat@bigswitch.com>
Date:   Mon Apr 10 16:09:51 2017 -0700

    Merge into master from pull request #546:
    push-artifacts: make MAKE configurable (https://github.com/floodlight/loxigen/pull/546)

commit 8297c58f420e4e87fee4ece81cc7aec408e4dc2f
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Mon Apr 10 15:57:03 2017 -0700

    push-artifacts: make MAKE configurable

commit f413699f0938bf6a9e538678ec84800d7da22231
Merge: 112202d 8d54bdf
Author: Nick Wang <ning.wang@bigswitch.com>
Date:   Thu Mar 30 20:28:53 2017 -0700

    Merge pull request #544 from nick-bsn/port_config_fec

    [SWL-3678] Add two new TLVs for port_config gentable

commit 8d54bdf22e2c19710d1340af62117fbdf3e20cb8
Author: Nick Wang <ning.wang@bigswitch.com>
Date:   Thu Mar 30 15:24:04 2017 -0700

    SWL-3678 Add two new TLVs for port_config gentable

commit 112202d8ec23aa63bc1a503980733dc3619bd6e9
Merge: f0361bb 67be9bc
Author: abat <abat@bigswitch.com>
Date:   Wed Mar 15 10:28:46 2017 -0700

    Merge into master from pull request #543:
    SWL-3685: Add new TLV types for router_ip table and prefix table flag (https://github.com/floodlight/loxigen/pull/543)

commit 67be9bc13f23577b6eb48758dd90f1a56d8745ec
Author: akshata <akshata.danivasa@bigswitch.com>
Date:   Tue Mar 14 15:08:08 2017 -0700

    SWL-3685: Add new TLV types for router_ip table and prefix table flag

commit f0361bb84bd48ab48aac8f3c0b0e91c9c762acc4
Merge: 70334a1 aa5cd7d
Author: abat <abat@bigswitch.com>
Date:   Thu Mar 9 13:17:51 2017 -0800

    Merge into master from pull request #541:
    Add new tlv for loopback_mode (https://github.com/floodlight/loxigen/pull/541)

commit aa5cd7d179a1416903141b73e6be527bb57ce73e
Author: Shudong Zhou <shudongzhou@gmail.com>
Date:   Mon Mar 6 22:23:27 2017 -0800

    Make loopback mode an enumeration

commit 64f5fc63dad97088f75b8a31cd122ca8dfbce74a
Author: Shudong Zhou <shudongzhou@gmail.com>
Date:   Thu Feb 23 16:06:02 2017 -0800

    Add new tlv for loopback_mode

commit 70334a12d2553424df9b3c3176110b1ec20e7664
Merge: 837577c 735ef07
Author: abat <abat@bigswitch.com>
Date:   Fri Feb 10 11:25:22 2017 -0800

    Merge into master from pull request #540:
    SWL-3343 hash_algorithm TLV. (https://github.com/floodlight/loxigen/pull/540)

commit 735ef074e5c1b33823dc563884e23ed41aa7d6a9
Author: Kiran Poola <kiran.poola@bigswitch.com>
Date:   Fri Feb 10 10:19:02 2017 -0800

    SWL-3343 hash_algorithm TLV.

    Controller can tell switch about what hash algorithm to be
    used for LAG/ECMP member selection.

commit 837577c27d30d4ce81a962e290bc166fd83be3fe
Merge: 22b8fc7 9bc2c19
Author: abat <abat@bigswitch.com>
Date:   Tue Feb 7 16:08:47 2017 -0800

    Merge into master from pull request #538:
    Update Maven Dependencies (https://github.com/floodlight/loxigen/pull/538)

commit 9bc2c19df94d540f1de1af770b0edf8fb3c0402c
Author: Sovietaced <Sovietaced@gmail.com>
Date:   Tue Feb 7 13:07:20 2017 -0800

    Roll back Guava since it is the last version compatible with Java7

commit 62dbf76291a0f401b761c404fe0b3453913cc614
Author: Sovietaced <Sovietaced@gmail.com>
Date:   Tue Feb 7 11:40:58 2017 -0800

    Update findbugs

commit fd987bfecfa2162e02de63ad45be873f605172dd
Author: Sovietaced <Sovietaced@gmail.com>
Date:   Tue Feb 7 11:40:18 2017 -0800

    Update slf4j

commit 56c5e647c1653274e3171f7be5752b6e5dfd28c8
Author: Sovietaced <Sovietaced@gmail.com>
Date:   Tue Feb 7 11:38:51 2017 -0800

    Update logback

commit 461635fcee31335446a16ef2d0a0c3aaf83f4b1e
Author: Sovietaced <Sovietaced@gmail.com>
Date:   Tue Feb 7 11:38:11 2017 -0800

    Update guava

commit 22b8fc7d1ba4c5571e1d6580a9d0b3b4cd423f3d
Merge: f5356c1 18a2032
Author: abat <abat@bigswitch.com>
Date:   Tue Feb 7 10:10:51 2017 -0800

    Merge into master from pull request #536:
    Add Intel port stats experimenter property. (https://github.com/floodlight/loxigen/pull/536)

commit f5356c139dad035ba1be617d97a6313e6b298d15
Merge: 8da6520 183049d
Author: abat <abat@bigswitch.com>
Date:   Tue Feb 7 09:34:49 2017 -0800

    Merge into master from pull request #535:
    java/pom.xml: bump version to 3.2.0-SNAPSHOT for new dev cycle (https://github.com/floodlight/loxigen/pull/535)

commit 18a2032ccbd9c5d852643034f23862eb8a9f5e7e
Merge: 8da6520 6180b36
Author: Geddings Barrineau <cbarrin@g.clemson.edu>
Date:   Tue Feb 7 09:07:45 2017 -0500

    Merge branch 'intel'

commit 6180b362d508238417d167083084e7a02344e3d0
Author: Geddings Barrineau <cbarrin@g.clemson.edu>
Date:   Tue Feb 7 09:02:54 2017 -0500

    Added support for an Intel made port stats experimenter property.

    The extension can be located here:
    https://github.com/openvswitch/ovs/blob/75e2077e0c43224bcca92746b28b01a4936fc101/include/openflow/intel-ext.h

commit 183049d8c578b48e67d9e77c1366a8185a0914b9
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Wed Feb 1 18:30:26 2017 -0800

    java/pom.xml: bump version to 3.2.0-SNAPSHOT for new dev cycle

commit 8da6520d48be36dc136831eaae0f68500086e3f1
Merge: ce3330f 3f49d4d
Author: abat <abat@bigswitch.com>
Date:   Sat Jan 28 11:41:32 2017 -0800

    Merge into master from pull request #533:
    Add of_bsn_gentable_error and of_bsn_gentable_full_error. (https://github.com/floodlight/loxigen/pull/533)

commit 3f49d4dafdbaf977183b3927e314335a9287f8e7
Author: Ken Chiang <ken.chiang@bigswitch.com>
Date:   Fri Jan 27 13:28:47 2017 -0800

    Retain only of_bsn_gentable_error with error_code field to indicate various gentable errors.

commit 7775b51fd8be88b266779abacacceb5194311b67
Author: Ken Chiang <ken.chiang@bigswitch.com>
Date:   Fri Jan 27 11:45:29 2017 -0800

    Add of_bsn_gentable_error and of_bsn_gentable_full_error.

commit ce3330fbc863cea533465eabbba51ebc19f9ecbb
Merge: 96cf1f4 8862e21
Author: abat <abat@bigswitch.com>
Date:   Mon Dec 5 16:39:33 2016 -0800

    Merge into master from pull request #530:
    Add tri-valued tlv for auto negotiation (https://github.com/floodlight/loxigen/pull/530)

commit 8862e21936d5834e166c5660fffc68bae55c3350
Author: Shudong Zhou <shudongzhou@gmail.com>
Date:   Mon Dec 5 14:29:31 2016 -0800

    Add tri-valued tlv for auto negotiation

commit 96cf1f4858e60077cc24bce02e45a79db3192e06
Merge: afa83b4 d900032
Author: abat <abat@bigswitch.com>
Date:   Wed Nov 30 11:41:40 2016 -0800

    Merge into master from pull request #528:
    Add custom port description property for FEC. (https://github.com/floodlight/loxigen/pull/528)

commit d90003256352f5ea1f17aa91aff0f33fa4ffe7bb
Author: Wilson Ng <wilson.ng@bigswitch.com>
Date:   Wed Nov 30 11:34:54 2016 -0800

    Add comments.

commit 438865fea9041947cd7daef468bf6117b43156e1
Author: Wilson Ng <wilson.ng@bigswitch.com>
Date:   Wed Nov 30 11:16:24 2016 -0800

    Add custom port description property for FEC.

commit afa83b45684821fb3fdf1319256c04b57175d4b5
Merge: 07bc822 d05e851
Author: abat <abat@bigswitch.com>
Date:   Tue Nov 29 17:14:33 2016 -0800

    Merge into master from pull request #527:
    SWLVX-5 Create new pktin flag for INGRESS_ACLs with OFPP_LOCAL in action. (https://github.com/floodlight/loxigen/pull/527)

commit d05e85154a046212c959895d5b419d96c4bafd8c
Author: Kiran Poola <kiran.poola@bigswitch.com>
Date:   Mon Nov 28 22:13:37 2016 -0800

    SWLVX-5 Create new pktin flag for INGRESS_ACLs with OFPP_LOCAL in action.

commit 07bc822c58534c2c716a3df0d6d53dd0194f3513
Merge: 7e49dd3 c5c39d2
Author: abat <abat@bigswitch.com>
Date:   Mon Nov 21 17:13:32 2016 -0800

    Merge into master from pull request #526:
    Fix IPv6Address.toString to conform to RFC 5952 standard canonical string rep (https://github.com/floodlight/loxigen/pull/526)

commit c5c39d2860c6536ef3cfa24828f39020c261bc93
Author: Rob Vaterlaus <rob.vaterlaus@bigswitch.com>
Date:   Mon Nov 21 16:39:44 2016 -0800

    Bump the version since the change to IPv6Address.toString affects clients

commit 140cd0be3eef94a0929e27c823aafe03d5536e07
Author: Rob Vaterlaus <rob.vaterlaus@bigswitch.com>
Date:   Mon Nov 21 05:40:47 2016 -0800

    Fix IPv6Address.toString to conform to RFC 5952 standard canonical string rep

    - if there are multiple equal length zero runs zero compress the first one,
      not the last one
    - don't zero compress a single zero

commit 7e49dd307185f0749526cf75e962d9e9e9c109d3
Merge: f62a27b f21714e
Author: abat <abat@bigswitch.com>
Date:   Sat Oct 29 02:19:16 2016 -0700

    Merge into master from pull request #525:
    Add tunnel and enhanced hash capabilities. (https://github.com/floodlight/loxigen/pull/525)

commit f21714ee7789b6685288e46cf03af3894ad904b3
Author: Ken Chiang <ken.chiang@bigswitch.com>
Date:   Fri Oct 28 15:25:49 2016 -0700

    Add tunnel and enhanced hash capabilities.

commit f62a27b1537d0aa9cf750593d91a59cd2fbb492d
Merge: 44a2ad8 7109be5
Author: abat <abat@bigswitch.com>
Date:   Thu Oct 27 14:51:36 2016 -0700

    Merge into master from pull request #524:
    Add port_usage tlv (https://github.com/floodlight/loxigen/pull/524)

commit 7109be575e37d88ef044e81bb30c3acc1e831c1e
Author: Shudong Zhou <shudongzhou@gmail.com>
Date:   Tue Oct 25 18:41:10 2016 -0700

    Add port_usage tlv

commit 44a2ad814688d73d58ffdf7aa3163c1a5c3d02b4
Merge: 4fd5ee4 ff439f9
Author: abat <abat@bigswitch.com>
Date:   Mon Oct 17 08:07:45 2016 -0700

    Merge into master from pull request #523:
    Add IP fragmentation OXM (https://github.com/floodlight/loxigen/pull/523)

commit ff439f99a4d1ab868bc676a8f2128faee30cf0bf
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Mon Oct 17 10:57:25 2016 -0400

    Replace tabs with spaces

commit 9389d52dcb91850bb202a66026876ed604b89c55
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Sat Oct 15 11:39:18 2016 -0400

    Specify Java type conversion for masked. Doesn't make sense to have support for this OXM, Loxi seems upset if we leave it out

commit 15f7993dccdcb545afbeee32e2316e19fbbeb7d7
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Sat Oct 15 10:51:38 2016 -0400

    Correct length is 1 byte

commit 5e707837ad186b0c593772441cc8d19cf32699f7
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Fri Oct 14 20:18:01 2016 -0400

    Add IP fragmentation OXM

commit 4fd5ee4e74ed26f03eb2b56111e31387f39f034a
Merge: 477a6e5 9365a3d
Author: abat <abat@bigswitch.com>
Date:   Wed Oct 5 15:03:41 2016 -0700

    Merge into master from pull request #522:
    Add data_mask tlv. (https://github.com/floodlight/loxigen/pull/522)

commit 9365a3da967816058273c3755c2d5a68ae470ad0
Author: Wilson Ng <wilson.ng@bigswitch.com>
Date:   Wed Oct 5 15:10:05 2016 -0700

    Add data_mask tlv.

commit 477a6e546f2bbb76ced7b5a7bf57f238cacff925
Merge: 72ee071 7950ce7
Author: abat <abat@bigswitch.com>
Date:   Tue Oct 4 13:16:40 2016 -0700

    Merge into master from pull request #521:
    Update version of slf4j (https://github.com/floodlight/loxigen/pull/521)

commit 7950ce7052ddbeb9781c247a293dae6383a48942
Author: Shudong Zhou <shudongzhou@gmail.com>
Date:   Tue Oct 4 13:07:44 2016 -0700

    Update slf4j-api to 1.7.21

commit 3d17b95dd8dac3a7b183e9f9dcae5bf6f90f785b
Author: Shudong Zhou <shudongzhou@gmail.com>
Date:   Mon Oct 3 19:52:32 2016 -0700

    Update version of slf4j

commit 72ee071cae07406559f00f4a7093ada73160d352
Merge: 495d66f cafcda7
Author: abat <abat@bigswitch.com>
Date:   Tue Sep 20 13:57:46 2016 -0700

    Merge into master from pull request #520:
    SWL-3216 IPV6 address pretty_print function. (https://github.com/floodlight/loxigen/pull/520)

commit cafcda786b18d4a6f6d8241e0ff5c469d5923d00
Author: Kiran Poola <kiran.poola@bigswitch.com>
Date:   Tue Sep 20 11:22:55 2016 -0700

    SWL-3216 IPV6 address pretty_print function.

commit 495d66faf0157adb8361adc9a36df8af7ac0cc59
Merge: 2dead4f ec5921b
Author: abat <abat@bigswitch.com>
Date:   Thu Sep 15 12:44:25 2016 -0700

    Merge into master from pull request #519:
    New TLVs ingress_port_group_id, ingress_port_group_id. (https://github.com/floodlight/loxigen/pull/519)

commit ec5921b94a0de4a6576f93dee149cb86e3793ff7
Author: Kiran Poola <kiran.poola@bigswitch.com>
Date:   Thu Sep 15 12:01:47 2016 -0700

    New TLVs ingress_port_group_id, ingress_port_group_id.

commit 2dead4fcabca346e04c0d995e762c09e3751b1eb
Merge: a97ee19 a5cece6
Author: abat <abat@bigswitch.com>
Date:   Thu Sep 8 14:25:38 2016 -0700

    Merge into master from pull request #518:
    Add egress_only tlv (https://github.com/floodlight/loxigen/pull/518)

commit a5cece6ad5e7b981193b729af20cce6955cc3b02
Author: harshsin <harshmeet.singh@bigswitch.com>
Date:   Thu Sep 8 14:07:03 2016 -0700

    Add egress_only tlv

commit a97ee19a59ed7a9c302ccdf84b3023ec18a00c71
Merge: 7821095 b4ecc4a
Author: abat <abat@bigswitch.com>
Date:   Tue Sep 6 11:36:00 2016 -0700

    Merge into master from pull request #517:
    Add eth_type, ecn, tcp_flags, l3 interface class id, l3 src class id, and l3 dst class id TLVs (https://github.com/floodlight/loxigen/pull/517)

commit 78210955ca556a7f3428955c159c82c7cc3150ca
Merge: 424a68b 6f190cb
Author: abat <abat@bigswitch.com>
Date:   Mon Sep 5 07:05:40 2016 -0700

    Merge into master from pull request #512:
    add tcp_flags (https://github.com/floodlight/loxigen/pull/512)

commit 6f190cb9e7c8bad2e39300bad99b10ac4bfa1b52
Author: aweally <fangtuo90@gmail.com>
Date:   Mon Sep 5 21:38:12 2016 +0800

    fix grammar error (missing comma)

commit b4ecc4a13b7d90a9a27fd11c4681c3bfe7bdbed2
Author: Ken Chiang <ken.chiang@bigswitch.com>
Date:   Fri Sep 2 16:16:44 2016 -0700

    Add eth_type, ecn, tcp_flags, l3 interface class id, l3 src class id,
    and l3 dst class id TLVs.

commit 424a68bb1472eb3f2f3e29b4016fc01d97d0b15a
Merge: 2ffc6dc f15e725
Author: abat <abat@bigswitch.com>
Date:   Wed Aug 31 11:27:45 2016 -0700

    Merge into master from pull request #516:
    Update description of apply_packets/apply_bytes (https://github.com/floodlight/loxigen/pull/516)

commit f15e7250aaf5d891ed4e94b62548dee23152b8ce
Author: mstolarchuk <mike.stolarchuk@bigswitch.com>
Date:   Wed Aug 31 11:24:37 2016 -0700

    Update description of apply_packets/apply_bytes

commit 2ffc6dc20afeb9920b499fabd900e3a1d0fedfa8
Merge: 6d6c9d0 6468117
Author: michael stolarchuk <mike.stolarchuk@bigswitch.com>
Date:   Wed Aug 31 10:05:20 2016 -0400

    Merge pull request #515 from 3mp4y5/master

    Add apply packets/bytes to use for gentab status replies

commit 6468117b6b36bc78e7cff9804a4146d017d4d08d
Author: mstolarchuk <mike.stolarchuk@bigswitch.com>
Date:   Wed Aug 31 06:54:39 2016 -0700

    provide doc for apply packets/bytes

commit 03089f8242154cab3d56ed770672f2c4f64ef046
Author: mstolarchuk <mike.stolarchuk@bigswitch.com>
Date:   Sun Aug 28 15:34:52 2016 -0700

    Add apply packets/bytes to use for gentab status replies

commit 6d6c9d0d960b123d526fa4e773793b7fa0063be8
Merge: 0ae6371 c765ddb
Author: abat <abat@bigswitch.com>
Date:   Fri Aug 26 17:16:40 2016 -0700

    Merge into master from pull request #514:
    Add TLV: push_vlan_on_ingress. (https://github.com/floodlight/loxigen/pull/514)

commit c765ddba3585ca87832cb8095e25fc9de35effbe
Author: Wilson Ng <wilson.ng@bigswitch.com>
Date:   Fri Aug 26 17:17:13 2016 -0700

    Add TLV: push_vlan_on_ingress.

commit 0ae637139666c2addde65dbeaa6db366f57e820c
Merge: fcffa3c 34605db
Author: abat <abat@bigswitch.com>
Date:   Thu Aug 25 13:52:21 2016 -0700

    Merge into master from pull request #513:
    Add bsn_hash_select instruction. (https://github.com/floodlight/loxigen/pull/513)

commit 34605db099434a59560bcdc4204885a2aed07aa2
Author: Wilson Ng <wilson.ng@bigswitch.com>
Date:   Wed Aug 24 18:35:00 2016 -0700

    Add bsn_hash_select instruction.

commit 8ba0032fe662c13d6a07a7dd1df6570f618f9419
Author: allewwaly <fangtuo90@gmail.com>
Date:   Mon Aug 15 21:49:04 2016 +0800

    add tcp_flags

commit fcffa3c608749dcc4b80e583421ca2784e0e6eac
Merge: 5be7ba1 3138ad2
Author: abat <abat@bigswitch.com>
Date:   Fri Aug 12 16:10:43 2016 -0700

    Merge into master from pull request #511:
    ipv6 src/dst tlvs (https://github.com/floodlight/loxigen/pull/511)

commit 3138ad2a3a60764109dfc5c9ccf9753591c9b2ce
Author: harshsin <harshmeet.singh@bigswitch.com>
Date:   Thu Aug 11 11:20:40 2016 -0700

    ipv6 src/dst tlvs

commit 5be7ba12b882269086966c054e092b2e1ef1507c
Merge: d0f7a2e 2b3cc13
Author: abat <abat@bigswitch.com>
Date:   Tue Aug 2 09:51:36 2016 -0700

    Merge into master from pull request #510:
    New TLV types for static flag and checksum for NDP (https://github.com/floodlight/loxigen/pull/510)

commit 2b3cc1342f8f956e9d7b127e1f0f97140511429c
Author: akshata <akshata.danivasa@bigswitch.com>
Date:   Mon Aug 1 16:54:12 2016 -0700

    New TLV types for static flag and checksum for NDP

commit d0f7a2e4d8fd737e530f5919af45b2d4a2e9cf0b
Merge: 4df2933 bca0a9a
Author: abat <abat@bigswitch.com>
Date:   Fri Jul 29 14:43:37 2016 -0700

    Merge into master from pull request #509:
    TLV ndp_offload (https://github.com/floodlight/loxigen/pull/509)

commit bca0a9a1824f6f22940706272616adc9558d8067
Author: Kiran Poola <kiran.poola@bigswitch.com>
Date:   Fri Jul 29 14:06:54 2016 -0700

    TLV ndp_offload

commit 4df2933a8857da2679d44669c9d6db835cea4aac
Merge: 24d868f 7d2fcd5
Author: abat <abat@bigswitch.com>
Date:   Tue Jul 26 11:11:36 2016 -0700

    Merge into master from pull request #507:
    BSC-9398  Adding a new port instruction for NDP offload  (https://github.com/floodlight/loxigen/pull/507)

commit 7d2fcd5867910a7b35d5269029bbc7f31964c129
Author: Prem Sharma <premshankar.sharma@bigswitch.com>
Date:   Tue Jul 26 10:14:06 2016 -0700

    Copyright update

commit 24d868ff5efb4aada58fde866a8b466dce4a5b47
Merge: 6ed9848 6c6cf3c
Author: abat <abat@bigswitch.com>
Date:   Mon Jul 25 17:58:36 2016 -0700

    Merge into master from pull request #508:
    loci: set wire length when truncating (https://github.com/floodlight/loxigen/pull/508)

commit 6c6cf3ca08f5a794f8f0b3c54e99331bcaf0bedc
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Mon Jul 25 17:06:05 2016 -0700

    loci: set wire length when truncating

    Previously only the wbuf and object lengths were reset. This resets the length
    fields on the wire.

commit f8f5ea3a8557706ca3e6a420f7b76474303a6785
Author: Prem Sharma <premshankar.sharma@bigswitch.com>
Date:   Mon Jul 25 15:14:25 2016 -0700

    Adding a new instruction for ndp offload.

commit 6ed98488f86d821ddfda46bdb256a93d2cee23ce
Merge: 6570787 d229074
Author: abat <abat@bigswitch.com>
Date:   Wed Jul 20 10:18:21 2016 -0700

    Merge into master from pull request #506:
    pyloxi: support connecting over a unix domain socket (https://github.com/floodlight/loxigen/pull/506)

commit d229074f11cdcbafbdc5f1df213ce13273f54b26
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Wed Jul 20 10:10:32 2016 -0700

    pyloxi: support connecting over a unix domain socket

commit 657078745dba679c3db54e65ac1e5c699ef11a89
Merge: 00df802 ec79cbe
Author: abat <abat@bigswitch.com>
Date:   Thu Jul 14 14:37:33 2016 -0700

    Merge into master from pull request #500:
    ICMPV6 packet-in reason. (https://github.com/floodlight/loxigen/pull/500)

commit ec79cbe19447bc90aca5c8e4152ef045c0d63dcb
Author: Kiran Poola <kiran.poola@bigswitch.com>
Date:   Thu Jul 14 14:28:08 2016 -0700

    ICMPV6 packet-in reason.

commit 00df802a02f1422a954fa67a90311a24c37c4d09
Merge: 704e718 b809b38
Author: abat <abat@bigswitch.com>
Date:   Sat Jul 2 09:08:23 2016 -0700

    Merge into master from pull request #499:
    Add OFP_BSN_PKTIN_FLAG_ANALYTICS (https://github.com/floodlight/loxigen/pull/499)

commit b809b380b58351bc26ea76fa84853585d1eda632
Author: Shudong Zhou <shudongzhou@gmail.com>
Date:   Fri Jul 1 22:49:15 2016 -0700

    Add OFP_BSN_PKTIN_FLAG_ANALYTICS

commit 704e718a22c4d069365644d4963d0c9b61c02792
Merge: e68c39a b022fd1
Author: abat <abat@bigswitch.com>
Date:   Thu Jun 23 14:40:36 2016 -0700

    Merge into master from pull request #498:
    BSC-9320 making LENGTH field public from IPv6Address class (https://github.com/floodlight/loxigen/pull/498)

commit b022fd1e4ba9dbea3089594f4fea83517d343edc
Author: Prem Sharma <premshankar.sharma@bigswitch.com>
Date:   Thu Jun 23 14:33:17 2016 -0700

    just keeping the change of making LENGTH public

commit f9082f0b39fd8d1e6f5c9d0d113a6bfa9d93ca75
Merge: 23832a2 e68c39a
Author: Prem Sharma <premshankar.sharma@bigswitch.com>
Date:   Thu Jun 23 13:59:24 2016 -0700

    Merge branch 'master' of github.com:floodlight/loxigen

commit 23832a201fc49ecf18a29009c717f3d7a2a87c31
Author: Prem Sharma <premshankar.sharma@bigswitch.com>
Date:   Thu Jun 23 13:59:09 2016 -0700

    making LENGTH field public

commit e68c39aca57228f852b05dcd5009821b9215bee1
Merge: a1d1c6c 29d486c
Author: abat <abat@bigswitch.com>
Date:   Wed Jun 22 16:29:42 2016 -0700

    Merge into master from pull request #496:
    Correct Javadoc to fix build failure when running 'make package-java' (https://github.com/floodlight/loxigen/pull/496)

commit a1d1c6c77e9638547dd8491fbf0cb1bfd4bc9481
Merge: 866d11a fb1f7b4
Author: abat <abat@bigswitch.com>
Date:   Wed Jun 22 12:33:41 2016 -0700

    Merge into master from pull request #497:
    Add equalsIgnoreXid() + hashCodeIgnoreXid() to OFMessage (https://github.com/floodlight/loxigen/pull/497)

commit fb1f7b419d03350a71d49ab0bff9415764002688
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Wed Jun 22 11:06:28 2016 -0400

    Update Javadoc for hashCodeIgnoreXid()

commit 08068f60e9f34d9509ab1f19b578a7a2bd9b42d9
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Tue Jun 21 10:43:28 2016 -0400

    Also include a hashCodeIgnoreXid() function for primary use in hash maps, sets, etc. The use case would be the OFMessage is a member of an object being stored in e.g. a HashMap, but we don't want the XID of the OFMessage to be used in the hash computation. Our class definition that contains OFMessage will override hashCode() and utilize OFMessage's hashCodeIgnoreXid(). In this case, two or more OFMessages that are idential except for the XID will all be identified by the same hash.

commit bb644dfbd0867497cea38d2c95a58f26a9ab2845
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Tue Jun 21 08:49:23 2016 -0400

    Remove message about addition methods. Makes it seem like all the following methods in the class are custom.

commit 68a4bc6bf7af4404bc4651d81b91aba03bcb8521
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Tue Jun 21 08:30:50 2016 -0400

    Need to expose equalsIgnoreXid() in OFMessage, noting that any implementer of OFMessage will/should have an XID. This will avoid having to cast the OFMessage to the version-specific class in order to access the function.

commit 866d11af637f9d61f9386de218d2e81cd1ad0c28
Merge: f169efe 9a06029
Author: abat <abat@bigswitch.com>
Date:   Mon Jun 20 15:16:23 2016 -0700

    Merge into master from pull request #494:
    BVS-6442: Adding MacAddr generation for IPv6 Mcast addresses. (https://github.com/floodlight/loxigen/pull/494)

commit 9a06029bc84f02d25ba7f063967e864a811e24b1
Author: Prem Sharma <premshankar.sharma@bigswitch.com>
Date:   Mon Jun 20 14:39:19 2016 -0700

    addressing review comments

commit f169efe9368214ce76ffe830cdef818ac4d15ffc
Merge: 2cd0f6e a649586
Author: abat <abat@bigswitch.com>
Date:   Fri Jun 17 11:06:20 2016 -0700

    Merge into master from pull request #491:
    patch for OF1.5 table features stats messages + actions <--> apply-actions instruction mapping for OF1.5 (https://github.com/floodlight/loxigen/pull/491)

commit 29d486c0eb05bb0cf5a3db66cbda1e3536eb17bb
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Thu Jun 16 21:51:22 2016 -0400

    Clean up Javadoc. Build Javadoc with Oracle JDK 1.8 fails. Perhaps maven Javadoc plugin shouldn't interpret the warnings as fatal errors... but fixing the root cause is nice.

commit 2cd0f6e4ab4ee7a40d6cfe7a7b50d1583a728bd9
Merge: 8d8bf88 720b536
Author: abat <abat@bigswitch.com>
Date:   Thu Jun 16 16:26:44 2016 -0700

    Merge into master from pull request #495:
    Add BSN IPV6 Prefix TLV (https://github.com/floodlight/loxigen/pull/495)

commit 720b536315cb6e855027cc92702d74f66f56609e
Author: akshata <akshata.danivasa@bigswitch.com>
Date:   Thu Jun 16 15:10:24 2016 -0700

    Add BSN IPV6 Prefix TLV

commit 6f2e315254c7078172152605c51e86406b650b93
Author: Prem Sharma <premshankar.sharma@bigswitch.com>
Date:   Thu Jun 16 13:08:39 2016 -0700

    Adding MacAddr generation for IPv6 Mcast addresses.

commit a6495860e3f89d28174301be0977892fc563a1d8
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Wed Jun 15 20:18:18 2016 -0400

    Remove duplicate OFFlowAdd, Modify, and ModifyStrict .Builder setActions() and defer Modify and ModifyStrict to Add.

commit 8d8bf8845aaa482447d4be99ee56a2d717b9b6b6
Merge: e5101b1 ee80911
Author: abat <abat@bigswitch.com>
Date:   Thu Jun 9 06:51:36 2016 -0700

    Merge into master from pull request #493:
    Patch to optionally ignore the XID field in OFMessage and other types (https://github.com/floodlight/loxigen/pull/493)

commit e5101b1e2b2b273adddf8848e5ba89b6198025b6
Merge: 359c28e e52485d
Author: abat <abat@bigswitch.com>
Date:   Wed Jun 8 09:19:32 2016 -0700

    Merge into master from pull request #492:
    OF1.0 patch for ICMP type and code matches (https://github.com/floodlight/loxigen/pull/492)

commit a1094aa9ebcef543e4748a31ca77fa486ca1ce62
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Tue Jun 7 21:24:24 2016 -0400

    Remove duplicate code from OFFlowMod custom templates and add in missing templates

commit ee809117501a5c85cc9484bdc559f6edf5a7d6d3
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Tue Jun 7 20:11:32 2016 -0400

    Move newline within creation of equalsIgnoreXid() function to avoid 2 newlines b/t classes w/o an 'xid' field.

commit 6d7b2bf1bf3ad68f3d1deaa3f730a37a9c1ad0d2
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Tue Jun 7 20:09:00 2016 -0400

    Refactor flow_desc --> flow for backwards compatibility; flow_stats --> flow_lightweight (lightweight sounds good to me).

commit ff16fe03bfd7c6e497191d7933496b2e85180a3c
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Tue Jun 7 18:57:22 2016 -0400

    Use lambda expression to search for 'xid' field in place of clunky for+if.

commit 359c28ee8a60f1732634e618df414ec46fb007b1
Merge: bbd08a0 b84f6a2
Author: abat <abat@bigswitch.com>
Date:   Tue Jun 7 09:31:44 2016 -0700

    Merge into master from pull request #489:
    HexString: optimize performance; MacAddress: optimize putTo BVS-5367 LOXI-77 (https://github.com/floodlight/loxigen/pull/489)

commit e52485d8e36adb1461d92760ad0bd2e8f397f3be
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Mon Jun 6 12:25:21 2016 -0400

    Patch getters to return ICMPv4Type/Code instead of TransportPort for OpenFlow 1.0.

commit b84f6a28f50a40ff5d949df4f809ef86b4ac95b2
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Mon Jun 6 07:08:52 2016 -0700

    HexString: address comment, remove redundant check

commit f53a11ef879dd4a49d5d75f76edc5fcb3cca63ad
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Thu Jun 2 16:38:40 2016 -0400

    For any class with an XID field (detected by a class field named 'xid'), include an equalsIgnoreXid() function to ignore the XID in the equality check. The assumption, of course, is that the XID field is named 'xid' and is a primitive type (long at present). This will allow for the content-comparison of two OFMessages without regard to when they were created (or what the XID was set to).

commit f405abd30609f7caa564e2bf772cbac9597a8a6d
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Thu Jun 2 14:35:29 2016 -0400

    Allow using the transport source and destination port match fields for ICMP type and code, respectively. This was mostly done, but was incomplete in getMatchFields(), resulting in the thrown exception.

commit d1901765bf550eb9b0bd50a4e8e50827b0294e58
Merge: b08dc22 c15a16c
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Thu Jun 2 11:22:17 2016 -0400

    Merge branch 'master' of https://github.com/rizard/loxigen

commit b08dc224cb0ede4914f27bb38b4d9e38ee6ac3e7
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Thu Jun 2 11:20:04 2016 -0400

    Refactor OF1.5 stats/multipart messages to use same enum names as previous OF versions. This eliminates multiple stat_type enums that map to the same underlying OF message.

commit fd6c3f530241723e43ccd5b7c56f78e1de9c0835
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Thu May 19 06:54:16 2016 -0700

    MacAddress.putTo - performance optimization LOXI-77

    It is correct to directly digest the long value instead of doing big-mangling
    and digesting an int and a short.

commit c15a16c821303be24f5355bfa858dd1538ef46d9
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Wed May 18 16:20:06 2016 -0400

    Fix port_desc_stats_reply. The list of the the port_desc types should be called 'entries', not 'ports'. Otherwise, this creates two getters that get the same thing.

commit 03edd1933fe289e147a36e8d51caf3d09d9fffa2
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Mon May 16 13:05:34 2016 -0400

    OpenFlow 1.3, 1.4, and 1.5 table-features message is the same, pretty much. Not sure why it was table_features before OpenFlow 1.5 and table_feature (singular) for OpenFlow 1.5. This causes an OFTableFeaturesStatsRequest/Reply and OFTableFeatureStatsRequest/Reply message to appear as two different OFMessages.

commit 8a1aeb70ed28a86be91484fb669d9e8d5a7c264c
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Mon May 16 12:45:48 2016 -0400

    Map actions to apply-actions instruction for OpenFlow 1.5

commit 442b8b89299d78981cf25e252f542569d0bd9072
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Sun May 15 05:56:24 2016 -0700

    HexString: optimize hex string conversions

    While debugging a performance problem related to MacAddress.toString, I
    noticed that the HexString conversion code we had was really old and
    inefficient. This code was even using anti-patterns like concatenating
    Strings without a StringBuilder (!).

    These routines are used in a quite a lot of serialization
    cases, e.g., for DatapathIds.

    This commit replaces them with optimized implementatations. These are
    necessarily relatively ugly and procedural.

    JMH benchmarks show the new versions to be between 3.5 and 9.1x faster.

    JMH Benchmark results:
    Old versions:
    ```
    Benchmark                                    Mode  Cnt        Score       Error  Units
    HexStringBenchmark.testBytes6ToHexString    thrpt  200  5482128.668 ± 10011.236  ops/s
    HexStringBenchmark.testBytes8ToHexString    thrpt  200  4097441.103 ±  9869.569  ops/s
    HexStringBenchmark.testLongToHexStringPad6  thrpt  200  6015404.366 ± 16095.163  ops/s
    HexStringBenchmark.testLongToHexStringPad8  thrpt  200  4499879.492 ±  7371.526  ops/s
    HexStringBenchmark.testMacToString          thrpt  200  6039423.717 ± 14960.774  ops/s
    HexStringBenchmark.testToBytes              thrpt  200  4320243.806 ± 12942.870  ops/s
    HexStringBenchmark.testToLong               thrpt  200  5733672.143 ± 26865.832  ops/s
    ```

    New versions:
    ```
    Benchmark                                    Mode  Cnt         Score        Error  Units
    HexStringBenchmark.testBytes6ToHexString    thrpt  200  46454822.004 ± 131143.806  ops/s
    HexStringBenchmark.testBytes8ToHexString    thrpt  200  37602862.513 ±  92041.035  ops/s
    HexStringBenchmark.testLongToHexStringPad6  thrpt  200  38286359.083 ±  80960.505  ops/s
    HexStringBenchmark.testLongToHexStringPad8  thrpt  200  30273992.729 ±  55125.764  ops/s
    HexStringBenchmark.testMacToString          thrpt  200  37012667.642 ±  93106.031  ops/s
    HexStringBenchmark.testToBytes              thrpt  200  15237921.501 ±  16622.545  ops/s
    HexStringBenchmark.testToLong               thrpt  200  30268266.435 ±  24626.181  ops/s
    ```

commit bbd08a0ba812425e7310286dc0692baae3a24d7b
Merge: 55bc3da a76993f
Author: abat <abat@bigswitch.com>
Date:   Sat May 14 12:09:43 2016 -0700

    Merge into master from pull request #487:
    ACTSET_OUTPUT OXM should be type OFPort, not TransportPort (https://github.com/floodlight/loxigen/pull/487)

commit 55bc3daa3eb2fd99c461d4454ce547e7a8d96a2e
Merge: b676b7b 08a6cde
Author: abat <abat@bigswitch.com>
Date:   Thu May 12 14:40:24 2016 -0700

    Merge into master from pull request #488:
    Add drop tlv (https://github.com/floodlight/loxigen/pull/488)

commit 08a6cde32dd6abd83cfe80613c40579ebfd886b8
Author: harshsin <harshmeet.singh@bigswitch.com>
Date:   Thu May 12 14:12:21 2016 -0700

    Add drop tlv

commit a76993fac6f7f3d14df6bb86c209791e8a97bd0a
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Thu May 12 10:36:59 2016 -0400

    ACTSET_OUTPUT OXM should be type OFPort, not TransportPort

commit b676b7beb365882e4d906807f93c54f291b7acf6
Merge: d0a526d f290055
Author: abat <abat@bigswitch.com>
Date:   Mon May 9 15:48:40 2016 -0700

    Merge into master from pull request #486:
    Java: V1.5 Stat: add convenience methods akin to Match (https://github.com/floodlight/loxigen/pull/486)

commit d0a526dff1fc77664060d6181c21c5c086432f23
Merge: aa04b51 92be91b
Author: abat <abat@bigswitch.com>
Date:   Mon May 9 14:45:45 2016 -0700

    Merge into master from pull request #485:
    standard-1.5:  fixed reserved value (https://github.com/floodlight/loxigen/pull/485)

commit 92be91bfec501814eb40ffe6906262114fc78f50
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Fri May 6 19:18:20 2016 -0700

    standard-1.5: of_stat_v6: use padding for reserved value

commit aa04b51ccc3949e30a678f7edb7f211efe9d7233
Merge: dd2e04b d346569
Author: abat <abat@bigswitch.com>
Date:   Mon May 9 12:24:45 2016 -0700

    Merge into master from pull request #480:
    Expose MatchField prereqs (https://github.com/floodlight/loxigen/pull/480)

commit d34656959b43e8d6783dbee52a24e12caf44e4be
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Mon May 9 11:34:04 2016 -0400

    Remove types from use of ImmutableSet's of() and copyOf(). Remove unnecessary defensive programming in MatchField constructor.

commit dd2e04bda188622767af52e8e6d8dd6234ff0429
Merge: 9555af7 62bd72d
Author: abat <abat@bigswitch.com>
Date:   Sat May 7 11:16:47 2016 -0700

    Merge into master from pull request #484:
    openflow_input: generate BSN messages for version 1.5 (https://github.com/floodlight/loxigen/pull/484)

commit f29005514bbcdc01ee697e11a339f19bb8cec2e5
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Fri May 6 19:20:37 2016 -0700

    Java: V1.5 Stat: add convenience methods akin to Match

    Stat mimics the design of the generic Match object. This commit
    completes the set of convenience methods that abstract the details
    and enable the user to set an abstract statfield.

commit 62bd72dbadc6a6e50f70e3a62febb0ec0e73cb5d
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Fri May 6 19:24:42 2016 -0700

    openflow_input: generate BSN messages for version 1.5

    This auto-generated commit marks all bsn messages generated for
    version 1.4 to also be generated for version 1.5

commit 39b0cbc96573cf3b8d55695f441dff2bfc2a3084
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Fri May 6 07:58:11 2016 -0400

    Refactor to Guava ImmutableSets. In MatchField, there is no longer a need to check if the Prerequisite[] is empty, since copyOf() will (first) check this. In Prerequisite, still need to check if OFValueType[] is empty to set the any variable.

commit 9555af7d9fb1f441996b42b11205e6ee71dc08cd
Merge: 02a0049 2a1ecc0
Author: abat <abat@bigswitch.com>
Date:   Thu May 5 17:36:41 2016 -0700

    Merge into master from pull request #483:
    Add disable_src_mac_check tlv (https://github.com/floodlight/loxigen/pull/483)

commit 2a1ecc0c23c43c38504c18d5334e3cd02d7972c0
Author: harshsin <harshmeet.singh@bigswitch.com>
Date:   Thu May 5 17:14:16 2016 -0700

    Add disable_src_mac_check tlv

commit 02a004999954d08c7c8feda565af6183e5462049
Merge: b6e2157 2d7cf05
Author: abat <abat@bigswitch.com>
Date:   Thu May 5 12:25:39 2016 -0700

    Merge into master from pull request #482:
    Update README.MD for versions 1.4.1 and 1.5.1 (https://github.com/floodlight/loxigen/pull/482)

commit 2d7cf05b81db0ad71af1143a77da058fc69b4ce7
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Thu May 5 11:01:46 2016 -0700

    Update README.MD for versions 1.4.1 and 1.5.1

commit b6e21571994869b6da89caa260f475afa1674abc
Merge: c0cef0d 7f40a2f
Author: abat <abat@bigswitch.com>
Date:   Tue May 3 15:48:22 2016 -0700

    Merge into master from pull request #459:
    OpenFlow 1.5.1 implementation (https://github.com/floodlight/loxigen/pull/459)

commit e23a1294c0c491da026f7495ed70be4c218c2ae5
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Tue May 3 09:41:53 2016 -0400

    Fix spelling typo

commit c9be566f6155d9229efbbbad525a36d046cb5d40
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Tue May 3 09:02:08 2016 -0400

    Safely allow us to read the prerequisites (their types and possible values) from a MatchField. This will greatly help with automated flow-mod composition and for error checking in the static flow pusher (in supplement to the arePrerequisitesOK() function in MatchField

commit 7f40a2f719d8de561386b20f37758eee43840885
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Fri Apr 29 10:39:42 2016 +0300

    WhiteSpace & Unnecessary File Fix

commit 29861119e6af703178b07a9a404bc76bebcbda80
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Fri Apr 29 09:41:56 2016 +0300

    OFStatVer15 toString fix

commit 06b5fde10220ab8d1eb18d0c4dcada95f9e2b7de
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Thu Apr 28 18:21:13 2016 +0300

    standard-1.4 fix

commit 3eb1f2e549e49d0b822c0569d8fd64b1c6c32693
Merge: c3a2baf 2257394
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Wed Apr 27 09:12:55 2016 +0300

    Merge pull request #6 from andi-bigswitch/of15-pr-4

    Some more cleanup for OF1.5

commit 2257394226de123bbfe60071907ff8149b1535a9
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Tue Apr 26 14:03:17 2016 -0700

    java: remove logback-test.xml

commit 0c19dfe10145d0313a13ddea6858d67fa9dbbb54
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Tue Apr 26 13:55:57 2016 -0700

    OF15: fix whitespace errors

commit 711f96b08e837b85409c200b6ed61abc7f2fbad4
Author: Shudong Zhou <shudongzhou@gmail.com>
Date:   Tue Jan 12 11:28:14 2016 -0800

    Fix doc syntax, Java 8 does not like it

commit a6146e40833646ceabe5899ff8f5b13287140761
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Tue Apr 26 13:39:19 2016 -0700

    pom.xml: Remove unneeded javadoc mangling

    Javadoc on Java8 was failing because an earlier commit
    erroneously undid the fix from 914939c5.

    No need to disable Javadoc linting.

commit 8ee0c9c85dd83aa8f183e4308655016a4f37cde1
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Tue Apr 26 13:16:39 2016 -0700

    Remove masked versions of OXSs, associated methods

    OXS (stats) fields don't have a useful notion of wildcards, the openflow
    standard reserves the corresponding field.

    This commit removes the declarations of the masked OXS fields and
    the associated java magic (also making the OXS stack simpler).

commit 5c4e052007076b4564b93f86e90ade28095824f1
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Tue Apr 26 13:13:47 2016 -0700

    of/header_types: declare enums as stable, set wire types

    This enables those enums to be used in data types

commit dc1372f3e80e46494b86da528c6a9ad1cd37a30c
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Tue Apr 26 13:18:02 2016 -0700

    java: PacketType must come as first OXM according to OF Spec

commit 348515b8e75a86111d2abebb21459c11a696206b
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Tue Apr 26 13:12:17 2016 -0700

    java: fix PacketType

    PacketType was not following the OpenFlow spec correctly (the namespace
    16 bit word was not considered). It also needed toString/equals/hashcode

commit ae75d35b0af264e37dfb21d3e90e7e59ad24a9cb
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Tue Apr 26 13:11:53 2016 -0700

    java/OFConnectionIndex: add toString/equals/hashcode

commit c3a2baf1b34156d5e01817af3ce8e0299518b442
Merge: 0c3c29e de20bbb
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Tue Apr 26 09:38:14 2016 +0300

    Merge pull request #5 from rlane/of15-4

    pyloxi: add OF 1.5 unit test

commit de20bbbc5c48896c5e18e5245947eb38cb8a6876
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Mon Apr 25 19:51:58 2016 -0700

    pyloxi: add OF 1.5 unit test

commit 0c3c29eb9242b820ffb54aeae7d74875dcc31c51
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Mon Apr 25 18:23:27 2016 +0300

    Whitespace / Tab / Pom Fix

    2.1.0 snapshot -> 3.0.0 snapshot

commit fe97f404dd19424ae629441a967727a5e1a43c64
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Mon Apr 25 15:19:54 2016 +0300

    tab/whitespace fix

commit e44440c6da57f55c93d16f151278480b54681870
Merge: ba02b95 c0cef0d
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Mon Apr 25 10:54:10 2016 +0300

    Merge remote-tracking branch 'refs/remotes/floodlight/master'

commit ba02b958fd0f5b0895806c35de2ed9e528eafcbb
Merge: 170aff6 7848860
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Mon Apr 25 10:39:36 2016 +0300

    Merge pull request #4 from rizard/of15-3

    Fix group_add and group_desc_reply tests

commit 7848860d4ab1961e1524b969c42c32a866494883
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Fri Apr 22 17:01:46 2016 -0400

    Fix group_desc_stats_reply test to use correct lengths. Also correct and tidy up the Java.

commit c0cef0d6f19abac80bc5addf0acc6aa7a6b3f56c
Merge: 91b5ba0 015d82c
Author: abat <abat@bigswitch.com>
Date:   Fri Apr 22 13:47:35 2016 -0700

    Merge into master from pull request #479:
    [SWL-2807] Add PFC counters to BSN port counters (https://github.com/floodlight/loxigen/pull/479)

commit 9d29778c5b8c6cd3af137ef9f663d4625ee781ac
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Fri Apr 22 16:40:47 2016 -0400

    Fix typos

commit 04181632ccd30beaefb6132438dd216abbc1c580
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Fri Apr 22 16:36:41 2016 -0400

    Update OFGroupAdd test to use correct lengths and include OFGroupBucketPropWeight for SELECT group type

commit 015d82ca68bda3d19b58ab954a3442b19cda0a8f
Author: Nick Wang <ning.wang@bigswitch.com>
Date:   Thu Apr 21 16:27:14 2016 -0700

    initial check-in for supporting PFC counters

commit 91b5ba0a2343f95e22ee26b7de81818faf5c39a2
Merge: b49e148 aeb3273
Author: abat <abat@bigswitch.com>
Date:   Thu Apr 21 14:07:36 2016 -0700

    Merge into master from pull request #478:
    Dockerized build environment for loxigen (https://github.com/floodlight/loxigen/pull/478)

commit aeb32732069f47e33e7e0dcc26258f0c0a42ce8b
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Thu Apr 21 13:55:50 2016 -0700

    docker.sh: remove duplicated --rm

commit 11b314d7900c5f1e37c75685f9719aa718bfa2ae
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Thu Apr 21 10:22:01 2016 -0700

    test_data: remove manual bucket/action lengths

commit a92a05104da488a6c4ea8a5d4ba39863caa18352
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Thu Apr 21 10:21:35 2016 -0700

    openflow_input: use field length member syntax in standard-1.5

commit 1c085ae901316d51743cc2fc31a85aef5f1fd3cb
Merge: 170aff6 b49e148
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Thu Apr 21 10:04:10 2016 -0700

    Merge remote-tracking branch 'origin/master' into of15-3

commit ead5343d5be6a96b6c1976348884246a377f9f76
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Wed Apr 20 19:30:58 2016 -0700

    Improvements to docker.sh:

    - use python-based abspath for OS X compatibility
    - only set -t if running from terminal
    - --rm to clean up the container after exit

commit 5c454dddbe4d72cca81e554765067f27b73a69b9
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Wed Apr 20 16:26:15 2016 -0700

    docker: add docker launcher

    ./docker.sh launches docker, with the current repo mounted at /loxi

commit 1428f6271bb4ce8b8790ba176a75c5ae96a0896b
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Wed Apr 20 16:25:28 2016 -0700

    Add: dockerfile for basic build environment

commit b49e148ff613fd8bfd347d1ef05e851cdfe20f27
Merge: 29f1cb7 102f4d5
Author: abat <abat@bigswitch.com>
Date:   Wed Apr 20 16:17:27 2016 -0700

    Merge into master from pull request #477:
    push-artifacts: add support to specify new target branch to be created (https://github.com/floodlight/loxigen/pull/477)

commit 102f4d57d3e646f53e9b4befdbc23e7ccfe1d620
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Wed Apr 20 15:08:42 2016 -0700

    fixup push-artifacts

commit 8d4f2c7a5c9da15db3e8baf2552d753ed67e94cd
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Wed Apr 20 14:45:40 2016 -0700

    push-artifacts: enable debugging

commit c65be0bd26355e43c9fa13ccb45de6a5e2fe650f
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Wed Apr 20 14:26:01 2016 -0700

    push-artifacts: add support to specify new target branch to be created

    This is intended so we can easily inspect the artifact diffs for
    pull requests.

    Jenkins intergration pending.

commit 29f1cb7e2c7f23b624579063e5512ba2072d0e83
Merge: f40e86f baa3641
Author: abat <abat@bigswitch.com>
Date:   Wed Apr 20 14:07:36 2016 -0700

    Merge into master from pull request #476:
    syntax for field length members (https://github.com/floodlight/loxigen/pull/476)

commit baa36419821a1af11bb07d9f87be14e5a0c08c89
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Wed Apr 20 13:48:49 2016 -0700

    frontend: remove hardcoded field length member names

commit cc957e9cb363e799d75945a1409f7ff3ed50f314
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Wed Apr 20 13:48:32 2016 -0700

    openflow_input: use field length member syntax

commit 8dda875975a5dae3d75e742968a51e3fa474e673
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Wed Apr 20 13:40:31 2016 -0700

    frontend: add syntax for field length members

commit 170aff64b1166e1776c8ebdb9929035a6cab077f
Merge: 969c4b8 fb5b092
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Wed Apr 20 21:23:44 2016 +0300

    Merge pull request #3 from rlane/of15

    Disable C backend for OF 1.5

commit fb5b0922cdf8840ab46418821731b32ff1c36044
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Wed Apr 20 11:15:59 2016 -0700

    test_data: fix C and Python port_mod testcase

commit 05c04eed2cee724ad135d2cf6d441ca371249f3d
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Wed Apr 20 11:09:28 2016 -0700

    openflow_input: remove experimenter data from standard-1.5

    Fields present in the superclass but not in a subclass cause problems for the
    Java backend. The experimenter_data fields are unnecessary, just add the
    experimenter subclass to LOXI.

commit 19a3715350e10f5b699460b16b5b38f2b064224e
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Wed Apr 20 11:01:39 2016 -0700

    Makefile: exclude OF 1.5 when building C backend

commit c960585838b0413ead59becb5f26952e6fc9d26d
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Wed Apr 20 11:01:15 2016 -0700

    loci: build of_g version maps only for target versions

commit 4817c7b83c87581b6a41881dc017a830806d39db
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Wed Apr 20 11:00:35 2016 -0700

    loxigen: filter input using target versions

commit 969c4b81a66282e1fc07a15267077951b6766390
Merge: 74313ad 70ec72c
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Wed Apr 20 20:37:53 2016 +0300

    Merge pull request #2 from rlane/of15

    Fixes for OF 1.5

commit 70ec72cbb4cfc25442ecd6424aa24eaaad1e1e4d
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Wed Apr 20 10:23:25 2016 -0700

    python: fix match/stats and enable OF 1.5 testcases

commit 95d3935685884ce41a2a6608ada2c44c45bf756d
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Wed Apr 20 10:21:49 2016 -0700

    openflow_input: fix discriminators and type fields

commit 74313ad51f52ad68c7e869978544075181407c6a
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Wed Apr 20 16:14:17 2016 +0300

    OFDuration fix

commit 96d8aac72ffcb71300e2aca43a61e59cffed92fb
Merge: 539eb7f f40e86f
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Wed Apr 20 15:55:47 2016 +0300

    Merge remote-tracking branch 'refs/remotes/floodlight/master'

commit 539eb7f13937ac90a4c30545188885418918e618
Merge: 30589a1 857d9e2
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Wed Apr 20 15:42:29 2016 +0300

    Merge pull request #1 from andi-bigswitch/pr-459-patch

    java_gen: support OFFlowMonitorEntry, a variable length ofclass w/o length member

commit f40e86f7cc7a21815d321f5bf881b14965418ff1
Merge: ac80bfc 0039186
Author: abat <abat@bigswitch.com>
Date:   Tue Apr 19 15:10:38 2016 -0700

    Merge into master from pull request #475:
    Add of_queue_desc_prop_bsn and of_queue_desc_prop_bsn_queue_name (https://github.com/floodlight/loxigen/pull/475)

commit 00391865a529dc672ac1737af07184c45ed22ad8
Author: Ken Chiang <ken.chiang@bigswitch.com>
Date:   Tue Apr 19 11:15:47 2016 -0700

    Change type of name field from of_str64_t to of_octets_t.

commit 857d9e214638795601a03809211d15594a08d10c
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Tue Apr 19 10:34:12 2016 -0700

    java_gen: support OFFlowMonitorEntry, a variable length ofclass w/o length member

commit afead678834a990669e76df8089a2d7ac2ca990b
Author: Ken Chiang <ken.chiang@bigswitch.com>
Date:   Thu Apr 14 13:39:03 2016 -0700

    Add of_queue_desc_prop_bsn and of_queue_desc_prop_bsn_queue_name to return
    queue names.

commit 30589a18742625c4e96e5ef14f5c1bf0e10e18bd
Merge: 0096da0 ac80bfc
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Thu Apr 14 13:35:39 2016 +0300

    Merge remote-tracking branch 'refs/remotes/floodlight/master'

commit ac80bfc59512725e983ca9011f88d13ea1ff3cb5
Merge: 0865557 3b8763e
Author: abat <abat@bigswitch.com>
Date:   Mon Apr 11 11:13:42 2016 -0700

    Merge into master from pull request #474:
    add of_bsn_tlv_uint64_list and fix of_bsn_tlv_vlan_mac_list (https://github.com/floodlight/loxigen/pull/474)

commit 3b8763edf820a93026c1a93aeaf3c0e29655d1d7
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Mon Apr 11 11:05:57 2016 -0700

    openflow_input: add of_bsn_tlv_uint64_list

commit b8a50382feeb28834bba18136e90ce04f7642fe6
Author: Rich Lane <rich.lane@bigswitch.com>
Date:   Mon Apr 11 11:05:24 2016 -0700

    openflow_input: add superclass to of_bsn_tlv_vlan_mac_list

commit 08655579fd741c5a8378d0859204ea9a750a4138
Merge: 3c24219 c4e34e4
Author: abat <abat@bigswitch.com>
Date:   Mon Mar 28 11:23:38 2016 -0700

    Merge into master from pull request #472:
    Add new vxlan-egress and cpu lag indicator tlvs (https://github.com/floodlight/loxigen/pull/472)

commit 3c24219a38dddc25bb15252c4dce0585ebff6d9b
Merge: 7743b12 a5bae56
Author: abat <abat@bigswitch.com>
Date:   Mon Mar 28 09:58:26 2016 -0700

    Merge into master from pull request #473:
    Make Bundle-Add inherit the XID of the nested message  #loxigen/454 (https://github.com/floodlight/loxigen/pull/473)

commit a5bae5632b453c377e5c0c8072bb5c7bebf54446
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Mon Mar 28 06:04:02 2016 -0700

    Make Bundle-Add inherit the XID of the containing message  #loxigen/454

    This ensures the generated messages conform to the OF Spec, 1.4,
    section 7.3.9.6 Adding messages to a bundle:

    > Message added in a bundle should have a unique xid to help matching
    > errors to messages, and the xid of the bundle add message must be the
    > same.

commit c4e34e4428addad92981af7328acd532cc505426
Author: harshsin <harshmeet.singh@bigswitch.com>
Date:   Fri Mar 25 16:54:46 2016 -0700

    Add new vxlan-egress and cpu lag indicator tlvs

commit 7743b122bb78e4752430e534a20e8f4090ce8794
Merge: 93392d0 916419f
Author: abat <abat@bigswitch.com>
Date:   Mon Mar 21 17:43:42 2016 -0700

    Merge into master from pull request #471:
    Added new TLVs for GRE tunnel gen table (https://github.com/floodlight/loxigen/pull/471)

commit 916419fc71fb27221a3125999dd058d73bb6f50d
Author: Rob Vaterlaus <rob.vaterlaus@bigswitch.com>
Date:   Sun Mar 20 17:38:30 2016 -0700

    Added new TLVs for GRE tunnel gen table

commit 93392d0a26f5a73d6e47c2fb838f30c3e04c3d92
Merge: 3767c61 6dbc151
Author: abat <abat@bigswitch.com>
Date:   Thu Mar 17 15:11:24 2016 -0700

    Merge into master from pull request #470:
    Add gentable entry-priority tlv (https://github.com/floodlight/loxigen/pull/470)

commit 6dbc15128bcf2123bafaa83facfa77c79d42cb90
Author: harshsin <harshmeet.singh@bigswitch.com>
Date:   Thu Mar 17 10:52:59 2016 -0700

    Add qos-priority tlv

commit 55fc5f7dca9acfb99ebb24edc464232ef22a5c4d
Author: harshsin <harshmeet.singh@bigswitch.com>
Date:   Wed Mar 16 12:22:43 2016 -0700

    Add gentable entry-priority tlv

commit 3767c61e2998cce3775c76d6e4d2cf46c92d6cbd
Merge: 3326f0d 34b951c
Author: abat <abat@bigswitch.com>
Date:   Thu Mar 10 14:48:29 2016 -0800

    Merge into master from pull request #469:
    Add new tlv's for vxlan and dcbx feature vfp entries (https://github.com/floodlight/loxigen/pull/469)

commit 34b951c588296db9667acf7ed07633bf16a549f5
Author: harshsin <harshmeet.singh@bigswitch.com>
Date:   Thu Mar 10 14:46:38 2016 -0800

    changed vfp_class_id value to 32 bits

commit 8f5996c2e8d11c7c4c9dc83adee054f374fd3de1
Author: harshsin <harshmeet.singh@bigswitch.com>
Date:   Thu Mar 10 14:36:17 2016 -0800

    add new tlv's for vxlan and dcbx feature vfp entries

commit 3326f0d2e76232c454c2966529a8c602a378a920
Merge: d75d79d a3d68df
Author: abat <abat@bigswitch.com>
Date:   Mon Mar 7 11:02:43 2016 -0800

    Merge into master from pull request #467:
    Add TLVs for GTP match in the context of port-channel hashing (https://github.com/floodlight/loxigen/pull/467)

commit 0096da08177a6bda2c75e3111318a810c69d860c
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Mon Mar 7 16:44:08 2016 +0200

    Test Fix

    Tests are fixed

commit 1be4eb0f2a3f2cc747184f16381c4e23495d8b2d
Author: abakagamze <gamze.abaka@argela.com.tr>
Date:   Mon Mar 7 16:28:48 2016 +0200

    OpenFlow 1.5.1 Improvement

    * Prerequisites are added
    * Javadoc is added and tested with Java 1.7 / 1.8
    * OFValue classes (OFDuration, OFFlowCount, OFPacketCount, OFByteCount,
    OFIdleTime) are removed
    * Custom files (GroupAddVer15 etc) are removed

    * Tests are added for:

    ACTIONS
    -----------
    - (0) OUTPUT Action
    - (25) SET-FIELD Action (eth_dst, ipv6_src, tcp_src)

    INSTRUCTIONS
    -------------
    - (1) GOTO_TABLE
    - (2) WRITE_METADATA
    - (3) WRITE_ACTIONS
    - (4) APPLY_ACTIONS
    - (5) CLEAR_ACTIONS
    - No Instruction for (6) in OpenFlow 1.5.1 spec.
    - (7) STAT_TRIGGER

    MATCH_V3
    -----------
    - METADATA, ETH_SRC, UDP_DST, IPV6_DST

    MESSAGES
    -------------
    - (0) Hello
    - Hello Elements Version Bitmap
    - (1) Error Messages
    (0) HELLO_FAILED
    (1) BAD_REQUEST
    (2) BAD_ACTION
    (3) BAD_INSTRUCTION
    (4) BAD_MATCH
    (5) FLOW_MOD_FAILED
    - (2) Echo Request
    - (3) Echo Reply
    - (5) Features Request
    - (6) Features Reply
    - (7) Get-Config Request
    - (8) Get-Config Reply
    - (9) Set-Config
    - (10) Packet-In
    - (11) Flow Removed
    - (12) Port Status
    - (13) Packet-Out
    - (14) Flow Mod
    (0) ADD
    (1) MODIFY
    (2) MODIFY_STRICT
    (3) DELETE
    (4) DELETE_STRICT
    - (15) Group Mod
    (0) ADD
    - (16) Port Mod
    - (17) Table Mod
    - (18) Multipart Message Request
    (0) Desc Stats
    (1) Flow Desc Stats (old name is Flow Stats)
    (2) Aggregate Stats
    (3) Table Stats
    (4) Port Stats
    (5) Queue Stats
    (6) Group Stats
    (7) Group Desc Stats
    (8) Group Features Stats
    (9) Meter Stats
    (10) Meter Desc Stats (old name is Meter Config)
    (11) Meter Features Stats
    (12) Table Features Stats
    (13) Port Desc Stats
    (14) Table Desc Stats
    (15) Queue Desc Stats
    (16) Flow Monitor
    (17) Flow Stats
    (18) Controller Status Stats
    (19) Bundle Features

    - (19) Multipart Message Reply
    (0) Desc Stats
    (1) Flow Desc Stats (old name is Flow Stats)
    (2) Aggregate Stats
    (3) Table Stats
    (4) Port Stats
    (5) Queue Stats
    (6) Group Stats
    (7) Group Desc Stats
    (8) Group Features Stats
    (9) Meter Stats
    (10) Meter Desc Stats (old name is Meter Config)
    (11) Meter Features Stats
    (12) Table Features Stats
    (13) Port Desc Stats
    (14) Table Desc Stats
    (15) Queue Desc Stats
    (16) Flow Monitor Stats
    (17) Flow Stats

    - (20) Barrier Request
    - (21) Barrier Reply
    - No Messages for (22) and (23) in Openflow 1.5.1 spec.
    - (24) Role Request
    - (25) Role Reply
    - (26) Get Aysnc Request
    - (27) Get Async Reply
    - (28) Set Async
    - (29) Meter Mod
    (0) ADD
    - (30) Role Status
    - (31) Table Status
    - (32) Request Forward
    - (33) Bundle Control
    - (34) Bundle Add

commit a3d68df4562585160ed726c9934e96659278e3f8
Author: Shudong Zhou <shudongzhou@gmail.com>
Date:   Fri Mar 4 17:04:15 2016 -0800

    Add TLVs for GTP match in the context of port-channel hashing

commit d75d79d6ec0f015c8805b53ea01b35834ceeb2f6
Merge: d9b4242 5529f5f
Author: abat <abat@bigswitch.com>
Date:   Wed Mar 2 19:39:18 2016 -0800

    Merge into master from pull request #466:
    Add tlv for port channel hashing (https://github.com/floodlight/loxigen/pull/466)

commit 5529f5f13e558011e6ed445adc03462891da6b53
Author: Shudong Zhou <shudongzhou@gmail.com>
Date:   Tue Mar 1 17:03:33 2016 -0800

    Add tlv for port channel hashing

commit d9b4242a3e84a24fc2d496e05bbcc58d17211953
Merge: 351e6a7 99d4e51
Author: abat <abat@bigswitch.com>
Date:   Mon Feb 22 10:25:19 2016 -0800

    Merge into master from pull request #465:
    define new bsn_vfi match oxm (https://github.com/floodlight/loxigen/pull/465)

commit 99d4e51a737a18264aaa194a22c63e565032c0b6
Author: Harshmeet Singh <harshmeet.singh@bigswitch.com>
Date:   Fri Feb 19 13:29:20 2016 -0800

    define new bsn_vfi match oxm

commit 351e6a7d45c934a57b537f69bb7d91c59b86e8a7
Merge: 83314ed c5042be
Author: abat <abat@bigswitch.com>
Date:   Fri Feb 19 10:44:32 2016 -0800

    Merge into master from pull request #462:
    Add a new Virtual Forwarding Instance (VFI) type to the openflow library (https://github.com/floodlight/loxigen/pull/462)

commit c5042be1a23fcf5de4da4b08e0672e4902d6f033
Author: sdmodi <sudeep.modi@bigswitch.com>
Date:   Fri Feb 19 10:39:37 2016 -0800

    Address review comment

commit fbba77442b66b45988603faee593bf3bd7776e8a
Merge: 63abfb8 83314ed
Author: sdmodi <sudeep.modi@bigswitch.com>
Date:   Fri Feb 19 10:39:31 2016 -0800

    Merge remote-tracking branch 'floodlight/master'

commit 83314edfecd0085d04e948ec9ddeb37780ccf175
Merge: 2cc26f2 d473459
Author: abat <abat@bigswitch.com>
Date:   Thu Feb 18 13:44:40 2016 -0800

    Merge into master from pull request #464:
    add gencmd extension and of_bsn_tlv_vlan_mac_list (https://github.com/floodlight/loxigen/pull/464)

commit d4734591751c25e756f590dcedf590520b25f1de
Author: Rich Lane <rlane@bigswitch.com>
Date:   Tue Feb 9 14:27:26 2016 -0800

    openflow_input: add of_bsn_tlv_vlan_mac_list

commit e6ab937e63231494e8e7ea9451afd0128e8cfa26
Author: Rich Lane <rlane@bigswitch.com>
Date:   Tue Feb 9 14:24:41 2016 -0800

    openflow_input: add bsn_generic_command extension

commit 2cc26f280b4afb46b2e27c740e8537e539f907a3
Merge: 850995b 8d76666
Author: abat <abat@bigswitch.com>
Date:   Wed Feb 17 17:16:25 2016 -0800

    Merge into master from pull request #463:
    Support bsn_l2_cache_hit tlv in 1.4. (https://github.com/floodlight/loxigen/pull/463)

commit 8d766663348b8eb02dbc3462d13bc219fe9536a5
Author: Wilson Ng <wilson.ng@bigswitch.com>
Date:   Wed Feb 17 17:09:54 2016 -0800

    Support bsn_l2_cache_hit tlv in 1.4.

commit 63abfb8151d7d373c521f6a9140f6d9a1e64fae3
Author: sdmodi <sudeep.modi@bigswitch.com>
Date:   Wed Feb 17 16:04:55 2016 -0800

    Fix typo

commit a076efc364177d5a95ae24f0be49f8dfce933e7a
Author: sdmodi <sudeep.modi@bigswitch.com>
Date:   Wed Feb 17 16:02:30 2016 -0800

    Add a new Virtual Forwarding Instance (VFI) type to the openflow library

commit 850995bf19c7b0e6d768ec58d7bbba447da24d24
Merge: 3feb5a9 39d61e5
Author: abat <abat@bigswitch.com>
Date:   Tue Feb 16 15:50:39 2016 -0800

    Merge into master from pull request #461:
    Add vfi tlv for VXLAN VPN (https://github.com/floodlight/loxigen/pull/461)

commit 39d61e52f3c7cdc14922f2e6f5e5b8769f66f584
Author: Harshmeet Singh <harshmeet.singh@bigswitch.com>
Date:   Tue Feb 16 10:41:26 2016 -0800

    Add vfi tlv for VXLAN VPN

commit 3feb5a95a50c4d1ac7c90b2a34e5436920f0693d
Merge: ccc86f2 3c0e65c
Author: abat <abat@bigswitch.com>
Date:   Thu Feb 11 14:45:36 2016 -0800

    Merge into master from pull request #460:
    loci: fix mask size when parsing OXMs into of_match_t (SWL-2669) (https://github.com/floodlight/loxigen/pull/460)

commit 3c0e65c3a3f07bd0fd0860bceb609e095e9719cc
Author: Rich Lane <rlane@bigswitch.com>
Date:   Thu Feb 11 13:32:04 2016 -0800

    loci: fix mask size when parsing OXMs into of_match_t (SWL-2669)

    of_memmask was passed the size of a pointer, not the match field.

commit da8cdc3aa52606072db52b1f40eab2720f873086
Author: Gamze Abaka <gamze.abaka@argela.com.tr>
Date:   Mon Feb 1 15:50:43 2016 +0200

    Test Files Removed

    Test Files that are created from eclipse are removed

commit 7ce81f929ed2c24cf2764bd675339c209f716364
Author: Gamze Abaka <gamze.abaka@argela.com.tr>
Date:   Mon Feb 1 14:58:56 2016 +0200

    OpenFlow 1.5.1 implementation

    Java and Wireshark Implementation for OpenFlow 1.5.1
    --
    Basic messages (Hello, Features Request-Reply, Get Config Request,Reply,
    Set Config, Port Status, Packet-In, Table-Statistics, Port-Statistics,
    Flow Add etc) are tested with OVS 2.4.0
    --
    Flow Monitoring, Bucket Insertion / Deletion for groups, statistics
    trigger and usage of OXS classes must be tested!
    --

commit ccc86f2f5a7bc47fe7055eb7b63fd9da458c80fa
Merge: ae1c1c4 4730681
Author: abat <abat@bigswitch.com>
Date:   Wed Jan 27 19:27:33 2016 -0800

    Merge into master from pull request #458:
    Upgrade Guava Version to 19.0 (https://github.com/floodlight/loxigen/pull/458)

commit 47306813d8d0f2287909cd14ef23a7cc12cf7fe5
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Wed Jan 27 16:20:13 2016 -0800

    Upgrade Guava Version to 19.0

commit ae1c1c4fe554cb5464419851e292e5068fec47b5
Merge: ddc79f7 ce24488
Author: abat <abat@bigswitch.com>
Date:   Wed Jan 13 11:11:36 2016 -0800

    Merge into master from pull request #452:
    Duplicated the behavior in OFFlow*_setActions, version 1.3, for versions 1.1, 1.2 and 1.4 (https://github.com/floodlight/loxigen/pull/452)

commit ddc79f76083b3e8373920f5cf92137ddc9374b5f
Merge: 883c022 9649f18
Author: abat <abat@bigswitch.com>
Date:   Wed Jan 13 10:54:35 2016 -0800

    Merge into master from pull request #455:
    java: bump POM version to 2.1.0 (https://github.com/floodlight/loxigen/pull/455)

commit 9649f1816d72e50d214c3168171928f1f2e0f6a2
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Wed Jan 13 10:50:03 2016 -0800

    java: bump POM version to 2.1.0

commit ce244883434125fa2a1a2752657b501dd90d95c7
Author: AndreMantas <andremantas7@gmail.com>
Date:   Wed Jan 13 18:32:05 2016 +0000

    Removed unnecessary helper methods for FlowDelete/Strict Builders. Flow Delete messages have no actions/instructions.

commit 528dd08a0c87463a0822a2ed24e8ede8212a5cb0
Author: AndreMantas <andremantas7@gmail.com>
Date:   Wed Jan 13 15:27:04 2016 +0000

    Created template files for OFFlow*.Builder_setActions files so that each version specific file can include its template and reduce duplicate code.

commit ed8f904c2b009b45c3c9e033c7fd07aba0f315aa
Merge: d006a0e 883c022
Author: AndreMantas <andremantas7@gmail.com>
Date:   Wed Jan 13 14:41:13 2016 +0000

    Merge branch 'master' of https://github.com/floodlight/loxigen

commit 883c022922f254601be36ccb15dc0364d72a6870
Merge: 6d333f1 914939c
Author: abat <abat@bigswitch.com>
Date:   Tue Jan 12 17:03:44 2016 -0800

    Merge into master from pull request #453:
    Fix doc syntax, Java 8 does not like it (https://github.com/floodlight/loxigen/pull/453)

commit 914939c5caf95d2e59972eea28afb38f77ded564
Author: Shudong Zhou <shudongzhou@gmail.com>
Date:   Tue Jan 12 11:28:14 2016 -0800

    Fix doc syntax, Java 8 does not like it

commit d006a0e8fc78f4f06d8261e13d239cfacbc37cb9
Author: AndreMantas <andremantas7@gmail.com>
Date:   Sun Jan 10 18:30:02 2016 +0000

    Reviewer: @rizard @rlane @Sovietaced

    Duplicated the behaviour in OFFlow*_setActions, version 1.3 for versions 1.1, 1.2 and 1.4

commit 6d333f1d336f5ac27cb02d4b33440480f355be91
Merge: d1e2389 5abb5af
Author: abat <abat@bigswitch.com>
Date:   Tue Jan 5 14:01:41 2016 -0800

    Merge into master from pull request #451:
    OF1.4 table features bug fix (https://github.com/floodlight/loxigen/pull/451)

commit 5abb5af6b1cf5b91fa116db9f31f3180622fc508
Author: Ryan Izard <rizard@g.clemson.edu>
Date:   Mon Jan 4 12:14:47 2016 -0500

    Fixed OF1.4 table features properties byte alignment. Now byte aligned to 8 bytes.

commit d1e2389d8ce58209270d135db1f08e096b46a427
Merge: 9ecc398 22ef95b
Author: abat <abat@bigswitch.com>
Date:   Fri Dec 18 15:50:29 2015 -0800

    Merge into master from pull request #450:
    Async request patch for OF1.3 and OF1.4 (https://github.com/floodlight/loxigen/pull/450)

commit 22ef95b8af95331bb0d92cb05cd23aba3869f26d
Author: Ryan Izard <rizard@g.clemson.edu>
Date:   Fri Dec 18 17:10:58 2015 -0500

    Async request messages do not have any body, only the OF header w/async request type.

commit 9ecc3981a61fb13c40aeb910f1d2c86fb04aa021
Merge: d593d01 7ba8173
Author: abat <abat@bigswitch.com>
Date:   Fri Dec 4 12:47:24 2015 -0800

    Merge into master from pull request #441:
    Add of_bsn_base_error and of_bsn_error. (https://github.com/floodlight/loxigen/pull/441)

commit d593d0135fc000a63fcd4faf840817778f2448d8
Merge: 09462b2 99c6d9d
Author: abat <abat@bigswitch.com>
Date:   Tue Dec 1 17:05:47 2015 -0800

    Merge into master from pull request #449:
    java: generate setters for unwriteable fields LOXI-76 (https://github.com/floodlight/loxigen/pull/449)

commit 99c6d9d999a65cbf3b1eb6e16c543451b5b56c2d
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Tue Dec 1 16:43:43 2015 -0800

    Only generate virtual setters where necessary LOXI-76

    The previous commit would add virtual Exception-raising setters
    globally. This commit adds a method that specifically checks whether
    a setter is necessary.

    A setter must be generated if the field is writeable in this class
    or any super class. Fields can turn non-writeable in a subclass
    if a superclass data member is used as a discriminator.

commit 1c8f7eef0e2cb719b0d670a4b55c6dc7ce068fd0
Merge: 2268d5c 09462b2
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Tue Dec 1 16:29:29 2015 -0800

    Merge remote-tracking branch 'upstream/master' into unwriteable-setters

commit 09462b29cd92c807e7c7776702efec6f26afadf6
Merge: 3cbb8c7 4d8392d
Author: abat <abat@bigswitch.com>
Date:   Mon Nov 30 12:26:36 2015 -0800

    Merge into master from pull request #448:
    Packet-in reason for reserved multicast packets. (https://github.com/floodlight/loxigen/pull/448)

commit 4d8392dd20c6a169f899546e49144bddd497147b
Author: Kiran Poola <kiran.poola@bigswitch.com>
Date:   Mon Nov 30 12:21:14 2015 -0800

    Packet-in reason for reserved multicast packets.

commit 3cbb8c7a915d9ce691fb7c3de06749c61cc54e4a
Merge: 0ba42d4 3850039
Author: abat <abat@bigswitch.com>
Date:   Fri Nov 20 09:23:51 2015 -0800

    Merge into master from pull request #447:
    Match: consistently hide Fields w/ broken prereqs LOXI-75 (https://github.com/floodlight/loxigen/pull/447)

commit 385003977cf417663f573ec41fba325cfbced40b
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Thu Nov 19 19:44:51 2015 -0800

    Match: consistently hide Fields w/ broken prereqs LOXI-75

    Previously, isExact(), isPartiallyMasked() and isFullyWildcarded()
    did not check whether the required prerequisites for a field
    had been set. get() and getMasked() did, leading to inconsistent
    results / NPEs.

    This makes all of the methods honor the prerequisite checks.
    It also adds a unit test checking the behavior.

commit 0ba42d48ae4714ea0022906e74819d1ed556c4a7
Merge: 56666f9 4c35527
Author: abat <abat@bigswitch.com>
Date:   Wed Nov 11 18:52:43 2015 -0800

    Merge into master from pull request #446:
    Modified EUI-64 format interface identifier utilities in IPv6Address LOXI-74 (https://github.com/floodlight/loxigen/pull/446)

commit 4c3552750bbed4a07cf591f57df4c118c4c24865
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Wed Nov 11 18:47:49 2015 -0800

    LOXI-74 More parentheses dressing...

commit 6cef30d77d31b31e36b3dd31bd3e0edd0ca0b8c2
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Wed Nov 11 18:36:22 2015 -0800

    LOXI-74 More parentheses

    Reference:
    https://github.com/floodlight/loxigen/pull/446#discussion-diff-44615571

commit 381983045ff2db675e15397780cc8dfa226f2b99
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Wed Nov 11 18:32:37 2015 -0800

    LOXI-74 Added parentheses as @andi-bigswitch suggested

    Reference:
    https://github.com/floodlight/loxigen/pull/446#discussion-diff-44615571

commit f0943e11036dc0173791487be3f8e48cc4a16661
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Tue Nov 10 20:24:58 2015 -0800

    LOXI-74 Nonnull annotation

commit f0d990ae7d7395f4d834de3247e624ac9816b83a
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Tue Nov 10 20:21:09 2015 -0800

    LOXI-74 Unit tests for the new Modified EUI-64 methods

commit 0785c92563fcf689d303b1c7120c5d81215211fd
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Tue Nov 10 19:22:10 2015 -0800

    LOXI-74 renamed isDerivedFrom() to isModifiedEui64Derived()

commit f3efa989e3e6a96caa312e4579e7247c3aade742
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Tue Nov 10 19:09:45 2015 -0800

    LOXI-74 IPv6AddressWithMask.LINK_LOCAL_NETWORK and .LINK_LOCAL_RESERVED

commit 310753a6682873ccf583964d91561bdf5b14e16b
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Tue Nov 10 18:38:41 2015 -0800

    LOXI-74 Added IPv6Address.of() to create MAC address derived IPv6Address

commit a05df970877e382a71cc19697ffdbe8a7f8dc602
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Tue Nov 10 17:18:30 2015 -0800

    LOXI-74 Added util to check if an IPv6 address is derived from the
    specified MAC address

commit 81091dea0998b24601af062db24cb5b8f04aba59
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Tue Nov 10 16:36:30 2015 -0800

    LOXI-74 Added util to convert MAC addresses to Modified EUI-64
    format interface identifiers

commit 56666f9ed43c8623901166eb659a44e9bd20ad89
Merge: 85698af 6a9203d
Author: abat <abat@bigswitch.com>
Date:   Fri Nov 6 16:03:43 2015 -0800

    Merge into master from pull request #445:
    Add link_up and link_down counters to ofp_bsn_port_counter. (https://github.com/floodlight/loxigen/pull/445)

commit 6a9203de1ad95bbf1ee0c755d6f5e4dc5d70e493
Author: Ken Chiang <ken.chiang@bigswitch.com>
Date:   Fri Nov 6 16:00:55 2015 -0800

    Add link_up and link_down counters to ofp_bsn_port_counter.

commit 85698af624ea341a4e7a1bd868c49f0d649c73a2
Merge: a34310f 3d367f3
Author: abat <abat@bigswitch.com>
Date:   Fri Nov 6 15:42:38 2015 -0800

    Merge into master from pull request #444:
    Status TLV. (https://github.com/floodlight/loxigen/pull/444)

commit 3d367f3de55b7715ceb628aebecbd13af9cdfd82
Author: Kiran Poola <kiran.poola@bigswitch.com>
Date:   Fri Nov 6 15:37:26 2015 -0800

    Status TLV.

commit a34310f77da4131fa1da882368ab78d524bc2efe
Merge: ce2f5b4 70a4ac2
Author: abat <abat@bigswitch.com>
Date:   Fri Nov 6 14:21:28 2015 -0800

    Merge into master from pull request #443:
    wireshark: rename to avoid conflict with upstream dissector (https://github.com/floodlight/loxigen/pull/443)

commit 70a4ac2c113982c66853050e9f31d88c56f7e1f2
Author: Rich Lane <rlane@bigswitch.com>
Date:   Fri Nov 6 14:11:56 2015 -0800

    wireshark: rename to avoid conflict with upstream dissector

    Newer versions of Wireshark crash (!) because of the name conflict.

commit ce2f5b46d369446ce05b4e893a834b98c2b5c5a8
Merge: fb90801 7ec7150
Author: abat <abat@bigswitch.com>
Date:   Fri Nov 6 09:44:20 2015 -0800

    Merge into master from pull request #442:
    Add use_packet_state tlv. (https://github.com/floodlight/loxigen/pull/442)

commit 7ec715088332371de515e6cb73fc1408c8c59541
Author: Wilson Ng <wilson.ng@bigswitch.com>
Date:   Wed Nov 4 16:09:07 2015 -0800

    Add use_packet_state tlv.

commit 7ba81736eae4bb96fd9599dcca288145b1e462f3
Author: Ken Chiang <ken.chiang@bigswitch.com>
Date:   Wed Oct 28 17:56:32 2015 -0700

    Add of_bsn_base_error and of_bsn_error.

commit fb90801d4d2e9ba5ba10803d2d0dd03665cd9988
Merge: b3b3cfd 1a3a98f
Author: abat <abat@bigswitch.com>
Date:   Tue Oct 27 14:13:50 2015 -0700

    Merge into master from pull request #440:
    IPAddress boolean and factory methods (https://github.com/floodlight/loxigen/pull/440)

commit 1a3a98fff73ce58097264d6652a2181877935174
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Fri Oct 23 18:01:18 2015 -0700

    Added factory method IPv4Address.of(int, int, int, int)

commit 536dda87a1be9df3dc5f20b92cb8f6abb3924b1f
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Thu Oct 22 17:16:29 2015 -0700

    Added IPAddress#isLinkLocal() to test for link local addresses

commit 2268d5cae414af47b0be4bd254106ebe2d1924f5
Author: Rich Lane <rlane@bigswitch.com>
Date:   Mon Oct 26 16:07:16 2015 -0700

    java: generate setters for unwriteable fields

    https://github.com/floodlight/loxigen/pull/438 ran into a problem when we tried
    to use a field as a discriminator when it was a normal data member in the
    superclass. The java compiler complained that we hadn't provided an
    implementation of the setter in the concrete class.

    This change fixes the problem by creating setters for unwriteable fields which
    throw an exception, like we do when the field isn't available in the OpenFlow
    version.

    This obviously adds the setters in more places than necessary. We could
    possibly optimize this by checking each ancestor class to see if the field
    changed writeability and only emit a setter in that special case.

commit b3b3cfd16d43bea9a59a40e185b58781ace14ad2
Merge: 8b8ac26 5bc9c8c
Author: abat <abat@bigswitch.com>
Date:   Mon Oct 26 10:31:43 2015 -0700

    Merge into master from pull request #427:
    Change toString() of OFMetadata (https://github.com/floodlight/loxigen/pull/427)

commit 88a5ea5e01d2f68994b83c86239f1c304d05823b
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Thu Oct 22 16:01:42 2015 -0700

    Added IPAddress#isLoopback() to test for loopback addresses

commit bbd1434a4ad9d69d1d2e75a52e66eaec61539069
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Thu Oct 22 14:53:55 2015 -0700

    Added IPAddress#isUnspecified() to test for wildcard addresses

commit 8b8ac26edf425e61e34ec4a2e05f6505034569e2
Merge: 4d76743 3c99cdb
Author: abat <abat@bigswitch.com>
Date:   Thu Oct 22 12:38:19 2015 -0700

    Merge into master from pull request #437:
    Added IPAddress#toInetAddress() convenience method (https://github.com/floodlight/loxigen/pull/437)

commit 3c99cdb2767001373decc7a3277a676d26aed74e
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Thu Oct 22 11:07:27 2015 -0700

    Implement IPAddress#toInetAddress() directly in subclasses as suggested
    by @andi-bigswitch

commit 79e06021411f96bdee9862342aab4b3985228036
Author: Ronald Li <ronald.li@bigswitch.com>
Date:   Wed Oct 21 16:29:04 2015 -0700

    Added IPAddress#toInetAddress() convenience method

commit 4d767431da6a92023a3db1c77f380451033fc7e0
Merge: 845949f c865b32
Author: abat <abat@bigswitch.com>
Date:   Mon Oct 19 13:39:25 2015 -0700

    Merge into master from pull request #435:
    add vxlan src ip lookup failure pktin reason (https://github.com/floodlight/loxigen/pull/435)

commit 845949f425dd6c341190c8c3d6bf9f307ab626f7
Merge: 6aa62c3 68835b2
Author: abat <abat@bigswitch.com>
Date:   Mon Oct 19 13:25:30 2015 -0700

    Merge into master from pull request #436:
    New TLV multicast_interface_id. (https://github.com/floodlight/loxigen/pull/436)

commit 68835b2a5709b62ef9a859adb21ee87049e1e241
Author: Kiran Poola <kiran.poola@bigswitch.com>
Date:   Mon Oct 19 11:12:23 2015 -0700

    New TLV multicast_interface_id.

commit c865b325c48174def2e26f215bb46cb0955fcf79
Author: Harshmeet Singh <harshmeet.singh@bigswitch.com>
Date:   Sun Oct 18 20:43:32 2015 -0700

    add vxlan src ip lookup failure pktin reason

commit 6aa62c3904f8a9d74642e401e173a656038acb53
Merge: 0e761f7 2f620ff
Author: abat <abat@bigswitch.com>
Date:   Fri Oct 16 14:18:28 2015 -0700

    Merge into master from pull request #434:
    Major oversight in test and typo (https://github.com/floodlight/loxigen/pull/434)

commit 2f620ff72f93476fb915931c61a37aeeec38fd79
Author: Sovietaced <Sovietaced@gmail.com>
Date:   Fri Oct 16 17:05:15 2015 -0400

    oops

commit 0e761f71aaccd4d4e41a49838b80575e4cf91157
Merge: e9ce4eb 285e38c
Author: abat <abat@bigswitch.com>
Date:   Fri Oct 16 03:00:38 2015 -0700

    Merge into master from pull request #432:
    Refactor MacAddress class to handle other string formats (https://github.com/floodlight/loxigen/pull/432)

commit e9ce4ebe1a9d86fbeb308c91cc5ad6fa8b30c95c
Merge: 952e8e5 4cd7376
Author: abat <abat@bigswitch.com>
Date:   Thu Oct 15 16:18:30 2015 -0700

    Merge into master from pull request #433:
    add nexthop_type_vxlan tlv for ecmp gentable (https://github.com/floodlight/loxigen/pull/433)

commit 4cd73764d45761b6ad0213c9d8b595b082bfd116
Author: Harshmeet Singh <harshmeet.singh@bigswitch.com>
Date:   Thu Oct 15 16:09:16 2015 -0700

    add nexthop_type_vxlan tlv for ecmp gentable

commit 285e38cec1c559adfc83f534b970fff8fe1b9626
Author: Sovietaced <Sovietaced@gmail.com>
Date:   Thu Oct 15 18:46:28 2015 -0400

    address comments

commit 13631ecf4787ac2b6357aae46240696f9b17d2a4
Author: Sovietaced <Sovietaced@gmail.com>
Date:   Thu Oct 15 02:30:01 2015 -0400

    fix compilation and update tests

commit 9797a402cad576329aa156b178321c88977e2991
Author: Sovietaced <Sovietaced@gmail.com>
Date:   Thu Oct 15 01:54:20 2015 -0400

    update MacAddress to take other formats of mac strings

commit 952e8e526d2ef773ebab8e684b288b06c2ec2f83
Merge: d2da0a8 d5e1855
Author: abat <abat@bigswitch.com>
Date:   Thu Oct 8 16:56:20 2015 -0700

    Merge into master from pull request #431:
    IGMP and PIM packet-in reasons. (https://github.com/floodlight/loxigen/pull/431)

commit d5e18559eb419da54127d16885cb7e87ac694330
Author: Kiran Poola <kiran.poola@bigswitch.com>
Date:   Thu Oct 8 05:30:58 2015 -0700

    IGMP and PIM packet-in reasons.

commit d2da0a89ad6bde3e6d6ef9080b210aebf7f9c996
Merge: 026a4ac f61e88b
Author: abat <abat@bigswitch.com>
Date:   Fri Oct 2 13:46:40 2015 -0700

    Merge into master from pull request #430:
    openflow_input: add storm control TLVs (https://github.com/floodlight/loxigen/pull/430)

commit f61e88b0c3bc4306534fd2f71e800691f4b01032
Author: Rich Lane <rlane@bigswitch.com>
Date:   Fri Oct 2 13:05:23 2015 -0700

    openflow_input: add storm control TLVs

commit 026a4ac3f7f874dbab74a4df2e2802524a4134a0
Merge: 0349f5d 2255996
Author: abat <abat@bigswitch.com>
Date:   Thu Oct 1 16:03:33 2015 -0700

    Merge into master from pull request #429:
    add vxlan tlvs (https://github.com/floodlight/loxigen/pull/429)

commit 2255996a6a7fc1ad8455152c87736ec7cde0a958
Author: Harshmeet Singh <harshmeet.singh@bigswitch.com>
Date:   Thu Oct 1 15:23:14 2015 -0700

    change from port_vxlan_flags to port_vxlan_mode

commit 3bf95229722f7a91258b89aa90c8856171d30627
Author: Harshmeet Singh <harshmeet.singh@bigswitch.com>
Date:   Thu Oct 1 11:44:28 2015 -0700

    add vxlan tlvs

commit 0349f5dc63091b98b7c11b883b43a0bc55f50cc4
Merge: c4e0b43 3ed8036
Author: abat <abat@bigswitch.com>
Date:   Thu Oct 1 10:29:40 2015 -0700

    Merge into master from pull request #428:
    openflow_input: add decap TLV (https://github.com/floodlight/loxigen/pull/428)

commit 3ed80360df641040d681aa6cec67ba1ed38abb30
Author: Rich Lane <rlane@bigswitch.com>
Date:   Tue Sep 29 12:49:59 2015 -0700

    openflow_input: add decap TLV

commit 5bc9c8cc8570b752b20e2f43915c6bc027a2de6e
Author: Ryan Izard <ryan.izard@bigswitch.com>
Date:   Mon Sep 28 08:30:15 2015 -0400

    Fix toString() of OFMetadata to not include the string 'Metadata:' before the value. No other type does this to my knowledge. We should probably remove it to be consistent with e.g. MacAddress, which is a hex string 'XX:XX:XX:XX:XX:XX', not 'MAC Address: XX:XX:XX:XX:XX:XX'.

commit c4e0b4396f3fc4598e537e3ce85c5159fe9bc213
Merge: e16f4a7 72c59ea
Author: abat <abat@bigswitch.com>
Date:   Mon Sep 21 16:05:21 2015 -0700

    Merge into master from pull request #422:
    openflowj: update to netty 4 (https://github.com/floodlight/loxigen/pull/422)

commit 72c59ea65289d8f55e4c6d051405c48ff51f471b
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Mon Sep 21 15:45:38 2015 -0700

    java/pom.xml: Update netty to 4.0.31

commit 9ba8462d1cd36a2f94ea5a5fe67060296f4fc231
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Tue Sep 8 04:21:36 2015 -0700

    java_gen: pom.xml - update version to 2.0.0 - SNAPSHOT

commit 69d624dec2f42a198dd100d1c92bc8f0f3c6b59d
Author: Andreas Wundsam <andreas.wundsam@bigswitch.com>
Date:   Thu Feb 6 18:12:12 2014 -0800

    openflowj: update to netty 4

    This commit updates openflowj to use netty 4.0.30. Also adapts
    to the API changes in netty4:

     - package root renamed from org.jboss.netty to io.netty
     - ChannelBuffer renamed to ByteBuf
     - ChannelBuffers renamed to Unpooled
     - ChannelBuffers.dynamicBuffer() renamed to Unpooled.buffer()

commit e16f4a7025feba2cd7c6508e38258b096db58f53
Merge: 3030a39 50c5e1e
Author: abat <abat@bigswitch.com>
Date:   Mon Sep 21 12:35:40 2015 -0700

    Merge into master from pull request #424:
    add VxLAN Network Identifier type to the Openflow library (https://github.com/floodlight/loxigen/pull/424)

commit 50c5e1e817711c9820798391b712612a31128419
Author: Sarath Kumar <Sarath Kumar>
Date:   Fri Sep 18 14:49:35 2015 -0700

    vxlan_ni updates in java_type.py file

commit b4060e42edcb879467dbdc594c8c6502812a35f4
Author: Sarath Kumar <Sarath Kumar>
Date:   Fri Sep 18 13:57:56 2015 -0700

    changed length to 4
    updated type in MatchField

commit 962cd5c8f43ea66e478873be91ff7d4a2b1fcc48
Author: Sarath Kumar <Sarath Kumar>
Date:   Thu Sep 17 18:32:55 2015 -0700

    add VxLAN Network Identifier type to the Openflow library

commit 3030a39d5a52f198ef997d6b1e0f41a33e48511b
Merge: 4776c8a 0f9126c
Author: abat <abat@bigswitch.com>
Date:   Tue Sep 15 16:26:40 2015 -0700

    Merge into master from pull request #420:
    Added static function to generate macAddress from IPv4 Multicast address (https://github.com/floodlight/loxigen/pull/420)

commit 0f9126c1da22fc8d5003e46fb5535127d8f2abf1
Merge: 5cd56cb 4776c8a
Author: Mary Manohar <mary.manohar@bigswitch.com>
Date:   Tue Sep 15 16:14:35 2015 -0700

    Merge remote-tracking branch 'bigswitch/master' into my-loxigen

commit 5cd56cb61cb5ce8e727bb67e3c09d68c59a8c421
Author: Mary Manohar <mary.manohar@bigswitch.com>
Date:   Tue Sep 15 16:13:28 2015 -0700

    Fixed code review comments

commit fbc111d2804fce865b1a010dfaa5ca1685bc7a22
Author: Mary Manohar <mary.manohar@bigswitch.com>
Date:   Wed Sep 9 17:01:28 2015 -0700

    Fixed compilation error

commit 989491e689e464a06852bd9193eef58110135429
Author: Mary Manohar <mary.manohar@bigswitch.com>
Date:   Wed Sep 9 16:51:26 2015 -0700

    Fixed compilation warning

commit faf22f589f27b20335175699f1d226bef648f970
Author: Mary Manohar <mary.manohar@bigswitch.com>
Date:   Wed Sep 9 16:38:20 2015 -0700

    Fixed review comments and added JUnit testcases

commit 4776c8a61ae3bb101f06453045ee7eccef86b71e
Merge: 6085236 0978325
Author: abat <abat@bigswitch.com>
Date:   Thu Sep 3 17:47:40 2015 -0700

    Merge into master from pull request #421:
    openflow_input: add message of_bsn_vlan_counter_clear (https://github.com/floodlight/loxigen/pull/421)

commit 09783252e8937a9c28e5cdad514db3682859cf32
Author: Rich Lane <rlane@bigswitch.com>
Date:   Thu Sep 3 17:39:25 2015 -0700

    openflow_input: add message of_bsn_vlan_counter_clear

    This message clears the stats reported by the extension for the given VLAN.

commit c90917117a8df05131f67a8ed693e081a7ce466c
Author: Mary Manohar <mary.manohar@bigswitch.com>
Date:   Fri Aug 28 15:05:12 2015 -0700

    Added static function to generate macAddress from IPv4 Multicast address.

Fix optical port description to align to standard

See tx_pwr_min, tx_pwr_max type

/* Optical port description property. */
struct ofp_port_desc_prop_optical {
uint16_t type; /* OFPPDPT_3OPTICAL. */
uint16_t length; /* Length in bytes of this property. */
uint8_t pad[4]; /* Align to 64 bits. */
uint32_t supported; /* Features supported by the port. */
uint32_t tx_min_freq_lmda; /* Minimum TX Frequency/Wavelength */
uint32_t tx_max_freq_lmda; /* Maximum TX Frequency/Wavelength */
uint32_t tx_grid_freq_lmda; /* TX Grid Spacing Frequency/Wavelength */
uint32_t rx_min_freq_lmda; /* Minimum RX Frequency/Wavelength */
uint32_t rx_max_freq_lmda; /* Maximum RX Frequency/Wavelength */
uint32_t rx_grid_freq_lmda; /* RX Grid Spacing Frequency/Wavelength */
uint16_t tx_pwr_min; /* Minimum TX power */
uint16_t tx_pwr_max; /* Maximum TX power */
};
OFP_ASSERT(sizeof(struct ofp_port_desc_prop_optical) == 40);

Was-ChangeId: I1c1418b9d0acd8bf7d21fa6d1ea5d7af0598e149
Change-Id: Id69c8597eb4564653c56cdc90f2dcec50afbdd25
diff --git a/.build/push-artifacts.sh b/.build/push-artifacts.sh
index ec81d62..ae7ace6 100755
--- a/.build/push-artifacts.sh
+++ b/.build/push-artifacts.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -eu
+#!/bin/bash -eux
 
 # Push the loxigen artifacts to a dedicated git repository,
 # along with a nice commit message and a tag
@@ -10,13 +10,18 @@
 fi
 
 ARTIFACT_REPO_BRANCH=${2-master}
+ARTIFACT_TARGET_BRANCH=${3-master}
+
+MAKE=${MAKE-make}
 
 ARTIFACT_REPO=$(mktemp -d --tmpdir "push-artifacts-repo.XXXXXXX")
 
 git clone ${ARTIFACT_REPO_URL} ${ARTIFACT_REPO} -b ${ARTIFACT_REPO_BRANCH}
-find ${ARTIFACT_REPO} -mindepth 1 -maxdepth 1 -type d \! -name '.*' -print0 | xargs -0 rm -r
-make LOXI_OUTPUT_DIR=${ARTIFACT_REPO} clean all
 
+find ${ARTIFACT_REPO} -mindepth 1 -maxdepth 1 -type d \! -name '.*' -print0 | xargs -0 rm -r
+${MAKE} LOXI_OUTPUT_DIR=${ARTIFACT_REPO} clean all
+
+loxi_branch=$(git rev-parse --abbrev-ref HEAD)
 loxi_head=$(git rev-parse HEAD)
 last_loxi_log=$(git log --format=oneline -1)
 git_log_file=$(mktemp --tmpdir "git-log-file.XXXXXXX")
@@ -49,15 +54,19 @@
     git add -A
 
     (
-       echo "Artifacts from ${loxi_github_url}"
+       echo "Artifacts from ${loxi_github_url} (Branch ${loxi_branch})"
        echo
        echo "Loxigen Head commit floodlight/loxigen@${loxi_head}"
        cat $git_log_file
     ) | git commit --file=-
 
     git tag -a -f "loxi/${loxi_head}" -m "Tag Loxigen Revision ${loxi_head}"
-    git push --tags
-    git push origin HEAD
+    git push --tags -f
+    if [[ $ARTIFACT_TARGET_BRANCH != $ARTIFACT_REPO_BRANCH ]]; then
+        git push -f origin HEAD:${ARTIFACT_TARGET_BRANCH}
+    else
+        git push origin HEAD
+    fi
 )
 
 rm -rf ${ARTIFACT_REPO}
diff --git a/Makefile b/Makefile
index 518ac6e..5746e94 100644
--- a/Makefile
+++ b/Makefile
@@ -52,7 +52,7 @@
 c: .loxi_ts.c
 
 .loxi_ts.c: ${LOXI_PY_FILES} ${LOXI_TEMPLATE_FILES} ${INPUT_FILES} ${TEST_DATA}
-	./loxigen.py --install-dir=${LOXI_OUTPUT_DIR} --lang=c
+	./loxigen.py --install-dir=${LOXI_OUTPUT_DIR} --lang=c --version-list=1.0,1.1,1.2,1.3,1.4
 	touch $@
 
 python: .loxi_ts.python
@@ -133,6 +133,7 @@
 	PYTHONPATH=${LOXI_OUTPUT_DIR}/pyloxi:. python py_gen/tests/of12.py
 	PYTHONPATH=${LOXI_OUTPUT_DIR}/pyloxi:. python py_gen/tests/of13.py
 	PYTHONPATH=${LOXI_OUTPUT_DIR}/pyloxi:. python py_gen/tests/of14.py
+	PYTHONPATH=${LOXI_OUTPUT_DIR}/pyloxi:. python py_gen/tests/of15.py
 
 check-c: c
 	make -j4 -C ${LOXI_OUTPUT_DIR}/locitest
diff --git a/README.md b/README.md
index 18357d4..59350ae 100644
--- a/README.md
+++ b/README.md
@@ -3,15 +3,16 @@
 
 LoxiGen is a tool that generates OpenFlow protocol libraries for a number of
 languages. It is composed of a frontend that parses wire protocol descriptions
-and a backend for each supported language (currently C, Python, and Java, with an 
-auto-generated wireshark dissector in Lua on the way). 
+and a backend for each supported language (currently C, Python, and Java, with an
+auto-generated wireshark dissector in Lua on the way).
 
-LoxiGen currently supports OpenFlow Versions **1.0**, **1.1**, **1.2**, and **1.3.1**. Versions 1.0
-and 1.3.1 are actively used in production. Support for versions 1.1 and 1.2 is considered experimental.
+LoxiGen currently supports OpenFlow Versions **1.0**, **1.1**, **1.2**, and **1.3.1**, **1.4.1**, and **1.5.1**.
+Versions 1.0, 1.3.1 and 1.4.1 are actively used in production. Support for versions 1.1 and 1.2 is considered experimental.
+Support for **1.5.1** is currently experimental and limited to the Java backend.
 
-Loxigen is free and open source software. The Loxigen tool itself is licensed under the [Eclipse Public 
-License,  version 1.0](http://www.eclipse.org/legal/epl-v10.html) (EPL), with an exception allowing for the distribution of the generated artifacts 
-under terms of your choice (copyright notices must be retained, see the [loxigen.py](loxigen.py) 
+Loxigen is free and open source software. The Loxigen tool itself is licensed under the [Eclipse Public
+License,  version 1.0](http://www.eclipse.org/legal/epl-v10.html) (EPL), with an exception allowing for the distribution of the generated artifacts
+under terms of your choice (copyright notices must be retained, see the [loxigen.py](loxigen.py)
 header for details.)
 
 
@@ -56,8 +57,8 @@
 make c
 ```
 
-The currently supported languages are `c`, `python` and `java`. There is an 
-experimental/partially completed backend that generates a lua wireshark dissector
+The currently supported languages are `c`, `python` and `java`. There is an
+experimental backend that generates a lua wireshark dissector
 (`wireshark`).
 
 The generated libraries will be under the `loxi_output` directory. This can be
diff --git a/c_gen/build_of_g.py b/c_gen/build_of_g.py
index ace386d..d11e60d 100755
--- a/c_gen/build_of_g.py
+++ b/c_gen/build_of_g.py
@@ -172,10 +172,13 @@
 
     for version in loxi_globals.OFVersions.target_versions:
         wire_version = version.wire_version
-        version_name = of_g.of_version_wire2name[wire_version]
-        of_g.wire_ver_map[wire_version] = version_name
-        versions[version_name] = dict(
-            version_name = version_name,
+        long_constant = version.constant_version('OF_VERSION_')
+        of_g.wire_ver_map[wire_version] = long_constant
+        of_g.short_version_names[wire_version] = version.short_constant
+        of_g.of_version_range.append(wire_version)
+        of_g.of_version_wire2name[wire_version] = long_constant
+        versions[long_constant] = dict(
+            version_name = version.constant,
             wire_version = wire_version,
             classes = {})
         of_g.ordered_classes[wire_version] = []
diff --git a/c_gen/c_match.py b/c_gen/c_match.py
index ccc503d..27f77b9 100644
--- a/c_gen/c_match.py
+++ b/c_gen/c_match.py
@@ -595,7 +595,7 @@
     if (OF_VARIABLE_IS_NON_ZERO(&dst->masks.%(key)s)) { /* Matching something */
         of_match_v2_%(key)s_get(src, &dst->fields.%(key)s);
     }
-    of_memmask(&dst->fields.%(key)s, &dst->masks.%(key)s, sizeof(&dst->fields.%(key)s));
+    of_memmask(&dst->fields.%(key)s, &dst->masks.%(key)s, sizeof(dst->fields.%(key)s));
 """ % dict(ku=key.upper(), key=key))
         else:
             out.write("""
@@ -649,7 +649,7 @@
             of_oxm_%(key)s_masked_value_get(
                 &oxm_entry,
                 &dst->fields.%(key)s);
-            of_memmask(&dst->fields.%(key)s, &dst->masks.%(key)s, sizeof(&dst->fields.%(key)s));
+            of_memmask(&dst->fields.%(key)s, &dst->masks.%(key)s, sizeof(dst->fields.%(key)s));
             break;
         case OF_OXM_%(ku)s:
             OF_MATCH_MASK_%(ku)s_EXACT_SET(dst);
diff --git a/c_gen/of_g_legacy.py b/c_gen/of_g_legacy.py
index 4eed4da..7580771 100644
--- a/c_gen/of_g_legacy.py
+++ b/c_gen/of_g_legacy.py
@@ -331,11 +331,7 @@
 of_version_wire2name = {}
 
 for version in loxi_globals.OFVersions.all_supported:
-    v = version.version.replace('.', '_')
-    short_version_names[version.wire_version] = 'OF_' + v
-    of_version_range.append(version.wire_version)
-    of_version_wire2name[version.wire_version] = 'OF_VERSION_' + v
-    globals()['VERSION_' + v] = version.wire_version
+    globals()[version.constant] = version.wire_version
 
 
 ################################################################
diff --git a/c_gen/templates/locitest/test_utils.c b/c_gen/templates/locitest/test_utils.c
index d078a59..ba79304 100644
--- a/c_gen/templates/locitest/test_utils.c
+++ b/c_gen/templates/locitest/test_utils.c
@@ -158,6 +158,31 @@
     return TEST_PASS;
 }
 
+static int
+test_truncate(void)
+{
+    of_object_t *obj = of_port_desc_new(OF_VERSION_1_4);
+    of_object_t *dup = of_object_dup(obj);
+
+    of_object_t props;
+    of_object_t prop;
+    of_port_desc_properties_bind(obj, &props);
+    of_port_desc_prop_bsn_uplink_init(&prop, props.version, -1, 1);
+    if (of_list_port_desc_prop_append_bind(&props, &prop) < 0) {
+        assert(0);
+    }
+
+    of_object_truncate(obj);
+
+    TEST_ASSERT(obj->wbuf->current_bytes == dup->wbuf->current_bytes);
+    TEST_ASSERT(!memcmp(obj->wbuf->buf, dup->wbuf->buf, obj->wbuf->current_bytes));
+
+    of_object_delete(obj);
+    of_object_delete(dup);
+
+    return TEST_PASS;
+}
+
 int
 run_utility_tests(void)
 {
@@ -165,6 +190,7 @@
     RUN_TEST(of_object_new_from_message);
     RUN_TEST(of_object_new_from_message_preallocated);
     RUN_TEST(dump_objs);
+    RUN_TEST(truncate);
 
     return TEST_PASS;
 }
diff --git a/c_gen/templates/of_object.c b/c_gen/templates/of_object.c
index 3836728..48dc0a4 100644
--- a/c_gen/templates/of_object.c
+++ b/c_gen/templates/of_object.c
@@ -611,4 +611,9 @@
 {
     of_object_init_map[obj->object_id](obj, obj->version, -1, 0);
     obj->wbuf->current_bytes = obj->length;
+
+    of_wire_length_set_f wire_length_set = loci_class_metadata[obj->object_id].wire_length_set;
+    if (wire_length_set != NULL) {
+        wire_length_set(obj, obj->length);
+    }
 }
diff --git a/cmdline.py b/cmdline.py
index de7070a..888d7f0 100644
--- a/cmdline.py
+++ b/cmdline.py
@@ -33,7 +33,7 @@
 # The default configuration dictionary for LOXI code generation
 options_default = {
     "lang"               : "c",
-    "version-list"       : "1.0 1.1 1.2 1.3 1.4",
+    "version-list"       : "1.0 1.1 1.2 1.3 1.4 1.5",
     "install-dir"        : "loxi_output",
 }
 
diff --git a/docker.sh b/docker.sh
new file mode 100755
index 0000000..ccb2101
--- /dev/null
+++ b/docker.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+if [ -t 1 ]; then
+    tty_flag="-t"
+else
+    tty_flag=""
+fi
+dir=$(python -c 'import os; import sys; print os.path.abspath(sys.argv[1])' $(dirname "$0"))
+docker run -i $tty_flag --rm -v $dir:/loxi floodlight/loxi-builder-ubuntu14 "$@"
diff --git a/docker/Dockerfile b/docker/Dockerfile
new file mode 100644
index 0000000..78bb5d5
--- /dev/null
+++ b/docker/Dockerfile
@@ -0,0 +1,8 @@
+FROM ubuntu:14.04
+
+RUN apt-get update \
+  && apt-get upgrade -y --no-install-recommends build-essential python python-nose rsync openjdk-7-jdk maven
+
+RUN useradd -m -d /loxi -c 'loxi build user' -u 300 -s /bin/bash loxi
+COPY run-as-loxi /
+ENTRYPOINT [ "/run-as-loxi" ]
diff --git a/docker/run-as-loxi b/docker/run-as-loxi
new file mode 100755
index 0000000..31e9a38
--- /dev/null
+++ b/docker/run-as-loxi
@@ -0,0 +1,13 @@
+#!/bin/bash -e
+
+loxi_uid=$(stat -c'%u' /loxi/loxigen.py)
+loxi_gid=$(stat -c'%g' /loxi/loxigen.py)
+usermod -u $loxi_uid -g $loxi_gid loxi || echo "ok"
+
+cd /loxi
+if [[ "$*" ]]; then
+    sudo -u loxi -i /bin/bash -c "$*"
+else
+    sudo -u loxi -i /bin/bash
+fi
+
diff --git a/java_gen/java_model.py b/java_gen/java_model.py
index c8f70e6..6aac39c 100644
--- a/java_gen/java_model.py
+++ b/java_gen/java_model.py
@@ -74,6 +74,7 @@
     write_blacklist = defaultdict(
         lambda: set(),
         OFOxm=set(('typeLen',)),
+        OFOxs=set(('typeLen',)),
         OFAction=set(('type',)),
         OFInstruction=set(('type',)),
         OFFlowMod=set(('command', )),
@@ -81,7 +82,7 @@
         OFActionExperimenter=set(('data',)),
         OFBsnTlv=set(('type',)))
     # interfaces that are virtual
-    virtual_interfaces = set(['OFOxm', 'OFInstruction', 'OFFlowMod', 'OFBsnVport' ])
+    virtual_interfaces = set(['OFOxm', 'OFInstruction', 'OFFlowMod', 'OFBsnVport', 'OFOxs' ])
 
     # Registry of nullable properties:
     # ${java_class_name} -> set(${java_property_name})
@@ -223,13 +224,13 @@
 
         factories = OrderedDict()
 
-        sub_factory_classes = ("OFAction", "OFInstruction", "OFMeterBand", "OFOxm", "OFQueueProp", "OFErrorMsg", "OFActionId", "OFInstructionId", "OFBsnTlv")
+        sub_factory_classes = ("OFAction", "OFInstruction", "OFMeterBand", "OFOxm", "OFQueueProp", "OFErrorMsg", "OFActionId", "OFInstructionId", "OFBsnTlv", "OFOxs")
         for base_class in sub_factory_classes:
             package = base_class[2:].lower()
             remove_prefix = base_class[2].lower() + base_class[3:]
 
             # HACK need to have a better way to deal with parameterized base classes
-            annotated_base_class = base_class + "<?>" if base_class == "OFOxm" else base_class
+            annotated_base_class = base_class + "<?>" if base_class == "OFOxm" or base_class == "OFOxs" else base_class
 
             factories[base_class] = OFFactory(package="%s.%s" % (prefix, package),
                     name=base_class + "s", members=[], remove_prefix=remove_prefix, base_class=annotated_base_class, sub_factories={}, xid_generator= (base_class == "OFErrorMsg"))
@@ -268,6 +269,8 @@
         """
         if clazz.interface.name.startswith("OFMatchV"):
             return True
+        if clazz.interface.name.startswith("OFStatV"):
+            return True
         elif clazz.name == "OFTableModVer10":
             # tablemod ver 10 is a hack and has no oftype defined
             return False
@@ -279,6 +282,8 @@
             return True
         if loxi_utils.class_is_instruction(clazz.interface.c_name):
             return True
+        if loxi_utils.class_is_oxs(clazz.interface.c_name):
+            return True
         else:
             return True
 
@@ -291,6 +296,15 @@
                                        masked=oxm.ir_class.name.endswith("_masked")))
                   for oxm in self.interfaces if oxm.ir_class.is_subclassof("of_oxm") )
 
+    @property
+    @memoize
+    def oxs_map(self):
+        OxsMapEntry = namedtuple("OxsMapEntry", ["type_name", "value", "masked" ])
+        return OrderedDict( (oxs.name, OxsMapEntry(type_name=oxs.member_by_name("value").java_type.public_type,
+                                       value=re.sub(r'^of_oxs_', r'', re.sub(r'_masked$', r'', oxs.ir_class.name)).upper(),
+                                       masked=oxs.ir_class.name.endswith("_masked")))
+                  for oxs in self.interfaces if oxs.ir_class.is_subclassof("of_oxs") )
+
 class OFFactory(namedtuple("OFFactory", ("package", "name", "members", "remove_prefix", "base_class", "sub_factories", "xid_generator"))):
     @property
     def factory_classes(self):
@@ -467,6 +481,8 @@
                 return "instructionid"
             elif i.is_instanceof("of_oxm"):
                 return "oxm"
+            elif i.is_instanceof("of_oxs"):
+                return "oxs"
             elif i.is_instanceof("of_meter_band"):
                 return "meterband"
             elif i.is_instanceof("of_queue_prop"):
@@ -479,6 +495,8 @@
         def calc_super_name(i):
             if re.match('of_match_.*', i.name):
                 return "Match"
+            elif re.match('of_stat_.*', i.name):
+                return "Stat"
             else:
                 ir_super_class = self.ir_class.superclass
                 return java_class_name(ir_super_class.name) if ir_super_class else ""
@@ -501,12 +519,20 @@
                     type_annotation)
         elif self.name == "OFOxm":
             return (package, None, "T extends OFValueType<T>")
+        elif self.name == "OFOxs":
+            return (package, None, "T extends OFValueType<T>")
         elif loxi_utils.class_is_oxm(self.c_name):
             # look up type from member value for OFValueType type annotation
             if self.member_by_name("value") is not None:
                 return (package, "OFOxm<%s>" % self.member_by_name("value").java_type.public_type, None)
             else:
                 return (package, "OFOxm", None)
+        elif loxi_utils.class_is_oxs(self.c_name):
+            # look up type from member value for OFValueType type annotation
+            if self.member_by_name("value") is not None:
+                return (package, "OFOxs<%s>" % self.member_by_name("value").java_type.public_type, None)
+            else:
+                return (package, "OFOxs", None)
         else:
             return (package, super_name, None)
 
@@ -571,6 +597,11 @@
                     JavaVirtualMember(self, "masked", java_type.boolean),
                     JavaVirtualMember(self, "canonical", java_type.make_oxm_jtype("T"))
                    ]
+        elif self.name == "OFOxs":
+            virtual_members += [
+                    JavaVirtualMember(self, "value", java_type.generic_t),
+                    JavaVirtualMember(self, "statField", java_type.make_stat_field_jtype("T")),
+                   ]
         elif self.ir_class.is_subclassof("of_oxm"):
             value = find(lambda m: m.name=="value", self.ir_model_members)
             if value:
@@ -587,6 +618,22 @@
             if not find(lambda x: x.name == "mask", self.ir_model_members):
                 virtual_members.append(
                         JavaVirtualMember(self, "mask", find(lambda x: x.name == "value", self.ir_model_members).java_type))
+        elif self.ir_class.is_subclassof("of_oxs"):
+            value = find(lambda m: m.name=="value", self.ir_model_members)
+            if value:
+                field_type = java_type.make_stat_field_jtype(value.java_type.public_type)
+            else:
+                field_type = java_type.make_stat_field_jtype()
+
+            virtual_members += [
+                    JavaVirtualMember(self, "statField", field_type),
+                    JavaVirtualMember(self, "masked", java_type.boolean),
+                    JavaVirtualMember(self, "canonical", java_type.make_oxs_jtype(value.java_type.public_type),
+                            custom_template=lambda builder: "OFOxs{}_getCanonical.java".format(".Builder" if builder else "")),
+                   ]
+            if not find(lambda x: x.name == "mask", self.ir_model_members):
+                virtual_members.append(
+                        JavaVirtualMember(self, "mask", find(lambda x: x.name == "value", self.ir_model_members).java_type))
         elif self.name =="OFErrorMsg":
             virtual_members += [ JavaVirtualMember(self, "data", java_type.error_cause_data) ]
 
@@ -720,6 +767,19 @@
                     JavaVirtualMember(self, "matchField", java_type.make_match_field_jtype(), "null"),
                     JavaVirtualMember(self, "masked", java_type.boolean, "false"),
                  ]
+        elif self.ir_class.is_subclassof("of_oxs"):
+            value_member = find(lambda m: m.name, self.ir_model_members)
+            if value_member:
+                oxs_entry = model.oxs_map[self.interface.name]
+                virtual_members += [
+                    JavaVirtualMember(self, "statField", java_type.make_stat_field_jtype(value_member.java_type.public_type), "StatField.%s" % oxs_entry.value),
+                    JavaVirtualMember(self, "masked", java_type.boolean, "true" if oxs_entry.masked else "false"),
+                    ]
+            else:
+                virtual_members += [
+                    JavaVirtualMember(self, "statField", java_type.make_stat_field_jtype(), "null"),
+                    JavaVirtualMember(self, "masked", java_type.boolean, "false"),
+                 ]
         if not find(lambda m: m.name == "version", self.ir_model_members):
             virtual_members.append(JavaVirtualMember(self, "version", java_type.of_version, "OFVersion.%s" % self.version.constant_version))
 
@@ -890,6 +950,16 @@
         else:
             return self.java_type.format_value(self.member.value, pub_type=False)
 
+    @property
+    def needs_setter(self):
+        if self.is_writeable:
+            return True
+        super_class = self.msg.super_class
+        if super_class:
+            super_member = super_class.member_by_name(self.name)
+            if super_member:
+                return super_member.needs_setter
+        return False
 
     @property
     def is_writeable(self):
@@ -1037,11 +1107,11 @@
     @property
     def name(self):
         return self.test_class_name
-    
+
     @property
     def interface(self):
         return self.java_class.interface
-    
+
     @property
     def has_test_data(self):
         return test_data.exists(self.data_file_name)
diff --git a/java_gen/java_type.py b/java_gen/java_type.py
index a50bfa9..d50094f 100644
--- a/java_gen/java_type.py
+++ b/java_gen/java_type.py
@@ -88,7 +88,7 @@
 class JType(object):
     """ Wrapper class to hold C to Java type conversion information. JTypes can have a 'public'
         and or 'private' java type associated with them and can define how those types can be
-        read from and written to ChannelBuffers.
+        read from and written to ByteBufs.
 
     """
     def __init__(self, pub_type, priv_type=None):
@@ -163,7 +163,7 @@
             return reduce(lambda a,repl: a.replace("$%s" % repl[0], str(repl[1])),  arguments.items(), _op)
 
     def read_op(self, version=None, length=None, pub_type=True):
-        """ return a Java stanza that reads a value of this JType from ChannelBuffer bb.
+        """ return a Java stanza that reads a value of this JType from ByteBuf bb.
         @param version int - OF wire version to generate expression for
         @param pub_type boolean use this JTypes 'public' (True), or private (False) representation
         @param length string, for operations that need it (e.g., read a list of unknown length)
@@ -184,7 +184,7 @@
 
     def write_op(self, version=None, name=None, pub_type=True):
         """ return a Java stanza that writes a value of this JType contained in Java expression
-        'name' to ChannelBuffer bb.
+        'name' to ByteBuf bb.
         @param name string containing Java expression that evaluations to the value to be written
         @param version int - OF wire version to generate expression for
         @param pub_type boolean use this JTypes 'public' (True), or private (False) representation
@@ -208,7 +208,7 @@
         )
 
     def skip_op(self, version=None, length=None):
-        """ return a java stanza that skips an instance of JType in the input ChannelBuffer 'bb'.
+        """ return a java stanza that skips an instance of JType in the input ByteBuf 'bb'.
             This is used in the Reader implementations for virtual classes (because after the
             discriminator field, the concrete Reader instance will re-read all the fields)
             Currently just delegates to read_op + throws away the result."""
@@ -259,7 +259,7 @@
 
 def gen_list_jtype(java_base_name):
     # read op assumes the class has a public final static field READER that implements
-    # OFMessageReader<$class> i.e., can deserialize an instance of class from a ChannelBuffer
+    # OFMessageReader<$class> i.e., can deserialize an instance of class from a ByteBuf
     # write op assumes class implements Writeable
     return JType("List<{}>".format(java_base_name)) \
         .op(
@@ -349,6 +349,11 @@
         .op(read='ChannelUtilsVer$version.readOFMatch(bb)', \
             write='$name.writeTo(bb)',
             default="OFFactoryVer$version.MATCH_WILDCARD_ALL");
+of_stat = JType('Stat') \
+         .op(read='ChannelUtilsVer$version.readOFStat(bb)', write='$name.writeTo(bb)')
+of_time = JType('OFTime') \
+         .op(read='OFTimeVer$version.READER.readFrom(bb)', \
+             write='$name.writeTo(bb)')
 group_mod_cmd = JType('OFGroupModCommand', 'short') \
         .op(version=ANY, read="bb.readShort()", write="bb.writeShort($name)")
 flow_mod_cmd = JType('OFFlowModCommand', 'short') \
@@ -358,6 +363,15 @@
         .op(read="MacAddress.read6Bytes(bb)", \
             write="$name.write6Bytes(bb)",
             default="MacAddress.NONE")
+vxlan_ni = JType('VxlanNI') \
+        .op(read="VxlanNI.read4Bytes(bb)", \
+            write="$name.write4Bytes(bb)",
+            default="VxlanNI.ZERO")
+
+vfi = JType('VFI') \
+        .op(read="VFI.read2Bytes(bb)", \
+            write="$name.write2Bytes(bb)",
+            default="VFI.ZERO")
 
 port_name = gen_fixed_length_string_jtype(16)
 app_code = gen_fixed_length_string_jtype(15)
@@ -432,6 +446,9 @@
         .op(read="IPv6FlowLabel.read4Bytes(bb)",
             write="$name.write4Bytes(bb)",
             default="IPv6FlowLabel.NONE")
+packet_type = JType("PacketType") \
+        .op(read="PacketType.read4Bytes(bb)",
+            write="$name.write4Bytes(bb)")
 metadata = JType("OFMetadata")\
         .op(read="OFMetadata.read8Bytes(bb)",
             write="$name.write8Bytes(bb)",
@@ -444,6 +461,17 @@
             read= 'OFOxmList.readFrom(bb, $length, OFOxmVer$version.READER)', \
             write='$name.writeTo(bb)',
             default="OFOxmList.EMPTY")
+connection_uri = JType("OFConnectionIndex") \
+        .op(read="OFConnectionIndex.read4Bytes(bb)",
+            write="$name.write4Bytes(bb)")
+#Fixed Ver15 (FIXME for 1.5 + versions)
+oxs = JType("OFOxs<?>")\
+        .op(read="OFOxsVer15.READER.readFrom(bb)",
+            write="$name.writeTo(bb)")
+oxs_list = JType("OFOxsList") \
+        .op(read= 'OFOxsList.readFrom(bb, $length, OFOxsVer15.READER)', \
+            write='$name.writeTo(bb)',
+            default="OFOxsList.EMPTY")
 meter_features = JType("OFMeterFeatures")\
         .op(read="OFMeterFeaturesVer$version.READER.readFrom(bb)",
             write="$name.writeTo(bb)")
@@ -485,6 +513,7 @@
             .op(read='bb.readByte()', write='bb.writeByte($name)')
 
 port_speed = JType("PortSpeed")
+
 error_type = JType("OFErrorType")
 of_message = JType("OFMessage")\
             .op(read="OFMessageVer$version.READER.readFrom(bb)",
@@ -564,6 +593,9 @@
         .op(read='OFTableDescVer$version.READER.readFrom(bb)', \
             write='$name.writeTo(bb)')
 
+controller_status_entry = JType('OFControllerStatusEntry') \
+        .op(read='OFControllerStatusEntryVer$version.READER.readFrom(bb)', \
+            write='$name.writeTo(bb)')
 
 default_mtype_to_jtype_convert_map = {
         'uint8_t' : u8,
@@ -581,10 +613,13 @@
         'list(of_uint16_t)' : u16_list,
         'list(of_uint8_t)' : u8_list,
         'list(of_oxm_t)' : oxm_list,
+        'list(of_oxs_t)' : oxs_list,
         'list(of_ipv4_t)' : ipv4_list,
         'list(of_ipv6_t)' : ipv6_list,
         'of_octets_t' : octets,
         'of_match_t': of_match,
+        'of_stat_t' : of_stat,
+        'of_controller_uri_t' : connection_uri,
         'of_fm_cmd_t': flow_mod_cmd,
         'of_mac_addr_t': mac_addr,
         'of_port_desc_t': port_desc,
@@ -600,6 +635,7 @@
         'of_ipv6_t': ipv6,
         'of_wc_bmap_t': flow_wildcards,
         'of_oxm_t': oxm,
+        'of_oxs_t': oxs,
         'of_meter_features_t': meter_features,
         'of_bitmap_128_t': port_bitmap_128,
         'of_bitmap_256_t': port_bitmap_256,
@@ -611,6 +647,9 @@
         'of_table_desc_t': table_desc,
         'of_odu_sig_id_t': odu_sig_id,
         'of_och_sig_id_t' : sig_id,
+        'of_controller_status_entry_t' : controller_status_entry,
+        'of_time_t' : of_time,
+        'of_header_t' : of_message,
         }
 
 ## Map that defines exceptions from the standard loxi->java mapping scheme
@@ -679,6 +718,21 @@
         'of_oxm_conntrack_label' : { 'value' : port_bitmap_128 },
         'of_oxm_conntrack_label_masked' : { 'value' : port_bitmap_128, 'value_mask' : port_bitmap_128 },
 
+        'of_oxm_tcp_flags' : { 'value' : u16obj },
+        'of_oxm_tcp_flags_masked' : { 'value' : u16obj, 'value_mask' : u16obj },
+        'of_oxm_ovs_tcp_flags' : { 'value' : u16obj },
+        'of_oxm_ovs_tcp_flags_masked' : { 'value' : u16obj, 'value_mask' : u16obj },
+        'of_oxm_actset_output' : { 'value' : of_port },
+        'of_oxm_actset_output_masked' : { 'value' : of_port, 'value_mask' : of_port },
+        'of_oxm_packet_type' : { 'value' : packet_type },
+        'of_oxm_packet_type_masked' : { 'value' : packet_type, 'value_mask' : packet_type },
+
+        'of_oxs_byte_count' : { 'value' : u64 },
+        'of_oxs_duration' : { 'value' : u64 },
+        'of_oxs_flow_count' : { 'value' : u32obj },
+        'of_oxs_idle_time' : { 'value' : u64 },
+        'of_oxs_packet_count' : { 'value' : u64 },
+
         'of_oxm_bsn_in_ports_128' : { 'value': port_bitmap_128 },
         'of_oxm_bsn_in_ports_128_masked' : { 'value': port_bitmap_128, 'value_mask': port_bitmap_128 },
 
@@ -745,8 +799,8 @@
         'of_oxm_bsn_l2_cache_hit' : { 'value' : boolean_value },
         'of_oxm_bsn_l2_cache_hit_masked' : { 'value' : boolean_value, 'value_mask' : boolean_value },
 
-        'of_oxm_bsn_vxlan_network_id' : { 'value' : u32obj },
-        'of_oxm_bsn_vxlan_network_id_masked' : { 'value' : u32obj, 'value_mask' : u32obj },
+        'of_oxm_bsn_vxlan_network_id' : { 'value' : vxlan_ni },
+        'of_oxm_bsn_vxlan_network_id_masked' : { 'value' : vxlan_ni, 'value_mask' : vxlan_ni},
 
         'of_oxm_bsn_inner_eth_dst' : { 'value' : mac_addr },
         'of_oxm_bsn_inner_eth_dst_masked' : { 'value' : mac_addr, 'value_mask' : mac_addr },
@@ -757,6 +811,12 @@
         'of_oxm_bsn_inner_vlan_vid' : { 'value' : vlan_vid_match },
         'of_oxm_bsn_inner_vlan_vid_masked' : { 'value' : vlan_vid_match, 'value_mask' : vlan_vid_match },
 
+        'of_oxm_bsn_vfi' : { 'value' : vfi },
+        'of_oxm_bsn_vfi_masked' : { 'value' : vfi, 'value_mask' : vfi },
+
+        'of_oxm_bsn_ip_fragmentation' : { 'value' : boolean_value },
+        'of_oxm_bsn_ip_fragmentation_masked' : { 'value' : boolean_value, 'value_mask' : boolean_value },
+
         'of_table_stats_entry': { 'wildcards': table_stats_wildcards },
         'of_match_v1': { 'vlan_vid' : vlan_vid_match, 'vlan_pcp': vlan_pcp,
                 'eth_type': eth_type, 'ip_dscp': ip_dscp, 'ip_proto': ip_proto,
@@ -787,6 +847,8 @@
         'of_group_add' : { 'command' : group_mod_cmd },
         'of_group_modify' : { 'command' : group_mod_cmd },
         'of_group_delete' : { 'command' : group_mod_cmd },
+        'of_group_insert_bucket': {'command' : group_mod_cmd },
+        'of_group_remove_bucket' : {'command' : group_mod_cmd },
 
         'of_bucket' : { 'watch_group': of_group },
 
@@ -881,7 +943,7 @@
         'of_oxm_tun_gpe_flags' : { 'value' : u8obj },
         'of_oxm_tun_gpe_flags_masked' : { 'value' : u8obj, 'value_mask' : u8obj },
 
-        'of_oxm_ofdpa_mpls_type': { 'value': u16obj },
+        'of_oxm_ofdpa_mpls_type' : { 'value': u16obj },
 
         'of_oxm_ofdpa_qos_index': { 'value': u8obj },
 
@@ -889,6 +951,8 @@
         'of_oxm_ofdpa_mpls_l2_port_masked': { 'value': u32obj, 'value_mask': u32obj },
 
         'of_oxm_ofdpa_ovid': { 'value': u16obj },
+
+        'of_flow_lightweight_stats_request' : { 'out_group' : of_group }
 }
 
 
@@ -903,9 +967,15 @@
 def make_match_field_jtype(sub_type_name="?"):
     return JType("MatchField<{}>".format(sub_type_name))
 
+def make_stat_field_jtype(sub_type_name="?"):
+    return JType("StatField<{}>".format(sub_type_name))
+
 def make_oxm_jtype(sub_type_name="?"):
     return JType("OFOxm<{}>".format(sub_type_name))
 
+def make_oxs_jtype(sub_type_name="?"):
+    return JType("OFOxs<{}>".format(sub_type_name))
+
 def list_cname_to_java_name(c_type):
     m = re.match(r'list\(of_([a-zA-Z_]+)_t\)', c_type)
     if not m:
diff --git a/java_gen/pre-written/pom.xml b/java_gen/pre-written/pom.xml
index cc6da6b..a047f1d 100644
--- a/java_gen/pre-written/pom.xml
+++ b/java_gen/pre-written/pom.xml
@@ -10,11 +10,11 @@
 
     <groupId>org.onosproject</groupId>
     <artifactId>openflowj</artifactId>
-    <version>0.9.9.onos-SNAPSHOT</version>
+    <version>3.2.0.onos-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>OpenFlowJ-Loxi</name>
-    <description>OpenFlowJ API supporting OpenFlow versions 1.0 through 1.3.1, generated by LoxiGen</description>
+    <description>OpenFlowJ API supporting OpenFlow versions 1.0 through 1.5.1, generated by LoxiGen</description>
     <url>http://www.projectfloodlight.org/projects/</url>
     <licenses>
         <license>
@@ -45,8 +45,7 @@
         <dependency>
             <groupId>com.google.code.findbugs</groupId>
             <artifactId>annotations</artifactId>
-            <version>3.0.0</version>
-            <scope>provided</scope>
+            <version>3.0.1u2</version>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
@@ -62,18 +61,28 @@
         </dependency>
         <dependency>
             <groupId>io.netty</groupId>
-            <artifactId>netty</artifactId>
-            <version>3.10.5.Final</version>
+            <artifactId>netty-all</artifactId>
+            <version>4.0.31.Final</version>
         </dependency>
         <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
-            <version>19.0</version>
+            <version>20.0</version>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
-            <version>1.7.13</version>
+            <version>1.7.22</version>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+            <version>1.1.10</version>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>1.1.10</version>
         </dependency>
     </dependencies>
     <build>
@@ -135,6 +144,9 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
                 <version>2.9.1</version>
+                <configuration>
+                        <maxmemory>1024m</maxmemory>
+                </configuration>
                 <executions>
                     <execution>
                         <id>attach-javadocs</id>
@@ -243,6 +255,18 @@
                 <artifactId>maven-bundle-plugin</artifactId>
                 <version>3.0.1</version>
                 <extensions>true</extensions>
+                <configuration>
+                    <niceManifest>true</niceManifest>
+                    <instructions>
+                      <!-- Compile-time dependency can be optional-->
+                      <!-- Any Guava version 20.0 or later-->
+                      <Import-Package>
+                          javax.annotation;resolution:=optional,
+                          com.google.*;version=20.0,
+                          *
+                      </Import-Package>
+                    </instructions>
+                </configuration>
             </plugin>
         </plugins>
         <resources>
@@ -277,6 +301,9 @@
                   <groupId>org.apache.maven.plugins</groupId>
                   <artifactId>maven-javadoc-plugin</artifactId>
                   <version>2.9.1</version>
+                <configuration>
+                        <maxmemory>1024m</maxmemory>
+                </configuration>
                   <executions>
                       <execution>
                           <id>attach-javadocs</id>
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMessageReader.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMessageReader.java
index 8837867..ca28daf 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMessageReader.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMessageReader.java
@@ -1,8 +1,8 @@
 package org.projectfloodlight.openflow.protocol;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 public interface OFMessageReader<T> {
-    T readFrom(ChannelBuffer bb) throws OFParseError;
+    T readFrom(ByteBuf bb) throws OFParseError;
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMessageWriter.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMessageWriter.java
index bec5634..5890ce3 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMessageWriter.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFMessageWriter.java
@@ -1,8 +1,8 @@
 package org.projectfloodlight.openflow.protocol;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 public interface OFMessageWriter<T> {
-    public void write(ChannelBuffer bb, T message) throws OFParseError;
+    public void write(ByteBuf bb, T message) throws OFParseError;
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFObjectFactory.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFObjectFactory.java
index c5869ef..a829b22 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFObjectFactory.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFObjectFactory.java
@@ -1,7 +1,7 @@
 package org.projectfloodlight.openflow.protocol;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 public interface OFObjectFactory<T extends OFObject> {
-    T read(ChannelBuffer buffer);
+    T read(ByteBuf buffer);
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFOxmList.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFOxmList.java
index 7f66110..5b13da8 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFOxmList.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFOxmList.java
@@ -4,7 +4,7 @@
 import java.util.Iterator;
 import java.util.Map;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.protocol.match.MatchField;
 import org.projectfloodlight.openflow.protocol.match.MatchFields;
@@ -97,13 +97,13 @@
         return new OFOxmList(map);
     }
 
-    public static OFOxmList readFrom(ChannelBuffer bb, int length,
+    public static OFOxmList readFrom(ByteBuf bb, int length,
             OFMessageReader<OFOxm<?>> reader) throws OFParseError {
         return ofList(ChannelUtils.readList(bb, length, reader));
     }
 
     @Override
-    public void writeTo(ChannelBuffer bb) {
+    public void writeTo(ByteBuf bb) {
         for (OFOxm<?> o : this) {
             o.writeTo(bb);
         }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFOxsList.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFOxsList.java
new file mode 100644
index 0000000..1111088
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFOxsList.java
@@ -0,0 +1,140 @@
+package org.projectfloodlight.openflow.protocol;
+
+import java.util.EnumMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.oxs.OFOxs;
+import org.projectfloodlight.openflow.protocol.stat.StatField;
+import org.projectfloodlight.openflow.protocol.stat.StatFields;
+import org.projectfloodlight.openflow.types.OFValueType;
+import org.projectfloodlight.openflow.types.PrimitiveSinkable;
+import org.projectfloodlight.openflow.util.ChannelUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.common.hash.PrimitiveSink;
+
+import io.netty.buffer.ByteBuf;
+
+
+public class OFOxsList implements Iterable<OFOxs<?>>, Writeable, PrimitiveSinkable {
+    private static final Logger logger = LoggerFactory.getLogger(OFOxsList.class);
+
+    private final Map<StatFields, OFOxs<?>> oxsMap;
+
+    public final static OFOxsList EMPTY = new OFOxsList(ImmutableMap.<StatFields, OFOxs<?>>of());
+
+    private OFOxsList(Map<StatFields, OFOxs<?>> oxsMap) {
+        this.oxsMap = oxsMap;
+    }
+
+    @SuppressWarnings("unchecked")
+    public <T extends OFValueType<T>> OFOxs<T> get(StatField<T> statField) {
+        return (OFOxs<T>) oxsMap.get(statField.id);
+    }
+
+    public static class Builder {
+        private final Map<StatFields, OFOxs<?>> oxsMap;
+
+        public Builder() {
+            oxsMap = new EnumMap<StatFields, OFOxs<?>>(StatFields.class);
+        }
+
+        public Builder(EnumMap<StatFields, OFOxs<?>> oxsMap) {
+            this.oxsMap = oxsMap;
+        }
+
+        public <T extends OFValueType<T>> void set(OFOxs<T> oxs) {
+            oxsMap.put(oxs.getStatField().id, oxs);
+        }
+
+        public <T extends OFValueType<T>> void unset(StatField<T> statField) {
+            oxsMap.remove(statField.id);
+        }
+
+        public OFOxsList build() {
+            return OFOxsList.ofList(oxsMap.values());
+        }
+    }
+
+    @Override
+    public Iterator<OFOxs<?>> iterator() {
+        return oxsMap.values().iterator();
+    }
+
+    public static OFOxsList ofList(Iterable<OFOxs<?>> oxsList) {
+        Map<StatFields, OFOxs<?>> map = new EnumMap<StatFields, OFOxs<?>>(
+                StatFields.class);
+        for (OFOxs<?> o : oxsList) {
+            map.put(o.getStatField().id, o);
+        }
+        return new OFOxsList(map);
+    }
+
+    public static OFOxsList of(OFOxs<?>... oxss) {
+        Map<StatFields, OFOxs<?>> map = new EnumMap<StatFields, OFOxs<?>>(
+                StatFields.class);
+        for (OFOxs<?> o : oxss) {
+            map.put(o.getStatField().id, o);
+        }
+        return new OFOxsList(map);
+    }
+
+    public static OFOxsList readFrom(ByteBuf bb, int length,
+            OFMessageReader<OFOxs<?>> reader) throws OFParseError {
+        return ofList(ChannelUtils.readList(bb, length, reader));
+    }
+
+    @Override
+    public void writeTo(ByteBuf bb) {
+        for (OFOxs<?> o : this) {
+            o.writeTo(bb);
+        }
+    }
+
+    public OFOxsList.Builder createBuilder() {
+        return new OFOxsList.Builder(new EnumMap<StatFields, OFOxs<?>>(oxsMap));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((oxsMap == null) ? 0 : oxsMap.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        OFOxsList other = (OFOxsList) obj;
+        if (oxsMap == null) {
+            if (other.oxsMap != null)
+                return false;
+        } else if (!oxsMap.equals(other.oxsMap))
+            return false;
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        return "OFOxsList" + oxsMap;
+    }
+
+    @Override
+    public void putTo(PrimitiveSink sink) {
+        for (OFOxs<?> o : this) {
+            o.putTo(sink);
+        }
+    }
+
+
+}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFVersion.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFVersion.java
index 0c54fdc..ccb7f68 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFVersion.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/OFVersion.java
@@ -1,7 +1,7 @@
 package org.projectfloodlight.openflow.protocol;
 
 public enum OFVersion {
-    OF_10(1), OF_11(2), OF_12(3), OF_13(4), OF_14(5);
+    OF_10(1), OF_11(2), OF_12(3), OF_13(4), OF_14(5), OF_15(6);
 
     public final int wireVersion;
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/Writeable.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/Writeable.java
index 31ae9ab..32aaf2b 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/Writeable.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/Writeable.java
@@ -1,7 +1,7 @@
 package org.projectfloodlight.openflow.protocol;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 public interface Writeable {
-    void writeTo(ChannelBuffer bb);
+    void writeTo(ByteBuf bb);
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Match.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Match.java
index 67513b9..fdd1ca7 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Match.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Match.java
@@ -56,6 +56,7 @@
      * </ul>
      * If one of the above conditions does not hold, returns null. Value is returned masked if partially wildcarded.
      *
+     * @param <F> MatchField type
      * @param field Match field to retrieve
      * @return Value of match field (may be masked), or <code>null</code> if field is one of the conditions above does not hold.
      * @throws UnsupportedOperationException If field is not supported.
@@ -67,6 +68,7 @@
      * Prerequisite: field is partially masked.
      * If prerequisite is not met, a <code>null</code> is returned.
      *
+     * @param <F> MatchField type
      * @param field Match field to retrieve.
      * @return Masked value of match field or null if no mask is set.
      * @throws UnsupportedOperationException If field is not supported.
@@ -128,7 +130,7 @@
      * match. This includes the match fields that are exact or masked match
      * (but not fully wildcarded).
      *
-     * @return
+     * @return the Iterable of MatchField
      */
     public Iterable<MatchField<?>> getMatchFields();
 
@@ -169,6 +171,7 @@
         /**
          * Sets a specific exact value for a field.
          *
+         * @param <F> MatchField and value type
          * @param field Match field to set.
          * @param value Value of match field.
          * @return the Builder instance used.
@@ -179,6 +182,7 @@
         /**
          * Sets a masked value for a field.
          *
+         * @param <F> MatchField, value, and mask type
          * @param field Match field to set.
          * @param value Value of field.
          * @param mask Mask value.
@@ -190,6 +194,7 @@
         /**
          * Sets a masked value for a field.
          *
+         * @param <F> MatchField and value with mask type
          * @param field Match field to set.
          * @param valueWithMask Compound Masked object contains the value and the mask.
          * @return the Builder instance used.
@@ -200,6 +205,7 @@
         /**
          * Unsets any value given for the field and wildcards it so that it matches any value.
          *
+         * @param <F> MatchField type
          * @param field Match field to unset.
          * @return the Builder instance used.
          * @throws UnsupportedOperationException If field is not supported.
@@ -213,4 +219,4 @@
          */
         public Match build();
     }
-}
\ No newline at end of file
+}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
index 48f38d7..33a6736 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
@@ -21,6 +21,7 @@
 import org.projectfloodlight.openflow.types.OFValueType;
 import org.projectfloodlight.openflow.types.OFVlanVidMatch;
 import org.projectfloodlight.openflow.types.TransportPort;
+import org.projectfloodlight.openflow.types.PacketType;
 import org.projectfloodlight.openflow.types.U16;
 import org.projectfloodlight.openflow.types.U32;
 import org.projectfloodlight.openflow.types.U64;
@@ -30,16 +31,22 @@
 import org.projectfloodlight.openflow.types.VlanPcp;
 import org.projectfloodlight.openflow.types.CircuitSignalID;
 import org.projectfloodlight.openflow.types.OduSignalID;
+import org.projectfloodlight.openflow.types.VxlanNI;
+import org.projectfloodlight.openflow.types.VFI;
+
+import java.util.Set;
+import com.google.common.collect.ImmutableSet;
 
 public class MatchField<F extends OFValueType<F>> {
     private final String name;
     public final MatchFields id;
-    private final Prerequisite<?>[] prerequisites;
+    private final Set<Prerequisite<?>> prerequisites;
 
     private MatchField(final String name, final MatchFields id, Prerequisite<?>... prerequisites) {
         this.name = name;
         this.id = id;
-        this.prerequisites = prerequisites;
+        /* guaranteed non-null (private constructor); 'null' isn't passed as prerequisites */
+        this.prerequisites = ImmutableSet.copyOf(prerequisites);
     }
 
     public final static MatchField<OFPort> IN_PORT =
@@ -197,10 +204,26 @@
             new MatchField<U64>("tunnel_id", MatchFields.TUNNEL_ID);
 
     public final static MatchField<U16> IPV6_EXTHDR =
-            new MatchField<U16>("ipv6_exthdr", MatchFields.IPV6_EXTHDR);
+            new MatchField<U16>("ipv6_exthdr", MatchFields.IPV6_EXTHDR,
+                    new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.IPv6));
 
     public final static MatchField<OFBooleanValue> PBB_UCA =
-            new MatchField<OFBooleanValue>("pbb_uca", MatchFields.PBB_UCA);
+            new MatchField<OFBooleanValue>("pbb_uca", MatchFields.PBB_UCA,
+                    new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.PBB));
+
+    public final static MatchField<U16> TCP_FLAGS =
+            new MatchField<U16>("tcp_flags", MatchFields.TCP_FLAGS,
+                    new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.TCP));
+
+    public final static MatchField<U16> OVS_TCP_FLAGS =
+            new MatchField<U16>("ovs_tcp_flags", MatchFields.OVS_TCP_FLAGS,
+                    new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.TCP));
+
+    public final static MatchField<PacketType> PACKET_TYPE =
+            new MatchField<PacketType>("packet_type", MatchFields.PACKET_TYPE);
+
+    public final static MatchField<OFPort> ACTSET_OUTPUT =
+            new MatchField<OFPort>("actset_output", MatchFields.ACTSET_OUTPUT);
 
     public final static MatchField<IPv4Address> TUNNEL_IPV4_SRC =
             new MatchField<IPv4Address>("tunnel_ipv4_src", MatchFields.TUNNEL_IPV4_SRC,
@@ -297,8 +320,8 @@
     public final static MatchField<OFBooleanValue> BSN_L2_CACHE_HIT =
             new MatchField<OFBooleanValue>("bsn_l2_cache_hit", MatchFields.BSN_L2_CACHE_HIT);
 
-    public final static MatchField<U32> BSN_VXLAN_NETWORK_ID =
-            new MatchField<U32>("bsn_vxlan_network_id", MatchFields.BSN_VXLAN_NETWORK_ID);
+    public final static MatchField<VxlanNI> BSN_VXLAN_NETWORK_ID =
+            new MatchField<VxlanNI>("bsn_vxlan_network_id", MatchFields.BSN_VXLAN_NETWORK_ID);
 
     public final static MatchField<MacAddress> BSN_INNER_ETH_DST =
             new MatchField<MacAddress>("bsn_inner_eth_dst", MatchFields.BSN_INNER_ETH_DST);
@@ -406,6 +429,13 @@
             new MatchField<U16>("ofdpa_ovid", MatchFields.OFDPA_OVID,
                 new Prerequisite<OFVlanVidMatch>(MatchField.VLAN_VID));
 
+    public final static MatchField<VFI> BSN_VFI =
+            new MatchField<VFI>("bsn_vfi", MatchFields.BSN_VFI);
+
+    public final static MatchField<OFBooleanValue> BSN_IP_FRAGMENTATION =
+            new MatchField<OFBooleanValue>("bsn_ip_fragmentation", MatchFields.BSN_IP_FRAGMENTATION,
+                    new Prerequisite<EthType>(MatchField.ETH_TYPE, EthType.IPv4, EthType.IPv6));
+
     public String getName() {
         return name;
     }
@@ -419,4 +449,15 @@
         return true;
     }
 
+    /**
+     * Retrieve what also must be matched in order to
+     * use this particular MatchField.
+     *
+     * @return unmodifiable view of the prerequisites
+     */
+    public Set<Prerequisite<?>> getPrerequisites() {
+        /* assumes non-null; guaranteed by constructor */
+        return this.prerequisites;
+    }
+
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
index 9274153..3f86466 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
@@ -2,6 +2,8 @@
 
 // MUST BE ORDERED BY THE ORDER OF OF SPEC!!!
 public enum MatchFields {
+    // if present, PacketType must appear as the first OXM in the list (OF 1.5., 7.2.3.11)
+    PACKET_TYPE,
     IN_PORT,
     IN_PHY_PORT,
     METADATA,
@@ -46,6 +48,9 @@
     CONNTRACK_LABEL,
     IPV6_EXTHDR,
     PBB_UCA,
+    TCP_FLAGS,
+    OVS_TCP_FLAGS,
+    ACTSET_OUTPUT,
     TUNNEL_IPV4_SRC,
     TUNNEL_IPV4_DST,
     BSN_IN_PORTS_128,
@@ -73,6 +78,7 @@
     BSN_INNER_ETH_DST,
     BSN_INNER_ETH_SRC,
     BSN_INNER_VLAN_VID,
+    BSN_VFI,
     OCH_SIGTYPE,
     OCH_SIGTYPE_BASIC,
     OCH_SIGID,
@@ -111,4 +117,5 @@
     OFDPA_MPLS_TYPE,
     OFDPA_MPLS_L2_PORT,
     OFDPA_OVID,
+    BSN_IP_FRAGMENTATION
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Prerequisite.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Prerequisite.java
index 03d5e79..dec9d21 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Prerequisite.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/Prerequisite.java
@@ -1,7 +1,7 @@
 package org.projectfloodlight.openflow.protocol.match;
 
-import java.util.HashSet;
 import java.util.Set;
+import com.google.common.collect.ImmutableSet;
 
 import org.projectfloodlight.openflow.types.OFValueType;
 
@@ -12,15 +12,14 @@
 
     @SafeVarargs
     public Prerequisite(MatchField<T> field, OFValueType<T>... values) {
-        this.values = new HashSet<OFValueType<T>>();
         this.field = field;
+        /* possible null values, since public constructor */
         if (values == null || values.length == 0) {
             this.any = true;
+            this.values = ImmutableSet.of();
         } else {
             this.any = false;
-            for (OFValueType<T> value : values) {
-                this.values.add(value);
-            }
+            this.values = ImmutableSet.copyOf(values);
         }
     }
 
@@ -42,4 +41,22 @@
         return false;
     }
 
+    /**
+     * Get valid/possible values for this prerequisite match.
+     *
+     * @return unmodifiable set of possible values
+     */
+    public Set<OFValueType<T>> getValues() {
+        return this.values;   
+    }
+
+    /**
+     * Get the MatchField of this prerequisite.
+     *
+     * @return the MatchField that is required
+     */
+    public MatchField<T> getMatchField() {
+        return this.field; /* immutable */
+    }
+
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/stat/Stat.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/stat/Stat.java
new file mode 100644
index 0000000..618592a
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/stat/Stat.java
@@ -0,0 +1,28 @@
+package org.projectfloodlight.openflow.protocol.stat;
+
+import org.projectfloodlight.openflow.protocol.OFObject;
+import org.projectfloodlight.openflow.types.OFValueType;
+
+public interface Stat extends OFObject {
+    public <F extends OFValueType<F>> F get(StatField<F> field) throws UnsupportedOperationException;
+    public boolean supports(StatField<?> field);
+    public Iterable<StatField<?>> getStatFields();
+    public Builder createBuilder();
+
+    interface Builder {
+        public <F extends OFValueType<F>> F get(StatField<F> field) throws UnsupportedOperationException;
+        /**
+         * Sets a specific value for a stat field.
+         *
+         * @param <F> StatField type
+         * @param field Stat field to set.
+         * @param value Value of stat field.
+         * @return the Builder instance used.
+         * @throws UnsupportedOperationException If field is not supported.
+         */
+        public <F extends OFValueType<F>> Builder set(StatField<F> field, F value) throws UnsupportedOperationException;
+
+        public boolean supports(StatField<?> field);
+        public Stat build();
+    }
+}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/stat/StatField.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/stat/StatField.java
new file mode 100644
index 0000000..b2bb911
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/stat/StatField.java
@@ -0,0 +1,36 @@
+package org.projectfloodlight.openflow.protocol.stat;
+
+import org.projectfloodlight.openflow.types.OFValueType;
+import org.projectfloodlight.openflow.types.U32;
+import org.projectfloodlight.openflow.types.U64;
+
+public class StatField<F extends OFValueType<F>> {
+
+    private final String name;
+    public final StatFields id;
+
+    private StatField(final String name, final StatFields id) {
+        this.name = name;
+        this.id = id;
+    }
+
+    public final static StatField<U64> DURATION =
+            new StatField<U64>("of_duration", StatFields.DURATION);
+
+    public final static StatField<U64> IDLE_TIME =
+            new StatField<U64>("of_idle_time", StatFields.IDLE_TIME);
+
+    public final static StatField<U32> FLOW_COUNT =
+            new StatField<U32>("of_flow_count", StatFields.FLOW_COUNT);
+
+    public final static StatField<U64> PACKET_COUNT =
+            new StatField<U64>("of_packet_count", StatFields.PACKET_COUNT);
+
+    public final static StatField<U64> BYTE_COUNT =
+            new StatField<U64>("of_byte_count", StatFields.BYTE_COUNT);
+
+    public String getName() {
+        return name;
+    }
+
+}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/stat/StatFields.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/stat/StatFields.java
new file mode 100644
index 0000000..374a92b
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/stat/StatFields.java
@@ -0,0 +1,10 @@
+package org.projectfloodlight.openflow.protocol.stat;
+
+//MUST BE ORDERED BY THE ORDER OF OF SPEC!!!
+public enum StatFields {
+    DURATION,
+    IDLE_TIME,
+    FLOW_COUNT,
+    PACKET_COUNT,
+    BYTE_COUNT,
+}
\ No newline at end of file
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver10/ChannelUtilsVer10.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver10/ChannelUtilsVer10.java
index b4937ba..74f75ba 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver10/ChannelUtilsVer10.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver10/ChannelUtilsVer10.java
@@ -3,25 +3,26 @@
 import java.util.EnumSet;
 import java.util.Set;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.protocol.OFActionType;
 import org.projectfloodlight.openflow.protocol.match.Match;
+import org.projectfloodlight.openflow.protocol.stat.Stat;
 
 import com.google.common.hash.PrimitiveSink;
 
 /**
- * Collection of helper functions for reading and writing into ChannelBuffers
+ * Collection of helper functions for reading and writing into Unpooled
  *
  * @author capveg
  */
 
 public class ChannelUtilsVer10 {
-    public static Match readOFMatch(final ChannelBuffer bb) throws OFParseError {
+    public static Match readOFMatch(final ByteBuf bb) throws OFParseError {
         return OFMatchV1Ver10.READER.readFrom(bb);
     }
 
-    public static Set<OFActionType> readSupportedActions(ChannelBuffer bb) {
+    public static Set<OFActionType> readSupportedActions(ByteBuf bb) {
         int actions = bb.readInt();
         EnumSet<OFActionType> supportedActions = EnumSet.noneOf(OFActionType.class);
         if ((actions & (1 << OFActionTypeSerializerVer10.OUTPUT_VAL)) != 0)
@@ -84,8 +85,12 @@
         sink.putInt(supportedActionsToWire(supportedActions));
     }
 
-    public static void writeSupportedActions(ChannelBuffer bb, Set<OFActionType> supportedActions) {
+    public static void writeSupportedActions(ByteBuf bb, Set<OFActionType> supportedActions) {
         bb.writeInt(supportedActionsToWire(supportedActions));
     }
 
+    public static Stat readOFStat(final ByteBuf bb) throws OFParseError {
+        throw new UnsupportedOperationException("not supported");
+    }
+
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver11/ChannelUtilsVer11.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver11/ChannelUtilsVer11.java
index b090e47..b09da37 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver11/ChannelUtilsVer11.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver11/ChannelUtilsVer11.java
@@ -1,26 +1,31 @@
 package org.projectfloodlight.openflow.protocol.ver11;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.protocol.OFMatchBmap;
 import org.projectfloodlight.openflow.protocol.match.Match;
+import org.projectfloodlight.openflow.protocol.stat.Stat;
 
 /**
- * Collection of helper functions for reading and writing into ChannelBuffers
+ * Collection of helper functions for reading and writing into Unpooled
  *
  * @author capveg
  */
 
 public class ChannelUtilsVer11 {
-    public static Match readOFMatch(final ChannelBuffer bb) throws OFParseError {
+    public static Match readOFMatch(final ByteBuf bb) throws OFParseError {
         return OFMatchV2Ver11.READER.readFrom(bb);
     }
 
-    public static OFMatchBmap readOFMatchBmap(ChannelBuffer bb) {
+    public static OFMatchBmap readOFMatchBmap(ByteBuf bb) {
         throw new UnsupportedOperationException("not implemented");
     }
 
-    public static void writeOFMatchBmap(ChannelBuffer bb, OFMatchBmap match) {
+    public static void writeOFMatchBmap(ByteBuf bb, OFMatchBmap match) {
         throw new UnsupportedOperationException("not implemented");
     }
+
+    public static Stat readOFStat(final ByteBuf bb) throws OFParseError {
+        throw new UnsupportedOperationException("not supported");
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver12/ChannelUtilsVer12.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver12/ChannelUtilsVer12.java
index 756363d..5b28170 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver12/ChannelUtilsVer12.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver12/ChannelUtilsVer12.java
@@ -1,40 +1,45 @@
 package org.projectfloodlight.openflow.protocol.ver12;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.protocol.OFMatchBmap;
 import org.projectfloodlight.openflow.protocol.match.Match;
 import org.projectfloodlight.openflow.protocol.ver12.OFMatchV3Ver12;
 import org.projectfloodlight.openflow.protocol.OFBsnVportQInQ;
+import org.projectfloodlight.openflow.protocol.stat.Stat;
 
 /**
- * Collection of helper functions for reading and writing into ChannelBuffers
+ * Collection of helper functions for reading and writing into Unpooled
  *
  * @author capveg
  */
 
 public class ChannelUtilsVer12 {
-    public static Match readOFMatch(final ChannelBuffer bb) throws OFParseError {
+    public static Match readOFMatch(final ByteBuf bb) throws OFParseError {
         return OFMatchV3Ver12.READER.readFrom(bb);
     }
 
     // TODO these need to be figured out / removed
 
-    public static OFBsnVportQInQ readOFBsnVportQInQ(ChannelBuffer bb) {
+    public static OFBsnVportQInQ readOFBsnVportQInQ(ByteBuf bb) {
         throw new UnsupportedOperationException("not implemented");
     }
 
-    public static void writeOFBsnVportQInQ(ChannelBuffer bb,
+    public static void writeOFBsnVportQInQ(ByteBuf bb,
             OFBsnVportQInQ vport) {
         throw new UnsupportedOperationException("not implemented");
 
     }
 
-    public static OFMatchBmap readOFMatchBmap(ChannelBuffer bb) {
+    public static OFMatchBmap readOFMatchBmap(ByteBuf bb) {
         throw new UnsupportedOperationException("not implemented");
     }
 
-    public static void writeOFMatchBmap(ChannelBuffer bb, OFMatchBmap match) {
+    public static void writeOFMatchBmap(ByteBuf bb, OFMatchBmap match) {
         throw new UnsupportedOperationException("not implemented");
     }
+
+    public static Stat readOFStat(final ByteBuf bb) throws OFParseError {
+        throw new UnsupportedOperationException("not supported");
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver13/ChannelUtilsVer13.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver13/ChannelUtilsVer13.java
index 8216bb0..cd65bcd 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver13/ChannelUtilsVer13.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver13/ChannelUtilsVer13.java
@@ -1,26 +1,31 @@
 package org.projectfloodlight.openflow.protocol.ver13;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.protocol.OFMatchBmap;
 import org.projectfloodlight.openflow.protocol.match.Match;
+import org.projectfloodlight.openflow.protocol.stat.Stat;
 
 /**
- * Collection of helper functions for reading and writing into ChannelBuffers
+ * Collection of helper functions for reading and writing into Unpooled
  *
  * @author capveg
  */
 
 public class ChannelUtilsVer13 {
-    public static Match readOFMatch(final ChannelBuffer bb) throws OFParseError {
+    public static Match readOFMatch(final ByteBuf bb) throws OFParseError {
         return OFMatchV3Ver13.READER.readFrom(bb);
     }
 
-    public static OFMatchBmap readOFMatchBmap(ChannelBuffer bb) {
+    public static OFMatchBmap readOFMatchBmap(ByteBuf bb) {
         throw new UnsupportedOperationException("not implemented");
     }
 
-    public static void writeOFMatchBmap(ChannelBuffer bb, OFMatchBmap match) {
+    public static void writeOFMatchBmap(ByteBuf bb, OFMatchBmap match) {
         throw new UnsupportedOperationException("not implemented");
     }
+
+    public static Stat readOFStat(final ByteBuf bb) throws OFParseError {
+        throw new UnsupportedOperationException("not supported");
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver14/ChannelUtilsVer14.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver14/ChannelUtilsVer14.java
index c893cab..f062711 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver14/ChannelUtilsVer14.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver14/ChannelUtilsVer14.java
@@ -1,26 +1,31 @@
 package org.projectfloodlight.openflow.protocol.ver14;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.protocol.OFMatchBmap;
 import org.projectfloodlight.openflow.protocol.match.Match;
+import org.projectfloodlight.openflow.protocol.stat.Stat;
 
 /**
- * Collection of helper functions for reading and writing into ChannelBuffers
+ * Collection of helper functions for reading and writing into ByteBufs
  *
  * @author capveg
  */
 
 public class ChannelUtilsVer14 {
-    public static Match readOFMatch(final ChannelBuffer bb) throws OFParseError {
+    public static Match readOFMatch(final ByteBuf bb) throws OFParseError {
         return OFMatchV3Ver14.READER.readFrom(bb);
     }
 
-    public static OFMatchBmap readOFMatchBmap(ChannelBuffer bb) {
+    public static OFMatchBmap readOFMatchBmap(ByteBuf bb) {
         throw new UnsupportedOperationException("not implemented");
     }
 
-    public static void writeOFMatchBmap(ChannelBuffer bb, OFMatchBmap match) {
+    public static void writeOFMatchBmap(ByteBuf bb, OFMatchBmap match) {
         throw new UnsupportedOperationException("not implemented");
     }
+
+    public static Stat readOFStat(final ByteBuf bb) throws OFParseError {
+        throw new UnsupportedOperationException("not supported");
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver15/ChannelUtilsVer15.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver15/ChannelUtilsVer15.java
new file mode 100644
index 0000000..9142a19
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/ver15/ChannelUtilsVer15.java
@@ -0,0 +1,30 @@
+package org.projectfloodlight.openflow.protocol.ver15;
+
+import io.netty.buffer.ByteBuf;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.OFMatchBmap;
+import org.projectfloodlight.openflow.protocol.match.Match;
+import org.projectfloodlight.openflow.protocol.stat.Stat;
+/**
+ * Collection of helper functions for reading and writing into ByteBufs
+ *
+ * @author capveg
+ */
+
+public class ChannelUtilsVer15 {
+    public static Match readOFMatch(final ByteBuf bb) throws OFParseError {
+        return OFMatchV3Ver15.READER.readFrom(bb);
+    }
+
+    public static Stat readOFStat(final ByteBuf bb) throws OFParseError {
+        return OFStatV6Ver15.READER.readFrom(bb);
+    }
+
+    public static OFMatchBmap readOFMatchBmap(ByteBuf bb) {
+        throw new UnsupportedOperationException("not implemented");
+    }
+
+    public static void writeOFMatchBmap(ByteBuf bb, OFMatchBmap match) {
+        throw new UnsupportedOperationException("not implemented");
+    }
+}
\ No newline at end of file
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java
index dd50d29..2fb2816 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 import com.google.common.primitives.UnsignedInts;
@@ -146,11 +146,11 @@
         }
     }
 
-    public void write2Bytes(ChannelBuffer c) {
+    public void write2Bytes(ByteBuf c) {
         c.writeShort(this.opcode);
     }
 
-    public static ArpOpcode read2Bytes(ChannelBuffer c) {
+    public static ArpOpcode read2Bytes(ByteBuf c) {
         return ArpOpcode.of(c.readUnsignedShort());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/BundleId.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/BundleId.java
index cccf67e..7f6b496 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/BundleId.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/BundleId.java
@@ -2,7 +2,7 @@
 
 import javax.annotation.concurrent.Immutable;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 import com.google.common.primitives.UnsignedInts;
@@ -72,11 +72,11 @@
         return true;
     }
 
-    public void write4Bytes(ChannelBuffer c) {
+    public void write4Bytes(ByteBuf c) {
         c.writeInt(rawValue);
     }
 
-    public static BundleId read4Bytes(ChannelBuffer c) {
+    public static BundleId read4Bytes(ByteBuf c) {
         return BundleId.of(c.readInt());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/CircuitSignalID.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/CircuitSignalID.java
index 7a304f6..91eebe0 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/CircuitSignalID.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/CircuitSignalID.java
@@ -1,7 +1,7 @@
 package org.projectfloodlight.openflow.types;
 
 import com.google.common.collect.ComparisonChain;
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 import com.google.common.hash.PrimitiveSink;
@@ -53,14 +53,14 @@
         return spectralWidth;
     }
 
-    public void write6Bytes(ChannelBuffer c) {
+    public void write6Bytes(ByteBuf c) {
         c.writeByte(gridType);
         c.writeByte(channelSpacing);
         c.writeShort(channelNumber);
         c.writeShort(spectralWidth);
     }
 
-    public static CircuitSignalID read6Bytes(ChannelBuffer c) throws OFParseError {
+    public static CircuitSignalID read6Bytes(ByteBuf c) throws OFParseError {
         return new CircuitSignalID((byte)c.readUnsignedByte(),
                                    (byte)c.readUnsignedByte(),
                                    (short)c.readUnsignedShort(),
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ClassId.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ClassId.java
index 98c1253..c5f18cd 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ClassId.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ClassId.java
@@ -2,7 +2,7 @@
 
 import javax.annotation.concurrent.Immutable;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 import com.google.common.primitives.UnsignedInts;
@@ -72,11 +72,11 @@
         return true;
     }
 
-    public void write4Bytes(ChannelBuffer c) {
+    public void write4Bytes(ByteBuf c) {
         c.writeInt(rawValue);
     }
 
-    public static ClassId read4Bytes(ChannelBuffer c) {
+    public static ClassId read4Bytes(ByteBuf c) {
         return ClassId.of(c.readInt());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/EthType.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/EthType.java
index 1d9c8d6..a7c1464 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/EthType.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/EthType.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 import com.google.common.primitives.UnsignedInts;
@@ -59,6 +59,7 @@
     static final int VAL_CONF_TEST         = 0x9000; // Ethernet Configuration Testing Protocol[6]
     static final int VAL_Q_IN_Q            = 0x9100; // Q-in-Q
     static final int VAL_LLT               = 0xCAFE; // Veritas Low Latency Transport (LLT)[7] for Veritas Cluster Server
+    static final int VAL_PBB               = 0x88E7; // Provider Backbone Bridges (PBB)
 
     public static final EthType IPv4               = new EthType(VAL_IPv4);
     public static final EthType ARP                = new EthType(VAL_ARP);
@@ -103,6 +104,7 @@
     public static final EthType CONF_TEST          = new EthType(VAL_CONF_TEST );
     public static final EthType Q_IN_Q             = new EthType(VAL_Q_IN_Q );
     public static final EthType LLT                = new EthType(VAL_LLT );
+    public static final EthType PBB                = new EthType(VAL_PBB );
 
 
     private static final int NONE_VAL = 0x0;
@@ -210,6 +212,8 @@
                 return Q_IN_Q;
             case VAL_LLT:
                 return LLT;
+            case VAL_PBB:
+                return PBB;
             default:
                 // TODO: What's here?
                 return new EthType(type);
@@ -221,11 +225,11 @@
         return "0x" + Integer.toHexString(rawValue);
     }
 
-    public void write2Bytes(ChannelBuffer c) {
+    public void write2Bytes(ByteBuf c) {
         c.writeShort(this.rawValue);
     }
 
-    public static EthType read2Bytes(ChannelBuffer c) {
+    public static EthType read2Bytes(ByteBuf c) {
         return EthType.of(c.readUnsignedShort());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/GenTableId.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/GenTableId.java
index cfa7cdf..2127bef 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/GenTableId.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/GenTableId.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 import com.google.common.hash.PrimitiveSink;
@@ -51,11 +51,11 @@
         return LENGTH;
     }
 
-    public void write2Bytes(ChannelBuffer c) {
+    public void write2Bytes(ByteBuf c) {
         c.writeShort(this.id);
     }
 
-    public static GenTableId read2Bytes(ChannelBuffer c) throws OFParseError {
+    public static GenTableId read2Bytes(ByteBuf c) throws OFParseError {
         return GenTableId.of(c.readUnsignedShort());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/HashValue.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/HashValue.java
index ee736d7..5e8bb72 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/HashValue.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/HashValue.java
@@ -7,7 +7,7 @@
  *
  * @author Andreas Wundsam {@literal <}andreas.wundsam@bigswitch.com{@literal >}
  *
- * @param <H> - this type, for return type safety.
+ * @param H - this type, for return type safety.
  */
 @Immutable
 public interface HashValue<H extends HashValue<H>> {
@@ -20,7 +20,7 @@
     /** perform an arithmetic addition of this value and other. Wraps around on
      * overflow of the defined word size.
      *
-     * @param other
+     * @param other the other value to add to this
      * @return this + other
      */
     H add(H other);
@@ -29,7 +29,7 @@
      * arithmetically substract the given 'other' value from this value.
      * around on overflow.
      *
-     * @param other
+     * @param other the other value to subtract from this
      * @return this - other
      */
     H subtract(H other);
@@ -37,32 +37,53 @@
     /** @return the bitwise inverse of this value */
     H inverse();
 
-    /** or this value with another value value of the same type */
+    /** 
+     * or this value with another value value of the same type 
+     * 
+     * @param other the other value to bitwise or with this
+     * @return this | other
+     */
     H or(H other);
 
-    /** and this value with another value value of the same type */
+    /** 
+     * and this value with another value value of the same type 
+     * 
+     * @param other the other value to bitwise and with this
+     * @return this {@literal &} other
+     */
     H and(H other);
 
-    /** xor this value with another value value of the same type */
+    /** 
+     * xor this value with another value value of the same type 
+     *
+     * @param other the other value to bitwise xor with this
+     * @return this XOR other
+     */
     H xor(H other);
 
-    /** create and return a builder */
+    /** 
+     * create and return a builder 
+     *
+     * @return builder
+     */
     Builder<H> builder();
 
-    /** a mutator for HashValues. Allows perfomring a series of
-     *  operations on a hashv value without the associated cost of object
-     *  reallocation.
+    /** 
+     * a mutator for HashValues. Allows perfomring a series of
+     * operations on a hashv value without the associated cost of object
+     * reallocation.
      *
      * @author Andreas Wundsam {@literal <}andreas.wundsam@bigswitch.com{@literal >}
      *
      * @param <H> - the hashvalue
      */
     public interface Builder<H> {
-        /** perform an arithmetic addition of this value and other. Wraps around on
+        /** 
+         * perform an arithmetic addition of this value and other. Wraps around on
          * overflow of the defined word size.
          *
-         * @param other
-         * @return this mutator
+         * @param other the other value to add to this
+         * @return this mutator containing this + other
          */
         Builder<H> add(H other);
 
@@ -70,33 +91,47 @@
          * arithmetically substract the given 'other' value from the value stored in this mutator.
          * around on overflow.
          *
-         * @param other
-         * @return this mutator
+         * @param other the other value to subtract from this
+         * @return this mutator containing this - other
          */
         Builder<H> subtract(H other);
 
-        /** bitwise invert the value stored in this mutator
+        /** 
+         * bitwise invert the value stored in this mutator
          *
-         * @return this mutator
+         * @return this mutator containing ~this
          */
         Builder<H> invert();
 
-        /** or the value stored in this mutator with another value value of the same type
-        * @return this mutator
-        */
+        /** 
+         * or the value stored in this mutator with another value value of the same type
+         *
+         * @param other the other value to bitwise or with this
+         * @return this mutator containing this | other
+         */
         Builder<H> or(H other);
 
-        /** and the value stored in this mutator with another value value of the same type
-        * @return this mutator
-        */
+        /** 
+         * and the value stored in this mutator with another value value of the same type
+         *
+         * @param other the other value to bitwise and with this
+         * @return this mutator containing this {@literal &} other
+         */
         Builder<H> and(H other);
 
-        /** xor the value stored in this mutator with another value value of the same type
-        * @return this mutator
-        */
+        /** 
+         * xor the value stored in this mutator with another value value of the same type
+         *
+         * @param other the other value to bitwise exclusive or with this
+         * @return this mutator containing this XOR other
+         */
         Builder<H> xor(H other);
 
-        /** @return the hash value */
+        /** 
+         * construct an immutable value from the value defined in the builder
+         *
+         * @return the hash value 
+         */
         public H build();
     }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Code.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Code.java
index ced5737..597095d 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Code.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Code.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 import com.google.common.primitives.Shorts;
@@ -45,11 +45,11 @@
         return code;
     }
 
-    public void writeByte(ChannelBuffer c) {
+    public void writeByte(ByteBuf c) {
         c.writeByte(this.code);
     }
 
-    public static ICMPv4Code readByte(ChannelBuffer c) {
+    public static ICMPv4Code readByte(ByteBuf c) {
         return ICMPv4Code.of(c.readUnsignedByte());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java
index 634bc03..3eb2987 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 import com.google.common.primitives.Shorts;
@@ -155,11 +155,11 @@
         return type;
     }
 
-    public void writeByte(ChannelBuffer c) {
+    public void writeByte(ByteBuf c) {
         c.writeByte(this.type);
     }
 
-    public static ICMPv4Type readByte(ChannelBuffer c) {
+    public static ICMPv4Type readByte(ByteBuf c) {
         return ICMPv4Type.of(c.readUnsignedByte());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPAddress.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPAddress.java
index ad21e06..cc91ebf 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPAddress.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPAddress.java
@@ -34,13 +34,49 @@
     public abstract int asCidrMaskLength();
 
     /**
+     * Returns {@code true} if the IPAddress is unspecified.
+     *
+     * <p>The <em>unspecified</em> addresses, also known as the
+     * <em>wildcard</em> addresses, refer to:
+     * <ul>
+     * <li>the {@link IPv4Address} of {@code 0.0.0.0}
+     * <li>the {@link IPv6Address} of {@code ::}
+     * </ul>
+     * @return {@code true} if the IPAddress is unspecified, false otherwise
+     */
+    public abstract boolean isUnspecified();
+
+    /**
+     * Returns {@code true} if the IPAddress is a loopback address.
+     *
+     * <p><em>Loopback</em> addresses refer to:
+     * <ul>
+     * <li>any {@link IPv4Address} within {@code 127.0.0.0/8}
+     * <li>the {@link IPv6Address} of {@code ::1}
+     * </ul>
+     * @return {@code true} if the IPAddress is a loopback address, false otherwise
+     */
+    public abstract boolean isLoopback();
+
+    /**
+     * Returns {@code true} if the IPAddress is a link local address.
+     *
+     * <p><em>Link local</em> addresses refer to:
+     * <ul>
+     * <li>any {@link IPv4Address} within {@code 169.254.0.0/16}
+     * <li>any {@link IPv6Address} within {@code fe80::/10}
+     * </ul>
+     * @return {@code true} if the IPAddress is a link local address, false otherwise
+     */
+    public abstract boolean isLinkLocal();
+
+    /**
      * Checks if the IPAddress is the global broadcast address
      * 255.255.255.255 in case of IPv4
      * @return boolean true or false
      */
     public abstract boolean isBroadcast();
 
-
     /**
      * Checks if the IPAddress is the multicast address
      * @return boolean true or false
@@ -111,6 +147,20 @@
      */
     public abstract byte[] getBytes();
 
+    /**
+     * Returns an {@link InetAddress} object representing this IP address.
+     *
+     * <p>The resulting {@link InetAddress} object:
+     * <ul>
+     * <li>will not carry a hostname
+     * <li>will not carry a non-zero scope ID or scoped interface,
+     *     in the case of {@link Inet6Address}
+     * </ul>
+     * @return an {@link InetAddress} object representing this IP address
+     */
+    @Nonnull
+    public abstract InetAddress toInetAddress();
+
     @Override
     public abstract String toString();
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java
index 53e8071..37dd919 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java
@@ -1,21 +1,24 @@
 package org.projectfloodlight.openflow.types;
 
+import io.netty.buffer.ByteBuf;
+
+import static com.google.common.base.Preconditions.checkArgument;
+
 import java.net.Inet4Address;
 import java.net.InetAddress;
+import java.net.UnknownHostException;
 import java.util.Arrays;
 
 import javax.annotation.Nonnull;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.OFMessageReader;
+import org.projectfloodlight.openflow.protocol.Writeable;
 
 import com.google.common.base.Preconditions;
 import com.google.common.hash.PrimitiveSink;
 import com.google.common.primitives.UnsignedInts;
 
-import org.projectfloodlight.openflow.protocol.Writeable;
-import org.projectfloodlight.openflow.protocol.OFMessageReader;
-import org.projectfloodlight.openflow.exceptions.OFParseError;
-
 /**
  * Wrapper around an IPv4Address address
  *
@@ -44,7 +47,7 @@
 
     private static class Reader implements OFMessageReader<IPv4Address> {
         @Override
-        public IPv4Address readFrom(ChannelBuffer bb) throws OFParseError {
+        public IPv4Address readFrom(ByteBuf bb) throws OFParseError {
             return new IPv4Address(bb.readInt());
         }
     }
@@ -86,18 +89,34 @@
     }
 
     @Override
+    public boolean isUnspecified() {
+        return this.equals(NONE);
+    }
+
+    @Override
+    public boolean isLoopback() {
+        return ((rawValue >>> 24) & 0xFF) == 127;
+    }
+
+    @Override
+    public boolean isLinkLocal() {
+        return ((rawValue >>> 24) & 0xFF) == 169
+                && ((rawValue >>> 16) & 0xFF) == 254;
+    }
+
+    @Override
     public boolean isBroadcast() {
         return this.equals(NO_MASK);
     }
 
     /**
-     * IPv4 multicast addresses are defined by the leading address bits of 1110 
+     * IPv4 multicast addresses are defined by the leading address bits of 1110
      */
     @Override
     public boolean isMulticast() {
         return ((rawValue >>> 24) & 0xF0) == 0xE0;
     }
-    
+
     @Override
     public IPv4Address and(IPv4Address other) {
         Preconditions.checkNotNull(other, "other must not be null");
@@ -153,6 +172,48 @@
 
     /**
      * Returns an {@code IPv4Address} object that represents the given
+     * IP address. The arguments are in network byte order: the highest
+     * order byte of the address is in {@code octet1}.
+     *
+     * <p>For example, {@code IPv4Address.of(192, 0, 2, 101)} yields
+     * the IPv4 address of {@code "192.0.2.101"}.
+     *
+     * <p>Use caution when providing byte-typed values as arguments.
+     * "Byte-typed values" here refer to values that are of either the
+     * primitive {@code byte} type or the corresponding object wrapper
+     * class {@link Byte}. Byte-typed values greater than 127 are
+     * essentially negative values and will be casted to negative
+     * {@code int} values, thus failing the numeric range checks
+     * enforced by this method. Consider using {@link #of(byte[])}
+     * instead when handling byte-typed values.
+     *
+     * @throws IllegalArgumentException if any of the octets were
+     *         negative or greater than 255
+     * @param octet1 the highest order byte in network byte order
+     * @param octet2 the 2nd-highest order byte in network byte order
+     * @param octet3 the 2nd-lowest order byte in network byte order
+     * @param octet4 the lowest order byte in network byte order
+     * @return an {@code IPv4Address} object that represents the given
+     * IP address
+     */
+    @Nonnull
+    public static IPv4Address of(
+            int octet1, int octet2, int octet3, int octet4) {
+        checkArgument((octet1 & 0xFF) == octet1
+                && (octet2 & 0xFF) == octet2
+                && (octet3 & 0xFF) == octet3
+                && (octet4 & 0xFF) == octet4,
+                "Invalid IPv4 address %s.%s.%s.%s",
+                octet1, octet2, octet3, octet4);
+        int raw = (octet1 & 0xFF) << 24
+                | (octet2 & 0xFF) << 16
+                | (octet3 & 0xFF) << 8
+                | (octet4 & 0xFF) << 0;
+        return IPv4Address.of(raw);
+    }
+
+    /**
+     * Returns an {@code IPv4Address} object that represents the given
      * IP address.
      *
      * @param raw  the raw IP address represented as a 32-bit integer
@@ -309,6 +370,17 @@
         return LENGTH;
     }
 
+    @Nonnull
+    @Override
+    public Inet4Address toInetAddress() {
+        try {
+            return (Inet4Address) InetAddress.getByAddress(getBytes());
+        } catch (UnknownHostException e) {
+            throw new IllegalArgumentException(
+                    "Error getting InetAddress for the IPAddress " + this, e);
+        }
+    }
+
     @Override
     public String toString() {
         StringBuilder res = new StringBuilder();
@@ -319,11 +391,11 @@
         return res.toString();
     }
 
-    public void write4Bytes(ChannelBuffer c) {
+    public void write4Bytes(ByteBuf c) {
         c.writeInt(rawValue);
     }
 
-    public static IPv4Address read4Bytes(ChannelBuffer c) {
+    public static IPv4Address read4Bytes(ByteBuf c) {
         return IPv4Address.of(c.readInt());
     }
 
@@ -365,7 +437,7 @@
     }
 
     @Override
-    public void writeTo(ChannelBuffer bb) {
+    public void writeTo(ByteBuf bb) {
         bb.writeInt(rawValue);
     }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java
index fee04ac..497a40c 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java
@@ -1,22 +1,26 @@
 package org.projectfloodlight.openflow.types;
 
+import io.netty.buffer.ByteBuf;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkNotNull;
+
 import java.net.Inet6Address;
 import java.net.InetAddress;
+import java.net.UnknownHostException;
 import java.util.Arrays;
 import java.util.regex.Pattern;
 
 import javax.annotation.Nonnull;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+import org.projectfloodlight.openflow.protocol.OFMessageReader;
+import org.projectfloodlight.openflow.protocol.Writeable;
 
 import com.google.common.base.Preconditions;
 import com.google.common.hash.PrimitiveSink;
 import com.google.common.primitives.UnsignedLongs;
 
-import org.projectfloodlight.openflow.protocol.Writeable;
-import org.projectfloodlight.openflow.protocol.OFMessageReader;
-import org.projectfloodlight.openflow.exceptions.OFParseError;
-
 /**
  * IPv6 address object. Instance controlled, immutable. Internal representation:
  * two 64 bit longs (not that you'd have to know).
@@ -24,7 +28,7 @@
  * @author Andreas Wundsam {@literal <}andreas.wundsam@teleteach.de{@literal >}
  */
 public class IPv6Address extends IPAddress<IPv6Address> implements Writeable {
-    static final int LENGTH = 16;
+    public static final int LENGTH = 16;
     private final long raw1;
     private final long raw2;
 
@@ -50,7 +54,7 @@
 
     private static class Reader implements OFMessageReader<IPv6Address> {
         @Override
-        public IPv6Address readFrom(ChannelBuffer bb) throws OFParseError {
+        public IPv6Address readFrom(ByteBuf bb) throws OFParseError {
             return new IPv6Address(bb.readLong(), bb.readLong());
         }
     }
@@ -111,18 +115,74 @@
     }
 
     @Override
+    public boolean isUnspecified() {
+        return this.equals(NONE);
+    }
+
+    @Override
+    public boolean isLoopback() {
+        return raw1 == 0 && raw2 == 1;
+    }
+
+    @Override
+    public boolean isLinkLocal() {
+        return (raw1 & 0xFFC0_0000_0000_0000L) == 0xFE80_0000_0000_0000L;
+    }
+
+    @Override
     public boolean isBroadcast() {
         return this.equals(NO_MASK);
     }
 
     /**
-     * IPv6 multicast addresses are defined by the prefix ff00::/8 
+     * IPv6 multicast addresses are defined by the prefix ff00::/8
      */
     @Override
     public boolean isMulticast() {
         return (raw1 >>> 56) == 0xFFL;
     }
-    
+
+    /**
+     * Returns the Modified EUI-64 format interface identifier that
+     * corresponds to the specified MAC address.
+     *
+     * <p>Refer to the followings for the conversion details:
+     * <ul>
+     * <li>RFC 7042 - Section 2.2.1
+     * <li>RFC 5342 - Section 2.2.1 (Obsoleted by RFC 7042)
+     * <li>RFC 4291 - Appendix A
+     * </ul>
+     */
+    private static long toModifiedEui64(@Nonnull MacAddress macAddress) {
+        checkNotNull(macAddress, "macAddress must not be null");
+        return   ((0xFFFF_FF00_0000_0000L & (macAddress.getLong() << 16))
+                ^ (0x0200_0000_0000_0000L))
+                | (0x0000_00FF_FE00_0000L)
+                | (0x0000_0000_00FF_FFFFL & macAddress.getLong());
+    }
+
+    /**
+     * Returns {@code true} if the second (lower-order) 64-bit block of
+     * this address is equal to the Modified EUI-64 format interface
+     * identifier that corresponds to the specified MAC address.
+     *
+     * <p>Refer to the followings for the details of conversions between
+     * MAC addresses and Modified EUI-64 format interface identifiers:
+     * <ul>
+     * <li>RFC 7042 - Section 2.2.1
+     * <li>RFC 5342 - Section 2.2.1 (Obsoleted by RFC 7042)
+     * <li>RFC 4291 - Appendix A
+     * </ul>
+     *
+     * <p>This method assumes the second (lower-order) 64-bit block to be
+     * a 64-bit interface identifier, which may not always be true.
+     * @param macAddress the MAC address to check
+     * @return boolean true or false
+     */
+    public boolean isModifiedEui64Derived(@Nonnull MacAddress macAddress) {
+        return raw2 == toModifiedEui64(macAddress);
+    }
+
     @Override
     public IPv6Address and(IPv6Address other) {
         Preconditions.checkNotNull(other, "other must not be null");
@@ -329,6 +389,54 @@
     }
 
     /**
+     * Returns an {@code IPv6Address} object that represents the given
+     * MAC address in the specified network.
+     *
+     * <p>The first (higher-order) 64-bit block of the returned address
+     * will be the network prefix derived from the specified network.
+     * The specified network must satisfy the followings:
+     * <ul>
+     * <li>{@link #isCidrMask()} {@code == true}
+     * <li>{@literal 0 <= } {@link #asCidrMaskLength()} {@literal <= 64}
+     * </ul>
+     *
+     * <p>The second (lower-order) 64-bit block of the returned address
+     * will be equal to the Modified EUI-64 format interface identifier
+     * that corresponds to the specified MAC address.
+     *
+     * <p>Refer to the followings for the details of conversions between
+     * MAC addresses and Modified EUI-64 format interface identifiers:
+     * <ul>
+     * <li>RFC 7042 - Section 2.2.1
+     * <li>RFC 5342 - Section 2.2.1 (Obsoleted by RFC 7042)
+     * <li>RFC 4291 - Appendix A
+     * </ul>
+     *
+     * @throws IllegalArgumentException if the specified network does not
+     *         meet the aforementioned requirements
+     * @param network the IPv6 network
+     * @param macAddress the MAC address
+     * @return an {@code IPv6Address} object that represents the given
+     * MAC address in the specified network
+     */
+    @Nonnull
+    public static IPv6Address of(
+            @Nonnull IPv6AddressWithMask network,
+            @Nonnull MacAddress macAddress) {
+
+        checkNotNull(network, "network must not be null");
+        checkArgument(network.getMask().isCidrMask()
+                && network.getMask().asCidrMaskLength() <= 64,
+                "network must consist of a mask of 64 or less leading 1 bits"
+                + " and no other 1 bits: %s", network);
+
+        long raw1 = network.getValue().raw1;
+        long raw2 = toModifiedEui64(macAddress);
+
+        return IPv6Address.of(raw1, raw2);
+    }
+
+    /**
      * Returns an {@code IPv6Address} object that represents the
      * CIDR subnet mask of the given prefix length.
      *
@@ -394,6 +502,7 @@
 
     private volatile byte[] bytesCache = null;
 
+    @Override
     public byte[] getBytes() {
         if (bytesCache == null) {
             synchronized (this) {
@@ -427,6 +536,17 @@
         return LENGTH;
     }
 
+    @Nonnull
+    @Override
+    public Inet6Address toInetAddress() {
+        try {
+            return (Inet6Address) InetAddress.getByAddress(getBytes());
+        } catch (UnknownHostException e) {
+            throw new IllegalArgumentException(
+                    "Error getting InetAddress for the IPAddress " + this, e);
+        }
+    }
+
     @Override
     public String toString() {
         return toString(true, false);
@@ -441,7 +561,11 @@
             throw new IllegalArgumentException("16 bit word index must be in [0,7]");
     }
 
-    /** get the index of the first word where to apply IPv6 zero compression */
+    /** 
+     * get the index of the first word where to apply IPv6 zero compression 
+     *
+     * @return the index
+     */
     public int getZeroCompressStart() {
         int start = Integer.MAX_VALUE;
         int maxLength = -1;
@@ -454,7 +578,7 @@
                 if (getUnsignedShortWord(i) != 0) {
                     // end of this candidate word
                     int candidateLength = i - candidateStart;
-                    if (candidateLength >= maxLength) {
+                    if ((candidateLength > 1) && (candidateLength > maxLength)) {
                         start = candidateStart;
                         maxLength = candidateLength;
                     }
@@ -470,7 +594,7 @@
 
         if (candidateStart >= 0) {
             int candidateLength = 8 - candidateStart;
-            if (candidateLength >= maxLength) {
+            if ((candidateLength > 1) && (candidateLength > maxLength)) {
                 start = candidateStart;
                 maxLength = candidateLength;
             }
@@ -539,12 +663,12 @@
         return true;
     }
 
-    public void write16Bytes(ChannelBuffer c) {
+    public void write16Bytes(ByteBuf c) {
         c.writeLong(this.raw1);
         c.writeLong(this.raw2);
     }
 
-    public static IPv6Address read16Bytes(ChannelBuffer c) throws OFParseError {
+    public static IPv6Address read16Bytes(ByteBuf c) throws OFParseError {
         return IPv6Address.of(c.readLong(), c.readLong());
     }
 
@@ -569,7 +693,7 @@
     }
 
     @Override
-    public void writeTo(ChannelBuffer bb) {
+    public void writeTo(ByteBuf bb) {
         bb.writeLong(raw1);
         bb.writeLong(raw2);
     }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6AddressWithMask.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6AddressWithMask.java
index ee34923..a50da1a 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6AddressWithMask.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6AddressWithMask.java
@@ -5,6 +5,32 @@
 public class IPv6AddressWithMask extends IPAddressWithMask<IPv6Address> {
     public final static IPv6AddressWithMask NONE = of(IPv6Address.NONE, IPv6Address.NONE);
 
+    /**
+     * Represents the link-local network configuration used in practice,
+     * i.e. {@code fe80::/64}.
+     *
+     * <p>See Section 2.5.6 of RFC 4291.
+     *
+     * @see #LINK_LOCAL_RESERVED
+     */
+    public final static IPv6AddressWithMask LINK_LOCAL_NETWORK
+            = IPv6Address
+                    .of(0xFE80_0000_0000_0000L, 0x0000_0000_0000_0000L)
+                    .withMaskOfLength(64);
+
+    /**
+     * Contains all addresses reserved for link-local usages,
+     * i.e. {@code fe80::/10}.
+     *
+     * <p>See Section 2.4 of RFC 4291.
+     *
+     * @see #LINK_LOCAL_NETWORK
+     */
+    public final static IPv6AddressWithMask LINK_LOCAL_RESERVED
+            = IPv6Address
+                    .of(0xFE80_0000_0000_0000L, 0x0000_0000_0000_0000L)
+                    .withMaskOfLength(10);
+
     private IPv6AddressWithMask(IPv6Address value, IPv6Address mask) {
         super(value, mask);
     }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6FlowLabel.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6FlowLabel.java
index cfefd39..7c84684 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6FlowLabel.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6FlowLabel.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 import com.google.common.hash.PrimitiveSink;
@@ -56,11 +56,11 @@
         return "0x" + Integer.toHexString(label);
     }
 
-    public void write4Bytes(ChannelBuffer c) {
+    public void write4Bytes(ByteBuf c) {
         c.writeInt(this.label);
     }
 
-    public static IPv6FlowLabel read4Bytes(ChannelBuffer c) throws OFParseError {
+    public static IPv6FlowLabel read4Bytes(ByteBuf c) throws OFParseError {
         return IPv6FlowLabel.of((int)(c.readUnsignedInt() & 0xFFFFFFFF));
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpDscp.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpDscp.java
index f19e051..a738ae3 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpDscp.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpDscp.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 import com.google.common.hash.PrimitiveSink;
@@ -230,11 +230,11 @@
         return "0x" + Integer.toHexString(dscp);
     }
 
-    public void writeByte(ChannelBuffer c) {
+    public void writeByte(ByteBuf c) {
         c.writeByte(this.dscp);
     }
 
-    public static IpDscp readByte(ChannelBuffer c) throws OFParseError {
+    public static IpDscp readByte(ByteBuf c) throws OFParseError {
         return IpDscp.of((byte)(c.readUnsignedByte()));
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpEcn.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpEcn.java
index 654df01..eb6ae66 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpEcn.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpEcn.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 import com.google.common.hash.PrimitiveSink;
@@ -49,11 +49,11 @@
         return (ecn < 3 ? "0" : "") + Integer.toBinaryString(ecn);
     }
 
-    public void writeByte(ChannelBuffer c) {
+    public void writeByte(ByteBuf c) {
         c.writeByte(this.ecn);
     }
 
-    public static IpEcn readByte(ChannelBuffer c) throws OFParseError {
+    public static IpEcn readByte(ByteBuf c) throws OFParseError {
         return IpEcn.of((byte)(c.readUnsignedByte()));
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java
index 8443a31..14e01a7 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 import com.google.common.primitives.Shorts;
@@ -615,11 +615,11 @@
         return "0x" + Integer.toHexString(proto);
     }
 
-    public void writeByte(ChannelBuffer c) {
+    public void writeByte(ByteBuf c) {
         c.writeByte(this.proto);
     }
 
-    public static IpProtocol readByte(ChannelBuffer c) {
+    public static IpProtocol readByte(ByteBuf c) {
         return IpProtocol.of(c.readUnsignedByte());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/LagId.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/LagId.java
index 51364e1..04e59d4 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/LagId.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/LagId.java
@@ -2,7 +2,7 @@
 
 import javax.annotation.concurrent.Immutable;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 import com.google.common.primitives.UnsignedInts;
@@ -67,11 +67,11 @@
         return true;
     }
 
-    public void write4Bytes(ChannelBuffer c) {
+    public void write4Bytes(ByteBuf c) {
         c.writeInt(rawValue);
     }
 
-    public static LagId read4Bytes(ChannelBuffer c) {
+    public static LagId read4Bytes(ByteBuf c) {
         return LagId.of(c.readInt());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/MacAddress.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/MacAddress.java
index b73db43..7a484f4 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/MacAddress.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/MacAddress.java
@@ -4,7 +4,6 @@
 
 import javax.annotation.Nonnull;
 
-import org.jboss.netty.buffer.ChannelBuffer;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.util.HexString;
 
@@ -12,6 +11,8 @@
 import com.google.common.hash.PrimitiveSink;
 import com.google.common.primitives.Longs;
 
+import io.netty.buffer.ByteBuf;
+
 /**
  * Wrapper around a 6 byte mac address.
  *
@@ -19,6 +20,7 @@
  */
 
 public class MacAddress implements OFValueType<MacAddress> {
+
     static final int MacAddrLen = 6;
     private final long rawValue;
 
@@ -33,11 +35,16 @@
 
     private static final long LLDP_MAC_ADDRESS_MASK = 0xfffffffffff0L;
     private static final long LLDP_MAC_ADDRESS_VALUE = 0x0180c2000000L;
+    private final static MacAddress IPV4_MULTICAST_BASE_ADDRESS =
+           MacAddress.of("01:00:5E:00:00:00");
+    private final static MacAddress IPV6_MULTICAST_BASE_ADDRESS =
+           MacAddress.of("33:33:00:00:00:00");
 
     private static final String FORMAT_ERROR = "Mac address is not well-formed. " +
-            "It must consist of 6 hex digit pairs separated by colons: ";
+            "It must consist of 6 hex digit pairs separated by colons or hyphens: ";
     private static final int MAC_STRING_LENGTH = 6 * 2 + 5;
 
+
     private MacAddress(final long rawValue) {
         this.rawValue = rawValue;
     }
@@ -62,27 +69,27 @@
         return new MacAddress(raw);
     }
 
-    /** Parse a mac adress from the canonical string representation as
-     *  6 hex bytes separated by colons (01:02:03:04:05:06).
+    /** Parse a mac adress from a string representation as
+     *  6 hex bytes separated by colons or hyphens (01:02:03:04:05:06,
+     *  01-02-03-04-05-06).
      *
-     * @param macString - a mac address in canonical string representation
+     * @param macString - a mac address in string representation
      * @return the parsed MacAddress
      * @throws IllegalArgumentException if macString is not a valid mac adddress
      */
     @Nonnull
     public static MacAddress of(@Nonnull final String macString) throws IllegalArgumentException {
-        if (macString == null) {
-            throw new NullPointerException("macString must not be null");
-        }
+        Preconditions.checkNotNull(macString, "macStringmust not be null");
+        Preconditions.checkArgument(macString.length() == MAC_STRING_LENGTH,
+                FORMAT_ERROR + macString);
+        final char separator = macString.charAt(2);
+        Preconditions.checkArgument(separator == ':' || separator == '-',
+                FORMAT_ERROR + macString + " (invalid separator)");
 
         int index = 0;
         int shift = 40;
         long raw = 0;
 
-        if (macString.length() != MAC_STRING_LENGTH) {
-            throw new IllegalArgumentException(FORMAT_ERROR + macString);
-        }
-
         while (shift >= 0) {
             int digit1 = Character.digit(macString.charAt(index++), 16);
             int digit2 = Character.digit(macString.charAt(index++), 16);
@@ -90,10 +97,16 @@
                 throw new IllegalArgumentException(FORMAT_ERROR + macString);
             raw |= ((long) (digit1 << 4 | digit2)) << shift;
 
-            if (shift == 0)
+            if (shift == 0) {
                 break;
-            if (macString.charAt(index++) != ':')
-                throw new IllegalArgumentException(FORMAT_ERROR + macString);
+            }
+
+            // Iterate over separators
+            if (macString.charAt(index++) != separator) {
+                throw new IllegalArgumentException(FORMAT_ERROR + macString +
+                                                   " (inconsistent separators");
+            }
+
             shift -= 8;
         }
         return MacAddress.of(raw);
@@ -200,12 +213,12 @@
         return rawValue;
     }
 
-    public void write6Bytes(ChannelBuffer c) {
+    public void write6Bytes(ByteBuf c) {
         c.writeInt((int) (this.rawValue >> 16));
         c.writeShort((int) this.rawValue & 0xFFFF);
     }
 
-    public static MacAddress read6Bytes(ChannelBuffer c) throws OFParseError {
+    public static MacAddress read6Bytes(ByteBuf c) throws OFParseError {
         long raw = c.readUnsignedInt() << 16 | c.readUnsignedShort();
         return MacAddress.of(raw);
     }
@@ -222,10 +235,74 @@
 
     @Override
     public void putTo(PrimitiveSink sink) {
-        sink.putInt((int) (this.rawValue >> 16));
-        sink.putShort((short) (this.rawValue & 0xFFFF));
+        sink.putLong(rawValue);
     }
 
+    /*
+     * Parse an IPv4 Multicast address and return the macAddress
+     * corresponding to the multicast IPv4 address.
+     *
+     * For multicast forwarding, the mac addresses in the range
+     * 01-00-5E-00-00-00 to 01-00-5E-7F-FF-FF have been reserved.
+     * The most significant 25 bits of the above 48-bit mac address
+     * are fixed while the lower 23 bits are variable.
+     * These lower 23 bits are derived from the lower 23 bits
+     * of the multicast IP address.
+     *
+     * AND ipv4 address with 0x07FFFFF to extract the last 23 bits
+     * OR with 01:00:5E:00:00:00 MAC (first 25 bits)
+     *
+     * @param ipv4 - ipv4 multicast address
+     * @return the MacAddress corresponding to the multicast address
+     * @throws IllegalArgumentException if ipv4 is not a valid multicast address
+     */
+    @Nonnull
+    public static MacAddress forIPv4MulticastAddress(IPv4Address ipv4)
+            throws IllegalArgumentException {
 
+        if (!ipv4.isMulticast())
+            throw new IllegalArgumentException(
+                    "Not a Multicast IPAddress\"" + ipv4 + "\"");
 
+        long ipLong = ipv4.getInt();
+        int ipMask = 0x007FFFFF;
+        ipLong = ipLong & ipMask;
+
+        long macLong = IPV4_MULTICAST_BASE_ADDRESS.getLong(); // 01:00:5E:00:00:00
+        macLong = macLong | ipLong;
+        MacAddress returnMac = MacAddress.of(macLong);
+
+        return returnMac;
+    }
+
+    /**
+     * Generate a MAC address corresponding to multicast IPv6  address.
+     *
+     * Take the last 4 bytes of IPv6 address and copy them to the base IPv6
+     * multicast mac address - 33:33:00:00:00:00.
+     *
+     * @param ipv6 - IPv6 address corresponding to which multicast MAC addr
+     * need to be generated.
+     * @return - the generated multicast mac address.
+     * @throws IllegalArgumentException if ipv6 address is not a valid IPv6
+     * multicast address.
+     */
+    @Nonnull
+    public static MacAddress forIPv6MulticastAddr(IPv6Address ipv6)
+            throws IllegalArgumentException {
+        if (!ipv6.isMulticast()) {
+            throw new IllegalArgumentException(
+                    "Not a Multicast IPv6Address\"" + ipv6 + "\"");
+        }
+        long ipLong = ((ipv6.getUnsignedShortWord(6) << 16) |
+                                         ipv6.getUnsignedShortWord(7));
+        long ipMask = 0xFFFFFFFFl;
+        ipLong = ipLong & ipMask;
+
+        long macLong = IPV6_MULTICAST_BASE_ADDRESS.getLong();//33:33:00:00:00:00
+        macLong = macLong | ipLong;
+        MacAddress returnMac = MacAddress.of(macLong);
+
+        return returnMac;
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFAuxId.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFAuxId.java
index c8e04d2..3c83f91 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFAuxId.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFAuxId.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 import com.google.common.hash.PrimitiveSink;
@@ -64,11 +64,11 @@
         return id;
     }
 
-    public void writeByte(ChannelBuffer c) {
+    public void writeByte(ByteBuf c) {
         c.writeByte(this.id);
     }
 
-    public static OFAuxId readByte(ChannelBuffer c) throws OFParseError {
+    public static OFAuxId readByte(ByteBuf c) throws OFParseError {
         return OFAuxId.of(c.readUnsignedByte());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBitMask128.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBitMask128.java
index 93f5a2d..93ba41e 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBitMask128.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBitMask128.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 
@@ -66,12 +66,12 @@
         return (word & ((long)1 << bit)) != 0;
     }
 
-    public void write16Bytes(ChannelBuffer cb) {
+    public void write16Bytes(ByteBuf cb) {
         cb.writeLong(raw1);
         cb.writeLong(raw2);
     }
 
-    public static OFBitMask128 read16Bytes(ChannelBuffer cb) {
+    public static OFBitMask128 read16Bytes(ByteBuf cb) {
         long raw1 = cb.readLong();
         long raw2 = cb.readLong();
         return of(raw1, raw2);
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBitMask256.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBitMask256.java
index 5326e0d..6009a2f 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBitMask256.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBitMask256.java
@@ -17,7 +17,7 @@
 
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 
@@ -110,14 +110,14 @@
         return (word & ((long)1 << bit)) != 0;
     }
 
-    public void write32Bytes(ChannelBuffer cb) {
+    public void write32Bytes(ByteBuf cb) {
         cb.writeLong(raw1);
         cb.writeLong(raw2);
         cb.writeLong(raw3);
         cb.writeLong(raw4);
     }
 
-    public static OFBitMask256 read32Bytes(ChannelBuffer cb) {
+    public static OFBitMask256 read32Bytes(ByteBuf cb) {
         long raw1 = cb.readLong();
         long raw2 = cb.readLong();
         long raw3 = cb.readLong();
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBitMask512.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBitMask512.java
index e3686a4..39b8fe7 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBitMask512.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBitMask512.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 
@@ -125,7 +125,7 @@
         return (word & ((long)1 << bit)) != 0;
     }
 
-    public void write64Bytes(ChannelBuffer cb) {
+    public void write64Bytes(ByteBuf cb) {
         cb.writeLong(raw1);
         cb.writeLong(raw2);
         cb.writeLong(raw3);
@@ -136,7 +136,7 @@
         cb.writeLong(raw8);
     }
 
-    public static OFBitMask512 read64Bytes(ChannelBuffer cb) {
+    public static OFBitMask512 read64Bytes(ByteBuf cb) {
         long raw1 = cb.readLong();
         long raw2 = cb.readLong();
         long raw3 = cb.readLong();
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBooleanValue.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBooleanValue.java
index 99416a3..7598d36 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBooleanValue.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBooleanValue.java
@@ -17,7 +17,7 @@
 
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.protocol.OFMessageReader;
 import org.projectfloodlight.openflow.protocol.Writeable;
@@ -79,13 +79,13 @@
     }
 
     @Override
-    public void writeTo(ChannelBuffer bb) {
+    public void writeTo(ByteBuf bb) {
         bb.writeByte(getInt());
     }
 
     private static class Reader implements OFMessageReader<OFBooleanValue> {
         @Override
-        public OFBooleanValue readFrom(ChannelBuffer bb) throws OFParseError {
+        public OFBooleanValue readFrom(ByteBuf bb) throws OFParseError {
             return of(bb.readByte() != 0);
         }
     }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFConnectionIndex.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFConnectionIndex.java
new file mode 100644
index 0000000..133f478
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFConnectionIndex.java
@@ -0,0 +1,78 @@
+package org.projectfloodlight.openflow.types;
+
+import org.projectfloodlight.openflow.annotations.Immutable;
+
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.primitives.UnsignedInts;
+
+import io.netty.buffer.ByteBuf;
+
+@Immutable
+public class OFConnectionIndex implements OFValueType<OFConnectionIndex>  {
+
+    static final int LENGTH = 4;
+    private final int connectionIndex;
+
+    private OFConnectionIndex(final int connectionIndex) {
+        this.connectionIndex = connectionIndex;
+    }
+
+    public static OFConnectionIndex of(final int connectionIndex) {
+        return new OFConnectionIndex(connectionIndex);
+    }
+
+    public void write4Bytes(ByteBuf c) {
+        c.writeInt(connectionIndex);
+    }
+
+    public static OFConnectionIndex read4Bytes(ByteBuf c) {
+        return OFConnectionIndex.of(c.readInt());
+    }
+
+    @Override
+    public OFConnectionIndex applyMask(OFConnectionIndex mask) {
+        return OFConnectionIndex.of(this.connectionIndex & mask.connectionIndex);
+    }
+
+    @Override
+    public int compareTo(OFConnectionIndex o) {
+        return UnsignedInts.compare(this.connectionIndex,o.connectionIndex);
+    }
+
+    @Override
+    public void putTo(PrimitiveSink sink) {
+        sink.putInt(connectionIndex);
+    }
+
+    @Override
+    public int getLength() {
+        return LENGTH;
+    }
+
+    @Override
+    public String toString() {
+        return UnsignedInts.toString(connectionIndex);
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + connectionIndex;
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        OFConnectionIndex other = (OFConnectionIndex) obj;
+        if (connectionIndex != other.connectionIndex)
+            return false;
+        return true;
+    }
+}
\ No newline at end of file
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFErrorCauseData.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFErrorCauseData.java
index 1e71b3c..03e2fcd 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFErrorCauseData.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFErrorCauseData.java
@@ -1,9 +1,10 @@
 package org.projectfloodlight.openflow.types;
 
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.Unpooled;
+
 import java.util.Arrays;
 
-import org.jboss.netty.buffer.ChannelBuffer;
-import org.jboss.netty.buffer.ChannelBuffers;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.protocol.OFErrorMsg;
 import org.projectfloodlight.openflow.protocol.OFFactories;
@@ -55,7 +56,7 @@
     public Optional<OFMessage> getParsedMessage() {
         OFFactory factory = OFFactories.getFactory(version);
         try {
-            OFMessage msg = factory.getReader().readFrom(ChannelBuffers.wrappedBuffer(data));
+            OFMessage msg = factory.getReader().readFrom(Unpooled.wrappedBuffer(data));
             if(msg != null)
                 return Optional.of(msg);
             else
@@ -66,7 +67,7 @@
         }
     }
 
-    public static OFErrorCauseData read(ChannelBuffer bb, int length, OFVersion version) {
+    public static OFErrorCauseData read(ByteBuf bb, int length, OFVersion version) {
         byte[] bytes = ChannelUtils.readBytes(bb, length);
         return of(bytes, version);
    }
@@ -77,7 +78,7 @@
     }
 
     @Override
-    public void writeTo(ChannelBuffer bb) {
+    public void writeTo(ByteBuf bb) {
         bb.writeBytes(data);
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFGroup.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFGroup.java
index 9c571ea..e47cd90 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFGroup.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFGroup.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.annotations.Immutable;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
@@ -79,7 +79,11 @@
         }
     }
 
-    /** return the group number as a int32 */
+    /** 
+     * get the group number of this group as a int32 
+     *
+     * @return the integer form of the this group
+     */
     public int getGroupNumber() {
         return groupNumber;
     }
@@ -131,11 +135,11 @@
         return result;
     }
 
-    public void write4Bytes(ChannelBuffer c) {
+    public void write4Bytes(ByteBuf c) {
         c.writeInt(this.groupNumber);
     }
 
-    public static OFGroup read4Bytes(ChannelBuffer c) throws OFParseError {
+    public static OFGroup read4Bytes(ByteBuf c) throws OFParseError {
         return OFGroup.of(c.readInt());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFMetadata.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFMetadata.java
index fcabdcd..445c333 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFMetadata.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFMetadata.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 
@@ -31,11 +31,11 @@
         return u64;
     }
 
-    public static OFMetadata read8Bytes(ChannelBuffer cb) {
+    public static OFMetadata read8Bytes(ByteBuf cb) {
         return OFMetadata.ofRaw(cb.readLong());
     }
 
-    public void write8Bytes(ChannelBuffer cb) {
+    public void write8Bytes(ByteBuf cb) {
         u64.writeTo(cb);
     }
 
@@ -66,7 +66,7 @@
 
     @Override
     public String toString() {
-        return "Metadata: " + u64.toString();
+        return u64.toString();
     }
 
     @Override
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java
index f2b1e9a..89ace97 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.annotations.Immutable;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
@@ -161,7 +161,7 @@
      * NOTE: The port object may either be newly allocated or cached. Do not
      * rely on either behavior.
      *
-     * @param portNumber
+     * @param portNumber the integer port number
      * @return a corresponding OFPort
      */
     public static OFPort ofInt(final int portNumber) {
@@ -294,7 +294,12 @@
         }
     }
 
-    /** convenience function: delegates to ofInt */
+    /** 
+     * convenience function: delegates to ofInt 
+     *
+     * @param portNumber the integer port number
+     * @return a corresponding OFPort
+     */
     public static OFPort of(final int portNumber) {
         return ofInt(portNumber);
     }
@@ -305,7 +310,7 @@
      * 32-bit integer value allocated as its port number. NOTE: The port object
      * may either be newly allocated or cached. Do not rely on either behavior.
      *
-     * @param portNumber
+     * @param portNumber the short port number
      * @return a corresponding OFPort
      */
     public static OFPort ofShort(final short portNumber) {
@@ -438,7 +443,11 @@
         }
     }
 
-    /** return the port number as a int32 */
+    /** 
+     * return the port number as a int32 
+     *
+     * @return the port number as an integer
+     */
     public int getPortNumber() {
         return portNumber;
     }
@@ -450,7 +459,8 @@
      *
      * @throws IllegalArgumentException
      *             if a regular port number exceeds the maximum value in OF1.0
-     **/
+     * @return the port number as a short
+     */
     public short getShortPortNumber() {
 
         switch (portNumber) {
@@ -530,19 +540,19 @@
         return result;
     }
 
-    public void write2Bytes(ChannelBuffer c) {
+    public void write2Bytes(ByteBuf c) {
         c.writeShort(this.portNumber);
     }
 
-    public static OFPort read2Bytes(ChannelBuffer c) throws OFParseError {
+    public static OFPort read2Bytes(ByteBuf c) throws OFParseError {
         return OFPort.ofShort(c.readShort());
     }
 
-    public void write4Bytes(ChannelBuffer c) {
+    public void write4Bytes(ByteBuf c) {
         c.writeInt(this.portNumber);
     }
 
-    public static OFPort read4Bytes(ChannelBuffer c) throws OFParseError {
+    public static OFPort read4Bytes(ByteBuf c) throws OFParseError {
         return OFPort.of((int)(c.readUnsignedInt() & 0xFFFFFFFF));
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPortBitMap.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPortBitMap.java
index 1d658c5..1c3bc68 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPortBitMap.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPortBitMap.java
@@ -46,9 +46,13 @@
         super(OFBitMask128.NONE, mask);
     }
 
-    /** @return whether or not the given port is logically included in the
-     *  match, i.e., whether a packet from in-port <em>port</em> be matched by
-     *  this OXM.
+    /** 
+     * Check if the given port is logically included in the
+     * match. I.e. will a packet from in-port <em>port</em>
+     * be matched by this OXM?
+     *
+     * @param port the port to check in the match
+     * @return boolean true or false
      */
     public boolean isOn(OFPort port) {
         // see the implementation note above about the logical inversion of the mask
@@ -63,16 +67,19 @@
         return builder.build();
     }
 
-    /** @return an OFPortBitmap based on the 'mask' part of an OFBitMask128, as, e.g., returned
-     *  by the switch.
-     **/
+    /** 
+     * @param mask the mask to create the bitmap from
+     * @return an OFPortBitmap based on the 'mask' part of an OFBitMask128, as, e.g., returned
+     * by the switch.
+     */
     public static OFPortBitMap of(OFBitMask128 mask) {
         return new OFPortBitMap(mask);
     }
 
-    /** @return iterating over all ports that are logically included in the
-     *  match, i.e., whether a packet from in-port <em>port</em> be matched by
-     *  this OXM.
+    /** 
+     * @return iterating over all ports that are logically included in the
+     * match, i.e., whether a packet from in-port <em>port</em> be matched by
+     * this OXM.
      */
     public Iterable<OFPort> getOnPorts() {
         ArrayList<OFPort> ports = new ArrayList<>();
@@ -104,17 +111,22 @@
 
         }
 
-        /** @return whether or not the given port is logically included in the
-         *  match, i.e., whether a packet from in-port <em>port</em> be matched by
-         *  this OXM.
+        /** 
+         * @param port the port to check if it's being matched by the bitmask
+         * @return whether or not the given port is logically included in the
+         * match, i.e., whether a packet from in-port <em>port</em> be matched by
+         * this OXM.
          */
         public boolean isOn(OFPort port) {
             // see the implementation note above about the logical inversion of the mask
             return !(OFBitMask128.isBitOn(raw1, raw2, port.getPortNumber()));
         }
 
-        /** remove this port from the match, i.e., packets from this in-port
-         *  will NOT be matched.
+        /** 
+         * remove this port from the match, i.e., packets from this in-port
+         * will NOT be matched.
+         * @param port the port to remove from the match
+         * @return this mutator
          */
         public Builder unset(OFPort port) {
             // see the implementation note above about the logical inversion of the mask
@@ -135,8 +147,11 @@
             return this;
         }
 
-        /** add this port from the match, i.e., packets from this in-port
-         *  will NOT be matched.
+        /** 
+         * add this port to the match, i.e., packets from this in-port
+         * will be matched.
+         * @param port the port to add to the match
+         * @return this mutator 
          */
         public Builder set(OFPort port) {
             // see the implementation note above about the logical inversion of the mask
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPortBitMap512.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPortBitMap512.java
index c85c750..e9c8f4c 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPortBitMap512.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPortBitMap512.java
@@ -46,9 +46,11 @@
         super(OFBitMask512.NONE, mask);
     }
 
-    /** @return whether or not the given port is logically included in the
-     *  match, i.e., whether a packet from in-port <em>port</em> be matched by
-     *  this OXM.
+    /** 
+     * @param port the port to check
+     * @return whether or not the given port is logically included in the
+     * match, i.e., whether a packet from in-port <em>port</em> be matched by
+     * this OXM.
      */
     public boolean isOn(OFPort port) {
         // see the implementation note above about the logical inversion of the mask
@@ -63,16 +65,19 @@
         return builder.build();
     }
 
-    /** @return an OFPortBitmap based on the 'mask' part of an OFBitMask512, as, e.g., returned
-     *  by the switch.
-     **/
+    /** 
+     * @param mask the mask used to create the bitmap
+     * @return an OFPortBitmap based on the 'mask' part of an OFBitMask512, as, e.g., returned
+     * by the switch.
+     */
     public static OFPortBitMap512 of(OFBitMask512 mask) {
         return new OFPortBitMap512(mask);
     }
 
-    /** @return iterating over all ports that are logically included in the
-     *  match, i.e., whether a packet from in-port <em>port</em> be matched by
-     *  this OXM.
+    /** 
+     * @return iterating over all ports that are logically included in the
+     * match, i.e., whether a packet from in-port <em>port</em> be matched by
+     * this OXM.
      */
     public Iterable<OFPort> getOnPorts() {
         ArrayList<OFPort> ports = new ArrayList<>();
@@ -105,9 +110,11 @@
 
         }
 
-        /** @return whether or not the given port is logically included in the
-         *  match, i.e., whether a packet from in-port <em>port</em> be matched by
-         *  this OXM.
+        /**
+         * @param port the port to check
+         * @return whether or not the given port is logically included in the
+         * match, i.e., whether a packet from in-port <em>port</em> be matched by
+         * this OXM.
          */
         public boolean isOn(OFPort port) {
             // see the implementation note above about the logical inversion of the mask
@@ -115,8 +122,11 @@
                     raw5, raw6, raw7, raw8, port.getPortNumber()));
         }
 
-        /** remove this port from the match, i.e., packets from this in-port
-         *  will NOT be matched.
+        /** 
+         * remove this port from the match, i.e., packets from this in-port
+         * will NOT be matched.
+         * @param port the port the remove from the match
+         * @return this mutator
          */
         public Builder unset(OFPort port) {
             // see the implementation note above about the logical inversion of the mask
@@ -149,8 +159,11 @@
             return this;
         }
 
-        /** add this port from the match, i.e., packets from this in-port
-         *  will NOT be matched.
+        /**
+         * add this port from the match, i.e., packets from this in-port
+         * will be matched.
+         * @param port the port to add to the match
+         * @return this mutator
          */
         public Builder set(OFPort port) {
             // see the implementation note above about the logical inversion of the mask
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFVlanVidMatch.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFVlanVidMatch.java
index 91c9fc8..de9da67 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFVlanVidMatch.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFVlanVidMatch.java
@@ -4,7 +4,7 @@
 
 import javax.annotation.Nullable;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -48,7 +48,7 @@
     /** an untagged packet is specified as 0000 in OF 1.0, but 0xFFFF in OF1.0. Special case that. */
     public static final OFVlanVidMatch UNTAGGED = new OFVlanVidMatch(NONE_VAL) {
         @Override
-        public void write2BytesOF10(ChannelBuffer c) {
+        public void write2BytesOF10(ByteBuf c) {
             c.writeShort(UNTAGGED_VAL_OF10);
         }
     };
@@ -172,19 +172,19 @@
         return Arrays.copyOf(bytesCache, bytesCache.length);
     }
 
-    public void write2Bytes(ChannelBuffer c) {
+    public void write2Bytes(ByteBuf c) {
         c.writeShort(this.vid);
     }
 
-    public void write2BytesOF10(ChannelBuffer c) {
+    public void write2BytesOF10(ByteBuf c) {
         c.writeShort(this.getVlan());
     }
 
-    public static OFVlanVidMatch read2Bytes(ChannelBuffer c) throws OFParseError {
+    public static OFVlanVidMatch read2Bytes(ByteBuf c) throws OFParseError {
         return OFVlanVidMatch.ofRawVid(c.readShort());
     }
 
-    public static OFVlanVidMatch read2BytesOF10(ChannelBuffer c) throws OFParseError {
+    public static OFVlanVidMatch read2BytesOF10(ByteBuf c) throws OFParseError {
         return OFVlanVidMatch.ofVlanOF10(c.readShort());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OduSignalID.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OduSignalID.java
index c97c4d0..97a5d0d 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OduSignalID.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OduSignalID.java
@@ -18,7 +18,7 @@
 
 import java.util.List;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.collect.ComparisonChain;
 import com.google.common.primitives.UnsignedBytes;
@@ -75,14 +75,14 @@
       return MINIMUM_LENGTH + 12; //  tslen == 80 
     }
  
-    public void writeTo(ChannelBuffer c) {
+    public void writeTo(ByteBuf c) {
         c.writeShort(tpn);
         c.writeShort(tslen);
         c.writeBytes(tsmap); // 10 bytes
         c.writeZero(2); // write bytes for add padding alignment (the size of bytes in tsmap must be divided in 4)   
     }
 
-     public static OduSignalID readFrom(ChannelBuffer c)   {
+     public static OduSignalID readFrom(ByteBuf c)   {
         int tpn = U16.f(c.readShort());
         int tslen = U16.f(c.readShort());
         byte[] tsmap = null;
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/PacketType.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/PacketType.java
new file mode 100644
index 0000000..3881b63
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/PacketType.java
@@ -0,0 +1,143 @@
+package org.projectfloodlight.openflow.types;
+
+import org.projectfloodlight.openflow.protocol.OFHeaderTypeNamespace;
+
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.primitives.UnsignedInts;
+
+import io.netty.buffer.ByteBuf;
+
+public class PacketType implements OFValueType<PacketType> {
+
+    private final int namespace;
+    private final int nsType;
+
+    static final int NAMESPACE_ONF = 0;
+    static final int NAMESPACE_ETHERTYPE = 1;
+
+    static final int NS_TYPE_ONF_ETHERNET = 0;
+    static final int NS_TYPE_ONF_NO_PACKET = 1;
+    static final int NS_TYPE_ONF_EXPERIMENTER   = 0xFFFF;
+
+    static final int NS_TYPE_ETHER_IPv4   = 0x800;
+    static final int NS_TYPE_ETHER_IPv6   = 0x86dd;
+
+    public static final PacketType ETHERNET = new PacketType(NAMESPACE_ONF, NS_TYPE_ONF_ETHERNET);
+    public static final PacketType NO_PACKET = new PacketType(NAMESPACE_ONF, NS_TYPE_ONF_NO_PACKET);
+    public static final PacketType EXPERIMENTER = new PacketType(NAMESPACE_ONF, NS_TYPE_ONF_EXPERIMENTER);
+
+    public static final PacketType IPV4 = new PacketType(NAMESPACE_ETHERTYPE, NS_TYPE_ETHER_IPv4);
+    public static final PacketType IPV6 = new PacketType(NAMESPACE_ETHERTYPE, NS_TYPE_ETHER_IPv6);
+
+    public static final PacketType NO_MASK = PacketType.of(0xFFFF, 0x0FFFF);
+    public static final PacketType FULL_MASK = PacketType.of(0, 0);
+
+    private PacketType(int namespace, int nsType) {
+        this.namespace = namespace;
+        this.nsType = nsType;
+    }
+
+    public static PacketType of(int namespace, int nsType) {
+        switch(namespace) {
+            case NAMESPACE_ONF:
+                switch (nsType) {
+                    case NS_TYPE_ONF_ETHERNET:
+                        return ETHERNET;
+                    case NS_TYPE_ONF_NO_PACKET:
+                        return NO_PACKET;
+                    case NS_TYPE_ONF_EXPERIMENTER:
+                        return EXPERIMENTER;
+                }
+                break;
+            case NAMESPACE_ETHERTYPE:
+                switch (nsType) {
+                    case NS_TYPE_ETHER_IPv4:
+                        return IPV4;
+                    case NS_TYPE_ETHER_IPv6:
+                        return IPV6;
+                }
+                break;
+        }
+        return new PacketType(namespace, nsType);
+    }
+
+    public static PacketType of(OFHeaderTypeNamespace namespace, int nsType) {
+        return of(namespace.getStableValue(), nsType);
+
+    }
+
+    @Override
+    public PacketType applyMask(PacketType mask) {
+        return PacketType.of(this.namespace & mask.namespace, this.nsType & mask.nsType);
+    }
+
+    @Override
+    public int compareTo(PacketType o) {
+        int res = UnsignedInts.compare(this.namespace, o.namespace);
+        if(res != 0)
+            return res;
+
+        return UnsignedInts.compare(this.nsType, o.nsType);
+    }
+
+    @Override
+    public void putTo(PrimitiveSink sink) {
+        sink.putInt(namespace);
+        sink.putInt(nsType);
+    }
+
+    @Override
+    public int getLength() {
+        //4 byte
+        return 4;
+    }
+
+    public void write4Bytes(ByteBuf c) {
+        c.writeShort(namespace);
+        c.writeInt(nsType);
+    }
+
+    public static PacketType read4Bytes(ByteBuf c) {
+        return PacketType.of(c.readShort(), c.readInt());
+    }
+
+    public int getNamespace() {
+        return namespace;
+    }
+
+    public int getNsType() {
+        return nsType;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + namespace;
+        result = prime * result + nsType;
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        PacketType other = (PacketType) obj;
+        if (namespace != other.namespace)
+            return false;
+        if (nsType != other.nsType)
+            return false;
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        return "PacketType [namespace=" + namespace + ", nsType=" + nsType + "]";
+    }
+
+
+}
\ No newline at end of file
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TableId.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TableId.java
index 950087d..5519d4e 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TableId.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TableId.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 import com.google.common.hash.PrimitiveSink;
@@ -58,11 +58,11 @@
         return LENGTH;
     }
 
-    public void writeByte(ChannelBuffer c) {
+    public void writeByte(ByteBuf c) {
         c.writeByte(this.id);
     }
 
-    public static TableId readByte(ChannelBuffer c) throws OFParseError {
+    public static TableId readByte(ByteBuf c) throws OFParseError {
         return TableId.of(c.readUnsignedByte());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TransportPort.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TransportPort.java
index 6ab0254..bfca2d7 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TransportPort.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TransportPort.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 import com.google.common.hash.PrimitiveSink;
@@ -72,11 +72,11 @@
         return Integer.toString(port);
     }
 
-    public void write2Bytes(ChannelBuffer c) {
+    public void write2Bytes(ByteBuf c) {
         c.writeShort(this.port);
     }
 
-    public static TransportPort read2Bytes(ChannelBuffer c) throws OFParseError {
+    public static TransportPort read2Bytes(ByteBuf c) throws OFParseError {
         return TransportPort.of((c.readUnsignedShort() & 0x0FFFF));
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U128.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U128.java
index ddf4faa..9e7bd34 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U128.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U128.java
@@ -2,7 +2,7 @@
 
 import javax.annotation.Nonnull;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 import com.google.common.primitives.UnsignedLongs;
@@ -71,12 +71,12 @@
         return true;
     }
 
-    public void write16Bytes(ChannelBuffer cb) {
+    public void write16Bytes(ByteBuf cb) {
         cb.writeLong(raw1);
         cb.writeLong(raw2);
     }
 
-    public static U128 read16Bytes(ChannelBuffer cb) {
+    public static U128 read16Bytes(ByteBuf cb) {
         long raw1 = cb.readLong();
         long raw2 = cb.readLong();
         return of(raw1, raw2);
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U16.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U16.java
index 2466ffc..9ed0f45 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U16.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U16.java
@@ -17,7 +17,7 @@
 
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.protocol.OFMessageReader;
 import org.projectfloodlight.openflow.protocol.Writeable;
@@ -94,7 +94,7 @@
 
 
     @Override
-    public void writeTo(ChannelBuffer bb) {
+    public void writeTo(ByteBuf bb) {
         bb.writeShort(raw);
     }
 
@@ -103,7 +103,7 @@
 
     private static class Reader implements OFMessageReader<U16> {
         @Override
-        public U16 readFrom(ChannelBuffer bb) throws OFParseError {
+        public U16 readFrom(ByteBuf bb) throws OFParseError {
             return ofRaw(bb.readShort());
         }
     }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U32.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U32.java
index c69786c..fddb647 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U32.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U32.java
@@ -17,7 +17,7 @@
 
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.protocol.OFMessageReader;
 import org.projectfloodlight.openflow.protocol.Writeable;
@@ -96,7 +96,7 @@
     }
 
     @Override
-    public void writeTo(ChannelBuffer bb) {
+    public void writeTo(ByteBuf bb) {
         bb.writeInt(raw);
     }
 
@@ -104,7 +104,7 @@
 
     private static class Reader implements OFMessageReader<U32> {
         @Override
-        public U32 readFrom(ChannelBuffer bb) throws OFParseError {
+        public U32 readFrom(ByteBuf bb) throws OFParseError {
             return new U32(bb.readInt());
         }
     }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java
index f15544f..0d3cc6e 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java
@@ -19,7 +19,7 @@
 
 import java.math.BigInteger;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.protocol.OFMessageReader;
 import org.projectfloodlight.openflow.protocol.Writeable;
@@ -118,7 +118,7 @@
     }
 
     @Override
-    public void writeTo(ChannelBuffer bb) {
+    public void writeTo(ByteBuf bb) {
         bb.writeLong(raw);
     }
 
@@ -174,7 +174,7 @@
 
     private static class Reader implements OFMessageReader<U64> {
         @Override
-        public U64 readFrom(ChannelBuffer bb) throws OFParseError {
+        public U64 readFrom(ByteBuf bb) throws OFParseError {
             return U64.ofRaw(bb.readLong());
         }
     }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U8.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U8.java
index 17191af..f4fed56 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U8.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U8.java
@@ -17,7 +17,7 @@
 
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.protocol.OFMessageReader;
 import org.projectfloodlight.openflow.protocol.Writeable;
@@ -89,7 +89,7 @@
 
 
     @Override
-    public void writeTo(ChannelBuffer bb) {
+    public void writeTo(ByteBuf bb) {
         bb.writeByte(raw);
     }
 
@@ -106,7 +106,7 @@
 
     private static class Reader implements OFMessageReader<U8> {
         @Override
-        public U8 readFrom(ChannelBuffer bb) throws OFParseError {
+        public U8 readFrom(ByteBuf bb) throws OFParseError {
             return new U8(bb.readByte());
         }
     }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/UDF.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/UDF.java
index e537c20..bc43d56 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/UDF.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/UDF.java
@@ -2,7 +2,7 @@
 
 import javax.annotation.concurrent.Immutable;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 import com.google.common.primitives.UnsignedInts;
@@ -60,11 +60,11 @@
         return Integer.toString(rawValue);
     }
 
-    public void write4Bytes(ChannelBuffer c) {
+    public void write4Bytes(ByteBuf c) {
         c.writeInt(rawValue);
     }
 
-    public static UDF read4Bytes(ChannelBuffer c) {
+    public static UDF read4Bytes(ByteBuf c) {
         return UDF.of(c.readInt());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VFI.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VFI.java
new file mode 100644
index 0000000..07691ee
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VFI.java
@@ -0,0 +1,93 @@
+package org.projectfloodlight.openflow.types;
+
+import io.netty.buffer.ByteBuf;
+
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+
+import com.google.common.hash.PrimitiveSink;
+
+/** Represents a two byte virtual forwarding instance.
+*
+* @author Sudeep Modi {@literal <}sudeep.modi@bigswitch.com{@literal >}
+*
+*/public class VFI implements OFValueType<VFI> {
+    private static final short ZERO_VAL = 0x0000;
+    final static int LENGTH = 2;
+
+    public static final VFI ZERO = new VFI(ZERO_VAL);
+
+    /** for use with masking operations */
+    public static final VFI NO_MASK = new VFI((short)0xFFFF);
+    public static final VFI FULL_MASK = ZERO;
+
+    private final short vfi;
+
+    private VFI(short vfi) {
+        this.vfi = vfi;
+    }
+
+    public static VFI ofVfi(int vfi) {
+        if (vfi == NO_MASK.vfi)
+            return NO_MASK;
+        if (vfi == ZERO_VAL)
+            return ZERO;
+        return new VFI((short) vfi);
+    }
+
+    /** @return the actual VFI value */
+    public short getVfi() {
+        return vfi;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + vfi;
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) return true;
+        if (obj == null) return false;
+        if (getClass() != obj.getClass()) return false;
+        VFI other = (VFI) obj;
+        if (vfi != other.vfi) return false;
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        return "0x" + Integer.toHexString(vfi);
+    }
+
+    @Override
+    public int getLength() {
+        return LENGTH;
+    }
+
+    public void write2Bytes(ByteBuf c) {
+        c.writeShort(this.vfi);
+    }
+
+    public static VFI read2Bytes(ByteBuf c) throws OFParseError {
+        return VFI.ofVfi(c.readShort());
+    }
+
+    @Override
+    public VFI applyMask(VFI mask) {
+        return VFI.ofVfi(this.vfi & mask.vfi);
+    }
+
+    @Override
+    public int compareTo(VFI o) {
+        return Integer.compare(vfi & 0xffff, o.vfi & 0xffff);
+    }
+
+    @Override
+    public void putTo(PrimitiveSink sink) {
+        sink.putShort(vfi);
+    }
+
+}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VRF.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VRF.java
index b742da5..ad57e7d 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VRF.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VRF.java
@@ -2,7 +2,7 @@
 
 import javax.annotation.concurrent.Immutable;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 import com.google.common.hash.PrimitiveSink;
 import com.google.common.primitives.UnsignedInts;
@@ -60,11 +60,11 @@
         return Integer.toString(rawValue);
     }
 
-    public void write4Bytes(ChannelBuffer c) {
+    public void write4Bytes(ByteBuf c) {
         c.writeInt(rawValue);
     }
 
-    public static VRF read4Bytes(ChannelBuffer c) {
+    public static VRF read4Bytes(ByteBuf c) {
         return VRF.of(c.readInt());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanPcp.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanPcp.java
index cbb7004..5ec25dc 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanPcp.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanPcp.java
@@ -1,6 +1,6 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 import com.google.common.hash.PrimitiveSink;
@@ -58,11 +58,11 @@
         return LENGTH;
     }
 
-    public void writeByte(ChannelBuffer c) {
+    public void writeByte(ByteBuf c) {
         c.writeByte(this.pcp);
     }
 
-    public static VlanPcp readByte(ChannelBuffer c) throws OFParseError {
+    public static VlanPcp readByte(ByteBuf c) throws OFParseError {
         return VlanPcp.of((byte)(c.readUnsignedByte() & 0xFF));
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanVid.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanVid.java
index 1c3eba4..a842821 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanVid.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanVid.java
@@ -1,8 +1,9 @@
 package org.projectfloodlight.openflow.types;
 
+import io.netty.buffer.ByteBuf;
+
 import java.util.Arrays;
 
-import org.jboss.netty.buffer.ChannelBuffer;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
 import com.google.common.hash.PrimitiveSink;
@@ -86,15 +87,15 @@
         return Arrays.copyOf(bytesCache, bytesCache.length);
     }
 
-    public void write2Bytes(ChannelBuffer c) {
+    public void write2Bytes(ByteBuf c) {
         c.writeShort(this.vid);
     }
 
-    public void write2BytesOF10(ChannelBuffer c) {
+    public void write2BytesOF10(ByteBuf c) {
         c.writeShort(this.getVlan());
     }
 
-    public static VlanVid read2Bytes(ChannelBuffer c) throws OFParseError {
+    public static VlanVid read2Bytes(ByteBuf c) throws OFParseError {
         return VlanVid.ofVlan(c.readShort());
     }
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VxlanNI.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VxlanNI.java
new file mode 100644
index 0000000..5e52b5c
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VxlanNI.java
@@ -0,0 +1,98 @@
+package org.projectfloodlight.openflow.types;
+
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+
+import com.google.common.hash.PrimitiveSink;
+import com.google.common.primitives.UnsignedInts;
+
+import io.netty.buffer.ByteBuf;
+
+/** Represents the VXLAN Network Identifier (24 bits).
+ *
+ * @author Sarath Kumar Sankaran Kutty
+ * {@literal <}sarath.kutty@bigswitch.com{@literal >}
+ */
+public class VxlanNI implements OFValueType<VxlanNI> {
+
+    private static final int VALIDATION_MASK = 0x00FFffFF;
+    final static int LENGTH = 4;
+
+    private static final int ZERO_VAL = 0x0;
+    public static final VxlanNI ZERO = new VxlanNI(ZERO_VAL);
+
+    private static final int NO_MASK_VAL = 0xFFffFFff;
+    public final static VxlanNI NO_MASK = new VxlanNI(NO_MASK_VAL);
+    public static final VxlanNI FULL_MASK = ZERO;
+
+    private final int vni;
+
+    private VxlanNI(int vni) {
+        this.vni = vni;
+    }
+
+    public static VxlanNI ofVni(int vni) {
+        if (vni == ZERO_VAL)
+            return ZERO;
+        if ((vni & VALIDATION_MASK) != vni) {
+            throw new IllegalArgumentException(String.format("Illegal VNI value: %x", vni));
+        }
+        return new VxlanNI(vni);
+    }
+
+    /** @return the VxLAN Network ID */
+    public int getVni() {
+        return vni;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) return true;
+        if (obj == null) return false;
+        if (getClass() != obj.getClass()) return false;
+        VxlanNI other = (VxlanNI) obj;
+        if (vni != other.vni) return false;
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + vni;
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        return String.valueOf(vni);
+    }
+
+    @Override
+    public int getLength() {
+        return LENGTH;
+    }
+
+
+    public void write4Bytes(ByteBuf c) {
+        c.writeInt(this.vni);
+    }
+
+    public static VxlanNI read4Bytes(ByteBuf c) throws OFParseError {
+        return VxlanNI.ofVni(c.readInt());
+    }
+
+    @Override
+    public VxlanNI applyMask(VxlanNI mask) {
+        return VxlanNI.ofVni(this.vni & mask.vni);
+    }
+
+    @Override
+    public int compareTo(VxlanNI o) {
+        return UnsignedInts.compare(vni, o.vni);
+    }
+
+    @Override
+    public void putTo(PrimitiveSink sink) {
+        sink.putInt(vni);
+    }
+}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/ChannelUtils.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/ChannelUtils.java
index 1a1ac6a..93d7ba6 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/ChannelUtils.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/ChannelUtils.java
@@ -2,7 +2,7 @@
 
 import java.util.List;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.protocol.OFMessageReader;
 import org.projectfloodlight.openflow.protocol.Writeable;
@@ -14,14 +14,15 @@
 import com.google.common.collect.ImmutableList.Builder;
 
 /**
- * Collection of helper functions for reading and writing into ChannelBuffers
+ * Collection of helper functions for reading and writing into Unpooled
  *
  * @author capveg
  */
 
 public class ChannelUtils {
     private static final Logger logger = LoggerFactory.getLogger(ChannelUtils.class);
-    public static String readFixedLengthString(ChannelBuffer bb, int length) {
+
+    public static String readFixedLengthString(ByteBuf bb, int length) {
         byte[] dst = new byte[length];
         bb.readBytes(dst, 0, length);
         int validLength = 0;
@@ -32,7 +33,7 @@
         return new String(dst, 0, validLength, Charsets.US_ASCII);
     }
 
-    public static void writeFixedLengthString(ChannelBuffer bb, String string,
+    public static void writeFixedLengthString(ByteBuf bb, String string,
             int length) {
         int l = string.length();
         if (l > length) {
@@ -45,18 +46,18 @@
         }
     }
 
-    static public byte[] readBytes(final ChannelBuffer bb, final int length) {
+    static public byte[] readBytes(final ByteBuf bb, final int length) {
         byte byteArray[] = new byte[length];
         bb.readBytes(byteArray);
         return byteArray;
     }
 
-    static public void writeBytes(final ChannelBuffer bb,
+    static public void writeBytes(final ByteBuf bb,
             final byte byteArray[]) {
         bb.writeBytes(byteArray);
     }
 
-    public static <T> List<T> readList(ChannelBuffer bb, int length, OFMessageReader<T> reader) throws OFParseError {
+    public static <T> List<T> readList(ByteBuf bb, int length, OFMessageReader<T> reader) throws OFParseError {
         int end = bb.readerIndex() + length;
         Builder<T> builder = ImmutableList.<T>builder();
         if(logger.isTraceEnabled())
@@ -73,7 +74,7 @@
         return builder.build();
     }
 
-    public static void writeList(ChannelBuffer bb, List<? extends Writeable> writeables) {
+    public static void writeList(ByteBuf bb, List<? extends Writeable> writeables) {
         for(Writeable w: writeables)
             w.writeTo(bb);
     }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/HexString.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/HexString.java
index bcc46f7..00cc65e 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/HexString.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/HexString.java
@@ -1,70 +1,104 @@
-/**
- *    Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior
- *    University
- *
- *    Licensed under the Apache License, Version 2.0 (the "License"); you may
- *    not use this file except in compliance with the License. You may obtain
- *    a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- *    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
- *    License for the specific language governing permissions and limitations
- *    under the License.
- **/
-
 package org.projectfloodlight.openflow.util;
 
-import org.projectfloodlight.openflow.types.U8;
+import io.netty.util.internal.EmptyArrays;
 
-public class HexString {
+/** Utility method to convert hexadecimal string from/to longs and byte arrays.
+ *
+ * @author Andreas Wundsam {@literal <}andreas.wundsam@bigswitch.com{@literal >}
+ */
+public final class HexString {
+
+    private HexString() {}
+
+    /* ================================================================================
+     * Implementation note:
+     * These implementations are optimized for small-O efficiency and thus rather ugly.
+     *
+     * When making changes, make sure *every line* is covered by a unit test.
+     *
+     * Do not use this as a blue print for normal code.
+     * ================================================================================
+     */
+
+    private final static char[] CHARS =
+        { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
+
     /**
      * Convert a string of bytes to a ':' separated hex string
      *
-     * @param bytes
+     * @param bytes the byte[] to convert
      * @return "0f:ca:fe:de:ad:be:ef"
      */
     public static String toHexString(final byte[] bytes) {
-        int i;
-        String ret = "";
-        String tmp;
-        for (i = 0; i < bytes.length; i++) {
-            if (i > 0)
-                ret += ":";
-            tmp = Integer.toHexString(U8.f(bytes[i]));
-            if (tmp.length() == 1)
-                ret += "0";
-            ret += tmp;
+        int lenBytes = bytes.length;
+        if (lenBytes == 0) {
+            return "";
         }
-        return ret;
+        char arr[] = new char[lenBytes * 2 + (lenBytes -1)];
+
+        int charPos = 0;
+        int i = 0;
+
+        for (;;) {
+            arr[charPos++] = CHARS[ (bytes[i] >>> 4) & 0xF ];
+            arr[charPos++] = CHARS[ bytes[i] & 0xF ];
+            if (++i >= lenBytes) {
+                break;
+            }
+            arr[charPos++] = ':';
+        }
+
+        return new String(arr, 0, arr.length);
     }
 
-    public static String toHexString(final long val, final int padTo) {
-        char arr[] = Long.toHexString(val).toCharArray();
-        String ret = "";
-        // prepend the right number of leading zeros
-        int i = 0;
-        for (; i < (padTo * 2 - arr.length); i++) {
-            ret += "0";
-            if ((i % 2) != 0)
-                ret += ":";
+    public static String toHexString(long val, final int padTo) {
+        int valBytes = (64 - Long.numberOfLeadingZeros(val) + 7)/8;
+        int lenBytes = valBytes > padTo ? valBytes : padTo;
+
+        char arr[] = new char[lenBytes * 2 + (lenBytes -1)];
+
+        // fill char array from the last position, shifting val by 4 bits
+        for (int charPos = arr.length - 1; charPos >= 0; charPos--) {
+            if ((charPos + 1) % 3 == 0) {
+                // every third char is a colon
+                arr[charPos] = ':';
+            } else {
+                arr[charPos] = CHARS[((int) val) & 0xF];
+                val >>>= 4;
+            }
         }
-        for (int j = 0; j < arr.length; j++) {
-            ret += arr[j];
-            if ((((i + j) % 2) != 0) && (j < (arr.length - 1)))
-                ret += ":";
-        }
-        return ret;
+        return new String(arr, 0, arr.length);
     }
 
     public static String toHexString(final long val) {
         return toHexString(val, 8);
     }
 
+
+    /** Deprecated version of {@link #toBytes(String)}.
+     *
+     * @throws NumberFormatException upon values parse error
+     * @param values the hexstring to parse into a byte[]
+     * @return a byte[] representing the hexstring
+     * {@link Deprecated} because of inconsistent naming
+     */
+    @Deprecated
+    public static byte[] fromHexString(final String values) throws NumberFormatException {
+        return toBytes(values);
+    }
+
+    /** state constants for toBytes */
+    /** expecting first digit */
+    private final static int FIRST_DIGIT = 1;
+    /** expecting second digit or colon */
+    private static final int SECOND_DIGIT_OR_COLON = 2;
+    /** expecting colon */
+    private static final int COLON = 3;
+    /** save byte and move back to FIRST_DIGIT */
+    private static final int SAVE_BYTE = 4;
+
     /**
-     * Convert a string of hex values into a string of bytes
+     * Convert a string of hex values into a string of bytes.
      *
      * @param values
      *            "0f:ca:fe:de:ad:be:ef"
@@ -72,29 +106,103 @@
      * @throws NumberFormatException
      *             If the string can not be parsed
      */
-    public static byte[] fromHexString(final String values) throws NumberFormatException {
-        String[] octets = values.split(":");
-        byte[] ret = new byte[octets.length];
+    public static byte[] toBytes(final String values) throws NumberFormatException {
+        int start = 0;
+        int len = values.length();
 
-        for (int i = 0; i < octets.length; i++) {
-            if (octets[i].length() > 2)
-                throw new NumberFormatException("Invalid octet length");
-            ret[i] = Integer.valueOf(octets[i], 16).byteValue();
+        if (len == 0) {
+            return EmptyArrays.EMPTY_BYTES;
         }
-        return ret;
+
+        int numColons = 0;
+        for (int i=0; i < len; i++) {
+            if (values.charAt(i) == ':') {
+                numColons++;
+            }
+        }
+
+        byte[] res = new byte[numColons+1];
+        int pos = 0;
+
+        int state = FIRST_DIGIT;
+
+        byte b = 0;
+        while (start < len) {
+            char c = values.charAt(start++);
+            switch (state) {
+                case FIRST_DIGIT:
+                    int digit = Character.digit(c, 16);
+                    if(digit < 0) {
+                        throw new NumberFormatException("Invalid char at index " + start + ": " + values);
+                    }
+                    b = (byte) digit;
+                    state = start < len ? SECOND_DIGIT_OR_COLON : SAVE_BYTE;
+                    break;
+                case SECOND_DIGIT_OR_COLON:
+                    if(c != ':') {
+                        int digit2 = Character.digit(c, 16);
+                        if(digit2 < 0) {
+                            throw new NumberFormatException("Invalid char at index " + start + ": " + values);
+                        }
+                        b =  (byte) ((b<<4) | digit2);
+                        state = start < len ? COLON : SAVE_BYTE;
+                    } else {
+                        state = SAVE_BYTE;
+                    }
+                    break;
+                case COLON:
+                    if(c != ':') {
+                        throw new NumberFormatException("Separator expected at index " + start + ": " + values);
+                    }
+                    state = SAVE_BYTE;
+                    break;
+                default:
+                    throw new IllegalStateException("Should not be in state " + state);
+            }
+            if (state == SAVE_BYTE) {
+                res[pos++] = b;
+                b = 0;
+                state = FIRST_DIGIT;
+            }
+        }
+        if (pos != res.length) {
+            // detects a mal-formed input string, e.g., "01:02:"
+            throw new NumberFormatException("Invalid hex string: " + values);
+        }
+
+        return res;
     }
 
     public static long toLong(String value) throws NumberFormatException {
-        String[] octets = value.split(":");
-        if (octets.length > 8)
-            throw new NumberFormatException("Input string is too big to fit in long: " + value);
-        long l = 0;
-        for (String octet: octets) {
-            if (octet.length() > 2)
-                throw new NumberFormatException("Each colon-separated byte component must consist of 1 or 2 hex digits: " + value);
-            short s = Short.parseShort(octet, 16);
-            l = (l << 8) + s;
+        int shift = 0;
+        long result = 0L;
+
+        int sinceLastSeparator = 0;
+        for (int charPos=value.length() - 1; charPos >= 0; charPos--) {
+            char c = value.charAt(charPos);
+            if (c == ':') {
+                if (sinceLastSeparator == 0) {
+                    throw new NumberFormatException("Expected hex digit at index " + charPos +": " + value);
+                } else if(sinceLastSeparator == 1) {
+                    shift += 4;
+                }
+                sinceLastSeparator = 0;
+            } else {
+                int digit = Character.digit(c, 16);
+                if (digit < 0) {
+                    throw new NumberFormatException("Invalid hex digit at index " + charPos +": " + value);
+                }
+                result |= ((long) digit) << shift;
+                shift +=4;
+                sinceLastSeparator++;
+                if (sinceLastSeparator > 2) {
+                    throw new NumberFormatException("Expected colon at index " + charPos +": " + value);
+                }
+            }
+            if (shift > 64) {
+                throw new NumberFormatException("Too many bytes in hex string to convert to long: " + value);
+            }
         }
-        return l;
+        return result;
     }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/MultiplePktInReasonUtil.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/MultiplePktInReasonUtil.java
index 3ee588f..107b7cf 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/MultiplePktInReasonUtil.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/MultiplePktInReasonUtil.java
@@ -20,7 +20,10 @@
     /**
      * This function is used in BVS T5/6 to decode the multiple packet in
      * reasons in Match.MetaData field.
-     * */
+     *
+     * @param pktIn the packet in message
+     * @return the set of packet in reasons
+     */
     public static Set<OFBsnPktinFlag> getOFBsnPktinFlags(OFPacketIn pktIn) {
         if(pktIn.getVersion().compareTo(OFVersion.OF_13) < 0) {
             throw new IllegalArgumentException("multiple pkt in reasons are "
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/PrimitiveSinkUtils.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/PrimitiveSinkUtils.java
index aafe262..7b01e4c 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/PrimitiveSinkUtils.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/PrimitiveSinkUtils.java
@@ -48,8 +48,8 @@
     /** puts the elements of a sorted set into the {@link PrimitiveSink}. Does not support null
      *  elements. The elements are assumed to be self-delimitating.
      *
-     * @param sink
-     * @param set
+     * @param sink the sink to put the sorted set
+     * @param set the sorted set
      */
     public static void putSortedSetTo(PrimitiveSink sink,
             SortedSet<? extends PrimitiveSinkable> set) {
@@ -62,13 +62,13 @@
     /** puts the elements of a list into the {@link PrimitiveSink}. Does not support null
      *  elements. The elements are assumed to be self-delimitating.
      *
-     * @param sink
-     * @param set
+     * @param sink the sink to put the list elements
+     * @param list the list
      */
     public static void putListTo(PrimitiveSink sink,
-            List<? extends PrimitiveSinkable> set) {
-        sink.putInt(set.size());
-        for(PrimitiveSinkable e: set) {
+            List<? extends PrimitiveSinkable> list) {
+        sink.putInt(list.size());
+        for(PrimitiveSinkable e: list) {
             e.putTo(sink);
         }
     }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/StringByteSerializer.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/StringByteSerializer.java
index 6949fb2..6396f2e 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/StringByteSerializer.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/util/StringByteSerializer.java
@@ -21,10 +21,10 @@
 import java.nio.charset.Charset;
 import java.util.Arrays;
 
-import org.jboss.netty.buffer.ChannelBuffer;
+import io.netty.buffer.ByteBuf;
 
 public class StringByteSerializer {
-    public static String readFrom(final ChannelBuffer data, final int length) {
+    public static String readFrom(final ByteBuf data, final int length) {
         byte[] stringBytes = new byte[length];
         data.readBytes(stringBytes);
         // find the first index of 0
@@ -37,7 +37,7 @@
         return new String(Arrays.copyOf(stringBytes, index), Charset.forName("ascii"));
     }
 
-    public static void writeTo(final ChannelBuffer data, final int length,
+    public static void writeTo(final ByteBuf data, final int length,
             final String value) {
         try {
             byte[] name = value.getBytes("ASCII");
diff --git a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPAddressTest.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPAddressTest.java
index 6e9d047..420f176 100644
--- a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPAddressTest.java
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPAddressTest.java
@@ -1,5 +1,7 @@
 package org.projectfloodlight.openflow.types;
 
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -8,9 +10,12 @@
 
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+import java.util.List;
 
 import org.junit.Test;
 
+import com.google.common.collect.ImmutableList;
+
 /**
  * Most tests are in IPv4AddressTest and IPv6AddressTest
  * Just exception testing here
@@ -92,6 +97,16 @@
     }
 
     @Test
+    public void testToInetAddress() throws Exception {
+        IPAddress<?> ip0 = IPAddress.of("201.202.3.4");
+        IPAddress<?> ip1 = IPAddress.of("2001:db8:abcd::1:2:3:4");
+        InetAddress ia0 = ip0.toInetAddress();
+        InetAddress ia1 = ip1.toInetAddress();
+        assertEquals(ia0, InetAddress.getByName("201.202.3.4"));
+        assertEquals(ia1, InetAddress.getByName("2001:db8:abcd:0:1:2:3:4"));
+    }
+
+    @Test
     public void testContains() {
 
         // Test IPv4 Mask
@@ -131,6 +146,93 @@
     }
 
     @Test
+    public void testIsUnspecified() {
+        IPAddress<?> unspecifiedV4 = IPAddress.of("0.0.0.0");
+        IPAddress<?> unspecifiedV6 = IPAddress.of("::");
+        assertThat(unspecifiedV4.isUnspecified(), is(true));
+        assertThat(unspecifiedV6.isUnspecified(), is(true));
+        List<String> others = ImmutableList.of(
+                "0.0.0.1",
+                "1.2.3.4",
+                "10.0.0.0",
+                "127.0.0.1",
+                "255.255.255.255",
+                "::1",
+                "2001:db8:1:2::5:6",
+                "fc00::4:5:6:7",
+                "fe80::1234",
+                "ff02::1");
+        for (String other : others) {
+            assertThat(IPAddress.of(other).isUnspecified(), is(false));
+        }
+    }
+
+    @Test
+    public void testIsLoopback() {
+        List<String> loopbacks = ImmutableList.of(
+                "127.0.0.0",
+                "127.0.0.1",
+                "127.0.0.2",
+                "127.0.0.255",
+                "127.1.2.3",
+                "127.101.102.103",
+                "127.201.202.203",
+                "127.255.255.255",
+                "::1");
+        for (String loopback : loopbacks) {
+            assertThat(IPAddress.of(loopback).isLoopback(), is(true));
+        }
+        List<String> others = ImmutableList.of(
+                "0.0.0.0",
+                "0.0.0.1",
+                "10.0.0.1",
+                "126.255.255.255",
+                "128.0.0.0",
+                "255.255.255.255",
+                "::",
+                "::2",
+                "2001:db8::1:2:3:4",
+                "fe80:7:6:5:4:3:2:1",
+                "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff");
+        for (String other : others) {
+            assertThat(IPAddress.of(other).isLoopback(), is(false));
+        }
+    }
+
+    @Test
+    public void testIsLinkLocal() {
+        List<String> linkLocals = ImmutableList.of(
+                "169.254.0.0",
+                "169.254.0.1",
+                "169.254.1.2",
+                "169.254.101.102",
+                "169.254.201.202",
+                "169.254.255.255",
+                "fe80::",
+                "fe80::1",
+                "fe80::1:2:3:4:5:6:7",
+                "fe80:aaaa:bbbb:cccc:dddd:eeee:ffff:1234",
+                "febf::",
+                "febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff");
+        for (String linkLocal : linkLocals) {
+            assertThat(IPAddress.of(linkLocal).isLinkLocal(), is(true));
+        }
+        List<String> others = ImmutableList.of(
+                "0.0.0.0",
+                "1.2.3.4",
+                "169.253.255.255",
+                "169.255.0.0",
+                "255.255.255.255",
+                "::",
+                "fe7f:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
+                "fec0::",
+                "ff02::1");
+        for (String other : others) {
+            assertThat(IPAddress.of(other).isLinkLocal(), is(false));
+        }
+    }
+
+    @Test
     public void testMulticastIp() {
         IPAddress<?> ip0 = IPAddress.of("240.2.3.4");
         IPAddress<?> ip1 = IPAddress.of("224.0.1.1");
diff --git a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv4AddressTest.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv4AddressTest.java
index 5d95a5a..d0beb12 100644
--- a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv4AddressTest.java
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv4AddressTest.java
@@ -8,13 +8,16 @@
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
+import io.netty.buffer.Unpooled;
 
 import java.net.Inet4Address;
 import java.net.InetAddress;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
 
 import org.hamcrest.CoreMatchers;
 import org.hamcrest.Matchers;
-import org.jboss.netty.buffer.ChannelBuffers;
 import org.junit.Test;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
@@ -228,6 +231,84 @@
     }
 
     @Test
+    public void testOf4Integers() {
+        Map<IPv4Address, IPv4Address> map = new HashMap<>();
+        map.put(IPv4Address.of(0, 0, 0, 0), IPv4Address.of(0));
+        map.put(IPv4Address.of(1, 2, 3, 4), IPv4Address.of("1.2.3.4"));
+        map.put(IPv4Address.of(6, 7, 8, 9), IPv4Address.of("6.7.8.9"));
+        map.put(IPv4Address.of(10, 1, 2, 3), IPv4Address.of("10.1.2.3"));
+        map.put(IPv4Address.of(10, 201, 202, 203), IPv4Address.of("10.201.202.203"));
+        map.put(IPv4Address.of(192, 168, 0, 101), IPv4Address.of("192.168.0.101"));
+        map.put(IPv4Address.of(211, 212, 213, 214), IPv4Address.of("211.212.213.214"));
+        map.put(IPv4Address.of(255, 255, 255, 255), IPv4Address.of(0xFF_FF_FF_FF));
+        for (Entry<IPv4Address, IPv4Address> entry : map.entrySet()) {
+            assertThat(entry.getKey(), equalTo(entry.getValue()));
+        }
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testOf4IntegersExceptionNegative1() {
+        IPv4Address.of(-3, 4, 5, 6);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testOf4IntegersExceptionNegative2() {
+        IPv4Address.of(3, -4, 5, 6);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testOf4IntegersExceptionNegative3() {
+        IPv4Address.of(3, 4, -5, 6);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testOf4IntegersExceptionNegative4() {
+        IPv4Address.of(3, 4, 5, -6);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testOf4IntegersExceptionNegative5() {
+        // ((byte) 128) is actually -128
+        IPv4Address.of(101, 102, 103, (byte) 128);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testOf4IntegersExceptionNegative6() {
+        // ((byte) 255) is actually -1
+        IPv4Address.of(101, 102, 103, (byte) 255);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testOf4IntegersExceptionNegative7() {
+        IPv4Address.of(-1, -1, -1, -1);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testOf4IntegersExceptionTooBig1() {
+        IPv4Address.of(1000, 2, 3, 4);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testOf4IntegersExceptionTooBig2() {
+        IPv4Address.of(1, 20000, 3, 4);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testOf4IntegersExceptionTooBig3() {
+        IPv4Address.of(1, 2, 300000, 4);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testOf4IntegersExceptionTooBig4() {
+        IPv4Address.of(1, 2, 3, 4000000);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testOf4IntegersExceptionTooBig5() {
+        IPv4Address.of(256, 256, 256, 256);
+    }
+
+    @Test
     public void testOfCidrMaskLength() {
         for (int i = 0; i <= 32; i++) {
             assertEquals(IPv4Address.ofCidrMaskLength(i).asCidrMaskLength(), i);
@@ -307,7 +388,7 @@
     @Test
     public void testReadFrom() throws OFParseError {
         for(int i=0; i < testAddresses.length; i++ ) {
-            IPv4Address ip = IPv4Address.read4Bytes(ChannelBuffers.copiedBuffer(testAddresses[i]));
+            IPv4Address ip = IPv4Address.read4Bytes(Unpooled.copiedBuffer(testAddresses[i]));
             assertEquals(testInts[i], ip.getInt());
             assertArrayEquals(testAddresses[i], ip.getBytes());
             assertEquals(testStrings[i], ip.toString());
diff --git a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv6AddressTest.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv6AddressTest.java
index a94f443..d778c1b 100644
--- a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv6AddressTest.java
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv6AddressTest.java
@@ -1,6 +1,14 @@
 package org.projectfloodlight.openflow.types;
 
-import static org.junit.Assert.*;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import io.netty.buffer.Unpooled;
 
 import java.net.Inet6Address;
 import java.net.InetAddress;
@@ -8,7 +16,6 @@
 
 import org.hamcrest.CoreMatchers;
 import org.hamcrest.Matchers;
-import org.jboss.netty.buffer.ChannelBuffers;
 import org.junit.Test;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
@@ -277,7 +284,7 @@
     public void testReadFrom() throws OFParseError, UnknownHostException {
         for(int i=0; i < testStrings.length; i++ ) {
             byte[] bytes = Inet6Address.getByName(testStrings[i]).getAddress();
-            IPv6Address ip = IPv6Address.read16Bytes(ChannelBuffers.copiedBuffer(bytes));
+            IPv6Address ip = IPv6Address.read16Bytes(Unpooled.copiedBuffer(bytes));
             assertEquals(testStrings[i], ip.toString());
             assertArrayEquals(bytes, ip.getBytes());
         }
@@ -314,6 +321,13 @@
         assertEquals("0000:0000:0000:0000:0000:0000:0000:0000", IPv6Address.of("::").toString(false, true));
         assertEquals("1::4:5:6:0:8", IPv6Address.of("1:0:0:4:5:6:0:8").toString(true, false));
         assertEquals("1:0:0:4::8", IPv6Address.of("1:0:0:4:0:0:0:8").toString(true, false));
+        // Two equal length zero runs; should zero compress the first instance
+        assertEquals("1::4:2:0:0:8", IPv6Address.of("1:0:0:4:2:0:0:8").toString(true, false));
+        // Shouldn't zero compress a single zero
+        assertEquals("1:0:2:4:3:1:0:8", IPv6Address.of("1:0:2:4:3:1:0:8").toString(true, false));
+        // Test zero runs at the end of the address since that's a different code path in toString
+        assertEquals("1::4:2:8:0:0", IPv6Address.of("1:0:0:4:2:8:0:0").toString(true, false));
+        assertEquals("1:3:2:4:3:1:5:0", IPv6Address.of("1:3:2:4:3:1:5:0").toString(true, false));
     }
 
     @Test
@@ -427,4 +441,76 @@
         assertEquals("::", IPv6Address.of("::%eth0").toString(true, false));
         assertEquals("1:0:0:4::8", IPv6Address.of("1:0:0:4:0:0:0:8%2").toString(true, false));
     }
+
+    private void testModifiedEui64(
+            String network, String macAddress, String expectedIpAddress) {
+
+        IPv6AddressWithMask networkObj = IPv6AddressWithMask.of(network);
+        MacAddress macAddressObj = MacAddress.of(macAddress);
+        MacAddress macAddressAdd1 = MacAddress.of(
+                macAddressObj.getLong() + 1 & 0xFFFF_FFFF_FFFFL);
+        MacAddress macAddressSub1 = MacAddress.of(
+                macAddressObj.getLong() - 1 & 0xFFFF_FFFF_FFFFL);
+        IPv6Address ipAddressObj = IPv6Address.of(networkObj, macAddressObj);
+        IPv6Address expectedObj = IPv6Address.of(expectedIpAddress);
+
+        assertThat(ipAddressObj, is(expectedObj));
+        assertThat(ipAddressObj.isModifiedEui64Derived(macAddressObj), is(true));
+        assertThat(ipAddressObj.isModifiedEui64Derived(macAddressAdd1), is(false));
+        assertThat(ipAddressObj.isModifiedEui64Derived(macAddressSub1), is(false));
+    }
+
+    @Test
+    public void testModifiedEui64() throws Exception {
+        testModifiedEui64(
+                "fe80::/64", "00:00:00:00:00:00", "fe80::0200:ff:fe00:0");
+        testModifiedEui64(
+                "fe80::/64", "12:34:56:78:9a:bc", "fe80::1034:56ff:fe78:9abc");
+        testModifiedEui64(
+                "fe80::/64", "ff:ff:ff:ff:ff:ff", "fe80::fdff:ffff:feff:ffff");
+        testModifiedEui64(
+                "fe80::/10", "5c:16:c7:12:34:56", "fe80::5e16:c7ff:fe12:3456");
+        testModifiedEui64(
+                "2001:db8:9876:5400::/56", "00:0c:29:ab:cd:ef",
+                "2001:db8:9876:5400:20c:29ff:feab:cdef");
+        testModifiedEui64(
+                "fd00:9999:8888::/48", "52:54:00:78:56:34",
+                "fd00:9999:8888::5054:00ff:fe78:5634");
+        testModifiedEui64(
+                "2001:db8:7777:aabb::/64", "14:10:9f:00:00:cd",
+                "2001:db8:7777:aabb:1610:9fff:fe00:00cd");
+    }
+
+    @Test(expected=NullPointerException.class)
+    public void testModifiedEui64ExceptionNullNetwork() {
+        IPv6Address.of(
+                (IPv6AddressWithMask) null,
+                MacAddress.of("00:50:56:12:34:56"));
+    }
+
+    @Test(expected=NullPointerException.class)
+    public void testModifiedEui64ExceptionNullMacAddress() {
+        IPv6Address.of(
+                IPv6AddressWithMask.LINK_LOCAL_NETWORK,
+                (MacAddress) null);
+    }
+
+    @Test(expected=NullPointerException.class)
+    public void testModifiedEui64ExceptionNullDerivedMacAddress() {
+        IPv6Address.NONE.isModifiedEui64Derived(null);
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testModifiedEui64ExceptionPrefixLengthNo() {
+        IPv6Address.of(
+                IPv6Address.of("fef::").withMask(IPv6Address.of("f0f0:1234::")),
+                MacAddress.of("5c:16:c7:00:00:00"));
+    }
+
+    @Test(expected=IllegalArgumentException.class)
+    public void testModifiedEui64ExceptionPrefixLengthTooLong() {
+        IPv6Address.of(
+                IPv6AddressWithMask.of("fe80::/65"),
+                MacAddress.of("5c:16:c7:00:00:00"));
+    }
 }
diff --git a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/MacAddressTest.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/MacAddressTest.java
index e1c7721..f201b47 100644
--- a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/MacAddressTest.java
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/MacAddressTest.java
@@ -1,8 +1,9 @@
 package org.projectfloodlight.openflow.types;
 
+import io.netty.buffer.Unpooled;
+
 import java.util.Arrays;
 
-import org.jboss.netty.buffer.ChannelBuffers;
 import org.junit.Test;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
@@ -22,12 +23,18 @@
             {(byte) 255, (byte) 255, (byte) 255, (byte) 255, (byte) 255, (byte) 255 }
     };
 
-    String[] testStrings = {
+    String[] testColonStrings = {
             "01:02:03:04:05:06",
             "80:00:00:00:00:01",
-            "ff:ff:ff:ff:ff:ff"
+            "ff:ff:ff:ff:ff:ff",
     };
 
+    String[] testHyphenStrings = {
+             "01-02-03-04-05-06",
+             "80-00-00-00-00-01",
+             "ff-ff-ff-ff-ff-ff",
+     };
+
     long[] testInts = {
             0x00010203040506L,
             0x00800000000001L,
@@ -43,7 +50,8 @@
             "00:fff:ef:12:12:ff",
             "01:02:03:04:05;06",
             "0:1:2:3:4:5:6",
-            "01:02:03:04"
+            "01:02:03:04",
+            "01-02-03:04-05-06",
     };
 
     byte[][] invalidMacBytes = {
@@ -53,11 +61,15 @@
 
     @Test
     public void testOfString() {
+        testOfStringForArray(testColonStrings);
+        testOfStringForArray(testHyphenStrings);
+    }
+
+    private void testOfStringForArray(String [] strings) {
         for(int i=0; i < testAddresses.length; i++ ) {
-            MacAddress ip = MacAddress.of(testStrings[i]);
+            MacAddress ip = MacAddress.of(strings[i]);
             assertEquals(testInts[i], ip.getLong());
             assertArrayEquals(testAddresses[i], ip.getBytes());
-            assertEquals(testStrings[i], ip.toString());
         }
     }
 
@@ -67,17 +79,17 @@
             MacAddress ip = MacAddress.of(testAddresses[i]);
             assertEquals("error checking long representation of "+Arrays.toString(testAddresses[i]) + "(should be "+Long.toHexString(testInts[i]) +")", testInts[i],  ip.getLong());
             assertArrayEquals(testAddresses[i], ip.getBytes());
-            assertEquals(testStrings[i], ip.toString());
+            assertEquals(testColonStrings[i], ip.toString());
         }
     }
 
     @Test
     public void testReadFrom() throws OFParseError {
         for(int i=0; i < testAddresses.length; i++ ) {
-            MacAddress ip = MacAddress.read6Bytes(ChannelBuffers.copiedBuffer(testAddresses[i]));
+            MacAddress ip = MacAddress.read6Bytes(Unpooled.copiedBuffer(testAddresses[i]));
             assertEquals(testInts[i], ip.getLong());
             assertArrayEquals(testAddresses[i], ip.getBytes());
-            assertEquals(testStrings[i], ip.toString());
+            assertEquals(testColonStrings[i], ip.toString());
         }
     }
 
@@ -156,14 +168,72 @@
     }
 
     @Test
+
+    public void testForIPv4MulticastAddress() {
+        IPv4Address ip = IPv4Address.of("224.1.1.1");
+        MacAddress mac = MacAddress.forIPv4MulticastAddress(ip);
+        MacAddress expectedMac = MacAddress.of("01:00:5E:01:01:01");
+        assertTrue(mac.equals(expectedMac));
+
+        ip = IPv4Address.of("224.129.1.1");
+        mac = MacAddress.forIPv4MulticastAddress(ip);
+        expectedMac = MacAddress.of("01:00:5E:01:01:01");
+        assertTrue(mac.equals(expectedMac));
+
+        ip = IPv4Address.of("225.1.1.1");
+        mac = MacAddress.forIPv4MulticastAddress(ip);
+        expectedMac = MacAddress.of("01:00:5E:01:01:01");
+        assertTrue(mac.equals(expectedMac));
+
+        ip = IPv4Address.of("239.129.1.1");
+        mac = MacAddress.forIPv4MulticastAddress(ip);
+        expectedMac = MacAddress.of("01:00:5E:01:01:01");
+        assertTrue(mac.equals(expectedMac));
+
+        ip = IPv4Address.of("224.1.2.3");
+        mac = MacAddress.forIPv4MulticastAddress(ip);
+        expectedMac = MacAddress.of("01:00:5E:01:02:03");
+        assertTrue(mac.equals(expectedMac));
+
+        ip = IPv4Address.of("239.129.2.3");
+        mac = MacAddress.forIPv4MulticastAddress(ip);
+        expectedMac = MacAddress.of("01:00:5E:01:02:03");
+        assertTrue(mac.equals(expectedMac));
+    }
+
     public void testOfDatapathid() {
         MacAddress mac = MacAddress.of(DatapathId.NONE);
         assertThat(mac, is(MacAddress.NONE));
 
-        for (String s : testStrings) {
+        for (String s : testColonStrings) {
             DatapathId dpid = DatapathId.of("00:00:" + s);
             mac = MacAddress.of(dpid);
             assertThat(mac, is(MacAddress.of(s)));
         }
     }
+
+    @Test
+    public void forIPv6MulticastAddr() {
+        IPv6Address ip = IPv6Address.of("ff02::1:ff00:0");
+        MacAddress mac = MacAddress.forIPv6MulticastAddr(ip);
+        MacAddress expectedMac = MacAddress.of("33:33:ff:00:00:00");
+        assertTrue(mac.equals(expectedMac));
+
+        ip = IPv6Address.of("ff02::1:ff01:0203");
+        mac = MacAddress.forIPv6MulticastAddr(ip);
+        expectedMac = MacAddress.of("33:33:ff:01:02:03");
+        assertTrue(mac.equals(expectedMac));
+
+        ip = IPv6Address.of("ff02::1:0102:0304");
+        mac = MacAddress.forIPv6MulticastAddr(ip);
+        expectedMac = MacAddress.of("33:33:01:02:03:04");
+        assertTrue(mac.equals(expectedMac));
+
+        ip = IPv6Address.of("2001::1:0102:0304");
+        try {
+            mac = MacAddress.forIPv6MulticastAddr(ip);
+        } catch(IllegalArgumentException e) {
+                // ok
+        }
+    }
 }
diff --git a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/OFErrorCauseDataTest.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/OFErrorCauseDataTest.java
index 9a5a4dc..6d6c545 100644
--- a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/OFErrorCauseDataTest.java
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/OFErrorCauseDataTest.java
@@ -2,10 +2,10 @@
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.Unpooled;
 
 import org.hamcrest.Matchers;
-import org.jboss.netty.buffer.ChannelBuffer;
-import org.jboss.netty.buffer.ChannelBuffers;
 import org.junit.Test;
 import org.projectfloodlight.openflow.protocol.OFFactories;
 import org.projectfloodlight.openflow.protocol.OFFlowAdd;
@@ -60,7 +60,7 @@
         .setPriority(6000)
         .build();
 
-        ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+        ByteBuf bb = Unpooled.buffer();
         flowAdd.writeTo(bb);
         byte[] flowAddBytes = new byte[bb.readableBytes()];
         bb.readBytes(flowAddBytes);
diff --git a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/U128Test.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/U128Test.java
index 81d9d7f..56dc070 100644
--- a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/U128Test.java
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/U128Test.java
@@ -8,12 +8,12 @@
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.Unpooled;
 
 import java.text.MessageFormat;
 
 import org.hamcrest.Matchers;
-import org.jboss.netty.buffer.ChannelBuffer;
-import org.jboss.netty.buffer.ChannelBuffers;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -36,12 +36,12 @@
 
     @Test
     public void testReadBytes() {
-        ChannelBuffer empty = ChannelBuffers.wrappedBuffer(new byte[16]);
+        ByteBuf empty = Unpooled.wrappedBuffer(new byte[16]);
         U128 uEmpty = U128.read16Bytes(empty);
         assertThat(uEmpty.getMsb(), equalTo(0L));
         assertThat(uEmpty.getLsb(), equalTo(0L));
 
-        ChannelBuffer value = ChannelBuffers.wrappedBuffer(
+        ByteBuf value = Unpooled.wrappedBuffer(
                 new byte[] { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88,
                         (byte) 0x99, (byte) 0xaa, (byte) 0xbb, (byte) 0xcc, (byte) 0xdd,
                         (byte) 0xee, (byte) 0xff, 0x11 });
diff --git a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/VxlanNITest.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/VxlanNITest.java
new file mode 100644
index 0000000..818dd07
--- /dev/null
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/VxlanNITest.java
@@ -0,0 +1,50 @@
+package org.projectfloodlight.openflow.types;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+
+import org.junit.Test;
+
+
+public class VxlanNITest {
+
+    @Test
+    public void testValidMaxVni() {
+        VxlanNI.ofVni(0x00ffffff);
+    }
+
+    @Test
+    public void testValidMinVni() {
+        VxlanNI.ofVni(0x0000001);
+    }
+
+    @Test
+    public void testVniEquals() {
+        assertEquals((int)VxlanNI.ofVni(0x01).getVni(), 0x01);
+        assertEquals((int)VxlanNI.ofVni(0x00ffFFff).getVni(), 0x00ffFFff);
+    }
+
+    @Test
+    public void testVniObjects() {
+        VxlanNI o = VxlanNI.ofVni(0x00ffFFff);
+        VxlanNI m = VxlanNI.ofVni(0x00ffFFff);
+        assertEquals(o.compareTo(m), 0);
+        assertEquals(o.getVni(), m.getVni());
+        assertFalse(!o.equals(m));
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testInvalidVni1() {
+        VxlanNI.ofVni(0xFFffFFff);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testInvalidVni2() {
+        VxlanNI.ofVni(0x0FffFFff);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void testInvalidVni3() {
+        VxlanNI.ofVni(0x01FffFFff);
+    }
+}
diff --git a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/util/HexStringTest.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/util/HexStringTest.java
index 360cb5a..ca5df98 100644
--- a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/util/HexStringTest.java
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/util/HexStringTest.java
@@ -17,14 +17,21 @@
 
 package org.projectfloodlight.openflow.util;
 
+import static org.hamcrest.Matchers.equalTo;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+import java.util.Random;
 
 import org.junit.Test;
 
+import com.google.common.collect.ImmutableList;
+
 /**
  * Does hexstring conversion work?
  *
  * @author Rob Sherwood (rob.sherwood@stanford.edu)
+ * @author Andreas Wundsam <andreas.wundsam@bigswitch.com>
  */
 public class HexStringTest {
 
@@ -41,7 +48,7 @@
         String dpidStr = "3e:1f:01:fc:72:8c:63:31";
         long valid = 0x3e1f01fc728c6331L;
         long testLong = HexString.toLong(dpidStr);
-        assertEquals(valid, testLong);
+        assertEquals("was: " + Long.toHexString(testLong), valid, testLong);
     }
 
     @Test
@@ -49,7 +56,7 @@
         String dpidStr = "1f:1:fc:72:3:f:31";
         long valid = 0x1f01fc72030f31L;
         long testLong = HexString.toLong(dpidStr);
-        assertEquals(valid, testLong);
+        assertEquals("was: " + Long.toHexString(testLong), valid, testLong);
     }
 
     @Test
@@ -76,13 +83,17 @@
     }
 
     @Test(expected=NumberFormatException.class)
+    public void testToLongErrorColonAtEnd() {
+        HexString.toLong("03:01:");
+    }
+
+    @Test(expected=NumberFormatException.class)
     public void testToLongErrorInvalidHexDigit() {
         HexString.toLong("ss:01");
     }
 
-    @Test(expected=NumberFormatException.class)
     public void testToLongErrorEmptyString() {
-        HexString.toLong("");
+        assertThat(HexString.toLong(""), equalTo(0L));
     }
 
 
@@ -94,10 +105,138 @@
         assertEquals(valid, testString);
     }
 
-    @Test(expected=NumberFormatException.class)
-    public void testFromHexStringError() {
-        String invalidStr = "00:00:00:00:00:00:ffff";
-        HexString.fromHexString(invalidStr);
+    @Test
+    public void testToStringBytes2() {
+        byte[] dpid = { 1, 2, 3, 4 };
+        String valid = "01:02:03:04";
+        String testString = HexString.toHexString(dpid);
+        assertEquals(valid, testString);
     }
+
+    @Test
+    public void testToStringBytes3() {
+        byte[] dpid = { (byte) 0xff };
+        String valid = "ff";
+        String testString = HexString.toHexString(dpid);
+        assertEquals(valid, testString);
+    }
+
+    @Test
+    public void testToStringEmpty() {
+        byte[] dpid = { };
+        String valid = "";
+        String testString = HexString.toHexString(dpid);
+        assertEquals(valid, testString);
+    }
+
+    @Test
+    public void testToStringLong() {
+        byte[] dpid = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
+        String valid = "01:02:03:04:05:06:07:08:09:0a:0b:0c:0d:0e:0f";
+        String testString = HexString.toHexString(dpid);
+        assertEquals(valid, testString);
+    }
+
+    @Test
+    public void testToZero() {
+        byte[] dpid = { 0, 0, 0, 0};
+        String valid = "00:00:00:00";
+        String testString = HexString.toHexString(dpid);
+        assertEquals(valid, testString);
+    }
+
+    @Test
+    public void testToStringFromLong() {
+        assertThat(HexString.toHexString(0x0L), equalTo("00:00:00:00:00:00:00:00"));
+        assertThat(HexString.toHexString(0x00_00_00_00_00_00_00_01L), equalTo("00:00:00:00:00:00:00:01"));
+        assertThat(HexString.toHexString(0x01_02_03_04_05_06_07_08L), equalTo("01:02:03:04:05:06:07:08"));
+        assertThat(HexString.toHexString(0x00_00_ff_fe_fd_fc_fb_fa_f9_f8L), equalTo("ff:fe:fd:fc:fb:fa:f9:f8"));
+        assertThat(HexString.toHexString(0x80_70_60_50_40_30_20_10L), equalTo("80:70:60:50:40:30:20:10"));
+    }
+
+    @Test
+    public void testToStringFromLongPad6() {
+        assertThat(HexString.toHexString(0x0L, 6), equalTo("00:00:00:00:00:00"));
+        assertThat(HexString.toHexString(0x00_00_00_00_00_00_00_01L, 6), equalTo("00:00:00:00:00:01"));
+        assertThat(HexString.toHexString(0x00_00_01_02_03_04_05_06L, 6), equalTo("01:02:03:04:05:06"));
+        assertThat(HexString.toHexString(0x00_00_ff_fe_fd_fc_fb_faL, 6), equalTo("ff:fe:fd:fc:fb:fa"));
+        // when supplying a value longer than 6, it is displayed completely
+        assertThat(HexString.toHexString(0x80_70_60_50_40_30_20_10L, 6), equalTo("80:70:60:50:40:30:20:10"));
+    }
+
+    @Test
+    public void testToBytes() {
+        assertThat(HexString.toBytes(""), equalTo(new byte[]{}));
+        assertThat(HexString.toBytes("1"), equalTo(new byte[]{0x01}));
+        assertThat(HexString.toBytes("f"), equalTo(new byte[]{0x0f}));
+        assertThat(HexString.toBytes("10"), equalTo(new byte[]{(byte) 0x10}));
+        assertThat(HexString.toBytes("80"), equalTo(new byte[]{(byte) 0x80}));
+        assertThat(HexString.toBytes("ff"), equalTo(new byte[]{(byte) 0xff}));
+        assertThat(HexString.toBytes("0:0"), equalTo(new byte[]{(byte) 0x00, 0x00}));
+        assertThat(HexString.toBytes("00:00"), equalTo(new byte[]{(byte) 0x00, 0x00}));
+        assertThat(HexString.toBytes("0:1"), equalTo(new byte[]{(byte) 0x00, 0x01}));
+        assertThat(HexString.toBytes("00:1"), equalTo(new byte[]{(byte) 0x00, 0x01}));
+        assertThat(HexString.toBytes("0:01"), equalTo(new byte[]{(byte) 0x00, 0x01}));
+        assertThat(HexString.toBytes("1:0"), equalTo(new byte[]{(byte) 0x01, 0x00}));
+        assertThat(HexString.toBytes("01:00"), equalTo(new byte[]{(byte) 0x01, 0x00}));
+        assertThat(HexString.toBytes("01:02:03:04"), equalTo(new byte[]{(byte) 0x01, 0x02, 03, 04}));
+        assertThat(HexString.toBytes("ff:fe:03:04"), equalTo(new byte[]{(byte) 0xff, (byte) 0xfe, 03, 04}));
+        assertThat(HexString.toBytes("ff:fe:3:4"), equalTo(new byte[]{(byte) 0xff, (byte) 0xfe, 03, 04}));
+        assertThat(HexString.toBytes("01:02:03:04:05:06"), equalTo(new byte[]{0x01, 0x02, 0x03, 0x04, 0x05, 0x06 }));
+        assertThat(HexString.toBytes("ff:1:fe:2:fd"),
+                equalTo(new byte[]{(byte) 0xff, 0x01, (byte) 0xfe, 0x02, (byte) 0xfd}));
+
+    }
+    @Test
+    public void testToBytesRandom() {
+        Random r = new Random();
+        for(int length: ImmutableList.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 15, 16, 32, 63, 64, 128, 255, 256, 511, 512, 1023, 1024)) {
+            StringBuilder build = new StringBuilder();
+            byte[] bytes = new byte[length];
+            for(int i=0; i<length; i++) {
+                byte b = (byte) r.nextInt(256);
+                build.append(String.format("%02x", b));
+                if(i < length-1) {
+                    build.append(":");
+                }
+                bytes[i] = b;
+            }
+            assertThat("For length "+ length + ", ",
+                    HexString.toBytes(build.toString()),
+                    equalTo(bytes));
+        }
+    }
+
+    @Test(expected=NumberFormatException.class)
+    public void testToBytesError() {
+        String invalidStr = "00:00:00:00:00:00:ffff";
+        HexString.toBytes(invalidStr);
+    }
+
+
+    @Test(expected=NumberFormatException.class)
+    public void testToBytesError2() {
+        String invalidStr = ":01:02:03";
+        HexString.toBytes(invalidStr);
+    }
+
+    @Test(expected=NumberFormatException.class)
+    public void testToBytesError3() {
+        String invalidStr = "01::02:03";
+        HexString.toBytes(invalidStr);
+    }
+
+    @Test(expected=NumberFormatException.class)
+    public void testBoBytesError4() {
+        String invalidStr = "01:02:03:";
+        HexString.toBytes(invalidStr);
+    }
+
+    @Test(expected=NumberFormatException.class)
+    public void testtoBytesError5() {
+        String invalidStr = "01:0X";
+        HexString.toBytes(invalidStr);
+    }
+
 }
 
diff --git a/java_gen/pre-written/src/test/java/org/projectfloodlight/protocol/OFBundleAddTest.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/protocol/OFBundleAddTest.java
new file mode 100644
index 0000000..48a80c4
--- /dev/null
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/protocol/OFBundleAddTest.java
@@ -0,0 +1,74 @@
+package org.projectfloodlight.protocol;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.projectfloodlight.openflow.protocol.OFBundleAddMsg;
+import org.projectfloodlight.openflow.protocol.OFFactories;
+import org.projectfloodlight.openflow.protocol.OFFactory;
+import org.projectfloodlight.openflow.protocol.OFFlowAdd;
+import org.projectfloodlight.openflow.protocol.OFVersion;
+import org.projectfloodlight.openflow.types.BundleId;
+
+/** Custom tests that validate that BundleAdd messages inherit the XID from their
+ *  contained message, as per OF Spec 1.4.0:
+ *  <p>
+ *  7.3.9.6 Adding messages to a bundle
+ *  <p>
+ *     Message added in a bundle should have a unique xid to help matching errors to messages,
+ *     and the xid of the bundle add message must be the same.
+ *  </p>
+ *
+ * @author Andreas Wundsam <andreas.wundsam@bigswitch.com>
+ */
+public class OFBundleAddTest {
+    private final OFFactory factory = OFFactories.getFactory(OFVersion.OF_14);
+    private OFFlowAdd flowAdd;
+
+    @Before
+    public void setup() {
+        flowAdd = factory.buildFlowAdd().build();
+
+    }
+
+    @Test
+    public void testBundleAddBuilder() {
+        OFBundleAddMsg bundleAdd = createBundleAdd();
+        assertThat(bundleAdd.getXid(), equalTo(flowAdd.getXid()));
+    }
+
+    private OFBundleAddMsg createBundleAdd() {
+        return factory.buildBundleAddMsg()
+                .setBundleId(BundleId.of(1))
+                .setData(flowAdd)
+                .build();
+    }
+
+    @Test
+    public void testBundleAddBuilderWithParent() {
+        OFBundleAddMsg bundleAdd = createBundleAdd();
+
+        // validate BuilderWithParent
+        OFBundleAddMsg builtFromOtherMessage = bundleAdd.createBuilder()
+           .build();
+
+        assertThat(builtFromOtherMessage.getXid(), equalTo(builtFromOtherMessage.getData().getXid()));
+    }
+
+    @Test
+    public void testBundleAddBuilderWithParentOverwrite() {
+        OFFlowAdd flowAdd2 = factory.buildFlowAdd().setXid(1234L).build();
+
+        // BuilderWithParent, overwrite with new message
+        OFBundleAddMsg bundleAdd = createBundleAdd();
+
+        OFBundleAddMsg builtFromOtherMessage = bundleAdd.createBuilder()
+           .setData(flowAdd2)
+           .build();
+
+        assertThat(builtFromOtherMessage.getXid(), equalTo(flowAdd2.getXid()));
+    }
+
+}
diff --git a/java_gen/pre-written/src/test/java/org/projectfloodlight/protocol/match/OFMatchPrerequisitesTest.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/protocol/match/OFMatchPrerequisitesTest.java
new file mode 100644
index 0000000..89cd536
--- /dev/null
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/protocol/match/OFMatchPrerequisitesTest.java
@@ -0,0 +1,86 @@
+package org.projectfloodlight.protocol.match;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+import static org.projectfloodlight.openflow.protocol.match.MatchField.ETH_TYPE;
+import static org.projectfloodlight.openflow.protocol.match.MatchField.IPV4_SRC;
+
+import java.util.Arrays;
+
+import org.hamcrest.Matchers;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+import org.projectfloodlight.openflow.protocol.OFFactories;
+import org.projectfloodlight.openflow.protocol.OFFactory;
+import org.projectfloodlight.openflow.protocol.OFVersion;
+import org.projectfloodlight.openflow.protocol.match.Match;
+import org.projectfloodlight.openflow.protocol.match.MatchField;
+import org.projectfloodlight.openflow.types.EthType;
+import org.projectfloodlight.openflow.types.IPv4Address;
+
+@RunWith(Parameterized.class)
+public class OFMatchPrerequisitesTest {
+    private final OFFactory factory;
+
+    @Parameters(name="{index}.ChannelHandlerVersion={0}")
+    public static Iterable<Object[]> data() {
+        return Arrays.asList(new Object[][] {
+                {OFVersion.OF_10},
+                {OFVersion.OF_13},
+                {OFVersion.OF_14}
+        });
+    }
+
+    public OFMatchPrerequisitesTest(OFVersion version) {
+        factory = OFFactories.getFactory(version);
+    }
+
+    @Test
+    public void testPreRequisitesNotMet() {
+        Match match = factory.buildMatch()
+           .setExact(ETH_TYPE, EthType.IPv6)
+           .setExact(IPV4_SRC, IPv4Address.of("1.2.3.4"))
+           .build();
+
+        assertThat(match.get(ETH_TYPE), equalTo(EthType.IPv6));
+        assertThat(match.isExact(ETH_TYPE), equalTo(true));
+        assertThat(match.isPartiallyMasked(ETH_TYPE), equalTo(false));
+        assertThat(match.isFullyWildcarded(ETH_TYPE), equalTo(false));
+
+        assertThat(match.get(IPV4_SRC), nullValue());
+        assertThat(match.isExact(IPV4_SRC), equalTo(false));
+        assertThat(match.isPartiallyMasked(IPV4_SRC), equalTo(false));
+        assertThat(match.isFullyWildcarded(IPV4_SRC), equalTo(true));
+
+        Iterable<MatchField<?>> matchFields = match.getMatchFields();
+        assertThat(matchFields, Matchers.<MatchField<?>>iterableWithSize(1));
+        assertThat(matchFields, Matchers.<MatchField<?>>contains(MatchField.ETH_TYPE));
+    }
+
+    @Test
+    public void testPreRequisitesMet() {
+        Match match = factory.buildMatch()
+           .setExact(ETH_TYPE, EthType.IPv4)
+           .setExact(IPV4_SRC, IPv4Address.of("1.2.3.4"))
+           .build();
+
+        assertThat(match.get(ETH_TYPE), equalTo(EthType.IPv4));
+        assertThat(match.isExact(ETH_TYPE), equalTo(true));
+        assertThat(match.isPartiallyMasked(ETH_TYPE), equalTo(false));
+        assertThat(match.isFullyWildcarded(ETH_TYPE), equalTo(false));
+
+        assertThat(match.get(IPV4_SRC), equalTo(IPv4Address.of("1.2.3.4")));
+        assertThat(match.isExact(IPV4_SRC), equalTo(true));
+        assertThat(match.isPartiallyMasked(IPV4_SRC), equalTo(false));
+        assertThat(match.isFullyWildcarded(IPV4_SRC), equalTo(false));
+
+        Iterable<MatchField<?>> matchFields = match.getMatchFields();
+        assertThat(matchFields, Matchers.<MatchField<?>>iterableWithSize(2));
+        assertThat(matchFields, Matchers.<MatchField<?>>contains(MatchField.ETH_TYPE, MatchField.IPV4_SRC));
+    }
+
+
+}
diff --git a/java_gen/templates/_field_accessors.java b/java_gen/templates/_field_accessors.java
index 41ac66f..46a79b6 100644
--- a/java_gen/templates/_field_accessors.java
+++ b/java_gen/templates/_field_accessors.java
@@ -16,7 +16,7 @@
         return ${version_prop.enum_value};
 //::    elif version_prop.is_length_value:
         // FIXME: Hacky and inperformant way to determine a message length. Should be replaced with something better
-        ChannelBuffer c = new LengthCountingPseudoChannelBuffer();
+        ByteBuf c = new LengthCountingPseudoByteBuf();
         WRITER.write(c, ${ "this" if not builder else "({0}) this.getMessage()".format(msg.name) });
         return c.writerIndex();
 //::    else:
@@ -28,7 +28,7 @@
     }
 //:: #endif
 
-//:: if generate_setters and prop.is_writeable:
+//:: if generate_setters and prop.needs_setter:
     //:: setter_template_file_name = "%s/custom/%s_%s.java" % (template_dir, msg.name if not builder else msg.name + '.Builder', prop.setter_name)
     //:: if os.path.exists(setter_template_file_name):
     //:: include(setter_template_file_name, msg=msg, builder=builder, has_parent=has_parent)
@@ -36,12 +36,14 @@
     //:: else:
     @Override
     public ${msg.interface.name}.Builder ${prop.setter_name}(${prop.java_type.public_type} ${prop.name})${ "" if prop in msg.members else " throws UnsupportedOperationException"} {
-        //:: if prop in msg.members:
+        //:: if prop.is_writeable and prop in msg.members:
         this.${prop.name} = ${prop.name};
         this.${prop.name}Set = true;
         return this;
-        //:: else:
+        //:: elif prop.is_writeable:
             throw new UnsupportedOperationException("Property ${prop.name} not supported in version #{version}");
+        //:: else:
+            throw new UnsupportedOperationException("Property ${prop.name} is not writeable");
         //:: #endif
     }
     //:: #endif
diff --git a/java_gen/templates/_imports.java b/java_gen/templates/_imports.java
index f84efbe..b64865f 100644
--- a/java_gen/templates/_imports.java
+++ b/java_gen/templates/_imports.java
@@ -16,15 +16,17 @@
 import org.projectfloodlight.openflow.protocol.instruction.*;
 import org.projectfloodlight.openflow.protocol.instructionid.*;
 import org.projectfloodlight.openflow.protocol.match.*;
+import org.projectfloodlight.openflow.protocol.stat.*;
 import org.projectfloodlight.openflow.protocol.oxm.*;
+import org.projectfloodlight.openflow.protocol.oxs.*;
 import org.projectfloodlight.openflow.protocol.queueprop.*;
 import org.projectfloodlight.openflow.types.*;
 import org.projectfloodlight.openflow.util.*;
 import org.projectfloodlight.openflow.exceptions.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.jboss.netty.buffer.ChannelBuffer;
-import org.jboss.netty.buffer.ChannelBuffers;
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.Unpooled;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Sets;
diff --git a/java_gen/templates/const_serializer.java b/java_gen/templates/const_serializer.java
index 03ca8ac..9af3a40 100644
--- a/java_gen/templates/const_serializer.java
+++ b/java_gen/templates/const_serializer.java
@@ -44,7 +44,7 @@
     public final static ${int_wire_type} ${entry.name}_VAL = ${entry.format_value(version)};
     //:: #endfor
 
-    public static ${enum.name} readFrom(ChannelBuffer bb) throws OFParseError {
+    public static ${enum.name} readFrom(ByteBuf bb) throws OFParseError {
         try {
             return ofWireValue(${wire_type.read_op(version)});
         } catch (IllegalArgumentException e) {
@@ -52,7 +52,7 @@
         }
     }
 
-    public static void writeTo(ChannelBuffer bb, ${enum.name} e) {
+    public static void writeTo(ByteBuf bb, ${enum.name} e) {
         ${wire_type.write_op(version=version, name="toWireValue(e)")};
     }
 
diff --git a/java_gen/templates/const_set_serializer.java b/java_gen/templates/const_set_serializer.java
index 61592a6..35e9c86 100644
--- a/java_gen/templates/const_set_serializer.java
+++ b/java_gen/templates/const_set_serializer.java
@@ -45,7 +45,7 @@
     public final static ${int_wire_type} ${entry.name}_VAL = ${entry.format_value(version)};
     //:: #endfor
 
-    public static Set<${enum.name}> readFrom(ChannelBuffer bb) throws OFParseError {
+    public static Set<${enum.name}> readFrom(ByteBuf bb) throws OFParseError {
         try {
             return ofWireValue(${wire_type.read_op(version)});
         } catch (IllegalArgumentException e) {
@@ -53,7 +53,7 @@
         }
     }
 
-    public static void writeTo(ChannelBuffer bb, Set<${enum.name}> set) {
+    public static void writeTo(ByteBuf bb, Set<${enum.name}> set) {
         ${wire_type.write_op(version=version, name="toWireValue(set)")};
     }
 
diff --git a/java_gen/templates/custom/OFBundleAddMsg.Builder_setData.java b/java_gen/templates/custom/OFBundleAddMsg.Builder_setData.java
new file mode 100644
index 0000000..0a59131
--- /dev/null
+++ b/java_gen/templates/custom/OFBundleAddMsg.Builder_setData.java
@@ -0,0 +1,15 @@
+    /** Custom setter that ensures the BundleAdd message inherits the XID from their
+     *  contained message, as per OF Spec 1.4.0:
+     *  <p>
+     *  7.3.9.6 Adding messages to a bundle
+     *  </p><p>
+     *     Message added in a bundle should have a unique xid to help matching errors to messages,
+     *     and the xid of the bundle add message must be the same.
+     *  </p>
+     */
+    @Override
+    public OFBundleAddMsg.Builder setData(OFMessage data) {
+        this.data = data;
+        this.dataSet = true;
+        return setXid(data.getXid());
+    }
diff --git a/java_gen/templates/custom/OFBundleAddMsgVer14.Builder_setData.java b/java_gen/templates/custom/OFBundleAddMsgVer14.Builder_setData.java
new file mode 100644
index 0000000..638415f
--- /dev/null
+++ b/java_gen/templates/custom/OFBundleAddMsgVer14.Builder_setData.java
@@ -0,0 +1 @@
+//:: include("custom/OFBundleAddMsg.Builder_setData.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowAdd.Builder_getActions.java
similarity index 99%
rename from java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_getActions.java
rename to java_gen/templates/custom/OFFlowAdd.Builder_getActions.java
index ce71981..d4ed242 100644
--- a/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_getActions.java
+++ b/java_gen/templates/custom/OFFlowAdd.Builder_getActions.java
@@ -16,4 +16,4 @@
             }
         }
         return Collections.emptyList();
-    }
\ No newline at end of file
+    }
diff --git a/java_gen/templates/custom/OFFlowAdd.Builder_setActions.java b/java_gen/templates/custom/OFFlowAdd.Builder_setActions.java
new file mode 100644
index 0000000..84a77b1
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAdd.Builder_setActions.java
@@ -0,0 +1,9 @@
+
+    @Override
+    public ${msg.interface.name}.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
+        OFInstructionApplyActionsVer${version.dotless_version}.Builder builder = new OFInstructionApplyActionsVer${version.dotless_version}.Builder();
+        builder.setActions(actions);
+        this.instructions = Collections.singletonList((OFInstruction)builder.build());
+        this.instructionsSet = true;
+        return this;
+    }
diff --git a/java_gen/templates/custom/OFFlowAddVer11.Builder_getActions.java b/java_gen/templates/custom/OFFlowAddVer11.Builder_getActions.java
new file mode 100644
index 0000000..8852fad
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer11.Builder_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowAddVer11.Builder_setActions.java b/java_gen/templates/custom/OFFlowAddVer11.Builder_setActions.java
new file mode 100644
index 0000000..89118a0
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer11.Builder_setActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowAddVer11_getActions.java b/java_gen/templates/custom/OFFlowAddVer11_getActions.java
new file mode 100644
index 0000000..7a6f91f
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer11_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowAddVer12.Builder_getActions.java b/java_gen/templates/custom/OFFlowAddVer12.Builder_getActions.java
new file mode 100644
index 0000000..8852fad
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer12.Builder_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowAddVer12.Builder_setActions.java b/java_gen/templates/custom/OFFlowAddVer12.Builder_setActions.java
new file mode 100644
index 0000000..89118a0
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer12.Builder_setActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowAddVer12_getActions.java b/java_gen/templates/custom/OFFlowAddVer12_getActions.java
new file mode 100644
index 0000000..7a6f91f
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer12_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowAddVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowAddVer13.Builder_getActions.java
index ce71981..8852fad 100644
--- a/java_gen/templates/custom/OFFlowAddVer13.Builder_getActions.java
+++ b/java_gen/templates/custom/OFFlowAddVer13.Builder_getActions.java
@@ -1,19 +1 @@
-
-    @Override
-    public List<OFAction> getActions()throws UnsupportedOperationException {
-//:: if builder:
-        if (!this.instructionsSet)
-//:: if has_parent:
-            return parentMessage.getActions();
-//:: else:
-            return Collections.emptyList();
-//:: #endif
-//:: #endif
-        for (OFInstruction inst : this.instructions) {
-            if (inst instanceof OFInstructionApplyActions) {
-                OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
-                return iap.getActions();
-            }
-        }
-        return Collections.emptyList();
-    }
\ No newline at end of file
+//:: include("custom/OFFlowAdd.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowAddVer13.Builder_setActions.java b/java_gen/templates/custom/OFFlowAddVer13.Builder_setActions.java
index 725de24..89118a0 100644
--- a/java_gen/templates/custom/OFFlowAddVer13.Builder_setActions.java
+++ b/java_gen/templates/custom/OFFlowAddVer13.Builder_setActions.java
@@ -1,9 +1 @@
-
-    @Override
-    public OFFlowAdd.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
-        OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
-        builder.setActions(actions);
-        this.instructions = Collections.singletonList((OFInstruction)builder.build());
-        this.instructionsSet = true;
-        return this;
-    }
\ No newline at end of file
+//:: include("custom/OFFlowAdd.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowAddVer13_getActions.java b/java_gen/templates/custom/OFFlowAddVer13_getActions.java
index eb7799a..7a6f91f 100644
--- a/java_gen/templates/custom/OFFlowAddVer13_getActions.java
+++ b/java_gen/templates/custom/OFFlowAddVer13_getActions.java
@@ -1,11 +1 @@
-
-    @Override
-    public List<OFAction> getActions()throws UnsupportedOperationException {
-        for (OFInstruction inst : this.instructions) {
-            if (inst instanceof OFInstructionApplyActions) {
-                OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
-                return iap.getActions();
-            }
-        }
-        return Collections.emptyList();
-    }
\ No newline at end of file
+//:: include("custom/OFFlowAdd_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowAddVer14.Builder_getActions.java b/java_gen/templates/custom/OFFlowAddVer14.Builder_getActions.java
new file mode 100644
index 0000000..8852fad
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer14.Builder_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowAddVer14.Builder_setActions.java b/java_gen/templates/custom/OFFlowAddVer14.Builder_setActions.java
new file mode 100644
index 0000000..89118a0
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer14.Builder_setActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowAddVer14_getActions.java b/java_gen/templates/custom/OFFlowAddVer14_getActions.java
new file mode 100644
index 0000000..7a6f91f
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer14_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowAddVer15.Builder_getActions.java b/java_gen/templates/custom/OFFlowAddVer15.Builder_getActions.java
new file mode 100644
index 0000000..8852fad
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer15.Builder_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowAddVer15.Builder_setActions.java b/java_gen/templates/custom/OFFlowAddVer15.Builder_setActions.java
new file mode 100644
index 0000000..89118a0
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer15.Builder_setActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowAddVer15_getActions.java b/java_gen/templates/custom/OFFlowAddVer15_getActions.java
new file mode 100644
index 0000000..7a6f91f
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowAddVer15_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowDeleteStrictVer13_getActions.java b/java_gen/templates/custom/OFFlowAdd_getActions.java
similarity index 99%
rename from java_gen/templates/custom/OFFlowDeleteStrictVer13_getActions.java
rename to java_gen/templates/custom/OFFlowAdd_getActions.java
index eb7799a..c128a68 100644
--- a/java_gen/templates/custom/OFFlowDeleteStrictVer13_getActions.java
+++ b/java_gen/templates/custom/OFFlowAdd_getActions.java
@@ -8,4 +8,4 @@
             }
         }
         return Collections.emptyList();
-    }
\ No newline at end of file
+    }
diff --git a/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_setActions.java b/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_setActions.java
deleted file mode 100644
index b2dafe5..0000000
--- a/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_setActions.java
+++ /dev/null
@@ -1,9 +0,0 @@
-
-    @Override
-    public OFFlowDeleteStrict.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
-        OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
-        builder.setActions(actions);
-        this.instructions = Collections.singletonList((OFInstruction)builder.build());
-        this.instructionsSet = true;
-        return this;
-    }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowDeleteVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowDeleteVer13.Builder_getActions.java
deleted file mode 100644
index ce71981..0000000
--- a/java_gen/templates/custom/OFFlowDeleteVer13.Builder_getActions.java
+++ /dev/null
@@ -1,19 +0,0 @@
-
-    @Override
-    public List<OFAction> getActions()throws UnsupportedOperationException {
-//:: if builder:
-        if (!this.instructionsSet)
-//:: if has_parent:
-            return parentMessage.getActions();
-//:: else:
-            return Collections.emptyList();
-//:: #endif
-//:: #endif
-        for (OFInstruction inst : this.instructions) {
-            if (inst instanceof OFInstructionApplyActions) {
-                OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
-                return iap.getActions();
-            }
-        }
-        return Collections.emptyList();
-    }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowDeleteVer13.Builder_setActions.java b/java_gen/templates/custom/OFFlowDeleteVer13.Builder_setActions.java
deleted file mode 100644
index 5576aaa..0000000
--- a/java_gen/templates/custom/OFFlowDeleteVer13.Builder_setActions.java
+++ /dev/null
@@ -1,9 +0,0 @@
-
-    @Override
-    public OFFlowDelete.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
-        OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
-        builder.setActions(actions);
-        this.instructions = Collections.singletonList((OFInstruction)builder.build());
-        this.instructionsSet = true;
-        return this;
-    }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowDeleteVer13_getActions.java b/java_gen/templates/custom/OFFlowDeleteVer13_getActions.java
deleted file mode 100644
index eb7799a..0000000
--- a/java_gen/templates/custom/OFFlowDeleteVer13_getActions.java
+++ /dev/null
@@ -1,11 +0,0 @@
-
-    @Override
-    public List<OFAction> getActions()throws UnsupportedOperationException {
-        for (OFInstruction inst : this.instructions) {
-            if (inst instanceof OFInstructionApplyActions) {
-                OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
-                return iap.getActions();
-            }
-        }
-        return Collections.emptyList();
-    }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowModify.Builder_getActions.java b/java_gen/templates/custom/OFFlowModify.Builder_getActions.java
new file mode 100644
index 0000000..8852fad
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModify.Builder_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModify.Builder_setActions.java b/java_gen/templates/custom/OFFlowModify.Builder_setActions.java
new file mode 100644
index 0000000..89118a0
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModify.Builder_setActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrict.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyStrict.Builder_getActions.java
new file mode 100644
index 0000000..8852fad
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrict.Builder_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrict.Builder_setActions.java b/java_gen/templates/custom/OFFlowModifyStrict.Builder_setActions.java
new file mode 100644
index 0000000..89118a0
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrict.Builder_setActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer11.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer11.Builder_getActions.java
new file mode 100644
index 0000000..0c6581a
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer11.Builder_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModifyStrict.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer11.Builder_setActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer11.Builder_setActions.java
new file mode 100644
index 0000000..e1f198a
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer11.Builder_setActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModifyStrict.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer11_getActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer11_getActions.java
new file mode 100644
index 0000000..a81bd15
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer11_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModifyStrict_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer12.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer12.Builder_getActions.java
new file mode 100644
index 0000000..0c6581a
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer12.Builder_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModifyStrict.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer12.Builder_setActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer12.Builder_setActions.java
new file mode 100644
index 0000000..e1f198a
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer12.Builder_setActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModifyStrict.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer12_getActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer12_getActions.java
new file mode 100644
index 0000000..a81bd15
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer12_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModifyStrict_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_getActions.java
index ce71981..0c6581a 100644
--- a/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_getActions.java
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_getActions.java
@@ -1,19 +1 @@
-
-    @Override
-    public List<OFAction> getActions()throws UnsupportedOperationException {
-//:: if builder:
-        if (!this.instructionsSet)
-//:: if has_parent:
-            return parentMessage.getActions();
-//:: else:
-            return Collections.emptyList();
-//:: #endif
-//:: #endif
-        for (OFInstruction inst : this.instructions) {
-            if (inst instanceof OFInstructionApplyActions) {
-                OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
-                return iap.getActions();
-            }
-        }
-        return Collections.emptyList();
-    }
\ No newline at end of file
+//:: include("custom/OFFlowModifyStrict.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_setActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_setActions.java
index fc04079..e1f198a 100644
--- a/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_setActions.java
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_setActions.java
@@ -1,9 +1 @@
-
-    @Override
-    public OFFlowModifyStrict.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
-        OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
-        builder.setActions(actions);
-        this.instructions = Collections.singletonList((OFInstruction)builder.build());
-        this.instructionsSet = true;
-        return this;
-    }
\ No newline at end of file
+//:: include("custom/OFFlowModifyStrict.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer13_getActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer13_getActions.java
index eb7799a..a81bd15 100644
--- a/java_gen/templates/custom/OFFlowModifyStrictVer13_getActions.java
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer13_getActions.java
@@ -1,11 +1 @@
-
-    @Override
-    public List<OFAction> getActions()throws UnsupportedOperationException {
-        for (OFInstruction inst : this.instructions) {
-            if (inst instanceof OFInstructionApplyActions) {
-                OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
-                return iap.getActions();
-            }
-        }
-        return Collections.emptyList();
-    }
\ No newline at end of file
+//:: include("custom/OFFlowModifyStrict_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer14.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer14.Builder_getActions.java
new file mode 100644
index 0000000..0c6581a
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer14.Builder_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModifyStrict.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer14.Builder_setActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer14.Builder_setActions.java
new file mode 100644
index 0000000..e1f198a
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer14.Builder_setActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModifyStrict.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer14_getActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer14_getActions.java
new file mode 100644
index 0000000..a81bd15
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer14_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModifyStrict_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer15.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer15.Builder_getActions.java
new file mode 100644
index 0000000..0c6581a
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer15.Builder_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModifyStrict.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer15.Builder_setActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer15.Builder_setActions.java
new file mode 100644
index 0000000..e1f198a
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer15.Builder_setActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModifyStrict.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer15_getActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer15_getActions.java
new file mode 100644
index 0000000..a81bd15
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer15_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModifyStrict_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyStrict_getActions.java b/java_gen/templates/custom/OFFlowModifyStrict_getActions.java
new file mode 100644
index 0000000..7a6f91f
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyStrict_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer11.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyVer11.Builder_getActions.java
new file mode 100644
index 0000000..ded35c2
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer11.Builder_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModify.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer11.Builder_setActions.java b/java_gen/templates/custom/OFFlowModifyVer11.Builder_setActions.java
new file mode 100644
index 0000000..4942a15
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer11.Builder_setActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModify.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer11_getActions.java b/java_gen/templates/custom/OFFlowModifyVer11_getActions.java
new file mode 100644
index 0000000..2432665
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer11_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModify_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer12.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyVer12.Builder_getActions.java
new file mode 100644
index 0000000..ded35c2
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer12.Builder_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModify.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer12.Builder_setActions.java b/java_gen/templates/custom/OFFlowModifyVer12.Builder_setActions.java
new file mode 100644
index 0000000..4942a15
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer12.Builder_setActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModify.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer12_getActions.java b/java_gen/templates/custom/OFFlowModifyVer12_getActions.java
new file mode 100644
index 0000000..2432665
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer12_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModify_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyVer13.Builder_getActions.java
index ce71981..ded35c2 100644
--- a/java_gen/templates/custom/OFFlowModifyVer13.Builder_getActions.java
+++ b/java_gen/templates/custom/OFFlowModifyVer13.Builder_getActions.java
@@ -1,19 +1 @@
-
-    @Override
-    public List<OFAction> getActions()throws UnsupportedOperationException {
-//:: if builder:
-        if (!this.instructionsSet)
-//:: if has_parent:
-            return parentMessage.getActions();
-//:: else:
-            return Collections.emptyList();
-//:: #endif
-//:: #endif
-        for (OFInstruction inst : this.instructions) {
-            if (inst instanceof OFInstructionApplyActions) {
-                OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
-                return iap.getActions();
-            }
-        }
-        return Collections.emptyList();
-    }
\ No newline at end of file
+//:: include("custom/OFFlowModify.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer13.Builder_setActions.java b/java_gen/templates/custom/OFFlowModifyVer13.Builder_setActions.java
index 695b771..4942a15 100644
--- a/java_gen/templates/custom/OFFlowModifyVer13.Builder_setActions.java
+++ b/java_gen/templates/custom/OFFlowModifyVer13.Builder_setActions.java
@@ -1,9 +1 @@
-
-    @Override
-    public OFFlowModify.Builder setActions(List<OFAction> actions) throws UnsupportedOperationException {
-        OFInstructionApplyActionsVer13.Builder builder = new OFInstructionApplyActionsVer13.Builder();
-        builder.setActions(actions);
-        this.instructions = Collections.singletonList((OFInstruction)builder.build());
-        this.instructionsSet = true;
-        return this;
-    }
\ No newline at end of file
+//:: include("custom/OFFlowModify.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer13_getActions.java b/java_gen/templates/custom/OFFlowModifyVer13_getActions.java
index eb7799a..2432665 100644
--- a/java_gen/templates/custom/OFFlowModifyVer13_getActions.java
+++ b/java_gen/templates/custom/OFFlowModifyVer13_getActions.java
@@ -1,11 +1 @@
-
-    @Override
-    public List<OFAction> getActions()throws UnsupportedOperationException {
-        for (OFInstruction inst : this.instructions) {
-            if (inst instanceof OFInstructionApplyActions) {
-                OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
-                return iap.getActions();
-            }
-        }
-        return Collections.emptyList();
-    }
\ No newline at end of file
+//:: include("custom/OFFlowModify_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer14.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyVer14.Builder_getActions.java
new file mode 100644
index 0000000..ded35c2
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer14.Builder_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModify.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer14.Builder_setActions.java b/java_gen/templates/custom/OFFlowModifyVer14.Builder_setActions.java
new file mode 100644
index 0000000..4942a15
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer14.Builder_setActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModify.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer14_getActions.java b/java_gen/templates/custom/OFFlowModifyVer14_getActions.java
new file mode 100644
index 0000000..2432665
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer14_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModify_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer15.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyVer15.Builder_getActions.java
new file mode 100644
index 0000000..ded35c2
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer15.Builder_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModify.Builder_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer15.Builder_setActions.java b/java_gen/templates/custom/OFFlowModifyVer15.Builder_setActions.java
new file mode 100644
index 0000000..4942a15
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer15.Builder_setActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModify.Builder_setActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModifyVer15_getActions.java b/java_gen/templates/custom/OFFlowModifyVer15_getActions.java
new file mode 100644
index 0000000..2432665
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModifyVer15_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowModify_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFFlowModify_getActions.java b/java_gen/templates/custom/OFFlowModify_getActions.java
new file mode 100644
index 0000000..7a6f91f
--- /dev/null
+++ b/java_gen/templates/custom/OFFlowModify_getActions.java
@@ -0,0 +1 @@
+//:: include("custom/OFFlowAdd_getActions.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFGroupInsertBucketVer15.Builder.java b/java_gen/templates/custom/OFGroupInsertBucketVer15.Builder.java
new file mode 100644
index 0000000..194c458
--- /dev/null
+++ b/java_gen/templates/custom/OFGroupInsertBucketVer15.Builder.java
@@ -0,0 +1,19 @@
+
+    public List<OFBucket> insertBucketBasedOnCommandBucketId(OFBucket bucket) {
+        if(commandBucketId == null)
+            throw new IllegalStateException("CommandBucketId is null");
+        if(commandBucketId.equals(OFGroupBucket.BUCKET_FIRST))
+            buckets.add(0, bucket);
+        else if(commandBucketId.equals(OFGroupBucket.BUCKET_LAST))
+            buckets.add(buckets.size(), bucket);
+        return buckets;
+    }
+
+
+    public List<OFBucket> insertBucketBasedOnSpecificIndex(OFBucket bucket, int index) {
+        if(index <= buckets.size())
+            buckets.add(index,bucket);
+        else
+            throw new IllegalStateException("Index is not valid");
+        return buckets;
+    }
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFGroupRemoveBucketVer15.Builder.java b/java_gen/templates/custom/OFGroupRemoveBucketVer15.Builder.java
new file mode 100644
index 0000000..07ecadc
--- /dev/null
+++ b/java_gen/templates/custom/OFGroupRemoveBucketVer15.Builder.java
@@ -0,0 +1,21 @@
+
+    public List<OFBucket> removeBucketBasedOnCommandBucketId() {
+        if(commandBucketId == null)
+            throw new IllegalStateException("CommandBucketId is null");
+        if(commandBucketId.equals(OFGroupBucket.BUCKET_FIRST))
+            buckets.remove(0);
+        else if(commandBucketId.equals(OFGroupBucket.BUCKET_LAST))
+            buckets.remove(buckets.size()-1);
+        else if(commandBucketId.equals(OFGroupBucket.BUCKET_ALL))
+            buckets.removeAll(buckets);
+        return buckets;
+    }
+
+
+    public List<OFBucket> removeBucketBasedOnSpecificIndex(int index) {
+        if(index <= buckets.size())
+            buckets.remove(index);
+        else
+            throw new IllegalStateException("Index is not valid");
+        return buckets;
+    }
diff --git a/java_gen/templates/custom/OFMatchV1Ver10.Builder.java b/java_gen/templates/custom/OFMatchV1Ver10.Builder.java
index c4cb6bc..b8797fe 100644
--- a/java_gen/templates/custom/OFMatchV1Ver10.Builder.java
+++ b/java_gen/templates/custom/OFMatchV1Ver10.Builder.java
@@ -64,11 +64,11 @@
                 case SCTP_DST:
                     result = tcpDst;
                     break;
-                case ICMPV4_TYPE:
-                    result = tcpSrc;
+               case ICMPV4_TYPE:
+                    result = ICMPv4Type.of((short) tcpSrc.getPort());
                     break;
-                case ICMPV4_CODE:
-                    result = tcpDst;
+               case ICMPV4_CODE:
+                    result = ICMPv4Code.of((short) tcpDst.getPort());
                     break;
                 // NOT SUPPORTED:
                 default:
diff --git a/java_gen/templates/custom/OFMatchV1Ver10.java b/java_gen/templates/custom/OFMatchV1Ver10.java
index 8a24b2f..bb57596 100644
--- a/java_gen/templates/custom/OFMatchV1Ver10.java
+++ b/java_gen/templates/custom/OFMatchV1Ver10.java
@@ -101,10 +101,10 @@
                 result = tcpDst;
                 break;
             case ICMPV4_TYPE:
-                result = tcpSrc;
+                result = ICMPv4Type.of((short) tcpSrc.getPort());
                 break;
             case ICMPV4_CODE:
-                result = tcpDst;
+                result = ICMPv4Code.of((short) tcpDst.getPort());
                 break;
             // NOT SUPPORTED:
             default:
@@ -365,6 +365,8 @@
                 builder.add(MatchField.TCP_SRC);
             } else if (ipProto == IpProtocol.SCTP) {
                 builder.add(MatchField.SCTP_SRC);
+            } else if (ipProto == IpProtocol.ICMP) {
+                builder.add(MatchField.ICMPV4_TYPE);
             } else {
                 throw new UnsupportedOperationException(
                         "Unsupported IP protocol for matching on source port " + ipProto);
@@ -377,6 +379,8 @@
                 builder.add(MatchField.TCP_DST);
             } else if (ipProto == IpProtocol.SCTP) {
                 builder.add(MatchField.SCTP_DST);
+            } else if (ipProto == IpProtocol.ICMP) {
+                builder.add(MatchField.ICMPV4_CODE);
             } else {
                 throw new UnsupportedOperationException(
                         "Unsupported IP protocol for matching on destination port " + ipProto);
diff --git a/java_gen/templates/custom/OFMatchV3.java b/java_gen/templates/custom/OFMatchV3.java
index 799135c..bc97ca2 100644
--- a/java_gen/templates/custom/OFMatchV3.java
+++ b/java_gen/templates/custom/OFMatchV3.java
@@ -58,6 +58,9 @@
         if (!supports(field))
             throw new UnsupportedOperationException("${msg.name} does not support matching on field " + field.getName());
 
+        if(!field.arePrerequisitesOK(this))
+            return false;
+
         OFOxm<?> oxm = this.oxmList.get(field);
 
         return oxm != null && !oxm.isMasked();
@@ -67,6 +70,8 @@
     public boolean isFullyWildcarded(MatchField<?> field) {
         if (!supports(field))
             throw new UnsupportedOperationException("${msg.name} does not support matching on field " + field.getName());
+        if(!field.arePrerequisitesOK(this))
+            return true;
 
         OFOxm<?> oxm = this.oxmList.get(field);
 
@@ -77,6 +82,8 @@
     public boolean isPartiallyMasked(MatchField<?> field) {
         if (!supports(field))
             throw new UnsupportedOperationException("${msg.name} does not support matching on field " + field.getName());
+        if(!field.arePrerequisitesOK(this))
+            return false;
 
         OFOxm<?> oxm = this.oxmList.get(field);
 
diff --git a/java_gen/templates/custom/OFMatchV3Ver15.Builder.java b/java_gen/templates/custom/OFMatchV3Ver15.Builder.java
new file mode 100644
index 0000000..ae2ecaa
--- /dev/null
+++ b/java_gen/templates/custom/OFMatchV3Ver15.Builder.java
@@ -0,0 +1 @@
+//:: include("custom/OFMatchV3.Builder.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFMatchV3Ver15.java b/java_gen/templates/custom/OFMatchV3Ver15.java
new file mode 100644
index 0000000..225b0dc
--- /dev/null
+++ b/java_gen/templates/custom/OFMatchV3Ver15.java
@@ -0,0 +1 @@
+//:: include("custom/OFMatchV3.java", msg=msg, has_parent=False)
diff --git a/java_gen/templates/custom/OFMatchV3Ver15_toString.java b/java_gen/templates/custom/OFMatchV3Ver15_toString.java
new file mode 100644
index 0000000..3b2783b
--- /dev/null
+++ b/java_gen/templates/custom/OFMatchV3Ver15_toString.java
@@ -0,0 +1 @@
+//:: include("custom/OFMatch_toString.java", msg=msg, has_parent=False)
diff --git a/java_gen/templates/custom/OFOxs_getCanonical.java b/java_gen/templates/custom/OFOxs_getCanonical.java
new file mode 100644
index 0000000..f656faa
--- /dev/null
+++ b/java_gen/templates/custom/OFOxs_getCanonical.java
@@ -0,0 +1 @@
+//:: include("custom/OFOxm_getCanonical.java", msg=msg, version=version, has_parent=False)
diff --git a/java_gen/templates/custom/OFPortDesc.java b/java_gen/templates/custom/OFPortDesc.java
index ccfbedb..a2f05cf 100644
--- a/java_gen/templates/custom/OFPortDesc.java
+++ b/java_gen/templates/custom/OFPortDesc.java
@@ -13,7 +13,7 @@
      * Returns the current generation ID of this port.
      *
      * The generationId is reported by the switch as a @{link OFPortDescProp} in
-     * @link{OFPortDescStatsReply} and @link{OFPortStatus} messages. If the
+     * {@link OFPortDescStatsReply} and {@link OFPortStatus} messages. If the
      * current OFPortDesc does not contain a generation Id, returns U64.ZERO;
      *
      * For OpenFlow versions earlier than 1.4, always returns U64.ZERO;
diff --git a/java_gen/templates/custom/OFPortDescVer15.java b/java_gen/templates/custom/OFPortDescVer15.java
new file mode 100644
index 0000000..782a726
--- /dev/null
+++ b/java_gen/templates/custom/OFPortDescVer15.java
@@ -0,0 +1 @@
+//:: include("custom/OFPortDesc.java", msg=msg, has_parent=False)
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFStatV6.Builder.java b/java_gen/templates/custom/OFStatV6.Builder.java
new file mode 100644
index 0000000..3b19031
--- /dev/null
+++ b/java_gen/templates/custom/OFStatV6.Builder.java
@@ -0,0 +1,50 @@
+    private OFOxsList.Builder oxsFieldsBuilder;
+
+    private void initBuilder() {
+        if (oxsFieldsBuilder != null)
+            return;
+        oxsFieldsBuilder = new OFOxsList.Builder();
+    }
+
+    private void updateOxsList() {
+        this.oxsFields = this.oxsFieldsBuilder.build();
+        this.oxsFieldsSet = true;
+    }
+
+
+
+    @Override
+    public <F extends OFValueType<F>> F get(StatField<F> field) throws UnsupportedOperationException{
+        if (!supports(field))
+            throw new UnsupportedOperationException("${msg.name} does not support statistics on field " + field.getName());
+
+        OFOxs<F> oxs = getOxs(field);
+
+        if (oxs == null)
+            return null;
+
+        return oxs.getValue();
+    }
+
+    @Override
+    public <F extends OFValueType<F>> Stat.Builder set(StatField<F> field, F value) {
+        initBuilder();
+        OFOxs<F> oxs = OFFactories.getFactory(OFVersion.${version.constant_version}).oxss().fromValue(value, field);
+        this.oxsFieldsBuilder.set(oxs);
+        updateOxsList();
+        return this;
+    }
+
+
+    @Override
+    public boolean supports(StatField<?> field){
+        return supportsField(field);
+    }
+
+    private <F extends OFValueType<F>> OFOxs<F> getOxs(StatField<F> field) {
+//:: if has_parent:
+        return this.oxsFieldsSet ? this.oxsFields.get(field) : parentMessage.oxsFields.get(field);
+//:: else:
+        return this.oxsFieldsSet ? this.oxsFields.get(field) : null;
+//:: #endif
+    }
diff --git a/java_gen/templates/custom/OFStatV6.java b/java_gen/templates/custom/OFStatV6.java
new file mode 100644
index 0000000..d2b395c
--- /dev/null
+++ b/java_gen/templates/custom/OFStatV6.java
@@ -0,0 +1,59 @@
+
+//:: from generic_utils import OrderedSet
+//:: from java_gen.java_model import model
+    @Override
+    public <F extends OFValueType<F>> F get(StatField<F> field)
+            throws UnsupportedOperationException {
+        if (!supports(field))
+            throw new UnsupportedOperationException("${msg.name} does not support statistics on field " + field.getName());
+
+        OFOxs<F> oxs = this.oxsFields.get(field);
+
+        if (oxs == null)
+            return null;
+
+        return oxs.getValue();
+    }
+
+    @Override
+    public Iterable<StatField<?>> getStatFields() {
+        return new Iterable<StatField<?>>() {
+            public Iterator<StatField<?>> iterator() {
+                return new StatFieldIterator();
+            }
+        };
+    }
+
+    @Override
+    public boolean supports(StatField<?> field) {
+        return supportsField(field);
+    }
+
+    private static boolean supportsField(StatField<?> field) {
+        switch (field.id) {
+            //:: for id_constant in sorted(set(id_constant for _, id_constant, _ in model.oxs_map.values())):
+            case ${id_constant}:
+            //:: #endfor
+                return true;
+            default:
+                return false;
+        }
+    }
+
+    private class StatFieldIterator extends AbstractIterator<StatField<?>> {
+        private Iterator<OFOxs<?>> oxsIterator;
+
+        StatFieldIterator() {
+            oxsIterator = oxsFields.iterator();
+        }
+
+        @Override
+        protected StatField<?> computeNext() {
+            while(oxsIterator.hasNext()) {
+                OFOxs<?> oxs = oxsIterator.next();
+                return oxs.getStatField();
+            }
+            endOfData();
+            return null;
+        }
+    }
diff --git a/java_gen/templates/custom/OFStatV6Ver15.Builder.java b/java_gen/templates/custom/OFStatV6Ver15.Builder.java
new file mode 100644
index 0000000..3cd8e0d
--- /dev/null
+++ b/java_gen/templates/custom/OFStatV6Ver15.Builder.java
@@ -0,0 +1 @@
+//:: include("custom/OFStatV6.Builder.java", msg=msg, has_parent=False)
diff --git a/java_gen/templates/custom/OFStatV6Ver15.java b/java_gen/templates/custom/OFStatV6Ver15.java
new file mode 100644
index 0000000..25cb9a2
--- /dev/null
+++ b/java_gen/templates/custom/OFStatV6Ver15.java
@@ -0,0 +1 @@
+//:: include("custom/OFStatV6.java", msg=msg, has_parent=False)
diff --git a/java_gen/templates/custom/interface/OFMessage.java b/java_gen/templates/custom/interface/OFMessage.java
new file mode 100644
index 0000000..1d63ee6
--- /dev/null
+++ b/java_gen/templates/custom/interface/OFMessage.java
@@ -0,0 +1,28 @@
+    
+    /**
+     * Compares the two messages for equality, ignoring the XID field.
+     *
+     * @param obj the other message to compare
+     * @return true if the messages are equal, ignoring the XID; false otherwise
+     */
+    boolean equalsIgnoreXid(Object obj);
+
+    /**
+     * Computes the hashcode of the message, ignoring the XID field.
+     * This can be useful in hashing OFMessages where an OFMessage
+     * is "the same as" another OFMessage if all fields are equal
+     * except for possibly the XIDs, which may or may not be equal.
+     *
+     * The obvious problem is that existing hash data structure 
+     * implementations will use OFMessage's hashCode() function instead.
+     * In order to use the functionality of hashCodeIgnoreXid(), one 
+     * must wrap the OFMessage within a user-defined class, where this 
+     * user-defined class is used as the key within a hash data structure, 
+     * e.g. HashMap. The user-defined class' overrideen hashCode() 
+     * function must explicitly invoke hashCodeIgnoreXid() when computing 
+     * the hash of the OFMessage member instead of computing it using 
+     * OFMessage's hashCode().
+     *
+     * @return the hashcode of the message, ignoring the XID
+     */
+    int hashCodeIgnoreXid();
diff --git a/java_gen/templates/custom/interface/OFPortDesc.java b/java_gen/templates/custom/interface/OFPortDesc.java
index 247464d..45e2dfb 100644
--- a/java_gen/templates/custom/interface/OFPortDesc.java
+++ b/java_gen/templates/custom/interface/OFPortDesc.java
@@ -12,7 +12,7 @@
      * Returns the current generation ID of this port.
      *
      * The generationId is reported by the switch as a @{link OFPortDescProp} in
-     * @link{OFPortDescStatsReply} and @link{OFPortStatus} messages. If the
+     * {@link OFPortDescStatsReply} and {@link OFPortStatus} messages. If the
      * current OFPortDesc does not contain a generation Id, returns U64.ZERO;
      *
      * For OpenFlow versions earlier than 1.4, always returns U64.ZERO;
diff --git a/java_gen/templates/of_class.java b/java_gen/templates/of_class.java
index 0b032ac..dcb15e8 100644
--- a/java_gen/templates/of_class.java
+++ b/java_gen/templates/of_class.java
@@ -197,7 +197,7 @@
     final static Reader READER = new Reader();
     static class Reader implements OFMessageReader<${msg.interface.name}> {
         @Override
-        public ${msg.interface.name} readFrom(ChannelBuffer bb) throws OFParseError {
+        public ${msg.interface.name} readFrom(ByteBuf bb) throws OFParseError {
 //:: for prop in msg.members:
 //:: if not prop.is_virtual and (prop.is_length_value or prop.is_field_length_value):
             int start = bb.readerIndex();
@@ -304,18 +304,19 @@
     }
 
 
-    public void writeTo(ChannelBuffer bb) {
+    public void writeTo(ByteBuf bb) {
         WRITER.write(bb, this);
     }
 
     final static Writer WRITER = new Writer();
     static class Writer implements OFMessageWriter<${impl_class}> {
         @Override
-        public void write(ChannelBuffer bb, ${impl_class} message) {
+        public void write(ByteBuf bb, ${impl_class} message) {
 //:: if not msg.is_fixed_length:
             int startIndex = bb.writerIndex();
 //:: #endif
 //:: fields_with_length_member = {}
+//:: has_length_value = False
 //:: for prop in msg.members:
 //:: if prop.c_name in fields_with_length_member:
             int ${prop.name}StartIndex = bb.writerIndex();
@@ -331,6 +332,7 @@
             // fixed value property ${prop.name} = ${prop.value}
             ${prop.java_type.write_op(version, prop.priv_value, pub_type=False)};
 //:: elif prop.is_length_value:
+//::     has_length_value = True
             // ${prop.name} is length of variable message, will be updated at the end
 //:: if not msg.is_fixed_length:
             int lengthIndex = bb.writerIndex();
@@ -354,7 +356,7 @@
 //:: #endif
 //:: #endfor
 
-//:: if not msg.is_fixed_length:
+//:: if not msg.is_fixed_length and has_length_value:
             // update length field
             int length = bb.writerIndex() - startIndex;
             //:: if msg.align:
@@ -417,6 +419,40 @@
         return true;
     }
 
+    //:: if filter(lambda m: m.name == 'xid', msg.data_members):
+    @Override
+    public boolean equalsIgnoreXid(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        //:: if len(msg.data_members) > 0:
+        ${msg.name} other = (${msg.name}) obj;
+        //:: #endif
+
+        //:: for prop in msg.data_members:
+        //:: if prop.java_type.is_primitive and prop.name == 'xid':
+        // ignore XID
+        //:: elif prop.java_type.is_primitive:
+        if( ${prop.name} != other.${prop.name})
+            return false;
+        //:: elif prop.java_type.is_array:
+        if (!Arrays.equals(${prop.name}, other.${prop.name}))
+                return false;
+        //:: else:
+        if (${prop.name} == null) {
+            if (other.${prop.name} != null)
+                return false;
+        } else if (!${prop.name}.equals(other.${prop.name}))
+            return false;
+        //:: #endif
+        //:: #endfor
+        return true;
+    }
+
+    //:: #endif
     @Override
     public int hashCode() {
         //:: if len(msg.data_members) > 0:
@@ -440,4 +476,31 @@
         return result;
     }
 
+    //:: if filter(lambda m: m.name == 'xid', msg.data_members):
+    @Override
+    public int hashCodeIgnoreXid() {
+        //:: if len(msg.data_members) > 0:
+        final int prime = 31;
+        //:: #endif
+        int result = 1;
+
+        //:: for prop in msg.data_members:
+        //:: if prop.java_type.is_primitive and prop.name == 'xid':
+        // ignore XID
+        //:: elif prop.java_type.pub_type == 'long':
+        result = prime *  (int) (${prop.name} ^ (${prop.name} >>> 32));
+        //:: elif prop.java_type.pub_type == 'boolean':
+        result = prime * result + (${prop.name} ? 1231 : 1237);
+        //:: elif prop.java_type.is_primitive:
+        result = prime * result + ${prop.name};
+        //:: elif prop.java_type.is_array:
+        result = prime * result + Arrays.hashCode(${prop.name});
+        //:: else:
+        result = prime * result + ((${prop.name} == null) ? 0 : ${prop.name}.hashCode());
+        //:: #endif
+        //:: #endfor
+        return result;
+    }
+
+    //:: #endif
 }
diff --git a/java_gen/templates/of_factories.java b/java_gen/templates/of_factories.java
index ba73286..ffca7b4 100644
--- a/java_gen/templates/of_factories.java
+++ b/java_gen/templates/of_factories.java
@@ -50,8 +50,8 @@
     }
 
     private static class GenericReader implements OFMessageReader<OFMessage> {
-        public OFMessage readFrom(ChannelBuffer bb) throws OFParseError {
-            if(!bb.readable())
+        public OFMessage readFrom(ByteBuf bb) throws OFParseError {
+            if(!bb.isReadable())
                 return null;
             short wireVersion = U8.f(bb.getByte(bb.readerIndex()));
             OFFactory factory;
diff --git a/java_gen/templates/of_factory_class.java b/java_gen/templates/of_factory_class.java
index ef26ca0..2d32703 100644
--- a/java_gen/templates/of_factory_class.java
+++ b/java_gen/templates/of_factory_class.java
@@ -55,7 +55,7 @@
     //:: if i.is_virtual:
     //::    continue
     //:: #endif
-    //:: is_match_object = re.match('OFMatch.*', i.name) # i.has_version(factory.version) and model.generate_class(i.versioned_class(factory.version)) and i.versioned_class(factory.version).interface.parent_interface == 'Match'
+    //:: is_match_object = re.match('OFMatch.*', i.name)
     //:: unsupported_match_object = is_match_object and not i.has_version(factory.version)
 
     //:: if len(i.writeable_members) > 0:
@@ -105,7 +105,12 @@
 //:: #endif
     }
 
-//:: if factory.interface.name == 'OFOxms':
+//:: if factory.interface.name == "OFFactory":
+    @Override
+    public Stat.Builder buildStat() {
+            return buildStatV6();
+    }
+//:: elif factory.interface.name == 'OFOxms':
     @SuppressWarnings("unchecked")
     public <F extends OFValueType<F>> OFOxm<F> fromValue(F value, MatchField<F> field) {
         switch (field.id) {
@@ -162,6 +167,23 @@
                 return null;
         }
     }
+//:: elif factory.interface.name == "OFOxss":
+    @SuppressWarnings("unchecked")
+    public <F extends OFValueType<F>> OFOxs<F> fromValue(F value, StatField<F> field) {
+        switch (field.id) {
+            //:: for oxs_name in model.oxs_map:
+            //::    type_name, value, masked = model.oxs_map[oxs_name]
+            //::    method_name = oxs_name.replace('OFOxs', '')
+            //::    method_name = method_name[0].lower() + method_name[1:]
+            case ${value}:
+                //:: # The cast to Object is done to avoid some javac bug that in some versions cannot handle cast from generic type to other types but Object
+                return (OFOxs<F>)((Object)${method_name}((${type_name})((Object)value)));
+            //:: #endfor
+            default:
+                throw new IllegalArgumentException("No OXM known for match field " + field);
+        }
+    }
+
 //:: #endif
 //:: if factory.interface.xid_generator:
     public long nextXid() {
diff --git a/java_gen/templates/of_factory_interface.java b/java_gen/templates/of_factory_interface.java
index 3694530..7ac928d 100644
--- a/java_gen/templates/of_factory_interface.java
+++ b/java_gen/templates/of_factory_interface.java
@@ -55,6 +55,7 @@
 //:: if factory.name == 'OFFactory':
     Match.Builder buildMatch();
     Match matchWildcardAll();
+    Stat.Builder buildStat();
 //:: #endif
 
     OFMessageReader<${factory.base_class}> getReader();
@@ -65,4 +66,8 @@
     public <F extends OFValueType<F>> OFOxm<F> fromValueAndMask(F value, F mask, MatchField<F> field);
     public <F extends OFValueType<F>> OFOxm<F> fromMasked(Masked<F> masked, MatchField<F> field);
 //:: #endif
+//:: if factory.name == 'OFOxss':
+
+    public <F extends OFValueType<F>> OFOxs<F> fromValue(F value, StatField<F> field);
+//:: #endif
 }
diff --git a/java_gen/templates/of_interface.java b/java_gen/templates/of_interface.java
index 18e2cf1..c940534 100644
--- a/java_gen/templates/of_interface.java
+++ b/java_gen/templates/of_interface.java
@@ -43,9 +43,8 @@
 //:: if os.path.exists("%s/custom/interface/%s.java" % (template_dir, msg.name)):
 //:: include("custom/interface/%s.java" % msg.name, msg=msg)
 //:: #endif
-    
 
-    void writeTo(ChannelBuffer channelBuffer);
+    void writeTo(ByteBuf channelBuffer);
 
     Builder${msg.type_variable} createBuilder();
     //:: simple_type, annotation = re.match(r'(\w+)(<.*>)?', msg.parent_interface).groups() if msg.parent_interface else ("", "")
@@ -53,7 +52,7 @@
         ${msg.name}${msg.type_variable} build();
 //:: for prop in msg.members:
         ${prop.java_type.public_type} ${prop.getter_name}()${ "" if prop.is_universal else " throws UnsupportedOperationException"};
-//:: if prop.is_writeable:
+//:: if prop.needs_setter:
         Builder${msg.type_variable} ${prop.setter_name}(${prop.java_type.public_type} ${prop.name})${ "" if prop.is_universal else " throws UnsupportedOperationException"};
 //:: #endif
 //:: #endfor
diff --git a/java_gen/templates/of_virtual_class.java b/java_gen/templates/of_virtual_class.java
index 2c31c75..d785838 100644
--- a/java_gen/templates/of_virtual_class.java
+++ b/java_gen/templates/of_virtual_class.java
@@ -50,7 +50,7 @@
 
     static class Reader implements OFMessageReader<${msg.interface.inherited_declaration()}> {
         @Override
-        public ${msg.interface.inherited_declaration()} readFrom(ChannelBuffer bb) throws OFParseError {
+        public ${msg.interface.inherited_declaration()} readFrom(ByteBuf bb) throws OFParseError {
 //:: if msg.is_fixed_length:
             if(bb.readableBytes() < LENGTH)
 //:: else:
diff --git a/java_gen/templates/unit_test.java b/java_gen/templates/unit_test.java
index cf01429..b9127ff 100644
--- a/java_gen/templates/unit_test.java
+++ b/java_gen/templates/unit_test.java
@@ -69,7 +69,7 @@
         //:: else:
         ${var_type} ${var_name} = factory.${factory_method}();
         //:: #endif
-        ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+        ByteBuf bb = Unpooled.buffer();
         ${var_name}.writeTo(bb);
         byte[] written = new byte[bb.readableBytes()];
         bb.readBytes(written);
@@ -87,7 +87,7 @@
         ${var_type} ${var_name}Built = factory.${factory_method}();
         //:: #endif
 
-        ChannelBuffer input = ChannelBuffers.copiedBuffer(${msg.constant_name}_SERIALIZED);
+        ByteBuf input = Unpooled.copiedBuffer(${msg.constant_name}_SERIALIZED);
 
         // FIXME should invoke the overall reader once implemented
         ${var_type} ${var_name}Read = ${msg.name}.READER.readFrom(input);
@@ -101,14 +101,14 @@
 
    @Test
    public void testReadWrite() throws Exception {
-       ChannelBuffer input = ChannelBuffers.copiedBuffer(${msg.constant_name}_SERIALIZED);
+       ByteBuf input = Unpooled.copiedBuffer(${msg.constant_name}_SERIALIZED);
 
        // FIXME should invoke the overall reader once implemented
        ${var_type} ${var_name} = ${msg.name}.READER.readFrom(input);
        assertEquals(${msg.constant_name}_SERIALIZED.length, input.readerIndex());
 
        // write message again
-       ChannelBuffer bb = ChannelBuffers.dynamicBuffer();
+       ByteBuf bb = Unpooled.buffer();
        ${var_name}.writeTo(bb);
        byte[] written = new byte[bb.readableBytes()];
        bb.readBytes(written);
diff --git a/loxi_front_end/frontend.py b/loxi_front_end/frontend.py
index 7b96fe3..58409d1 100644
--- a/loxi_front_end/frontend.py
+++ b/loxi_front_end/frontend.py
@@ -51,16 +51,14 @@
     elif m_ast[0] == 'data':
         if m_ast[2] == 'length' or m_ast[2] == 'len': # Should be moved to parser
             return ir.OFLengthMember(name=m_ast[2], oftype=get_type(m_ast[1], ctx))
-        elif m_ast[2] == 'actions_len':
-            return ir.OFFieldLengthMember(name=m_ast[2], oftype=get_type(m_ast[1], ctx), field_name='actions')
-        if m_ast[2] == 'version': # Should be moved to parser
+        elif m_ast[2] == 'version': # Should be moved to parser
             return ir.OFVersionMember(name=m_ast[2], oftype=get_type(m_ast[1], ctx))
-        elif m_ast[2] == 'key_length':
-            return ir.OFFieldLengthMember(name=m_ast[2], oftype=get_type(m_ast[1], ctx), field_name='key')
         else:
             return ir.OFDataMember(name=m_ast[2], oftype=get_type(m_ast[1], ctx))
     elif m_ast[0] == 'discriminator':
         return ir.OFDiscriminatorMember(name=m_ast[2], oftype=get_type(m_ast[1], ctx))
+    elif m_ast[0] == 'field_length':
+        return ir.OFFieldLengthMember(name=m_ast[2], oftype=get_type(m_ast[1], ctx), field_name=m_ast[3])
     else:
         raise InputError("Dont know how to create member: %s" % m_ast[0])
 
diff --git a/loxi_front_end/parser.py b/loxi_front_end/parser.py
index fbf476d..fcbe004 100644
--- a/loxi_front_end/parser.py
+++ b/loxi_front_end/parser.py
@@ -53,6 +53,8 @@
 # Structs
 pad_member = P.Group(kw('pad') - s('(') - integer - s(')'))
 discriminator_member = P.Group(tag('discriminator') + any_type + identifier + s('==') + s('?'))
+field_length_member = P.Group(tag('field_length') + any_type + identifier + \
+    s('==') + s('length') + s('(') + identifier + s(')'))
 type_member = P.Group(tag('type') + any_type + identifier + s('==') + integer)
 data_member = P.Group(tag('data') + any_type - identifier)
 
@@ -61,7 +63,7 @@
 struct_param_list = P.Forward()
 struct_param_list << struct_param + P.Optional(s(',') - P.Optional(struct_param_list))
 
-struct_member = pad_member | type_member | discriminator_member | data_member;
+struct_member = pad_member | type_member | discriminator_member | field_length_member | data_member;
 parent = (s(':') - identifier) | tag(None)
 struct = kw('struct') - identifier - P.Group(P.Optional(s('(') - struct_param_list - s(')'))) - parent - s('{') + \
          P.Group(P.ZeroOrMore(struct_member - s(';'))) + \
diff --git a/loxi_globals.py b/loxi_globals.py
index b4662cb..6774a8e 100644
--- a/loxi_globals.py
+++ b/loxi_globals.py
@@ -38,6 +38,7 @@
     VERSION_1_2 = OFVersion("1.2", 3)
     VERSION_1_3 = OFVersion("1.3", 4)
     VERSION_1_4 = OFVersion("1.4", 5)
+    VERSION_1_5 = OFVersion("1.5", 6)
 
     all_supported = (
         VERSION_1_0,
@@ -45,6 +46,7 @@
         VERSION_1_2,
         VERSION_1_3,
         VERSION_1_4,
+        VERSION_1_5,
     )
 
     wire_version_map   = { v.wire_version : v for v in all_supported }
diff --git a/loxi_ir/ir.py b/loxi_ir/ir.py
index 7b9a0b6..849973d 100644
--- a/loxi_ir/ir.py
+++ b/loxi_ir/ir.py
@@ -163,6 +163,10 @@
         return self.is_instanceof("of_oxm")
 
     @property
+    def is_oxs(self):
+        return self.is_instanceof("of_oxs")
+
+    @property
     def is_action(self):
         return self.is_instanceof("of_action")
 
diff --git a/loxi_ir/ir_offset.py b/loxi_ir/ir_offset.py
index b1cf785..a479cc3 100644
--- a/loxi_ir/ir_offset.py
+++ b/loxi_ir/ir_offset.py
@@ -26,7 +26,8 @@
     OF_ETH_ALEN = 6,
     OF_DESC_STR_LEN   = 256,
     OF_SERIAL_NUM_LEN = 32,
-    OF_APP_CODE_LEN = 15 	
+    OF_APP_CODE_LEN = 15, 	
+    OF_CONTROLLER_URI_LEN = 32
 )
 
 
@@ -37,6 +38,7 @@
         3: "uint32_t",
         4: "uint32_t",
         5: "uint32_t",
+        6: "uint32_t",
         "short_name":"port_no"
         },
     of_port_desc_t = {
@@ -45,6 +47,7 @@
         3: "of_port_desc_t",
         4: "of_port_desc_t",
         5: "of_port_desc_t",
+        6: "of_port_desc_t",
         "short_name":"port_desc"
         },
     of_bsn_vport_t = {
@@ -53,6 +56,7 @@
         3: "of_bsn_vport_t",
         4: "of_bsn_vport_t",
         5: "of_bsn_vport_t",
+        6: "of_bsn_vport_t",
         "short_name":"bsn_vport"
         },
     of_fm_cmd_t = { # Flow mod command went from u16 to u8
@@ -61,6 +65,7 @@
         3: "uint8_t",
         4: "uint8_t",
         5: "uint8_t",
+        6: "uint8_t",
         "short_name":"fm_cmd"
         },
     of_wc_bmap_t = { # Wildcard bitmap
@@ -69,6 +74,7 @@
         3: "uint64_t",
         4: "uint64_t",
         5: "uint64_t",
+        6: "uint64_t",
         "short_name":"wc_bmap"
         },
     of_match_bmap_t = { # Match bitmap
@@ -77,6 +83,7 @@
         3: "uint64_t",
         4: "uint64_t",
         5: "uint64_t",
+        6: "uint64_t",
         "short_name":"match_bmap"
         },
     of_match_t = { # Match object
@@ -85,8 +92,17 @@
         3: "of_match_v3_t",
         4: "of_match_v3_t",  # Currently uses same match as 1.2 (v3).
         5: "of_match_v3_t",  # Currently uses same match as 1.2 (v3).
+        6: "of_match_v3_t",
         "short_name":"match"
         },
+    of_stat_t = { #Statistics object
+        6: "of_stat_v6_t",
+        "short_name":"stat"
+        },
+    of_time_t = { # time object
+        6: "of_time_t",
+        "short_name":"time"
+        }
 )
 
 ## basic lengths
@@ -103,12 +119,14 @@
     of_table_name_t = (ofp_constants["OF_MAX_TABLE_NAME_LEN"], True),
     of_desc_str_t = (ofp_constants["OF_DESC_STR_LEN"], True),
     of_serial_num_t = (ofp_constants["OF_SERIAL_NUM_LEN"], True),
+    of_controller_uri_t = (ofp_constants["OF_CONTROLLER_URI_LEN"], True),
     of_str64_t = (64, True),
     of_str32_t = (32, True),
     of_str6_t = (6, True),
     of_match_v1_t = (40, True),
     of_match_v2_t = (88, True),
     of_match_v3_t = (8, False),
+    of_stat_v6_t = (8, False),
     of_octets_t = (0, False),
     of_bitmap_128_t = (16, True),
     of_checksum_128_t = (16, True),
@@ -118,6 +136,7 @@
     of_bitmap_512_t = (64, True),
     of_odu_sig_id_t = (16, True),
     of_och_sig_id_t = (6, True),
+    of_time_t = (16, True)
 )
 
 def type_dec_to_count_base(m_type):
diff --git a/loxi_utils/loxi_utils.py b/loxi_utils/loxi_utils.py
index c86c503..c7382bb 100644
--- a/loxi_utils/loxi_utils.py
+++ b/loxi_utils/loxi_utils.py
@@ -56,6 +56,9 @@
 # OXM
 #    An extensible match object
 #
+# OXS
+#    Extensible Stats Object
+#
 # Message
 #    A top level OpenFlow message
 #
@@ -86,6 +89,12 @@
     """
     return _unified_by_name(cls).is_instanceof("of_oxm")
 
+def class_is_oxs(cls):
+    """
+    Return True if cls_name is an OXS object
+    """
+    return _unified_by_name(cls).is_instanceof("of_oxs")
+
 def class_is_action(cls):
     """
     Return True if cls_name is an action object
diff --git a/loxigen.py b/loxigen.py
index fcb2788..5ef4d59 100755
--- a/loxigen.py
+++ b/loxigen.py
@@ -137,7 +137,9 @@
         ofinput = process_input_file(filename)
 
         for wire_version in ofinput.wire_versions:
-            ofinputs_by_version[wire_version].append(ofinput)
+            version = loxi_globals.OFVersions.from_wire(wire_version)
+            if version in loxi_globals.OFVersions.target_versions:
+                ofinputs_by_version[wire_version].append(ofinput)
     return ofinputs_by_version
 
 def build_ir(ofinputs_by_version):
diff --git a/openflow_input/bsn-1.3 b/openflow_input/bsn-1.3
index 5ad480c..720f933 100644
--- a/openflow_input/bsn-1.3
+++ b/openflow_input/bsn-1.3
@@ -27,6 +27,7 @@
 
 #version 4
 #version 5
+#version 6
 
 // BSN extension instruction
 struct of_instruction_bsn : of_instruction_experimenter {
@@ -36,3 +37,29 @@
     uint32_t subtype == ?;
     pad(4);
 };
+
+// BSN base error message
+struct of_bsn_base_error : of_experimenter_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 0xffff;
+    uint16_t subtype == ?;
+    uint32_t experimenter == 0x5c16c7;
+    of_desc_str_t err_msg;
+    of_octets_t data;
+};
+
+// BSN error message
+struct of_bsn_error : of_bsn_base_error {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 0xffff;
+    uint16_t subtype == 1;
+    uint32_t experimenter == 0x5c16c7;
+    of_desc_str_t err_msg;
+    of_octets_t data;
+};
diff --git a/openflow_input/bsn-1.4 b/openflow_input/bsn-1.4
index c64a70a..522dc46 100644
--- a/openflow_input/bsn-1.4
+++ b/openflow_input/bsn-1.4
@@ -1,4 +1,4 @@
-// Copyright 2015, Big Switch Networks, Inc.
+// Copyright 2015-2016, Big Switch Networks, Inc.
 //
 // LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
 // the following special exception:
@@ -26,6 +26,7 @@
 // under the EPL.
 
 #version 5
+#version 6
 
 struct of_port_desc_prop_bsn : of_port_desc_prop_experimenter {
     uint16_t type == 0xffff;
@@ -33,3 +34,10 @@
     uint32_t experimenter == 0x5c16c7;
     uint32_t exp_type == ?;
 };
+
+struct of_queue_desc_prop_bsn : of_queue_desc_prop_experimenter {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t exp_type == ?;
+};
diff --git a/openflow_input/bsn-1.5 b/openflow_input/bsn-1.5
new file mode 100644
index 0000000..3438dc8
--- /dev/null
+++ b/openflow_input/bsn-1.5
@@ -0,0 +1,44 @@
+// Copyright 2015, 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.
+
+#version 6
+
+struct of_queue_stats_prop_bsn : of_queue_stats_prop_experimenter {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t exp_type == 0; // 0 is written for test - fix me ?
+    of_octets_t experimenter_data;
+};
+
+struct of_role_prop_bsn : of_role_prop_experimenter {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t exp_type == 55; // 55 is taken from bsn_role_status - fix me ?
+    of_octets_t experimenter_data;
+};
\ No newline at end of file
diff --git a/openflow_input/bsn_acl b/openflow_input/bsn_acl
index bcca842..aad478f 100644
--- a/openflow_input/bsn_acl
+++ b/openflow_input/bsn_acl
@@ -31,6 +31,7 @@
 
 #version 4
 #version 5
+#version 6
 
 // Instructions to express control flow in ACL tables
 
diff --git a/openflow_input/bsn_arp_idle b/openflow_input/bsn_arp_idle
index 16a1782..030bade 100644
--- a/openflow_input/bsn_arp_idle
+++ b/openflow_input/bsn_arp_idle
@@ -36,6 +36,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_bsn_arp_idle : of_bsn_header {
     uint8_t version;
diff --git a/openflow_input/bsn_arp_offload b/openflow_input/bsn_arp_offload
index f13f6ac..864c38c 100644
--- a/openflow_input/bsn_arp_offload
+++ b/openflow_input/bsn_arp_offload
@@ -31,6 +31,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_instruction_bsn_arp_offload : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_auto_negotiation b/openflow_input/bsn_auto_negotiation
index 68116cf..119d047 100644
--- a/openflow_input/bsn_auto_negotiation
+++ b/openflow_input/bsn_auto_negotiation
@@ -31,6 +31,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_instruction_bsn_auto_negotiation : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_aux_cxns b/openflow_input/bsn_aux_cxns
index 8ceaa72..4c2f98f 100644
--- a/openflow_input/bsn_aux_cxns
+++ b/openflow_input/bsn_aux_cxns
@@ -29,6 +29,7 @@
 //
 #version 4
 #version 5
+#version 6
 
 // Set the number of desired aux connections num_aux=(0-16) accompanying this main connection
 // This message is only allowed on the main connection. 
diff --git a/openflow_input/bsn_controller_connections b/openflow_input/bsn_controller_connections
index 845d3b8..8369551 100644
--- a/openflow_input/bsn_controller_connections
+++ b/openflow_input/bsn_controller_connections
@@ -38,6 +38,7 @@
 
 #version 4
 #version 5
+#version 6
 
 enum ofp_bsn_controller_connection_state(wire_type=uint8_t) {
     OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED = 0,
diff --git a/openflow_input/bsn_debug_counter b/openflow_input/bsn_debug_counter
index 6c28b87..bea6cf8 100644
--- a/openflow_input/bsn_debug_counter
+++ b/openflow_input/bsn_debug_counter
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 // Switches have many non-dataplane counters that are mainly useful for
 // debugging. An example is the number of packet-ins dropped due to
diff --git a/openflow_input/bsn_dhcp_offload b/openflow_input/bsn_dhcp_offload
index 5352754..5a14a51 100644
--- a/openflow_input/bsn_dhcp_offload
+++ b/openflow_input/bsn_dhcp_offload
@@ -31,6 +31,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_instruction_bsn_dhcp_offload : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_disable_l3 b/openflow_input/bsn_disable_l3
index 29d8ad1..389fc65 100644
--- a/openflow_input/bsn_disable_l3
+++ b/openflow_input/bsn_disable_l3
@@ -31,6 +31,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_instruction_bsn_disable_l3 : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_disable_src_mac_check b/openflow_input/bsn_disable_src_mac_check
index 6b095ca..cfe15b1 100644
--- a/openflow_input/bsn_disable_src_mac_check
+++ b/openflow_input/bsn_disable_src_mac_check
@@ -31,6 +31,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_instruction_bsn_disable_src_mac_check : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_disable_vlan_counters b/openflow_input/bsn_disable_vlan_counters
index e586917..15fbca2 100644
--- a/openflow_input/bsn_disable_vlan_counters
+++ b/openflow_input/bsn_disable_vlan_counters
@@ -31,6 +31,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_instruction_bsn_disable_vlan_counters : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_egr_port_group_id b/openflow_input/bsn_egr_port_group_id
index 3ba5462..73c6be6 100644
--- a/openflow_input/bsn_egr_port_group_id
+++ b/openflow_input/bsn_egr_port_group_id
@@ -31,6 +31,7 @@
 #version 3
 #version 4
 #version 5
+#version 6
 
 /*
  * Egress port group ID for SwitchLight
diff --git a/openflow_input/bsn_flow_checksum b/openflow_input/bsn_flow_checksum
index 35b658f..c4f9488 100644
--- a/openflow_input/bsn_flow_checksum
+++ b/openflow_input/bsn_flow_checksum
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 // Retrieves the checksum for every bucket in a table. The entries are ordered
 // by bucket index.
diff --git a/openflow_input/bsn_flow_idle b/openflow_input/bsn_flow_idle
index e0139e2..6c6f3a8 100644
--- a/openflow_input/bsn_flow_idle
+++ b/openflow_input/bsn_flow_idle
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 /*
  * Notification of idle flows
diff --git a/openflow_input/bsn_forward_error_correction b/openflow_input/bsn_forward_error_correction
new file mode 100644
index 0000000..1f91732
--- /dev/null
+++ b/openflow_input/bsn_forward_error_correction
@@ -0,0 +1,38 @@
+// Copyright 2016, 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.
+
+#version 5
+#version 6
+
+struct of_port_desc_prop_bsn_forward_error_correction : of_port_desc_prop_bsn {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t exp_type == 2;
+    uint32_t configured;    /* non-zero if FEC is configured */
+    uint32_t enabled;       /* non-zero if FEC is enabled */
+};
diff --git a/openflow_input/bsn_generic_async b/openflow_input/bsn_generic_async
index 7d7ee98..b163079 100644
--- a/openflow_input/bsn_generic_async
+++ b/openflow_input/bsn_generic_async
@@ -29,6 +29,7 @@
 // governing permissions and limitations under the EPL.
 
 #version 5
+#version 6
 
 // This extension provides flexibility for async messages like gentable
 // does for table programming.
diff --git a/openflow_input/bsn_generic_command b/openflow_input/bsn_generic_command
new file mode 100644
index 0000000..ad0f93b
--- /dev/null
+++ b/openflow_input/bsn_generic_command
@@ -0,0 +1,46 @@
+// Copyright 2016, 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 2015, 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.
+
+#version 5
+#version 6
+
+// This extension provides flexibility for command messages like gentable
+// does for table programming.
+
+struct of_bsn_generic_command : of_bsn_header {
+    uint8_t version;
+    uint8_t type == 4;
+    uint16_t length;
+    uint32_t xid;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 71;
+    of_str64_t name;
+    list(of_bsn_tlv_t) tlvs;
+};
diff --git a/openflow_input/bsn_generic_stats b/openflow_input/bsn_generic_stats
index b67d8e3..ad195cf 100644
--- a/openflow_input/bsn_generic_stats
+++ b/openflow_input/bsn_generic_stats
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 // This extension provides flexibility for stats requests like gentable
 // does for table programming.
diff --git a/openflow_input/bsn_gentable b/openflow_input/bsn_gentable
index 556ae0b..e0753c0 100644
--- a/openflow_input/bsn_gentable
+++ b/openflow_input/bsn_gentable
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 // We have a number of switch agents that need to be configured by the
 // controller and report stats. Some of them will have large tables (1000+
@@ -86,7 +87,7 @@
     uint32_t experimenter == 0x5c16c7;
     uint32_t subtype == 46;
     uint16_t table_id;
-    uint16_t key_length;
+    uint16_t key_length == length(key);
     of_checksum_128_t checksum;
     list(of_bsn_tlv_t) key;
     list(of_bsn_tlv_t) value;
@@ -181,7 +182,7 @@
 
 struct of_bsn_gentable_entry_desc_stats_entry {
     uint16_t length;
-    uint16_t key_length;
+    uint16_t key_length == length(key);
     of_checksum_128_t checksum;
     list(of_bsn_tlv_t) key;
     list(of_bsn_tlv_t) value;
@@ -224,7 +225,7 @@
 
 struct of_bsn_gentable_entry_stats_entry {
     uint16_t length;
-    uint16_t key_length;
+    uint16_t key_length == length(key);
     list(of_bsn_tlv_t) key;
     list(of_bsn_tlv_t) stats;
 };
@@ -362,3 +363,24 @@
     uint32_t table_id;
     list(of_bsn_tlv_t) key;
 };
+
+enum of_bsn_gentable_error_code(wire_type=uint16_t) {
+    OF_BSN_GENTABLE_ERROR_UNKNOWN = 0,
+    OF_BSN_GENTABLE_ERROR_PARAM = 1,  // invalid parameter
+    OF_BSN_GENTABLE_ERROR_TABLE_FULL = 2,
+};
+
+// BSN gentable error message
+struct of_bsn_gentable_error : of_bsn_base_error {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 0xffff;
+    uint16_t subtype == 2;
+    uint32_t experimenter == 0x5c16c7;
+    enum of_bsn_gentable_error_code error_code;
+    uint16_t table_id;
+    of_desc_str_t err_msg;
+    of_octets_t data;
+};
diff --git a/openflow_input/bsn_hash_select b/openflow_input/bsn_hash_select
new file mode 100644
index 0000000..edd9aeb
--- /dev/null
+++ b/openflow_input/bsn_hash_select
@@ -0,0 +1,49 @@
+// Copyright 2016, 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 2016, 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.
+//
+// Also derived from the OpenFlow header files which have these copyrights:
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+
+#version 4
+#version 5
+#version 6
+
+// Instructions to express control of hash selection in ACL tables
+
+enum ofp_bsn_hash_select_flags(wire_type=uint32_t, bitmask=True) {
+    OFP_BSN_HASH_SELECT_SRC_IP = 0x1,
+    OFP_BSN_HASH_SELECT_DST_IP = 0x2,
+};
+
+struct of_instruction_bsn_hash_select : of_instruction_bsn {
+    uint16_t type == 65535;
+    uint16_t len;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 15;
+    enum ofp_bsn_hash_select_flags flags;
+};
diff --git a/openflow_input/bsn_image b/openflow_input/bsn_image
index fafe8d8..03cdb34 100644
--- a/openflow_input/bsn_image
+++ b/openflow_input/bsn_image
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_bsn_image_desc_stats_request : of_bsn_stats_request {
     uint8_t version;
diff --git a/openflow_input/bsn_in_ports b/openflow_input/bsn_in_ports
index bb4c030..132d6d6 100644
--- a/openflow_input/bsn_in_ports
+++ b/openflow_input/bsn_in_ports
@@ -31,6 +31,7 @@
 #version 3
 #version 4
 #version 5
+#version 6
 
 /*
  * Bitmap of input ports
diff --git a/openflow_input/bsn_ingress_port_group_id b/openflow_input/bsn_ingress_port_group_id
index 5e1ad97..9d4eae3 100644
--- a/openflow_input/bsn_ingress_port_group_id
+++ b/openflow_input/bsn_ingress_port_group_id
@@ -31,6 +31,7 @@
 #version 3
 #version 4
 #version 5
+#version 6
 
 /*
  * Ingress port group ID for SwitchLight
diff --git a/openflow_input/bsn_inner_eth_dst b/openflow_input/bsn_inner_eth_dst
index d3e9fa9..c6cec4b 100644
--- a/openflow_input/bsn_inner_eth_dst
+++ b/openflow_input/bsn_inner_eth_dst
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 /*
  * Inner ethernet destination MAC
diff --git a/openflow_input/bsn_inner_eth_src b/openflow_input/bsn_inner_eth_src
index 36e0e35..362447d 100644
--- a/openflow_input/bsn_inner_eth_src
+++ b/openflow_input/bsn_inner_eth_src
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 /*
  * Inner ethernet source MAC
diff --git a/openflow_input/bsn_inner_vlan_vid b/openflow_input/bsn_inner_vlan_vid
index 68092a2..702f3e9 100644
--- a/openflow_input/bsn_inner_vlan_vid
+++ b/openflow_input/bsn_inner_vlan_vid
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 /*
  * Inner VLAN VID
diff --git a/openflow_input/bsn_internal_priority b/openflow_input/bsn_internal_priority
index 55d903d..6482992 100644
--- a/openflow_input/bsn_internal_priority
+++ b/openflow_input/bsn_internal_priority
@@ -31,6 +31,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_instruction_bsn_internal_priority : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_ip_fragmentation b/openflow_input/bsn_ip_fragmentation
new file mode 100644
index 0000000..b64cb4d
--- /dev/null
+++ b/openflow_input/bsn_ip_fragmentation
@@ -0,0 +1,50 @@
+// Copyright 2016, 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.
+
+#version 3
+#version 4
+#version 5
+#version 6
+
+/*
+ * IP fragmentation
+ */
+
+struct of_oxm_bsn_ip_fragmentation : of_oxm {
+    uint32_t type_len == 0x00033401;
+    uint8_t value;
+};
+
+struct of_oxm_bsn_ip_fragmentation_masked : of_oxm {
+    uint32_t type_len == 0x00033502;
+    uint8_t value;
+    uint8_t value_mask;
+};
+
diff --git a/openflow_input/bsn_l2_cache_hit b/openflow_input/bsn_l2_cache_hit
index 694bc65..c178611 100644
--- a/openflow_input/bsn_l2_cache_hit
+++ b/openflow_input/bsn_l2_cache_hit
@@ -30,6 +30,8 @@
 
 #version 3
 #version 4
+#version 5
+#version 6
 
 /*
  * L2 Cache Hit
diff --git a/openflow_input/bsn_l3_interface_class_id b/openflow_input/bsn_l3_interface_class_id
index f16d333..cfd17ef 100644
--- a/openflow_input/bsn_l3_interface_class_id
+++ b/openflow_input/bsn_l3_interface_class_id
@@ -31,6 +31,7 @@
 #version 3
 #version 4
 #version 5
+#version 6
 
 /*
  * L3 interface class ID for SwitchLight
diff --git a/openflow_input/bsn_l3_src_class_id b/openflow_input/bsn_l3_src_class_id
index 7e2569e..586ba38 100644
--- a/openflow_input/bsn_l3_src_class_id
+++ b/openflow_input/bsn_l3_src_class_id
@@ -31,6 +31,7 @@
 #version 3
 #version 4
 #version 5
+#version 6
 
 /*
  * L3 source class ID for SwitchLight
diff --git a/openflow_input/bsn_lacp b/openflow_input/bsn_lacp
index ed36b0d..201848c 100644
--- a/openflow_input/bsn_lacp
+++ b/openflow_input/bsn_lacp
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 // LACP Convergence Status set in of_bsn_lacp_convergence_notif message
 enum of_bsn_lacp_convergence_status(wire_type=uint8_t, complete=False) {
diff --git a/openflow_input/bsn_lag_id b/openflow_input/bsn_lag_id
index d428933..f9f25a2 100644
--- a/openflow_input/bsn_lag_id
+++ b/openflow_input/bsn_lag_id
@@ -31,6 +31,7 @@
 #version 3
 #version 4
 #version 5
+#version 6
 
 /*
  * Ingress LAG ID for SwitchLight
diff --git a/openflow_input/bsn_log b/openflow_input/bsn_log
index e636d6e..9c364ff 100644
--- a/openflow_input/bsn_log
+++ b/openflow_input/bsn_log
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 enum ofp_bsn_loglevel(wire_type=uint8_t) {
     OFP_BSN_LOGLEVEL_MSG = 0,
diff --git a/openflow_input/bsn_lua b/openflow_input/bsn_lua
index d941666..c89edfd 100644
--- a/openflow_input/bsn_lua
+++ b/openflow_input/bsn_lua
@@ -39,6 +39,7 @@
 
 #version 4
 #version 5
+#version 6
 
 // Upload chunks of Lua code to the switch
 //
diff --git a/openflow_input/bsn_ndp_offload b/openflow_input/bsn_ndp_offload
new file mode 100644
index 0000000..b4323d1
--- /dev/null
+++ b/openflow_input/bsn_ndp_offload
@@ -0,0 +1,42 @@
+// Copyright 2016, 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.
+//
+// Also derived from the OpenFlow header files which have these copyrights:
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
+
+#version 4
+#version 5
+#version 6
+
+struct of_instruction_bsn_ndp_offload : of_instruction_bsn {
+    uint16_t type == 65535;
+    uint16_t len;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 14;
+    pad(4);
+};
diff --git a/openflow_input/bsn_packet_of_death b/openflow_input/bsn_packet_of_death
index c1ac28d..18d8c78 100644
--- a/openflow_input/bsn_packet_of_death
+++ b/openflow_input/bsn_packet_of_death
@@ -31,6 +31,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_instruction_bsn_packet_of_death : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_pktin_flag b/openflow_input/bsn_pktin_flag
index b21616a..7acfa4b 100644
--- a/openflow_input/bsn_pktin_flag
+++ b/openflow_input/bsn_pktin_flag
@@ -1,4 +1,4 @@
-// Copyright 2014, Big Switch Networks, Inc.
+// Copyright 2014-2016, Big Switch Networks, Inc.
 //
 // LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
 // the following special exception:
@@ -12,7 +12,7 @@
 // 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 2014, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+// Notice: "Copyright 2014-2016, 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:
@@ -27,6 +27,7 @@
 
 #version 4
 #version 5
+#version 6
 
 // In a realistic switch pipeline there are multiple reasons a given packet
 // should be sent to the controller. The packet-in reason field is only 8 bits,
@@ -47,4 +48,11 @@
     OFP_BSN_PKTIN_FLAG_SFLOW = 0x800,
     OFP_BSN_PKTIN_FLAG_ARP_CACHE = 0x1000,
     OFP_BSN_PKTIN_FLAG_ARP_TARGET = 0x2000,
+    OFP_BSN_PKTIN_FLAG_IGMP = 0x4000,
+    OFP_BSN_PKTIN_FLAG_PIM = 0x8000,
+    OFP_BSN_PKTIN_FLAG_VXLAN_SIP_MISS = 0x10000,
+    OFP_BSN_PKTIN_FLAG_MC_RESERVED = 0x20000,
+    OFP_BSN_PKTIN_FLAG_ANALYTICS = 0x40000,
+    OFP_BSN_PKTIN_FLAG_ICMPV6 = 0x80000,
+    OFP_BSN_PKTIN_FLAG_INGRESS_ACL_LOCAL = 0x100000,
 };
diff --git a/openflow_input/bsn_port_counter b/openflow_input/bsn_port_counter
index 51a36f8..88f60d3 100644
--- a/openflow_input/bsn_port_counter
+++ b/openflow_input/bsn_port_counter
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 enum ofp_bsn_port_counter(wire_type=uint8_t, complete=False, stable=True) {
   OFP_BSN_PORT_COUNTER_RX_BYTES = 0,
@@ -60,6 +61,34 @@
   OFP_BSN_PORT_COUNTER_RX_OVERFLOW_ERRORS = 25,
   OFP_BSN_PORT_COUNTER_TX_CARRIER_ERRORS = 26,
   OFP_BSN_PORT_COUNTER_RX_PACKETS_BAD_VLAN = 27,
+  OFP_BSN_PORT_COUNTER_LINK_UP = 28,
+  OFP_BSN_PORT_COUNTER_LINK_DOWN = 29,
+  OFP_BSN_PORT_COUNTER_RX_PFC_CONTROL_FRAME = 30,
+  OFP_BSN_PORT_COUNTER_TX_PFC_CONTROL_FRAME = 31,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_XON_PRIORITY_0 = 32,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_XON_PRIORITY_1 = 33,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_XON_PRIORITY_2 = 34,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_XON_PRIORITY_3 = 35,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_XON_PRIORITY_4 = 36,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_XON_PRIORITY_5 = 37,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_XON_PRIORITY_6 = 38,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_XON_PRIORITY_7 = 39,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_PRIORITY_0 = 40,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_PRIORITY_1 = 41,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_PRIORITY_2 = 42,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_PRIORITY_3 = 43,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_PRIORITY_4 = 44,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_PRIORITY_5 = 45,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_PRIORITY_6 = 46,
+  OFP_BSN_PORT_COUNTER_RX_PFC_FRAME_PRIORITY_7 = 47,
+  OFP_BSN_PORT_COUNTER_TX_PFC_FRAME_PRIORITY_0 = 48,
+  OFP_BSN_PORT_COUNTER_TX_PFC_FRAME_PRIORITY_1 = 49,
+  OFP_BSN_PORT_COUNTER_TX_PFC_FRAME_PRIORITY_2 = 50,
+  OFP_BSN_PORT_COUNTER_TX_PFC_FRAME_PRIORITY_3 = 51,
+  OFP_BSN_PORT_COUNTER_TX_PFC_FRAME_PRIORITY_4 = 52,
+  OFP_BSN_PORT_COUNTER_TX_PFC_FRAME_PRIORITY_5 = 53,
+  OFP_BSN_PORT_COUNTER_TX_PFC_FRAME_PRIORITY_6 = 54,
+  OFP_BSN_PORT_COUNTER_TX_PFC_FRAME_PRIORITY_7 = 55,
 };
 
 struct of_bsn_port_counter_stats_request : of_bsn_stats_request {
diff --git a/openflow_input/bsn_port_generation_id b/openflow_input/bsn_port_generation_id
index fddf9a3..3b42411 100644
--- a/openflow_input/bsn_port_generation_id
+++ b/openflow_input/bsn_port_generation_id
@@ -28,6 +28,7 @@
 // This generation ID is changed whenever a port goes link-down.
 
 #version 5
+#version 6
 
 struct of_port_desc_prop_bsn_generation_id : of_port_desc_prop_bsn {
     uint16_t type == 0xffff;
diff --git a/openflow_input/bsn_prioritize_pdus b/openflow_input/bsn_prioritize_pdus
index 7a179a9..2afb70a 100644
--- a/openflow_input/bsn_prioritize_pdus
+++ b/openflow_input/bsn_prioritize_pdus
@@ -31,6 +31,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_instruction_bsn_prioritize_pdus : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_queue_name b/openflow_input/bsn_queue_name
new file mode 100644
index 0000000..ae3fbbb
--- /dev/null
+++ b/openflow_input/bsn_queue_name
@@ -0,0 +1,37 @@
+// Copyright 2016, 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.
+
+#version 5
+#version 6
+
+struct of_queue_desc_prop_bsn_queue_name : of_queue_desc_prop_bsn {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t exp_type == 0;
+    of_octets_t name; /* UTF-8 encoded. Not null terminated. */
+};
diff --git a/openflow_input/bsn_require_vlan_xlate b/openflow_input/bsn_require_vlan_xlate
index 32fc55c..dc0b56e 100644
--- a/openflow_input/bsn_require_vlan_xlate
+++ b/openflow_input/bsn_require_vlan_xlate
@@ -31,6 +31,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_instruction_bsn_require_vlan_xlate : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_span_destination b/openflow_input/bsn_span_destination
index fd4f677..f4439bb 100644
--- a/openflow_input/bsn_span_destination
+++ b/openflow_input/bsn_span_destination
@@ -31,6 +31,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_instruction_bsn_span_destination : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_switch_pipeline b/openflow_input/bsn_switch_pipeline
index d42532b..f910d5a 100644
--- a/openflow_input/bsn_switch_pipeline
+++ b/openflow_input/bsn_switch_pipeline
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_bsn_get_switch_pipeline_request : of_bsn_header {
     uint8_t version;
diff --git a/openflow_input/bsn_takeover b/openflow_input/bsn_takeover
index 1b95611..b69721b 100644
--- a/openflow_input/bsn_takeover
+++ b/openflow_input/bsn_takeover
@@ -29,6 +29,7 @@
 // governing permissions and limitations under the EPL.
 
 #version 5
+#version 6
 
 // This message is used by IVS for hitless restart.
 
diff --git a/openflow_input/bsn_tcp_flags b/openflow_input/bsn_tcp_flags
index 1a84a90..06965ef 100644
--- a/openflow_input/bsn_tcp_flags
+++ b/openflow_input/bsn_tcp_flags
@@ -31,6 +31,7 @@
 #version 3
 #version 4
 #version 5
+#version 6
 
 /*
  * TCP flags
diff --git a/openflow_input/bsn_time b/openflow_input/bsn_time
index d69e538..bb59966 100644
--- a/openflow_input/bsn_time
+++ b/openflow_input/bsn_time
@@ -34,6 +34,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_bsn_time_request : of_bsn_header {
     uint8_t version;
diff --git a/openflow_input/bsn_tlv b/openflow_input/bsn_tlv
index 0985e1c..84f9158 100644
--- a/openflow_input/bsn_tlv
+++ b/openflow_input/bsn_tlv
@@ -1,4 +1,4 @@
-// Copyright 2013, Big Switch Networks, Inc.
+// Copyright 2013-2017, Big Switch Networks, Inc.
 //
 // LoxiGen is licensed under the Eclipse Public License,
 // version 1.0 (EPL), with the following special exception:
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_bsn_tlv_port : of_bsn_tlv {
     uint16_t type == 0;
@@ -550,5 +551,528 @@
 struct of_bsn_tlv_ipv6 : of_bsn_tlv {
     uint16_t type == 84;
     uint16_t length;
-    of_ipv6_t value; 
+    of_ipv6_t value;
+};
+
+enum ofp_bsn_decap(wire_type=uint16_t) {
+    OFP_BSN_DECAP_VXLAN = 0,
+    OFP_BSN_DECAP_ERSPAN = 1,
+    OFP_BSN_DECAP_L2_GRE = 2,
+    OFP_BSN_DECAP_NVGRE = 3,
+    OFP_BSN_DECAP_CAPWAP = 4,
+    OFP_BSN_DECAP_L2_MPLS = 5,
+    OFP_BSN_DECAP_L3_GRE = 6,
+    OFP_BSN_DECAP_GTP = 7,
+    OFP_BSN_DECAP_L3_MPLS = 8,
+};
+
+struct of_bsn_tlv_decap : of_bsn_tlv {
+    uint16_t type == 85;
+    uint16_t length;
+    enum ofp_bsn_decap value;
+};
+
+struct of_bsn_tlv_vni : of_bsn_tlv {
+    uint16_t type == 86;
+    uint16_t length;
+    uint32_t value;
+};
+
+struct of_bsn_tlv_mcg_type_vxlan : of_bsn_tlv {
+    uint16_t type == 87;
+    uint16_t length;
+};
+
+enum ofp_bsn_port_vxlan_mode(wire_type=uint8_t) {
+    OFP_BSN_PORT_VXLAN_RECIRCULATION_ENABLE = 0,
+    OFP_BSN_PORT_VXLAN_TERMINATION_ENABLE = 1,
+};
+
+struct of_bsn_tlv_port_vxlan_mode : of_bsn_tlv {
+    uint16_t type == 88;
+    uint16_t length;
+    enum ofp_bsn_port_vxlan_mode value;
+};
+
+enum ofp_bsn_rate_unit(wire_type=uint8_t) {
+    OFP_BSN_RATE_UNIT_PPS = 0, /* Packets per second */
+    OFP_BSN_RATE_UNIT_KBITPS = 1, /* Kilobits per second */
+};
+
+struct of_bsn_tlv_rate_unit : of_bsn_tlv {
+    uint16_t type == 89;
+    uint16_t length;
+    enum ofp_bsn_rate_unit value;
+};
+
+struct of_bsn_tlv_broadcast_rate : of_bsn_tlv {
+    uint16_t type == 90;
+    uint16_t length;
+    uint32_t value;
+};
+
+struct of_bsn_tlv_known_multicast_rate : of_bsn_tlv {
+    uint16_t type == 91;
+    uint16_t length;
+    uint32_t value;
+};
+
+struct of_bsn_tlv_unknown_multicast_rate : of_bsn_tlv {
+    uint16_t type == 92;
+    uint16_t length;
+    uint32_t value;
+};
+
+struct of_bsn_tlv_unicast_rate : of_bsn_tlv {
+    uint16_t type == 93;
+    uint16_t length;
+    uint32_t value;
+};
+
+struct of_bsn_tlv_nexthop_type_vxlan : of_bsn_tlv {
+    uint16_t type == 94;
+    uint16_t length;
+};
+
+struct of_bsn_tlv_multicast_interface_id : of_bsn_tlv {
+    uint16_t type == 95;
+    uint16_t length;
+    uint32_t value;
+};
+
+struct of_bsn_tlv_use_packet_state : of_bsn_tlv {
+    uint16_t type == 96;
+    uint16_t length;
+    uint8_t value;
+};
+
+enum ofp_bsn_status(wire_type=uint8_t) {
+    OFP_BSN_STATUS_DISABLE = 0,
+    OFP_BSN_STATUS_ENABLE = 1,
+};
+
+struct of_bsn_tlv_status: of_bsn_tlv {
+    uint16_t type == 97;
+    uint16_t length;
+    enum ofp_bsn_status value;
+};
+
+struct of_bsn_vlan_mac {
+    uint16_t vlan_vid;
+    of_mac_addr_t mac;
+};
+
+struct of_bsn_tlv_vlan_mac_list : of_bsn_tlv {
+    uint16_t type == 98;
+    uint16_t length;
+    list(of_bsn_vlan_mac_t) key;
+};
+
+struct of_bsn_tlv_vfi : of_bsn_tlv {
+    uint16_t type == 99;
+    uint16_t length;
+    uint16_t value;
+};
+
+struct of_bsn_tlv_hash_seed : of_bsn_tlv {
+    uint16_t type == 100;
+    uint16_t length;
+    uint32_t seed1;
+    uint32_t seed2;
+};
+
+enum of_bsn_hash_type(wire_type=uint8_t) {
+    OFP_BSN_HASH_TYPE_L2 = 0,
+    OFP_BSN_HASH_TYPE_L3 = 1,
+    OFP_BSN_HASH_TYPE_ENHANCED = 2,
+};
+
+struct of_bsn_tlv_hash_type : of_bsn_tlv {
+    uint16_t type == 101;
+    uint16_t length;
+    enum of_bsn_hash_type value;
+};
+
+enum of_bsn_hash_packet_type(wire_type=uint8_t) {
+    OF_BSN_HASH_PACKET_L2 = 0,
+    OF_BSN_HASH_PACKET_L2GRE = 1,
+    OF_BSN_HASH_PACKET_IPV4 = 3,
+    OF_BSN_HASH_PACKET_IPV6 = 4,
+    OF_BSN_HASH_PACKET_MPLS = 5,
+    OF_BSN_HASH_PACKET_SYMMETRIC = 6,
+};
+
+struct of_bsn_tlv_hash_packet_type : of_bsn_tlv {
+    uint16_t type == 102;
+    uint16_t length;
+    enum of_bsn_hash_packet_type value;
+};
+
+enum of_bsn_hash_packet_field(wire_type=uint64_t, bitmask=True) {
+    // 0x1 is unused
+    OFP_BSN_HASH_FIELD_DST_MAC =     0x2,
+    OFP_BSN_HASH_FIELD_SRC_MAC =     0x4,
+    OFP_BSN_HASH_FIELD_ETH_TYPE =    0x8,
+    OFP_BSN_HASH_FIELD_VLAN_ID =     0x10,
+    OFP_BSN_HASH_FIELD_INNER_L2 =    0x20,
+    OFP_BSN_HASH_FIELD_INNER_L3 =    0x40,
+    OFP_BSN_HASH_FIELD_SRC_IP =      0x80,
+    OFP_BSN_HASH_FIELD_DST_IP =      0x100,
+    OFP_BSN_HASH_FIELD_IP_PROTO =    0x200,
+    OFP_BSN_HASH_FIELD_SRC_L4_PORT = 0x400,
+    OFP_BSN_HASH_FIELD_DST_L4_PORT = 0x800,
+    OFP_BSN_HASH_FIELD_MPLS_LABEL1 = 0x1000,
+    OFP_BSN_HASH_FIELD_MPLS_LABEL2 = 0x2000,
+    OFP_BSN_HASH_FIELD_MPLS_LABEL3 = 0x4000,
+    OFP_BSN_HASH_FIELD_MPLS_LABEL_HI_BITS  = 0x8000,
+    OFP_BSN_HASH_FIELD_MPLS_PAYLOAD_SRC_IP = 0x10000,
+    OFP_BSN_HASH_FIELD_MPLS_PAYLOAD_DST_IP = 0x20000,
+    OFP_BSN_HASH_FIELD_SYMMETRIC =           0x40000,
+};
+
+struct of_bsn_tlv_hash_packet_field : of_bsn_tlv {
+    uint16_t type == 103;
+    uint16_t length;
+    enum of_bsn_hash_packet_field value;
+};
+
+struct of_bsn_tlv_hash_gtp_header_match : of_bsn_tlv {
+    uint16_t type == 104;
+    uint16_t length;
+    uint8_t first_header_byte;
+    uint8_t first_header_mask;
+};
+
+enum of_bsn_hash_gtp_port_match(wire_type=uint8_t) {
+    OF_BSN_HASH_GTP_PORT_MATCH_SRC = 1,
+    OF_BSN_HASH_GTP_PORT_MATCH_DST = 2,
+    OF_BSN_HASH_GTP_PORT_MATCH_SRC_OR_DST = 3,
+    OF_BSN_HASH_GTP_PORT_MATCH_SRC_AND_DST = 4,
+};
+
+struct of_bsn_tlv_hash_gtp_port_match : of_bsn_tlv {
+    uint16_t type == 105;
+    uint16_t length;
+    enum of_bsn_hash_gtp_port_match match;
+    uint16_t src_port;
+    uint16_t dst_port;
+};
+
+struct of_bsn_tlv_untagged : of_bsn_tlv {
+    uint16_t type == 106;
+    uint16_t length;
+};
+
+struct of_bsn_tlv_vfp_class_id : of_bsn_tlv {
+    uint16_t type == 107;
+    uint16_t length;
+    uint32_t value;
+};
+
+struct of_bsn_tlv_qos_priority : of_bsn_tlv {
+    uint16_t type == 108;
+    uint16_t length;
+    uint32_t value;
+};
+
+struct of_bsn_tlv_parent_port : of_bsn_tlv {
+    uint16_t type == 109;
+    uint16_t length;
+    of_port_no_t value;
+};
+
+struct of_bsn_tlv_loopback_port : of_bsn_tlv {
+    uint16_t type == 110;
+    uint16_t length;
+    of_port_no_t value;
+};
+
+struct of_bsn_tlv_vpn_key : of_bsn_tlv {
+    uint16_t type == 111;
+    uint16_t length;
+    uint32_t value;
+};
+
+struct of_bsn_tlv_dscp : of_bsn_tlv {
+    uint16_t type == 112;
+    uint16_t length;
+    uint16_t value;  // 0-63
+};
+
+struct of_bsn_tlv_ttl : of_bsn_tlv {
+    uint16_t type == 113;
+    uint16_t length;
+    uint16_t value;
+};
+
+struct of_bsn_tlv_next_hop_mac : of_bsn_tlv {
+    uint16_t type == 114;
+    uint16_t length;
+    of_mac_addr_t value;
+};
+
+struct of_bsn_tlv_next_hop_ipv4 : of_bsn_tlv {
+    uint16_t type == 115;
+    uint16_t length;
+    of_ipv4_t value;
+};
+
+struct of_bsn_tlv_rate_limit : of_bsn_tlv {
+    uint16_t type == 116;
+    uint16_t length;
+    uint32_t value;  // in Kbps
+};
+
+struct of_bsn_tlv_vxlan_egress_lag : of_bsn_tlv {
+    uint16_t type == 117;
+    uint16_t length;
+};
+
+struct of_bsn_tlv_cpu_lag : of_bsn_tlv {
+    uint16_t type == 118;
+    uint16_t length;
+};
+
+struct of_bsn_tlv_uint64_list : of_bsn_tlv {
+    uint16_t type == 119;
+    uint16_t length;
+    list(of_uint64_t) value;
+};
+
+struct of_bsn_tlv_disable_src_mac_check : of_bsn_tlv {
+    uint16_t type == 120;
+    uint16_t length;
+};
+
+struct of_bsn_tlv_drop : of_bsn_tlv {
+    uint16_t type == 121;
+    uint16_t length;
+};
+
+struct of_bsn_tlv_ipv6_prefix : of_bsn_tlv {
+    uint16_t type == 122;
+    uint16_t length;
+    of_ipv6_t value;
+    uint8_t prefix_length;
+};
+
+struct of_bsn_tlv_ndp_offload : of_bsn_tlv {
+    uint16_t type == 123;
+    uint16_t length;
+};
+
+struct of_bsn_tlv_ndp_static : of_bsn_tlv {
+    uint16_t type == 124;
+    uint16_t length;
+};
+
+struct of_bsn_tlv_icmpv6_chksum : of_bsn_tlv {
+    uint16_t type == 125;
+    uint16_t length;
+    uint16_t value;
+};
+
+struct of_bsn_tlv_ipv6_src : of_bsn_tlv {
+    uint16_t type == 126;
+    uint16_t length;
+    of_ipv6_t value;
+};
+
+struct of_bsn_tlv_ipv6_dst : of_bsn_tlv {
+    uint16_t type == 127;
+    uint16_t length;
+    of_ipv6_t value;
+};
+
+struct of_bsn_tlv_push_vlan_on_ingress : of_bsn_tlv {
+    uint16_t type == 128;
+    uint16_t length;
+};
+
+// apply_packets and apply_bytes are stat counters, like rx_packet
+// identifies packets and bytes applied to some action, for example:
+// packets with inet L3/L4 headers for netflow
+
+struct of_bsn_tlv_apply_packets : of_bsn_tlv {
+    uint16_t type == 129;
+    uint16_t length;
+    uint64_t value;
+};
+
+struct of_bsn_tlv_apply_bytes : of_bsn_tlv {
+    uint16_t type == 130;
+    uint16_t length;
+    uint64_t value;
+};
+
+struct of_bsn_tlv_eth_type : of_bsn_tlv {
+    uint16_t type == 131;
+    uint16_t length;
+    uint16_t value;
+};
+
+struct of_bsn_tlv_ecn : of_bsn_tlv {
+    uint16_t type == 132;
+    uint16_t length;
+    uint8_t value;
+};
+
+struct of_bsn_tlv_tcp_flags : of_bsn_tlv {
+    uint16_t type == 133;
+    uint16_t length;
+    uint16_t value;
+};
+
+struct of_bsn_tlv_l3_interface_class_id : of_bsn_tlv {
+    uint16_t type == 134;
+    uint16_t length;
+    uint32_t value;
+};
+
+struct of_bsn_tlv_l3_src_class_id : of_bsn_tlv {
+    uint16_t type == 135;
+    uint16_t length;
+    uint32_t value;
+};
+
+struct of_bsn_tlv_l3_dst_class_id : of_bsn_tlv {
+    uint16_t type == 136;
+    uint16_t length;
+    uint32_t value;
+};
+
+struct of_bsn_tlv_egress_only : of_bsn_tlv {
+    uint16_t type == 137;
+    uint16_t length;
+};
+
+struct of_bsn_tlv_ingress_port_group_id : of_bsn_tlv {
+    uint16_t type == 138;
+    uint16_t length;
+    uint32_t value;
+};
+
+struct of_bsn_tlv_egress_port_group_id : of_bsn_tlv {
+    uint16_t type == 139;
+    uint16_t length;
+    uint32_t value;
+};
+
+struct of_bsn_tlv_data_mask : of_bsn_tlv {
+    uint16_t type == 140;
+    uint16_t length;
+    of_octets_t value;
+};
+
+enum ofp_bsn_port_usage(wire_type=uint16_t) {
+    OFP_BSN_PORT_UNUSED = 0,
+    OFP_BSN_PORT_TRANSMIT_ONLY = 1,
+    OFP_BSN_PORT_RECEIVE_ONLY = 2,
+    OFP_BSN_PORT_BIDIRECTION = 3,
+};
+
+struct of_bsn_tlv_port_usage : of_bsn_tlv {
+    uint16_t type == 141;
+    uint16_t length;
+    enum ofp_bsn_port_usage value;
+};
+
+enum ofp_bsn_tunnel_type(wire_type=uint64_t, bitmask=True) {
+    OFP_BSN_TUNNEL_L2GRE = 0x1,
+};
+
+struct of_bsn_tlv_tunnel_capability : of_bsn_tlv {
+    uint16_t type == 142;
+    uint16_t length;
+    enum ofp_bsn_tunnel_type value;
+};
+
+enum ofp_bsn_enhanced_hash_type(wire_type=uint64_t, bitmask=True) {
+    OFP_BSN_ENHANCED_HASH_L2 = 0x1,
+    OFP_BSN_ENHANCED_HASH_L3 = 0x2,
+    OFP_BSN_ENHANCED_HASH_L2GRE = 0x4,
+    OFP_BSN_ENHANCED_HASH_MPLS = 0x8,
+    OFP_BSN_ENHANCED_HASH_GTP = 0x10,
+    OFP_BSN_ENHANCED_HASH_SYMMETRIC = 0x20,
+};
+
+struct of_bsn_tlv_enhanced_hash_capability : of_bsn_tlv {
+    uint16_t type == 143;
+    uint16_t length;
+    enum ofp_bsn_enhanced_hash_type value;
+};
+
+enum ofp_bsn_auto_negotiation_type(wire_type=uint8_t) {
+    OFP_BSN_AUTO_NEGOTIATION_DEFAULT = 0,
+    OFP_BSN_AUTO_NEGOTIATION_ENABLE = 1,
+    OFP_BSN_AUTO_NEGOTIATION_DISABLE = 2,
+};
+
+struct of_bsn_tlv_auto_negotiation : of_bsn_tlv {
+    uint16_t type == 144;
+    uint16_t length;
+    enum ofp_bsn_auto_negotiation_type value;
+};
+
+enum ofp_bsn_hash_algorithm_type(wire_type=uint16_t) {
+    OFP_BSN_HASH_ALGORITHM_CRC16XOR8 = 0,
+    OFP_BSN_HASH_ALGORITHM_CRC16XOR4 = 1,
+    OFP_BSN_HASH_ALGORITHM_CRC16XOR2 = 2,
+    OFP_BSN_HASH_ALGORITHM_CRC16XOR1 = 3,
+    OFP_BSN_HASH_ALGORITHM_CRC16 = 4,
+    OFP_BSN_HASH_ALGORITHM_XOR16 = 5,
+    OFP_BSN_HASH_ALGORITHM_CRC16CCITT = 6,
+    OFP_BSN_HASH_ALGORITHM_CRC32LO = 7,
+    OFP_BSN_HASH_ALGORITHM_CRC32HI = 8,
+};
+
+struct of_bsn_tlv_hash_algorithm : of_bsn_tlv {
+    uint16_t type == 145;
+    uint16_t length;
+    enum ofp_bsn_hash_algorithm_type value;
+};
+
+enum ofp_bsn_loopback_mode(wire_type=uint8_t) {
+    OFP_BSN_LOOPBACK_MODE_NONE = 0,
+    OFP_BSN_LOOPBACK_MODE_MAC = 1,
+    OFP_BSN_LOOPBACK_MODE_PHY = 2,
+    OFP_BSN_LOOPBACK_MODE_PHY_REMOTE = 3,
+};
+
+struct of_bsn_tlv_loopback_mode : of_bsn_tlv {
+    uint16_t type == 146;
+    uint16_t length;
+    enum ofp_bsn_loopback_mode value;
+};
+
+struct of_bsn_tlv_no_arp_response : of_bsn_tlv {
+    uint16_t type == 147;
+    uint16_t length;
+};
+
+struct of_bsn_tlv_no_ns_response : of_bsn_tlv {
+    uint16_t type == 148;
+    uint16_t length;
+};
+
+enum ofp_bsn_forward_error_correction_type(wire_type=uint8_t) {
+    OFP_BSN_FORWARD_ERROR_CORRECTION_DEFAULT = 0,
+    OFP_BSN_FORWARD_ERROR_CORRECTION_ENABLE = 1,
+    OFP_BSN_FORWARD_ERROR_CORRECTION_DISABLE = 2,
+};
+
+struct of_bsn_tlv_forward_error_correction : of_bsn_tlv {
+    uint16_t type == 149;
+    uint16_t length;
+    enum ofp_bsn_forward_error_correction_type value;
+};
+
+struct of_bsn_tlv_optics_always_enabled : of_bsn_tlv {
+    uint16_t type == 150;
+    uint16_t length;
+};
+
+struct of_bsn_tlv_force_link_up : of_bsn_tlv {
+    uint16_t type == 151;
+    uint16_t length;
 };
diff --git a/openflow_input/bsn_udf b/openflow_input/bsn_udf
index 12ad1cb..5fae674 100644
--- a/openflow_input/bsn_udf
+++ b/openflow_input/bsn_udf
@@ -31,6 +31,7 @@
 #version 3
 #version 4
 #version 5
+#version 6
 
 /*
  * User Defined Fields
diff --git a/openflow_input/bsn_uplink b/openflow_input/bsn_uplink
index dec2ed4..820112c 100644
--- a/openflow_input/bsn_uplink
+++ b/openflow_input/bsn_uplink
@@ -26,6 +26,7 @@
 // under the EPL.
 
 #version 5
+#version 6
 
 struct of_port_desc_prop_bsn_uplink : of_port_desc_prop_bsn {
     uint16_t type == 0xffff;
diff --git a/openflow_input/bsn_vfi b/openflow_input/bsn_vfi
new file mode 100644
index 0000000..76602b0
--- /dev/null
+++ b/openflow_input/bsn_vfi
@@ -0,0 +1,48 @@
+// Copyright 2016, 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.
+
+#version 4
+#version 5
+#version 6
+
+/*
+ * VXLAN VFI INDEX
+ */
+
+struct of_oxm_bsn_vfi : of_oxm {
+    uint32_t type_len == 0x00033202;
+    uint16_t value;
+};
+
+struct of_oxm_bsn_vfi_masked : of_oxm {
+    uint32_t type_len == 0x00033304;
+    uint16_t value;
+    uint16_t value_mask;
+};
diff --git a/openflow_input/bsn_vlan_counter b/openflow_input/bsn_vlan_counter
index d39d35f..d020459 100644
--- a/openflow_input/bsn_vlan_counter
+++ b/openflow_input/bsn_vlan_counter
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 enum ofp_bsn_vlan_counter_constants {
     OFP_BSN_VLAN_ALL = 0xffff,
@@ -74,3 +75,13 @@
     uint32_t subtype == 9;
     list(of_bsn_vlan_counter_stats_entry_t) entries;
 };
+
+struct of_bsn_vlan_counter_clear : of_bsn_header {
+    uint8_t version;
+    uint8_t type == 4;
+    uint16_t length;
+    uint32_t xid;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 70;
+    uint16_t vlan_vid;
+};
diff --git a/openflow_input/bsn_vlan_xlate_port_group_id b/openflow_input/bsn_vlan_xlate_port_group_id
index 986dc0e..e575679 100644
--- a/openflow_input/bsn_vlan_xlate_port_group_id
+++ b/openflow_input/bsn_vlan_xlate_port_group_id
@@ -31,6 +31,7 @@
 #version 3
 #version 4
 #version 5
+#version 6
 
 /*
  * VLAN xlate port group ID for SwitchLight
diff --git a/openflow_input/bsn_vrf b/openflow_input/bsn_vrf
index c61c313..a598df5 100644
--- a/openflow_input/bsn_vrf
+++ b/openflow_input/bsn_vrf
@@ -31,6 +31,7 @@
 #version 3
 #version 4
 #version 5
+#version 6
 
 /*
  * Virtual Routing/Forwarding ID for SwitchLight
diff --git a/openflow_input/bsn_vrf_counter b/openflow_input/bsn_vrf_counter
index 012d728..3106682 100644
--- a/openflow_input/bsn_vrf_counter
+++ b/openflow_input/bsn_vrf_counter
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 enum ofp_bsn_vrf_counter_constants(wire_type=uint32_t) {
     OFP_BSN_VRF_ALL = 0xffffffff,
diff --git a/openflow_input/bsn_vxlan b/openflow_input/bsn_vxlan
index 4171a51..466f450 100644
--- a/openflow_input/bsn_vxlan
+++ b/openflow_input/bsn_vxlan
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 /*
  * VXLAN Virtual Network Identifier
diff --git a/openflow_input/intel b/openflow_input/intel
new file mode 100644
index 0000000..a66d5a0
--- /dev/null
+++ b/openflow_input/intel
@@ -0,0 +1,64 @@
+// Copyright 2017, 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 2017, 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.
+
+#version 5
+#version 6
+
+struct of_port_stats_prop_experimenter_intel : of_port_stats_prop_experimenter {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    uint32_t experimenter == 0x0000aa01;
+    uint32_t exp_type == 0x00000001;
+    pad(4);
+    
+    uint64_t rx_1_to_64_packets;
+    uint64_t rx_65_to_127_packets;
+    uint64_t rx_128_to_255_packets;
+    uint64_t rx_256_to_511_packets;
+    uint64_t rx_512_to_1023_packets;
+    uint64_t rx_1024_to_1522_packets;
+    uint64_t rx_1523_to_max_packets;
+             
+    uint64_t tx_1_to_64_packets;
+    uint64_t tx_65_to_127_packets;
+    uint64_t tx_128_to_255_packets;
+    uint64_t tx_256_to_511_packets;
+    uint64_t tx_512_to_1023_packets;
+    uint64_t tx_1024_to_1522_packets;
+    uint64_t tx_1523_to_max_packets;
+             
+    uint64_t tx_multicast_packets;
+    uint64_t rx_broadcast_packets;
+    uint64_t tx_broadcast_packets;
+    uint64_t rx_undersized_errors;
+    uint64_t rx_oversize_errors;
+    uint64_t rx_fragmented_errors;
+    uint64_t rx_jabber_errors;
+};
\ No newline at end of file
diff --git a/openflow_input/ovs_tcp_flags b/openflow_input/ovs_tcp_flags
new file mode 100644
index 0000000..22c3737
--- /dev/null
+++ b/openflow_input/ovs_tcp_flags
@@ -0,0 +1,64 @@
+// Copyright 2014, 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.
+
+#version 3
+#version 4
+#version 5
+#version 6
+
+/*
+ *Experimenter TCP flags
+ *Author: fangtuo90@gmail.com
+ */
+
+enum ofp_ovs_tcp_flag(wire_type=uint16_t, bitmask=True) {
+    OFP_OVS_TCP_FLAG_FIN = 0x001,
+    OFP_OVS_TCP_FLAG_SYN = 0x002,
+    OFP_OVS_TCP_FLAG_RST = 0x004,
+    OFP_OVS_TCP_FLAG_PSH = 0x008,
+    OFP_OVS_TCP_FLAG_ACK = 0x010,
+    OFP_OVS_TCP_FLAG_URG = 0x020,
+    OFP_OVS_TCP_FLAG_ECE = 0x040,
+    OFP_OVS_TCP_FLAG_CWR = 0x080,
+    OFP_OVS_TCP_FLAG_NS  = 0x100,
+};
+
+struct of_oxm_ovs_tcp_flags : of_oxm {
+    uint32_t type_len == 0xffff5406;
+    uint32_t experimenter_id == 0x4f4e4600;
+    uint16_t value;
+};
+
+struct of_oxm_ovs_tcp_flags_masked : of_oxm {
+    uint32_t type_len == 0xffff5508;
+    uint32_t experimenter_id == 0x4f4e4600;
+    uint16_t value;
+    uint16_t value_mask;
+};
diff --git a/openflow_input/oxm-1.2 b/openflow_input/oxm-1.2
index dd596bd..39c0fdd 100644
--- a/openflow_input/oxm-1.2
+++ b/openflow_input/oxm-1.2
@@ -32,6 +32,7 @@
 #version 3
 #version 4
 #version 5
+#version 6
 
 struct of_oxm {
     uint32_t type_len == ?;
diff --git a/openflow_input/oxm-1.3 b/openflow_input/oxm-1.3
index 4bb55a1..200f3cd 100644
--- a/openflow_input/oxm-1.3
+++ b/openflow_input/oxm-1.3
@@ -30,6 +30,7 @@
 
 #version 4
 #version 5
+#version 6
 
 struct of_oxm_tunnel_id : of_oxm {
     uint32_t type_len == 0x80004c08;
diff --git a/openflow_input/oxm-1.4 b/openflow_input/oxm-1.4
index 0fd96ec..b165fc5 100644
--- a/openflow_input/oxm-1.4
+++ b/openflow_input/oxm-1.4
@@ -29,6 +29,7 @@
 // governing permissions and limitations under the EPL.
 
 #version 5
+#version 6
 
 struct of_oxm_pbb_uca : of_oxm {
     uint32_t type_len == 0x80005201;
diff --git a/openflow_input/oxm-1.5 b/openflow_input/oxm-1.5
new file mode 100644
index 0000000..f5d2e4c
--- /dev/null
+++ b/openflow_input/oxm-1.5
@@ -0,0 +1,35 @@
+#version 6
+
+struct of_oxm_tcp_flags : of_oxm {
+    uint32_t type_len == 0x80005402;
+    uint8_t value;
+};
+
+struct of_oxm_tcp_flags_masked : of_oxm {
+    uint32_t type_len == 0x80005504;
+    uint8_t value;
+    uint8_t value_mask;
+};
+
+struct of_oxm_actset_output : of_oxm {
+    uint32_t type_len == 0x80005604;
+    uint8_t value;
+};
+
+struct of_oxm_actset_output_masked : of_oxm {
+    uint32_t type_len == 0x80005708;
+    of_port_no_t value;
+    of_port_no_t value_mask;
+};
+
+
+struct of_oxm_packet_type : of_oxm {
+    uint32_t type_len == 0x80005804;
+    uint8_t value;
+};
+
+struct of_oxm_packet_type_masked : of_oxm {
+    uint32_t type_len == 0x80005908;
+    uint8_t value;
+    uint8_t value_mask;
+};
diff --git a/openflow_input/oxm_nicira_tun b/openflow_input/oxm_nicira_tun
index 9e73fec..ae2575f 100644
--- a/openflow_input/oxm_nicira_tun
+++ b/openflow_input/oxm_nicira_tun
@@ -28,6 +28,7 @@
 #version 3
 #version 4
 #version 5
+#version 6
 
 // Nicira extension for tun_ipv4_src (31)
 struct of_oxm_tunnel_ipv4_src : of_oxm {
diff --git a/openflow_input/oxs-1.5 b/openflow_input/oxs-1.5
new file mode 100644
index 0000000..9ef1642
--- /dev/null
+++ b/openflow_input/oxs-1.5
@@ -0,0 +1,31 @@
+
+#version 6
+
+struct of_oxs {
+    uint32_t type_len == ?;
+};
+
+struct of_oxs_duration : of_oxs {
+    uint32_t type_len == 0x80020008 ;
+    uint16_t value;
+};
+
+struct of_oxs_idle_time : of_oxs {
+    uint32_t type_len == 0x80020208 ;
+    uint16_t value;
+};
+
+struct of_oxs_flow_count : of_oxs {
+    uint32_t type_len == 0x80020404 ;
+    uint16_t value;
+};
+
+struct of_oxs_packet_count : of_oxs {
+    uint32_t type_len == 0x80020608 ;
+    uint16_t value;
+};
+
+struct of_oxs_byte_count : of_oxs {
+    uint32_t type_len == 0x80020808 ;
+    uint16_t value;
+};
diff --git a/openflow_input/standard-1.0 b/openflow_input/standard-1.0
index 1e4750b..1bba411 100644
--- a/openflow_input/standard-1.0
+++ b/openflow_input/standard-1.0
@@ -433,8 +433,8 @@
     uint32_t xid;
     of_port_no_t port_no;
     of_mac_addr_t hw_addr;
-    uint32_t config;
-    uint32_t mask;
+    enum ofp_port_config config;
+    enum ofp_port_config mask;
     uint32_t advertise;
     pad(4);
 };
@@ -554,7 +554,7 @@
     uint32_t xid;
     uint32_t buffer_id;
     of_port_no_t in_port;
-    uint16_t actions_len;
+    uint16_t actions_len == length(actions);
     list(of_action_t) actions;
     of_octets_t data;
 };
@@ -687,7 +687,7 @@
     of_match_t match;
     uint64_t cookie;
     uint16_t priority;
-    uint8_t reason;
+    enum ofp_flow_removed_reason reason;
     pad(1);
     uint32_t duration_sec;
     uint32_t duration_nsec;
diff --git a/openflow_input/standard-1.1 b/openflow_input/standard-1.1
index 6765fe7..07f246e 100644
--- a/openflow_input/standard-1.1
+++ b/openflow_input/standard-1.1
@@ -555,8 +555,8 @@
     pad(4);
     of_mac_addr_t hw_addr;
     pad(2);
-    uint32_t config;
-    uint32_t mask;
+    enum ofp_port_config config;
+    enum ofp_port_config mask;
     uint32_t advertise;
     pad(4);
 };
@@ -761,7 +761,7 @@
     uint32_t xid;
     uint32_t buffer_id;
     of_port_no_t in_port;
-    uint16_t actions_len;
+    uint16_t actions_len == length(actions);
     pad(6);
     list(of_action_t) actions;
     of_octets_t data;
@@ -1033,7 +1033,7 @@
     uint32_t xid;
     uint64_t cookie;
     uint16_t priority;
-    uint8_t reason;
+    enum ofp_flow_removed_reason reason;
     uint8_t table_id;
     uint32_t duration_sec;
     uint32_t duration_nsec;
diff --git a/openflow_input/standard-1.2 b/openflow_input/standard-1.2
index c1e8a2b..9141f22 100644
--- a/openflow_input/standard-1.2
+++ b/openflow_input/standard-1.2
@@ -594,8 +594,8 @@
     pad(4);
     of_mac_addr_t hw_addr;
     pad(2);
-    uint32_t config;
-    uint32_t mask;
+    enum ofp_port_config config;
+    enum ofp_port_config mask;
     uint32_t advertise;
     pad(4);
 };
@@ -948,7 +948,7 @@
     uint32_t xid;
     uint32_t buffer_id;
     of_port_no_t in_port;
-    uint16_t actions_len;
+    uint16_t actions_len == length(actions);
     pad(6);
     list(of_action_t) actions;
     of_octets_t data;
@@ -975,7 +975,7 @@
     uint32_t xid;
     uint64_t cookie;
     uint16_t priority;
-    uint8_t reason;
+    enum ofp_flow_removed_reason reason;
     uint8_t table_id;
     uint32_t duration_sec;
     uint32_t duration_nsec;
@@ -1121,7 +1121,7 @@
     uint32_t xid;
     uint16_t err_type == 0xffff;
     uint16_t subtype;
-    uint32_t experimenter;
+    uint32_t experimenter == ?;
     of_octets_t data;
 };
 
@@ -1214,7 +1214,7 @@
     list(of_bucket_t) buckets;
 };
 
-// STATS: 
+// STATS:
 //  Desc, flow, agg, table, port, queue, group, group_desc, group_feat, experi
 
 struct of_stats_request : of_header {
@@ -1453,7 +1453,7 @@
     enum ofp_stats_reply_flags flags;
     pad(4);
     uint32_t types;
-    uint32_t capabilities;
+    enum ofp_group_capabilities capabilities;
     uint32_t max_groups_all;
     uint32_t max_groups_select;
     uint32_t max_groups_indirect;
diff --git a/openflow_input/standard-1.3 b/openflow_input/standard-1.3
index 1edabb2..43490ac 100644
--- a/openflow_input/standard-1.3
+++ b/openflow_input/standard-1.3
@@ -742,8 +742,8 @@
     pad(4);
     of_mac_addr_t hw_addr;
     pad(2);
-    uint32_t config;
-    uint32_t mask;
+    enum ofp_port_config config;
+    enum ofp_port_config mask;
     uint32_t advertise;
     pad(4);
 };
@@ -755,7 +755,7 @@
     list(of_oxm_t) oxm_list;
 };
 
-// This looks like an action header, but is standalone.  See 
+// This looks like an action header, but is standalone.  See
 // ofp_table_features_prop_actions
 struct of_action_id {
     uint16_t type;
@@ -1127,7 +1127,7 @@
     uint32_t xid;
     uint32_t buffer_id;
     of_port_no_t in_port;
-    uint16_t actions_len;
+    uint16_t actions_len == length(actions);
     pad(6);
     list(of_action_t) actions;
     of_octets_t data;
@@ -1155,7 +1155,7 @@
     uint32_t xid;
     uint64_t cookie;
     uint16_t priority;
-    uint8_t reason;
+    enum ofp_flow_removed_reason reason;
     uint8_t table_id;
     uint32_t duration_sec;
     uint32_t duration_nsec;
@@ -1203,8 +1203,8 @@
     uint8_t type == 29;
     uint16_t length;
     uint32_t xid;
-    uint16_t command;
-    uint16_t flags;
+    enum ofp_meter_mod_command command;
+    enum ofp_meter_flags flags;
     uint32_t meter_id;
     list(of_meter_band_t) meters;
 };
@@ -1364,7 +1364,7 @@
     uint32_t xid;
     uint16_t err_type == 0xffff;
     uint16_t subtype;
-    uint32_t experimenter;
+    uint32_t experimenter == ?;
     of_octets_t data;
 };
 
@@ -1452,7 +1452,7 @@
     list(of_bucket_t) buckets;
 };
 
-// STATS: 
+// STATS:
 //  Desc, flow, agg, table, port, queue, group, group_desc, group_feat, experi
 
 struct of_stats_request : of_header {
@@ -1842,7 +1842,7 @@
     enum ofp_stats_reply_flags flags;
     pad(4);
     uint32_t types;
-    uint32_t capabilities;
+    enum ofp_group_capabilities capabilities;
     uint32_t max_groups_all;
     uint32_t max_groups_select;
     uint32_t max_groups_indirect;
@@ -1988,7 +1988,7 @@
 
 struct of_meter_config {
     uint16_t        length;
-    uint16_t        flags;
+    enum ofp_meter_flags        flags;
     uint32_t        meter_id;
     list(of_meter_band_t) entries;
 };
diff --git a/openflow_input/standard-1.4 b/openflow_input/standard-1.4
index 28aa787..af657d1 100644
--- a/openflow_input/standard-1.4
+++ b/openflow_input/standard-1.4
@@ -934,7 +934,7 @@
 struct of_port_mod_prop_ethernet : of_port_mod_prop {
     uint16_t type == 0;
     uint16_t length;
-    uint32_t advertise;
+    enum ofp_port_features advertise;
 };
 
 struct of_port_mod_prop_optical : of_port_mod_prop {
@@ -963,8 +963,8 @@
     pad(4);
     of_mac_addr_t hw_addr;
     pad(2);
-    uint32_t config;
-    uint32_t mask;
+    enum ofp_port_config config;
+    enum ofp_port_config mask;
     list(of_port_mod_prop_t) properties;
 };
 
@@ -1347,7 +1347,7 @@
     uint32_t xid;
     uint32_t buffer_id;
     of_port_no_t in_port;
-    uint16_t actions_len;
+    uint16_t actions_len == length(actions);
     pad(6);
     list(of_action_t) actions;
     of_octets_t data;
@@ -1375,7 +1375,7 @@
     uint32_t xid;
     uint64_t cookie;
     uint16_t priority;
-    uint8_t reason;
+    enum ofp_flow_removed_reason reason;
     uint8_t table_id;
     uint32_t duration_sec;
     uint32_t duration_nsec;
@@ -1423,8 +1423,8 @@
     uint8_t type == 29;
     uint16_t length;
     uint32_t xid;
-    uint16_t command;
-    uint16_t flags;
+    enum ofp_meter_mod_command command;
+    enum ofp_meter_flags flags;
     uint32_t meter_id;
     list(of_meter_band_t) bands;
 };
@@ -1624,7 +1624,7 @@
     uint32_t xid;
     uint16_t err_type == 0xffff;
     uint16_t subtype;
-    uint32_t experimenter;
+    uint32_t experimenter == ?;
     of_octets_t data;
 };
 
@@ -1682,7 +1682,7 @@
     uint16_t         length;
     pad(4);
 
-    uint32_t flags;       
+    uint32_t flags;
     uint32_t tx_freq_lmda;
     uint32_t tx_offset;
     uint32_t tx_grid_span;
@@ -1701,7 +1701,7 @@
     uint16_t         length;
     uint32_t         experimenter == ?;
     uint32_t         exp_type;
-    of_octets_t      experimenter_data;
+    /* of_octets_t      experimenter_data;  Implementing property defines fields. */
 };
 
 struct of_port_stats_entry {
@@ -1933,98 +1933,98 @@
     uint16_t         length;
 };
 
-struct of_table_feature_prop_instructions : of_table_feature_prop {
+struct of_table_feature_prop_instructions(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 0;
     uint16_t         length;
     // FIXME Check if instruction_t is right for ids here
     list(of_instruction_id_t)   instruction_ids;
 };
 
-struct of_table_feature_prop_instructions_miss : of_table_feature_prop {
+struct of_table_feature_prop_instructions_miss(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 1;
     uint16_t         length;
     list(of_instruction_id_t)   instruction_ids;
 };
 
-struct of_table_feature_prop_next_tables : of_table_feature_prop {
+struct of_table_feature_prop_next_tables(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 2;
     uint16_t         length;
     list(of_uint8_t) next_table_ids;
 };
 
-struct of_table_feature_prop_next_tables_miss : of_table_feature_prop {
+struct of_table_feature_prop_next_tables_miss(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 3;
     uint16_t         length;
     list(of_uint8_t) next_table_ids;
 };
 
-struct of_table_feature_prop_write_actions : of_table_feature_prop {
+struct of_table_feature_prop_write_actions(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 4;
     uint16_t         length;
     list(of_action_id_t) action_ids;
 };
 
-struct of_table_feature_prop_write_actions_miss : of_table_feature_prop {
+struct of_table_feature_prop_write_actions_miss(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 5;
     uint16_t         length;
     list(of_action_id_t) action_ids;
 };
 
-struct of_table_feature_prop_apply_actions : of_table_feature_prop {
+struct of_table_feature_prop_apply_actions(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 6;
     uint16_t         length;
     list(of_action_id_t) action_ids;
 };
 
-struct of_table_feature_prop_apply_actions_miss : of_table_feature_prop {
+struct of_table_feature_prop_apply_actions_miss(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 7;
     uint16_t         length;
     list(of_action_id_t) action_ids;
 };
 
-struct of_table_feature_prop_match : of_table_feature_prop {
+struct of_table_feature_prop_match(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 8;
     uint16_t         length;
     list(of_uint32_t) oxm_ids;
 };
 
-struct of_table_feature_prop_wildcards : of_table_feature_prop {
+struct of_table_feature_prop_wildcards(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 10;
     uint16_t         length;
     list(of_uint32_t) oxm_ids;
 };
 
-struct of_table_feature_prop_write_setfield : of_table_feature_prop {
+struct of_table_feature_prop_write_setfield(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 12;
     uint16_t         length;
     list(of_uint32_t) oxm_ids;
 };
 
-struct of_table_feature_prop_write_setfield_miss : of_table_feature_prop {
+struct of_table_feature_prop_write_setfield_miss(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 13;
     uint16_t         length;
     list(of_uint32_t) oxm_ids;
 };
 
-struct of_table_feature_prop_apply_setfield : of_table_feature_prop {
+struct of_table_feature_prop_apply_setfield(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 14;
     uint16_t         length;
     list(of_uint32_t) oxm_ids;
 };
 
-struct of_table_feature_prop_apply_setfield_miss : of_table_feature_prop {
+struct of_table_feature_prop_apply_setfield_miss(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 15;
     uint16_t         length;
     list(of_uint32_t) oxm_ids;
 };
 
-struct of_table_feature_prop_table_sync_from : of_table_feature_prop {
+struct of_table_feature_prop_table_sync_from(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 16;
     uint16_t         length;
     list(of_uint8_t) table_ids;
 };
 
-struct of_table_feature_prop_experimenter : of_table_feature_prop {
+struct of_table_feature_prop_experimenter(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 65534;
     uint16_t         length;
     uint32_t         experimenter == ?;
@@ -2032,7 +2032,7 @@
     of_octets_t      experimenter_data;
 };
 
-struct of_table_feature_prop_experimenter_miss : of_table_feature_prop {
+struct of_table_feature_prop_experimenter_miss(align=8, length_includes_align=False) : of_table_feature_prop {
     uint16_t         type == 65535;
     uint16_t         length;
     uint32_t         experimenter == ?;
@@ -2170,7 +2170,7 @@
     enum ofp_stats_reply_flags flags;
     pad(4);
     uint32_t types;
-    uint32_t capabilities;
+    enum ofp_group_capabilities capabilities;
     uint32_t max_groups_all;
     uint32_t max_groups_select;
     uint32_t max_groups_indirect;
@@ -2333,6 +2333,8 @@
     uint16_t stats_type == 15;
     enum ofp_stats_request_flags flags;
     pad(4);
+    of_port_no_t port_no;
+    uint32_t queue_id;
 };
 
 struct of_queue_desc_prop {
@@ -2406,7 +2408,7 @@
 
 struct of_meter_config {
     uint16_t        length;
-    uint16_t        flags;
+    enum ofp_meter_flags        flags;
     uint32_t        meter_id;
     list(of_meter_band_t) entries;
 };
@@ -2642,7 +2644,7 @@
     uint8_t type == 30;
     uint16_t length;
     uint32_t xid;
-    uint32_t role;
+    enum ofp_controller_role role;
     enum ofp_controller_role_reason reason;
     pad(3);
     uint64_t generation_id;
diff --git a/openflow_input/standard-1.5 b/openflow_input/standard-1.5
new file mode 100644
index 0000000..cf0a8ec
--- /dev/null
+++ b/openflow_input/standard-1.5
@@ -0,0 +1,3610 @@
+
+#version 6
+
+/* ------------------------------------------- MACRO DEFINITIONS ------------------------------ */
+enum macro_definitions {
+    OFP_MAX_TABLE_NAME_LEN = 32,
+    OFP_MAX_PORT_NAME_LEN = 16,
+
+    OFP_TCP_PORT = 6653,
+    OFP_SSL_PORT = 6653,
+
+    OFP_ETH_ALEN = 6,
+
+    OFP_DEFAULT_MISS_SEND_LEN = 128,
+
+    OFP_VLAN_NONE = 0,
+
+    OFP_FLOW_PERMANENT = 0,
+
+    OFP_DEFAULT_PRIORITY = 0x8000,
+
+    OFP_NO_BUFFER = 0xffffffff,
+
+    DESC_STR_LEN = 256,
+    SERIAL_NUM_LEN = 32,
+
+    OFPQ_ALL = 0xffffffff,
+    OFPQ_MAX_RATE_UNCFG = 0xffff,
+    OFPQ_MIN_RATE_UNCFG = 0xffff,
+};
+
+/* ------------------------------------------- SPECIAL STRUCTURES ---------------------------------- */
+
+struct of_uint64 {
+    uint64_t value;
+};
+
+struct of_uint32 {
+    uint32_t value;
+};
+
+struct of_uint8 {
+    uint8_t value;
+};
+
+/* ------------------------------------------- HEADER ------------------------------------- */
+
+/* Type for header */
+enum ofp_type(wire_type=uint8_t) {
+    OFPT_HELLO = 0,
+    OFPT_ERROR = 1,
+    OFPT_ECHO_REQUEST = 2,
+    OFPT_ECHO_REPLY = 3,
+    OFPT_EXPERIMENTER = 4,
+    OFPT_FEATURES_REQUEST = 5,
+    OFPT_FEATURES_REPLY = 6,
+    OFPT_GET_CONFIG_REQUEST = 7,
+    OFPT_GET_CONFIG_REPLY = 8,
+    OFPT_SET_CONFIG = 9,
+    OFPT_PACKET_IN = 10,
+    OFPT_FLOW_REMOVED = 11,
+    OFPT_PORT_STATUS = 12,
+    OFPT_PACKET_OUT = 13,
+    OFPT_FLOW_MOD = 14,
+    OFPT_GROUP_MOD = 15,
+    OFPT_PORT_MOD = 16,
+    OFPT_TABLE_MOD = 17,
+    OFPT_STATS_REQUEST = 18, /* Tüm sürümler için ayný olsun diye multipart yerine stats */
+    OFPT_STATS_REPLY = 19, /* Tüm sürümler için ayný olsun diye multipart yerine stats */
+    OFPT_BARRIER_REQUEST = 20,
+    OFPT_BARRIER_REPLY = 21,
+    OFPT_ROLE_REQUEST = 24,
+    OFPT_ROLE_REPLY = 25,
+    OFPT_GET_ASYNC_REQUEST = 26,
+    OFPT_GET_ASYNC_REPLY = 27,
+    OFPT_SET_ASYNC = 28,
+    OFPT_METER_MOD = 29,
+    OFPT_ROLE_STATUS = 30,
+    OFPT_TABLE_STATUS = 31,
+    OFPT_REQUESTFORWARD = 32,
+    OFPT_BUNDLE_CONTROL = 33,
+    OFPT_BUNDLE_ADD_MESSAGE = 34,
+    OFPT_CONTROLLER_STATUS = 35, /* 1.4 den sonra yeni gelmis */
+};
+
+/* Header on all OpenFlow packets */
+struct of_header {
+    uint8_t version;
+    uint8_t type == ?;
+    uint16_t length;
+    uint32_t xid;
+};
+
+
+/* ----------------------------------- HEADER TYPES (FOR DIFFERENT PACKETS) ------------------------- */
+
+/* Namespaces */
+/* Used in header_type */
+enum ofp_header_type_namespace(wire_type=uint16_t, stable=True) {
+    OFPHTN_ONF = 0,
+    OFPHTN_ETHERTYPE = 1,
+    OFPHTN_IP_PROTO = 2,
+    OFPHTN_UDP_TCP_PORT = 3,
+    OFPHTN_IPV4_OPTION = 4,
+};
+
+/* ONF namespaces */
+enum ofp_header_type_onf(wire_type=uint16_t, stable=True, complete=False) {
+    OFPHTO_ETHERNET = 0,
+    OFPHTO_NO_HEADER = 1,
+    OFPHTO_OXM_EXPERIMENTER = 0xFFFF,
+};
+
+/* Header type structure. */
+struct of_header_type {
+    enum ofp_header_type_namespace namespace == ?;
+    uint16_t ns_type;
+};
+
+/* --------------------------------------------------- PORT -------------------------------------------------- */
+
+/* Port numbering */
+/* Tüm sürümler için ayný olsun diye ofp_port_no yerine port */
+enum ofp_port(wire_type=uint32_t) {
+    OFPP_MAX = 0xffffff00,
+    OFPP_UNSET = 0xfffffff7,
+    OFPP_IN_PORT = 0xfffffff8,
+    OFPP_TABLE = 0xfffffff9,
+    OFPP_NORMAL = 0xfffffffa,
+    OFPP_FLOOD = 0xfffffffb,
+    OFPP_ALL = 0xfffffffc,
+    OFPP_CONTROLLER = 0xfffffffd,
+    OFPP_LOCAL = 0xfffffffe,
+    OFPP_ANY = 0xffffffff,
+};
+
+/* Flags to indicate behavior of the physical port */
+/* Used in of_port_desc and ofp_port_mod message */
+enum ofp_port_config(wire_type=uint32_t, bitmask=True) {
+    OFPPC_PORT_DOWN = 0x1,
+    OFPPC_NO_RECV = 0x4,
+    OFPPC_NO_FWD = 0x20,
+    OFPPC_NO_PACKET_IN = 0x40,
+    OFPPC_BSN_MIRROR_DEST = 0x80000000, /* header dosyalarýnda bulunmuyor */
+};
+
+/* Current state of the physical port */
+/* Not configurable from the controller */
+/* Used in of_port_desc */
+enum ofp_port_state(wire_type=uint32_t, bitmask=True) {
+    OFPPS_LINK_DOWN = 0x1,
+    OFPPS_BLOCKED = 0x2,
+    OFPPS_LIVE = 0x4,
+};
+
+/* Port description property types */
+/* not in before */
+/* Used in of_port_desc_prop_ethernet */
+enum ofp_port_desc_prop_type {
+   OFPPDPT_ETHERNET = 0,
+   OFPPDPT_OPTICAL = 1,
+   OFPPDPT_PIPELINE_INPUT = 2,
+   OFPPDPT_PIPELINE_OUTPUT = 3,
+   OFPPDPT_RECIRCULATE = 4,
+   OFPPDPT_EXPERIMENTER = 0xFFFF,
+};
+
+/* Features of ports available in a datapath. */
+enum ofp_port_features(wire_type=uint32_t, bitmask=True) {
+    OFPPF_10MB_HD = 0x1,
+    OFPPF_10MB_FD = 0x2,
+    OFPPF_100MB_HD = 0x4,
+    OFPPF_100MB_FD = 0x8,
+    OFPPF_1GB_HD = 0x10,
+    OFPPF_1GB_FD = 0x20,
+    OFPPF_10GB_FD = 0x40,
+    OFPPF_40GB_FD = 0x80,
+    OFPPF_100GB_FD = 0x100,
+    OFPPF_1TB_FD = 0x200,
+    OFPPF_OTHER = 0x400,
+    OFPPF_COPPER = 0x800,
+    OFPPF_FIBER = 0x1000,
+    OFPPF_AUTONEG = 0x2000,
+    OFPPF_PAUSE = 0x4000,
+    OFPPF_PAUSE_ASYM = 0x8000,
+    OFPPF_BSN_BREAKOUT_CAPABLE = 0x80000000, /* not in spec. */
+};
+
+/* Features of optical ports available in switch. */
+enum ofp_optical_port_features(wire_type=uint32_t, bitmask=True) {
+    OFPOPF_RX_TUNE = 0x1,
+    OFPOPF_TX_TUNE = 0x2,
+    OFPOPF_TX_PWR = 0x4,
+    OFPOPF_USE_FREQ = 0x8,
+};
+
+/* Description of a port */
+/* Tüm sürümler için ayný olsun diye ofp_port yerine of_port_desc */
+struct of_port_desc {
+    of_port_no_t port_no;
+    uint16_t length;
+    pad(2);
+    of_mac_addr_t hw_addr;
+    pad(2);
+    of_port_name_t name;
+    enum ofp_port_config config; /* Bitmap of OFPPC_* flags. */
+    enum ofp_port_state state; /* Bitmap of OFPPS_* flags. */
+    list(of_port_desc_prop_t) properties;
+};
+
+/* Common header for all port description properties. */
+struct of_port_desc_prop {
+    uint16_t type == ?;
+    uint16_t length;
+};
+
+/* Ethernet port description property. */
+struct of_port_desc_prop_ethernet : of_port_desc_prop {
+    uint16_t type == 0;
+    uint16_t length;
+    pad(4);
+    uint32_t curr;
+    uint32_t advertised;
+    uint32_t supported;
+    uint32_t peer;
+    uint32_t curr_speed;
+    uint32_t max_speed;
+};
+
+/* Optical port description property. */
+struct of_port_desc_prop_optical : of_port_desc_prop {
+    uint16_t type == 1;
+    uint16_t length;
+    pad(4);
+    uint32_t supported;
+    uint32_t tx_min_freq_lmda;
+    uint32_t tx_max_freq_lmda;
+    uint32_t tx_grid_freq_lmda;
+    uint32_t rx_min_freq_lmda;
+    uint32_t rx_max_freq_lmda;
+    uint32_t rx_grid_freq_lmda;
+    uint16_t tx_pwr_min;
+    uint16_t tx_pwr_max;
+};
+
+/* Ingress pipeline fields description property */
+/* In 1.5.1 spec ofp_port_desc_prop_oxm */
+struct of_port_desc_prop_ingress {
+    uint16_t type == 2;
+    uint16_t length;
+    of_octets_t oxm_ids;
+};
+
+/* Egress pipeline fields description property */
+/* In 1.5.1 spec ofp_port_desc_prop_oxm */
+struct of_port_desc_prop_egress {
+    uint16_t type == 3;
+    uint16_t length;
+    of_octets_t oxm_ids;
+};
+
+/* Recirculate port description property. */
+struct ofp_port_desc_prop_recirculate {
+    uint16_t type == 4;
+    uint16_t length;
+    of_octets_t port_nos;
+};
+
+
+/* Experimenter port description property. */
+struct of_port_desc_prop_experimenter : of_port_desc_prop {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    uint32_t experimenter == ?;
+    uint32_t exp_type;
+};
+
+/* ----------------------------------------------- FLOW MATCH -------------------------------------- */
+
+/* Match Type */
+/* Standard deprecated olmuþ */
+enum ofp_match_type(wire_type=uint16_t) {
+    OFPMT_STANDARD = 0,
+    OFPMT_OXM = 1,
+};
+
+/* OXM Class IDs */
+enum ofp_oxm_class(wire_type=uint16_t) {
+    OFPXMC_NXM_0 = 0,
+    OFPXMC_NXM_1 = 1,
+    OFPXMC_OPENFLOW_BASIC = 0x8000,
+    OFPXMC_PACKET_REGS = 0x8001,
+    OFPXMC_EXPERIMENTER = 0xffff,
+};
+
+
+/* VLAN id set or not */
+enum ofp_vlan_id(wire_type=uint16_t) {
+    OFPVID_NONE = 0,
+    OFPVID_PRESENT = 0x1000,
+};
+
+// FIXME: OF spec specified this as '9' bits, implicitly adding to full byte
+/* Bit definitions for IPv6 Extension Header pseudo-field. */
+enum ofp_ipv6exthdr_flags(wire_type=uint16_t, bitmask=True) {
+    OFPIEH_NONEXT = 0x1,
+    OFPIEH_ESP = 0x2,
+    OFPIEH_AUTH = 0x4,
+    OFPIEH_DEST = 0x8,
+    OFPIEH_FRAG = 0x10,
+    OFPIEH_ROUTER = 0x20,
+    OFPIEH_HOP = 0x40,
+    OFPIEH_UNREP = 0x80,
+    OFPIEH_UNSEQ = 0x100,
+};
+
+/* Flow Match */
+/* standard-1.0 içinde v1 olarak var */
+/* standard-1.1 içinde v2 olarak var */
+/* standard-1.2 den itibaren v3 olarak deðiþmiþ ve oxm classlarý oluþturulmuþ */
+struct of_match_v3(align=8, length_includes_align=False) {
+    uint16_t type == 1;
+    uint16_t length;
+    list(of_oxm_t) oxm_list;
+};
+
+/* --------------------------------------------------------- FLOW STATS ----------------------------------------------- */
+
+/* stats oxs class */
+/* not in 1.4  */
+enum ofp_oxs_class(wire_type=uint16_t) {
+    OFPXSC_OPENFLOW_BASIC = 0x8002,
+    OFPXSC_EXPERIMENTER = 0xFFFF,
+};
+
+struct of_stat_v6 (align=8, length_includes_align=False){
+    pad(2); /* reserved */
+    uint16_t length;
+    list(of_oxs_t) oxs_fields;
+};
+
+/* ---------------------------------------------------- FLOW INSTRUCTIONS --------------------------------------- */
+
+/* instruction types */
+enum ofp_instruction_type(wire_type=uint16_t, bitmask=True) {
+    OFPIT_GOTO_TABLE = 0x1,
+    OFPIT_WRITE_METADATA = 0x2,
+    OFPIT_WRITE_ACTIONS = 0x3,
+    OFPIT_APPLY_ACTIONS = 0x4,
+    OFPIT_CLEAR_ACTIONS = 0x5,
+    OFPIT_DEPRECATED = 0x6,
+    OFPIT_STAT_TRIGGER = 0x7,
+    OFPIT_EXPERIMENTER = 0xffff,
+};
+
+/* stat trigger instruction flags */
+/* not in 1.4 */
+enum ofp_stat_trigger_flags(wire_type=uint32_t, bitmask=True) {
+    OFPSTF_PERIODIC = 0x1,
+    OFPSTF_ONLY_FIRST = 0x2,
+};
+
+/* Instruction Header */
+struct of_instruction {
+    uint16_t type == ?;
+    uint16_t len;
+};
+
+/* Instruction structure for OFPIT_GOTO_TABLE */
+struct of_instruction_goto_table : of_instruction {
+    uint16_t type == 1;
+    uint16_t len;
+    uint8_t table_id;
+    pad(3);
+};
+
+/* Instruction structure for OFPIT_WRITE_METADATA */
+struct of_instruction_write_metadata : of_instruction {
+    uint16_t type == 2;
+    uint16_t len;
+    pad(4);
+    uint64_t metadata;
+    uint64_t metadata_mask;
+};
+
+/* Instruction structure for OFPIT_WRITE */
+struct of_instruction_write_actions : of_instruction {
+    uint16_t type == 3;
+    uint16_t len;
+    pad(4);
+    list(of_action_t) actions;
+};
+
+/* Instruction structure for OFPIT_APPLY */
+struct of_instruction_apply_actions : of_instruction {
+    uint16_t type == 4;
+    uint16_t len;
+    pad(4);
+    list(of_action_t) actions;
+};
+
+/* Instruction structure for OFPIT_CLEAR */
+struct of_instruction_clear_actions : of_instruction {
+    uint16_t type == 5;
+    uint16_t len;
+    pad(4);
+};
+
+/* Instruction structure for OFPIT_STAT_TRIGGER */
+/* not in 1.4 */
+struct of_instruction_stat_trigger : of_instruction {
+    uint16_t type == 7;
+    uint16_t len;
+    enum ofp_stat_trigger_flags flags;
+    list(of_oxs_t) thresholds;
+};
+
+/* Instruction structure for experimental instructions */
+struct of_instruction_experimenter : of_instruction {
+    uint16_t type == 65535;
+    uint16_t len;
+    uint32_t experimenter == ?;
+    of_octets_t data;
+};
+
+/* --------------------------------------------------------- ACTION STRUCTURES ----------------------------------------- */
+
+/* action types */
+enum ofp_action_type(wire_type=uint16_t) {
+    OFPAT_OUTPUT = 0,
+    OFPAT_COPY_TTL_OUT = 0xb,
+    OFPAT_COPY_TTL_IN = 0xc,
+    OFPAT_SET_MPLS_TTL = 0xf,
+    OFPAT_DEC_MPLS_TTL = 0x10,
+    OFPAT_PUSH_VLAN = 0x11,
+    OFPAT_POP_VLAN = 0x12,
+    OFPAT_PUSH_MPLS = 0x13,
+    OFPAT_POP_MPLS = 0x14,
+    OFPAT_SET_QUEUE = 0x15,
+    OFPAT_GROUP = 0x16,
+    OFPAT_SET_NW_TTL = 0x17,
+    OFPAT_DEC_NW_TTL = 0x18,
+    OFPAT_SET_FIELD = 0x19,
+    OFPAT_PUSH_PBB = 0x1a,
+    OFPAT_POP_PBB = 0x1b,
+    OFPAT_COPY_FIELD = 0x1c,
+    OFPAT_METER = 0x1d,
+    OFPAT_EXPERIMENTER = 0xffff,
+};
+
+/* Action header that is common to all actions */
+struct of_action {
+    uint16_t type == ?;
+    uint16_t len;
+};
+
+/* Action structure for OFPAT_OUTPUT */
+struct of_action_output : of_action {
+    uint16_t type == 0;
+    uint16_t len;
+    of_port_no_t port;
+    uint16_t max_len;
+    pad(6);
+};
+
+/*The max_len indicates the maximum amount of data from a packet that should be sent when the port is OFPP_CONTROLLER*/
+enum ofp_controller_max_len(wire_type=uint16_t, complete=False) {
+    OFPCML_MAX = 0xffe5,
+    OFPCML_NO_BUFFER = 0xffff,
+};
+
+/* Action structure for OFPAT_GROUP. */
+struct of_action_group : of_action {
+    uint16_t type == 22;
+    uint16_t len;
+    uint32_t group_id;
+};
+
+/* Action structure for OFPAT_SET_QUEUE. */
+struct of_action_set_queue : of_action {
+    uint16_t type == 21;
+    uint16_t len;
+    uint32_t queue_id;
+};
+
+/* Action structure for OFPAT_METER */
+struct of_action_meter : of_action {
+    uint16_t type == 29;
+    uint16_t len;
+    uint32_t meter_id;
+};
+
+/* Action structure for OFPAT_SET_MPLS_TTL. */
+struct of_action_set_mpls_ttl : of_action {
+    uint16_t type == 15;
+    uint16_t len;
+    uint8_t mpls_ttl;
+    pad(3);
+};
+
+/* Action structure for OFPAT_COPY_TTL_OUT */
+struct of_action_copy_ttl_out : of_action {
+    uint16_t type == 11;
+    uint16_t len;
+    pad(4);
+};
+
+/* Action structure for OFPAT_COPY_TTL_IN */
+struct of_action_copy_ttl_in : of_action {
+    uint16_t type == 12;
+    uint16_t len;
+    pad(4);
+};
+
+/* Action structure for OFPAT_DEC_MPLS_TTL */
+struct of_action_dec_mpls_ttl : of_action {
+    uint16_t type == 16;
+    uint16_t len;
+    pad(4);
+};
+
+/* Action structure for OFPAT_DEC_NW_TTL */
+struct of_action_dec_nw_ttl : of_action {
+    uint16_t type == 24;
+    uint16_t len;
+    pad(4);
+};
+
+/* Action structure for OFPAT_POP_VLAN */
+struct of_action_pop_vlan : of_action {
+    uint16_t type == 18;
+    uint16_t len;
+    pad(4);
+};
+
+/* Action structure for OFPAT_POP_PBB */
+struct of_action_pop_pbb : of_action {
+    uint16_t type == 27;
+    uint16_t len;
+    pad(4);
+};
+
+/* Action structure for OFPAT_SET_NW_TTL. */
+struct of_action_set_nw_ttl : of_action {
+    uint16_t type == 23;
+    uint16_t len;
+    uint8_t nw_ttl;
+    pad(3);
+};
+
+/* Action structure for OFPAT_PUSH_VLAN */
+struct of_action_push_vlan : of_action {
+    uint16_t type == 17;
+    uint16_t len;
+    uint16_t ethertype;
+    pad(2);
+};
+
+/* Action structure for OFPAT_PUSH_MPLS */
+struct of_action_push_mpls : of_action {
+    uint16_t type == 19;
+    uint16_t len;
+    uint16_t ethertype;
+    pad(2);
+};
+
+/* Action structure for OFPAT_PUSH_PBB */
+struct of_action_push_pbb : of_action {
+    uint16_t type == 26;
+    uint16_t len;
+    uint16_t ethertype;
+    pad(2);
+};
+
+/* Action structure for OFPAT_POP_MPLS */
+struct of_action_pop_mpls : of_action {
+    uint16_t type == 20;
+    uint16_t len;
+    uint16_t ethertype;
+    pad(2);
+};
+
+/* Action structure for OFPAT_SET_FIELD */
+struct of_action_set_field(align=8, length_includes_align=True) : of_action {
+    uint16_t type == 25;
+    uint16_t len;
+    of_oxm_t field;
+};
+
+/* Action structure for OFPAT_COPY_FIELD */
+/* not in 1.4 */
+struct ofp_action_copy_field {
+    uint16_t type == 28;
+    uint16_t len;
+    uint16_t n_bits;
+    uint16_t src_offset;
+    uint16_t dst_offset;
+    pad(2);
+    list(of_oxm_t) oxm_ids;
+};
+
+/* Action header for OFPAT_EXPERIMENTER */
+struct of_action_experimenter(align=8, length_includes_align=True): of_action {
+    uint16_t type == 65535;
+    uint16_t len;
+    uint32_t experimenter == ?;
+};
+
+/* ---------------------------------------------------------- CONTROLLER STATUS STRUCTURE ------------------------- */
+/* not in 1.4 */
+
+/* Why is the controller status being reported? */
+enum ofp_controller_status_reason(wire_type=uint8_t) {
+    OFPCSR_REQUEST = 0,
+    OFPCSR_CHANNEL_STATUS = 1,
+    OFPCSR_ROLE = 2,
+    OFPCSR_CONTROLLER_ADDED = 3,
+    OFPCSR_CONTROLLER_REMOVED = 4,
+    OFPCSR_SHORT_ID = 5,
+    OFPCSR_EXPERIMENTER = 6,
+};
+
+/* Control channel status. */
+enum ofp_control_channel_status(wire_type=uint8_t) {
+    OFPCT_STATUS_UP = 0,
+    OFPCT_STATUS_DOWN = 1,
+};
+
+/* Controller status property types */
+enum ofp_controller_status_prop_type {
+    OFPCSPT_URI = 0,
+    OFPCSPT_EXPERIMENTER = 0xFFFF,
+};
+
+/* Common header for all Controller Status Properties */
+struct of_controller_status_prop {
+    uint16_t type == ?;
+    uint16_t length;
+};
+
+struct of_controller_status_entry {
+    uint16_t length;
+    uint16_t short_id;
+    enum ofp_controller_role role;
+    enum ofp_controller_status_reason reason;
+    enum ofp_control_channel_status channel_status;
+    pad(6);
+    list(of_controller_status_prop_t) properties;
+};
+
+/* Body of OFPMP_CONTROLLER_STATUS reply message and body of async OFPT_CONTROLLER_STATUS message */
+struct of_controller_status : of_header {
+    uint8_t version;
+    uint8_t type == 35;
+    uint16_t length;
+    uint32_t xid;
+    of_controller_status_entry_t entry;
+};
+
+/* Connection URI controller status property */
+struct ofp_controller_status_prop_uri : of_controller_status_prop {
+    uint16_t type == 0;
+    uint16_t length;
+    of_controller_uri_t uri;
+};
+
+/* Experimenter controller status property */
+struct ofp_controller_status_prop_experimenter : of_controller_status_prop {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    uint32_t experimenter == ?;
+    uint32_t exp_type;
+};
+
+/* -------------------------------------------------- MESSAGES --------------------------------------------- */
+
+/* Capabilities supported by the datapath. */
+enum ofp_capabilities(wire_type=uint32_t, bitmask=True) {
+    OFPC_FLOW_STATS = 0x1,
+    OFPC_TABLE_STATS = 0x2,
+    OFPC_PORT_STATS = 0x4,
+    OFPC_GROUP_STATS = 0x8,
+    OFPC_IP_REASM = 0x20,
+    OFPC_QUEUE_STATS = 0x40,
+    OFPC_PORT_BLOCKED = 0x100,
+    OFPC_BUNDLES = 0x200,
+    OFPC_FLOW_MONITORING = 0x400,
+};
+
+/* Handling of IP fragments. */
+enum ofp_config_flags(wire_type=uint16_t, bitmask=True) {
+    OFPC_FRAG_NORMAL = 0,
+    OFPC_FRAG_DROP = 1,
+    OFPC_FRAG_REASM = 2,
+    OFPC_FRAG_MASK = 3,
+};
+
+/* Table numbering. Tables can use any number up to OFPT_MAX. */
+enum ofp_table(wire_type=uint8_t, complete=False) {
+    OFPTT_MAX = 0xfe,
+    OFPTT_ALL = 0xff,
+};
+
+
+/* Flags to configure the table. */
+enum ofp_table_config(wire_type=uint32_t, bitmask=True) {
+    OFPTC_DEPRECATED_MASK = 0x3,
+    OFPTC_EVICTION = 0x4,
+    OFPTC_VACANCY_EVENTS = 0x8,
+};
+
+/* Eviction flags. */
+enum ofp_table_mod_prop_eviction_flag(wire_type=uint32_t, bitmask=True) {
+    OFPTMPEF_OTHER = 0x1,
+    OFPTMPEF_IMPORTANCE = 0x2,
+    OFPTMPEF_LIFETIME = 0x4,
+};
+
+/* flow mod command */
+enum ofp_flow_mod_command(wire_type=uint8_t) {
+    OFPFC_ADD = 0,
+    OFPFC_MODIFY = 1,
+    OFPFC_MODIFY_STRICT = 2,
+    OFPFC_DELETE = 3,
+    OFPFC_DELETE_STRICT = 4,
+};
+
+/* flow mod flags */
+enum ofp_flow_mod_flags(wire_type=uint16_t, bitmask=True) {
+    OFPFF_SEND_FLOW_REM = 0x1,
+    OFPFF_CHECK_OVERLAP = 0x2,
+    OFPFF_RESET_COUNTS = 0x4,
+    OFPFF_NO_PKT_COUNTS = 0x8,
+    OFPFF_NO_BYT_COUNTS = 0x10,
+
+    /* Non-standard, enabled by an experimenter message */
+    /* See the bsn_flow_idle input file */
+    OFPFF_BSN_SEND_IDLE = 0x80,
+};
+
+/* Group commands */
+enum ofp_group_mod_command(wire_type=uint16_t) {
+    OFPGC_ADD = 0,
+    OFPGC_MODIFY = 1,
+    OFPGC_DELETE = 2,
+    OFPGC_INSERT_BUCKET = 3,
+    OFPGC_REMOVE_BUCKET = 5,
+};
+
+/* Group types */
+enum ofp_group_type(wire_type=uint8_t) {
+    OFPGT_ALL = 0,
+    OFPGT_SELECT = 1,
+    OFPGT_INDIRECT = 2,
+    OFPGT_FF = 3,
+};
+
+/* Group numbering. Groups can use any number up to OFPG_MAX. */
+enum ofp_group(wire_type=uint32_t, complete=False) {
+    OFPG_MAX = 0xffffff00,
+    OFPG_ALL = 0xfffffffc,
+    OFPG_ANY = 0xffffffff,
+};
+
+/* Bucket Id can be any value between 0 and OFPG_BUCKET_MAX */
+enum ofp_group_bucket(wire_type=uint32_t) {
+    OFPG_BUCKET_MAX = 0xffffff00,
+    OFPG_BUCKET_FIRST = 0xfffffffd,
+    OFPG_BUCKET_LAST = 0xfffffffe,
+    OFPG_BUCKET_ALL = 0xffffffff,
+};
+
+/* Group bucket property types. */
+enum ofp_group_bucket_prop_type {
+    OFPGBPT_WEIGHT = 0,
+    OFPGBPT_WATCH_PORT = 1,
+    OFPGBPT_WATCH_GROUP = 2,
+    OFPGBPT_EXPERIMENTER = 0xFFFF,
+};
+
+/* Group property types. */
+enum ofp_group_prop_type {
+    OFPGPT_EXPERIMENTER = 0xFFFF,
+};
+
+/* Port mod property types */
+enum ofp_port_mod_prop_type {
+    OFPPMPT_ETHERNET = 0,
+    OFPPMPT_OPTICAL = 1,
+    OFPPMPT_EXPERIMENTER = 0xFFFF,
+};
+
+/* Meter numbering. Flow meters can use any number up to OFPM_MAX. */
+enum ofp_meter(wire_type=uint32_t, complete=False) {
+    OFPM_MAX = 0xffff0000,
+    OFPM_SLOWPATH = 0xfffffffd,
+    OFPM_CONTROLLER = 0xfffffffe,
+    OFPM_ALL = 0xffffffff,
+};
+
+/* Meter commands */
+enum ofp_meter_mod_command(wire_type=uint16_t) {
+    OFPMC_ADD = 0,
+    OFPMC_MODIFY = 1,
+    OFPMC_DELETE = 2,
+};
+
+/* Meter configuration flags */
+enum ofp_meter_flags(wire_type=uint16_t, bitmask=True) {
+    OFPMF_KBPS = 0x1,
+    OFPMF_PKTPS = 0x2,
+    OFPMF_BURST = 0x4,
+    OFPMF_STATS = 0x8,
+};
+
+/* Meter band types */
+enum ofp_meter_band_type(wire_type=uint16_t) {
+    OFPMBT_DROP = 0x1,
+    OFPMBT_DSCP_REMARK = 0x2,
+    OFPMBT_EXPERIMENTER = 0xffff,
+};
+
+/* Multipart request flags */
+enum ofp_stats_request_flags(wire_type=uint16_t, bitmask=True) {
+    OFPSF_REQ_MORE = 0x1,
+};
+
+/* Multipart reply flags */
+enum ofp_stats_reply_flags(wire_type=uint16_t, bitmask=True) {
+    OFPSF_REPLY_MORE = 0x1,
+};
+
+/* 
+ * Multipart Message Types 
+ *
+ * OF1.5 renames the OFPMP/ST for:
+ * flow (1) -> flow_desc (1)
+ * aggregate (2) -> aggregate_stats (2)
+ * table (3) -> table_stats (3)
+ * group (6) -> group_stats (6)
+ * meter (9) -> meter_stats (9)
+ * meter_config (10) -> meter_desc (10)
+ * 
+ * OF1.4 renamed:
+ * queue (5) -> queue_stats (5)
+ * which was retained as "queue" in standard-1.4.
+ *
+ * Using different names for the same message
+ * in Loxi causes duplicate enum entries that
+ * map to essentially the same underlying message.
+ * For simpliciy, we can retain the original, 
+ * OF1.3-, naming convention to reduce complexity.
+ * This is why OF1.4+ ofp_stats_type enums from 
+ * OF1.3- remain as OFPST_* and do not appear as
+ * OFPMP_*.
+ *
+ * Using the _STATS is certainly more explicit; 
+ * however, that would perhaps necessitate changing
+ * OF1.3- OFPMP/ST names, which would break existing
+ * applications that use OF1.3- OFPMP/ST names.
+ */
+enum ofp_stats_type(wire_type=uint16_t) {
+    OFPST_DESC = 0,
+    OFPST_FLOW = 1, /* omit _desc */
+    OFPST_AGGREGATE = 2, /* omit _stats */
+    OFPST_TABLE = 3, /* omit _stats */
+    OFPST_PORT = 4, /* omit _stats; historically omitted */
+    OFPST_QUEUE = 5, /* omit _stats */
+    OFPST_GROUP = 6, /* omit _stats */
+    OFPST_GROUP_DESC = 7,
+    OFPST_GROUP_FEATURES = 8,
+    OFPST_METER = 9, /* omit_stats */
+    OFPST_METER_CONFIG = 10, /* retain OFPST_ prefix; retain _config */
+    OFPST_METER_FEATURES = 11,
+    OFPST_TABLE_FEATURES = 12,
+    OFPST_PORT_DESC = 13,
+    OFPMP_TABLE_DESC = 14,
+    OFPMP_QUEUE_DESC = 15,
+    OFPMP_FLOW_MONITOR = 16,
+    OFPMP_FLOW_LIGHTWEIGHT = 17, /* omit _stats; use _lightweight to imply no desc included */
+    OFPMP_CONTROLLER_STATUS = 18,
+    OFPMP_BUNDLE_FEATURES = 19,
+    OFPST_EXPERIMENTER = 0xffff,
+};
+
+/* Reason for generating flow stats. */
+enum ofp_flow_stats_reason(wire_type=uint8_t) {
+    OFPFSR_STATS_REQUEST = 0,
+    OFPFSR_STAT_TRIGGER = 1,
+};
+
+/* Port stats property types.  */
+enum ofp_port_stats_prop_type(wire_type=uint16_t) {
+    OFPPSPT_ETHERNET          = 0,      /* Ethernet property. */
+    OFPPSPT_OPTICAL           = 1,      /* Optical property. */
+    OFPPSPT_EXPERIMENTER      = 0xFFFF, /* Experimenter property. */
+};
+
+/* Flags is one of OFPOSF_ below */
+enum ofp_port_stats_optical_flags(wire_type=uint32_t, bitmask=True) {
+    OFPOSF_RX_TUNE = 0x1,
+    OFPOSF_TX_TUNE = 0x2,
+    OFPOSF_TX_PWR = 0x4,
+    OFPOSF_RX_PWR = 0x10,
+    OFPOSF_TX_BIAS = 0x20,
+    OFPOSF_TX_TEMP = 0x40,
+};
+
+/* queue statistics property types */
+enum ofp_queue_stats_prop_type {
+    OFPQSPT_EXPERIMENTER = 0xffff
+};
+
+/* queue description property types */
+enum ofp_queue_desc_prop_type {
+    OFPQDPT_MIN_RATE = 1,
+    OFPQDPT_MAX_RATE = 2,
+    OFPQDPT_EXPERIMENTER = 0xffff,
+};
+
+/* Group configuration flags */
+enum ofp_group_capabilities(wire_type=uint32_t, bitmask=True) {
+    OFPGFC_SELECT_WEIGHT = 0x1,
+    OFPGFC_SELECT_LIVENESS = 0x2,
+    OFPGFC_CHAINING = 0x4,
+    OFPGFC_CHAINING_CHECKS = 0x8,
+};
+
+/* Meter feature flags */
+enum ofp_meter_feature_flags(wire_type=uint32_t, bitmask=True) {
+    OFPMFF_ACTION_SET = 0x1,
+    OFPMFF_ANY_POSITION = 0x2,
+    OFPMFF_MULTI_LIST = 0x4,
+};
+
+/* Table Features request commands */
+enum ofp_table_features_command(wire_type=uint8_t) {
+    OFPTFC_REPLACE = 0,
+    OFPTFC_MODIFY = 1,
+    OFPTFC_ENABLE = 2,
+    OFPTFC_DISABLE = 3,
+};
+
+/* Flags of features supported by the table. */
+enum ofp_table_feature_flag (wire_type=uint32_t, bitmask=True) {
+    OFPTFF_INGRESS_TABLE = 0x1,
+    OFPTFF_EGRESS_TABLE = 0x2,
+    OFPTFF_FIRST_EGRESS = 0x10,
+};
+
+/* Table Feature property types. */
+enum ofp_table_feature_prop_type(wire_type=uint16_t) {
+    OFPTFPT_INSTRUCTIONS = 0,
+    OFPTFPT_INSTRUCTIONS_MISS = 1,
+    OFPTFPT_NEXT_TABLES = 2,
+    OFPTFPT_NEXT_TABLES_MISS = 3,
+    OFPTFPT_WRITE_ACTIONS = 4,
+    OFPTFPT_WRITE_ACTIONS_MISS = 5,
+    OFPTFPT_APPLY_ACTIONS = 6,
+    OFPTFPT_APPLY_ACTIONS_MISS = 7,
+    OFPTFPT_MATCH = 8,
+    OFPTFPT_WILDCARDS = 0xa,
+    OFPTFPT_WRITE_SETFIELD = 0xc,
+    OFPTFPT_WRITE_SETFIELD_MISS = 0xd,
+    OFPTFPT_APPLY_SETFIELD = 0xe,
+    OFPTFPT_APPLY_SETFIELD_MISS = 0xf,
+    OFPTFPT_TABLE_SYNC_FROM = 0x10,
+    OFPTFPT_WRITE_COPYFIELD = 18,
+    OFPTFPT_WRITE_COPYFIELD_MISS = 19,
+    OFPTFPT_APPLY_COPYFIELD = 20,
+    OFPTFPT_APPLY_COPYFIELD_MISS = 21,
+    OFPTFPT_PACKET_TYPES = 22,
+    OFPTFPT_EXPERIMENTER = 0xfffe,
+    OFPTFPT_EXPERIMENTER_MISS = 0xffff,
+};
+
+/* Table Mod property types.*/
+enum ofp_table_mod_prop_type {
+    OFPTMPT_EVICTION = 0x2,
+    OFPTMPT_VACANCY = 0x3,
+    OFPTMPT_EXPERIMENTER = 0xFFFF,
+};
+
+
+/* controller roles */
+enum ofp_controller_role(wire_type=uint32_t) {
+    OFPCR_ROLE_NOCHANGE = 0,
+    OFPCR_ROLE_EQUAL = 1,
+    OFPCR_ROLE_MASTER = 2,
+    OFPCR_ROLE_SLAVE = 3,
+};
+
+/* Bundle control message types */
+enum ofp_bundle_ctrl_type(wire_type=uint16_t) {
+    OFPBCT_OPEN_REQUEST = 0,
+    OFPBCT_OPEN_REPLY = 1,
+    OFPBCT_CLOSE_REQUEST = 2,
+    OFPBCT_CLOSE_REPLY = 3,
+    OFPBCT_COMMIT_REQUEST = 4,
+    OFPBCT_COMMIT_REPLY = 5,
+    OFPBCT_DISCARD_REQUEST = 6,
+    OFPBCT_DISCARD_REPLY = 7,
+};
+
+/* Bundle configuration flags. */
+enum ofp_bundle_flags(wire_type=uint16_t, bitmask=True) {
+    OFPBF_ATOMIC = 1,
+    OFPBF_ORDERED = 2,
+    OFPBF_TIME = 4,
+};
+
+/* Bundle features property types. */
+enum ofp_bundle_features_prop_type {
+    OFPTMPBF_TIME_CAPABILITY = 0x1,
+    OFPTMPBF_EXPERIMENTER = 0xFFFF,
+};
+
+
+/* Bundle property types. */
+enum ofp_bundle_prop_type {
+    OFPBPT_TIME = 1,
+    OFPBPT_EXPERIMENTER = 0xFFFF,
+};
+
+
+/* Async Config property types.*/
+enum ofp_async_config_prop_type {
+    OFPACPT_PACKET_IN_SLAVE = 0,
+    OFPACPT_PACKET_IN_MASTER = 1,
+    OFPACPT_PORT_STATUS_SLAVE = 2,
+    OFPACPT_PORT_STATUS_MASTER = 3,
+    OFPACPT_FLOW_REMOVED_SLAVE = 4,
+    OFPACPT_FLOW_REMOVED_MASTER = 5,
+    OFPACPT_ROLE_STATUS_SLAVE = 6,
+    OFPACPT_ROLE_STATUS_MASTER = 7,
+    OFPACPT_TABLE_STATUS_SLAVE = 8,
+    OFPACPT_TABLE_STATUS_MASTER = 9,
+    OFPACPT_REQUESTFORWARD_SLAVE = 10,
+    OFPACPT_REQUESTFORWARD_MASTER = 11,
+    OFPACPT_FLOW_STATS_SLAVE = 12,
+    OFPACPT_FLOW_STATS_MASTER = 13,
+    OFPACPT_CONT_STATUS_SLAVE = 14,
+    OFPACPT_CONT_STATUS_MASTER = 15,
+    OFPACPT_EXPERIMENTER_SLAVE = 0xFFFE,
+    OFPACPT_EXPERIMENTER_MASTER = 0xFFFF,
+};
+
+/* Why is this packet being sent to the controller? */
+enum ofp_packet_in_reason(wire_type=uint8_t) {
+    OFPR_NO_MATCH = 0,
+    OFPR_ACTION = 1,
+    OFPR_INVALID_TTL = 2,
+    OFPR_ACTION_SET = 3,
+    OFPR_GROUP = 4,
+    OFPR_PACKET_OUT = 5,
+
+    // non-standard BSN extensions. OF does not have a standard-conformant
+    // way to extend the set of packet_in reasons
+    OFPR_BSN_NEW_HOST = 128,
+    OFPR_BSN_STATION_MOVE = 129,
+    OFPR_BSN_BAD_VLAN = 130,
+    OFPR_BSN_DESTINATION_LOOKUP_FAILURE = 131,
+    OFPR_BSN_NO_ROUTE = 132,
+    OFPR_BSN_ICMP_ECHO_REQUEST = 133,
+    OFPR_BSN_DEST_NETWORK_UNREACHABLE = 134,
+    OFPR_BSN_DEST_HOST_UNREACHABLE = 135,
+    OFPR_BSN_DEST_PORT_UNREACHABLE = 136,
+    OFPR_BSN_FRAGMENTATION_REQUIRED = 137,
+    OFPR_BSN_ARP = 139,
+    OFPR_BSN_DHCP = 140,
+    OFPR_BSN_DEBUG = 141,
+    OFPR_BSN_PACKET_OF_DEATH = 142,
+};
+
+/* Why was this flow removed? */
+enum ofp_flow_removed_reason(wire_type=uint8_t) {
+    OFPRR_IDLE_TIMEOUT = 0,
+    OFPRR_HARD_TIMEOUT = 1,
+    OFPRR_DELETE = 2,
+    OFPRR_GROUP_DELETE = 3,
+    OFPRR_METER_DELETE = 4,
+    OFPRR_EVICTION = 5,
+};
+
+/* What changed about the physical port */
+enum ofp_port_reason(wire_type=uint8_t) {
+    OFPPR_ADD = 0,
+    OFPPR_DELETE = 1,
+    OFPPR_MODIFY = 2,
+};
+
+/* What changed about the controller role */
+enum ofp_controller_role_reason(wire_type=uint8_t) {
+    OFPCRR_MASTER_REQUEST = 0,
+    OFPCRR_CONFIG = 1,
+    OFPCRR_EXPERIMENTER = 2,
+};
+
+/* Role property types.*/
+enum ofp_role_prop_type {
+    OFPRPT_EXPERIMENTER = 0xFFFF,
+};
+
+/* What changed about the table */
+enum ofp_table_reason(wire_type=uint8_t) {
+    OFPTR_VACANCY_DOWN = 3,
+    OFPTR_VACANCY_UP = 4,
+};
+
+/* Request forward reason */
+enum ofp_requestforward_reason {
+    OFPRFR_GROUP_MOD = 0,
+    OFPRFR_METER_MOD = 1,
+};
+
+/* Hello elements types. */
+enum ofp_hello_elem_type(wire_type=uint16_t) {
+    OFPHET_VERSIONBITMAP = 1,
+};
+
+/* Values for ’type’ in ofp_error_message */
+enum ofp_error_type(wire_type=uint16_t) {
+    OFPET_HELLO_FAILED = 0,
+    OFPET_BAD_REQUEST = 1,
+    OFPET_BAD_ACTION = 2,
+    OFPET_BAD_INSTRUCTION = 3,
+    OFPET_BAD_MATCH = 4,
+    OFPET_FLOW_MOD_FAILED = 5,
+    OFPET_GROUP_MOD_FAILED = 6,
+    OFPET_PORT_MOD_FAILED = 7,
+    OFPET_TABLE_MOD_FAILED = 8,
+    OFPET_QUEUE_OP_FAILED = 9,
+    OFPET_SWITCH_CONFIG_FAILED = 10,
+    OFPET_ROLE_REQUEST_FAILED = 11,
+    OFPET_METER_MOD_FAILED = 12,
+    OFPET_TABLE_FEATURES_FAILED = 13,
+    OFPET_BAD_PROPERTY = 14,
+    OFPET_ASYNC_CONFIG_FAILED = 15,
+    OFPET_FLOW_MONITOR_FAILED = 16,
+    OFPET_BUNDLE_FAILED = 17,
+    OFPET_EXPERIMENTER = 0xffff,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_HELLO_FAILED */
+enum ofp_hello_failed_code(wire_type=uint16_t) {
+    OFPHFC_INCOMPATIBLE = 0,
+    OFPHFC_EPERM = 1,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_BAD_REQUEST. */
+enum ofp_bad_request_code(wire_type=uint16_t) {
+    OFPBRC_BAD_VERSION = 0,
+    OFPBRC_BAD_TYPE = 1,
+    OFPBRC_BAD_STAT = 2,
+    OFPBRC_BAD_EXPERIMENTER = 3,
+    OFPBRC_BAD_EXPERIMENTER_TYPE = 4,
+    OFPBRC_EPERM = 5,
+    OFPBRC_BAD_LEN = 6,
+    OFPBRC_BUFFER_EMPTY = 7,
+    OFPBRC_BUFFER_UNKNOWN = 8,
+    OFPBRC_BAD_TABLE_ID = 9,
+    OFPBRC_IS_SLAVE = 10,
+    OFPBRC_BAD_PORT = 11,
+    OFPBRC_BAD_PACKET = 12,
+    OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13,
+    OFPBRC_MULTIPART_REQUEST_TIMEOUT = 14,
+    OFPBRC_MULTIPART_REPLY_TIMEOUT = 15,
+    OFPBRC_MULTIPART_BAD_SCHED = 16,
+    OFPBRC_PIPELINE_FIELDS_ONLY = 17,
+    OFPBRC_UNKNOWN = 18,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_BAD_ACTION. */
+enum ofp_bad_action_code(wire_type=uint16_t) {
+    OFPBAC_BAD_TYPE = 0,
+    OFPBAC_BAD_LEN = 1,
+    OFPBAC_BAD_EXPERIMENTER = 2,
+    OFPBAC_BAD_EXPERIMENTER_TYPE = 3,
+    OFPBAC_BAD_OUT_PORT = 4,
+    OFPBAC_BAD_ARGUMENT = 5,
+    OFPBAC_EPERM = 6,
+    OFPBAC_TOO_MANY = 7,
+    OFPBAC_BAD_QUEUE = 8,
+    OFPBAC_BAD_OUT_GROUP = 9,
+    OFPBAC_MATCH_INCONSISTENT = 10,
+    OFPBAC_UNSUPPORTED_ORDER = 11,
+    OFPBAC_BAD_TAG = 12,
+    OFPBAC_BAD_SET_TYPE = 13,
+    OFPBAC_BAD_SET_LEN = 14,
+    OFPBAC_BAD_SET_ARGUMENT = 15,
+    OFPBAC_BAD_SET_MASK = 16,
+    OFPBAC_BAD_METER = 17,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_BAD_INSTRUCTION. */
+enum ofp_bad_instruction_code(wire_type=uint16_t) {
+    OFPBIC_UNKNOWN_INST = 0,
+    OFPBIC_UNSUP_INST = 1,
+    OFPBIC_BAD_TABLE_ID = 2,
+    OFPBIC_UNSUP_METADATA = 3,
+    OFPBIC_UNSUP_METADATA_MASK = 4,
+    OFPBIC_BAD_EXPERIMENTER = 5,
+    OFPBIC_BAD_EXPERIMENTER_TYPE = 6,
+    OFPBIC_BAD_LEN = 7,
+    OFPBIC_EPERM = 8,
+    OFPBIC_DUP_INST = 9,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_BAD_MATCH. */
+enum ofp_bad_match_code(wire_type=uint16_t) {
+    OFPBMC_BAD_TYPE = 0,
+    OFPBMC_BAD_LEN = 1,
+    OFPBMC_BAD_TAG = 2,
+    OFPBMC_BAD_DL_ADDR_MASK = 3,
+    OFPBMC_BAD_NW_ADDR_MASK = 4,
+    OFPBMC_BAD_WILDCARDS = 5,
+    OFPBMC_BAD_FIELD = 6,
+    OFPBMC_BAD_VALUE = 7,
+    OFPBMC_BAD_MASK = 8,
+    OFPBMC_BAD_PREREQ = 9,
+    OFPBMC_DUP_FIELD = 10,
+    OFPBMC_EPERM = 11,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_FLOW_MOD_FAILED. */
+enum ofp_flow_mod_failed_code(wire_type=uint16_t) {
+    OFPFMFC_UNKNOWN = 0,
+    OFPFMFC_TABLE_FULL = 1,
+    OFPFMFC_BAD_TABLE_ID = 2,
+    OFPFMFC_OVERLAP = 3,
+    OFPFMFC_EPERM = 4,
+    OFPFMFC_BAD_TIMEOUT = 5,
+    OFPFMFC_BAD_COMMAND = 6,
+    OFPFMFC_BAD_FLAGS = 7,
+    OFPFMFC_CANT_SYNC = 8,
+    OFPFMFC_BAD_PRIORITY = 9,
+    OFPFMFC_IS_SYNC = 10,
+};
+
+/* ’flags’ bits in struct of_flow_monitor_request. */
+enum ofp_flow_monitor_flags (wire_type=uint16_t, bitmask=True){
+    OFPFMF_INITIAL = 0x1,
+    OFPFMF_ADD = 0x2,
+    OFPFMF_REMOVED = 0x4,
+    OFPFMF_MODIFY = 0x8,
+    OFPFMF_INSTRUCTIONS = 0x10,
+    OFPFMF_NO_ABBREV = 0x20,
+    OFPFMF_ONLY_OWN = 0x40,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_GROUP_MOD_FAILED. */
+enum ofp_group_mod_failed_code(wire_type=uint16_t) {
+    OFPGMFC_GROUP_EXISTS = 0,
+    OFPGMFC_INVALID_GROUP = 1,
+    OFPGMFC_WEIGHT_UNSUPPORTED = 2,
+    OFPGMFC_OUT_OF_GROUPS = 3,
+    OFPGMFC_OUT_OF_BUCKETS = 4,
+    OFPGMFC_CHAINING_UNSUPPORTED = 5,
+    OFPGMFC_WATCH_UNSUPPORTED = 6,
+    OFPGMFC_LOOP = 7,
+    OFPGMFC_UNKNOWN_GROUP = 8,
+    OFPGMFC_CHAINED_GROUP = 9,
+    OFPGMFC_BAD_TYPE = 10,
+    OFPGMFC_BAD_COMMAND = 11,
+    OFPGMFC_BAD_BUCKET = 12,
+    OFPGMFC_BAD_WATCH = 13,
+    OFPGMFC_EPERM = 14,
+    OFPGMFC_UNKNOWN_BUCKET = 15,
+    OFPGMFC_BUCKET_EXISTS = 16,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_PORT_MOD_FAILED. */
+enum ofp_port_mod_failed_code(wire_type=uint16_t) {
+    OFPPMFC_BAD_PORT = 0,
+    OFPPMFC_BAD_HW_ADDR = 1,
+    OFPPMFC_BAD_CONFIG = 2,
+    OFPPMFC_BAD_ADVERTISE = 3,
+    OFPPMFC_EPERM = 4,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_TABLE_MOD_FAILED. */
+enum ofp_table_mod_failed_code(wire_type=uint16_t) {
+    OFPTMFC_BAD_TABLE = 0,
+    OFPTMFC_BAD_CONFIG = 1,
+    OFPTMFC_EPERM = 2,
+};
+
+/* ofp_error msg ’code’ values for OFPET_QUEUE_OP_FAILED */
+enum ofp_queue_op_failed_code(wire_type=uint16_t) {
+    OFPQOFC_BAD_PORT = 0,
+    OFPQOFC_BAD_QUEUE = 1,
+    OFPQOFC_EPERM = 2,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_SWITCH_CONFIG_FAILED */
+enum ofp_switch_config_failed_code(wire_type=uint16_t) {
+    OFPSCFC_BAD_FLAGS = 0,
+    OFPSCFC_BAD_LEN = 1,
+    OFPSCFC_EPERM = 2,
+    OFPRRFC_ID_UNSUP = 3,
+    OFPRRFC_ID_IN_USE = 4,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_ROLE_REQUEST_FAILED. */
+enum ofp_role_request_failed_code(wire_type=uint16_t){
+    OFPRRFC_STALE = 0,
+    OFPRRFC_UNSUP = 1,
+    OFPRRFC_BAD_ROLE = 2,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_METER_MOD_FAILED */
+enum ofp_meter_mod_failed_code(wire_type=uint16_t) {
+    OFPMMFC_UNKNOWN = 0,
+    OFPMMFC_METER_EXISTS = 1,
+    OFPMMFC_INVALID_METER = 2,
+    OFPMMFC_UNKNOWN_METER = 3,
+    OFPMMFC_BAD_COMMAND = 4,
+    OFPMMFC_BAD_FLAGS = 5,
+    OFPMMFC_BAD_RATE = 6,
+    OFPMMFC_BAD_BURST = 7,
+    OFPMMFC_BAD_BAND = 8,
+    OFPMMFC_BAD_BAND_VALUE = 9,
+    OFPMMFC_OUT_OF_METERS = 10,
+    OFPMMFC_OUT_OF_BANDS = 11,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_TABLE_FEATURES_FAILED */
+enum ofp_table_features_failed_code(wire_type=uint16_t) {
+    OFPTFFC_BAD_TABLE = 0,
+    OFPTFFC_BAD_METADATA = 1,
+    OFPTFFC_EPERM = 5,
+    OFPTFFC_BAD_CAPA = 6,
+    OFPTFFC_BAD_MAX_ENT = 7,
+    OFPTFFC_BAD_FEATURES = 8,
+    OFPTFFC_BAD_COMMAND = 9,
+    OFPTFFC_TOO_MANY = 10,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_BAD_PROPERTY. */
+enum ofp_bad_property_code(wire_type=uint16_t) {
+    OFPBPC_BAD_TYPE = 0,
+    OFPBPC_BAD_LEN = 1,
+    OFPBPC_BAD_VALUE = 2,
+    OFPBPC_TOO_MANY = 3,
+    OFPBPC_DUP_TYPE = 4,
+    OFPBPC_BAD_EXPERIMENTER = 5,
+    OFPBPC_BAD_EXP_TYPE = 6,
+    OFPBPC_BAD_EXP_VALUE = 7,
+    OFPBPC_EPERM = 8,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_ASYNC_CONFIG_FAILED. */
+enum ofp_async_config_failed_code(wire_type=uint16_t) {
+    OFPACFC_INVALID = 0,
+    OFPACFC_UNSUPPORTED = 1,
+    OFPACFC_EPERM = 2,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_FLOW_MONITOR_FAILED. */
+enum ofp_flow_monitor_failed_code(wire_type=uint16_t) {
+    OFPMOFC_UNKNOWN = 0,
+    OFPMOFC_MONITOR_EXISTS = 1,
+    OFPMOFC_INVALID_MONITOR = 2,
+    OFPMOFC_UNKNOWN_MONITOR = 3,
+    OFPMOFC_BAD_COMMAND = 4,
+    OFPMOFC_BAD_FLAGS = 5,
+    OFPMOFC_BAD_TABLE_ID = 6,
+    OFPMOFC_BAD_OUT = 7,
+};
+
+/* ofp_error_msg ’code’ values for OFPET_BUNDLE_FAILED. */
+enum ofp_bundle_failed_code(wire_type=uint16_t) {
+    OFPBFC_UNKNOWN = 0,
+    OFPBFC_EPERM = 1,
+    OFPBFC_BAD_ID = 2,
+    OFPBFC_BUNDLE_EXIST = 3,
+    OFPBFC_BUNDLE_CLOSED = 4,
+    OFPBFC_OUT_OF_BUNDLES = 5,
+    OFPBFC_BAD_TYPE = 6,
+    OFPBFC_BAD_FLAGS = 7,
+    OFPBFC_MSG_BAD_LEN = 8,
+    OFPBFC_MSG_BAD_XID = 9,
+    OFPBFC_MSG_UNSUP = 10,
+    OFPBFC_MSG_CONFLICT = 11,
+    OFPBFC_MSG_TOO_MANY = 12,
+    OFPBFC_MSG_FAILED = 13,
+    OFPBFC_TIMEOUT = 14,
+    OFPBFC_BUNDLE_IN_PROGRESS = 15,
+    OFPBFC_SCHED_NOT_SUPPORTED = 16,
+    OFPBFC_SCHED_FUTURE = 17,
+    OFPBFC_SCHED_PAST = 18,
+};
+
+enum ofp_bundle_feature_flags(wire_type=uint32_t, bitmask=True) {
+    OFPBF_TIMESTAMP = 0x1,
+    OFPBF_TIME_SET_SCHED = 0x2,
+};
+
+/* Configure/Modify behavior of a flow table */
+struct of_table_mod : of_header {
+    uint8_t version;
+    uint8_t type == 17;
+    uint16_t length;
+    uint32_t xid;
+    uint8_t table_id;
+    pad(3);
+    uint32_t config;
+    list(of_table_mod_prop_t) properties;
+};
+
+/* Common header for all Table Mod Properties */
+struct of_table_mod_prop {
+    uint16_t type == ?;
+    uint16_t length;
+};
+
+/* Eviction table mod Property. Mostly used in OFPMP_TABLE_DESC replies. */
+struct of_table_mod_prop_eviction : of_table_mod_prop {
+    uint16_t type == 2;
+    uint16_t length;
+    enum ofp_table_mod_prop_eviction_flag flags;
+};
+
+/* Vacancy table mod property */
+struct of_table_mod_prop_vacancy : of_table_mod_prop {
+    uint16_t type == 3;
+    uint16_t length;
+    uint8_t vacancy_down;
+    uint8_t vacancy_up;
+    uint8_t vacancy;
+    pad(1);
+};
+
+/* Experimenter table mod property */
+struct of_table_mod_prop_experimenter : of_table_mod_prop {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    uint32_t experimenter == ?;
+    uint32_t exp_type;
+};
+
+/* Flow setup and teardown (controller -> datapath). */
+struct of_flow_mod : of_header {
+    uint8_t version;
+    uint8_t type == 14;
+    uint16_t length;
+    uint32_t xid;
+    uint64_t cookie;
+    uint64_t cookie_mask;
+    uint8_t table_id;
+    of_fm_cmd_t _command == ?;
+    uint16_t idle_timeout;
+    uint16_t hard_timeout;
+    uint16_t priority;
+    uint32_t buffer_id;
+    of_port_no_t out_port;
+    uint32_t out_group;
+    enum ofp_flow_mod_flags flags;
+    uint16_t importance;
+    of_match_t match;
+    list(of_instruction_t) instructions;
+};
+
+/* Group setup and teardown (controller -> datapath). */
+struct of_group_mod : of_header {
+    uint8_t version;
+    uint8_t type == 15;
+    uint16_t length;
+    uint32_t xid;
+    enum ofp_group_mod_command command == ?;
+    enum ofp_group_type group_type;
+    pad(1);
+    uint32_t group_id;
+    uint16_t bucket_array_len == length(buckets);
+    pad(2);
+    enum ofp_group_bucket command_bucket_id;
+    list(of_bucket_t) buckets;
+    list(of_group_prop_t) properties;
+};
+
+/* Bucket for use in groups. */
+struct of_bucket {
+    uint16_t len;
+    uint16_t action_array_len == length(actions);
+    enum ofp_group_bucket bucket_id;
+    list(of_action_t) actions;
+    list(of_group_bucket_prop_t) properties;
+};
+
+/* Common header for all group bucket properties. */
+struct of_group_bucket_prop {
+    uint16_t type == ?;
+    uint16_t length;
+};
+
+/* Group bucket weight property, for select groups only. */
+struct of_group_bucket_prop_weight : of_group_bucket_prop {
+    uint16_t type == 0;
+    uint16_t length;
+    uint16_t weight;
+    pad(2);
+};
+
+/* Group bucket watch port */
+struct of_group_bucket_prop_watch_port : of_group_bucket_prop {
+    uint16_t type == 1;
+    uint16_t length;
+    uint32_t watch;
+};
+
+/* Group bucket watch group */
+struct of_group_bucket_prop_watch_group : of_group_bucket_prop{
+    uint16_t type == 2;
+    uint16_t length;
+    uint32_t watch;
+};
+
+/* Experimenter group bucket property */
+struct of_group_bucket_prop_experimenter : of_group_bucket_prop {
+    uint16_t type == 3;
+    uint16_t length;
+    uint32_t experimenter == ?;
+    uint32_t exp_type;
+};
+
+/* Common header for all group properties. */
+struct of_group_prop {
+    uint16_t type == ?;
+    uint16_t length;
+};
+
+/* Experimenter group property */
+struct of_group_prop_experimenter {
+    uint16_t type == 65535;
+    uint16_t length;
+    uint32_t experimenter == ?;
+    uint32_t exp_type;
+};
+
+/* Modify behavior of the physical port */
+struct of_port_mod : of_header {
+    uint8_t version;
+    uint8_t type == 16;
+    uint16_t length;
+    uint32_t xid;
+    of_port_no_t port_no;
+    pad(4);
+    of_mac_addr_t hw_addr;
+    pad(2);
+    enum ofp_port_config config;
+    enum ofp_port_config mask;
+    list(of_port_mod_prop_t) properties;
+};
+
+/* Common header for all port mod properties. */
+struct of_port_mod_prop {
+    uint16_t type == ?;
+    uint16_t length;
+};
+
+/* Ethernet port mod property. */
+struct of_port_mod_prop_ethernet : of_port_mod_prop {
+    uint16_t type == 0;
+    uint16_t length;
+    enum ofp_port_features advertise;
+};
+
+/* Optical port mod property */
+struct of_port_mod_prop_optical : of_port_mod_prop {
+    uint16_t type == 1;
+    uint16_t length;
+    uint32_t configure;
+    uint32_t freq_ldma;
+    uint32_t fl_offset; /* TODO signed */
+    uint32_t grid_span;
+    uint32_t tx_pwr;
+};
+
+/* Experimenter port mod property. */
+struct of_port_mod_prop_experimenter : of_port_mod_prop {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    uint32_t experimenter == ?;
+    uint32_t exp_type;
+};
+
+/* Meter configuration. OFPT_METER_MOD. */
+struct of_meter_mod : of_header {
+    uint8_t version;
+    uint8_t type == 29;
+    uint16_t length;
+    uint32_t xid;
+    enum ofp_meter_mod_command command;
+    enum ofp_meter_flags flags;
+    uint32_t meter_id;
+    list(of_meter_band_t) bands;
+};
+
+/* Common header for all meter bands */
+struct of_meter_band {
+    uint16_t type == ?;
+    uint16_t len;
+//  uint32_t rate;  // These are excluded b/c this is the header
+//  uint32_t burst_size;  // These are excluded b/c this is the header
+};
+
+/* OFPMBT_DROP band - drop packets */
+struct of_meter_band_drop : of_meter_band {
+    uint16_t type == 1;
+    uint16_t len;
+    uint32_t rate;
+    uint32_t burst_size;
+    pad(4);
+};
+
+/* OFPMBT_DSCP_REMARK band - Remark DSCP in the IP header */
+struct of_meter_band_dscp_remark : of_meter_band {
+    uint16_t type == 2;
+    uint16_t len;
+    uint32_t rate;
+    uint32_t burst_size;
+    uint8_t prec_level;
+    pad(3);
+};
+
+/* OFPMBT_EXPERIMENTER band - Experimenter type.
+* The rest of the band is experimenter-defined. */
+struct of_meter_band_experimenter : of_meter_band {
+    uint16_t type == 65535;
+    uint16_t len;
+    uint32_t rate;
+    uint32_t burst_size;
+    uint32_t experimenter;
+};
+
+/* Multipart Request */
+struct of_stats_request : of_header {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == ?;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+};
+
+/* Multipart Reply */
+struct of_stats_reply : of_header {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == ?;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+};
+
+/* Body for ofp_multipart_request of type OFPST_FLOW(_DESC) */
+struct of_flow_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 1;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    uint8_t table_id;
+    pad(3);
+    of_port_no_t out_port;
+    uint32_t out_group;
+    pad(4);
+    uint64_t cookie;
+    uint64_t cookie_mask;
+    of_match_t match;
+};
+
+/* Body for ofp_multipart_reply of type OFPST_FLOW(_DESC) */
+struct of_flow_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 1;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_flow_stats_entry_t) entries;
+};
+
+/* Body for ofp_multipart_request of type OFPMP_FLOW_(STATS)LIGHTWEIGHT */
+struct of_flow_lightweight_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 17;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    uint8_t table_id;
+    pad(3);
+    of_port_no_t out_port;
+    uint32_t out_group;
+    pad(4);
+    uint64_t cookie;
+    uint64_t cookie_mask;
+    of_match_t match;
+};
+
+/* Entry for OFPST_FLOW */
+struct of_flow_stats_entry {
+    uint16_t length;
+    pad(2);
+    uint8_t table_id;
+    pad(1);
+    uint16_t priority;
+    uint16_t idle_timeout;
+    uint16_t hard_timeout;
+    enum ofp_flow_mod_flags flags;
+    uint16_t importance;
+    uint64_t cookie;
+    of_match_t match;
+    of_stat_t stats;
+    list(of_instruction_t) instructions;
+};
+
+/* Entry for OFPMP_FLOW_(STATS)LIGHTWEIGHT */
+struct of_flow_lightweight_stats_entry {
+    uint16_t length;
+    pad(2);
+    uint8_t table_id;
+    enum ofp_flow_stats_reason reason;
+    uint16_t priority;
+    of_match_t match;
+    of_stat_t stats;
+};
+
+/* Body of reply to OFPST_FLOW_(STATS)LIGHTWEIGHT request */
+struct of_flow_lightweight_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 17;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_flow_lightweight_stats_entry_t) entries;
+};
+
+/* Body for ofp_multipart_request of type OFPMP_AGGREGATE_STATS. */
+struct of_aggregate_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 2;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    uint8_t table_id;
+    pad(3);
+    of_port_no_t out_port;
+    uint32_t out_group;
+    pad(4);
+    uint64_t cookie;
+    uint64_t cookie_mask;
+    of_match_t match;
+};
+
+/* Body of reply to OFPMP_AGGREGATE_STATS request. */
+struct of_aggregate_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 2;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    of_stat_t stats;
+};
+
+
+/* Body for ofp_multipart_request of types OFPMP_PORT_STATS */
+struct of_port_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 4;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    of_port_no_t port_no;
+    pad(4);
+};
+
+struct of_port_stats_entry {
+    uint16_t length;
+    pad(2);
+    of_port_no_t port_no;
+    uint32_t duration_sec;
+    uint32_t duration_nsec;
+    uint64_t rx_packets;
+    uint64_t tx_packets;
+    uint64_t rx_bytes;
+    uint64_t tx_bytes;
+    uint64_t rx_dropped;
+    uint64_t tx_dropped;
+    uint64_t rx_errors;
+    uint64_t tx_errors;
+    list(of_port_stats_prop_t) properties;
+};
+
+/* Body of reply to OFPMP_PORT_STATS request. */
+struct of_port_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 4;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_port_stats_entry_t) entries;
+};
+
+/* Common header for all port stats properties. */
+struct of_port_stats_prop {
+    uint16_t type == ?;
+    uint16_t length;
+};
+
+/* Ethernet port stats property. */
+struct of_port_stats_prop_ethernet : of_port_stats_prop {
+    uint16_t type == 0;
+    uint16_t length;
+    pad(4);
+    uint64_t rx_frame_err;
+    uint64_t rx_over_err;
+    uint64_t rx_crc_err;
+    uint64_t collisions;
+};
+
+/* Optical port stats property. */
+struct of_port_stats_prop_optical : of_port_stats_prop {
+    uint16_t type == 1;
+    uint16_t length;
+    pad(4);
+    uint32_t flags;
+    uint32_t tx_freq_lmda;
+    uint32_t tx_offset;
+    uint32_t tx_grid_span;
+    uint32_t rx_freq_lmda;
+    uint32_t rx_offset;
+    uint32_t rx_grid_span;
+    uint16_t tx_pwr;
+    uint16_t rx_pwr;
+    uint16_t bias_current;
+    uint16_t temperature;
+};
+
+/* Experimenter port stats property. */
+struct of_port_stats_prop_experimenter : of_port_stats_prop {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    uint32_t experimenter == ?;
+    uint32_t exp_type;
+};
+
+/* Body for ofp_multipart_request of OFPMP_PORT_DESC. */
+struct of_port_desc_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 13;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    of_port_no_t port_no;
+    pad(4);
+};
+
+/* Body for ofp_multipart_reply of OFPMP_PORT_DESC. */
+struct of_port_desc_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 13;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_port_desc_t) entries;
+};
+
+/* Body for ofp_multipart_request of OFPMP_QUEUE_STATS. */
+struct of_queue_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 5;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    of_port_no_t port_no;
+    uint32_t queue_id;
+};
+
+struct of_queue_stats_entry {
+    uint16_t length;
+    pad(6);
+    of_port_no_t port_no;
+    uint32_t queue_id;
+    uint64_t tx_bytes;
+    uint64_t tx_packets;
+    uint64_t tx_errors;
+    uint32_t duration_sec;
+    uint32_t duration_nsec;
+    list(of_queue_stats_prop_t) properties;
+};
+
+struct of_queue_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 5;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_queue_stats_entry_t) entries;
+};
+
+/* Common header for all queue properties */
+struct of_queue_stats_prop {
+    uint16_t type == ?;
+    uint16_t length;
+};
+
+/* Experimenter queue property description. */
+struct of_queue_stats_prop_experimenter : of_queue_stats_prop {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    uint32_t experimenter == ?;
+    uint32_t exp_type;
+};
+
+/* Body for ofp_multipart_request of OFPMP_QUEUE_DESC */
+struct of_queue_desc_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 15;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    of_port_no_t port_no;
+    uint32_t queue_id;
+};
+
+struct of_queue_desc {
+    uint32_t port_no;
+    uint32_t queue_id;
+    uint16_t length;
+    pad(6);
+    list(of_queue_desc_prop_t) properties;
+};
+
+/* Body of reply to OFPMP_QUEUE_DESC request. */
+struct of_queue_desc_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 15;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_queue_desc_t) entries;
+};
+
+/* Common header for all queue properties */
+struct of_queue_desc_prop {
+    uint16_t type == ?;
+    uint16_t length;
+};
+
+/* Min-Rate queue property description. */
+struct of_queue_desc_prop_min_rate : of_queue_desc_prop {
+    uint16_t type == 1;
+    uint16_t length;
+    uint16_t rate;
+    pad(2);
+};
+
+/* Max-Rate queue property description. */
+struct of_queue_desc_prop_max_rate : of_queue_desc_prop {
+    uint16_t type == 2;
+    uint16_t length;
+    uint16_t rate;
+    pad(2);
+};
+
+/* Experimenter queue property description. */
+struct of_queue_desc_prop_experimenter : of_queue_desc_prop {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    uint32_t experimenter == ?;
+    uint32_t exp_type;
+};
+
+/* Body of OFPMP_GROUP_STATS */
+struct of_group_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 6;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    uint32_t group_id;
+    pad(4);
+};
+
+struct of_group_stats_entry {
+    uint16_t length;
+    pad(2);
+    uint32_t group_id;
+    uint32_t ref_count;
+    pad(4);
+    uint64_t packet_count;
+    uint64_t byte_count;
+    uint32_t duration_sec;
+    uint32_t duration_nsec;
+    list(of_bucket_counter_t) bucket_stats;
+};
+
+/* Body of reply to OFPMP_GROUP_STATS request. */
+struct of_group_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 6;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_group_stats_entry_t) entries;
+};
+
+/* Used in group stats replies. */
+struct of_bucket_counter {
+    uint64_t packet_count;
+    uint64_t byte_count;
+};
+
+/* Body of OFPMP_GROUP_DESC requests. */
+struct of_group_desc_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 7;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    uint32_t group_id;
+    pad(4);
+};
+
+struct of_group_desc_stats_entry {
+    uint16_t length;
+    enum ofp_group_type group_type;
+    pad(1);
+    uint32_t group_id;
+    uint16_t bucket_array_len == length(buckets);
+    pad(6);
+    list(of_bucket_t) buckets;
+    list(of_group_prop_t) properties;
+};
+
+/* Body of reply to OFPMP_GROUP_DESC request. */
+struct of_group_desc_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 7;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_group_desc_stats_entry_t) entries;
+};
+
+/* Body of OFPMP_GROUP_FEATURES request. Group features. */
+struct of_group_features_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 8;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+};
+
+/* Body of reply to OFPMP_GROUP_FEATURES request. Group features. */
+struct of_group_features_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 8;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    uint32_t types;
+    enum ofp_group_capabilities capabilities;
+    uint32_t max_groups_all;
+    uint32_t max_groups_select;
+    uint32_t max_groups_indirect;
+    uint32_t max_groups_ff;
+    uint32_t actions_all;
+    uint32_t actions_select;
+    uint32_t actions_indirect;
+    uint32_t actions_ff;
+};
+
+/* Body of OFPMP_METER_STATS request */
+struct of_meter_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 9;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    uint32_t meter_id;
+    pad(4);
+};
+
+struct of_meter_stats {
+    uint32_t meter_id;
+    uint16_t len;
+    pad(6);
+    uint32_t ref_count;
+    uint64_t packet_in_count;
+    uint64_t byte_in_count;
+    uint32_t duration_sec;
+    uint32_t duration_nsec;
+    list(of_meter_band_stats_t) band_stats;
+};
+
+/* Body of reply to OFPMP_METER_STATS request */
+struct of_meter_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 9;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_meter_stats_t) entries;
+};
+
+/* Statistics for each meter band */
+struct of_meter_band_stats {
+    uint64_t packet_band_count;
+    uint64_t byte_band_count;
+};
+
+/* Body of OFPMP_METER_DESC request */
+struct of_meter_config_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 10;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    uint32_t meter_id;
+    pad(4);
+};
+
+struct of_meter_config {
+    uint16_t length;
+    enum ofp_meter_flags flags;
+    uint32_t meter_id;
+    list(of_meter_band_t) entries;
+};
+
+/* Body of reply to OFPMP_METER_DESC request */
+struct of_meter_config_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 10;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_meter_config_t) entries;
+};
+
+
+/* Body of OFPMP_METER_FEATURES request. */
+struct of_meter_features_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 11;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+};
+
+struct of_meter_features {
+    uint32_t    max_meter;
+    uint32_t    band_types;
+    uint32_t    capabilities;
+    uint8_t     max_bands;
+    uint8_t     max_color;
+    pad(2);
+    uint32_t features;
+    pad(4);
+};
+
+/* Body of reply to OFPMP_METER_FEATURES request. Meter features. */
+struct of_meter_features_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 11;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    of_meter_features_t features;
+
+};
+
+/* Body of OFPMP_TABLE_STATS request. */
+struct of_table_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 3;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+};
+
+struct of_table_stats_entry {
+    uint8_t table_id;
+    pad(3);
+    uint32_t active_count;
+    uint64_t lookup_count;
+    uint64_t matched_count;
+};
+
+/* Body of reply to OFPMP_TABLE_STATS request. */
+struct of_table_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 3;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_table_stats_entry_t) entries;
+};
+
+/* Flow monitor commands */
+enum ofp_flow_monitor_command(wire_type=uint8_t) {
+    OFPFMC_ADD = 0,
+    OFPFMC_MODIFY = 1,
+    OFPFMC_DELETE = 2,
+};
+
+struct of_flow_monitor_entry {
+    uint32_t monitor_id;
+    uint32_t out_port;
+    uint32_t out_group;
+    enum ofp_flow_monitor_flags flags;
+    uint8_t table_id;
+    enum ofp_flow_monitor_command command;
+    of_match_t match;
+};
+
+/* Body of OFPMP_FLOW_MONITOR request */
+struct of_flow_monitor_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 16;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    list(of_flow_monitor_entry_t) entries;
+};
+
+enum ofp_flow_update_event(wire_type=uint16_t) {
+    OFPFME_INITIAL = 0,
+    OFPFME_ADDED = 1,
+    OFPFME_REMOVED = 2,
+    OFPFME_MODIFIED = 3,
+    OFPFME_ABBREV = 4,
+    OFPFME_PAUSED = 5,
+    OFPFME_RESUMED = 6,
+};
+
+struct of_flow_monitor_reply_entry {
+    uint16_t length;
+    enum ofp_flow_update_event event;
+};
+
+/* Body of OFPMP_FLOW_MONITOR reply */
+struct of_flow_monitor_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 16;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_flow_monitor_reply_entry_t) entries;
+};
+
+/* Body of OFPMP_TABLE_DESC request. */
+struct of_table_desc_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 14;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+};
+
+/* Body of reply to OFPMP_TABLE_DESC request. */
+struct of_table_desc_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 14;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_table_desc_t) entries;
+};
+
+
+/* Body of OFPMP_TABLE_FEATURES request. */
+struct of_table_features_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 12;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    list(of_table_features_t) entries;
+};
+
+struct of_table_features {
+    uint16_t length;
+    uint8_t table_id;
+    enum ofp_table_features_command command;
+    enum ofp_table_feature_flag features;
+    of_table_name_t name;
+    uint64_t metadata_match;
+    uint64_t metadata_write;
+    enum ofp_table_config capabilities;
+    uint32_t max_entries;
+    list(of_table_feature_prop_t) properties;
+};
+
+/* Body of reply to OFPMP_TABLE_FEATURES request. */
+struct of_table_features_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 12;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_table_features_t) entries;
+};
+
+/* Common header for all Table Feature Properties */
+struct of_table_feature_prop {
+    uint16_t         type == ?;
+    uint16_t         length;
+};
+
+/* Instructions property */
+struct of_table_feature_prop_instructions : of_table_feature_prop {
+    uint16_t         type == 0;
+    uint16_t         length;
+    // FIXME Check if instruction_t is right for ids here
+    list(of_instruction_id_t)   instruction_ids;
+};
+
+/* Instruction Miss property */
+struct of_table_feature_prop_instructions_miss : of_table_feature_prop {
+    uint16_t         type == 1;
+    uint16_t         length;
+    list(of_instruction_id_t)   instruction_ids;
+};
+
+/* Instruction ID */
+struct of_instruction_id {
+    uint16_t type;
+    uint16_t len;
+    of_octets_t exp_data;
+};
+
+/* OFPTFPT_TABLE_SYNC_FROM property */
+struct of_table_feature_prop_table_sync_from : of_table_feature_prop {
+    uint16_t         type == 16;
+    uint16_t         length;
+    list(of_uint8_t) table_ids;
+};
+
+/* OFPTFPT_NEXT_TABLES property */
+struct of_table_feature_prop_next_tables : of_table_feature_prop {
+    uint16_t         type == 2;
+    uint16_t         length;
+    list(of_uint8_t) next_table_ids;
+};
+
+/* NEXT_TABLES_MISS property */
+struct of_table_feature_prop_next_tables_miss : of_table_feature_prop {
+    uint16_t         type == 3;
+    uint16_t         length;
+    list(of_uint8_t) next_table_ids;
+};
+
+/* OFPTFPT_WRITE_ACTIONS property */
+struct of_table_feature_prop_write_actions : of_table_feature_prop {
+    uint16_t         type == 4;
+    uint16_t         length;
+    list(of_action_id_t) action_ids;
+};
+
+/* FPTFPT_WRITE_ACTIONS_MISS property */
+struct of_table_feature_prop_write_actions_miss : of_table_feature_prop {
+    uint16_t         type == 5;
+    uint16_t         length;
+    list(of_action_id_t) action_ids;
+};
+
+/* OFPTFPT_APPLY_ACTIONS property */
+struct of_table_feature_prop_apply_actions : of_table_feature_prop {
+    uint16_t         type == 6;
+    uint16_t         length;
+    list(of_action_id_t) action_ids;
+};
+
+/* OFPTFPT_APPLY_ACTIONS_MISS property */
+struct of_table_feature_prop_apply_actions_miss : of_table_feature_prop {
+    uint16_t         type == 7;
+    uint16_t         length;
+    list(of_action_id_t) action_ids;
+};
+
+/* Action ID */
+struct of_action_id {
+    uint16_t type;
+    uint16_t len;
+    of_octets_t exp_data;
+};
+
+/* OFPTFPT_MATCH property */
+struct of_table_feature_prop_match : of_table_feature_prop {
+    uint16_t         type == 8;
+    uint16_t         length;
+    list(of_uint32_t) oxm_ids;
+};
+
+/* OFPTFPT_WILDCARDS property */
+struct of_table_feature_prop_wildcards : of_table_feature_prop {
+    uint16_t         type == 10;
+    uint16_t         length;
+    list(of_uint32_t) oxm_ids;
+};
+
+/* OFPTFPT_WRITE_SETFIELD property */
+struct of_table_feature_prop_write_setfield : of_table_feature_prop {
+    uint16_t         type == 12;
+    uint16_t         length;
+    list(of_uint32_t) oxm_ids;
+};
+
+/* OFPTFPT_WRITE_SETFIELD_MISS property */
+struct of_table_feature_prop_write_setfield_miss : of_table_feature_prop {
+    uint16_t         type == 13;
+    uint16_t         length;
+    list(of_uint32_t) oxm_ids;
+};
+
+/* OFPTFPT_APPLY_SETFIELD property */
+struct of_table_feature_prop_apply_setfield : of_table_feature_prop {
+    uint16_t         type == 14;
+    uint16_t         length;
+    list(of_uint32_t) oxm_ids;
+};
+
+/* OFPTFPT_APPLY_SETFIELD_MISS property */
+struct of_table_feature_prop_apply_setfield_miss : of_table_feature_prop {
+    uint16_t         type == 15;
+    uint16_t         length;
+    list(of_uint32_t) oxm_ids;
+};
+
+/* OFPTFPT_WRITE_COPYFIELD property */
+struct of_table_feature_prop_write_copyfield : of_table_feature_prop {
+    uint16_t         type == 18;
+    uint16_t         length;
+    list(of_uint32_t) oxm_ids;
+};
+
+/* OFPTFPT_WRITE_COPYFIELD_MISS property */
+struct of_table_feature_prop_write_copyfield_miss : of_table_feature_prop {
+    uint16_t         type == 19;
+    uint16_t         length;
+    list(of_uint32_t) oxm_ids;
+};
+
+/* OFPTFPT_APPLY_COPYFIELD property */
+struct of_table_feature_prop_apply_copyfield : of_table_feature_prop {
+    uint16_t         type == 20;
+    uint16_t         length;
+    list(of_uint32_t) oxm_ids;
+};
+
+/* OFPTFPT_APPLY_COPYFIELD_MISS property */
+struct of_table_feature_prop_apply_copyfield_miss : of_table_feature_prop {
+    uint16_t         type == 21;
+    uint16_t         length;
+    list(of_uint32_t) oxm_ids;
+};
+
+/* OFPTFPT_PACKET_TYPES property */
+struct of_table_feature_prop_oxm_values {
+    uint16_t type == 22;
+    uint16_t length;
+    of_octets_t oxm_values;
+};
+
+/* OFPTFPT_EXPERIMENTER property */
+struct of_table_feature_prop_experimenter : of_table_feature_prop {
+    uint16_t         type == 65534;
+    uint16_t         length;
+    uint32_t         experimenter == ?;
+    uint32_t         subtype;
+};
+
+/* OFPTFPT_EXPERIMENTER_MISS property */
+struct of_table_feature_prop_experimenter_miss : of_table_feature_prop {
+    uint16_t         type == 65535;
+    uint16_t         length;
+    uint32_t         experimenter == ?;
+    uint32_t         subtype;
+};
+
+/*
+ * Not supporting the flow monitor multipart messages. This message is
+ * poorly designed because it includes a variable length match inside a
+ * struct (ofp_flow_monitor_request) with no explicit length member.
+ * I'm not writing the special case code to figure out the total length.
+ */
+
+
+ /* Send packet (controller -> datapath). */
+ struct of_packet_out : of_header {
+    uint8_t version;
+    uint8_t type == 13;
+    uint16_t length;
+    uint32_t xid;
+    uint32_t buffer_id;
+    uint16_t actions_len == length(actions);
+    pad(2);
+    of_match_t match;
+    list(of_action_t) actions;
+    of_octets_t data;
+};
+
+/* Barrier message request */
+struct of_barrier_request : of_header {
+    uint8_t version;
+    uint8_t type == 20;
+    uint16_t length;
+    uint32_t xid;
+};
+
+/* Barrier message request */
+struct of_barrier_reply : of_header {
+    uint8_t version;
+    uint8_t type == 21;
+    uint16_t length;
+    uint32_t xid;
+};
+
+/* Role request */
+struct of_role_request : of_header {
+    uint8_t version;
+    uint8_t type == 24;
+    uint16_t length;
+    uint32_t xid;
+    enum ofp_controller_role role;
+    uint16_t short_id;
+    pad(2);
+    uint64_t generation_id;
+};
+
+/* Role reply */
+struct of_role_reply : of_header {
+    uint8_t version;
+    uint8_t type == 25;
+    uint16_t length;
+    uint32_t xid;
+    enum ofp_controller_role role;
+    uint16_t short_id;
+    pad(2);
+    uint64_t generation_id;
+};
+
+/* Bundle control message */
+struct of_bundle_ctrl_msg : of_header {
+    uint8_t version;
+    uint8_t type == 33;
+    uint16_t length;
+    uint32_t xid;
+    uint32_t bundle_id;
+    enum ofp_bundle_ctrl_type bundle_ctrl_type;
+    enum ofp_bundle_flags flags;
+    list(of_bundle_prop_t) properties;
+};
+
+/* Bundle add message */
+struct of_bundle_add_msg : of_header {
+    uint8_t version;
+    uint8_t type == 34;
+    uint16_t length;
+    uint32_t xid;
+    uint32_t bundle_id;
+    pad(1);
+    enum ofp_bundle_flags flags;
+    of_header_t message;
+    list(of_bundle_prop_t) properties;
+};
+
+/* Bundle property types. */
+struct of_bundle_prop {
+    uint16_t type == ?;
+    uint16_t length;
+};
+
+/* Bundle time property. */
+struct of_bundle_prop_time : of_bundle_prop {
+    uint16_t type == 1;
+    uint16_t length;
+    pad(4);
+    list(of_time_t) scheduled_time;
+};
+
+/* Experimenter bundle property */
+struct of_bundle_prop_experimenter : of_bundle_prop {
+    uint16_t type == 65535;
+    uint16_t length;
+    uint32_t experimenter == ?;
+    uint32_t exp_type;
+};
+
+/* Time Format. */
+struct of_time {
+    uint64_t seconds;
+    uint32_t nanoseconds;
+    pad(4);
+};
+
+/* Common header for all async config Properties */
+struct of_async_config_prop {
+    uint16_t type == ?;
+    uint16_t length;
+};
+
+/* OFPACPT_PACKET_IN_SLAVE property */
+struct of_async_config_prop_packet_in_slave : of_async_config_prop {
+    uint16_t type == 0;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_PACKET_IN_MASTER property */
+struct of_async_config_prop_packet_in_master : of_async_config_prop {
+    uint16_t type == 1;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_PORT_STATUS_SLAVE property */
+struct of_async_config_prop_port_status_slave : of_async_config_prop {
+    uint16_t type == 2;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_PORT_STATUS_MASTER property */
+struct of_async_config_prop_port_status_master : of_async_config_prop {
+    uint16_t type == 3;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_FLOW_REMOVED_SLAVE property */
+struct of_async_config_prop_flow_removed_slave : of_async_config_prop {
+    uint16_t type == 4;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_FLOW_REMOVED_MASTER property */
+struct of_async_config_prop_flow_removed_master : of_async_config_prop {
+    uint16_t type == 5;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_ROLE_STATUS_SLAVE property */
+struct of_async_config_prop_role_status_slave : of_async_config_prop {
+    uint16_t type == 6;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_ROLE_STATUS_MASTER property */
+struct of_async_config_prop_role_status_master : of_async_config_prop {
+    uint16_t type == 7;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_TABLE_STATUS_SLAVE property */
+struct of_async_config_prop_table_status_slave : of_async_config_prop {
+    uint16_t type == 8;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_TABLE_STATUS_MASTER property */
+struct of_async_config_prop_table_status_master : of_async_config_prop {
+    uint16_t type == 9;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_REQUESTFORWARD_SLAVE property */
+struct of_async_config_prop_requestforward_slave : of_async_config_prop {
+    uint16_t type == 10;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_REQUESTFORWARD_MASTER property */
+struct of_async_config_prop_requestforward_master : of_async_config_prop {
+    uint16_t type == 11;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_FLOW_STATS_SLAVE property */
+struct of_async_config_prop_flow_stats_slave : of_async_config_prop {
+    uint16_t type == 12;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_FLOW_STATS_MASTER property */
+struct of_async_config_prop_flow_stats_master : of_async_config_prop {
+    uint16_t type == 13;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_CONT_STATUS_SLAVE property */
+struct of_async_config_prop_cont_status_slave : of_async_config_prop {
+    uint16_t type == 14;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPACPT_CONT_STATUS_MASTER property */
+struct of_async_config_prop_cont_status_master : of_async_config_prop {
+    uint16_t type == 15;
+    uint16_t length;
+    uint32_t mask;
+};
+
+/* OFPTFPT_EXPERIMENTER_SLAVE property */
+struct of_async_config_prop_experimenter_slave : of_async_config_prop {
+    uint16_t type == 0xfffe;
+    uint16_t length;
+    //uint32_t experimenter == ?;
+    //uint32_t exp_type;
+};
+
+/* OFPTFPT_EXPERIMENTER_MASTER property */
+struct of_async_config_prop_experimenter_master : of_async_config_prop {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    //uint32_t experimenter == ?;
+    //uint32_t exp_type;
+};
+
+/* Packet received on port (datapath -> controller). */
+struct of_packet_in : of_header {
+    uint8_t version;
+    uint8_t type == 10;
+    uint16_t length;
+    uint32_t xid;
+    uint32_t buffer_id;
+    uint16_t total_len;
+    uint8_t reason;
+    uint8_t table_id;
+    uint64_t cookie;
+    of_match_t match;
+    pad(2);
+    of_octets_t data;
+};
+
+/* Flow removed (datapath -> controller). */
+struct of_flow_removed : of_header {
+    uint8_t version;
+    uint8_t type == 11;
+    uint16_t length;
+    uint32_t xid;
+    uint8_t table_id;
+    enum ofp_flow_removed_reason reason;
+    uint16_t priority;
+    uint16_t idle_timeout;
+    uint16_t hard_timeout;
+    uint64_t cookie;
+    of_match_t match;
+    of_stat_t stats;
+};
+
+/* A physical port has changed in the datapath */
+struct of_port_status : of_header {
+    uint8_t version;
+    uint8_t type == 12;
+    uint16_t length;
+    uint32_t xid;
+    enum ofp_port_reason reason;
+    pad(7);
+    of_port_desc_t desc;
+};
+
+/* Role status event message. */
+struct of_role_status : of_header {
+    uint8_t version;
+    uint8_t type == 30;
+    uint16_t length;
+    uint32_t xid;
+    enum ofp_controller_role role;
+    enum ofp_controller_role_reason reason;
+    pad(3);
+    uint64_t generation_id;
+    list(of_role_prop_t) properties;
+};
+
+/* Common header for all Role Properties */
+struct of_role_prop {
+    uint16_t type == ?;
+    uint16_t length;
+};
+
+/* Experimenter role property */
+struct of_role_prop_experimenter : of_role_prop {
+    uint16_t type == 0xffff;
+    uint16_t length;
+    uint32_t experimenter == ?;
+    uint32_t exp_type;
+};
+
+/* Table descriotion */
+struct of_table_desc {
+    uint16_t length;
+    uint8_t table_id;
+    pad(1);
+    enum ofp_table_config config;
+    list(of_table_mod_prop_t) properties;
+};
+
+
+/* A table config has changed in the datapath */
+struct of_table_status : of_header {
+    uint8_t version;
+    uint8_t type == 31;
+    uint16_t length;
+    uint32_t xid;
+    enum ofp_table_reason reason;
+    pad(7);
+    of_table_desc_t table;
+};
+
+/* Group/Meter request forwarding. */
+struct of_requestforward : of_header {
+    uint8_t version;
+    uint8_t type == 32;
+    uint16_t length;
+    uint32_t xid;
+    of_header_t request;
+};
+
+/* OFPT_HELLO. This message includes zero or more hello elements having
+* variable size. Unknown elements types must be ignored/skipped, to allow
+* for future extensions. */
+struct of_hello : of_header {
+    uint8_t version;
+    uint8_t type == 0;
+    uint16_t length;
+    uint32_t xid;
+    list(of_hello_elem_t) elements;
+};
+
+/* Common header for all Hello Elements */
+struct of_hello_elem {
+    uint16_t type == ?;
+    uint16_t length;
+};
+
+/* Version bitmap Hello Element */
+struct of_hello_elem_versionbitmap : of_hello_elem {
+    uint16_t type == 1;
+    uint16_t length;
+    list(of_uint32_t) bitmaps;
+};
+
+/* ECHO REQUEST */
+struct of_echo_request : of_header {
+    uint8_t version;
+    uint8_t type == 2;
+    uint16_t length;
+    uint32_t xid;
+    of_octets_t data;
+};
+
+/* ECHO REPLY */
+struct of_echo_reply : of_header {
+    uint8_t version;
+    uint8_t type == 3;
+    uint16_t length;
+    uint32_t xid;
+    of_octets_t data;
+};
+
+/* OFPT_ERROR: Error message. */
+struct of_error_msg : of_header {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == ?;
+};
+
+/* Experimenter extension message. */
+struct of_experimenter : of_header {
+    uint8_t version;
+    uint8_t type == 4;
+    uint16_t length;
+    uint32_t xid;
+    uint32_t experimenter == ?;
+    uint32_t subtype;
+    of_octets_t data;
+};
+
+/* Features Request */
+struct of_features_request : of_header {
+    uint8_t version;
+    uint8_t type == 5;
+    uint16_t length;
+    uint32_t xid;
+};
+
+/* Features Reply  (ofp_switch_features) */
+struct of_features_reply : of_header {
+    uint8_t version;
+    uint8_t type == 6;
+    uint16_t length;
+    uint32_t xid;
+    uint64_t datapath_id;
+    uint32_t n_buffers;
+    uint8_t n_tables;
+    uint8_t auxiliary_id;
+    pad(2);
+    enum ofp_capabilities capabilities;
+    uint32_t reserved;
+};
+
+/* Get Configuration Message */
+struct of_get_config_request : of_header {
+    uint8_t version;
+    uint8_t type == 7;
+    uint16_t length;
+    uint32_t xid;
+};
+
+/* Get Configuration Reply (ofp_switch_config) */
+struct of_get_config_reply : of_header {
+    uint8_t version;
+    uint8_t type == 8;
+    uint16_t length;
+    uint32_t xid;
+    enum ofp_config_flags flags;
+    uint16_t miss_send_len;
+};
+
+/* Set Configuration Message */
+struct of_set_config : of_header {
+    uint8_t version;
+    uint8_t type == 9;
+    uint16_t length;
+    uint32_t xid;
+    enum ofp_config_flags flags;
+    uint16_t miss_send_len;
+};
+
+/* Flow Add Message */
+struct of_flow_add : of_flow_mod {
+    uint8_t version;
+    uint8_t type == 14;
+    uint16_t length;
+    uint32_t xid;
+    uint64_t cookie;
+    uint64_t cookie_mask;
+    uint8_t table_id;
+    of_fm_cmd_t _command == 0;
+    uint16_t idle_timeout;
+    uint16_t hard_timeout;
+    uint16_t priority;
+    uint32_t buffer_id;
+    of_port_no_t out_port;
+    uint32_t out_group;
+    enum ofp_flow_mod_flags flags;
+    uint16_t importance;
+    of_match_t match;
+    list(of_instruction_t) instructions;
+};
+
+/* Flow Modify Message */
+struct of_flow_modify : of_flow_mod {
+    uint8_t version;
+    uint8_t type == 14;
+    uint16_t length;
+    uint32_t xid;
+    uint64_t cookie;
+    uint64_t cookie_mask;
+    uint8_t table_id;
+    of_fm_cmd_t _command == 1;
+    uint16_t idle_timeout;
+    uint16_t hard_timeout;
+    uint16_t priority;
+    uint32_t buffer_id;
+    of_port_no_t out_port;
+    uint32_t out_group;
+    enum ofp_flow_mod_flags flags;
+    uint16_t importance;
+    of_match_t match;
+    list(of_instruction_t) instructions;
+};
+
+/* Flow Modify Strict Message */
+struct of_flow_modify_strict : of_flow_mod {
+    uint8_t version;
+    uint8_t type == 14;
+    uint16_t length;
+    uint32_t xid;
+    uint64_t cookie;
+    uint64_t cookie_mask;
+    uint8_t table_id;
+    of_fm_cmd_t _command == 2;
+    uint16_t idle_timeout;
+    uint16_t hard_timeout;
+    uint16_t priority;
+    uint32_t buffer_id;
+    of_port_no_t out_port;
+    uint32_t out_group;
+    enum ofp_flow_mod_flags flags;
+    uint16_t importance;
+    of_match_t match;
+    list(of_instruction_t) instructions;
+};
+
+/* Flow Delete Message */
+struct of_flow_delete : of_flow_mod {
+    uint8_t version;
+    uint8_t type == 14;
+    uint16_t length;
+    uint32_t xid;
+    uint64_t cookie;
+    uint64_t cookie_mask;
+    uint8_t table_id;
+    of_fm_cmd_t _command == 3;
+    uint16_t idle_timeout;
+    uint16_t hard_timeout;
+    uint16_t priority;
+    uint32_t buffer_id;
+    of_port_no_t out_port;
+    uint32_t out_group;
+    enum ofp_flow_mod_flags flags;
+    uint16_t importance;
+    of_match_t match;
+    list(of_instruction_t) instructions;
+};
+
+/* Flow Delete Strict Message */
+struct of_flow_delete_strict : of_flow_mod {
+    uint8_t version;
+    uint8_t type == 14;
+    uint16_t length;
+    uint32_t xid;
+    uint64_t cookie;
+    uint64_t cookie_mask;
+    uint8_t table_id;
+    of_fm_cmd_t _command == 4;
+    uint16_t idle_timeout;
+    uint16_t hard_timeout;
+    uint16_t priority;
+    uint32_t buffer_id;
+    of_port_no_t out_port;
+    uint32_t out_group;
+    enum ofp_flow_mod_flags flags;
+    uint16_t importance;
+    of_match_t match;
+    list(of_instruction_t) instructions;
+};
+
+/* Group Add message */
+struct of_group_add : of_group_mod {
+    uint8_t version;
+    uint8_t type == 15;
+    uint16_t length;
+    uint32_t xid;
+    enum ofp_group_mod_command command == 0;
+    enum ofp_group_type group_type;
+    pad(1);
+    uint32_t group_id;
+    uint16_t bucket_array_len == length(buckets);
+    pad(2);
+    enum ofp_group_bucket command_bucket_id;
+    list(of_bucket_t) buckets;
+    list(of_group_prop_t) properties;
+};
+
+/* Group Modify Message */
+struct of_group_modify : of_group_mod {
+    uint8_t version;
+    uint8_t type == 15;
+    uint16_t length;
+    uint32_t xid;
+    enum ofp_group_mod_command command == 1;
+    enum ofp_group_type group_type;
+    pad(1);
+    uint32_t group_id;
+    uint16_t bucket_array_len == length(buckets);
+    pad(2);
+    enum ofp_group_bucket command_bucket_id;
+    list(of_bucket_t) buckets;
+    list(of_group_prop_t) properties;
+};
+
+/* Group Delete Message */
+struct of_group_delete : of_group_mod {
+    uint8_t version;
+    uint8_t type == 15;
+    uint16_t length;
+    uint32_t xid;
+    enum ofp_group_mod_command command == 2;
+    enum ofp_group_type group_type;
+    pad(1);
+    uint32_t group_id;
+    uint16_t bucket_array_len == length(buckets);
+    pad(2);
+    enum ofp_group_bucket command_bucket_id;
+    list(of_bucket_t) buckets;
+    list(of_group_prop_t) properties;
+};
+
+/* Group Insert Bucket Message */
+struct of_group_insert_bucket : of_group_mod {
+    uint8_t version;
+    uint8_t type == 15;
+    uint16_t length;
+    uint32_t xid;
+    enum ofp_group_mod_command command == 3;
+    enum ofp_group_type group_type;
+    pad(1);
+    uint32_t group_id;
+    uint16_t bucket_array_len == length(buckets);
+    pad(2);
+    enum ofp_group_bucket command_bucket_id;
+    list(of_bucket_t) buckets;
+    list(of_group_prop_t) properties;
+};
+
+/* Group Remove Bucket Message */
+struct of_group_remove_bucket : of_group_mod {
+    uint8_t version;
+    uint8_t type == 15;
+    uint16_t length;
+    uint32_t xid;
+    enum ofp_group_mod_command command == 5;
+    enum ofp_group_type group_type;
+    pad(1);
+    uint32_t group_id;
+    uint16_t bucket_array_len == length(buckets);
+    pad(2);
+    enum ofp_group_bucket command_bucket_id;
+    list(of_bucket_t) buckets;
+    list(of_group_prop_t) properties;
+};
+
+/* Hello Failed Error Message */
+struct of_hello_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 0;
+    enum ofp_hello_failed_code code;
+    of_octets_t data;
+};
+
+/* Bad Request Error Message */
+struct of_bad_request_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 1;
+    enum ofp_bad_request_code code;
+    of_octets_t data;
+};
+
+/* Bad Action Error Message */
+struct of_bad_action_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 2;
+    enum ofp_bad_action_code code;
+    of_octets_t data;
+};
+
+/* Bad Instruction Error Message */
+struct of_bad_instruction_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 3;
+    enum ofp_bad_instruction_code code;
+    of_octets_t data;
+};
+
+/* Bad Match Error Message */
+struct of_bad_match_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 4;
+    enum ofp_bad_match_code code;
+    of_octets_t data;
+};
+
+/* Flow Mod Failed Error Message */
+struct of_flow_mod_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 5;
+    enum ofp_flow_mod_failed_code code;
+    of_octets_t data;
+};
+
+/* Group Mod Failed Error Message */
+struct of_group_mod_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 6;
+    enum ofp_group_mod_failed_code code;
+    of_octets_t data;
+};
+
+/* Port Mod Failed Error Message */
+struct of_port_mod_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 7;
+    enum ofp_port_mod_failed_code code;
+    of_octets_t data;
+};
+
+/* Table Mod Failed Error Message */
+struct of_table_mod_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 8;
+    enum ofp_table_mod_failed_code code;
+    of_octets_t data;
+};
+
+/* Queue Op Failed Error Message */
+struct of_queue_op_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 9;
+    enum ofp_queue_op_failed_code code;
+    of_octets_t data;
+};
+
+/* Switch Config Failed Error Message */
+struct of_switch_config_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 10;
+    enum ofp_switch_config_failed_code code;
+    of_octets_t data;
+};
+
+/* Role Request Failed Error Message */
+struct of_role_request_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 11;
+    enum ofp_role_request_failed_code code;
+    of_octets_t data;
+};
+
+/* Meter Mod Failed Error Message */
+struct of_meter_mod_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 12;
+    enum ofp_meter_mod_failed_code code;
+    of_octets_t data;
+};
+
+/* Table Features Failed Error Message */
+struct of_table_features_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 13;
+    enum ofp_table_features_failed_code code;
+    of_octets_t data;
+};
+
+/* Bad Property Error Message */
+struct of_bad_property_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 14;
+    enum ofp_bad_property_code code;
+    of_octets_t data;
+};
+
+/* Async Config Failed Error Message */
+struct of_async_config_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 15;
+    enum ofp_async_config_failed_code code;
+    of_octets_t data;
+};
+
+/* Flow Monitor Failed Error Message */
+struct of_flow_monitor_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 16;
+    enum ofp_flow_monitor_failed_code code;
+    of_octets_t data;
+};
+
+/* Bundle Failed Error Message */
+struct of_bundle_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 17;
+    enum ofp_bundle_failed_code code;
+    of_octets_t data;
+};
+
+/* Experimenter Error Message */
+struct of_experimenter_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 0xffff;
+    uint16_t subtype;
+    uint32_t experimenter == ?;
+    of_octets_t data;
+};
+
+/* Get Async Request Message */
+struct of_async_get_request : of_header {
+    uint8_t version;
+    uint8_t type == 26;
+    uint16_t length;
+    uint32_t xid;
+    list(of_async_config_prop_t) properties;
+};
+
+/* Get Async Reply Message */
+struct of_async_get_reply : of_header {
+    uint8_t version;
+    uint8_t type == 27;
+    uint16_t length;
+    uint32_t xid;
+    list(of_async_config_prop_t) properties;
+};
+
+/* Set Async Message */
+struct of_async_set : of_header {
+    uint8_t version;
+    uint8_t type == 28;
+    uint16_t length;
+    uint32_t xid;
+    list(of_async_config_prop_t) properties;
+};
+
+/* description statistic request */
+struct of_desc_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 0;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+};
+
+/* description statistic reply (ofp_desc) */
+struct of_desc_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 0;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    of_desc_str_t mfr_desc;
+    of_desc_str_t hw_desc;
+    of_desc_str_t sw_desc;
+    of_serial_num_t serial_num;
+    of_desc_str_t dp_desc;
+};
+
+/* controller status statistic request */
+struct of_controller_status_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 18;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+};
+
+/*controller status statistic reply */
+struct of_controller_status_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 18;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    list(of_controller_status_entry_t) controller_status;
+};
+
+/* Bundle features properties header */
+struct of_bundle_features_prop {
+    uint16_t type == ?;
+    uint16_t length;
+};
+
+/* Bundle features statistic request */
+struct of_bundle_features_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 19;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    enum ofp_bundle_feature_flags feature_request_flags;
+    pad(4);
+    list(of_bundle_features_prop_t) properties;
+};
+
+/*Bundle features statistic reply */
+struct of_bundle_features_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 19;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    enum ofp_bundle_feature_flags capabilities;
+    pad(6);
+    list(of_bundle_features_prop_t) properties;
+};
+
+/* Bundle time features. */
+struct of_bundle_features_prop_time : of_bundle_features_prop{
+    uint16_t type == 1;
+    uint16_t length;
+    pad(4);
+    of_time_t sched_accuracy;
+    of_time_t sched_max_future;
+    of_time_t sched_max_past;
+    of_time_t timestamp;
+};
+
+/* Experimenter stats request */
+struct of_experimenter_stats_request : of_stats_request {
+    uint8_t version;
+    uint8_t type == 18;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 0xffff;
+    enum ofp_stats_request_flags flags;
+    pad(4);
+    uint32_t experimenter == ?;
+    uint32_t subtype;
+};
+
+/* Experimenter stats reply */
+struct of_experimenter_stats_reply : of_stats_reply {
+    uint8_t version;
+    uint8_t type == 19;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type == 0xffff;
+    enum ofp_stats_reply_flags flags;
+    pad(4);
+    uint32_t experimenter == ?;
+    uint32_t subtype;
+};
+
+/* ------------------------------------------- 1.3.1 Queue Structure -------------------------------------- */
+struct of_queue_prop {
+    uint16_t type == ?;
+    uint16_t len;
+    pad(4);
+};
+
+struct of_queue_prop_min_rate : of_queue_prop {
+    uint16_t type == 1;
+    uint16_t len;
+    pad(4);
+    uint16_t rate;
+    pad(6);
+};
+
+struct of_queue_prop_max_rate : of_queue_prop {
+    uint16_t type == 2;
+    uint16_t len;
+    pad(4);
+    uint16_t rate;
+    pad(6);
+};
+
+struct of_queue_prop_experimenter : of_queue_prop {
+    uint16_t type == 65535;
+    uint16_t len;
+    pad(4);
+    uint32_t experimenter == ?;
+    pad(4);
+    of_octets_t data;
+};
+
+struct of_packet_queue {
+    uint32_t queue_id;
+    of_port_no_t port;
+    uint16_t len;
+    pad(6);
+    list(of_queue_prop_t) properties;
+};
+
+
+
+
diff --git a/py_gen/oftype.py b/py_gen/oftype.py
index 6c13015..0ff7823 100644
--- a/py_gen/oftype.py
+++ b/py_gen/oftype.py
@@ -151,6 +151,7 @@
     'of_meter_features_t': 'ofp.meter_features',
     'of_bsn_vport_t': 'ofp.bsn_vport',
     'of_table_desc_t': 'ofp.table_desc',
+    'of_stat_t': 'ofp.stat',
 }
 
 for (cls, pyclass) in embedded_structs.items():
diff --git a/py_gen/templates/_common_extra.py b/py_gen/templates/_common_extra.py
index f801965..56d88f2 100644
--- a/py_gen/templates/_common_extra.py
+++ b/py_gen/templates/_common_extra.py
@@ -38,4 +38,8 @@
 :: elif version == OFVersions.VERSION_1_4:
 :: # HACK
 match = match_v3
+:: elif version == OFVersions.VERSION_1_5:
+:: # HACK
+match = match_v3
+stat = stat_v6
 :: #endif
diff --git a/py_gen/templates/_pretty_print.py b/py_gen/templates/_pretty_print.py
index c8c7770..cce3561 100644
--- a/py_gen/templates/_pretty_print.py
+++ b/py_gen/templates/_pretty_print.py
@@ -54,6 +54,8 @@
                 q.text(util.pretty_wildcards(self.${m.name}))
 :: elif m.oftype == 'of_port_no_t':
                 q.text(util.pretty_port(self.${m.name}))
+:: elif m.oftype == 'of_ipv6_t':
+                q.text(util.pretty_ipv6(self.${m.name}))
 :: elif loxi_utils.lookup_ir_wiretype(m.oftype, version=version).startswith("uint"):
                 q.text("%#x" % self.${m.name})
 :: else:
diff --git a/py_gen/templates/connection.py b/py_gen/templates/connection.py
index f0648be..1fbf4a6 100644
--- a/py_gen/templates/connection.py
+++ b/py_gen/templates/connection.py
@@ -262,3 +262,20 @@
         raise Exception("Did not receive HELLO")
 
     return cxn
+
+def connect_unix(path, daemon=True, ofp=loxi.of14):
+    """
+    Connect over a unix domain socket
+    """
+    soc = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+    soc.connect(path)
+    cxn = loxi.connection.Connection(soc)
+    cxn.daemon = daemon
+    cxn.logger.debug("Connected to %s", path)
+    cxn.start()
+
+    cxn.send(ofp.message.hello())
+    if not cxn.recv(lambda msg: msg.type == ofp.OFPT_HELLO):
+        raise Exception("Did not receive HELLO")
+
+    return cxn
diff --git a/py_gen/templates/util.py b/py_gen/templates/util.py
index 7558576..20d4ef2 100644
--- a/py_gen/templates/util.py
+++ b/py_gen/templates/util.py
@@ -52,6 +52,9 @@
 def pretty_ipv4(v):
     return "%d.%d.%d.%d" % ((v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF)
 
+def pretty_ipv6(v):
+    return ":".join(["%0.2x%0.2x" % (ord(v[i]), ord(v[i+1])) for i in range(0, len(v), 2)])
+
 def pretty_flags(v, flag_names):
     set_flags = []
     for flag_name in flag_names:
diff --git a/py_gen/tests/of15.py b/py_gen/tests/of15.py
new file mode 100644
index 0000000..219cc28
--- /dev/null
+++ b/py_gen/tests/of15.py
@@ -0,0 +1,130 @@
+#!/usr/bin/env python
+# Copyright 2016, 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 2014, 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.
+import unittest
+from testutil import test_serialization
+from testutil import add_datafiles_tests
+
+try:
+    import loxi
+    import loxi.of15 as ofp
+    from loxi.generic_util import OFReader
+except ImportError:
+    exit("loxi package not found. Try setting PYTHONPATH.")
+
+class TestImports(unittest.TestCase):
+    def test_toplevel(self):
+        import loxi
+        self.assertTrue(hasattr(loxi, "ProtocolError"))
+        self.assertEquals(loxi.version_names[6], "1.5")
+        ofp = loxi.protocol(6)
+        self.assertEquals(ofp.OFP_VERSION, 6)
+        self.assertTrue(hasattr(ofp, "action"))
+        self.assertTrue(hasattr(ofp, "common"))
+        self.assertTrue(hasattr(ofp, "const"))
+        self.assertTrue(hasattr(ofp, "message"))
+        self.assertTrue(hasattr(ofp, "oxm"))
+
+    def test_version(self):
+        import loxi
+        self.assertTrue(hasattr(loxi.of15, "ProtocolError"))
+        self.assertTrue(hasattr(loxi.of15, "OFP_VERSION"))
+        self.assertEquals(loxi.of15.OFP_VERSION, 6)
+        self.assertTrue(hasattr(loxi.of15, "action"))
+        self.assertTrue(hasattr(loxi.of15, "common"))
+        self.assertTrue(hasattr(loxi.of15, "const"))
+        self.assertTrue(hasattr(loxi.of15, "message"))
+        self.assertTrue(hasattr(loxi.of15, "oxm"))
+
+# The majority of the serialization tests are created here using the files in
+# the test_data directory.
+class TestDataFiles(unittest.TestCase):
+    pass
+add_datafiles_tests(TestDataFiles, 'of15/', ofp)
+
+class TestAllof15(unittest.TestCase):
+    """
+    Round-trips every class through serialization/deserialization.
+    Not a replacement for handcoded tests because it only uses the
+    default member values.
+    """
+
+    def setUp(self):
+        mods = [ofp.action,ofp.message,ofp.common,ofp.oxm]
+        self.klasses = [klass for mod in mods
+                              for klass in mod.__dict__.values()
+                              if isinstance(klass, type) and
+                                 issubclass(klass, loxi.OFObject) and
+                                 not hasattr(klass, 'subtypes')]
+        self.klasses.sort(key=lambda x: str(x))
+
+    def test_serialization(self):
+        expected_failures = [
+            ofp.action.set_field, # field defaults to None
+        ]
+        for klass in self.klasses:
+            def fn():
+                obj = klass()
+                if hasattr(obj, "xid"): obj.xid = 42
+                buf = obj.pack()
+                obj2 = klass.unpack(OFReader(buf))
+                self.assertEquals(obj, obj2)
+            if klass in expected_failures:
+                self.assertRaises(Exception, fn)
+            else:
+                fn()
+
+    def test_parse_message(self):
+        expected_failures = [
+        ]
+        for klass in self.klasses:
+            if not issubclass(klass, ofp.message.message):
+                continue
+            def fn():
+                obj = klass(xid=42)
+                buf = obj.pack()
+                obj2 = ofp.message.parse_message(buf)
+                self.assertEquals(obj, obj2)
+            if klass in expected_failures:
+                self.assertRaises(Exception, fn)
+            else:
+                fn()
+
+    def test_show(self):
+        expected_failures = []
+        for klass in self.klasses:
+            def fn():
+                obj = klass()
+                if hasattr(obj, "xid"): obj.xid = 42
+                obj.show()
+            if klass in expected_failures:
+                self.assertRaises(Exception, fn)
+            else:
+                fn()
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/test_data/of10/port_mod.data b/test_data/of10/port_mod.data
index 754e139..3d110cf 100644
--- a/test_data/of10/port_mod.data
+++ b/test_data/of10/port_mod.data
@@ -4,8 +4,8 @@
 00 00 00 02 # xid
 ff fd # port_no
 01 02 03 04 05 06 # hw_addr
-90 ab cd ef # config
-ff 11 ff 11 # mask
+80 00 00 6f # config
+80 00 00 11 # mask
 ca fe 67 89 # advertise
 00 00 00 00 # pad
 -- python
@@ -13,17 +13,17 @@
     xid=2,
     port_no=ofp.OFPP_CONTROLLER,
     hw_addr=[1,2,3,4,5,6],
-    config=0x90ABCDEF,
-    mask=0xFF11FF11,
+    config=0x8000006f,
+    mask=0x80000011,
     advertise=0xCAFE6789)
 -- c
 obj = of_port_mod_new(OF_VERSION_1_0);
 of_port_mod_advertise_set(obj, 0xCAFE6789);
-of_port_mod_config_set(obj, 0x90ABCDEF);
+of_port_mod_config_set(obj, 0x8000006f);
 {
     of_mac_addr_t hw_addr = { { 1, 2, 3, 4, 5, 6 } };
     of_port_mod_hw_addr_set(obj, hw_addr);
 }
-of_port_mod_mask_set(obj, 0xFF11FF11);
+of_port_mod_mask_set(obj, 0x80000011);
 of_port_mod_port_no_set(obj, 65533);
 of_port_mod_xid_set(obj, 2);
diff --git a/test_data/of15/action_output.data b/test_data/of15/action_output.data
new file mode 100644
index 0000000..947a461
--- /dev/null
+++ b/test_data/of15/action_output.data
@@ -0,0 +1,8 @@
+-- binary
+00 00 # type
+00 10 # length
+00 00 00 32 # port
+ff ff # max_len
+00 00 00 00 00 00 # pad
+-- java
+builder.setPort(OFPort.of(50)).setMaxLen(65535)
\ No newline at end of file
diff --git a/test_data/of15/action_set_field__eth_dst.data b/test_data/of15/action_set_field__eth_dst.data
new file mode 100644
index 0000000..a8f1541
--- /dev/null
+++ b/test_data/of15/action_set_field__eth_dst.data
@@ -0,0 +1,9 @@
+-- binary
+00 19 # type
+00 10 # length
+80 00 06 06 # OXM header
+00 01 02 03 04 05 # OXM value
+00 00 # pad
+-- java
+OFOxms oxms = OFFactories.getFactory(OFVersion.OF_15).oxms();
+builder.setField(oxms.ethDst(MacAddress.of("00:01:02:03:04:05")))
\ No newline at end of file
diff --git a/test_data/of15/action_set_field__ipv6_src.data b/test_data/of15/action_set_field__ipv6_src.data
new file mode 100644
index 0000000..4f3bc40
--- /dev/null
+++ b/test_data/of15/action_set_field__ipv6_src.data
@@ -0,0 +1,8 @@
+-- binary
+00 19 # type
+00 18 # length
+80 00 34 10 # OXM header
+00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f # OXM value
+-- java
+OFOxms oxms = OFFactories.getFactory(OFVersion.OF_15).oxms();
+builder.setField(oxms.ipv6Src(IPv6Address.of("0001:0203:0405:0607:0809:0a0b:0c0d:0e0f")))
\ No newline at end of file
diff --git a/test_data/of15/action_set_field__tcp_src.data b/test_data/of15/action_set_field__tcp_src.data
new file mode 100644
index 0000000..926adae
--- /dev/null
+++ b/test_data/of15/action_set_field__tcp_src.data
@@ -0,0 +1,9 @@
+-- binary
+00 19 # type
+00 10 # length
+80 00 1a 02 # OXM header
+00 32 # OXM value
+00 00 00 00 00 00 # pad
+-- java
+OFOxms oxms = OFFactories.getFactory(OFVersion.OF_15).oxms();
+builder.setField(oxms.tcpSrc(TransportPort.of(50)))
\ No newline at end of file
diff --git a/test_data/of15/aggregate_stats_reply.data b/test_data/of15/aggregate_stats_reply.data
new file mode 100644
index 0000000..2852506
--- /dev/null
+++ b/test_data/of15/aggregate_stats_reply.data
@@ -0,0 +1,24 @@
+--binary
+06 13 # version, type
+00 30 # length
+12 34 56 78 # xid
+00 02 # multipart message type (OFPMP_AGGREGATE_STATS)
+00 01 # flags (OFPMPF_REPLY_MORE)
+00 00 00 00 # pad
+00 00 # reserved
+00 1c # stats.length
+80 02 00 08 # stats.oxs_list[0].type_len - DURATION
+00 00 00 00 00 00 00 04 # stats.oxs_list[0].value
+80 02 02 08 # stats.oxs_list[1].type_len - IDLE_TIME (02 -> 0000 0010 -> oxs_field width 7, oxs_reserved width 1)
+00 00 00 00 00 00 00 06 # stats.oxs_list[1].value
+00 00 00 00 # stats.pad
+--java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setStats(
+            factory.buildStatV6()
+            .setOxsFields(OFOxsList
+                                    .of(factory.oxss().buildDuration().setValue(U64.of(4)).build(),
+                                        factory.oxss().buildIdleTime().setValue(U64.of(6)).build()))
+            .build());
\ No newline at end of file
diff --git a/test_data/of15/aggregate_stats_request.data b/test_data/of15/aggregate_stats_request.data
new file mode 100644
index 0000000..9b62963
--- /dev/null
+++ b/test_data/of15/aggregate_stats_request.data
@@ -0,0 +1,33 @@
+-- binary
+06 12 # version, type
+00 40 # length
+12 34 56 78 # xid
+00 02 # multipart message type (OFPMP_AGGREGATE_STATS)
+00 01 # flags
+00 00 00 00 # pad
+ff # tableId
+00 00 00  # pad
+00 00 00 04 # out_port
+00 00 00 01 # out_group
+00 00 00 00 # pad
+fe dc ba 98 76 54 32 10 # cookie
+ff 00 ff 00 ff 00 ff 00 # cookie_maskk
+00 01 # match.type
+00 10 # match.length
+80 00 01 08 # match.oxm_list[0].type_len - IN_PORT
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .setTableId(TableId.ALL)
+        .setOutPort(OFPort.of(4))
+        .setOutGroup(OFGroup.of(1))
+        .setCookie(U64.parseHex("FEDCBA9876543210"))
+        .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+        .setMatch(
+                factory.buildMatch()
+                        .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+                        .build())
+        .build()
diff --git a/test_data/of15/async_get_reply.data b/test_data/of15/async_get_reply.data
new file mode 100644
index 0000000..9c35dac
--- /dev/null
+++ b/test_data/of15/async_get_reply.data
@@ -0,0 +1,12 @@
+-- binary
+06 1b # version, type
+00 10 # length
+12 34 56 78 # xid
+00 01 # properties[0].type (OFPACPT_PACKET_IN_MASTER)
+00 08 # properties[0].length
+00 00 00 00 # mask
+-- java
+builder
+        .setXid(0x12345678)
+        .setProperties(ImmutableList.<OFAsyncConfigProp>of(factory.buildAsyncConfigPropPacketInMaster().setMask(0).build()))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/async_get_request.data b/test_data/of15/async_get_request.data
new file mode 100644
index 0000000..6ee513e
--- /dev/null
+++ b/test_data/of15/async_get_request.data
@@ -0,0 +1,6 @@
+-- binary
+06 1a # version, type
+00 08 # length
+12 34 56 78 # xid
+-- java
+builder.setXid(0x12345678).build()
\ No newline at end of file
diff --git a/test_data/of15/async_set.data b/test_data/of15/async_set.data
new file mode 100644
index 0000000..a455fce
--- /dev/null
+++ b/test_data/of15/async_set.data
@@ -0,0 +1,12 @@
+-- binary
+06 1c # version, type
+00 10 # length
+12 34 56 78 # xid
+00 01 # properties[0].type (OFPACPT_PACKET_IN_MASTER)
+00 08 # properties[0].length
+00 00 00 00 # mask
+-- java
+builder
+        .setXid(0x12345678)
+        .setProperties(ImmutableList.<OFAsyncConfigProp>of(factory.buildAsyncConfigPropPacketInMaster().setMask(0).build()))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/bad_action_error_msg.data b/test_data/of15/bad_action_error_msg.data
new file mode 100644
index 0000000..21b1053
--- /dev/null
+++ b/test_data/of15/bad_action_error_msg.data
@@ -0,0 +1,12 @@
+-- binary
+06 01 # version / type
+00 0f # length
+12 34 56 78 # xid
+00 02 # err_type
+00 00 # code
+61 62 63 # data
+-- java
+builder
+        .setXid(0x12345678)
+        .setCode(OFBadActionCode.BAD_TYPE)
+        .setData(OFErrorCauseData.of(new byte[] { 0x61, 0x62, 0x63 }, OFVersion.OF_15));
\ No newline at end of file
diff --git a/test_data/of15/bad_instruction_error_msg.data b/test_data/of15/bad_instruction_error_msg.data
new file mode 100644
index 0000000..45ba92c
--- /dev/null
+++ b/test_data/of15/bad_instruction_error_msg.data
@@ -0,0 +1,12 @@
+-- binary
+06 01 # version / type
+00 0f # length
+12 34 56 78 # xid
+00 03 # err_type
+00 08 # code
+61 62 63 # data
+-- java
+builder
+        .setXid(0x12345678)
+        .setCode(OFBadInstructionCode.EPERM)
+        .setData(OFErrorCauseData.of(new byte[] { 0x61, 0x62, 0x63 }, OFVersion.OF_15));
\ No newline at end of file
diff --git a/test_data/of15/bad_match_error_msg.data b/test_data/of15/bad_match_error_msg.data
new file mode 100644
index 0000000..4adfd59
--- /dev/null
+++ b/test_data/of15/bad_match_error_msg.data
@@ -0,0 +1,12 @@
+-- binary
+06 01 # version / type
+00 0f # length
+12 34 56 78 # xid
+00 04 # err_type
+00 08 # code
+61 62 63 # data
+-- java
+builder
+        .setXid(0x12345678)
+        .setCode(OFBadMatchCode.BAD_MASK)
+        .setData(OFErrorCauseData.of(new byte[] { 0x61, 0x62, 0x63 }, OFVersion.OF_15));
\ No newline at end of file
diff --git a/test_data/of15/bad_request_error_msg.data b/test_data/of15/bad_request_error_msg.data
new file mode 100644
index 0000000..59bfe91
--- /dev/null
+++ b/test_data/of15/bad_request_error_msg.data
@@ -0,0 +1,12 @@
+-- binary
+06 01 # version / type
+00 0f # length
+12 34 56 78 # xid
+00 01 # err_type
+00 08 # code
+61 62 63 # data
+-- java
+builder
+        .setXid(0x12345678)
+        .setCode(OFBadRequestCode.BUFFER_UNKNOWN)
+        .setData(OFErrorCauseData.of(new byte[] { 0x61, 0x62, 0x63 }, OFVersion.OF_15));
\ No newline at end of file
diff --git a/test_data/of15/barrier_reply.data b/test_data/of15/barrier_reply.data
new file mode 100644
index 0000000..679e029
--- /dev/null
+++ b/test_data/of15/barrier_reply.data
@@ -0,0 +1,6 @@
+-- binary
+06 15 # version, type
+00 08 # length
+12 34 56 78 # xid
+-- java
+builder.setXid(0x12345678).build()
\ No newline at end of file
diff --git a/test_data/of15/barrier_request.data b/test_data/of15/barrier_request.data
new file mode 100644
index 0000000..b538751
--- /dev/null
+++ b/test_data/of15/barrier_request.data
@@ -0,0 +1,6 @@
+-- binary
+06 14 # version, type
+00 08 # length
+12 34 56 78 # xid
+-- java
+builder.setXid(0x12345678).build()
\ No newline at end of file
diff --git a/test_data/of15/bundle_add_msg.data b/test_data/of15/bundle_add_msg.data
new file mode 100644
index 0000000..1413cc2
--- /dev/null
+++ b/test_data/of15/bundle_add_msg.data
@@ -0,0 +1,25 @@
+-- binary
+06 22 # version, type
+00 32 # length
+12 34 56 78 # xid
+00 00 00 01 # bundle_id
+00 # pad
+00 01 # flags (OFPBF_ATOMIC)
+06 02 # message.version, type
+00 0b # message.length
+11 11 11 11 # message.xid
+61 62 63 # data
+00 01 # properties[0].type (OFPBPT_TIME)
+00 18 # properties[0].length
+00 00 00 00 # properties[0].pad
+00 00 00 00 00 00 00 01  # properties[0].scheduled_time.seconds
+3b 9a ca 00 # properties[0].scheduled_time.nanoseconds
+00 00 00 00 # properties[0].scheduled_time.pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setBundleId(BundleId.of(1))
+        .setFlags(ImmutableSet.<OFBundleFlags>of(OFBundleFlags.ATOMIC))
+        .setProperties(ImmutableList.<OFBundleProp>of(factory.buildBundlePropTime().setScheduledTime(ImmutableList.<OFTime>of(factory.buildTime().setSeconds(U64.of(1)).setNanoseconds(1000000000L).build())).build()))
+        .setMessage(factory.buildEchoRequest().setXid(0x11111111).setData(new byte[] {97,98,99}).build())
+        .build()
diff --git a/test_data/of15/bundle_ctrl_msg.data b/test_data/of15/bundle_ctrl_msg.data
new file mode 100644
index 0000000..04624a9
--- /dev/null
+++ b/test_data/of15/bundle_ctrl_msg.data
@@ -0,0 +1,21 @@
+-- binary
+06 21 # version, type
+00 28 # length
+12 34 56 78 # xid
+00 00 00 01 # bundle_id
+00 00 # type (OFPBCT_OPEN_REQUEST)
+00 01 # flags (OFPBF_ATOMIC)
+00 01 # properties[0].type (OFPBPT_TIME)
+00 18 # properties[0].length
+00 00 00 00 # properties[0].pad
+00 00 00 00 00 00 00 01 # properties[0].ofp_time.seconds
+3b 9a ca 00 # properties[0].ofp_time.nanoseconds
+00 00 00 00 # properties[0].ofp_time.pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setBundleId(BundleId.of(1))
+        .setBundleCtrlType(OFBundleCtrlType.OPEN_REQUEST)
+        .setFlags(ImmutableSet.<OFBundleFlags>of(OFBundleFlags.ATOMIC))
+        .setProperties(ImmutableList.<OFBundleProp>of(factory.buildBundlePropTime().setScheduledTime(ImmutableList.<OFTime>of(factory.buildTime().setSeconds(U64.of(1)).setNanoseconds(1000000000L).build())).build()))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/bundle_features_stats_request.data b/test_data/of15/bundle_features_stats_request.data
new file mode 100644
index 0000000..1ee5f73
--- /dev/null
+++ b/test_data/of15/bundle_features_stats_request.data
@@ -0,0 +1,37 @@
+-- binary
+06 12 # version, type
+00 60 # length
+12 34 56 78 # xid
+00 13 # multipart message type (OFPMP_BUNDLE_FEATURES)
+00 01 # flags
+00 00 00 00 # pad
+00 00 00 01 # feature_request_flags (OFPBF_TIMESTAMP)
+00 00 00 00 # pad
+00 01 # properties[0].type (OFPTMPBF_TIME_CAPABILITY)
+00 48 # properties[0].length
+00 00 00 00 # properties[0].pad
+00 00 00 00 00 00 00 03 # properties[0].sched_accuracy.seconds
+b2 d0 5e 00 # properties[0].sched_accuracy.nanoseconds
+00 00 00 00 # properties[0].sched_accuracy.pad
+00 00 00 00 00 00 00 03 # properties[0].sched_max_future.seconds
+b2 d0 5e 00 # properties[0].sched_max_future.nanoseconds
+00 00 00 00 # properties[0].sched_max_future.pad
+00 00 00 00 00 00 00 03 # properties[0].sched_max_past.seconds
+b2 d0 5e 00 # properties[0].sched_max_past.nanoseconds
+00 00 00 00 # properties[0].sched_max_past.pad
+00 00 00 00 00 00 00 03 # properties[0].timestamp.seconds
+b2 d0 5e 00 # properties[0].timestamp;.nanoseconds
+00 00 00 00 # properties[0].timestamp;.pad
+--  java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .setFeatureRequestFlags(ImmutableSet.<OFBundleFeatureFlags>of(OFBundleFeatureFlags.TIMESTAMP))
+        .setProperties(ImmutableList.<OFBundleFeaturesProp>of(factory.buildBundleFeaturesPropTime().setSchedAccuracy(factory.buildTime().setSeconds(U64.of(3)).setNanoseconds(3000000000L).build())
+                                                                                                .setSchedMaxFuture(factory.buildTime().setSeconds(U64.of(3)).setNanoseconds(3000000000L).build())
+                                                                                                .setSchedMaxPast(factory.buildTime().setSeconds(U64.of(3)).setNanoseconds(3000000000L).build())
+                                                                                                .setTimestamp(factory.buildTime().setSeconds(U64.of(3)).setNanoseconds(3000000000L).build())
+                                                                                                .build()))
+        .build()
+
+
diff --git a/test_data/of15/controller_status_stats_request.data b/test_data/of15/controller_status_stats_request.data
new file mode 100644
index 0000000..4c06084
--- /dev/null
+++ b/test_data/of15/controller_status_stats_request.data
@@ -0,0 +1,12 @@
+-- binary
+06 12 # version, type
+00 10 # length
+12 34 56 78 # xid
+00 12 # multipart message type (OFPMP_CONTROLLER_STATUS)
+00 01 # flags (OFPMPF_REQUEST_MORE)
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/desc_stats_reply.data b/test_data/of15/desc_stats_reply.data
new file mode 100644
index 0000000..48fdb93
--- /dev/null
+++ b/test_data/of15/desc_stats_reply.data
@@ -0,0 +1,42 @@
+-- binary
+06 13 # version, type
+04 30 # length
+12 34 56 78 # xid
+00 00 # multipart message type (OFPMP_DESC)
+00 01 # flags
+00 00 00 00 # pad
+61 62 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 # mfr_desc [256]
+61 62 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 # hw_desc [256]
+61 62 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 # sw_desc [256]
+61 62 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 # serial number [32]
+61 62 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 # dp_desc [256]
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setMfrDesc("abc")
+        .setHwDesc("abc")
+        .setSwDesc("abc")
+        .setSerialNum("abc")
+        .setDpDesc("abc")
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/desc_stats_request.data b/test_data/of15/desc_stats_request.data
new file mode 100644
index 0000000..acbc092
--- /dev/null
+++ b/test_data/of15/desc_stats_request.data
@@ -0,0 +1,12 @@
+-- binary
+06 12 # version, type
+00 10 # length
+12 34 56 78 # xid
+00 00 # multipart message type (OFPMP_DESC)
+00 01 # flags
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .build()
diff --git a/test_data/of15/echo_reply.data b/test_data/of15/echo_reply.data
new file mode 100644
index 0000000..113e731
--- /dev/null
+++ b/test_data/of15/echo_reply.data
@@ -0,0 +1,7 @@
+--binary
+06 03 # version, type
+00 0b # length
+12 34 56 78 # xid
+61 62 63 # data
+--java
+builder.setXid(0x12345678).setData(new byte[] {97,98,99}).build()
\ No newline at end of file
diff --git a/test_data/of15/echo_request.data b/test_data/of15/echo_request.data
new file mode 100644
index 0000000..882c403
--- /dev/null
+++ b/test_data/of15/echo_request.data
@@ -0,0 +1,7 @@
+--binary
+06 02 # version, type
+00 0b # length
+12 34 56 78 # xid
+61 62 63 # data
+--java
+builder.setXid(0x12345678).setData(new byte[] {97,98,99}).build()
\ No newline at end of file
diff --git a/test_data/of15/features_reply.data b/test_data/of15/features_reply.data
new file mode 100644
index 0000000..32cafec
--- /dev/null
+++ b/test_data/of15/features_reply.data
@@ -0,0 +1,21 @@
+--binary
+06 06 # version, type
+00 20 # length
+12 34 56 78 # xid
+10 10 10 10 10 10 10 10 # datapath_id
+00 00 00 40 # n_buffers
+c8 # n_tables
+05 # auxiliary_id
+00 00 # pad
+00 00 01 01 # capabilities
+00 00 00 00 # reserved
+--java
+builder
+        .setXid(0x12345678)
+        .setDatapathId(DatapathId.of(new byte[] {16,16,16,16,16,16,16,16}))
+        .setNBuffers(64)
+        .setNTables((short)200)
+        .setAuxiliaryId(OFAuxId.of(5))
+        .setCapabilities(Sets.immutableEnumSet(OFCapabilities.FLOW_STATS, OFCapabilities.PORT_BLOCKED))
+        .setReserved(0)
+        .build()
diff --git a/test_data/of15/features_request.data b/test_data/of15/features_request.data
new file mode 100644
index 0000000..d1a81ea
--- /dev/null
+++ b/test_data/of15/features_request.data
@@ -0,0 +1,6 @@
+--binary
+06 05 # version, type
+00 08 # length
+12 34 56 78 #xid
+--java
+builder.setXid(0x12345678).build()
\ No newline at end of file
diff --git a/test_data/of15/flow_add.data b/test_data/of15/flow_add.data
new file mode 100644
index 0000000..befb8b5
--- /dev/null
+++ b/test_data/of15/flow_add.data
@@ -0,0 +1,79 @@
+-- binary
+06 0e # version, type
+00 80 # length
+12 34 56 78 # xid
+
+fe dc ba 98 76 54 32 10 # cookie
+
+ff 00 ff 00 ff 00 ff 00 # cookie_mask
+
+03 # table_id
+00 # _command
+00 05 # idle_timeout
+00 0a # hard_timeout
+17 70 # priority
+
+00 00 00 32 # buffer_id
+00 00 00 06 # out_port
+
+00 00 00 08 # out_group
+00 00 # flags
+00 00 # importance
+
+00 01 # match.type
+00 3F # match.length # 59 bytes OXMs + 4 bytes match header
+
+80 00 01 08 # match.oxm_list[0].type_len - IN_PORT
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+
+80 00 0A 02 # match.oxm_list[1].type_len - ETH_TYPE
+86 DD # match.oxm_list[1].value - ETH_TYPE = IPv6
+
+80 00 14 01 # match.oxm_list[2].type_len - IP Proto
+06 # match.oxm_list[2].value = IP_PROTO = TCP
+
+80 00 35 20 # match.oxm_list[3].type_len - IPV6_SRC
+1C CA FE 1C B1 10 1C 00 00 28 00 00 00 00 00 00 # match.oxm_list[3].value
+FF FF FF FF FF F0 FF FF 1C 2C 3C 00 00 00 00 00 # match.oxm_list[3].mask
+
+00 # match.pad
+
+00 01 # instructions[0].type
+00 08 # instructions[0].length
+04 # instructions[0].table_id
+00 00 00 # pad
+
+00 01 # instructions[1].type
+00 08 # instructions[1].length
+07 # instructions[1].table_id
+00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setCookie(U64.parseHex("FEDCBA9876543210"))
+        .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+        .setTableId(TableId.of(3))
+        .setIdleTimeout(5)
+        .setHardTimeout(10)
+        .setPriority(6000)
+        .setBufferId(OFBufferId.of(50))
+        .setOutPort(OFPort.of(6))
+        .setOutGroup(OFGroup.of(8))
+        .setFlags(ImmutableSet.<OFFlowModFlags>of())
+        .setMatch(
+            factory.buildMatch()
+                .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+                .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+                .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+                .setMasked(MatchField.IPV6_SRC,
+                            IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+                            IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+            .build()
+        )
+        .setInstructions(
+            ImmutableList.<OFInstruction>of(
+                factory.instructions().gotoTable(TableId.of(4)),
+                factory.instructions().gotoTable(TableId.of(7))
+            )
+        );
\ No newline at end of file
diff --git a/test_data/of15/flow_delete.data b/test_data/of15/flow_delete.data
new file mode 100644
index 0000000..f812915
--- /dev/null
+++ b/test_data/of15/flow_delete.data
@@ -0,0 +1,79 @@
+-- binary
+06 0e # version, type
+00 80 # length
+12 34 56 78 # xid
+
+fe dc ba 98 76 54 32 10 # cookie
+
+ff 00 ff 00 ff 00 ff 00 # cookie_mask
+
+03 # table_id
+03 # _command
+00 05 # idle_timeout
+00 0a # hard_timeout
+17 70 # priority
+
+00 00 00 32 # buffer_id
+00 00 00 06 # out_port
+
+00 00 00 08 # out_group
+00 00 # flags
+00 00 # importance
+
+00 01 # match.type
+00 3F # match.length # 59 bytes OXMs + 4 bytes match header
+
+80 00 01 08 # match.oxm_list[0].type_len - IN_PORT
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+
+80 00 0A 02 # match.oxm_list[1].type_len - ETH_TYPE
+86 DD # match.oxm_list[1].value - ETH_TYPE = IPv6
+
+80 00 14 01 # match.oxm_list[2].type_len - IP Proto
+06 # match.oxm_list[2].value = IP_PROTO = TCP
+
+80 00 35 20 # match.oxm_list[3].type_len - IPV6_SRC
+1C CA FE 1C B1 10 1C 00 00 28 00 00 00 00 00 00 # match.oxm_list[3].value
+FF FF FF FF FF F0 FF FF 1C 2C 3C 00 00 00 00 00 # match.oxm_list[3].mask
+
+00 # match.pad
+
+00 01 # instructions[0].type
+00 08 # instructions[0].length
+04 # instructions[0].table_id
+00 00 00 # pad
+
+00 01 # instructions[1].type
+00 08 # instructions[1].length
+07 # instructions[1].table_id
+00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setCookie(U64.parseHex("FEDCBA9876543210"))
+        .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+        .setTableId(TableId.of(3))
+        .setIdleTimeout(5)
+        .setHardTimeout(10)
+        .setPriority(6000)
+        .setBufferId(OFBufferId.of(50))
+        .setOutPort(OFPort.of(6))
+        .setOutGroup(OFGroup.of(8))
+        .setFlags(ImmutableSet.<OFFlowModFlags>of())
+        .setMatch(
+            factory.buildMatch()
+                .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+                .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+                .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+                .setMasked(MatchField.IPV6_SRC,
+                        IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+                        IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+            .build()
+        )
+        .setInstructions(
+            ImmutableList.<OFInstruction>of(
+                factory.instructions().gotoTable(TableId.of(4)),
+                factory.instructions().gotoTable(TableId.of(7))
+            )
+        );
\ No newline at end of file
diff --git a/test_data/of15/flow_delete_strict.data b/test_data/of15/flow_delete_strict.data
new file mode 100644
index 0000000..4b7496b
--- /dev/null
+++ b/test_data/of15/flow_delete_strict.data
@@ -0,0 +1,79 @@
+-- binary
+06 0e # version, type
+00 80 # length
+12 34 56 78 # xid
+
+fe dc ba 98 76 54 32 10 # cookie
+
+ff 00 ff 00 ff 00 ff 00 # cookie_mask
+
+03 # table_id
+04 # _command
+00 05 # idle_timeout
+00 0a # hard_timeout
+17 70 # priority
+
+00 00 00 32 # buffer_id
+00 00 00 06 # out_port
+
+00 00 00 08 # out_group
+00 00 # flags
+00 00 # importance
+
+00 01 # match.type
+00 3F # match.length # 59 bytes OXMs + 4 bytes match header
+
+80 00 01 08 # match.oxm_list[0].type_len - IN_PORT
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+
+80 00 0A 02 # match.oxm_list[1].type_len - ETH_TYPE
+86 DD # match.oxm_list[1].value - ETH_TYPE = IPv6
+
+80 00 14 01 # match.oxm_list[2].type_len - IP Proto
+06 # match.oxm_list[2].value = IP_PROTO = TCP
+
+80 00 35 20 # match.oxm_list[3].type_len - IPV6_SRC
+1C CA FE 1C B1 10 1C 00 00 28 00 00 00 00 00 00 # match.oxm_list[3].value
+FF FF FF FF FF F0 FF FF 1C 2C 3C 00 00 00 00 00 # match.oxm_list[3].mask
+
+00 # match.pad
+
+00 01 # instructions[0].type
+00 08 # instructions[0].length
+04 # instructions[0].table_id
+00 00 00 # pad
+
+00 01 # instructions[1].type
+00 08 # instructions[1].length
+07 # instructions[1].table_id
+00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setCookie(U64.parseHex("FEDCBA9876543210"))
+        .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+        .setTableId(TableId.of(3))
+        .setIdleTimeout(5)
+        .setHardTimeout(10)
+        .setPriority(6000)
+        .setBufferId(OFBufferId.of(50))
+        .setOutPort(OFPort.of(6))
+        .setOutGroup(OFGroup.of(8))
+        .setFlags(ImmutableSet.<OFFlowModFlags>of())
+        .setMatch(
+            factory.buildMatch()
+                .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+                .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+                .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+                .setMasked(MatchField.IPV6_SRC,
+                        IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+                        IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+            .build()
+        )
+        .setInstructions(
+            ImmutableList.<OFInstruction>of(
+                factory.instructions().gotoTable(TableId.of(4)),
+                factory.instructions().gotoTable(TableId.of(7))
+            )
+        );
\ No newline at end of file
diff --git a/test_data/of15/flow_lightweight_stats_reply.data b/test_data/of15/flow_lightweight_stats_reply.data
new file mode 100644
index 0000000..36fe905
--- /dev/null
+++ b/test_data/of15/flow_lightweight_stats_reply.data
@@ -0,0 +1,40 @@
+-- binary
+06 13 # version, type
+00 48 # length
+12 34 56 78 # xid
+00 11 # multipart message type (OFPMP_FLOW_LIGHTWEIGHT(_STATS))
+00 01 # flags (REPLY_MORE)
+00 00 00 00 # pad
+00 38 # length
+00 00 # pad
+01 # table_id
+00 # reason (OFPFSR_STATS_REQUEST)
+00 01 # priority
+00 01 # match.type
+00 10 # match.length
+80 00 01 08 # match.oxm_list[0].type_len - IN_PORT
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+00 00 # match.pad
+00 1c # stats.length
+80 02 00 08 # stats.oxs_list[0].type_len - DURATION
+00 00 00 00 00 00 00 04 # stats.oxs_list[0].value
+80 02 02 08 # stats.oxs_list[1].type_len - IDLE_TIME (02 -> 0000 0010 -> oxs_field width 7, oxs_reserved width 1)
+00 00 00 00 00 00 00 06 # stats.oxs_list[1].value
+00 00 00 00 # stats.pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setEntries(ImmutableList.<OFFlowLightweightStatsEntry>of(factory.buildFlowLightweightStatsEntry().setTableId(TableId.of(1))
+                                                                .setReason(OFFlowStatsReason.STATS_REQUEST)
+                                                                .setPriority(1)
+                                                                .setMatch(factory.buildMatch()
+                                                                                .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+                                                                                .build())
+                                                                .setStats(factory.buildStatV6()
+                                                                                .setOxsFields(OFOxsList.of(factory.oxss().buildDuration().setValue(U64.of(4)).build(),
+                                                                                factory.oxss().buildIdleTime().setValue(U64.of(6)).build()))
+                                                                                .build())
+                                                                .build()))
+        .build();
diff --git a/test_data/of15/flow_lightweight_stats_request.data b/test_data/of15/flow_lightweight_stats_request.data
new file mode 100644
index 0000000..4a9b959
--- /dev/null
+++ b/test_data/of15/flow_lightweight_stats_request.data
@@ -0,0 +1,33 @@
+-- binary
+06 12 # version, type
+00 40 # length
+12 34 56 78 # xid
+00 11 # multipart message type (OFPMP_FLOW_LIGHTWEIGHT(_STATS))
+00 01 # flags (REQ_MORE)
+00 00 00 00 # pad
+01 # tableId
+00 00 00 # pad
+00 00 00 04 # out_port
+00 00 00 01 # out_group
+00 00 00 00 # pad
+fe dc ba 98 76 54 32 10 # cookie
+ff 00 ff 00 ff 00 ff 00 # cookie_mask
+00 01 # match.type
+00 10 # match.length
+80 00 01 08 # match.oxm_list[0].type_len - IN_PORT
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .setTableId(TableId.of(1))
+        .setOutPort(OFPort.of(4))
+        .setOutGroup(OFGroup.of(1))
+        .setCookie(U64.parseHex("FEDCBA9876543210"))
+        .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+        .setMatch(factory.buildMatch()
+                        .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+                        .build())
+        .build()
diff --git a/test_data/of15/flow_mod_failed_error_msg.data b/test_data/of15/flow_mod_failed_error_msg.data
new file mode 100644
index 0000000..0eda424
--- /dev/null
+++ b/test_data/of15/flow_mod_failed_error_msg.data
@@ -0,0 +1,12 @@
+-- binary
+06 01 # version / type
+00 0f # length
+12 34 56 78 # xid
+00 05 # err_type
+00 01 # code
+61 62 63 # data
+-- java
+builder
+        .setXid(0x12345678)
+        .setCode(OFFlowModFailedCode.TABLE_FULL)
+        .setData(OFErrorCauseData.of(new byte[] { 0x61, 0x62, 0x63 }, OFVersion.OF_15));
\ No newline at end of file
diff --git a/test_data/of15/flow_modify.data b/test_data/of15/flow_modify.data
new file mode 100644
index 0000000..2a3acd2
--- /dev/null
+++ b/test_data/of15/flow_modify.data
@@ -0,0 +1,79 @@
+-- binary
+06 0e # version, type
+00 80 # length
+12 34 56 78 # xid
+
+fe dc ba 98 76 54 32 10 # cookie
+
+ff 00 ff 00 ff 00 ff 00 # cookie_mask
+
+03 # table_id
+01 # _command
+00 05 # idle_timeout
+00 0a # hard_timeout
+17 70 # priority
+
+00 00 00 32 # buffer_id
+00 00 00 06 # out_port
+
+00 00 00 08 # out_group
+00 00 # flags
+00 00 # importance
+
+00 01 # match.type
+00 3F # match.length # 59 bytes OXMs + 4 bytes match header
+
+80 00 01 08 # match.oxm_list[0].type_len - IN_PORT
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+
+80 00 0A 02 # match.oxm_list[1].type_len - ETH_TYPE
+86 DD # match.oxm_list[1].value - ETH_TYPE = IPv6
+
+80 00 14 01 # match.oxm_list[2].type_len - IP Proto
+06 # match.oxm_list[2].value = IP_PROTO = TCP
+
+80 00 35 20 # match.oxm_list[3].type_len - IPV6_SRC
+1C CA FE 1C B1 10 1C 00 00 28 00 00 00 00 00 00 # match.oxm_list[3].value
+FF FF FF FF FF F0 FF FF 1C 2C 3C 00 00 00 00 00 # match.oxm_list[3].mask
+
+00 # match.pad
+
+00 01 # instructions[0].type
+00 08 # instructions[0].length
+04 # instructions[0].table_id
+00 00 00 # pad
+
+00 01 # instructions[1].type
+00 08 # instructions[1].length
+07 # instructions[1].table_id
+00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setCookie(U64.parseHex("FEDCBA9876543210"))
+        .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+        .setTableId(TableId.of(3))
+        .setIdleTimeout(5)
+        .setHardTimeout(10)
+        .setPriority(6000)
+        .setBufferId(OFBufferId.of(50))
+        .setOutPort(OFPort.of(6))
+        .setOutGroup(OFGroup.of(8))
+        .setFlags(ImmutableSet.<OFFlowModFlags>of())
+        .setMatch(
+            factory.buildMatch()
+                .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+                .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+                .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+                .setMasked(MatchField.IPV6_SRC,
+                        IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+                        IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+            .build()
+        )
+        .setInstructions(
+            ImmutableList.<OFInstruction>of(
+                factory.instructions().gotoTable(TableId.of(4)),
+                factory.instructions().gotoTable(TableId.of(7))
+            )
+        );
\ No newline at end of file
diff --git a/test_data/of15/flow_modify_strict.data b/test_data/of15/flow_modify_strict.data
new file mode 100644
index 0000000..06c683b
--- /dev/null
+++ b/test_data/of15/flow_modify_strict.data
@@ -0,0 +1,79 @@
+-- binary
+06 0e # version, type
+00 80 # length
+12 34 56 78 # xid
+
+fe dc ba 98 76 54 32 10 # cookie
+
+ff 00 ff 00 ff 00 ff 00 # cookie_mask
+
+03 # table_id
+02 # _command
+00 05 # idle_timeout
+00 0a # hard_timeout
+17 70 # priority
+
+00 00 00 32 # buffer_id
+00 00 00 06 # out_port
+
+00 00 00 08 # out_group
+00 00 # flags
+00 00 # importance
+
+00 01 # match.type
+00 3F # match.length # 59 bytes OXMs + 4 bytes match header
+
+80 00 01 08 # match.oxm_list[0].type_len - IN_PORT
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+
+80 00 0A 02 # match.oxm_list[1].type_len - ETH_TYPE
+86 DD # match.oxm_list[1].value - ETH_TYPE = IPv6
+
+80 00 14 01 # match.oxm_list[2].type_len - IP Proto
+06 # match.oxm_list[2].value = IP_PROTO = TCP
+
+80 00 35 20 # match.oxm_list[3].type_len - IPV6_SRC
+1C CA FE 1C B1 10 1C 00 00 28 00 00 00 00 00 00 # match.oxm_list[3].value
+FF FF FF FF FF F0 FF FF 1C 2C 3C 00 00 00 00 00 # match.oxm_list[3].mask
+
+00 # match.pad
+
+00 01 # instructions[0].type
+00 08 # instructions[0].length
+04 # instructions[0].table_id
+00 00 00 # pad
+
+00 01 # instructions[1].type
+00 08 # instructions[1].length
+07 # instructions[1].table_id
+00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setCookie(U64.parseHex("FEDCBA9876543210"))
+        .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+        .setTableId(TableId.of(3))
+        .setIdleTimeout(5)
+        .setHardTimeout(10)
+        .setPriority(6000)
+        .setBufferId(OFBufferId.of(50))
+        .setOutPort(OFPort.of(6))
+        .setOutGroup(OFGroup.of(8))
+        .setFlags(ImmutableSet.<OFFlowModFlags>of())
+        .setMatch(
+            factory.buildMatch()
+                .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+                .setExact(MatchField.ETH_TYPE, EthType.IPv6)
+                .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
+                .setMasked(MatchField.IPV6_SRC,
+                       IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
+                       IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
+            .build()
+        )
+        .setInstructions(
+            ImmutableList.<OFInstruction>of(
+                factory.instructions().gotoTable(TableId.of(4)),
+                factory.instructions().gotoTable(TableId.of(7))
+            )
+        );
diff --git a/test_data/of15/flow_monitor_reply.data b/test_data/of15/flow_monitor_reply.data
new file mode 100644
index 0000000..8c18850
--- /dev/null
+++ b/test_data/of15/flow_monitor_reply.data
@@ -0,0 +1,15 @@
+-- binary
+06 13 # version, type
+00 14 # length
+12 34 56 78 # xid
+00 10 # multipart message type (OFPMP_FLOW_MONITOR)
+00 01 # flags (OFPMPF_REPLY_MORE)
+00 00 00 00 # pad
+00 04 # length
+00 01 # event
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setEntries(ImmutableList.<OFFlowMonitorReplyEntry>of(factory.buildFlowMonitorReplyEntry().setEvent(OFFlowUpdateEvent.ADDED).build()))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/flow_monitor_request.data b/test_data/of15/flow_monitor_request.data
new file mode 100644
index 0000000..66258f9
--- /dev/null
+++ b/test_data/of15/flow_monitor_request.data
@@ -0,0 +1,33 @@
+-- binary
+06 12 # version, type
+00 30 # length
+12 34 56 78 # xid
+00 10 # multipart message type (OFPMP_FLOW_MONITOR)
+00 01 # flags
+00 00 00 00 # pad
+00 00 00 01 # monitor_id
+00 00 00 01 # out_port
+00 00 00 01 # out_group
+00 01 # flags (INITIAL)
+01 # table_id
+00 # command (ADD)
+00 01 # match.type
+00 10 # match.length
+80 00 01 08 # match.oxm_list[0].type_len - IN_PORT
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .setEntries(ImmutableList.<OFFlowMonitorEntry>of(factory.buildFlowMonitorEntry().setMonitorId(1)
+                                                                                        .setOutPort(1)
+                                                                                        .setOutGroup(1)
+                                                                                        .setFlags(ImmutableSet.<OFFlowMonitorFlags>of(OFFlowMonitorFlags.INITIAL))
+                                                                                        .setTableId(TableId.of(1))
+                                                                                        .setCommand(OFFlowMonitorCommand.ADD)
+                                                                                        .setMatch(factory.buildMatch()
+                                                                                                            .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+                                                                                                            .build())
+                                                                                        .build()))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/flow_removed.data b/test_data/of15/flow_removed.data
new file mode 100644
index 0000000..6c6d872
--- /dev/null
+++ b/test_data/of15/flow_removed.data
@@ -0,0 +1,44 @@
+-- binary
+06 0b # version, type
+00 48 # length
+12 34 56 78 # xid
+14 # table_id
+02 # reason
+42 68 # priority
+00 05 # idle_timeout
+00 1e # hard_timeout
+fe dc ba 98 76 54 32 10 # cookie
+00 01 # match.type
+00 10 # match.length
+80 00 01 08 # match.oxm_list[0].type_len - IN_PORT
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+00 00 # match.pad
+00 1c # stats.length
+80 02 00 08 # stats.oxs_list[0].type_len - DURATION
+00 00 00 00 00 00 00 04 # stats.oxs_list[0].value
+80 02 02 08 # stats.oxs_list[1].type_len - IDLE_TIME (02 -> 0000 0010 -> oxs_field width 7, oxs_reserved width 1)
+00 00 00 00 00 00 00 06 # stats.oxs_list[1].value
+00 00 00 00 # stats.pad
+--java
+builder
+        .setXid(0x12345678)
+        .setTableId(TableId.of(20))
+        .setReason(OFFlowRemovedReason.DELETE)
+        .setPriority(17000)
+        .setIdleTimeout(5)
+        .setHardTimeout(30)
+        .setCookie(U64.parseHex("FEDCBA9876543210"))
+        .setMatch(
+            factory.buildMatch()
+                .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+                .build())
+        .setStats(
+            factory.buildStatV6()
+                .setOxsFields(OFOxsList.of(factory.oxss().buildDuration().setValue(U64.of(4)).build(),
+                                            factory.oxss().buildIdleTime().setValue(U64.of(6)).build()))
+                .build())
+        .build()
+
+
+
diff --git a/test_data/of15/flow_stats_reply.data b/test_data/of15/flow_stats_reply.data
new file mode 100644
index 0000000..b4c45e5
--- /dev/null
+++ b/test_data/of15/flow_stats_reply.data
@@ -0,0 +1,68 @@
+-- binary
+06 13 # version, type
+00 68 # length
+12 34 56 78 # xid
+00 01 # multipart message type (OFPMP_FLOW_DESC) -- old name is OFPMP_FLOW for spec 1.3.1, 1.4.0, 1.4.1
+00 01 # flags
+00 00 00 00 # pad
+
+00 58 # length
+00 00 # pad
+01 # table_id
+00 # pad
+00 01 # priority
+00 10 # idle_timeout
+00 60 # hard_timeout
+00 01 # flags (OFPFF_SEND_FLOW_REM) Send flow removed message when flow expires or is deleted
+00 01 # importance
+fe dc ba 98 76 54 32 10 # cookie
+
+00 01 # match.type
+00 10 # match.length
+80 00 01 08 # match.oxm_list[0].type_len - IN_PORT
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+00 00 # match.pad
+
+
+00 1c # stats.length
+80 02 00 08 # stats.oxs_list[0].type_len - DURATION
+00 00 00 00 00 00 00 04 # stats.oxs_list[0].value
+80 02 02 08 # stats.oxs_list[1].type_len - IDLE_TIME (8002 -> Openflow_basic oxs class and 02 -> 0000 0010 -> oxs_field width 7, oxs_reserved width 1 and 08 is length)
+00 00 00 00 00 00 00 06 # stats.oxs_list[1].value
+00 00 00 00 # stats.pad
+
+00 01 # instructions[0].type
+00 08 # instructions[0].length
+04 # instructions[0].table_id
+00 00 00 # pad
+
+00 01 # instructions[1].type
+00 08 # instructions[1].length
+07 # instructions[1].table_id
+00 00 00 # pad
+
+--java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setEntries(ImmutableList.<OFFlowStatsEntry>of(
+                        factory.buildFlowStatsEntry().setTableId(TableId.of(1))
+                                                    .setPriority(1)
+                                                    .setIdleTimeout(16)
+                                                    .setHardTimeout(96)
+                                                    .setFlags(ImmutableSet.<OFFlowModFlags>of(OFFlowModFlags.SEND_FLOW_REM))
+                                                    .setImportance(1)
+                                                    .setCookie(U64.parseHex("FEDCBA9876543210"))
+                                                    .setMatch(factory.buildMatch()
+                                                        .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+                                                        .build())
+                                                    .setStats(factory.buildStatV6()
+                                                        .setOxsFields(OFOxsList.of(factory.oxss().buildDuration().setValue(U64.of(4)).build(),
+                                                                                    factory.oxss().buildIdleTime().setValue(U64.of(6)).build()))
+                                                        .build())
+                                                    .setInstructions(ImmutableList.<OFInstruction>of(
+                                                                                    factory.instructions().gotoTable(TableId.of(4)),
+                                                                                    factory.instructions().gotoTable(TableId.of(7))))
+                                                    .build() ))
+        .build()
diff --git a/test_data/of15/flow_stats_request.data b/test_data/of15/flow_stats_request.data
new file mode 100644
index 0000000..82dd464
--- /dev/null
+++ b/test_data/of15/flow_stats_request.data
@@ -0,0 +1,34 @@
+-- binary
+06 12 # version, type
+00 40 # length
+12 34 56 78 # xid
+00 01 # multipart message type (OFPMP_FLOW(_DESC))
+00 01 # flags
+00 00 00 00 # pad
+01 # tableId
+00 00 00 # pad
+00 00 00 04 # out_port
+00 00 00 01 # out_group
+00 00 00 00 # pad
+fe dc ba 98 76 54 32 10 # cookie
+ff 00 ff 00 ff 00 ff 00 # cookie_mask
+00 01 # match.type
+00 10 # match.length
+80 00 01 08 # match.oxm_list[0].type_len - IN_PORT
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .setTableId(TableId.of(1))
+        .setOutPort(OFPort.of(4))
+        .setOutGroup(OFGroup.of(1))
+        .setCookie(U64.parseHex("FEDCBA9876543210"))
+        .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
+        .setMatch(
+        factory.buildMatch()
+            .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+            .build())
+        .build()
diff --git a/test_data/of15/get_config_reply.data b/test_data/of15/get_config_reply.data
new file mode 100644
index 0000000..37b7481
--- /dev/null
+++ b/test_data/of15/get_config_reply.data
@@ -0,0 +1,12 @@
+-- binary
+06 08 # version, type
+00 0c # length
+12 34 56 78 # xid
+00 02 # flags
+ff ff # miss_send_len
+--java
+builder
+        .setXid(0x12345678)
+        .setFlags(Sets.immutableEnumSet(OFConfigFlags.FRAG_REASM))
+        .setMissSendLen(0xffff)
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/get_config_request.data b/test_data/of15/get_config_request.data
new file mode 100644
index 0000000..25b54b1
--- /dev/null
+++ b/test_data/of15/get_config_request.data
@@ -0,0 +1,6 @@
+--binary
+06 07 # version, type
+00 08 # length
+12 34 56 78 # xid
+--java
+builder.setXid(0x12345678).build()
\ No newline at end of file
diff --git a/test_data/of15/group_add.data b/test_data/of15/group_add.data
new file mode 100644
index 0000000..7cd2472
--- /dev/null
+++ b/test_data/of15/group_add.data
@@ -0,0 +1,47 @@
+-- binary
+06 0f # version, type
+00 40 # length
+12 34 56 78 # xid
+00 00 # command (OFPGC_ADD)
+01 # type (OFPGT_SELECT)
+00 # pad
+00 00 00 01 # group_id
+00 28 # bucket_array_len
+00 00 # pad
+ff ff ff 00 # command_bucket_id (BUCKET_MAX) -- not applicable to OFPGC_ADD command, so could be any value really
+
+00 28 # len of this bucket including header, properties, and any end pad
+00 18 # len of this bucket's actions array
+ff ff ff fd # bucket_id of this bucket (fd == first bucket in list)
+
+00 00 # ofp_action[0].type (OFPAT_OUTPUT)
+00 10 # ofp_action[0].len
+00 00 00 01 # port
+00 03 # max_len
+00 00 00 00 00 00 # pad
+
+00 16 # of_action[1].type (OFPAT_GROUP)
+00 08 # of_action[1].length
+00 00 00 01 # group_id
+
+00 00 # group bucket property header prop_type == SELECT
+00 08 # length of SELECT prop_type
+00 00 # default weight of SELECT group
+00 00 # pad to 8 bytes
+
+-- java
+builder
+        .setXid(0x12345678)
+        .setGroupType(OFGroupType.SELECT)
+        .setGroup(OFGroup.of(1))
+        .setCommandBucketId(OFGroupBucket.BUCKET_MAX)
+        .setBuckets(ImmutableList.<OFBucket>of(factory.buildBucket()
+                    .setBucketId(OFGroupBucket.BUCKET_FIRST)
+                    .setActions(ImmutableList.<OFAction>of(
+                        factory.actions().output(OFPort.of(1),3),
+                        factory.actions().group(OFGroup.of(1))))
+                    .setProperties(ImmutableList.<OFGroupBucketProp>of(factory.buildGroupBucketPropWeight()
+                                                            .setWeight(0)
+                                                            .build()))
+                    .build()))
+
diff --git a/test_data/of15/group_desc_stats_reply.data b/test_data/of15/group_desc_stats_reply.data
new file mode 100644
index 0000000..121f121
--- /dev/null
+++ b/test_data/of15/group_desc_stats_reply.data
@@ -0,0 +1,46 @@
+-- binary
+06 13 # version, type
+00 40 # length
+12 34 56 78 # xid
+00 07 # multipart message type (OFPMP_GROUP_DESC)
+00 01 # flags (OFPMPF_REPLY_MORE)
+00 00 00 00 # pad
+
+00 30 # length
+00 # type
+00 # pad
+00 00 00 01 # group_id
+00 20 # bucket_array_len
+00 00 00 00 00 00 # pad
+
+00 20 # bucket_len
+00 18 # action_array_len
+ff ff ff fd # bucket_id
+
+00 00 # ofp_action[0].type (OFPAT_OUTPUT)
+00 10 # ofp_action[0].length
+00 00 00 01 # port
+00 03 # max_len
+00 00 00 00 00 00 # pad
+
+00 16 # ofp_action[0].type (OFPAT_GROUP)
+00 08 # ofp_action[0].length
+00 00 00 01 # group_id
+
+# no group_bucket_properties after this, since it's an ALL group
+
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setEntries(ImmutableList.<OFGroupDescStatsEntry>of(factory.buildGroupDescStatsEntry()
+            .setGroupType(OFGroupType.ALL)
+            .setGroup(OFGroup.of(1))
+            .setBuckets(ImmutableList.<OFBucket>of(factory.buildBucket()
+                    .setBucketId(OFGroupBucket.BUCKET_FIRST)
+                    .setActions(ImmutableList.<OFAction>of(
+                                factory.actions().output(OFPort.of(1),3),
+                                factory.actions().group(OFGroup.of(1))))
+                    .build()))
+            .build()))
+
diff --git a/test_data/of15/group_desc_stats_request.data b/test_data/of15/group_desc_stats_request.data
new file mode 100644
index 0000000..6b67f76
--- /dev/null
+++ b/test_data/of15/group_desc_stats_request.data
@@ -0,0 +1,15 @@
+-- binary
+06 12 # version, type
+00 18 # length
+12 34 56 78 # xid
+00 07 # multipart message type (OFPMP_GROUP_DESC)
+00 01 # flags
+00 00 00 00 # pad
+00 00 00 01 # group_id
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .setGroup(OFGroup.of(1))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/group_features_stats_reply.data b/test_data/of15/group_features_stats_reply.data
new file mode 100644
index 0000000..d405c1a
--- /dev/null
+++ b/test_data/of15/group_features_stats_reply.data
@@ -0,0 +1,32 @@
+-- binary
+06 13 # version, type
+00 38 # length
+12 34 56 78 # xid
+00 08 # multipart message type (OFPMP_GROUP_FEATURES)
+00 01 # flags (OFPMPF_REPLY_MORE)
+00 00 00 00 # pad
+00 00 00 00 # types (ALL)
+00 00 00 04 # capabilities (CHAINING)
+00 00 00 05 # max_groups_all
+00 00 00 00 # max_groups_select
+00 00 00 00 # max_groups_indirect
+00 00 00 00 # max_groups_ff
+00 00 00 08 # actions_all
+00 00 00 00 # actions_select
+00 00 00 00 # actions_indirect
+00 00 00 00 # actions_ff
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setTypes(0)
+        .setCapabilities(ImmutableSet.<OFGroupCapabilities>of(OFGroupCapabilities.CHAINING))
+        .setMaxGroupsAll(5)
+        .setMaxGroupsSelect(0)
+        .setMaxGroupsIndirect(0)
+        .setMaxGroupsFf(0)
+        .setActionsAll(8)
+        .setActionsSelect(0)
+        .setActionsIndirect(0)
+        .setActionsFf(0)
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/group_features_stats_request.data b/test_data/of15/group_features_stats_request.data
new file mode 100644
index 0000000..a7785b1
--- /dev/null
+++ b/test_data/of15/group_features_stats_request.data
@@ -0,0 +1,12 @@
+-- binary
+06 12 # version, type
+00 10 # length
+12 34 56 78 # xid
+00 08 # multipart message type (OFPMP_GROUP_FEATURES)
+00 01 # flags
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/group_stats_reply.data b/test_data/of15/group_stats_reply.data
new file mode 100644
index 0000000..7fae6c3
--- /dev/null
+++ b/test_data/of15/group_stats_reply.data
@@ -0,0 +1,40 @@
+-- binary
+06 13 # version, type
+00 58 # length
+12 34 56 78 # xid
+00 06 # multipart message type (OFPMP_GROUP_STATS)
+00 01 # flags (OFPMPF_REPLY_MORE)
+00 00 00 00 # pad
+00 48 # length
+00 00 # pad
+00 00 00 01 # group_id
+00 00 00 01 # ref_count
+00 00 00 00 # pad
+00 00 00 00 00 00 00 07 # packet_count
+00 00 00 00 00 00 00 12 # byte_count
+00 00 00 03 # duration_sec
+b2 d0 5e 00 # duration_nsec
+00 00 00 00 00 00 00 07 # bucket_counter[0].packet_count
+00 00 00 00 00 00 00 0c # bucket_counter[0].byte_count
+00 00 00 00 00 00 00 03 # bucket_counter[1].packet_count
+00 00 00 00 00 00 00 0a # bucket_counter[1].byte_count
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setEntries(ImmutableList.<OFGroupStatsEntry>of(factory.buildGroupStatsEntry().setGroup(OFGroup.of(1))
+                                                                                    .setRefCount(1)
+                                                                                    .setPacketCount(U64.of(7))
+                                                                                    .setByteCount(U64.of(18))
+                                                                                    .setDurationSec(3)
+                                                                                    .setDurationNsec(3000000000L)
+                                                                                    .setBucketStats(ImmutableList.<OFBucketCounter>of(
+                                                                                                                                    factory.buildBucketCounter().setPacketCount(U64.of(7))
+                                                                                                                                                                .setByteCount(U64.of(12))
+                                                                                                                                                                .build(),
+                                                                                                                                    factory.buildBucketCounter().setPacketCount(U64.of(3))
+                                                                                                                                                                .setByteCount(U64.of(10))
+                                                                                                                                                                .build()))
+                                                                                    .build()))
+
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/group_stats_request.data b/test_data/of15/group_stats_request.data
new file mode 100644
index 0000000..b2b20df
--- /dev/null
+++ b/test_data/of15/group_stats_request.data
@@ -0,0 +1,15 @@
+-- binary
+06 12 # version, type
+00 18 # length
+12 34 56 78 # xid
+00 06 # multipart message type (OFPMP_GROUP_STATS)
+00 01 # flags
+00 00 00 00 # pad
+00 00 00 01 # group_id
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .setGroup(OFGroup.of(1))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/hello.data b/test_data/of15/hello.data
new file mode 100644
index 0000000..f682edf
--- /dev/null
+++ b/test_data/of15/hello.data
@@ -0,0 +1,19 @@
+-- binary
+06 00 # version, type
+00 20 # length
+12 34 56 78 # xid
+00 01 # elements[0].type
+00 0c # elements[0].length
+00 00 00 01 # elements[0].bitmaps[0]
+00 00 00 02 # elements[0].bitmaps[1]
+00 01 # elements[1].type
+00 0c # elements[1].length
+00 00 00 03 # elements[1].bitmaps[0]
+00 00 00 04 # elements[1].bitmaps[1]
+--java
+builder
+        .setXid(0x12345678)
+        .setElements(ImmutableList.<OFHelloElem>of(
+                factory.buildHelloElemVersionbitmap().setBitmaps(ImmutableList.<U32>of(U32.of(1),U32.of(2))).build(),
+                factory.buildHelloElemVersionbitmap().setBitmaps(ImmutableList.<U32>of(U32.of(3),U32.of(4))).build()))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/hello_elem_versionbitmap.data b/test_data/of15/hello_elem_versionbitmap.data
new file mode 100644
index 0000000..262fedf
--- /dev/null
+++ b/test_data/of15/hello_elem_versionbitmap.data
@@ -0,0 +1,7 @@
+-- binary
+00 01 # type
+00 0c # length
+01 23 45 67 # bitmaps[0]
+89 ab cd ef # bitmaps[1]
+--java
+builder.setBitmaps(ImmutableList.<U32>of(U32.of(0x01234567),U32.of(0x89abcdef))).build()
\ No newline at end of file
diff --git a/test_data/of15/hello_failed_error_msg.data b/test_data/of15/hello_failed_error_msg.data
new file mode 100644
index 0000000..1bc6658
--- /dev/null
+++ b/test_data/of15/hello_failed_error_msg.data
@@ -0,0 +1,12 @@
+-- binary
+06 01 # version / type
+00 0f # length
+12 34 56 78 # xid
+00 00 # err_type
+00 00 # code
+61 62 63 # data
+-- java
+builder
+        .setXid(0x12345678)
+        .setCode(OFHelloFailedCode.INCOMPATIBLE)
+        .setData(OFErrorCauseData.of(new byte[] { 0x61, 0x62, 0x63 }, OFVersion.OF_15));
\ No newline at end of file
diff --git a/test_data/of15/instruction_apply_actions.data b/test_data/of15/instruction_apply_actions.data
new file mode 100644
index 0000000..22c0136
--- /dev/null
+++ b/test_data/of15/instruction_apply_actions.data
@@ -0,0 +1,10 @@
+-- binary
+00 04 # type
+00 10 # length
+00 00 00 00 # pad
+00 0c # actions[0].type (OFPAT_COPY_TTL_IN)
+00 08 # actions[0].length
+00 00 00 00 # pad
+-- java
+OFActions actions = OFFactories.getFactory(OFVersion.OF_15).actions();
+builder.setActions(ImmutableList.<OFAction>of(actions.copyTtlIn()))
\ No newline at end of file
diff --git a/test_data/of15/instruction_goto_table.data b/test_data/of15/instruction_goto_table.data
new file mode 100644
index 0000000..88a6fc9
--- /dev/null
+++ b/test_data/of15/instruction_goto_table.data
@@ -0,0 +1,7 @@
+-- binary
+00 01 # type
+00 08 # length
+05 # table_id
+00 00 00 # pad
+-- java
+builder.setTableId(TableId.of(5)).build()
\ No newline at end of file
diff --git a/test_data/of15/instruction_stat_trigger.data b/test_data/of15/instruction_stat_trigger.data
new file mode 100644
index 0000000..3057b66
--- /dev/null
+++ b/test_data/of15/instruction_stat_trigger.data
@@ -0,0 +1,13 @@
+-- binary
+00 07 # type
+00 20 # length
+00 00 00 01 # flags (OFPSTF_PERIODIC)
+80 02 00 08 # stats.oxs_list[0].type_len - DURATION
+00 00 00 00 00 00 00 04 # stats.oxs_list[0].value
+80 02 02 08 # stats.oxs_list[1].type_len - IDLE_TIME (02 -> 0000 0010 -> oxs_field width 7, oxs_reserved width 1)
+00 00 00 00 00 00 00 06 # stats.oxs_list[1].value
+-- java
+builder
+        .setFlags(ImmutableSet.<OFStatTriggerFlags>of(OFStatTriggerFlags.PERIODIC))
+        .setThresholds(OFOxsList.of(OFFactories.getFactory(OFVersion.OF_15).oxss().buildDuration().setValue(U64.of(4)).build(),
+                        OFFactories.getFactory(OFVersion.OF_15).oxss().buildIdleTime().setValue(U64.of(6)).build()))
diff --git a/test_data/of15/instruction_write_actions.data b/test_data/of15/instruction_write_actions.data
new file mode 100644
index 0000000..e2290d9
--- /dev/null
+++ b/test_data/of15/instruction_write_actions.data
@@ -0,0 +1,10 @@
+-- binary
+00 03 # type
+00 10 # length
+00 00 00 00 # pad
+00 0b # actions[0].type (OFPAT_COPY_TTL_OUT)
+00 08 # actions[0].length
+00 00 00 00 # pad
+-- java
+OFActions actions = OFFactories.getFactory(OFVersion.OF_15).actions();
+builder.setActions(ImmutableList.<OFAction>of(actions.copyTtlOut()))
\ No newline at end of file
diff --git a/test_data/of15/instruction_write_metadata.data b/test_data/of15/instruction_write_metadata.data
new file mode 100644
index 0000000..44d9bcb
--- /dev/null
+++ b/test_data/of15/instruction_write_metadata.data
@@ -0,0 +1,8 @@
+-- binary
+00 02 # type
+00 18 # len
+00 00 00 00 # pad
+00 00 00 00 00 00 0a bc # metadata
+00 00 00 00 00 00 0a bc # metadata_mask
+-- java
+builder.setMetadata(U64.parseHex("abc")).setMetadataMask(U64.parseHex("abc"))
\ No newline at end of file
diff --git a/test_data/of15/match_v3.data b/test_data/of15/match_v3.data
new file mode 100644
index 0000000..1660a7f
--- /dev/null
+++ b/test_data/of15/match_v3.data
@@ -0,0 +1,25 @@
+-- binary
+00 01 # type
+00 3C # length
+80 00 # oxm_list[0].class
+05 10 # oxm_list[0].type_len - METADATA
+FE DC BA 98 12 14 12 10 # oxm_list[0].value
+FF FF FF FF 12 34 56 78 # oxm_list[0].mask
+80 00 # oxm_list[1].class
+08 06 # oxm_list[1].type_len - ETH_SRC
+01 02 03 04 05 06 # oxm_list[1].value
+80 00 # oxm_list[2].class
+20 02 # oxm_list[2].type_len - UDP_DST
+00 35 # oxm_list[2].value
+80 00 # oxm_list[3].class
+36 10 # oxm_list[4].type_len - IPV6_DST
+12 12 12 12 12 12 12 12 # oxm_list[4].value
+12 12 12 12 12 12 12 12 # ...
+00 00 00 00 # pad
+-- java
+builder
+        .setMasked(MatchField.METADATA, OFMetadata.ofRaw(0xFEDCBA9812141210l), OFMetadata.ofRaw(0xFFFFFFFF12345678l))
+        .setExact(MatchField.ETH_SRC, MacAddress.of(new byte[] {1,2,3,4,5,6}))
+        .setExact(MatchField.UDP_DST, TransportPort.of(53))
+        .setExact(MatchField.IPV6_DST, IPv6Address.of(new byte[] { 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12,
+                                                                  0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12 }))
\ No newline at end of file
diff --git a/test_data/of15/meter_config_stats_reply.data b/test_data/of15/meter_config_stats_reply.data
new file mode 100644
index 0000000..5aa61da
--- /dev/null
+++ b/test_data/of15/meter_config_stats_reply.data
@@ -0,0 +1,28 @@
+-- binary
+06 13 # version, type
+00 28 # length
+12 34 56 78 # xid
+00 0a # multipart message type (OFPMP_METER_DESC)
+00 01 # flags (OFPMPF_REPLY_MORE)
+00 00 00 00 # pad
+00 18 # length
+00 01 # flags (OFPMF_KBPS)
+00 00 00 01 # meter_id
+00 01 # meter_band[0].type (OFPMBT_DROP)
+00 10 # meter_band[0].len
+00 00 00 01 # meter_band[0].rate
+00 00 00 02 # meter_band[0].burst_size
+00 00 00 00 # pad
+
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setEntries(ImmutableList.<OFMeterConfig>of(factory.buildMeterConfig().setFlags(ImmutableSet.<OFMeterFlags>of(OFMeterFlags.KBPS))
+                                                                            .setMeterId(1)
+                                                                            .setEntries(ImmutableList.<OFMeterBand>of(factory.meterBands().buildDrop().setRate(1)
+                                                                                                                                                    .setBurstSize(2)
+                                                                                                                                                    .build()))
+                                                    .build()))
+
+        .build();
\ No newline at end of file
diff --git a/test_data/of15/meter_config_stats_request.data b/test_data/of15/meter_config_stats_request.data
new file mode 100644
index 0000000..220e530
--- /dev/null
+++ b/test_data/of15/meter_config_stats_request.data
@@ -0,0 +1,15 @@
+-- binary
+06 12 # version, type
+00 18 # length
+12 34 56 78 # xid
+00 0a # multipart message type (OFPMP_METER_DESC)
+00 01 # flags
+00 00 00 00 # pad
+00 00 00 01 # meterId
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .setMeterId(1L)
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/meter_features_stats_request.data b/test_data/of15/meter_features_stats_request.data
new file mode 100644
index 0000000..b111e3a
--- /dev/null
+++ b/test_data/of15/meter_features_stats_request.data
@@ -0,0 +1,12 @@
+-- binary
+06 12 # version, type
+00 10 # length
+12 34 56 78 # xid
+00 0b # multipart message type (OFPMP_METER_FEATURES)
+00 01 # flags
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/meter_mod.data b/test_data/of15/meter_mod.data
new file mode 100644
index 0000000..87a079f
--- /dev/null
+++ b/test_data/of15/meter_mod.data
@@ -0,0 +1,20 @@
+-- binary
+06 1d # version, type
+00 20 # length
+12 34 56 78 # xid
+00 00 # command (OFPMC_ADD)
+00 01 # flags (OFPMF_KBPS)
+00 00 00 01 # meter_id
+00 01 # bands[0].type (OFPMBT_DROP)
+00 10 # bands[0].length
+00 00 00 01 # bands[0].rate
+00 00 00 02 # bands[0].burst_size
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setCommand(OFMeterModCommand.ADD)
+        .setFlags(ImmutableSet.<OFMeterFlags>of(OFMeterFlags.KBPS))
+        .setMeterId(1)
+        .setBands(ImmutableList.<OFMeterBand>of(factory.meterBands().buildDrop().setRate(1).setBurstSize(2).build()))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/meter_stats_reply.data b/test_data/of15/meter_stats_reply.data
new file mode 100644
index 0000000..18cc3d8
--- /dev/null
+++ b/test_data/of15/meter_stats_reply.data
@@ -0,0 +1,39 @@
+--binary
+06 13 # version, type
+00 58 # length
+12 34 56 78 # xid
+00 09 # multipart message type (OFPMP_METER_DESC)
+00 01 # flags (OFPMPF_REPLY_MORE)
+00 00 00 00 # pad
+00 00 00 01 # meter_id
+00 48 # len
+00 00 00 00 00 00 # pad
+00 00 00 01 # ref_count
+00 00 00 00 00 00 00 0a # packet_in_count
+00 00 00 00 00 00 00 0a # byte_in_count
+00 00 00 03 # duration_sec
+b2 d0 5e 00 # duration_nsec
+00 00 00 00 00 00 00 0a # band_stats[0].packet_band_count
+00 00 00 00 00 00 00 0b # band_stats[0].byte_band_count
+00 00 00 00 00 00 00 0c # band_stats[1].packet_band_count
+00 00 00 00 00 00 00 0d # band_stats[1].byte_band_count
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setEntries(ImmutableList.<OFMeterStats>of(factory.buildMeterStats().setMeterId(1)
+                                                                            .setRefCount(1)
+                                                                            .setPacketInCount(U64.of(10))
+                                                                            .setByteInCount(U64.of(10))
+                                                                            .setDurationSec(3)
+                                                                            .setDurationNsec(3000000000L)
+                                                                            .setBandStats(ImmutableList.<OFMeterBandStats>of(factory.buildMeterBandStats().setPacketBandCount(U64.of(10))
+                                                                                                                                                            .setByteBandCount(U64.of(11))
+                                                                                                                                                            .build(),
+                                                                                                                            factory.buildMeterBandStats().setPacketBandCount(U64.of(12))
+                                                                                                                                                            .setByteBandCount(U64.of(13))
+                                                                                                                                                            .build()))
+                                                                            .build()))
+
+        .build()
+
diff --git a/test_data/of15/meter_stats_request.data b/test_data/of15/meter_stats_request.data
new file mode 100644
index 0000000..3cffe73
--- /dev/null
+++ b/test_data/of15/meter_stats_request.data
@@ -0,0 +1,15 @@
+-- binary
+06 12 # version, type
+00 18 # length
+12 34 56 78 # xid
+00 09 # multipart message type (OFPMP_METER_STATS)
+00 01 # flags
+00 00 00 00 # pad
+00 00 00 01 # meterId
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .setMeterId(1L)
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/packet_in.data b/test_data/of15/packet_in.data
new file mode 100644
index 0000000..bc41855
--- /dev/null
+++ b/test_data/of15/packet_in.data
@@ -0,0 +1,33 @@
+--binary
+06 0a # version, type
+00 35 # length
+12 34 56 78 # xid
+00 00 00 64 # buffer_id
+42 68 # total_len
+01 # reason
+14 # table_id
+fe dc ba 98 76 54 32 10 # cookie
+00 01 # match.type
+00 16 # match.length
+80 00 01 08 # match.oxm_list[0].type_len - Input Port
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+80 00 2A 02 # match.oxm_list[1].type_len - ARP OpCode
+00 01 # match.oxm_list[1].value
+00 00 # match.pad
+00 00 # pad
+61 62 63 # data
+-- java
+builder
+        .setXid(0x12345678)
+        .setBufferId(OFBufferId.of(100))
+        .setTotalLen(17000)
+        .setReason(OFPacketInReason.ACTION)
+        .setTableId(TableId.of(20))
+        .setCookie(U64.parseHex("FEDCBA9876543210"))
+        .setMatch(
+            factory.buildMatchV3()
+                .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+                .setExact(MatchField.ARP_OP, ArpOpcode.REQUEST)
+                .build())
+        .setData(new byte[] { 97, 98, 99 } );
\ No newline at end of file
diff --git a/test_data/of15/packet_out.data b/test_data/of15/packet_out.data
new file mode 100644
index 0000000..470b3fb
--- /dev/null
+++ b/test_data/of15/packet_out.data
@@ -0,0 +1,36 @@
+-- binary
+06 0d # version, type
+00 43 # length
+12 34 56 78 # xid
+00 00 00 64 # buffer_id
+00 18 # actions_len
+00 00 # pad
+00 01 # match.type
+00 16 # match.length
+80 00 01 08 # match.oxm_list[0].type_len - Input Port
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+80 00 2A 02 # match.oxm_list[1].type_len - ARP OpCode
+00 01 # match.oxm_list[1].value
+00 00 # match.pad
+00 00 # actions[0].type
+00 10 # actions[0].length
+00 00 00 02 # actions[0].port
+ff ff # actions[0].max_len
+00 00 00 00 00 00 # pad
+00 18 # actions[1].type
+00 08 # actions[1].length
+00 00 00 00 # pad
+61 62 63 # data
+--java
+builder
+        .setXid(0x12345678)
+        .setBufferId(OFBufferId.of(100))
+        .setMatch(
+        factory.buildMatchV3()
+            .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+            .setExact(MatchField.ARP_OP, ArpOpcode.REQUEST)
+            .build())
+        .setActions(Arrays.asList(new OFAction[] {factory.actions().buildOutput().setPort(OFPort.of(2)).setMaxLen(65535).build(), factory.actions().decNwTtl()}))
+        .setData(new byte[] {97,98,99})
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/port_desc_stats_reply.data b/test_data/of15/port_desc_stats_reply.data
new file mode 100644
index 0000000..8d7a35b
--- /dev/null
+++ b/test_data/of15/port_desc_stats_reply.data
@@ -0,0 +1,43 @@
+--binary
+06 13 # version, type
+00 58 # length
+12 34 56 78 # xid
+00 0d # multipart message type (OFPMP_PORT_DESC)
+00 01 # flags (OFPMPF_REPLY_MORE)
+00 00 00 00 # pad
+00 00 00 01 # port[0].port_no
+00 48 # port[0].length
+00 00 # pad
+00 01 02 03 04 05 # port[0].hw_desc [256]
+00 00 # pad
+50 6f 72 74 31 00 00 00 00 00 00 00 00 00 00 00 # name
+00 00 00 01 # config (OFPPC_PORT_DOWN)
+00 00 00 04 # state (OFPPS_LIVE)
+00 00 # properties[0].type (OFPPDPT_ETHERNET)
+00 20 # properties[0].length
+00 00 00 00 # pad
+00 00 00 01 # curr
+00 00 00 02 # advertised
+00 00 00 03 # supported
+00 00 00 04 # peer
+00 00 00 05 # curr_speed
+00 00 00 06 # max_speed
+
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setEntries(ImmutableList.<OFPortDesc>of(factory.buildPortDesc().setPortNo(OFPort.of(1))
+                                                                    .setHwAddr(MacAddress.of("00:01:02:03:04:05"))
+                                                                    .setName("Port1")
+                                                                    .setConfig(ImmutableSet.<OFPortConfig>of(OFPortConfig.PORT_DOWN))
+                                                                    .setState(ImmutableSet.<OFPortState>of(OFPortState.LIVE))
+                                                                    .setProperties(ImmutableList.<OFPortDescProp>of(factory.buildPortDescPropEthernet().setCurr(1)
+                                                                                                                                                        .setAdvertised(2)
+                                                                                                                                                        .setSupported(3)
+                                                                                                                                                        .setPeer(4)
+                                                                                                                                                        .setCurrSpeed(5)
+                                                                                                                                                        .setMaxSpeed(6)
+                                                                                                                                                        .build()
+                                            )).build()))
+        .build();
diff --git a/test_data/of15/port_desc_stats_request.data b/test_data/of15/port_desc_stats_request.data
new file mode 100644
index 0000000..dfdee0f
--- /dev/null
+++ b/test_data/of15/port_desc_stats_request.data
@@ -0,0 +1,15 @@
+-- binary
+06 12 # version, type
+00 18 # length
+12 34 56 78 # xid
+00 0d # multipart message type (OFPMP_PORT_DESC)
+00 01 # flags
+00 00 00 00 # pad
+00 00 00 01 # port_no
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .setPortNo(OFPort.of(1))
+        .build();
\ No newline at end of file
diff --git a/test_data/of15/port_mod.data b/test_data/of15/port_mod.data
new file mode 100644
index 0000000..e393800
--- /dev/null
+++ b/test_data/of15/port_mod.data
@@ -0,0 +1,23 @@
+-- binary
+06 10 # version, type
+00 28 # length
+12 34 56 78 # xid
+00 00 00 01 # port_no
+00 00 00 00 # pad
+00 01 02 03 04 05 # hw_addr
+00 00 # pad
+00 00 00 01 # config (OFPPC_PORT_DOWN)
+00 00 00 01 # mask (OFPPC_PORT_DOWN)
+00 00 # properties[0].type (OFPPMPT_ETHERNET)
+00 08 # properties[0].length
+00 00 00 01 # properties[0].advertise (OFPPF_10MB_HD)
+-- java
+builder
+        .setXid(0x12345678)
+        .setPortNo(OFPort.of(1))
+        .setHwAddr(MacAddress.of("00:01:02:03:04:05"))
+        .setConfig(ImmutableSet.<OFPortConfig>of(OFPortConfig.PORT_DOWN))
+        .setMask(ImmutableSet.<OFPortConfig>of(OFPortConfig.PORT_DOWN))
+        .setProperties(ImmutableList.<OFPortModProp>of(factory.buildPortModPropEthernet().setAdvertise(ImmutableSet.<OFPortFeatures>of(OFPortFeatures.PF_10MB_HD)).build()))
+        .build()
+
diff --git a/test_data/of15/port_stats_reply.data b/test_data/of15/port_stats_reply.data
new file mode 100644
index 0000000..507a4bf
--- /dev/null
+++ b/test_data/of15/port_stats_reply.data
@@ -0,0 +1,52 @@
+--binary
+06 13 # version, type
+00 88 # length
+12 34 56 78 # xid
+00 04 # multipart message type (OFPMP_PORT_STATS)
+00 01 # flags (OFPMPF_REPLY_MORE)
+00 00 00 00 # pad
+00 78 # length
+00 00 # pad
+00 00 00 01 # port_no
+00 00 00 03 # duration_sec
+b2 d0 5e 00 # duration_nsec
+00 00 00 00 00 00 00 0a # rx_packets
+00 00 00 00 00 00 00 07 # tx_packets
+00 00 00 00 00 00 00 0a # rx_bytes
+00 00 00 00 00 00 00 07 # tx_bytes
+00 00 00 00 00 00 00 02 # rx_dropped
+00 00 00 00 00 00 00 01 # tx_dropped
+00 00 00 00 00 00 00 01 # rx_errors
+00 00 00 00 00 00 00 01 # tx_errors
+00 00 # properties[0].type (OFPPSPT_ETHERNET)
+00 28 # properties[0].length
+00 00 00 00 # properties[0].pad
+00 00 00 00 00 00 00 1a # properties[0].rx_frame_err
+00 00 00 00 00 00 00 1b # properties[0].rx_over_err
+00 00 00 00 00 00 00 1c # properties[0].rx_crc_err
+00 00 00 00 00 00 00 1d # properties[0].collisions
+
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setEntries(ImmutableList.<OFPortStatsEntry>of(factory.buildPortStatsEntry().setPortNo(OFPort.of(1))
+                                                                                    .setDurationSec(3)
+                                                                                    .setDurationNsec(3000000000L)
+                                                                                    .setRxPackets(U64.of(10))
+                                                                                    .setTxPackets(U64.of(7))
+                                                                                    .setRxBytes(U64.of(10))
+                                                                                    .setTxBytes(U64.of(7))
+                                                                                    .setRxDropped(U64.of(2))
+                                                                                    .setTxDropped(U64.of(1))
+                                                                                    .setRxErrors(U64.of(1))
+                                                                                    .setTxErrors(U64.of(1))
+                                                                                    .setProperties(ImmutableList.<OFPortStatsProp>of(factory.buildPortStatsPropEthernet()
+                                                                                                                                            .setRxFrameErr(U64.of(26))
+                                                                                                                                            .setRxOverErr(U64.of(27))
+                                                                                                                                            .setRxCrcErr(U64.of(28))
+                                                                                                                                            .setCollisions(U64.of(29))
+                                                                                                                                            .build()))
+                                                                                    .build()))
+
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/port_stats_request.data b/test_data/of15/port_stats_request.data
new file mode 100644
index 0000000..5f4a080
--- /dev/null
+++ b/test_data/of15/port_stats_request.data
@@ -0,0 +1,15 @@
+-- binary
+06 12 # version, type
+00 18 # length
+12 34 56 78 # xid
+00 04 # multipart message type (OFPMP_PORT_STATS)
+00 01 # flags
+00 00 00 00 # pad
+00 00 00 01 # port_no
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .setPortNo(OFPort.of(1))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/port_status.data b/test_data/of15/port_status.data
new file mode 100644
index 0000000..1124113
--- /dev/null
+++ b/test_data/of15/port_status.data
@@ -0,0 +1,43 @@
+--binary
+06 0c # version, type
+00 58 # length
+12 34 56 78 # xid
+00 # reason
+00 00 00 00 00 00 00 # pad
+00 00 00 04 # port_no
+00 48 # length
+00 00 # pad
+00 00 00 12 34 56 # hw_addr
+00 00 # pad
+61 62 63 00 00 00 00 00 # name
+00 00 00 00 # config
+00 00 00 00 # state
+00 00 00 01 # port_desc_prop_header - type, length
+00 00 00 01 # properties[0].type
+00 00 00 20 # properties[0].length
+00 00 00 00 # properties.pad
+00 00 00 01 # properties[0].curr
+00 00 00 02 # properties[0].advertised
+00 00 00 04 # properties[0].supported
+00 00 00 08 # properties[0].peer
+00 00 00 0a # properties[0].curr_speed
+00 00 00 0e # properties[0].max_speed
+
+--java
+builder
+        .setXid(0x12345678)
+        .setReason(OFPortReason.ADD)
+        .setDesc(factory.buildPortDesc()
+                        .setPortNo(OFPort.ofInt(4))
+                        .setHwAddr(MacAddress.of(0x123456))
+                        .setName("abc")
+                        .setConfig(Sets.immutableEnumSet(OFPortConfig.PORT_DOWN))
+                        .setState(Sets.immutableEnumSet(OFPortState.LINK_DOWN))
+                        .setProperties(Arrays.asList(new OFPortDescProp[] {factory.buildPortDescPropEthernet()
+                        .setCurr(1)
+                        .setAdvertised(2)
+                        .setSupported(4)
+                        .setPeer(8)
+                        .setCurrSpeed(10)
+                        .setMaxSpeed(14)
+                        .build()})).build())
diff --git a/test_data/of15/queue_desc_stats_reply.data b/test_data/of15/queue_desc_stats_reply.data
new file mode 100644
index 0000000..4e19d0f
--- /dev/null
+++ b/test_data/of15/queue_desc_stats_reply.data
@@ -0,0 +1,26 @@
+--binary
+06 13 # version, type
+00 28 # length
+12 34 56 78 # xid
+00 0F # multipart message type (OFPMP_QUEUE_DESC)
+00 01 # flags (OFPMPF_REPLY_MORE)
+00 00 00 00 # pad
+00 00 00 01 # port_no
+00 00 00 01 # queue_id
+00 18 # length
+00 00 00 00 00 00 # pad
+00 01 # properties[0].type (OFPQDPT_MIN_RATE)
+00 08 # properties[0].length
+00 01 # rate
+00 00 # pad
+
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setEntries(ImmutableList.<OFQueueDesc>of(factory.buildQueueDesc().setPortNo(1)
+                                                                        .setQueueId(1)
+                                                                        .setProperties(ImmutableList.<OFQueueDescProp>of(factory.buildQueueDescPropMinRate()
+                                                                                                                                .setRate(1)
+                                                                                                                                .build())).build()))
+        .build();
\ No newline at end of file
diff --git a/test_data/of15/queue_desc_stats_request.data b/test_data/of15/queue_desc_stats_request.data
new file mode 100644
index 0000000..91733cd
--- /dev/null
+++ b/test_data/of15/queue_desc_stats_request.data
@@ -0,0 +1,16 @@
+-- binary
+06 12 # version, type
+00 18 # length
+12 34 56 78 # xid
+00 0f # multipart message type (OFPMP_QUEUE_DESC)
+00 01 # flags
+00 00 00 00 # pad
+00 00 00 01 # port_no
+00 00 00 01 # queue_id
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .setPortNo(OFPort.of(1))
+        .setQueueId(1L)
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/queue_stats_reply.data b/test_data/of15/queue_stats_reply.data
new file mode 100644
index 0000000..52ced26
--- /dev/null
+++ b/test_data/of15/queue_stats_reply.data
@@ -0,0 +1,38 @@
+--binary
+06 13 # version, type
+00 50 # length
+12 34 56 78 # xid
+00 05 # multipart message type (OFPMP_QUEUE_STATS)
+00 01 # flags (OFPMPF_REPLY_MORE)
+00 00 00 00 # pad
+00 40 # length
+00 00 00 00 00 00 # pad
+00 00 00 01 # port_no
+00 00 00 01 # queue_id
+00 00 00 00 00 00 00 0a # tx_bytes
+00 00 00 00 00 00 00 07 # tx_packets
+00 00 00 00 00 00 00 01 # tx_errors
+00 00 00 03 # duration_sec
+b2 d0 5e 00 # duration_nsec
+ff ff # properties[0].type (OFPQSPT_EXPERIMENTER)
+00 10 # properties[0].length
+00 5c 16 c7 # properties[0].experimenter
+00 00 00 00 # properties[0].exp_type
+00 00 00 02 # properties[0].experimenter_data
+
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setEntries(ImmutableList.<OFQueueStatsEntry>of(factory.buildQueueStatsEntry().setPortNo(OFPort.of(1))
+                                                                                    .setQueueId(1)
+                                                                                    .setTxBytes(U64.of(10))
+                                                                                    .setTxPackets(U64.of(7))
+                                                                                    .setTxErrors(U64.of(1))
+                                                                                    .setDurationSec(3)
+                                                                                    .setDurationNsec(3000000000L)
+                                                                                    .setProperties(ImmutableList.<OFQueueStatsProp>of(factory.buildQueueStatsPropBsn()
+                                                                                                                                    .setExperimenterData(new byte[] {0x0, 0x0, 0x0, 0x2})
+                                                                                                                                    .build())).build()))
+
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/queue_stats_request.data b/test_data/of15/queue_stats_request.data
new file mode 100644
index 0000000..774449a
--- /dev/null
+++ b/test_data/of15/queue_stats_request.data
@@ -0,0 +1,16 @@
+-- binary
+06 12 # version, type
+00 18 # length
+12 34 56 78 # xid
+00 05 # multipart message type (OFPMP_QUEUE_STATS)
+00 01 # flags
+00 00 00 00 # pad
+00 00 00 01 # port_no
+00 00 00 01 # queue_id
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .setPortNo(OFPort.of(1))
+        .setQueueId(1)
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/requestforward.data b/test_data/of15/requestforward.data
new file mode 100644
index 0000000..dacaea8
--- /dev/null
+++ b/test_data/of15/requestforward.data
@@ -0,0 +1,24 @@
+-- binary
+06 20 # version, type
+00 28 # length
+12 34 56 78 # xid
+06 1d # version, type (METER_MOD)
+00 20 # length
+11 11 11 11 # xid
+00 00 # command (OFPMC_ADD)
+00 01 # flags (OFPMF_KBPS)
+00 00 00 01 # meter_id
+00 01 # bands[0].type (OFPMBT_DROP)
+00 10 # bands[0].length
+00 00 00 01 # bands[0].rate
+00 00 00 02 # bands[0].burst_size
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setRequest(factory.buildMeterMod().setXid(0x11111111).setCommand(OFMeterModCommand.ADD)
+                                                            .setFlags(ImmutableSet.<OFMeterFlags>of(OFMeterFlags.KBPS))
+                                                            .setMeterId(1)
+                                                            .setBands(ImmutableList.<OFMeterBand>of(factory.meterBands().buildDrop().setRate(1).setBurstSize(2).build()))
+                                                            .build())
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/role_reply.data b/test_data/of15/role_reply.data
new file mode 100644
index 0000000..aa865f2
--- /dev/null
+++ b/test_data/of15/role_reply.data
@@ -0,0 +1,15 @@
+-- binary
+06 19 # version, type
+00 18 # length
+12 34 56 78 # xid
+00 00 00 02 # role (OFPCR_ROLE_MASTER)
+00 01 # short_id
+00 00 # pad
+00 00 00 00 00 00 00 01 # generation_id
+-- java
+builder
+        .setXid(0x12345678)
+        .setRole(OFControllerRole.ROLE_MASTER)
+        .setShortId(1)
+        .setGenerationId(U64.of(1))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/role_request.data b/test_data/of15/role_request.data
new file mode 100644
index 0000000..73dc927
--- /dev/null
+++ b/test_data/of15/role_request.data
@@ -0,0 +1,15 @@
+-- binary
+06 18 # version, type
+00 18 # length
+12 34 56 78 # xid
+00 00 00 02 # role (OFPCR_ROLE_MASTER)
+00 01 # short_id
+00 00 # pad
+00 00 00 00 00 00 00 01 # generation_id
+-- java
+builder
+        .setXid(0x12345678)
+        .setRole(OFControllerRole.ROLE_MASTER)
+        .setShortId(1)
+        .setGenerationId(U64.of(1))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/role_status.data b/test_data/of15/role_status.data
new file mode 100644
index 0000000..bcd516e
--- /dev/null
+++ b/test_data/of15/role_status.data
@@ -0,0 +1,21 @@
+-- binary
+06 1e # version, type
+00 28 # length
+12 34 56 78 # xid
+00 00 00 03 # role (OFPCR_ROLE_SLAVE)
+00 # reason (OFPCRR_MASTER_REQUEST)
+00 00 00 # pad
+00 00 00 00 00 00 00 01 # generation_id
+ff ff # properties[0].type (OFPRPT_EXPERIMENTER)
+00 10 # properties[0].length
+00 5c 16 c7 # properties[0].experimenter
+00 00 00 37 # properties[0].exp_type
+00 00 00 00 # properties[0]exp_data
+-- java
+builder
+        .setXid(0x12345678)
+        .setRole(OFControllerRole.ROLE_SLAVE)
+        .setReason(OFControllerRoleReason.MASTER_REQUEST)
+        .setGenerationId(U64.of(1))
+        .setProperties(ImmutableList.<OFRoleProp>of(factory.buildRolePropBsn().setExperimenterData(new byte[] {0x0, 0x0, 0x0, 0x0}).build()))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/set_config.data b/test_data/of15/set_config.data
new file mode 100644
index 0000000..cd08b34
--- /dev/null
+++ b/test_data/of15/set_config.data
@@ -0,0 +1,12 @@
+-- binary
+06 09 # version, type
+00 0c # length
+12 34 56 78 # xid
+00 02 # flags
+ff ff # miss_send_len
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(Sets.immutableEnumSet(OFConfigFlags.FRAG_REASM))
+        .setMissSendLen(0xffff)
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/table_desc_stats_reply.data b/test_data/of15/table_desc_stats_reply.data
new file mode 100644
index 0000000..2efd6b1
--- /dev/null
+++ b/test_data/of15/table_desc_stats_reply.data
@@ -0,0 +1,26 @@
+--binary
+06 13 # version, type
+00 20 # length
+12 34 56 78 # xid
+00 0e # multipart message type (OFPMP_TABLE_DESC)
+00 01 # flags (OFPMPF_REPLY_MORE)
+00 00 00 00 # pad
+00 10 # length
+00 # table_id
+00 # pad
+00 00 00 04 # config (OFPTC_EVICTION)
+00 02 # properties[0].type (OFPTMPT_EVICTION)
+00 08 # properties[0].length
+00 00 00 02 # properties[0].flags (OFPTMPEF_IMPORTANCE)
+
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setEntries(ImmutableList.<OFTableDesc>of(factory.buildTableDesc().setTableId(TableId.of(0))
+                                                                        .setConfig(ImmutableSet.<OFTableConfig>of(OFTableConfig.EVICTION))
+                                                                        .setProperties(ImmutableList.<OFTableModProp>of(factory.buildTableModPropEviction()
+                                                                                                                        .setFlags(ImmutableSet.<OFTableModPropEvictionFlag>of(OFTableModPropEvictionFlag.IMPORTANCE))
+                                                                                                                        .build()))
+                                                .build()))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/table_desc_stats_request.data b/test_data/of15/table_desc_stats_request.data
new file mode 100644
index 0000000..596b293
--- /dev/null
+++ b/test_data/of15/table_desc_stats_request.data
@@ -0,0 +1,12 @@
+-- binary
+06 12 # version, type
+00 10 # length
+12 34 56 78 # xid
+00 0e # multipart message type (OFPMP_TABLE_DESC)
+00 01 # flags
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/table_feature_stats_reply.data b/test_data/of15/table_feature_stats_reply.data
new file mode 100644
index 0000000..cd8c3ec
--- /dev/null
+++ b/test_data/of15/table_feature_stats_reply.data
@@ -0,0 +1,35 @@
+--binary
+06 13 # version, type
+00 58 # length
+12 34 56 78 # xid
+00 0c # multipart message type (OFPMP_TABLE_FEATURES)
+00 01 # flags (OFPMPF_REPLY_MORE)
+00 00 00 00 # pad
+00 48 # length
+01 # table_id
+02 # command (OFPTFC_ENABLE)
+00 00 00 01 # features (OFPTFF_INGRESS_TABLE)
+61 62 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 # name
+00 00 00 00 00 00 00 01 # metadata_match
+00 00 00 00 00 00 00 01 # metadata_write
+00 00 00 08 # capabilities (OFPTC_VACANCY_EVENTS)
+00 00 00 0a # max_entries
+00 01 # properties[0].type (OFPTFPT_INSTRUCTIONS_MISS)
+00 08 # properties[0].length
+00 04 # instruction_id[0].type (OFPIT_APPLY_ACTIONS)
+00 04 # instruction_id[0].len
+
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setEntries(ImmutableList.<OFTableFeatures>of(factory.buildTableFeatures().setTableId(TableId.of(1))
+                                                                                .setCommand(OFTableFeaturesCommand.ENABLE)
+                                                                                .setFeatures(ImmutableSet.<OFTableFeatureFlag>of(OFTableFeatureFlag.INGRESS_TABLE))
+                                                                                .setName("abc")
+                                                                                .setMetadataMatch(U64.of(1))
+                                                                                .setMetadataWrite(U64.of(1))
+                                                                                .setCapabilities(ImmutableSet.<OFTableConfig>of(OFTableConfig.VACANCY_EVENTS))
+                                                                                .setMaxEntries(10)
+                                                                                .setProperties(ImmutableList.<OFTableFeatureProp>of(factory.buildTableFeaturePropInstructionsMiss().setInstructionIds(ImmutableList.<OFInstructionId>of(factory.instructionIds().applyActions())).build())).build()))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/table_feature_stats_request.data b/test_data/of15/table_feature_stats_request.data
new file mode 100644
index 0000000..6fd5c47
--- /dev/null
+++ b/test_data/of15/table_feature_stats_request.data
@@ -0,0 +1,12 @@
+-- binary
+06 12 # version, type
+00 10 # length
+12 34 56 78 # xid
+00 0c # multipart message type (OFPMP_TABLE_FEATURES)
+00 01 # flags
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/table_mod.data b/test_data/of15/table_mod.data
new file mode 100644
index 0000000..c7f443f
--- /dev/null
+++ b/test_data/of15/table_mod.data
@@ -0,0 +1,17 @@
+-- binary
+06 11 # version, type
+00 18 # length
+12 34 56 78 # xid
+01 # table_id
+00 00 00 # pad
+00 00 00 04 # config (OFPTC_EVICTION)
+00 02 # properties[0].type (OFPTMPT_EVICTION)
+00 08 # properties[0].length
+00 00 00 02 # properties[0].flags (OFPTMPEF_IMPORTANCE)
+-- java
+builder
+        .setXid(0x12345678)
+        .setTableId(TableId.of(1))
+        .setConfig(4)
+        .setProperties(ImmutableList.<OFTableModProp>of(factory.buildTableModPropEviction().setFlags(ImmutableSet.<OFTableModPropEvictionFlag>of(OFTableModPropEvictionFlag.IMPORTANCE)).build()))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/table_stats_reply.data b/test_data/of15/table_stats_reply.data
new file mode 100644
index 0000000..9a50b9a
--- /dev/null
+++ b/test_data/of15/table_stats_reply.data
@@ -0,0 +1,23 @@
+--binary
+06 13 # version, type
+00 28 # length
+12 34 56 78 # xid
+00 03 # multipart message type (OFPMP_TABLE_STATS)
+00 01 # flags (OFPMPF_REPLY_MORE)
+00 00 00 00 # pad
+01 # table_id
+00 00 00 # pad
+00 00 00 0a # active_count
+00 00 00 00 00 00 00 07 # lookup_count
+00 00 00 00 00 00 00 05 # matched_count
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsReplyFlags>of(OFStatsReplyFlags.REPLY_MORE))
+        .setEntries(ImmutableList.<OFTableStatsEntry>of(
+                                factory.buildTableStatsEntry().setTableId(TableId.of(1))
+                                                            .setActiveCount(10)
+                                                            .setLookupCount(U64.parseHex("7"))
+                                                            .setMatchedCount(U64.parseHex("5"))
+                                                            .build()))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/table_stats_request.data b/test_data/of15/table_stats_request.data
new file mode 100644
index 0000000..1ddaa79
--- /dev/null
+++ b/test_data/of15/table_stats_request.data
@@ -0,0 +1,12 @@
+-- binary
+06 12 # version, type
+00 10 # length
+12 34 56 78 # xid
+00 03 # multipart message type (OFPMP_TABLE_STATS)
+00 01 # flags
+00 00 00 00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setFlags(ImmutableSet.<OFStatsRequestFlags>of(OFStatsRequestFlags.REQ_MORE))
+        .build()
\ No newline at end of file
diff --git a/test_data/of15/table_status.data b/test_data/of15/table_status.data
new file mode 100644
index 0000000..3eaa523
--- /dev/null
+++ b/test_data/of15/table_status.data
@@ -0,0 +1,26 @@
+-- binary
+06 1f # version, type
+00 20 # length
+12 34 56 78 # xid
+03 # reason (OFPTR_VACANCY_DOWN)
+00 00 00 00 00 00 00 # pad
+00 10 # table.length
+01 # table.table_id
+00 # table.pad
+00 00 00 08 # table.config (OFPTC_VACANCY_EVENTS)
+00 03 # table.properties[0].type (OFPTMPT_VACANCY)
+00 08 # length.properties[0].length
+03 # vacancy_down
+04 # vacancy_up
+05 # vacancy
+00 # pad
+-- java
+builder
+        .setXid(0x12345678)
+        .setReason(OFTableReason.VACANCY_DOWN)
+        .setTable(factory.buildTableDesc().setTableId(TableId.of(1)).setConfig(ImmutableSet.<OFTableConfig>of(OFTableConfig.VACANCY_EVENTS))
+                                                                    .setProperties(ImmutableList.<OFTableModProp>of(factory.buildTableModPropVacancy().setVacancyDown((short)3)
+                                                                                                                                                    .setVacancyUp((short)4)
+                                                                                                                                                    .setVacancy((short)5)
+                                                                                                                                                    .build())).build())
+        .build()
\ No newline at end of file
diff --git a/utest/test_frontend.py b/utest/test_frontend.py
index cfadc39..01d59f5 100755
--- a/utest/test_frontend.py
+++ b/utest/test_frontend.py
@@ -195,5 +195,44 @@
         ]
         self.assertEquals(expected_classes, ofinput.classes)
 
+    def test_field_length(self):
+        ast = parser.parse("""
+#version 1
+
+struct of_test_entry {
+    uint32_t x;
+};
+
+struct of_test {
+    uint16_t list_len == length(list);
+    list(of_test_entry_t) list;
+};
+""")
+
+        # Not testing the parser, just making sure the AST is what we expect
+        expected_ast = [
+            ['metadata', 'version', '1'],
+
+            ['struct', 'of_test_entry', [], None, [
+                ['data', ['scalar', 'uint32_t'], 'x']]],
+
+            ['struct', 'of_test', [], None, [
+                ['field_length', ['scalar', 'uint16_t'], 'list_len', 'list'],
+                ['data', ['list', 'list(of_test_entry_t)'], 'list']]]
+        ]
+        self.assertEquals(expected_ast, ast)
+
+        ofinput = frontend.create_ofinput("standard-1.0", ast)
+        expected_classes = [
+            OFClass(name='of_test_entry', superclass=None, virtual=False, params={},
+                members=[
+                    OFDataMember('x', 'uint32_t')]),
+            OFClass(name='of_test', superclass=None, virtual=False, params={},
+                members=[
+                    OFFieldLengthMember('list_len', 'uint16_t', 'list'),
+                    OFDataMember('list', 'list(of_test_entry_t)')])
+        ]
+        self.assertEquals(expected_classes, ofinput.classes)
+
 if __name__ == '__main__':
     unittest.main()
diff --git a/utest/test_parser.py b/utest/test_parser.py
index 8acfdda..3b9ae26 100755
--- a/utest/test_parser.py
+++ b/utest/test_parser.py
@@ -139,6 +139,19 @@
         self.assertEquals(ast,
             [['struct', 'foo', [], None, [['discriminator', ['scalar', 'uint16_t'], 'foo']]]])
 
+    def test_field_length(self):
+        src = """\
+struct foo {
+    uint16_t list_len == length(list);
+    list(of_uint32_t) list;
+};
+"""
+        ast = parser.parse(src)
+        self.assertEquals(ast,
+            [['struct', 'foo', [], None, [
+                ['field_length', ['scalar', 'uint16_t'], 'list_len', 'list'],
+                ['data', ['list', 'list(of_uint32_t)'], 'list']]]])
+
 class EnumTests(unittest.TestCase):
     def test_empty(self):
         src = """\
diff --git a/wireshark_gen/__init__.py b/wireshark_gen/__init__.py
index 75918f8..a82ac49 100644
--- a/wireshark_gen/__init__.py
+++ b/wireshark_gen/__init__.py
@@ -38,7 +38,7 @@
 
 DissectorField = namedtuple("DissectorField", ["fullname", "name", "type", "base", "enum_table"])
 
-proto_names = { 1: 'of10', 2: 'of11', 3: 'of12', 4: 'of13', 5: 'of14' }
+proto_names = { 1: 'of10', 2: 'of11', 3: 'of12', 4: 'of13', 5: 'of14' , 6: 'of15' }
 def make_field_name(version, ofclass_name, member_name):
     return "%s.%s.%s" % (proto_names[version.wire_version],
                          ofclass_name[3:],
diff --git a/wireshark_gen/field_info.py b/wireshark_gen/field_info.py
index 599928a..f18248e 100644
--- a/wireshark_gen/field_info.py
+++ b/wireshark_gen/field_info.py
@@ -45,17 +45,21 @@
     "of_octets_t": "bytes",
     "of_port_no_t": "uint32",
     "of_port_desc_t": "stringz",
+    "of_table_desc_t": "stringz",
     "of_bsn_vport_t": "bytes",
     "of_bsn_vport_q_in_q_t": "bytes",
     "of_fm_cmd_t": "uint16",
     "of_wc_bmap_t": "uint64",
     "of_match_bmap_t": "uint64",
     "of_match_t": "bytes",
+    "of_stat_t": "bytes",
     "of_oxm_t": "bytes",
+    "of_oxs_t": "bytes",
     "of_meter_features_t": "bytes",
     "of_bitmap_128_t": "bytes",
     "of_bitmap_512_t": "bytes",
     "of_checksum_128_t": "bytes",
+    "of_controller_uri_t":"stringz",
 }
 
 # Map from LOXI type to Wireshark base
@@ -84,7 +88,9 @@
     "of_wc_bmap_t": "HEX",
     "of_match_bmap_t": "HEX",
     "of_match_t": "NONE",
+    "of_stat_t":"NONE",
     "of_oxm_t": "NONE",
+    "of_oxs_t" : "NONE",
     "of_meter_features_t": "NONE",
     "of_bitmap_128_t": "NONE",
     "of_bitmap_512_t": "NONE",
@@ -118,6 +124,7 @@
     ('of_flow_add', 'type'): 'ofp_type',
     ('of_port_status', 'type'): 'ofp_type',
     ('of_match_v3', 'type'): 'ofp_match_type',
+    ('of_stat_v6' , 'type'): 'ofp_stat_type',
     ('of_action_set_nw_ttl', 'type'): 'ofp_action_type',
     ('of_action_set_field', 'type'): 'ofp_action_type',
     ('of_action_output', 'type'): 'ofp_action_type',
diff --git a/wireshark_gen/templates/_ofclass_dissector.lua b/wireshark_gen/templates/_ofclass_dissector.lua
index d327b49..6ae6b12 100644
--- a/wireshark_gen/templates/_ofclass_dissector.lua
+++ b/wireshark_gen/templates/_ofclass_dissector.lua
@@ -43,7 +43,7 @@
 :: if ofclass.virtual:
     return ${ofclass.name}_v${version.wire_version}_dissectors[reader.peek(${ofclass.discriminator.offset},${ofclass.discriminator.length}):uint()](reader, subtree)
 :: else:
-:: if not ofclass.is_fixed_length:
+:: if not ofclass.is_fixed_length and ofclass.length_member is not None:
     local _length = reader.peek(${ofclass.length_member.offset}, ${ofclass.length_member.base_length}):uint()
     local orig_reader = reader
     reader = orig_reader.slice(_length)
diff --git a/wireshark_gen/templates/_oftype_readers.lua b/wireshark_gen/templates/_oftype_readers.lua
index 700b236..e42479d 100644
--- a/wireshark_gen/templates/_oftype_readers.lua
+++ b/wireshark_gen/templates/_oftype_readers.lua
@@ -78,11 +78,31 @@
         dissect_of_match_v3_v4(reader, subtree:add("of_match"))
     elseif version == 5 then
         dissect_of_match_v3_v5(reader, subtree:add("of_match"))
+    elseif version == 6 then
+        dissect_of_match_v3_v6(reader, subtree:add("of_match"))
     else
         error("Unsupported match version")
     end
 end
 
+function read_of_stat_t(reader, version, subtree, field_name)
+    if version == 1 then
+        error("Unsupported statistics version")
+    elseif version == 2 then
+        error("Unsupported statistics version")
+    elseif version == 3 then
+        error("Unsupported statistics version")
+    elseif version == 4 then
+        error("Unsupported statistics version")
+    elseif version == 5 then
+        error("Unsupported statistics version")
+    elseif version == 6 then
+        dissect_of_stat_v6_v6(reader, subtree:add("of_stat"))
+    else
+        error("Unsupported statistics version")
+    end
+end
+
 function read_of_wc_bmap_t(reader, version, subtree, field_name)
     if version <= 2 then
         read_scalar(reader, subtree, field_name, 4)
@@ -165,6 +185,15 @@
     child_subtree:set_text(info)
 end
 
+function read_of_oxs_t(reader, version, subtree, field_name)
+    if reader.is_empty() then
+        return
+    end
+    local child_subtree = subtree:add(fields[field_name], reader.peek_all(0))
+    local info = of_oxs_dissectors[version](reader, child_subtree)
+    child_subtree:set_text(info)
+end
+
 function read_list(reader, dissector, subtree, field_name)
     if not reader.is_empty() then
         local list_subtree = subtree:add(field_name .. " list", reader.peek_all(0))
diff --git a/wireshark_gen/templates/openflow.lua b/wireshark_gen/templates/openflow.lua
index f6aaea3..cb4a289 100644
--- a/wireshark_gen/templates/openflow.lua
+++ b/wireshark_gen/templates/openflow.lua
@@ -39,7 +39,7 @@
 
 :: include('_ofreader.lua')
 
-p_of = Proto ("of", "OpenFlow")
+p_of = Proto ("of", "OpenFlow (LOXI)")
 ethernet_dissector = Dissector.get("eth")
 
 current_pkt = nil
@@ -124,6 +124,13 @@
 :: #endfor
 }
 
+
+local of_oxs_dissectors = {
+:: for version in ir:
+    [${version.wire_version}] = dissect_of_oxs_v${version.wire_version},
+:: #endfor
+}
+
 local of_bsn_vport_q_in_q_dissectors = {
 :: for version in ir:
     [${version.wire_version}] = dissect_of_bsn_vport_q_in_q_v${version.wire_version},
@@ -169,8 +176,8 @@
             local msg_len = buf(offset+2,2):uint()
 
             -- Detect obviously broken messages
-            if msg_version == 0 or msg_version > 5 then break end
-            if msg_type > 34 then break end
+            if msg_version == 0 or msg_version > 6 then break end
+            if msg_type > 35 then break end
             if msg_len < 8 then break end
 
             if offset + msg_len > buf:len() then