diff --git a/go/afrouter/afrouter.pb.go b/go/afrouter/afrouter.pb.go
new file mode 100644
index 0000000..c80cbc9
--- /dev/null
+++ b/go/afrouter/afrouter.pb.go
@@ -0,0 +1,375 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/afrouter.proto
+
+package afrouter // import "github.com/opencord/voltha-protos/go/afrouter"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+import (
+	context "golang.org/x/net/context"
+	grpc "google.golang.org/grpc"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type Result struct {
+	Success              bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
+	Error                string   `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Result) Reset()         { *m = Result{} }
+func (m *Result) String() string { return proto.CompactTextString(m) }
+func (*Result) ProtoMessage()    {}
+func (*Result) Descriptor() ([]byte, []int) {
+	return fileDescriptor_afrouter_bf0ddf9ad3e54d0f, []int{0}
+}
+func (m *Result) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Result.Unmarshal(m, b)
+}
+func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Result.Marshal(b, m, deterministic)
+}
+func (dst *Result) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Result.Merge(dst, src)
+}
+func (m *Result) XXX_Size() int {
+	return xxx_messageInfo_Result.Size(m)
+}
+func (m *Result) XXX_DiscardUnknown() {
+	xxx_messageInfo_Result.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Result proto.InternalMessageInfo
+
+func (m *Result) GetSuccess() bool {
+	if m != nil {
+		return m.Success
+	}
+	return false
+}
+
+func (m *Result) GetError() string {
+	if m != nil {
+		return m.Error
+	}
+	return ""
+}
+
+type Conn struct {
+	Server               string   `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
+	Pkg                  string   `protobuf:"bytes,2,opt,name=pkg,proto3" json:"pkg,omitempty"`
+	Svc                  string   `protobuf:"bytes,3,opt,name=svc,proto3" json:"svc,omitempty"`
+	Cluster              string   `protobuf:"bytes,4,opt,name=cluster,proto3" json:"cluster,omitempty"`
+	Backend              string   `protobuf:"bytes,5,opt,name=backend,proto3" json:"backend,omitempty"`
+	Connection           string   `protobuf:"bytes,6,opt,name=connection,proto3" json:"connection,omitempty"`
+	Addr                 string   `protobuf:"bytes,7,opt,name=addr,proto3" json:"addr,omitempty"`
+	Port                 uint64   `protobuf:"varint,8,opt,name=port,proto3" json:"port,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Conn) Reset()         { *m = Conn{} }
+func (m *Conn) String() string { return proto.CompactTextString(m) }
+func (*Conn) ProtoMessage()    {}
+func (*Conn) Descriptor() ([]byte, []int) {
+	return fileDescriptor_afrouter_bf0ddf9ad3e54d0f, []int{1}
+}
+func (m *Conn) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Conn.Unmarshal(m, b)
+}
+func (m *Conn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Conn.Marshal(b, m, deterministic)
+}
+func (dst *Conn) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Conn.Merge(dst, src)
+}
+func (m *Conn) XXX_Size() int {
+	return xxx_messageInfo_Conn.Size(m)
+}
+func (m *Conn) XXX_DiscardUnknown() {
+	xxx_messageInfo_Conn.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Conn proto.InternalMessageInfo
+
+func (m *Conn) GetServer() string {
+	if m != nil {
+		return m.Server
+	}
+	return ""
+}
+
+func (m *Conn) GetPkg() string {
+	if m != nil {
+		return m.Pkg
+	}
+	return ""
+}
+
+func (m *Conn) GetSvc() string {
+	if m != nil {
+		return m.Svc
+	}
+	return ""
+}
+
+func (m *Conn) GetCluster() string {
+	if m != nil {
+		return m.Cluster
+	}
+	return ""
+}
+
+func (m *Conn) GetBackend() string {
+	if m != nil {
+		return m.Backend
+	}
+	return ""
+}
+
+func (m *Conn) GetConnection() string {
+	if m != nil {
+		return m.Connection
+	}
+	return ""
+}
+
+func (m *Conn) GetAddr() string {
+	if m != nil {
+		return m.Addr
+	}
+	return ""
+}
+
+func (m *Conn) GetPort() uint64 {
+	if m != nil {
+		return m.Port
+	}
+	return 0
+}
+
+type Affinity struct {
+	Router               string   `protobuf:"bytes,1,opt,name=router,proto3" json:"router,omitempty"`
+	Route                string   `protobuf:"bytes,2,opt,name=route,proto3" json:"route,omitempty"`
+	Cluster              string   `protobuf:"bytes,3,opt,name=cluster,proto3" json:"cluster,omitempty"`
+	Backend              string   `protobuf:"bytes,4,opt,name=backend,proto3" json:"backend,omitempty"`
+	Id                   string   `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Affinity) Reset()         { *m = Affinity{} }
+func (m *Affinity) String() string { return proto.CompactTextString(m) }
+func (*Affinity) ProtoMessage()    {}
+func (*Affinity) Descriptor() ([]byte, []int) {
+	return fileDescriptor_afrouter_bf0ddf9ad3e54d0f, []int{2}
+}
+func (m *Affinity) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Affinity.Unmarshal(m, b)
+}
+func (m *Affinity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Affinity.Marshal(b, m, deterministic)
+}
+func (dst *Affinity) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Affinity.Merge(dst, src)
+}
+func (m *Affinity) XXX_Size() int {
+	return xxx_messageInfo_Affinity.Size(m)
+}
+func (m *Affinity) XXX_DiscardUnknown() {
+	xxx_messageInfo_Affinity.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Affinity proto.InternalMessageInfo
+
+func (m *Affinity) GetRouter() string {
+	if m != nil {
+		return m.Router
+	}
+	return ""
+}
+
+func (m *Affinity) GetRoute() string {
+	if m != nil {
+		return m.Route
+	}
+	return ""
+}
+
+func (m *Affinity) GetCluster() string {
+	if m != nil {
+		return m.Cluster
+	}
+	return ""
+}
+
+func (m *Affinity) GetBackend() string {
+	if m != nil {
+		return m.Backend
+	}
+	return ""
+}
+
+func (m *Affinity) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func init() {
+	proto.RegisterType((*Result)(nil), "afrouter.Result")
+	proto.RegisterType((*Conn)(nil), "afrouter.Conn")
+	proto.RegisterType((*Affinity)(nil), "afrouter.Affinity")
+}
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ context.Context
+var _ grpc.ClientConn
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+const _ = grpc.SupportPackageIsVersion4
+
+// ConfigurationClient is the client API for Configuration service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type ConfigurationClient interface {
+	SetConnection(ctx context.Context, in *Conn, opts ...grpc.CallOption) (*Result, error)
+	SetAffinity(ctx context.Context, in *Affinity, opts ...grpc.CallOption) (*Result, error)
+}
+
+type configurationClient struct {
+	cc *grpc.ClientConn
+}
+
+func NewConfigurationClient(cc *grpc.ClientConn) ConfigurationClient {
+	return &configurationClient{cc}
+}
+
+func (c *configurationClient) SetConnection(ctx context.Context, in *Conn, opts ...grpc.CallOption) (*Result, error) {
+	out := new(Result)
+	err := c.cc.Invoke(ctx, "/afrouter.Configuration/SetConnection", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *configurationClient) SetAffinity(ctx context.Context, in *Affinity, opts ...grpc.CallOption) (*Result, error) {
+	out := new(Result)
+	err := c.cc.Invoke(ctx, "/afrouter.Configuration/SetAffinity", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// ConfigurationServer is the server API for Configuration service.
+type ConfigurationServer interface {
+	SetConnection(context.Context, *Conn) (*Result, error)
+	SetAffinity(context.Context, *Affinity) (*Result, error)
+}
+
+func RegisterConfigurationServer(s *grpc.Server, srv ConfigurationServer) {
+	s.RegisterService(&_Configuration_serviceDesc, srv)
+}
+
+func _Configuration_SetConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(Conn)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ConfigurationServer).SetConnection(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/afrouter.Configuration/SetConnection",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ConfigurationServer).SetConnection(ctx, req.(*Conn))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Configuration_SetAffinity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(Affinity)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ConfigurationServer).SetAffinity(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/afrouter.Configuration/SetAffinity",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ConfigurationServer).SetAffinity(ctx, req.(*Affinity))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+var _Configuration_serviceDesc = grpc.ServiceDesc{
+	ServiceName: "afrouter.Configuration",
+	HandlerType: (*ConfigurationServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "SetConnection",
+			Handler:    _Configuration_SetConnection_Handler,
+		},
+		{
+			MethodName: "SetAffinity",
+			Handler:    _Configuration_SetAffinity_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "voltha_protos/afrouter.proto",
+}
+
+func init() {
+	proto.RegisterFile("voltha_protos/afrouter.proto", fileDescriptor_afrouter_bf0ddf9ad3e54d0f)
+}
+
+var fileDescriptor_afrouter_bf0ddf9ad3e54d0f = []byte{
+	// 342 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xc1, 0x6a, 0xe3, 0x30,
+	0x10, 0x86, 0xd7, 0x89, 0xe3, 0x38, 0xb3, 0x24, 0x04, 0xb1, 0x2c, 0x62, 0x59, 0x4a, 0xf0, 0x29,
+	0x97, 0xc4, 0xd0, 0x50, 0xe8, 0xb5, 0xcd, 0x1b, 0x38, 0xb7, 0x5e, 0x8a, 0x23, 0xcb, 0x8e, 0x49,
+	0xaa, 0x31, 0x92, 0x6c, 0x28, 0xed, 0xb3, 0xf5, 0xd9, 0x8a, 0x24, 0x2b, 0x49, 0xa1, 0xbd, 0xcd,
+	0xf7, 0x8f, 0x07, 0xff, 0xbf, 0x66, 0xe0, 0x7f, 0x87, 0x27, 0x7d, 0xc8, 0x9f, 0x1b, 0x89, 0x1a,
+	0x55, 0x9a, 0x97, 0x12, 0x5b, 0xcd, 0xe5, 0xda, 0x32, 0x89, 0x3d, 0x27, 0xf7, 0x10, 0x65, 0x5c,
+	0xb5, 0x27, 0x4d, 0x28, 0x8c, 0x55, 0xcb, 0x18, 0x57, 0x8a, 0x06, 0x8b, 0x60, 0x19, 0x67, 0x1e,
+	0xc9, 0x1f, 0x18, 0x71, 0x29, 0x51, 0xd2, 0xc1, 0x22, 0x58, 0x4e, 0x32, 0x07, 0xc9, 0x47, 0x00,
+	0xe1, 0x16, 0x85, 0x20, 0x7f, 0x21, 0x52, 0x5c, 0x76, 0x5c, 0xda, 0xb9, 0x49, 0xd6, 0x13, 0x99,
+	0xc3, 0xb0, 0x39, 0x56, 0xfd, 0x90, 0x29, 0x8d, 0xa2, 0x3a, 0x46, 0x87, 0x4e, 0x51, 0x1d, 0x33,
+	0x3f, 0x65, 0xa7, 0x56, 0x69, 0x2e, 0x69, 0x68, 0x55, 0x8f, 0xa6, 0xb3, 0xcf, 0xd9, 0x91, 0x8b,
+	0x82, 0x8e, 0x5c, 0xa7, 0x47, 0x72, 0x03, 0xc0, 0x50, 0x08, 0xce, 0x74, 0x8d, 0x82, 0x46, 0xb6,
+	0x79, 0xa5, 0x10, 0x02, 0x61, 0x5e, 0x14, 0x92, 0x8e, 0x6d, 0xc7, 0xd6, 0x46, 0x6b, 0x50, 0x6a,
+	0x1a, 0x2f, 0x82, 0x65, 0x98, 0xd9, 0x3a, 0x79, 0x87, 0xf8, 0xa1, 0x2c, 0x6b, 0x51, 0xeb, 0x57,
+	0x93, 0xc1, 0x3d, 0x88, 0xcf, 0xe0, 0xc8, 0x44, 0xb7, 0x95, 0x8f, 0x6e, 0xe1, 0xda, 0xf5, 0xf0,
+	0x47, 0xd7, 0xe1, 0x57, 0xd7, 0x33, 0x18, 0xd4, 0x3e, 0xca, 0xa0, 0x2e, 0x6e, 0xdf, 0x60, 0xba,
+	0x45, 0x51, 0xd6, 0x55, 0x2b, 0x73, 0x6b, 0x7b, 0x03, 0xd3, 0x1d, 0xd7, 0xdb, 0x4b, 0x8e, 0xd9,
+	0xfa, 0xbc, 0x35, 0xa3, 0xfe, 0x9b, 0x5f, 0xd8, 0xad, 0x2c, 0xf9, 0x45, 0xee, 0xe0, 0xf7, 0x8e,
+	0xeb, 0x73, 0x0c, 0x72, 0xf9, 0xc4, 0x6b, 0xdf, 0x8d, 0x3d, 0xa6, 0x4f, 0xab, 0xaa, 0xd6, 0x87,
+	0x76, 0xbf, 0x66, 0xf8, 0x92, 0x62, 0xc3, 0x05, 0x43, 0x59, 0xa4, 0xee, 0x66, 0x56, 0xfd, 0xcd,
+	0x54, 0x78, 0x3e, 0x9b, 0x7d, 0x64, 0xb5, 0xcd, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x09,
+	0xb0, 0xd2, 0x57, 0x02, 0x00, 0x00,
+}
diff --git a/go/afrouter/afrouter.proto b/go/afrouter/afrouter.proto
deleted file mode 100644
index d5e09b2..0000000
--- a/go/afrouter/afrouter.proto
+++ /dev/null
@@ -1,36 +0,0 @@
-// protoc -I echo/ echo/*.proto --go_out=plugins=grpc:echo
-
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/afrouter";
-
-package afrouter;
-
-service Configuration {
-    rpc SetConnection (Conn) returns (Result) {}
-	rpc SetAffinity(Affinity) returns (Result) {}
-}
-
-message Result {
-	bool success = 1;
-	string error = 2;
-}
-
-message Conn {
-	string server = 1;
-	string pkg = 2;
-	string svc = 3;
-	string cluster = 4;
-	string backend = 5;
-	string connection = 6;
-	string addr = 7;
-	uint64 port = 8;
-}
-
-message Affinity {
-	string router = 1;
-	string route = 2;
-	string cluster = 3;
-	string backend = 4;
-	string id = 5;
-}
diff --git a/go/common/common.pb.go b/go/common/common.pb.go
new file mode 100644
index 0000000..169cd74
--- /dev/null
+++ b/go/common/common.pb.go
@@ -0,0 +1,520 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/common.proto
+
+package common // import "github.com/opencord/voltha-protos/go/common"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type TestModeKeys int32
+
+const (
+	TestModeKeys_api_test TestModeKeys = 0
+)
+
+var TestModeKeys_name = map[int32]string{
+	0: "api_test",
+}
+var TestModeKeys_value = map[string]int32{
+	"api_test": 0,
+}
+
+func (x TestModeKeys) String() string {
+	return proto.EnumName(TestModeKeys_name, int32(x))
+}
+func (TestModeKeys) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_common_87dc80f46ec1fd6b, []int{0}
+}
+
+// Logging verbosity level
+type LogLevel_LogLevel int32
+
+const (
+	LogLevel_DEBUG    LogLevel_LogLevel = 0
+	LogLevel_INFO     LogLevel_LogLevel = 1
+	LogLevel_WARNING  LogLevel_LogLevel = 2
+	LogLevel_ERROR    LogLevel_LogLevel = 3
+	LogLevel_CRITICAL LogLevel_LogLevel = 4
+	LogLevel_FATAL    LogLevel_LogLevel = 5
+)
+
+var LogLevel_LogLevel_name = map[int32]string{
+	0: "DEBUG",
+	1: "INFO",
+	2: "WARNING",
+	3: "ERROR",
+	4: "CRITICAL",
+	5: "FATAL",
+}
+var LogLevel_LogLevel_value = map[string]int32{
+	"DEBUG":    0,
+	"INFO":     1,
+	"WARNING":  2,
+	"ERROR":    3,
+	"CRITICAL": 4,
+	"FATAL":    5,
+}
+
+func (x LogLevel_LogLevel) String() string {
+	return proto.EnumName(LogLevel_LogLevel_name, int32(x))
+}
+func (LogLevel_LogLevel) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_common_87dc80f46ec1fd6b, []int{2, 0}
+}
+
+// Administrative State
+type AdminState_AdminState int32
+
+const (
+	// The administrative state of the device is unknown
+	AdminState_UNKNOWN AdminState_AdminState = 0
+	// The device is pre-provisioned into Voltha, but not contacted by it
+	AdminState_PREPROVISIONED AdminState_AdminState = 1
+	// The device is enabled for activation and operation
+	AdminState_ENABLED AdminState_AdminState = 2
+	// The device is disabled and shall not perform its intended forwarding
+	// functions other than being available for re-activation.
+	AdminState_DISABLED AdminState_AdminState = 3
+	// The device is in the state of image download
+	AdminState_DOWNLOADING_IMAGE AdminState_AdminState = 4
+	// The device is marked to be deleted
+	AdminState_DELETED AdminState_AdminState = 5
+)
+
+var AdminState_AdminState_name = map[int32]string{
+	0: "UNKNOWN",
+	1: "PREPROVISIONED",
+	2: "ENABLED",
+	3: "DISABLED",
+	4: "DOWNLOADING_IMAGE",
+	5: "DELETED",
+}
+var AdminState_AdminState_value = map[string]int32{
+	"UNKNOWN":           0,
+	"PREPROVISIONED":    1,
+	"ENABLED":           2,
+	"DISABLED":          3,
+	"DOWNLOADING_IMAGE": 4,
+	"DELETED":           5,
+}
+
+func (x AdminState_AdminState) String() string {
+	return proto.EnumName(AdminState_AdminState_name, int32(x))
+}
+func (AdminState_AdminState) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_common_87dc80f46ec1fd6b, []int{3, 0}
+}
+
+// Operational Status
+type OperStatus_OperStatus int32
+
+const (
+	// The status of the device is unknown at this point
+	OperStatus_UNKNOWN OperStatus_OperStatus = 0
+	// The device has been discovered, but not yet activated
+	OperStatus_DISCOVERED OperStatus_OperStatus = 1
+	// The device is being activated (booted, rebooted, upgraded, etc.)
+	OperStatus_ACTIVATING OperStatus_OperStatus = 2
+	// Service impacting tests are being conducted
+	OperStatus_TESTING OperStatus_OperStatus = 3
+	// The device is up and active
+	OperStatus_ACTIVE OperStatus_OperStatus = 4
+	// The device has failed and cannot fulfill its intended role
+	OperStatus_FAILED OperStatus_OperStatus = 5
+)
+
+var OperStatus_OperStatus_name = map[int32]string{
+	0: "UNKNOWN",
+	1: "DISCOVERED",
+	2: "ACTIVATING",
+	3: "TESTING",
+	4: "ACTIVE",
+	5: "FAILED",
+}
+var OperStatus_OperStatus_value = map[string]int32{
+	"UNKNOWN":    0,
+	"DISCOVERED": 1,
+	"ACTIVATING": 2,
+	"TESTING":    3,
+	"ACTIVE":     4,
+	"FAILED":     5,
+}
+
+func (x OperStatus_OperStatus) String() string {
+	return proto.EnumName(OperStatus_OperStatus_name, int32(x))
+}
+func (OperStatus_OperStatus) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_common_87dc80f46ec1fd6b, []int{4, 0}
+}
+
+// Connectivity Status
+type ConnectStatus_ConnectStatus int32
+
+const (
+	// The device connectivity status is unknown
+	ConnectStatus_UNKNOWN ConnectStatus_ConnectStatus = 0
+	// The device cannot be reached by Voltha
+	ConnectStatus_UNREACHABLE ConnectStatus_ConnectStatus = 1
+	// There is live communication between device and Voltha
+	ConnectStatus_REACHABLE ConnectStatus_ConnectStatus = 2
+)
+
+var ConnectStatus_ConnectStatus_name = map[int32]string{
+	0: "UNKNOWN",
+	1: "UNREACHABLE",
+	2: "REACHABLE",
+}
+var ConnectStatus_ConnectStatus_value = map[string]int32{
+	"UNKNOWN":     0,
+	"UNREACHABLE": 1,
+	"REACHABLE":   2,
+}
+
+func (x ConnectStatus_ConnectStatus) String() string {
+	return proto.EnumName(ConnectStatus_ConnectStatus_name, int32(x))
+}
+func (ConnectStatus_ConnectStatus) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_common_87dc80f46ec1fd6b, []int{5, 0}
+}
+
+type OperationResp_OperationReturnCode int32
+
+const (
+	OperationResp_OPERATION_SUCCESS     OperationResp_OperationReturnCode = 0
+	OperationResp_OPERATION_FAILURE     OperationResp_OperationReturnCode = 1
+	OperationResp_OPERATION_UNSUPPORTED OperationResp_OperationReturnCode = 2
+)
+
+var OperationResp_OperationReturnCode_name = map[int32]string{
+	0: "OPERATION_SUCCESS",
+	1: "OPERATION_FAILURE",
+	2: "OPERATION_UNSUPPORTED",
+}
+var OperationResp_OperationReturnCode_value = map[string]int32{
+	"OPERATION_SUCCESS":     0,
+	"OPERATION_FAILURE":     1,
+	"OPERATION_UNSUPPORTED": 2,
+}
+
+func (x OperationResp_OperationReturnCode) String() string {
+	return proto.EnumName(OperationResp_OperationReturnCode_name, int32(x))
+}
+func (OperationResp_OperationReturnCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_common_87dc80f46ec1fd6b, []int{6, 0}
+}
+
+// Convey a resource identifier
+type ID struct {
+	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *ID) Reset()         { *m = ID{} }
+func (m *ID) String() string { return proto.CompactTextString(m) }
+func (*ID) ProtoMessage()    {}
+func (*ID) Descriptor() ([]byte, []int) {
+	return fileDescriptor_common_87dc80f46ec1fd6b, []int{0}
+}
+func (m *ID) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_ID.Unmarshal(m, b)
+}
+func (m *ID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_ID.Marshal(b, m, deterministic)
+}
+func (dst *ID) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ID.Merge(dst, src)
+}
+func (m *ID) XXX_Size() int {
+	return xxx_messageInfo_ID.Size(m)
+}
+func (m *ID) XXX_DiscardUnknown() {
+	xxx_messageInfo_ID.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ID proto.InternalMessageInfo
+
+func (m *ID) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+// Represents a list of IDs
+type IDs struct {
+	Items                []*ID    `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *IDs) Reset()         { *m = IDs{} }
+func (m *IDs) String() string { return proto.CompactTextString(m) }
+func (*IDs) ProtoMessage()    {}
+func (*IDs) Descriptor() ([]byte, []int) {
+	return fileDescriptor_common_87dc80f46ec1fd6b, []int{1}
+}
+func (m *IDs) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_IDs.Unmarshal(m, b)
+}
+func (m *IDs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_IDs.Marshal(b, m, deterministic)
+}
+func (dst *IDs) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_IDs.Merge(dst, src)
+}
+func (m *IDs) XXX_Size() int {
+	return xxx_messageInfo_IDs.Size(m)
+}
+func (m *IDs) XXX_DiscardUnknown() {
+	xxx_messageInfo_IDs.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_IDs proto.InternalMessageInfo
+
+func (m *IDs) GetItems() []*ID {
+	if m != nil {
+		return m.Items
+	}
+	return nil
+}
+
+type LogLevel struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *LogLevel) Reset()         { *m = LogLevel{} }
+func (m *LogLevel) String() string { return proto.CompactTextString(m) }
+func (*LogLevel) ProtoMessage()    {}
+func (*LogLevel) Descriptor() ([]byte, []int) {
+	return fileDescriptor_common_87dc80f46ec1fd6b, []int{2}
+}
+func (m *LogLevel) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_LogLevel.Unmarshal(m, b)
+}
+func (m *LogLevel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_LogLevel.Marshal(b, m, deterministic)
+}
+func (dst *LogLevel) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_LogLevel.Merge(dst, src)
+}
+func (m *LogLevel) XXX_Size() int {
+	return xxx_messageInfo_LogLevel.Size(m)
+}
+func (m *LogLevel) XXX_DiscardUnknown() {
+	xxx_messageInfo_LogLevel.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogLevel proto.InternalMessageInfo
+
+type AdminState struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *AdminState) Reset()         { *m = AdminState{} }
+func (m *AdminState) String() string { return proto.CompactTextString(m) }
+func (*AdminState) ProtoMessage()    {}
+func (*AdminState) Descriptor() ([]byte, []int) {
+	return fileDescriptor_common_87dc80f46ec1fd6b, []int{3}
+}
+func (m *AdminState) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AdminState.Unmarshal(m, b)
+}
+func (m *AdminState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AdminState.Marshal(b, m, deterministic)
+}
+func (dst *AdminState) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AdminState.Merge(dst, src)
+}
+func (m *AdminState) XXX_Size() int {
+	return xxx_messageInfo_AdminState.Size(m)
+}
+func (m *AdminState) XXX_DiscardUnknown() {
+	xxx_messageInfo_AdminState.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AdminState proto.InternalMessageInfo
+
+type OperStatus struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OperStatus) Reset()         { *m = OperStatus{} }
+func (m *OperStatus) String() string { return proto.CompactTextString(m) }
+func (*OperStatus) ProtoMessage()    {}
+func (*OperStatus) Descriptor() ([]byte, []int) {
+	return fileDescriptor_common_87dc80f46ec1fd6b, []int{4}
+}
+func (m *OperStatus) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OperStatus.Unmarshal(m, b)
+}
+func (m *OperStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OperStatus.Marshal(b, m, deterministic)
+}
+func (dst *OperStatus) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OperStatus.Merge(dst, src)
+}
+func (m *OperStatus) XXX_Size() int {
+	return xxx_messageInfo_OperStatus.Size(m)
+}
+func (m *OperStatus) XXX_DiscardUnknown() {
+	xxx_messageInfo_OperStatus.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OperStatus proto.InternalMessageInfo
+
+type ConnectStatus struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *ConnectStatus) Reset()         { *m = ConnectStatus{} }
+func (m *ConnectStatus) String() string { return proto.CompactTextString(m) }
+func (*ConnectStatus) ProtoMessage()    {}
+func (*ConnectStatus) Descriptor() ([]byte, []int) {
+	return fileDescriptor_common_87dc80f46ec1fd6b, []int{5}
+}
+func (m *ConnectStatus) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_ConnectStatus.Unmarshal(m, b)
+}
+func (m *ConnectStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_ConnectStatus.Marshal(b, m, deterministic)
+}
+func (dst *ConnectStatus) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ConnectStatus.Merge(dst, src)
+}
+func (m *ConnectStatus) XXX_Size() int {
+	return xxx_messageInfo_ConnectStatus.Size(m)
+}
+func (m *ConnectStatus) XXX_DiscardUnknown() {
+	xxx_messageInfo_ConnectStatus.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ConnectStatus proto.InternalMessageInfo
+
+type OperationResp struct {
+	// Return code
+	Code OperationResp_OperationReturnCode `protobuf:"varint,1,opt,name=code,proto3,enum=voltha.OperationResp_OperationReturnCode" json:"code,omitempty"`
+	// Additional Info
+	AdditionalInfo       string   `protobuf:"bytes,2,opt,name=additional_info,json=additionalInfo,proto3" json:"additional_info,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OperationResp) Reset()         { *m = OperationResp{} }
+func (m *OperationResp) String() string { return proto.CompactTextString(m) }
+func (*OperationResp) ProtoMessage()    {}
+func (*OperationResp) Descriptor() ([]byte, []int) {
+	return fileDescriptor_common_87dc80f46ec1fd6b, []int{6}
+}
+func (m *OperationResp) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OperationResp.Unmarshal(m, b)
+}
+func (m *OperationResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OperationResp.Marshal(b, m, deterministic)
+}
+func (dst *OperationResp) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OperationResp.Merge(dst, src)
+}
+func (m *OperationResp) XXX_Size() int {
+	return xxx_messageInfo_OperationResp.Size(m)
+}
+func (m *OperationResp) XXX_DiscardUnknown() {
+	xxx_messageInfo_OperationResp.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OperationResp proto.InternalMessageInfo
+
+func (m *OperationResp) GetCode() OperationResp_OperationReturnCode {
+	if m != nil {
+		return m.Code
+	}
+	return OperationResp_OPERATION_SUCCESS
+}
+
+func (m *OperationResp) GetAdditionalInfo() string {
+	if m != nil {
+		return m.AdditionalInfo
+	}
+	return ""
+}
+
+func init() {
+	proto.RegisterType((*ID)(nil), "voltha.ID")
+	proto.RegisterType((*IDs)(nil), "voltha.IDs")
+	proto.RegisterType((*LogLevel)(nil), "voltha.LogLevel")
+	proto.RegisterType((*AdminState)(nil), "voltha.AdminState")
+	proto.RegisterType((*OperStatus)(nil), "voltha.OperStatus")
+	proto.RegisterType((*ConnectStatus)(nil), "voltha.ConnectStatus")
+	proto.RegisterType((*OperationResp)(nil), "voltha.OperationResp")
+	proto.RegisterEnum("voltha.TestModeKeys", TestModeKeys_name, TestModeKeys_value)
+	proto.RegisterEnum("voltha.LogLevel_LogLevel", LogLevel_LogLevel_name, LogLevel_LogLevel_value)
+	proto.RegisterEnum("voltha.AdminState_AdminState", AdminState_AdminState_name, AdminState_AdminState_value)
+	proto.RegisterEnum("voltha.OperStatus_OperStatus", OperStatus_OperStatus_name, OperStatus_OperStatus_value)
+	proto.RegisterEnum("voltha.ConnectStatus_ConnectStatus", ConnectStatus_ConnectStatus_name, ConnectStatus_ConnectStatus_value)
+	proto.RegisterEnum("voltha.OperationResp_OperationReturnCode", OperationResp_OperationReturnCode_name, OperationResp_OperationReturnCode_value)
+}
+
+func init() { proto.RegisterFile("voltha_protos/common.proto", fileDescriptor_common_87dc80f46ec1fd6b) }
+
+var fileDescriptor_common_87dc80f46ec1fd6b = []byte{
+	// 564 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0x5f, 0x4f, 0xdb, 0x3e,
+	0x14, 0x6d, 0xd2, 0x3f, 0xc0, 0x2d, 0x94, 0xfc, 0xfc, 0x1b, 0x12, 0x43, 0x9b, 0x54, 0xe5, 0x05,
+	0xb6, 0x89, 0x22, 0xb1, 0xb7, 0x69, 0x7b, 0x30, 0x89, 0xe9, 0x2c, 0x82, 0x5d, 0x39, 0x09, 0x48,
+	0x7b, 0xa0, 0x0a, 0x8d, 0x29, 0x91, 0xda, 0x38, 0x6a, 0x0c, 0x12, 0x8f, 0xfb, 0x80, 0xfb, 0x0a,
+	0xfb, 0x0c, 0x7b, 0xda, 0xf3, 0xe4, 0x04, 0xd4, 0x76, 0xda, 0x5b, 0xce, 0x39, 0xd7, 0xf7, 0xf8,
+	0xe4, 0x5e, 0xc3, 0xc1, 0xa3, 0x9a, 0xe9, 0xfb, 0x64, 0x5c, 0x2c, 0x94, 0x56, 0xe5, 0xc9, 0x44,
+	0xcd, 0xe7, 0x2a, 0x1f, 0x54, 0x08, 0x75, 0x6a, 0xed, 0xa0, 0xbf, 0x5e, 0xf3, 0x94, 0xe4, 0xd3,
+	0xb1, 0x2a, 0x74, 0xa6, 0xf2, 0xb2, 0xae, 0x74, 0x5f, 0x81, 0x4d, 0x7d, 0xd4, 0x03, 0x3b, 0x4b,
+	0xf7, 0xad, 0xbe, 0x75, 0xb4, 0x25, 0xec, 0x2c, 0x75, 0x0f, 0xa1, 0x49, 0xfd, 0x12, 0xf5, 0xa1,
+	0x9d, 0x69, 0x39, 0x2f, 0xf7, 0xad, 0x7e, 0xf3, 0xa8, 0x7b, 0x0a, 0x83, 0xba, 0xdd, 0x80, 0xfa,
+	0xa2, 0x16, 0xdc, 0x09, 0x6c, 0x06, 0x6a, 0x1a, 0xc8, 0x47, 0x39, 0x73, 0x47, 0xcb, 0x6f, 0xb4,
+	0x05, 0x6d, 0x9f, 0x9c, 0xc5, 0x43, 0xa7, 0x81, 0x36, 0xa1, 0x45, 0xd9, 0x39, 0x77, 0x2c, 0xd4,
+	0x85, 0x8d, 0x6b, 0x2c, 0x18, 0x65, 0x43, 0xc7, 0x36, 0x15, 0x44, 0x08, 0x2e, 0x9c, 0x26, 0xda,
+	0x86, 0x4d, 0x4f, 0xd0, 0x88, 0x7a, 0x38, 0x70, 0x5a, 0x46, 0x38, 0xc7, 0x11, 0x0e, 0x9c, 0xf6,
+	0xa7, 0xf6, 0xaf, 0xdf, 0x3f, 0xde, 0x36, 0xdc, 0xef, 0x16, 0x00, 0x4e, 0xe7, 0x59, 0x1e, 0xea,
+	0x44, 0x4b, 0x77, 0xb6, 0x8a, 0x4c, 0xd3, 0x98, 0x5d, 0x30, 0x7e, 0xcd, 0x9c, 0x06, 0x42, 0xd0,
+	0x1b, 0x09, 0x32, 0x12, 0xfc, 0x8a, 0x86, 0x94, 0x33, 0xe2, 0xd7, 0xae, 0x84, 0xe1, 0xb3, 0x80,
+	0xf8, 0x8e, 0x6d, 0xac, 0x7c, 0x1a, 0xd6, 0xa8, 0x89, 0xf6, 0xe0, 0x3f, 0x9f, 0x5f, 0xb3, 0x80,
+	0x63, 0x9f, 0xb2, 0xe1, 0x98, 0x5e, 0xe2, 0x21, 0x71, 0x5a, 0xe6, 0x84, 0x4f, 0x02, 0x12, 0x11,
+	0x7f, 0x79, 0x87, 0x12, 0x80, 0x17, 0x72, 0x61, 0x3c, 0x1f, 0x4a, 0xf7, 0x66, 0x15, 0xad, 0x5f,
+	0xa1, 0x07, 0xe0, 0xd3, 0xd0, 0xe3, 0x57, 0x44, 0x54, 0xf6, 0x3d, 0x00, 0xec, 0x45, 0xf4, 0x0a,
+	0x47, 0x75, 0xee, 0x2e, 0x6c, 0x44, 0x24, 0xac, 0x40, 0x13, 0x01, 0x74, 0x2a, 0xd1, 0xb8, 0x02,
+	0x74, 0xce, 0x31, 0x0d, 0x56, 0x4d, 0x23, 0xd8, 0xf1, 0x54, 0x9e, 0xcb, 0x89, 0x7e, 0xf6, 0xfd,
+	0xfc, 0x17, 0xb1, 0x6e, 0xbd, 0x0b, 0xdd, 0x98, 0x09, 0x82, 0xbd, 0xaf, 0x26, 0xa0, 0x63, 0xa1,
+	0x1d, 0xd8, 0x5a, 0x42, 0xfb, 0xa5, 0xeb, 0x4f, 0x0b, 0x76, 0xcc, 0xed, 0x13, 0xb3, 0x07, 0x42,
+	0x96, 0x05, 0xfa, 0x02, 0xad, 0x89, 0x4a, 0x65, 0xb5, 0x00, 0xbd, 0xd3, 0x77, 0x2f, 0x63, 0x5e,
+	0x2b, 0x5a, 0x45, 0xfa, 0x61, 0x91, 0x7b, 0x2a, 0x95, 0xa2, 0x3a, 0x86, 0x0e, 0x61, 0x37, 0x49,
+	0xd3, 0xcc, 0x68, 0xc9, 0x6c, 0x9c, 0xe5, 0x77, 0x6a, 0xdf, 0xae, 0x56, 0xa9, 0xb7, 0xa4, 0x69,
+	0x7e, 0xa7, 0xdc, 0x1b, 0xf8, 0xff, 0x1f, 0x5d, 0xcc, 0x18, 0xf8, 0x88, 0x08, 0x1c, 0x51, 0xce,
+	0xc6, 0x61, 0xec, 0x79, 0x24, 0x0c, 0x9d, 0xc6, 0x3a, 0x6d, 0x7e, 0x4d, 0x2c, 0x4c, 0xa8, 0xd7,
+	0xb0, 0xb7, 0xa4, 0x63, 0x16, 0xc6, 0xa3, 0x11, 0x17, 0x66, 0x56, 0x2f, 0x01, 0xdf, 0xbf, 0x81,
+	0xed, 0x48, 0x96, 0xfa, 0x52, 0xa5, 0xf2, 0x42, 0x3e, 0x95, 0x66, 0xe8, 0x49, 0x91, 0x8d, 0xb5,
+	0x2c, 0xb5, 0xd3, 0x38, 0x3b, 0xfe, 0xf6, 0x61, 0x9a, 0xe9, 0xfb, 0x87, 0xdb, 0xc1, 0x44, 0xcd,
+	0x4f, 0x54, 0x21, 0xf3, 0x89, 0x5a, 0xa4, 0x27, 0x75, 0xe6, 0xe3, 0xe7, 0x97, 0x32, 0x55, 0xcf,
+	0x0f, 0xea, 0xb6, 0x53, 0x31, 0x1f, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x0d, 0x0e, 0x19,
+	0x6f, 0x03, 0x00, 0x00,
+}
diff --git a/go/common/common.proto b/go/common/common.proto
deleted file mode 100644
index 24c3c46..0000000
--- a/go/common/common.proto
+++ /dev/null
@@ -1,122 +0,0 @@
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/common";
-
-package voltha;
-
-import "voltha_protos/yang_options.proto";
-
-// Convey a resource identifier
-message ID {
-    string id = 1;
-}
-
-// Represents a list of IDs
-message IDs {
-    repeated ID items = 1;
-}
-
-enum TestModeKeys {
-    api_test=0;
-}
-
-message LogLevel {
-    option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
-
-    // Logging verbosity level
-    enum LogLevel {
-        DEBUG = 0;
-        INFO = 1;
-        WARNING = 2;
-        ERROR = 3;
-        CRITICAL = 4;
-        FATAL = 5;
-    }
-}
-
-message AdminState {
-    option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
-
-    // Administrative State
-    enum AdminState {
-
-        // The administrative state of the device is unknown
-        UNKNOWN = 0;
-
-        // The device is pre-provisioned into Voltha, but not contacted by it
-        PREPROVISIONED = 1;
-
-        // The device is enabled for activation and operation
-        ENABLED = 2;
-
-        // The device is disabled and shall not perform its intended forwarding
-        // functions other than being available for re-activation.
-        DISABLED = 3;
-
-        // The device is in the state of image download
-        DOWNLOADING_IMAGE = 4;
-
-        // The device is marked to be deleted
-        DELETED = 5;
-    }
-}
-
-message OperStatus {
-    option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
-
-    // Operational Status
-    enum OperStatus {
-
-        // The status of the device is unknown at this point
-        UNKNOWN = 0;
-
-        // The device has been discovered, but not yet activated
-        DISCOVERED = 1;
-
-        // The device is being activated (booted, rebooted, upgraded, etc.)
-        ACTIVATING = 2;
-
-        // Service impacting tests are being conducted
-        TESTING = 3;
-
-        // The device is up and active
-        ACTIVE = 4;
-
-        // The device has failed and cannot fulfill its intended role
-        FAILED = 5;
-    }
-}
-
-message ConnectStatus {
-    option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
-
-    // Connectivity Status
-    enum ConnectStatus {
-
-        // The device connectivity status is unknown
-        UNKNOWN = 0;
-
-        // The device cannot be reached by Voltha
-        UNREACHABLE = 1;
-
-        // There is live communication between device and Voltha
-        REACHABLE = 2;
-    }
-}
-
-message OperationResp {
-    option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
-
-    enum OperationReturnCode {
-        OPERATION_SUCCESS = 0;
-        OPERATION_FAILURE = 1;
-        OPERATION_UNSUPPORTED = 2;
-    }
-    // Return code
-    OperationReturnCode code = 1;
-
-    // Additional Info
-    string additional_info = 2;
-}
-
-
diff --git a/go/common/meta.pb.go b/go/common/meta.pb.go
new file mode 100644
index 0000000..b8b9181
--- /dev/null
+++ b/go/common/meta.pb.go
@@ -0,0 +1,136 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/meta.proto
+
+package common // import "github.com/opencord/voltha-protos/go/common"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type Access int32
+
+const (
+	// read-write, stored attribute
+	Access_CONFIG Access = 0
+	// read-only field, stored with the model, covered by its hash
+	Access_READ_ONLY Access = 1
+	// A read-only attribute that is not stored in the model, not covered
+	// by its hash, its value is filled real-time upon each request.
+	Access_REAL_TIME Access = 2
+)
+
+var Access_name = map[int32]string{
+	0: "CONFIG",
+	1: "READ_ONLY",
+	2: "REAL_TIME",
+}
+var Access_value = map[string]int32{
+	"CONFIG":    0,
+	"READ_ONLY": 1,
+	"REAL_TIME": 2,
+}
+
+func (x Access) String() string {
+	return proto.EnumName(Access_name, int32(x))
+}
+func (Access) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_meta_7d0d80d5e7f91838, []int{0}
+}
+
+type ChildNode struct {
+	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *ChildNode) Reset()         { *m = ChildNode{} }
+func (m *ChildNode) String() string { return proto.CompactTextString(m) }
+func (*ChildNode) ProtoMessage()    {}
+func (*ChildNode) Descriptor() ([]byte, []int) {
+	return fileDescriptor_meta_7d0d80d5e7f91838, []int{0}
+}
+func (m *ChildNode) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_ChildNode.Unmarshal(m, b)
+}
+func (m *ChildNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_ChildNode.Marshal(b, m, deterministic)
+}
+func (dst *ChildNode) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ChildNode.Merge(dst, src)
+}
+func (m *ChildNode) XXX_Size() int {
+	return xxx_messageInfo_ChildNode.Size(m)
+}
+func (m *ChildNode) XXX_DiscardUnknown() {
+	xxx_messageInfo_ChildNode.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ChildNode proto.InternalMessageInfo
+
+func (m *ChildNode) GetKey() string {
+	if m != nil {
+		return m.Key
+	}
+	return ""
+}
+
+var E_ChildNode = &proto.ExtensionDesc{
+	ExtendedType:  (*descriptor.FieldOptions)(nil),
+	ExtensionType: (*ChildNode)(nil),
+	Field:         7761772,
+	Name:          "voltha.child_node",
+	Tag:           "bytes,7761772,opt,name=child_node,json=childNode",
+	Filename:      "voltha_protos/meta.proto",
+}
+
+var E_Access = &proto.ExtensionDesc{
+	ExtendedType:  (*descriptor.FieldOptions)(nil),
+	ExtensionType: (*Access)(nil),
+	Field:         7761773,
+	Name:          "voltha.access",
+	Tag:           "varint,7761773,opt,name=access,enum=voltha.Access",
+	Filename:      "voltha_protos/meta.proto",
+}
+
+func init() {
+	proto.RegisterType((*ChildNode)(nil), "voltha.ChildNode")
+	proto.RegisterEnum("voltha.Access", Access_name, Access_value)
+	proto.RegisterExtension(E_ChildNode)
+	proto.RegisterExtension(E_Access)
+}
+
+func init() { proto.RegisterFile("voltha_protos/meta.proto", fileDescriptor_meta_7d0d80d5e7f91838) }
+
+var fileDescriptor_meta_7d0d80d5e7f91838 = []byte{
+	// 271 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0x41, 0x4b, 0x84, 0x40,
+	0x18, 0x86, 0xb3, 0x05, 0xc1, 0x2f, 0x5a, 0xcc, 0x93, 0x04, 0x0b, 0xd2, 0x69, 0x29, 0x76, 0x06,
+	0xec, 0xb6, 0xb7, 0x6d, 0xdb, 0xad, 0x85, 0x4d, 0x41, 0xba, 0xd4, 0x45, 0x74, 0x9c, 0x74, 0x48,
+	0xfd, 0xc4, 0x99, 0x0d, 0xfa, 0xa9, 0x5d, 0xfa, 0x05, 0xf5, 0x1f, 0x42, 0x47, 0xbb, 0xee, 0xed,
+	0x9d, 0x77, 0xde, 0x79, 0x78, 0x18, 0x70, 0x3f, 0xb0, 0x54, 0x45, 0x12, 0x37, 0x2d, 0x2a, 0x94,
+	0xb4, 0xe2, 0x2a, 0x21, 0x7d, 0x76, 0x4c, 0x7d, 0x73, 0xe9, 0xe5, 0x88, 0x79, 0xc9, 0x69, 0xdf,
+	0xa6, 0x87, 0x37, 0x9a, 0x71, 0xc9, 0x5a, 0xd1, 0x28, 0x6c, 0xf5, 0xf2, 0x6a, 0x06, 0xd6, 0xba,
+	0x10, 0x65, 0x16, 0x60, 0xc6, 0x1d, 0x1b, 0x26, 0xef, 0xfc, 0xd3, 0x35, 0x3c, 0x63, 0x6e, 0x45,
+	0x5d, 0xbc, 0xf6, 0xc1, 0x5c, 0x31, 0xc6, 0xa5, 0x74, 0x00, 0xcc, 0x75, 0x18, 0x6c, 0x77, 0x0f,
+	0xf6, 0x89, 0x73, 0x0e, 0x56, 0xb4, 0x59, 0xdd, 0xc7, 0x61, 0xb0, 0x7f, 0xb1, 0x8d, 0xe1, 0xb8,
+	0x8f, 0x9f, 0x77, 0x4f, 0x1b, 0xfb, 0x74, 0x19, 0x01, 0xb0, 0x0e, 0x19, 0xd7, 0x1d, 0x73, 0x46,
+	0xb4, 0x03, 0x19, 0x1d, 0xc8, 0x56, 0xf0, 0x32, 0x0b, 0x1b, 0x25, 0xb0, 0x96, 0xee, 0xcf, 0xf7,
+	0xd7, 0xc4, 0x33, 0xe6, 0x67, 0xfe, 0x05, 0xd1, 0xce, 0xe4, 0x5f, 0x27, 0xb2, 0xd8, 0x18, 0x97,
+	0x8f, 0x60, 0x26, 0xda, 0xe3, 0x08, 0xef, 0x57, 0xf3, 0xa6, 0xfe, 0x74, 0xe4, 0x69, 0xff, 0x68,
+	0x78, 0x7f, 0xb7, 0x78, 0xbd, 0xc9, 0x85, 0x2a, 0x0e, 0x29, 0x61, 0x58, 0x51, 0x6c, 0x78, 0xcd,
+	0xb0, 0xcd, 0xa8, 0x1e, 0x2f, 0x86, 0xaf, 0xcc, 0x91, 0x32, 0xac, 0x2a, 0xac, 0x53, 0xb3, 0x6f,
+	0x6e, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x90, 0x94, 0xed, 0x6c, 0x01, 0x00, 0x00,
+}
diff --git a/go/common/meta.proto b/go/common/meta.proto
deleted file mode 100644
index a308ffa..0000000
--- a/go/common/meta.proto
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2015, Google Inc.
-//
-// 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.
-
-// This file contains annotation definitions that can be used to describe
-// a configuration tree.
-
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/common";
-
-package voltha;
-
-import "google/protobuf/descriptor.proto";
-
-message ChildNode {
-    string key = 1;
-}
-
-enum Access {
-
-    // read-write, stored attribute
-    CONFIG = 0;
-
-    // read-only field, stored with the model, covered by its hash
-    READ_ONLY = 1;
-
-    // A read-only attribute that is not stored in the model, not covered
-    // by its hash, its value is filled real-time upon each request.
-    REAL_TIME = 2;
-
-}
-
-extend google.protobuf.FieldOptions {
-
-    // If present, it indicates that this field is stored as external child node
-    // or children nodes in Voltha's internal configuration tree.
-    // If the field is a container field and if the option specifies a key
-    // the child objects will be addressible by that key.
-    ChildNode child_node = 7761772;
-
-    // This annotation can be used to indicate that a field is read-only,
-    // from the perspective of NBI access. Backend plugins and system
-    // internals can update the field but the update requests through the
-    // NBI will ignore for instance a field that is marked as read-only (RO).
-    Access access = 7761773;
-}
diff --git a/go/common/yang_options.pb.go b/go/common/yang_options.pb.go
new file mode 100644
index 0000000..dcd1e35
--- /dev/null
+++ b/go/common/yang_options.pb.go
@@ -0,0 +1,233 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/yang_options.proto
+
+package common // import "github.com/opencord/voltha-protos/go/common"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type MessageParserOption int32
+
+const (
+	// Move any enclosing child enum/message definition to the same level
+	// as the parent (this message) in the yang generated file
+	MessageParserOption_MOVE_TO_PARENT_LEVEL MessageParserOption = 0
+	// Create both a grouping and a container for this message.  The container
+	// name will be the message name.  The grouping name will be the message
+	// name prefixed with "grouping_"
+	MessageParserOption_CREATE_BOTH_GROUPING_AND_CONTAINER MessageParserOption = 1
+)
+
+var MessageParserOption_name = map[int32]string{
+	0: "MOVE_TO_PARENT_LEVEL",
+	1: "CREATE_BOTH_GROUPING_AND_CONTAINER",
+}
+var MessageParserOption_value = map[string]int32{
+	"MOVE_TO_PARENT_LEVEL":               0,
+	"CREATE_BOTH_GROUPING_AND_CONTAINER": 1,
+}
+
+func (x MessageParserOption) String() string {
+	return proto.EnumName(MessageParserOption_name, int32(x))
+}
+func (MessageParserOption) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_yang_options_40f3be6d35d15307, []int{0}
+}
+
+type InlineNode struct {
+	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	Type                 string   `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *InlineNode) Reset()         { *m = InlineNode{} }
+func (m *InlineNode) String() string { return proto.CompactTextString(m) }
+func (*InlineNode) ProtoMessage()    {}
+func (*InlineNode) Descriptor() ([]byte, []int) {
+	return fileDescriptor_yang_options_40f3be6d35d15307, []int{0}
+}
+func (m *InlineNode) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_InlineNode.Unmarshal(m, b)
+}
+func (m *InlineNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_InlineNode.Marshal(b, m, deterministic)
+}
+func (dst *InlineNode) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_InlineNode.Merge(dst, src)
+}
+func (m *InlineNode) XXX_Size() int {
+	return xxx_messageInfo_InlineNode.Size(m)
+}
+func (m *InlineNode) XXX_DiscardUnknown() {
+	xxx_messageInfo_InlineNode.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InlineNode proto.InternalMessageInfo
+
+func (m *InlineNode) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *InlineNode) GetType() string {
+	if m != nil {
+		return m.Type
+	}
+	return ""
+}
+
+type RpcReturnDef struct {
+	// The gRPC methods return message types.  NETCONF expects an actual
+	// attribute as defined in the YANG schema.  The xnl_tag will be used
+	// as the top most tag when translating a gRPC response into an xml
+	// response
+	XmlTag string `protobuf:"bytes,1,opt,name=xml_tag,json=xmlTag,proto3" json:"xml_tag,omitempty"`
+	// When the gRPC response is a list of items, we need to differentiate
+	// between a YANG schema attribute whose name is "items" and when "items"
+	// is used only to indicate a list of items is being returned.  The default
+	// behavior assumes a list is returned when "items" is present in
+	// the response.  This option will therefore be used when the attribute
+	// name in the YANG schema is 'items'
+	ListItemsName        string   `protobuf:"bytes,2,opt,name=list_items_name,json=listItemsName,proto3" json:"list_items_name,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *RpcReturnDef) Reset()         { *m = RpcReturnDef{} }
+func (m *RpcReturnDef) String() string { return proto.CompactTextString(m) }
+func (*RpcReturnDef) ProtoMessage()    {}
+func (*RpcReturnDef) Descriptor() ([]byte, []int) {
+	return fileDescriptor_yang_options_40f3be6d35d15307, []int{1}
+}
+func (m *RpcReturnDef) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_RpcReturnDef.Unmarshal(m, b)
+}
+func (m *RpcReturnDef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_RpcReturnDef.Marshal(b, m, deterministic)
+}
+func (dst *RpcReturnDef) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_RpcReturnDef.Merge(dst, src)
+}
+func (m *RpcReturnDef) XXX_Size() int {
+	return xxx_messageInfo_RpcReturnDef.Size(m)
+}
+func (m *RpcReturnDef) XXX_DiscardUnknown() {
+	xxx_messageInfo_RpcReturnDef.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_RpcReturnDef proto.InternalMessageInfo
+
+func (m *RpcReturnDef) GetXmlTag() string {
+	if m != nil {
+		return m.XmlTag
+	}
+	return ""
+}
+
+func (m *RpcReturnDef) GetListItemsName() string {
+	if m != nil {
+		return m.ListItemsName
+	}
+	return ""
+}
+
+var E_YangChildRule = &proto.ExtensionDesc{
+	ExtendedType:  (*descriptor.MessageOptions)(nil),
+	ExtensionType: (*MessageParserOption)(nil),
+	Field:         7761774,
+	Name:          "voltha.yang_child_rule",
+	Tag:           "varint,7761774,opt,name=yang_child_rule,json=yangChildRule,enum=voltha.MessageParserOption",
+	Filename:      "voltha_protos/yang_options.proto",
+}
+
+var E_YangMessageRule = &proto.ExtensionDesc{
+	ExtendedType:  (*descriptor.MessageOptions)(nil),
+	ExtensionType: (*MessageParserOption)(nil),
+	Field:         7761775,
+	Name:          "voltha.yang_message_rule",
+	Tag:           "varint,7761775,opt,name=yang_message_rule,json=yangMessageRule,enum=voltha.MessageParserOption",
+	Filename:      "voltha_protos/yang_options.proto",
+}
+
+var E_YangInlineNode = &proto.ExtensionDesc{
+	ExtendedType:  (*descriptor.FieldOptions)(nil),
+	ExtensionType: (*InlineNode)(nil),
+	Field:         7761776,
+	Name:          "voltha.yang_inline_node",
+	Tag:           "bytes,7761776,opt,name=yang_inline_node,json=yangInlineNode",
+	Filename:      "voltha_protos/yang_options.proto",
+}
+
+var E_YangXmlTag = &proto.ExtensionDesc{
+	ExtendedType:  (*descriptor.MethodOptions)(nil),
+	ExtensionType: (*RpcReturnDef)(nil),
+	Field:         7761777,
+	Name:          "voltha.yang_xml_tag",
+	Tag:           "bytes,7761777,opt,name=yang_xml_tag,json=yangXmlTag",
+	Filename:      "voltha_protos/yang_options.proto",
+}
+
+func init() {
+	proto.RegisterType((*InlineNode)(nil), "voltha.InlineNode")
+	proto.RegisterType((*RpcReturnDef)(nil), "voltha.RpcReturnDef")
+	proto.RegisterEnum("voltha.MessageParserOption", MessageParserOption_name, MessageParserOption_value)
+	proto.RegisterExtension(E_YangChildRule)
+	proto.RegisterExtension(E_YangMessageRule)
+	proto.RegisterExtension(E_YangInlineNode)
+	proto.RegisterExtension(E_YangXmlTag)
+}
+
+func init() {
+	proto.RegisterFile("voltha_protos/yang_options.proto", fileDescriptor_yang_options_40f3be6d35d15307)
+}
+
+var fileDescriptor_yang_options_40f3be6d35d15307 = []byte{
+	// 452 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4d, 0x6f, 0xd3, 0x30,
+	0x18, 0xc7, 0x69, 0x41, 0x45, 0x98, 0xad, 0x2b, 0x66, 0x12, 0x15, 0x08, 0xa8, 0x7a, 0x98, 0x26,
+	0xd0, 0x12, 0x34, 0x6e, 0xbd, 0x75, 0x5d, 0x18, 0x95, 0xb6, 0xa4, 0xb2, 0xc2, 0x78, 0x39, 0x60,
+	0xa5, 0x89, 0xe7, 0x58, 0xd8, 0x7e, 0xa2, 0xd8, 0x41, 0xdb, 0x47, 0xe5, 0xc2, 0x47, 0xe0, 0xe5,
+	0x1b, 0xa0, 0x38, 0x09, 0x43, 0x62, 0x87, 0xde, 0x92, 0x7f, 0xec, 0xdf, 0x2f, 0xcf, 0x0b, 0x9a,
+	0x7c, 0x05, 0x69, 0xf3, 0x84, 0x16, 0x25, 0x58, 0x30, 0xfe, 0x55, 0xa2, 0x39, 0x85, 0xc2, 0x0a,
+	0xd0, 0xc6, 0x73, 0x19, 0x1e, 0x34, 0x27, 0x1e, 0x4f, 0x38, 0x00, 0x97, 0xcc, 0x77, 0xe9, 0xba,
+	0xba, 0xf0, 0x33, 0x66, 0xd2, 0x52, 0x14, 0x16, 0xca, 0xe6, 0xe4, 0xf4, 0x15, 0x42, 0x4b, 0x2d,
+	0x85, 0x66, 0x21, 0x64, 0x0c, 0x0f, 0x51, 0x5f, 0x64, 0xe3, 0xde, 0xa4, 0xb7, 0x7f, 0x8f, 0xf4,
+	0x45, 0x86, 0x31, 0xba, 0x63, 0xaf, 0x0a, 0x36, 0xee, 0xbb, 0xc4, 0x3d, 0x4f, 0x23, 0xb4, 0x45,
+	0x8a, 0x94, 0x30, 0x5b, 0x95, 0xfa, 0x98, 0x5d, 0xe0, 0x47, 0xe8, 0xee, 0xa5, 0x92, 0xd4, 0x26,
+	0xbc, 0xbd, 0x38, 0xb8, 0x54, 0x32, 0x4e, 0x38, 0xde, 0x43, 0x3b, 0x52, 0x18, 0x4b, 0x85, 0x65,
+	0xca, 0x50, 0x9d, 0xa8, 0x8e, 0xb3, 0x5d, 0xc7, 0xcb, 0x3a, 0x0d, 0x13, 0xc5, 0x5e, 0xbc, 0x47,
+	0x0f, 0xcf, 0x98, 0x31, 0x09, 0x67, 0xab, 0xa4, 0x34, 0xac, 0x8c, 0x5c, 0x29, 0x78, 0x8c, 0x76,
+	0xcf, 0xa2, 0xf3, 0x80, 0xc6, 0x11, 0x5d, 0xcd, 0x49, 0x10, 0xc6, 0xf4, 0x34, 0x38, 0x0f, 0x4e,
+	0x47, 0xb7, 0xf0, 0x1e, 0x9a, 0x2e, 0x48, 0x30, 0x8f, 0x03, 0x7a, 0x14, 0xc5, 0x6f, 0xe9, 0x09,
+	0x89, 0xde, 0xad, 0x96, 0xe1, 0x09, 0x9d, 0x87, 0xc7, 0x74, 0x11, 0x85, 0xf1, 0x7c, 0x19, 0x06,
+	0x64, 0xd4, 0x9b, 0x71, 0xb4, 0xe3, 0x7a, 0x93, 0xe6, 0x42, 0x66, 0xb4, 0xac, 0x24, 0xc3, 0xcf,
+	0xbd, 0xa6, 0x23, 0x5e, 0xd7, 0x11, 0xaf, 0x55, 0x37, 0x52, 0x33, 0xfe, 0xf1, 0xfd, 0xdb, 0xed,
+	0x49, 0x6f, 0x7f, 0x78, 0xf8, 0xc4, 0x6b, 0x7a, 0xe8, 0xdd, 0xf0, 0x6f, 0x64, 0xbb, 0xe6, 0x2e,
+	0x6a, 0x2c, 0xa9, 0x24, 0x9b, 0x7d, 0x41, 0x0f, 0x9c, 0x48, 0x35, 0x47, 0x37, 0x54, 0xfd, 0xdc,
+	0x48, 0xe5, 0x4a, 0x68, 0x3f, 0x38, 0xd9, 0x67, 0x34, 0x72, 0x32, 0xe1, 0xc6, 0x46, 0x75, 0x3d,
+	0xb7, 0xa7, 0xff, 0xb9, 0xde, 0x08, 0x26, 0xb3, 0xce, 0xf4, 0xab, 0x31, 0xdd, 0x3f, 0xc4, 0x9d,
+	0xe9, 0x7a, 0xe6, 0x64, 0x58, 0xd3, 0xae, 0xdf, 0x67, 0x1f, 0xd1, 0x96, 0xe3, 0xb7, 0x43, 0xc5,
+	0xcf, 0x6e, 0xa8, 0xc3, 0xe6, 0xf0, 0x17, 0xfe, 0xbb, 0x83, 0xef, 0x76, 0xf0, 0x7f, 0xd7, 0x83,
+	0xa0, 0x1a, 0xf6, 0xc1, 0x6d, 0xc4, 0xd1, 0xc1, 0xa7, 0x97, 0x5c, 0xd8, 0xbc, 0x5a, 0x7b, 0x29,
+	0x28, 0x1f, 0x0a, 0xa6, 0x53, 0x28, 0x33, 0xbf, 0xb9, 0x76, 0xd0, 0xae, 0x33, 0x07, 0x3f, 0x05,
+	0xa5, 0x40, 0xaf, 0x07, 0x2e, 0x79, 0xfd, 0x27, 0x00, 0x00, 0xff, 0xff, 0x04, 0x3a, 0x59, 0x44,
+	0xf0, 0x02, 0x00, 0x00,
+}
diff --git a/go/common/yang_options.proto b/go/common/yang_options.proto
deleted file mode 100644
index 25e6fa7..0000000
--- a/go/common/yang_options.proto
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2015, Google Inc.
-//
-// 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.
-
-// This file contains annotation definitions that can be used to describe
-// a configuration tree.
-
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/common";
-
-package voltha;
-
-import "google/protobuf/descriptor.proto";
-
-enum MessageParserOption {
-    // Move any enclosing child enum/message definition to the same level
-    // as the parent (this message) in the yang generated file
-    MOVE_TO_PARENT_LEVEL= 0;
-
-    // Create both a grouping and a container for this message.  The container
-    // name will be the message name.  The grouping name will be the message
-    // name prefixed with "grouping_"
-    CREATE_BOTH_GROUPING_AND_CONTAINER = 1;
-}
-
-message InlineNode {
-    string id = 1;
-    string type = 2;
-}
-
-message RpcReturnDef {
-    // The gRPC methods return message types.  NETCONF expects an actual
-    // attribute as defined in the YANG schema.  The xnl_tag will be used
-    // as the top most tag when translating a gRPC response into an xml
-    // response
-    string xml_tag = 1;
-
-    // When the gRPC response is a list of items, we need to differentiate
-    // between a YANG schema attribute whose name is "items" and when "items"
-    // is used only to indicate a list of items is being returned.  The default
-    // behavior assumes a list is returned when "items" is present in
-    // the response.  This option will therefore be used when the attribute
-    // name in the YANG schema is 'items'
-    string list_items_name = 2;
-}
-
-extend google.protobuf.MessageOptions {
-    // This annotation is used to indicate how a message is parsed when
-    // converting from proto to yang format.
-    MessageParserOption yang_child_rule = 7761774;
-
-    MessageParserOption yang_message_rule = 7761775;
-}
-
-extend google.protobuf.FieldOptions {
-    // If present, the field (a message reference) should be replaced by the
-    // message itself.  For now, this applies only to non-repeated fields.
-    InlineNode yang_inline_node = 7761776;
-}
-
-extend google.protobuf.MethodOptions {
-    RpcReturnDef yang_xml_tag = 7761777;
-}
diff --git a/go/inter_container/inter_container.pb.go b/go/inter_container/inter_container.pb.go
new file mode 100644
index 0000000..40ca168
--- /dev/null
+++ b/go/inter_container/inter_container.pb.go
@@ -0,0 +1,1232 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/inter_container.proto
+
+package inter_container // import "github.com/opencord/voltha-protos/go/inter_container"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import any "github.com/golang/protobuf/ptypes/any"
+import openflow_13 "github.com/opencord/voltha-protos/go/openflow_13"
+import voltha "github.com/opencord/voltha-protos/go/voltha"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+// LogicalPortId from public import voltha_protos/logical_device.proto
+type LogicalPortId = voltha.LogicalPortId
+
+// LogicalPort from public import voltha_protos/logical_device.proto
+type LogicalPort = voltha.LogicalPort
+
+// LogicalPorts from public import voltha_protos/logical_device.proto
+type LogicalPorts = voltha.LogicalPorts
+
+// LogicalDevice from public import voltha_protos/logical_device.proto
+type LogicalDevice = voltha.LogicalDevice
+
+// LogicalDevices from public import voltha_protos/logical_device.proto
+type LogicalDevices = voltha.LogicalDevices
+
+type MessageType int32
+
+const (
+	MessageType_REQUEST           MessageType = 0
+	MessageType_RESPONSE          MessageType = 1
+	MessageType_DEVICE_DISCOVERED MessageType = 2
+)
+
+var MessageType_name = map[int32]string{
+	0: "REQUEST",
+	1: "RESPONSE",
+	2: "DEVICE_DISCOVERED",
+}
+var MessageType_value = map[string]int32{
+	"REQUEST":           0,
+	"RESPONSE":          1,
+	"DEVICE_DISCOVERED": 2,
+}
+
+func (x MessageType) String() string {
+	return proto.EnumName(MessageType_name, int32(x))
+}
+func (MessageType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{0}
+}
+
+type ErrorCodeCodes int32
+
+const (
+	ErrorCode_UNSUPPORTED_REQUEST ErrorCodeCodes = 0
+	ErrorCode_INVALID_PARAMETERS  ErrorCodeCodes = 1
+)
+
+var ErrorCodeCodes_name = map[int32]string{
+	0: "UNSUPPORTED_REQUEST",
+	1: "INVALID_PARAMETERS",
+}
+var ErrorCodeCodes_value = map[string]int32{
+	"UNSUPPORTED_REQUEST": 0,
+	"INVALID_PARAMETERS":  1,
+}
+
+func (x ErrorCodeCodes) String() string {
+	return proto.EnumName(ErrorCodeCodes_name, int32(x))
+}
+func (ErrorCodeCodes) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{4, 0}
+}
+
+type InterAdapterMessageType_Types int32
+
+const (
+	InterAdapterMessageType_FLOW_REQUEST     InterAdapterMessageType_Types = 0
+	InterAdapterMessageType_FLOW_RESPONSE    InterAdapterMessageType_Types = 1
+	InterAdapterMessageType_OMCI_REQUEST     InterAdapterMessageType_Types = 2
+	InterAdapterMessageType_OMCI_RESPONSE    InterAdapterMessageType_Types = 3
+	InterAdapterMessageType_METRICS_REQUEST  InterAdapterMessageType_Types = 4
+	InterAdapterMessageType_METRICS_RESPONSE InterAdapterMessageType_Types = 5
+	InterAdapterMessageType_ONU_IND_REQUEST  InterAdapterMessageType_Types = 6
+	InterAdapterMessageType_ONU_IND_RESPONSE InterAdapterMessageType_Types = 7
+)
+
+var InterAdapterMessageType_Types_name = map[int32]string{
+	0: "FLOW_REQUEST",
+	1: "FLOW_RESPONSE",
+	2: "OMCI_REQUEST",
+	3: "OMCI_RESPONSE",
+	4: "METRICS_REQUEST",
+	5: "METRICS_RESPONSE",
+	6: "ONU_IND_REQUEST",
+	7: "ONU_IND_RESPONSE",
+}
+var InterAdapterMessageType_Types_value = map[string]int32{
+	"FLOW_REQUEST":     0,
+	"FLOW_RESPONSE":    1,
+	"OMCI_REQUEST":     2,
+	"OMCI_RESPONSE":    3,
+	"METRICS_REQUEST":  4,
+	"METRICS_RESPONSE": 5,
+	"ONU_IND_REQUEST":  6,
+	"ONU_IND_RESPONSE": 7,
+}
+
+func (x InterAdapterMessageType_Types) String() string {
+	return proto.EnumName(InterAdapterMessageType_Types_name, int32(x))
+}
+func (InterAdapterMessageType_Types) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{14, 0}
+}
+
+type StrType struct {
+	Val                  string   `protobuf:"bytes,1,opt,name=val,proto3" json:"val,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *StrType) Reset()         { *m = StrType{} }
+func (m *StrType) String() string { return proto.CompactTextString(m) }
+func (*StrType) ProtoMessage()    {}
+func (*StrType) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{0}
+}
+func (m *StrType) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_StrType.Unmarshal(m, b)
+}
+func (m *StrType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_StrType.Marshal(b, m, deterministic)
+}
+func (dst *StrType) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_StrType.Merge(dst, src)
+}
+func (m *StrType) XXX_Size() int {
+	return xxx_messageInfo_StrType.Size(m)
+}
+func (m *StrType) XXX_DiscardUnknown() {
+	xxx_messageInfo_StrType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StrType proto.InternalMessageInfo
+
+func (m *StrType) GetVal() string {
+	if m != nil {
+		return m.Val
+	}
+	return ""
+}
+
+type IntType struct {
+	Val                  int64    `protobuf:"varint,1,opt,name=val,proto3" json:"val,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *IntType) Reset()         { *m = IntType{} }
+func (m *IntType) String() string { return proto.CompactTextString(m) }
+func (*IntType) ProtoMessage()    {}
+func (*IntType) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{1}
+}
+func (m *IntType) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_IntType.Unmarshal(m, b)
+}
+func (m *IntType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_IntType.Marshal(b, m, deterministic)
+}
+func (dst *IntType) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_IntType.Merge(dst, src)
+}
+func (m *IntType) XXX_Size() int {
+	return xxx_messageInfo_IntType.Size(m)
+}
+func (m *IntType) XXX_DiscardUnknown() {
+	xxx_messageInfo_IntType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_IntType proto.InternalMessageInfo
+
+func (m *IntType) GetVal() int64 {
+	if m != nil {
+		return m.Val
+	}
+	return 0
+}
+
+type BoolType struct {
+	Val                  bool     `protobuf:"varint,1,opt,name=val,proto3" json:"val,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *BoolType) Reset()         { *m = BoolType{} }
+func (m *BoolType) String() string { return proto.CompactTextString(m) }
+func (*BoolType) ProtoMessage()    {}
+func (*BoolType) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{2}
+}
+func (m *BoolType) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_BoolType.Unmarshal(m, b)
+}
+func (m *BoolType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_BoolType.Marshal(b, m, deterministic)
+}
+func (dst *BoolType) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_BoolType.Merge(dst, src)
+}
+func (m *BoolType) XXX_Size() int {
+	return xxx_messageInfo_BoolType.Size(m)
+}
+func (m *BoolType) XXX_DiscardUnknown() {
+	xxx_messageInfo_BoolType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_BoolType proto.InternalMessageInfo
+
+func (m *BoolType) GetVal() bool {
+	if m != nil {
+		return m.Val
+	}
+	return false
+}
+
+type Packet struct {
+	Payload              []byte   `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Packet) Reset()         { *m = Packet{} }
+func (m *Packet) String() string { return proto.CompactTextString(m) }
+func (*Packet) ProtoMessage()    {}
+func (*Packet) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{3}
+}
+func (m *Packet) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Packet.Unmarshal(m, b)
+}
+func (m *Packet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Packet.Marshal(b, m, deterministic)
+}
+func (dst *Packet) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Packet.Merge(dst, src)
+}
+func (m *Packet) XXX_Size() int {
+	return xxx_messageInfo_Packet.Size(m)
+}
+func (m *Packet) XXX_DiscardUnknown() {
+	xxx_messageInfo_Packet.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Packet proto.InternalMessageInfo
+
+func (m *Packet) GetPayload() []byte {
+	if m != nil {
+		return m.Payload
+	}
+	return nil
+}
+
+type ErrorCode struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *ErrorCode) Reset()         { *m = ErrorCode{} }
+func (m *ErrorCode) String() string { return proto.CompactTextString(m) }
+func (*ErrorCode) ProtoMessage()    {}
+func (*ErrorCode) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{4}
+}
+func (m *ErrorCode) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_ErrorCode.Unmarshal(m, b)
+}
+func (m *ErrorCode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_ErrorCode.Marshal(b, m, deterministic)
+}
+func (dst *ErrorCode) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ErrorCode.Merge(dst, src)
+}
+func (m *ErrorCode) XXX_Size() int {
+	return xxx_messageInfo_ErrorCode.Size(m)
+}
+func (m *ErrorCode) XXX_DiscardUnknown() {
+	xxx_messageInfo_ErrorCode.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ErrorCode proto.InternalMessageInfo
+
+type Error struct {
+	Code                 *ErrorCode `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
+	Reason               string     `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
+	XXX_unrecognized     []byte     `json:"-"`
+	XXX_sizecache        int32      `json:"-"`
+}
+
+func (m *Error) Reset()         { *m = Error{} }
+func (m *Error) String() string { return proto.CompactTextString(m) }
+func (*Error) ProtoMessage()    {}
+func (*Error) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{5}
+}
+func (m *Error) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Error.Unmarshal(m, b)
+}
+func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Error.Marshal(b, m, deterministic)
+}
+func (dst *Error) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Error.Merge(dst, src)
+}
+func (m *Error) XXX_Size() int {
+	return xxx_messageInfo_Error.Size(m)
+}
+func (m *Error) XXX_DiscardUnknown() {
+	xxx_messageInfo_Error.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Error proto.InternalMessageInfo
+
+func (m *Error) GetCode() *ErrorCode {
+	if m != nil {
+		return m.Code
+	}
+	return nil
+}
+
+func (m *Error) GetReason() string {
+	if m != nil {
+		return m.Reason
+	}
+	return ""
+}
+
+type Header struct {
+	Id                   string      `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	Type                 MessageType `protobuf:"varint,2,opt,name=type,proto3,enum=voltha.MessageType" json:"type,omitempty"`
+	FromTopic            string      `protobuf:"bytes,3,opt,name=from_topic,json=fromTopic,proto3" json:"from_topic,omitempty"`
+	ToTopic              string      `protobuf:"bytes,4,opt,name=to_topic,json=toTopic,proto3" json:"to_topic,omitempty"`
+	KeyTopic             string      `protobuf:"bytes,5,opt,name=key_topic,json=keyTopic,proto3" json:"key_topic,omitempty"`
+	Timestamp            int64       `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
+	XXX_unrecognized     []byte      `json:"-"`
+	XXX_sizecache        int32       `json:"-"`
+}
+
+func (m *Header) Reset()         { *m = Header{} }
+func (m *Header) String() string { return proto.CompactTextString(m) }
+func (*Header) ProtoMessage()    {}
+func (*Header) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{6}
+}
+func (m *Header) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Header.Unmarshal(m, b)
+}
+func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Header.Marshal(b, m, deterministic)
+}
+func (dst *Header) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Header.Merge(dst, src)
+}
+func (m *Header) XXX_Size() int {
+	return xxx_messageInfo_Header.Size(m)
+}
+func (m *Header) XXX_DiscardUnknown() {
+	xxx_messageInfo_Header.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Header proto.InternalMessageInfo
+
+func (m *Header) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *Header) GetType() MessageType {
+	if m != nil {
+		return m.Type
+	}
+	return MessageType_REQUEST
+}
+
+func (m *Header) GetFromTopic() string {
+	if m != nil {
+		return m.FromTopic
+	}
+	return ""
+}
+
+func (m *Header) GetToTopic() string {
+	if m != nil {
+		return m.ToTopic
+	}
+	return ""
+}
+
+func (m *Header) GetKeyTopic() string {
+	if m != nil {
+		return m.KeyTopic
+	}
+	return ""
+}
+
+func (m *Header) GetTimestamp() int64 {
+	if m != nil {
+		return m.Timestamp
+	}
+	return 0
+}
+
+type Argument struct {
+	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+	Value                *any.Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Argument) Reset()         { *m = Argument{} }
+func (m *Argument) String() string { return proto.CompactTextString(m) }
+func (*Argument) ProtoMessage()    {}
+func (*Argument) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{7}
+}
+func (m *Argument) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Argument.Unmarshal(m, b)
+}
+func (m *Argument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Argument.Marshal(b, m, deterministic)
+}
+func (dst *Argument) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Argument.Merge(dst, src)
+}
+func (m *Argument) XXX_Size() int {
+	return xxx_messageInfo_Argument.Size(m)
+}
+func (m *Argument) XXX_DiscardUnknown() {
+	xxx_messageInfo_Argument.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Argument proto.InternalMessageInfo
+
+func (m *Argument) GetKey() string {
+	if m != nil {
+		return m.Key
+	}
+	return ""
+}
+
+func (m *Argument) GetValue() *any.Any {
+	if m != nil {
+		return m.Value
+	}
+	return nil
+}
+
+type InterContainerMessage struct {
+	Header               *Header  `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
+	Body                 *any.Any `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *InterContainerMessage) Reset()         { *m = InterContainerMessage{} }
+func (m *InterContainerMessage) String() string { return proto.CompactTextString(m) }
+func (*InterContainerMessage) ProtoMessage()    {}
+func (*InterContainerMessage) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{8}
+}
+func (m *InterContainerMessage) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_InterContainerMessage.Unmarshal(m, b)
+}
+func (m *InterContainerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_InterContainerMessage.Marshal(b, m, deterministic)
+}
+func (dst *InterContainerMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_InterContainerMessage.Merge(dst, src)
+}
+func (m *InterContainerMessage) XXX_Size() int {
+	return xxx_messageInfo_InterContainerMessage.Size(m)
+}
+func (m *InterContainerMessage) XXX_DiscardUnknown() {
+	xxx_messageInfo_InterContainerMessage.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterContainerMessage proto.InternalMessageInfo
+
+func (m *InterContainerMessage) GetHeader() *Header {
+	if m != nil {
+		return m.Header
+	}
+	return nil
+}
+
+func (m *InterContainerMessage) GetBody() *any.Any {
+	if m != nil {
+		return m.Body
+	}
+	return nil
+}
+
+type InterContainerRequestBody struct {
+	Rpc                  string      `protobuf:"bytes,2,opt,name=rpc,proto3" json:"rpc,omitempty"`
+	Args                 []*Argument `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`
+	ResponseRequired     bool        `protobuf:"varint,4,opt,name=response_required,json=responseRequired,proto3" json:"response_required,omitempty"`
+	ReplyToTopic         string      `protobuf:"bytes,5,opt,name=reply_to_topic,json=replyToTopic,proto3" json:"reply_to_topic,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
+	XXX_unrecognized     []byte      `json:"-"`
+	XXX_sizecache        int32       `json:"-"`
+}
+
+func (m *InterContainerRequestBody) Reset()         { *m = InterContainerRequestBody{} }
+func (m *InterContainerRequestBody) String() string { return proto.CompactTextString(m) }
+func (*InterContainerRequestBody) ProtoMessage()    {}
+func (*InterContainerRequestBody) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{9}
+}
+func (m *InterContainerRequestBody) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_InterContainerRequestBody.Unmarshal(m, b)
+}
+func (m *InterContainerRequestBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_InterContainerRequestBody.Marshal(b, m, deterministic)
+}
+func (dst *InterContainerRequestBody) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_InterContainerRequestBody.Merge(dst, src)
+}
+func (m *InterContainerRequestBody) XXX_Size() int {
+	return xxx_messageInfo_InterContainerRequestBody.Size(m)
+}
+func (m *InterContainerRequestBody) XXX_DiscardUnknown() {
+	xxx_messageInfo_InterContainerRequestBody.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterContainerRequestBody proto.InternalMessageInfo
+
+func (m *InterContainerRequestBody) GetRpc() string {
+	if m != nil {
+		return m.Rpc
+	}
+	return ""
+}
+
+func (m *InterContainerRequestBody) GetArgs() []*Argument {
+	if m != nil {
+		return m.Args
+	}
+	return nil
+}
+
+func (m *InterContainerRequestBody) GetResponseRequired() bool {
+	if m != nil {
+		return m.ResponseRequired
+	}
+	return false
+}
+
+func (m *InterContainerRequestBody) GetReplyToTopic() string {
+	if m != nil {
+		return m.ReplyToTopic
+	}
+	return ""
+}
+
+type InterContainerResponseBody struct {
+	Success              bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
+	Result               *any.Any `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *InterContainerResponseBody) Reset()         { *m = InterContainerResponseBody{} }
+func (m *InterContainerResponseBody) String() string { return proto.CompactTextString(m) }
+func (*InterContainerResponseBody) ProtoMessage()    {}
+func (*InterContainerResponseBody) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{10}
+}
+func (m *InterContainerResponseBody) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_InterContainerResponseBody.Unmarshal(m, b)
+}
+func (m *InterContainerResponseBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_InterContainerResponseBody.Marshal(b, m, deterministic)
+}
+func (dst *InterContainerResponseBody) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_InterContainerResponseBody.Merge(dst, src)
+}
+func (m *InterContainerResponseBody) XXX_Size() int {
+	return xxx_messageInfo_InterContainerResponseBody.Size(m)
+}
+func (m *InterContainerResponseBody) XXX_DiscardUnknown() {
+	xxx_messageInfo_InterContainerResponseBody.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterContainerResponseBody proto.InternalMessageInfo
+
+func (m *InterContainerResponseBody) GetSuccess() bool {
+	if m != nil {
+		return m.Success
+	}
+	return false
+}
+
+func (m *InterContainerResponseBody) GetResult() *any.Any {
+	if m != nil {
+		return m.Result
+	}
+	return nil
+}
+
+type SwitchCapability struct {
+	Desc                 *openflow_13.OfpDesc           `protobuf:"bytes,1,opt,name=desc,proto3" json:"desc,omitempty"`
+	SwitchFeatures       *openflow_13.OfpSwitchFeatures `protobuf:"bytes,2,opt,name=switch_features,json=switchFeatures,proto3" json:"switch_features,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                       `json:"-"`
+	XXX_unrecognized     []byte                         `json:"-"`
+	XXX_sizecache        int32                          `json:"-"`
+}
+
+func (m *SwitchCapability) Reset()         { *m = SwitchCapability{} }
+func (m *SwitchCapability) String() string { return proto.CompactTextString(m) }
+func (*SwitchCapability) ProtoMessage()    {}
+func (*SwitchCapability) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{11}
+}
+func (m *SwitchCapability) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_SwitchCapability.Unmarshal(m, b)
+}
+func (m *SwitchCapability) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_SwitchCapability.Marshal(b, m, deterministic)
+}
+func (dst *SwitchCapability) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SwitchCapability.Merge(dst, src)
+}
+func (m *SwitchCapability) XXX_Size() int {
+	return xxx_messageInfo_SwitchCapability.Size(m)
+}
+func (m *SwitchCapability) XXX_DiscardUnknown() {
+	xxx_messageInfo_SwitchCapability.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SwitchCapability proto.InternalMessageInfo
+
+func (m *SwitchCapability) GetDesc() *openflow_13.OfpDesc {
+	if m != nil {
+		return m.Desc
+	}
+	return nil
+}
+
+func (m *SwitchCapability) GetSwitchFeatures() *openflow_13.OfpSwitchFeatures {
+	if m != nil {
+		return m.SwitchFeatures
+	}
+	return nil
+}
+
+type PortCapability struct {
+	Port                 *voltha.LogicalPort `protobuf:"bytes,1,opt,name=port,proto3" json:"port,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
+	XXX_unrecognized     []byte              `json:"-"`
+	XXX_sizecache        int32               `json:"-"`
+}
+
+func (m *PortCapability) Reset()         { *m = PortCapability{} }
+func (m *PortCapability) String() string { return proto.CompactTextString(m) }
+func (*PortCapability) ProtoMessage()    {}
+func (*PortCapability) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{12}
+}
+func (m *PortCapability) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PortCapability.Unmarshal(m, b)
+}
+func (m *PortCapability) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PortCapability.Marshal(b, m, deterministic)
+}
+func (dst *PortCapability) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PortCapability.Merge(dst, src)
+}
+func (m *PortCapability) XXX_Size() int {
+	return xxx_messageInfo_PortCapability.Size(m)
+}
+func (m *PortCapability) XXX_DiscardUnknown() {
+	xxx_messageInfo_PortCapability.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PortCapability proto.InternalMessageInfo
+
+func (m *PortCapability) GetPort() *voltha.LogicalPort {
+	if m != nil {
+		return m.Port
+	}
+	return nil
+}
+
+type DeviceDiscovered struct {
+	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	ParentId             string   `protobuf:"bytes,2,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"`
+	DeviceType           string   `protobuf:"bytes,3,opt,name=device_type,json=deviceType,proto3" json:"device_type,omitempty"`
+	Publisher            string   `protobuf:"bytes,4,opt,name=publisher,proto3" json:"publisher,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *DeviceDiscovered) Reset()         { *m = DeviceDiscovered{} }
+func (m *DeviceDiscovered) String() string { return proto.CompactTextString(m) }
+func (*DeviceDiscovered) ProtoMessage()    {}
+func (*DeviceDiscovered) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{13}
+}
+func (m *DeviceDiscovered) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_DeviceDiscovered.Unmarshal(m, b)
+}
+func (m *DeviceDiscovered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_DeviceDiscovered.Marshal(b, m, deterministic)
+}
+func (dst *DeviceDiscovered) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_DeviceDiscovered.Merge(dst, src)
+}
+func (m *DeviceDiscovered) XXX_Size() int {
+	return xxx_messageInfo_DeviceDiscovered.Size(m)
+}
+func (m *DeviceDiscovered) XXX_DiscardUnknown() {
+	xxx_messageInfo_DeviceDiscovered.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceDiscovered proto.InternalMessageInfo
+
+func (m *DeviceDiscovered) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *DeviceDiscovered) GetParentId() string {
+	if m != nil {
+		return m.ParentId
+	}
+	return ""
+}
+
+func (m *DeviceDiscovered) GetDeviceType() string {
+	if m != nil {
+		return m.DeviceType
+	}
+	return ""
+}
+
+func (m *DeviceDiscovered) GetPublisher() string {
+	if m != nil {
+		return m.Publisher
+	}
+	return ""
+}
+
+type InterAdapterMessageType struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *InterAdapterMessageType) Reset()         { *m = InterAdapterMessageType{} }
+func (m *InterAdapterMessageType) String() string { return proto.CompactTextString(m) }
+func (*InterAdapterMessageType) ProtoMessage()    {}
+func (*InterAdapterMessageType) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{14}
+}
+func (m *InterAdapterMessageType) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_InterAdapterMessageType.Unmarshal(m, b)
+}
+func (m *InterAdapterMessageType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_InterAdapterMessageType.Marshal(b, m, deterministic)
+}
+func (dst *InterAdapterMessageType) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_InterAdapterMessageType.Merge(dst, src)
+}
+func (m *InterAdapterMessageType) XXX_Size() int {
+	return xxx_messageInfo_InterAdapterMessageType.Size(m)
+}
+func (m *InterAdapterMessageType) XXX_DiscardUnknown() {
+	xxx_messageInfo_InterAdapterMessageType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterAdapterMessageType proto.InternalMessageInfo
+
+type InterAdapterHeader struct {
+	Id                   string                        `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	Type                 InterAdapterMessageType_Types `protobuf:"varint,2,opt,name=type,proto3,enum=voltha.InterAdapterMessageType_Types" json:"type,omitempty"`
+	FromTopic            string                        `protobuf:"bytes,3,opt,name=from_topic,json=fromTopic,proto3" json:"from_topic,omitempty"`
+	ToTopic              string                        `protobuf:"bytes,4,opt,name=to_topic,json=toTopic,proto3" json:"to_topic,omitempty"`
+	ToDeviceId           string                        `protobuf:"bytes,5,opt,name=to_device_id,json=toDeviceId,proto3" json:"to_device_id,omitempty"`
+	ProxyDeviceId        string                        `protobuf:"bytes,6,opt,name=proxy_device_id,json=proxyDeviceId,proto3" json:"proxy_device_id,omitempty"`
+	Timestamp            int64                         `protobuf:"varint,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                      `json:"-"`
+	XXX_unrecognized     []byte                        `json:"-"`
+	XXX_sizecache        int32                         `json:"-"`
+}
+
+func (m *InterAdapterHeader) Reset()         { *m = InterAdapterHeader{} }
+func (m *InterAdapterHeader) String() string { return proto.CompactTextString(m) }
+func (*InterAdapterHeader) ProtoMessage()    {}
+func (*InterAdapterHeader) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{15}
+}
+func (m *InterAdapterHeader) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_InterAdapterHeader.Unmarshal(m, b)
+}
+func (m *InterAdapterHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_InterAdapterHeader.Marshal(b, m, deterministic)
+}
+func (dst *InterAdapterHeader) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_InterAdapterHeader.Merge(dst, src)
+}
+func (m *InterAdapterHeader) XXX_Size() int {
+	return xxx_messageInfo_InterAdapterHeader.Size(m)
+}
+func (m *InterAdapterHeader) XXX_DiscardUnknown() {
+	xxx_messageInfo_InterAdapterHeader.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterAdapterHeader proto.InternalMessageInfo
+
+func (m *InterAdapterHeader) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *InterAdapterHeader) GetType() InterAdapterMessageType_Types {
+	if m != nil {
+		return m.Type
+	}
+	return InterAdapterMessageType_FLOW_REQUEST
+}
+
+func (m *InterAdapterHeader) GetFromTopic() string {
+	if m != nil {
+		return m.FromTopic
+	}
+	return ""
+}
+
+func (m *InterAdapterHeader) GetToTopic() string {
+	if m != nil {
+		return m.ToTopic
+	}
+	return ""
+}
+
+func (m *InterAdapterHeader) GetToDeviceId() string {
+	if m != nil {
+		return m.ToDeviceId
+	}
+	return ""
+}
+
+func (m *InterAdapterHeader) GetProxyDeviceId() string {
+	if m != nil {
+		return m.ProxyDeviceId
+	}
+	return ""
+}
+
+func (m *InterAdapterHeader) GetTimestamp() int64 {
+	if m != nil {
+		return m.Timestamp
+	}
+	return 0
+}
+
+type InterAdapterOmciMessage struct {
+	Message              []byte   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *InterAdapterOmciMessage) Reset()         { *m = InterAdapterOmciMessage{} }
+func (m *InterAdapterOmciMessage) String() string { return proto.CompactTextString(m) }
+func (*InterAdapterOmciMessage) ProtoMessage()    {}
+func (*InterAdapterOmciMessage) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{16}
+}
+func (m *InterAdapterOmciMessage) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_InterAdapterOmciMessage.Unmarshal(m, b)
+}
+func (m *InterAdapterOmciMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_InterAdapterOmciMessage.Marshal(b, m, deterministic)
+}
+func (dst *InterAdapterOmciMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_InterAdapterOmciMessage.Merge(dst, src)
+}
+func (m *InterAdapterOmciMessage) XXX_Size() int {
+	return xxx_messageInfo_InterAdapterOmciMessage.Size(m)
+}
+func (m *InterAdapterOmciMessage) XXX_DiscardUnknown() {
+	xxx_messageInfo_InterAdapterOmciMessage.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterAdapterOmciMessage proto.InternalMessageInfo
+
+func (m *InterAdapterOmciMessage) GetMessage() []byte {
+	if m != nil {
+		return m.Message
+	}
+	return nil
+}
+
+type InterAdapterResponseBody struct {
+	Status bool `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
+	// Types that are valid to be assigned to Payload:
+	//	*InterAdapterResponseBody_Body
+	//	*InterAdapterResponseBody_Omci
+	Payload              isInterAdapterResponseBody_Payload `protobuf_oneof:"payload"`
+	XXX_NoUnkeyedLiteral struct{}                           `json:"-"`
+	XXX_unrecognized     []byte                             `json:"-"`
+	XXX_sizecache        int32                              `json:"-"`
+}
+
+func (m *InterAdapterResponseBody) Reset()         { *m = InterAdapterResponseBody{} }
+func (m *InterAdapterResponseBody) String() string { return proto.CompactTextString(m) }
+func (*InterAdapterResponseBody) ProtoMessage()    {}
+func (*InterAdapterResponseBody) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{17}
+}
+func (m *InterAdapterResponseBody) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_InterAdapterResponseBody.Unmarshal(m, b)
+}
+func (m *InterAdapterResponseBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_InterAdapterResponseBody.Marshal(b, m, deterministic)
+}
+func (dst *InterAdapterResponseBody) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_InterAdapterResponseBody.Merge(dst, src)
+}
+func (m *InterAdapterResponseBody) XXX_Size() int {
+	return xxx_messageInfo_InterAdapterResponseBody.Size(m)
+}
+func (m *InterAdapterResponseBody) XXX_DiscardUnknown() {
+	xxx_messageInfo_InterAdapterResponseBody.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterAdapterResponseBody proto.InternalMessageInfo
+
+func (m *InterAdapterResponseBody) GetStatus() bool {
+	if m != nil {
+		return m.Status
+	}
+	return false
+}
+
+type isInterAdapterResponseBody_Payload interface {
+	isInterAdapterResponseBody_Payload()
+}
+
+type InterAdapterResponseBody_Body struct {
+	Body *any.Any `protobuf:"bytes,2,opt,name=body,proto3,oneof"`
+}
+
+type InterAdapterResponseBody_Omci struct {
+	Omci *InterAdapterOmciMessage `protobuf:"bytes,3,opt,name=omci,proto3,oneof"`
+}
+
+func (*InterAdapterResponseBody_Body) isInterAdapterResponseBody_Payload() {}
+
+func (*InterAdapterResponseBody_Omci) isInterAdapterResponseBody_Payload() {}
+
+func (m *InterAdapterResponseBody) GetPayload() isInterAdapterResponseBody_Payload {
+	if m != nil {
+		return m.Payload
+	}
+	return nil
+}
+
+func (m *InterAdapterResponseBody) GetBody() *any.Any {
+	if x, ok := m.GetPayload().(*InterAdapterResponseBody_Body); ok {
+		return x.Body
+	}
+	return nil
+}
+
+func (m *InterAdapterResponseBody) GetOmci() *InterAdapterOmciMessage {
+	if x, ok := m.GetPayload().(*InterAdapterResponseBody_Omci); ok {
+		return x.Omci
+	}
+	return nil
+}
+
+// XXX_OneofFuncs is for the internal use of the proto package.
+func (*InterAdapterResponseBody) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
+	return _InterAdapterResponseBody_OneofMarshaler, _InterAdapterResponseBody_OneofUnmarshaler, _InterAdapterResponseBody_OneofSizer, []interface{}{
+		(*InterAdapterResponseBody_Body)(nil),
+		(*InterAdapterResponseBody_Omci)(nil),
+	}
+}
+
+func _InterAdapterResponseBody_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
+	m := msg.(*InterAdapterResponseBody)
+	// payload
+	switch x := m.Payload.(type) {
+	case *InterAdapterResponseBody_Body:
+		b.EncodeVarint(2<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Body); err != nil {
+			return err
+		}
+	case *InterAdapterResponseBody_Omci:
+		b.EncodeVarint(3<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Omci); err != nil {
+			return err
+		}
+	case nil:
+	default:
+		return fmt.Errorf("InterAdapterResponseBody.Payload has unexpected type %T", x)
+	}
+	return nil
+}
+
+func _InterAdapterResponseBody_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
+	m := msg.(*InterAdapterResponseBody)
+	switch tag {
+	case 2: // payload.body
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(any.Any)
+		err := b.DecodeMessage(msg)
+		m.Payload = &InterAdapterResponseBody_Body{msg}
+		return true, err
+	case 3: // payload.omci
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(InterAdapterOmciMessage)
+		err := b.DecodeMessage(msg)
+		m.Payload = &InterAdapterResponseBody_Omci{msg}
+		return true, err
+	default:
+		return false, nil
+	}
+}
+
+func _InterAdapterResponseBody_OneofSizer(msg proto.Message) (n int) {
+	m := msg.(*InterAdapterResponseBody)
+	// payload
+	switch x := m.Payload.(type) {
+	case *InterAdapterResponseBody_Body:
+		s := proto.Size(x.Body)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *InterAdapterResponseBody_Omci:
+		s := proto.Size(x.Omci)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case nil:
+	default:
+		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
+	}
+	return n
+}
+
+type InterAdapterMessage struct {
+	Header               *InterAdapterHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
+	Body                 *any.Any            `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
+	XXX_unrecognized     []byte              `json:"-"`
+	XXX_sizecache        int32               `json:"-"`
+}
+
+func (m *InterAdapterMessage) Reset()         { *m = InterAdapterMessage{} }
+func (m *InterAdapterMessage) String() string { return proto.CompactTextString(m) }
+func (*InterAdapterMessage) ProtoMessage()    {}
+func (*InterAdapterMessage) Descriptor() ([]byte, []int) {
+	return fileDescriptor_inter_container_07f83a25f58b3d1d, []int{18}
+}
+func (m *InterAdapterMessage) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_InterAdapterMessage.Unmarshal(m, b)
+}
+func (m *InterAdapterMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_InterAdapterMessage.Marshal(b, m, deterministic)
+}
+func (dst *InterAdapterMessage) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_InterAdapterMessage.Merge(dst, src)
+}
+func (m *InterAdapterMessage) XXX_Size() int {
+	return xxx_messageInfo_InterAdapterMessage.Size(m)
+}
+func (m *InterAdapterMessage) XXX_DiscardUnknown() {
+	xxx_messageInfo_InterAdapterMessage.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InterAdapterMessage proto.InternalMessageInfo
+
+func (m *InterAdapterMessage) GetHeader() *InterAdapterHeader {
+	if m != nil {
+		return m.Header
+	}
+	return nil
+}
+
+func (m *InterAdapterMessage) GetBody() *any.Any {
+	if m != nil {
+		return m.Body
+	}
+	return nil
+}
+
+func init() {
+	proto.RegisterType((*StrType)(nil), "voltha.StrType")
+	proto.RegisterType((*IntType)(nil), "voltha.IntType")
+	proto.RegisterType((*BoolType)(nil), "voltha.BoolType")
+	proto.RegisterType((*Packet)(nil), "voltha.Packet")
+	proto.RegisterType((*ErrorCode)(nil), "voltha.ErrorCode")
+	proto.RegisterType((*Error)(nil), "voltha.Error")
+	proto.RegisterType((*Header)(nil), "voltha.Header")
+	proto.RegisterType((*Argument)(nil), "voltha.Argument")
+	proto.RegisterType((*InterContainerMessage)(nil), "voltha.InterContainerMessage")
+	proto.RegisterType((*InterContainerRequestBody)(nil), "voltha.InterContainerRequestBody")
+	proto.RegisterType((*InterContainerResponseBody)(nil), "voltha.InterContainerResponseBody")
+	proto.RegisterType((*SwitchCapability)(nil), "voltha.SwitchCapability")
+	proto.RegisterType((*PortCapability)(nil), "voltha.PortCapability")
+	proto.RegisterType((*DeviceDiscovered)(nil), "voltha.DeviceDiscovered")
+	proto.RegisterType((*InterAdapterMessageType)(nil), "voltha.InterAdapterMessageType")
+	proto.RegisterType((*InterAdapterHeader)(nil), "voltha.InterAdapterHeader")
+	proto.RegisterType((*InterAdapterOmciMessage)(nil), "voltha.InterAdapterOmciMessage")
+	proto.RegisterType((*InterAdapterResponseBody)(nil), "voltha.InterAdapterResponseBody")
+	proto.RegisterType((*InterAdapterMessage)(nil), "voltha.InterAdapterMessage")
+	proto.RegisterEnum("voltha.MessageType", MessageType_name, MessageType_value)
+	proto.RegisterEnum("voltha.ErrorCodeCodes", ErrorCodeCodes_name, ErrorCodeCodes_value)
+	proto.RegisterEnum("voltha.InterAdapterMessageType_Types", InterAdapterMessageType_Types_name, InterAdapterMessageType_Types_value)
+}
+
+func init() {
+	proto.RegisterFile("voltha_protos/inter_container.proto", fileDescriptor_inter_container_07f83a25f58b3d1d)
+}
+
+var fileDescriptor_inter_container_07f83a25f58b3d1d = []byte{
+	// 1061 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdb, 0x6e, 0xe3, 0x44,
+	0x18, 0xde, 0x9c, 0x93, 0x3f, 0xdd, 0x34, 0x9d, 0x6e, 0xbb, 0xe9, 0x01, 0xb5, 0x32, 0x7b, 0x28,
+	0x05, 0x52, 0xd1, 0x02, 0x62, 0xaf, 0x50, 0x9a, 0xb8, 0xaa, 0xa5, 0xb6, 0x09, 0x4e, 0x5a, 0x24,
+	0x6e, 0x2c, 0xc7, 0x9e, 0xa6, 0x56, 0x9d, 0x8c, 0x77, 0x66, 0xdc, 0xc5, 0x37, 0x48, 0xdc, 0xf1,
+	0x18, 0x5c, 0xc1, 0x1b, 0xf0, 0x02, 0xbc, 0x18, 0x9a, 0x83, 0x73, 0xa2, 0x05, 0x09, 0xee, 0x66,
+	0xbe, 0xef, 0x9b, 0xd3, 0x7f, 0xf8, 0x6c, 0xf8, 0xf8, 0x81, 0x84, 0xfc, 0xce, 0x75, 0x22, 0x4a,
+	0x38, 0x61, 0x47, 0xc1, 0x84, 0x63, 0xea, 0x78, 0x64, 0xc2, 0xdd, 0x60, 0x82, 0x69, 0x53, 0xc2,
+	0xa8, 0xa8, 0x44, 0xdb, 0x5b, 0x23, 0x42, 0x46, 0x21, 0x3e, 0x92, 0xe8, 0x30, 0xbe, 0x3d, 0x72,
+	0x27, 0x89, 0x92, 0x6c, 0xef, 0x2d, 0xee, 0x43, 0x22, 0x3c, 0xb9, 0x0d, 0xc9, 0x07, 0xe7, 0x8b,
+	0x13, 0x2d, 0x30, 0x16, 0x05, 0x21, 0x19, 0x05, 0x9e, 0x1b, 0x3a, 0x3e, 0x7e, 0x08, 0x3c, 0xac,
+	0x34, 0xc6, 0x0e, 0x94, 0xfa, 0x9c, 0x0e, 0x92, 0x08, 0xa3, 0x3a, 0xe4, 0x1e, 0xdc, 0xb0, 0x91,
+	0xd9, 0xcf, 0x1c, 0x54, 0x6c, 0x31, 0x14, 0xa4, 0x35, 0xe1, 0xcb, 0x64, 0x4e, 0x91, 0xbb, 0x50,
+	0x3e, 0x25, 0x24, 0x5c, 0x66, 0xcb, 0x8a, 0x35, 0xa0, 0xd8, 0x73, 0xbd, 0x7b, 0xcc, 0x51, 0x03,
+	0x4a, 0x91, 0x9b, 0x84, 0xc4, 0xf5, 0x25, 0xbf, 0x62, 0xa7, 0x53, 0xc3, 0x84, 0x8a, 0x49, 0x29,
+	0xa1, 0x6d, 0xe2, 0x63, 0xe3, 0x1b, 0x28, 0x78, 0xc4, 0xc7, 0x0c, 0xbd, 0x84, 0xf5, 0xeb, 0xab,
+	0xfe, 0x75, 0xaf, 0xd7, 0xb5, 0x07, 0x66, 0xc7, 0xb1, 0xcd, 0xef, 0xae, 0xcd, 0xfe, 0xa0, 0xfe,
+	0x0c, 0x6d, 0x02, 0xb2, 0xae, 0x6e, 0x5a, 0x17, 0x56, 0xc7, 0xe9, 0xb5, 0xec, 0xd6, 0xa5, 0x39,
+	0x30, 0xed, 0x7e, 0x3d, 0x63, 0x9c, 0x41, 0x41, 0x6e, 0x83, 0x5e, 0x43, 0x5e, 0x6c, 0x21, 0x8f,
+	0xa9, 0x1e, 0xaf, 0x35, 0xd5, 0xf3, 0x9b, 0xd3, 0x33, 0x6c, 0x49, 0xa3, 0x4d, 0x28, 0x52, 0xec,
+	0x32, 0x32, 0x69, 0x64, 0xe5, 0x53, 0xf5, 0xcc, 0xf8, 0x23, 0x03, 0xc5, 0x73, 0xec, 0xfa, 0x98,
+	0xa2, 0x1a, 0x64, 0x03, 0x5f, 0x47, 0x22, 0x1b, 0xf8, 0xe8, 0x2d, 0xe4, 0x79, 0x12, 0x61, 0xb9,
+	0xa0, 0x76, 0xbc, 0x9e, 0xee, 0x7c, 0x89, 0x19, 0x73, 0x47, 0x58, 0x84, 0xc0, 0x96, 0x02, 0xf4,
+	0x11, 0xc0, 0x2d, 0x25, 0x63, 0x87, 0x93, 0x28, 0xf0, 0x1a, 0x39, 0xb9, 0x41, 0x45, 0x20, 0x03,
+	0x01, 0xa0, 0x2d, 0x28, 0x73, 0xa2, 0xc9, 0xbc, 0x24, 0x4b, 0x9c, 0x28, 0x6a, 0x07, 0x2a, 0xf7,
+	0x38, 0xd1, 0x5c, 0x41, 0x72, 0xe5, 0x7b, 0x9c, 0x28, 0x72, 0x17, 0x2a, 0x3c, 0x18, 0x63, 0xc6,
+	0xdd, 0x71, 0xd4, 0x28, 0xca, 0x1c, 0xcc, 0x00, 0xe3, 0x1c, 0xca, 0x2d, 0x3a, 0x8a, 0xc7, 0x78,
+	0xc2, 0x45, 0x26, 0xee, 0x71, 0x92, 0x26, 0xf1, 0x1e, 0x27, 0xe8, 0x10, 0x0a, 0x0f, 0x6e, 0x18,
+	0xab, 0xcb, 0x57, 0x8f, 0x5f, 0x34, 0x55, 0x45, 0x35, 0xd3, 0x8a, 0x6a, 0xb6, 0x26, 0x89, 0xad,
+	0x24, 0x46, 0x00, 0x1b, 0x96, 0x28, 0xc7, 0x76, 0x5a, 0x8d, 0xfa, 0x85, 0xe8, 0x0d, 0x14, 0xef,
+	0x64, 0x68, 0x74, 0x70, 0x6b, 0x69, 0x08, 0x54, 0xc0, 0x6c, 0xcd, 0xa2, 0x03, 0xc8, 0x0f, 0x89,
+	0x9f, 0xfc, 0xe3, 0x59, 0x52, 0x61, 0xfc, 0x96, 0x81, 0xad, 0xc5, 0xb3, 0x6c, 0xfc, 0x3e, 0xc6,
+	0x8c, 0x9f, 0x12, 0x3f, 0x11, 0xcf, 0xa0, 0x91, 0xa7, 0x13, 0x24, 0x86, 0xe8, 0x15, 0xe4, 0x5d,
+	0x3a, 0x62, 0x8d, 0xdc, 0x7e, 0xee, 0xa0, 0x7a, 0x5c, 0x4f, 0xcf, 0x4f, 0x1f, 0x6e, 0x4b, 0x16,
+	0x7d, 0x0a, 0x6b, 0x14, 0xb3, 0x88, 0x4c, 0x18, 0x76, 0x28, 0x7e, 0x1f, 0x07, 0x14, 0xfb, 0x32,
+	0xd2, 0x65, 0xbb, 0x9e, 0x12, 0xb6, 0xc6, 0xd1, 0x2b, 0xa8, 0x51, 0x1c, 0x85, 0x22, 0xe8, 0x0b,
+	0x71, 0x5f, 0x91, 0xe8, 0x40, 0x25, 0xc6, 0xf0, 0x61, 0x7b, 0xf9, 0x9e, 0x6a, 0x1f, 0x79, 0xd1,
+	0x06, 0x94, 0x58, 0xec, 0x79, 0x98, 0x31, 0x5d, 0xfd, 0xe9, 0x14, 0x7d, 0x26, 0xca, 0x8c, 0xc5,
+	0x21, 0x97, 0x65, 0xf0, 0x54, 0x30, 0xb4, 0xc6, 0xf8, 0x25, 0x03, 0xf5, 0xfe, 0x87, 0x80, 0x7b,
+	0x77, 0x6d, 0x37, 0x72, 0x87, 0x41, 0x18, 0xf0, 0x04, 0x7d, 0x02, 0x79, 0x1f, 0x33, 0x4f, 0xc7,
+	0x7c, 0xa3, 0x39, 0xdf, 0xe2, 0xe4, 0x36, 0x72, 0x04, 0x69, 0x4b, 0x09, 0xb2, 0x60, 0x95, 0xc9,
+	0xe5, 0xce, 0x2d, 0x76, 0x79, 0x4c, 0x31, 0xd3, 0x39, 0xd8, 0xff, 0xdb, 0xaa, 0x25, 0x9d, 0x5d,
+	0x53, 0xc0, 0x99, 0x9e, 0x1b, 0xef, 0xa0, 0xd6, 0x23, 0x94, 0xcf, 0xdd, 0xe3, 0x2d, 0xe4, 0x23,
+	0x42, 0xb9, 0xbe, 0xc7, 0xb4, 0xfc, 0x2f, 0x94, 0xa1, 0x08, 0xb1, 0x2d, 0x05, 0xc6, 0x4f, 0x50,
+	0xef, 0x48, 0x77, 0xe9, 0x04, 0xcc, 0x23, 0x0f, 0x58, 0x44, 0x79, 0xb9, 0x97, 0x76, 0xa0, 0x12,
+	0xb9, 0x14, 0x4f, 0xb8, 0x13, 0xf8, 0x3a, 0xc1, 0x65, 0x05, 0x58, 0x3e, 0xda, 0x83, 0xaa, 0xb2,
+	0x27, 0x47, 0xf6, 0x9b, 0x6a, 0x20, 0x50, 0x90, 0x74, 0x9a, 0x5d, 0xa8, 0x44, 0xf1, 0x30, 0x0c,
+	0xd8, 0x1d, 0xa6, 0xba, 0x85, 0x66, 0x80, 0xf1, 0x67, 0x06, 0x5e, 0xca, 0x64, 0xb5, 0x7c, 0x37,
+	0xe2, 0xd3, 0xf2, 0x15, 0x2b, 0x8d, 0xdf, 0x33, 0x50, 0x10, 0x03, 0x86, 0xea, 0xb0, 0x72, 0x76,
+	0xd1, 0xfd, 0x7e, 0xce, 0x5a, 0xd6, 0xe0, 0xb9, 0x46, 0xfa, 0xbd, 0xee, 0x55, 0xdf, 0xac, 0x67,
+	0x84, 0xa8, 0x7b, 0xd9, 0xb6, 0xa6, 0xa2, 0xac, 0x10, 0x69, 0x44, 0x8b, 0x72, 0x68, 0x1d, 0x56,
+	0x2f, 0xcd, 0x81, 0x6d, 0xb5, 0xfb, 0x53, 0x5d, 0x1e, 0xbd, 0x80, 0xfa, 0x0c, 0xd4, 0xd2, 0x82,
+	0x90, 0x76, 0xaf, 0xae, 0x1d, 0xeb, 0x6a, 0x66, 0x69, 0x45, 0x21, 0x9d, 0x81, 0x5a, 0x5a, 0x32,
+	0x7e, 0xce, 0x02, 0x9a, 0x7f, 0xc5, 0x13, 0xa6, 0xf4, 0x6e, 0xc1, 0x94, 0x5e, 0xa7, 0x59, 0x79,
+	0xe2, 0xfd, 0x4d, 0xf9, 0xf6, 0xff, 0x6d, 0x53, 0xfb, 0xb0, 0xc2, 0x89, 0xfe, 0x84, 0x88, 0x04,
+	0xaa, 0x8e, 0x01, 0x4e, 0x54, 0xde, 0x2d, 0x1f, 0xbd, 0x81, 0xd5, 0x88, 0x92, 0x1f, 0x93, 0x39,
+	0x51, 0x51, 0x8a, 0x9e, 0x4b, 0x78, 0xaa, 0x5b, 0xf0, 0xb4, 0xd2, 0xb2, 0xa7, 0x9d, 0x2c, 0x26,
+	0xb2, 0x3b, 0xf6, 0x82, 0xd4, 0x8b, 0x1a, 0x50, 0x1a, 0xab, 0x61, 0xfa, 0x41, 0xd1, 0x53, 0xe3,
+	0xd7, 0x0c, 0x34, 0xe6, 0x57, 0x2d, 0x74, 0xea, 0x26, 0x14, 0x19, 0x77, 0x79, 0x9c, 0x36, 0xaa,
+	0x9e, 0xa1, 0xc3, 0x7f, 0xb7, 0xac, 0xf3, 0x67, 0xca, 0xb4, 0xd0, 0x57, 0x90, 0x27, 0x63, 0x2f,
+	0xd0, 0x1d, 0xbd, 0xf7, 0x58, 0xc8, 0xe7, 0x6e, 0x2a, 0x96, 0x09, 0xf9, 0x69, 0x65, 0xfa, 0x09,
+	0x34, 0x18, 0xac, 0x3f, 0x92, 0x20, 0x74, 0xbc, 0xe4, 0xaf, 0xdb, 0x8f, 0x6d, 0xfd, 0x5f, 0xbd,
+	0xf6, 0xf0, 0x5b, 0xa8, 0xce, 0x55, 0x02, 0xaa, 0x42, 0x69, 0x56, 0xfa, 0x2b, 0x50, 0x9e, 0xab,
+	0xfa, 0x0d, 0x58, 0xeb, 0x98, 0x37, 0x56, 0xdb, 0x74, 0x3a, 0x56, 0xbf, 0xdd, 0xbd, 0x31, 0x6d,
+	0xb3, 0x53, 0xcf, 0x9e, 0x7e, 0xfd, 0xc3, 0x97, 0xa3, 0x80, 0xdf, 0xc5, 0xc3, 0xa6, 0x47, 0xc6,
+	0xf2, 0x4f, 0xc3, 0x23, 0xd4, 0x3f, 0x52, 0x77, 0xfc, 0x5c, 0xff, 0x5f, 0x8c, 0xc8, 0xf2, 0xbf,
+	0x4c, 0x2f, 0x3b, 0x2c, 0x4a, 0xf2, 0xe4, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x90, 0x60, 0x04,
+	0xd3, 0xf5, 0x08, 0x00, 0x00,
+}
diff --git a/go/inter_container/inter_container.proto b/go/inter_container/inter_container.proto
deleted file mode 100644
index 3168325..0000000
--- a/go/inter_container/inter_container.proto
+++ /dev/null
@@ -1,129 +0,0 @@
-syntax = "proto3";
-
-import "google/protobuf/any.proto";
-import "voltha_protos/openflow_13.proto";
-import public "voltha_protos/logical_device.proto";
-
-
-option go_package = "github.com/opencord/voltha-protos/go/inter_container";
-
-package voltha;
-
-message StrType {
-    string val = 1;
-}
-
-message IntType {
-    int64 val = 1;
-}
-
-message BoolType {
-    bool val = 1;
-}
-
-message Packet {
-    bytes payload = 1;
-}
-
-message ErrorCode {
-    enum codes {
-        UNSUPPORTED_REQUEST = 0;
-        INVALID_PARAMETERS = 1;
-    }
-}
-
-message Error {
-    ErrorCode code = 1;
-    string reason = 2;
-}
-
-enum MessageType {
-    REQUEST = 0;
-    RESPONSE = 1;
-    DEVICE_DISCOVERED=2;
-}
-
-message Header {
-    string id = 1;
-    MessageType type = 2;
-    string from_topic = 3;
-    string to_topic = 4;
-    string key_topic = 5;
-    int64 timestamp = 6;
-}
-
-message Argument {
-    string key = 1;
-    google.protobuf.Any value = 2;
-}
-
-message InterContainerMessage {
-    Header header = 1;
-    google.protobuf.Any body = 2;
-}
-
-message InterContainerRequestBody {
-    string rpc = 2;
-    repeated Argument args = 3;
-    bool response_required = 4;
-    string reply_to_topic = 5;
-}
-
-message InterContainerResponseBody {
-    bool success = 1;
-    google.protobuf.Any result = 3;
-}
-
-message SwitchCapability {
-    openflow_13.ofp_desc desc = 1;
-    openflow_13.ofp_switch_features switch_features = 2;
-}
-
-message PortCapability {
-    LogicalPort port = 1;
-}
-
-message DeviceDiscovered {
-    string id = 1;
-    string parent_id = 2;
-    string device_type = 3;
-    string publisher = 4;
-}
-
-message InterAdapterMessageType {
-    enum Types {
-        FLOW_REQUEST = 0;
-        FLOW_RESPONSE = 1;
-        OMCI_REQUEST = 2;
-        OMCI_RESPONSE = 3;
-        METRICS_REQUEST = 4;
-        METRICS_RESPONSE = 5;
-    }
-}
-
-message InterAdapterHeader {
-    string id = 1;
-    InterAdapterMessageType.Types type = 2;
-    string from_topic = 3;
-    string to_topic = 4;
-    string to_device_id = 5;
-    string proxy_device_id = 6;
-    int64 timestamp = 7;
-}
-
-message InterAdapterOmciMessage {
-    bytes message = 1; // OMCI_REQUEST or OMCI_RESPONSE
-}
-
-message InterAdapterResponseBody {
-    bool status = 1;
-    oneof payload {
-        google.protobuf.Any body = 2;
-        InterAdapterOmciMessage omci = 3; // OMCI_REQUEST or OMCI_RESPONSE
-    }
-}
-
-message InterAdapterMessage {
-    InterAdapterHeader header = 1;
-    google.protobuf.Any body = 2;
-}
diff --git a/go/omci/omci_alarm_db.pb.go b/go/omci/omci_alarm_db.pb.go
new file mode 100644
index 0000000..b7144d9
--- /dev/null
+++ b/go/omci/omci_alarm_db.pb.go
@@ -0,0 +1,506 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/omci_alarm_db.proto
+
+package omci // import "github.com/opencord/voltha-protos/go/omci"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import _ "github.com/opencord/voltha-protos/go/common"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type AlarmOpenOmciEventType_OpenOmciEventType int32
+
+const (
+	AlarmOpenOmciEventType_state_change AlarmOpenOmciEventType_OpenOmciEventType = 0
+)
+
+var AlarmOpenOmciEventType_OpenOmciEventType_name = map[int32]string{
+	0: "state_change",
+}
+var AlarmOpenOmciEventType_OpenOmciEventType_value = map[string]int32{
+	"state_change": 0,
+}
+
+func (x AlarmOpenOmciEventType_OpenOmciEventType) String() string {
+	return proto.EnumName(AlarmOpenOmciEventType_OpenOmciEventType_name, int32(x))
+}
+func (AlarmOpenOmciEventType_OpenOmciEventType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_omci_alarm_db_26c635f8b97d9376, []int{6, 0}
+}
+
+type AlarmAttributeData struct {
+	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+	Value                string   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *AlarmAttributeData) Reset()         { *m = AlarmAttributeData{} }
+func (m *AlarmAttributeData) String() string { return proto.CompactTextString(m) }
+func (*AlarmAttributeData) ProtoMessage()    {}
+func (*AlarmAttributeData) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_alarm_db_26c635f8b97d9376, []int{0}
+}
+func (m *AlarmAttributeData) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmAttributeData.Unmarshal(m, b)
+}
+func (m *AlarmAttributeData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmAttributeData.Marshal(b, m, deterministic)
+}
+func (dst *AlarmAttributeData) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmAttributeData.Merge(dst, src)
+}
+func (m *AlarmAttributeData) XXX_Size() int {
+	return xxx_messageInfo_AlarmAttributeData.Size(m)
+}
+func (m *AlarmAttributeData) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmAttributeData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmAttributeData proto.InternalMessageInfo
+
+func (m *AlarmAttributeData) GetName() string {
+	if m != nil {
+		return m.Name
+	}
+	return ""
+}
+
+func (m *AlarmAttributeData) GetValue() string {
+	if m != nil {
+		return m.Value
+	}
+	return ""
+}
+
+type AlarmInstanceData struct {
+	InstanceId           uint32                `protobuf:"varint,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
+	Created              string                `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
+	Modified             string                `protobuf:"bytes,3,opt,name=modified,proto3" json:"modified,omitempty"`
+	Attributes           []*AlarmAttributeData `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *AlarmInstanceData) Reset()         { *m = AlarmInstanceData{} }
+func (m *AlarmInstanceData) String() string { return proto.CompactTextString(m) }
+func (*AlarmInstanceData) ProtoMessage()    {}
+func (*AlarmInstanceData) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_alarm_db_26c635f8b97d9376, []int{1}
+}
+func (m *AlarmInstanceData) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmInstanceData.Unmarshal(m, b)
+}
+func (m *AlarmInstanceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmInstanceData.Marshal(b, m, deterministic)
+}
+func (dst *AlarmInstanceData) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmInstanceData.Merge(dst, src)
+}
+func (m *AlarmInstanceData) XXX_Size() int {
+	return xxx_messageInfo_AlarmInstanceData.Size(m)
+}
+func (m *AlarmInstanceData) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmInstanceData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmInstanceData proto.InternalMessageInfo
+
+func (m *AlarmInstanceData) GetInstanceId() uint32 {
+	if m != nil {
+		return m.InstanceId
+	}
+	return 0
+}
+
+func (m *AlarmInstanceData) GetCreated() string {
+	if m != nil {
+		return m.Created
+	}
+	return ""
+}
+
+func (m *AlarmInstanceData) GetModified() string {
+	if m != nil {
+		return m.Modified
+	}
+	return ""
+}
+
+func (m *AlarmInstanceData) GetAttributes() []*AlarmAttributeData {
+	if m != nil {
+		return m.Attributes
+	}
+	return nil
+}
+
+type AlarmClassData struct {
+	ClassId              uint32               `protobuf:"varint,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
+	Instances            []*AlarmInstanceData `protobuf:"bytes,2,rep,name=instances,proto3" json:"instances,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
+	XXX_unrecognized     []byte               `json:"-"`
+	XXX_sizecache        int32                `json:"-"`
+}
+
+func (m *AlarmClassData) Reset()         { *m = AlarmClassData{} }
+func (m *AlarmClassData) String() string { return proto.CompactTextString(m) }
+func (*AlarmClassData) ProtoMessage()    {}
+func (*AlarmClassData) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_alarm_db_26c635f8b97d9376, []int{2}
+}
+func (m *AlarmClassData) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmClassData.Unmarshal(m, b)
+}
+func (m *AlarmClassData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmClassData.Marshal(b, m, deterministic)
+}
+func (dst *AlarmClassData) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmClassData.Merge(dst, src)
+}
+func (m *AlarmClassData) XXX_Size() int {
+	return xxx_messageInfo_AlarmClassData.Size(m)
+}
+func (m *AlarmClassData) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmClassData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmClassData proto.InternalMessageInfo
+
+func (m *AlarmClassData) GetClassId() uint32 {
+	if m != nil {
+		return m.ClassId
+	}
+	return 0
+}
+
+func (m *AlarmClassData) GetInstances() []*AlarmInstanceData {
+	if m != nil {
+		return m.Instances
+	}
+	return nil
+}
+
+type AlarmManagedEntity struct {
+	ClassId              uint32   `protobuf:"varint,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
+	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *AlarmManagedEntity) Reset()         { *m = AlarmManagedEntity{} }
+func (m *AlarmManagedEntity) String() string { return proto.CompactTextString(m) }
+func (*AlarmManagedEntity) ProtoMessage()    {}
+func (*AlarmManagedEntity) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_alarm_db_26c635f8b97d9376, []int{3}
+}
+func (m *AlarmManagedEntity) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmManagedEntity.Unmarshal(m, b)
+}
+func (m *AlarmManagedEntity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmManagedEntity.Marshal(b, m, deterministic)
+}
+func (dst *AlarmManagedEntity) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmManagedEntity.Merge(dst, src)
+}
+func (m *AlarmManagedEntity) XXX_Size() int {
+	return xxx_messageInfo_AlarmManagedEntity.Size(m)
+}
+func (m *AlarmManagedEntity) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmManagedEntity.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmManagedEntity proto.InternalMessageInfo
+
+func (m *AlarmManagedEntity) GetClassId() uint32 {
+	if m != nil {
+		return m.ClassId
+	}
+	return 0
+}
+
+func (m *AlarmManagedEntity) GetName() string {
+	if m != nil {
+		return m.Name
+	}
+	return ""
+}
+
+type AlarmMessageType struct {
+	MessageType          uint32   `protobuf:"varint,1,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *AlarmMessageType) Reset()         { *m = AlarmMessageType{} }
+func (m *AlarmMessageType) String() string { return proto.CompactTextString(m) }
+func (*AlarmMessageType) ProtoMessage()    {}
+func (*AlarmMessageType) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_alarm_db_26c635f8b97d9376, []int{4}
+}
+func (m *AlarmMessageType) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmMessageType.Unmarshal(m, b)
+}
+func (m *AlarmMessageType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmMessageType.Marshal(b, m, deterministic)
+}
+func (dst *AlarmMessageType) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmMessageType.Merge(dst, src)
+}
+func (m *AlarmMessageType) XXX_Size() int {
+	return xxx_messageInfo_AlarmMessageType.Size(m)
+}
+func (m *AlarmMessageType) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmMessageType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmMessageType proto.InternalMessageInfo
+
+func (m *AlarmMessageType) GetMessageType() uint32 {
+	if m != nil {
+		return m.MessageType
+	}
+	return 0
+}
+
+type AlarmDeviceData struct {
+	DeviceId             string                `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
+	Created              string                `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
+	LastAlarmSequence    uint32                `protobuf:"varint,3,opt,name=last_alarm_sequence,json=lastAlarmSequence,proto3" json:"last_alarm_sequence,omitempty"`
+	LastSyncTime         string                `protobuf:"bytes,4,opt,name=last_sync_time,json=lastSyncTime,proto3" json:"last_sync_time,omitempty"`
+	Version              uint32                `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"`
+	Classes              []*AlarmClassData     `protobuf:"bytes,6,rep,name=classes,proto3" json:"classes,omitempty"`
+	ManagedEntities      []*AlarmManagedEntity `protobuf:"bytes,7,rep,name=managed_entities,json=managedEntities,proto3" json:"managed_entities,omitempty"`
+	MessageTypes         []*AlarmMessageType   `protobuf:"bytes,8,rep,name=message_types,json=messageTypes,proto3" json:"message_types,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *AlarmDeviceData) Reset()         { *m = AlarmDeviceData{} }
+func (m *AlarmDeviceData) String() string { return proto.CompactTextString(m) }
+func (*AlarmDeviceData) ProtoMessage()    {}
+func (*AlarmDeviceData) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_alarm_db_26c635f8b97d9376, []int{5}
+}
+func (m *AlarmDeviceData) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmDeviceData.Unmarshal(m, b)
+}
+func (m *AlarmDeviceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmDeviceData.Marshal(b, m, deterministic)
+}
+func (dst *AlarmDeviceData) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmDeviceData.Merge(dst, src)
+}
+func (m *AlarmDeviceData) XXX_Size() int {
+	return xxx_messageInfo_AlarmDeviceData.Size(m)
+}
+func (m *AlarmDeviceData) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmDeviceData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmDeviceData proto.InternalMessageInfo
+
+func (m *AlarmDeviceData) GetDeviceId() string {
+	if m != nil {
+		return m.DeviceId
+	}
+	return ""
+}
+
+func (m *AlarmDeviceData) GetCreated() string {
+	if m != nil {
+		return m.Created
+	}
+	return ""
+}
+
+func (m *AlarmDeviceData) GetLastAlarmSequence() uint32 {
+	if m != nil {
+		return m.LastAlarmSequence
+	}
+	return 0
+}
+
+func (m *AlarmDeviceData) GetLastSyncTime() string {
+	if m != nil {
+		return m.LastSyncTime
+	}
+	return ""
+}
+
+func (m *AlarmDeviceData) GetVersion() uint32 {
+	if m != nil {
+		return m.Version
+	}
+	return 0
+}
+
+func (m *AlarmDeviceData) GetClasses() []*AlarmClassData {
+	if m != nil {
+		return m.Classes
+	}
+	return nil
+}
+
+func (m *AlarmDeviceData) GetManagedEntities() []*AlarmManagedEntity {
+	if m != nil {
+		return m.ManagedEntities
+	}
+	return nil
+}
+
+func (m *AlarmDeviceData) GetMessageTypes() []*AlarmMessageType {
+	if m != nil {
+		return m.MessageTypes
+	}
+	return nil
+}
+
+type AlarmOpenOmciEventType struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *AlarmOpenOmciEventType) Reset()         { *m = AlarmOpenOmciEventType{} }
+func (m *AlarmOpenOmciEventType) String() string { return proto.CompactTextString(m) }
+func (*AlarmOpenOmciEventType) ProtoMessage()    {}
+func (*AlarmOpenOmciEventType) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_alarm_db_26c635f8b97d9376, []int{6}
+}
+func (m *AlarmOpenOmciEventType) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmOpenOmciEventType.Unmarshal(m, b)
+}
+func (m *AlarmOpenOmciEventType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmOpenOmciEventType.Marshal(b, m, deterministic)
+}
+func (dst *AlarmOpenOmciEventType) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmOpenOmciEventType.Merge(dst, src)
+}
+func (m *AlarmOpenOmciEventType) XXX_Size() int {
+	return xxx_messageInfo_AlarmOpenOmciEventType.Size(m)
+}
+func (m *AlarmOpenOmciEventType) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmOpenOmciEventType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmOpenOmciEventType proto.InternalMessageInfo
+
+type AlarmOpenOmciEvent struct {
+	Type                 AlarmOpenOmciEventType_OpenOmciEventType `protobuf:"varint,1,opt,name=type,proto3,enum=alarm.AlarmOpenOmciEventType_OpenOmciEventType" json:"type,omitempty"`
+	Data                 string                                   `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                                 `json:"-"`
+	XXX_unrecognized     []byte                                   `json:"-"`
+	XXX_sizecache        int32                                    `json:"-"`
+}
+
+func (m *AlarmOpenOmciEvent) Reset()         { *m = AlarmOpenOmciEvent{} }
+func (m *AlarmOpenOmciEvent) String() string { return proto.CompactTextString(m) }
+func (*AlarmOpenOmciEvent) ProtoMessage()    {}
+func (*AlarmOpenOmciEvent) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_alarm_db_26c635f8b97d9376, []int{7}
+}
+func (m *AlarmOpenOmciEvent) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmOpenOmciEvent.Unmarshal(m, b)
+}
+func (m *AlarmOpenOmciEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmOpenOmciEvent.Marshal(b, m, deterministic)
+}
+func (dst *AlarmOpenOmciEvent) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmOpenOmciEvent.Merge(dst, src)
+}
+func (m *AlarmOpenOmciEvent) XXX_Size() int {
+	return xxx_messageInfo_AlarmOpenOmciEvent.Size(m)
+}
+func (m *AlarmOpenOmciEvent) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmOpenOmciEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmOpenOmciEvent proto.InternalMessageInfo
+
+func (m *AlarmOpenOmciEvent) GetType() AlarmOpenOmciEventType_OpenOmciEventType {
+	if m != nil {
+		return m.Type
+	}
+	return AlarmOpenOmciEventType_state_change
+}
+
+func (m *AlarmOpenOmciEvent) GetData() string {
+	if m != nil {
+		return m.Data
+	}
+	return ""
+}
+
+func init() {
+	proto.RegisterType((*AlarmAttributeData)(nil), "alarm.AlarmAttributeData")
+	proto.RegisterType((*AlarmInstanceData)(nil), "alarm.AlarmInstanceData")
+	proto.RegisterType((*AlarmClassData)(nil), "alarm.AlarmClassData")
+	proto.RegisterType((*AlarmManagedEntity)(nil), "alarm.AlarmManagedEntity")
+	proto.RegisterType((*AlarmMessageType)(nil), "alarm.AlarmMessageType")
+	proto.RegisterType((*AlarmDeviceData)(nil), "alarm.AlarmDeviceData")
+	proto.RegisterType((*AlarmOpenOmciEventType)(nil), "alarm.AlarmOpenOmciEventType")
+	proto.RegisterType((*AlarmOpenOmciEvent)(nil), "alarm.AlarmOpenOmciEvent")
+	proto.RegisterEnum("alarm.AlarmOpenOmciEventType_OpenOmciEventType", AlarmOpenOmciEventType_OpenOmciEventType_name, AlarmOpenOmciEventType_OpenOmciEventType_value)
+}
+
+func init() {
+	proto.RegisterFile("voltha_protos/omci_alarm_db.proto", fileDescriptor_omci_alarm_db_26c635f8b97d9376)
+}
+
+var fileDescriptor_omci_alarm_db_26c635f8b97d9376 = []byte{
+	// 595 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcf, 0x6a, 0xdb, 0x4e,
+	0x10, 0xfe, 0x39, 0xb1, 0x13, 0x67, 0x6c, 0x27, 0xce, 0xfe, 0xfa, 0x67, 0x13, 0x08, 0xa4, 0xa2,
+	0x2d, 0x2e, 0xa5, 0x32, 0xa4, 0xd7, 0x40, 0x1b, 0xc7, 0x2e, 0xb8, 0x50, 0x42, 0x95, 0x9c, 0x7a,
+	0x11, 0x6b, 0x69, 0x6a, 0x2f, 0x78, 0x57, 0xae, 0x76, 0x6d, 0xf0, 0xa5, 0xb7, 0x3e, 0x54, 0x1f,
+	0x22, 0x2f, 0xd1, 0x53, 0x9f, 0x20, 0xe7, 0xa2, 0x91, 0x64, 0x4b, 0x08, 0x4a, 0x6f, 0xfa, 0x66,
+	0xbe, 0xf9, 0x66, 0x34, 0xdf, 0xb0, 0xf0, 0x6c, 0x15, 0xcd, 0xed, 0x4c, 0xf8, 0x8b, 0x38, 0xb2,
+	0x91, 0xe9, 0x47, 0x2a, 0x90, 0xbe, 0x98, 0x8b, 0x58, 0xf9, 0xe1, 0xc4, 0xa5, 0x20, 0x6b, 0x10,
+	0x3e, 0xe5, 0x65, 0xa6, 0x42, 0x2b, 0x52, 0x82, 0x33, 0x02, 0x76, 0x95, 0x50, 0xae, 0xac, 0x8d,
+	0xe5, 0x64, 0x69, 0x71, 0x28, 0xac, 0x60, 0x27, 0x50, 0xd7, 0x42, 0x21, 0xaf, 0x9d, 0xd7, 0x7a,
+	0x07, 0x83, 0xc6, 0xef, 0x87, 0xfb, 0xb3, 0x9a, 0x47, 0x21, 0xf6, 0x08, 0x1a, 0x2b, 0x31, 0x5f,
+	0x22, 0xdf, 0x49, 0x72, 0x5e, 0x0a, 0x9c, 0x9f, 0x35, 0x38, 0x26, 0x9d, 0xb1, 0x36, 0x56, 0xe8,
+	0x20, 0x95, 0x79, 0x09, 0x2d, 0x99, 0x61, 0x5f, 0x86, 0xa4, 0xd6, 0xc9, 0xd5, 0x20, 0xcf, 0x8c,
+	0x43, 0xc6, 0x61, 0x3f, 0x88, 0x51, 0x58, 0x0c, 0x33, 0xd5, 0x1c, 0xb2, 0x53, 0x68, 0xaa, 0x28,
+	0x94, 0x5f, 0x25, 0x86, 0x7c, 0x97, 0x52, 0x1b, 0xcc, 0x3e, 0x00, 0x88, 0x7c, 0x6a, 0xc3, 0xeb,
+	0xe7, 0xbb, 0xbd, 0xd6, 0xc5, 0x89, 0x4b, 0x3f, 0xec, 0x56, 0xff, 0x69, 0xd0, 0xfa, 0xf5, 0x70,
+	0x7f, 0xb6, 0x97, 0xfe, 0x98, 0x57, 0xa8, 0x74, 0xbe, 0xc3, 0x21, 0xd1, 0xaf, 0xe7, 0xc2, 0x18,
+	0x9a, 0xfb, 0x1c, 0x9a, 0x41, 0x02, 0x2a, 0x43, 0xef, 0x53, 0x78, 0x1c, 0xb2, 0x8f, 0x70, 0x90,
+	0xcf, 0x6f, 0xf8, 0x0e, 0xb5, 0xe6, 0xc5, 0xd6, 0xc5, 0x35, 0x0c, 0x58, 0xd2, 0xb9, 0x53, 0xda,
+	0x85, 0xb7, 0x2d, 0x77, 0x3e, 0x67, 0x16, 0x7c, 0x12, 0x5a, 0x4c, 0x31, 0x1c, 0x69, 0x2b, 0xed,
+	0xfa, 0x1f, 0x66, 0xc8, 0x4d, 0xda, 0xa9, 0x98, 0xe4, 0x5c, 0x42, 0x37, 0x95, 0x44, 0x63, 0xc4,
+	0x14, 0xef, 0xd6, 0x0b, 0x64, 0x3d, 0x68, 0xab, 0x14, 0xfa, 0x76, 0xbd, 0xc0, 0xb2, 0x68, 0x4b,
+	0x6d, 0x99, 0xce, 0x8f, 0x5d, 0x38, 0xa2, 0xf2, 0x21, 0xae, 0x64, 0x66, 0xa5, 0x03, 0x07, 0x21,
+	0xa1, 0x7c, 0x9e, 0x4d, 0xc7, 0x66, 0x1a, 0xff, 0xab, 0x8d, 0x2e, 0xfc, 0x3f, 0x17, 0xc6, 0x66,
+	0xd7, 0x69, 0xf0, 0xdb, 0x12, 0x75, 0x80, 0xe4, 0x68, 0xc7, 0x3b, 0x4e, 0x52, 0xd4, 0xef, 0x36,
+	0x4b, 0xb0, 0xe7, 0x70, 0x48, 0x7c, 0xb3, 0xd6, 0x81, 0x6f, 0xa5, 0x42, 0x5e, 0x27, 0xc1, 0x76,
+	0x12, 0xbd, 0x5d, 0xeb, 0xe0, 0x4e, 0x2a, 0x4c, 0xfa, 0xad, 0x30, 0x36, 0x32, 0xd2, 0xbc, 0x41,
+	0x4a, 0x39, 0x64, 0xef, 0x21, 0xdd, 0x12, 0x1a, 0xbe, 0x47, 0xe6, 0x3c, 0x2e, 0x9a, 0xb3, 0x31,
+	0x7a, 0x70, 0x94, 0x38, 0x03, 0xdb, 0x4d, 0x7b, 0x79, 0x19, 0x1b, 0x42, 0x57, 0xa5, 0x7e, 0xf8,
+	0x98, 0x18, 0x22, 0xd1, 0xf0, 0xfd, 0xea, 0x89, 0x95, 0x3c, 0xf3, 0x8e, 0x54, 0x01, 0x4a, 0x34,
+	0xec, 0x12, 0x3a, 0xc5, 0x9d, 0x1b, 0xde, 0x24, 0x89, 0xa7, 0x25, 0x89, 0xed, 0xe6, 0xbd, 0x76,
+	0xc1, 0x06, 0xe3, 0xbc, 0x83, 0x27, 0xc4, 0xb8, 0x59, 0xa0, 0xbe, 0x51, 0x81, 0x1c, 0xad, 0x50,
+	0x5b, 0x72, 0xe8, 0x05, 0x1c, 0x57, 0x82, 0xac, 0x0b, 0x6d, 0x63, 0x85, 0x45, 0x3f, 0x98, 0x09,
+	0x3d, 0xc5, 0xee, 0x7f, 0x8e, 0xca, 0x2e, 0xab, 0xc4, 0x65, 0xd7, 0x50, 0xdf, 0x1c, 0xc0, 0xe1,
+	0x45, 0xbf, 0x38, 0x4b, 0x45, 0xd4, 0xad, 0x44, 0x3c, 0x2a, 0x66, 0x0c, 0xea, 0xa1, 0xb0, 0x22,
+	0x33, 0x9a, 0xbe, 0x07, 0xaf, 0xbf, 0xbc, 0x9a, 0x4a, 0x3b, 0x5b, 0x4e, 0xdc, 0x20, 0x52, 0xfd,
+	0x68, 0x81, 0x3a, 0x88, 0xe2, 0xb0, 0x9f, 0xbe, 0x3d, 0x6f, 0xb2, 0xb7, 0x67, 0x1a, 0xd1, 0x43,
+	0x35, 0xd9, 0x23, 0xfc, 0xf6, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x88, 0xd2, 0xfa, 0xd6, 0xc5,
+	0x04, 0x00, 0x00,
+}
diff --git a/go/omci/omci_alarm_db.proto b/go/omci/omci_alarm_db.proto
deleted file mode 100644
index e3f8c0f..0000000
--- a/go/omci/omci_alarm_db.proto
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-// Copyright 2018 - present the original author or authors.
-//
-// 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.
-//
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/omci";
-
-package alarm;
-
-import "voltha_protos/meta.proto";
-
-
-message AlarmAttributeData {
-    string name        = 1 [(voltha.access) = READ_ONLY];
-    string value       = 2;
-}
-
-message AlarmInstanceData {
-    uint32 instance_id      = 1 [(voltha.access) = READ_ONLY];
-    string created          = 2;
-    string modified         = 3;
-
-    repeated AlarmAttributeData attributes = 4
-    [(voltha.child_node) = {key: "name"}];
-}
-
-message AlarmClassData {
-    uint32 class_id         = 1 [(voltha.access) = READ_ONLY];
-
-    repeated AlarmInstanceData instances= 2
-    [(voltha.child_node) = {key: "instance_id"}];
-}
-
-message AlarmManagedEntity {
-    uint32 class_id  = 1 [(voltha.access) = READ_ONLY];
-    string name      = 2 [(voltha.access) = READ_ONLY];
-}
-
-message AlarmMessageType {
-    uint32 message_type = 1 [(voltha.access) = READ_ONLY];
-}
-
-message AlarmDeviceData {
-    string device_id             = 1 [(voltha.access) = READ_ONLY];
-    string created               = 2;
-    uint32 last_alarm_sequence   = 3;
-    string last_sync_time        = 4;
-    uint32 version               = 5;
-
-
-    repeated AlarmClassData classes = 6
-    [(voltha.child_node) = {key: "class_id"}];
-
-    repeated AlarmManagedEntity managed_entities = 7;
-    repeated AlarmMessageType message_types = 8;
-}
-
-message AlarmOpenOmciEventType {
-    enum OpenOmciEventType {
-        state_change = 0; // A state machine has transitioned to a new state
-    }
-}
-
-message AlarmOpenOmciEvent {
-    AlarmOpenOmciEventType.OpenOmciEventType type = 1;
-
-    string data = 2; // associated data, in json format
-}
diff --git a/go/omci/omci_mib_db.pb.go b/go/omci/omci_mib_db.pb.go
new file mode 100644
index 0000000..3423099
--- /dev/null
+++ b/go/omci/omci_mib_db.pb.go
@@ -0,0 +1,505 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/omci_mib_db.proto
+
+package omci // import "github.com/opencord/voltha-protos/go/omci"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import _ "github.com/opencord/voltha-protos/go/common"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type OpenOmciEventType_OpenOmciEventType int32
+
+const (
+	OpenOmciEventType_state_change OpenOmciEventType_OpenOmciEventType = 0
+)
+
+var OpenOmciEventType_OpenOmciEventType_name = map[int32]string{
+	0: "state_change",
+}
+var OpenOmciEventType_OpenOmciEventType_value = map[string]int32{
+	"state_change": 0,
+}
+
+func (x OpenOmciEventType_OpenOmciEventType) String() string {
+	return proto.EnumName(OpenOmciEventType_OpenOmciEventType_name, int32(x))
+}
+func (OpenOmciEventType_OpenOmciEventType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_omci_mib_db_2d13ee397f003988, []int{6, 0}
+}
+
+type MibAttributeData struct {
+	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+	Value                string   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *MibAttributeData) Reset()         { *m = MibAttributeData{} }
+func (m *MibAttributeData) String() string { return proto.CompactTextString(m) }
+func (*MibAttributeData) ProtoMessage()    {}
+func (*MibAttributeData) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_mib_db_2d13ee397f003988, []int{0}
+}
+func (m *MibAttributeData) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_MibAttributeData.Unmarshal(m, b)
+}
+func (m *MibAttributeData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_MibAttributeData.Marshal(b, m, deterministic)
+}
+func (dst *MibAttributeData) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MibAttributeData.Merge(dst, src)
+}
+func (m *MibAttributeData) XXX_Size() int {
+	return xxx_messageInfo_MibAttributeData.Size(m)
+}
+func (m *MibAttributeData) XXX_DiscardUnknown() {
+	xxx_messageInfo_MibAttributeData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MibAttributeData proto.InternalMessageInfo
+
+func (m *MibAttributeData) GetName() string {
+	if m != nil {
+		return m.Name
+	}
+	return ""
+}
+
+func (m *MibAttributeData) GetValue() string {
+	if m != nil {
+		return m.Value
+	}
+	return ""
+}
+
+type MibInstanceData struct {
+	InstanceId           uint32              `protobuf:"varint,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
+	Created              string              `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
+	Modified             string              `protobuf:"bytes,3,opt,name=modified,proto3" json:"modified,omitempty"`
+	Attributes           []*MibAttributeData `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
+	XXX_unrecognized     []byte              `json:"-"`
+	XXX_sizecache        int32               `json:"-"`
+}
+
+func (m *MibInstanceData) Reset()         { *m = MibInstanceData{} }
+func (m *MibInstanceData) String() string { return proto.CompactTextString(m) }
+func (*MibInstanceData) ProtoMessage()    {}
+func (*MibInstanceData) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_mib_db_2d13ee397f003988, []int{1}
+}
+func (m *MibInstanceData) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_MibInstanceData.Unmarshal(m, b)
+}
+func (m *MibInstanceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_MibInstanceData.Marshal(b, m, deterministic)
+}
+func (dst *MibInstanceData) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MibInstanceData.Merge(dst, src)
+}
+func (m *MibInstanceData) XXX_Size() int {
+	return xxx_messageInfo_MibInstanceData.Size(m)
+}
+func (m *MibInstanceData) XXX_DiscardUnknown() {
+	xxx_messageInfo_MibInstanceData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MibInstanceData proto.InternalMessageInfo
+
+func (m *MibInstanceData) GetInstanceId() uint32 {
+	if m != nil {
+		return m.InstanceId
+	}
+	return 0
+}
+
+func (m *MibInstanceData) GetCreated() string {
+	if m != nil {
+		return m.Created
+	}
+	return ""
+}
+
+func (m *MibInstanceData) GetModified() string {
+	if m != nil {
+		return m.Modified
+	}
+	return ""
+}
+
+func (m *MibInstanceData) GetAttributes() []*MibAttributeData {
+	if m != nil {
+		return m.Attributes
+	}
+	return nil
+}
+
+type MibClassData struct {
+	ClassId              uint32             `protobuf:"varint,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
+	Instances            []*MibInstanceData `protobuf:"bytes,2,rep,name=instances,proto3" json:"instances,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
+	XXX_unrecognized     []byte             `json:"-"`
+	XXX_sizecache        int32              `json:"-"`
+}
+
+func (m *MibClassData) Reset()         { *m = MibClassData{} }
+func (m *MibClassData) String() string { return proto.CompactTextString(m) }
+func (*MibClassData) ProtoMessage()    {}
+func (*MibClassData) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_mib_db_2d13ee397f003988, []int{2}
+}
+func (m *MibClassData) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_MibClassData.Unmarshal(m, b)
+}
+func (m *MibClassData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_MibClassData.Marshal(b, m, deterministic)
+}
+func (dst *MibClassData) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MibClassData.Merge(dst, src)
+}
+func (m *MibClassData) XXX_Size() int {
+	return xxx_messageInfo_MibClassData.Size(m)
+}
+func (m *MibClassData) XXX_DiscardUnknown() {
+	xxx_messageInfo_MibClassData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MibClassData proto.InternalMessageInfo
+
+func (m *MibClassData) GetClassId() uint32 {
+	if m != nil {
+		return m.ClassId
+	}
+	return 0
+}
+
+func (m *MibClassData) GetInstances() []*MibInstanceData {
+	if m != nil {
+		return m.Instances
+	}
+	return nil
+}
+
+type ManagedEntity struct {
+	ClassId              uint32   `protobuf:"varint,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
+	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *ManagedEntity) Reset()         { *m = ManagedEntity{} }
+func (m *ManagedEntity) String() string { return proto.CompactTextString(m) }
+func (*ManagedEntity) ProtoMessage()    {}
+func (*ManagedEntity) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_mib_db_2d13ee397f003988, []int{3}
+}
+func (m *ManagedEntity) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_ManagedEntity.Unmarshal(m, b)
+}
+func (m *ManagedEntity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_ManagedEntity.Marshal(b, m, deterministic)
+}
+func (dst *ManagedEntity) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ManagedEntity.Merge(dst, src)
+}
+func (m *ManagedEntity) XXX_Size() int {
+	return xxx_messageInfo_ManagedEntity.Size(m)
+}
+func (m *ManagedEntity) XXX_DiscardUnknown() {
+	xxx_messageInfo_ManagedEntity.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ManagedEntity proto.InternalMessageInfo
+
+func (m *ManagedEntity) GetClassId() uint32 {
+	if m != nil {
+		return m.ClassId
+	}
+	return 0
+}
+
+func (m *ManagedEntity) GetName() string {
+	if m != nil {
+		return m.Name
+	}
+	return ""
+}
+
+type MessageType struct {
+	MessageType          uint32   `protobuf:"varint,1,opt,name=message_type,json=messageType,proto3" json:"message_type,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *MessageType) Reset()         { *m = MessageType{} }
+func (m *MessageType) String() string { return proto.CompactTextString(m) }
+func (*MessageType) ProtoMessage()    {}
+func (*MessageType) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_mib_db_2d13ee397f003988, []int{4}
+}
+func (m *MessageType) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_MessageType.Unmarshal(m, b)
+}
+func (m *MessageType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_MessageType.Marshal(b, m, deterministic)
+}
+func (dst *MessageType) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MessageType.Merge(dst, src)
+}
+func (m *MessageType) XXX_Size() int {
+	return xxx_messageInfo_MessageType.Size(m)
+}
+func (m *MessageType) XXX_DiscardUnknown() {
+	xxx_messageInfo_MessageType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MessageType proto.InternalMessageInfo
+
+func (m *MessageType) GetMessageType() uint32 {
+	if m != nil {
+		return m.MessageType
+	}
+	return 0
+}
+
+type MibDeviceData struct {
+	DeviceId             string           `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
+	Created              string           `protobuf:"bytes,2,opt,name=created,proto3" json:"created,omitempty"`
+	LastSyncTime         string           `protobuf:"bytes,3,opt,name=last_sync_time,json=lastSyncTime,proto3" json:"last_sync_time,omitempty"`
+	MibDataSync          uint32           `protobuf:"varint,4,opt,name=mib_data_sync,json=mibDataSync,proto3" json:"mib_data_sync,omitempty"`
+	Version              uint32           `protobuf:"varint,5,opt,name=version,proto3" json:"version,omitempty"`
+	Classes              []*MibClassData  `protobuf:"bytes,6,rep,name=classes,proto3" json:"classes,omitempty"`
+	ManagedEntities      []*ManagedEntity `protobuf:"bytes,7,rep,name=managed_entities,json=managedEntities,proto3" json:"managed_entities,omitempty"`
+	MessageTypes         []*MessageType   `protobuf:"bytes,8,rep,name=message_types,json=messageTypes,proto3" json:"message_types,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
+}
+
+func (m *MibDeviceData) Reset()         { *m = MibDeviceData{} }
+func (m *MibDeviceData) String() string { return proto.CompactTextString(m) }
+func (*MibDeviceData) ProtoMessage()    {}
+func (*MibDeviceData) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_mib_db_2d13ee397f003988, []int{5}
+}
+func (m *MibDeviceData) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_MibDeviceData.Unmarshal(m, b)
+}
+func (m *MibDeviceData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_MibDeviceData.Marshal(b, m, deterministic)
+}
+func (dst *MibDeviceData) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MibDeviceData.Merge(dst, src)
+}
+func (m *MibDeviceData) XXX_Size() int {
+	return xxx_messageInfo_MibDeviceData.Size(m)
+}
+func (m *MibDeviceData) XXX_DiscardUnknown() {
+	xxx_messageInfo_MibDeviceData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MibDeviceData proto.InternalMessageInfo
+
+func (m *MibDeviceData) GetDeviceId() string {
+	if m != nil {
+		return m.DeviceId
+	}
+	return ""
+}
+
+func (m *MibDeviceData) GetCreated() string {
+	if m != nil {
+		return m.Created
+	}
+	return ""
+}
+
+func (m *MibDeviceData) GetLastSyncTime() string {
+	if m != nil {
+		return m.LastSyncTime
+	}
+	return ""
+}
+
+func (m *MibDeviceData) GetMibDataSync() uint32 {
+	if m != nil {
+		return m.MibDataSync
+	}
+	return 0
+}
+
+func (m *MibDeviceData) GetVersion() uint32 {
+	if m != nil {
+		return m.Version
+	}
+	return 0
+}
+
+func (m *MibDeviceData) GetClasses() []*MibClassData {
+	if m != nil {
+		return m.Classes
+	}
+	return nil
+}
+
+func (m *MibDeviceData) GetManagedEntities() []*ManagedEntity {
+	if m != nil {
+		return m.ManagedEntities
+	}
+	return nil
+}
+
+func (m *MibDeviceData) GetMessageTypes() []*MessageType {
+	if m != nil {
+		return m.MessageTypes
+	}
+	return nil
+}
+
+type OpenOmciEventType struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OpenOmciEventType) Reset()         { *m = OpenOmciEventType{} }
+func (m *OpenOmciEventType) String() string { return proto.CompactTextString(m) }
+func (*OpenOmciEventType) ProtoMessage()    {}
+func (*OpenOmciEventType) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_mib_db_2d13ee397f003988, []int{6}
+}
+func (m *OpenOmciEventType) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OpenOmciEventType.Unmarshal(m, b)
+}
+func (m *OpenOmciEventType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OpenOmciEventType.Marshal(b, m, deterministic)
+}
+func (dst *OpenOmciEventType) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OpenOmciEventType.Merge(dst, src)
+}
+func (m *OpenOmciEventType) XXX_Size() int {
+	return xxx_messageInfo_OpenOmciEventType.Size(m)
+}
+func (m *OpenOmciEventType) XXX_DiscardUnknown() {
+	xxx_messageInfo_OpenOmciEventType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OpenOmciEventType proto.InternalMessageInfo
+
+type OpenOmciEvent struct {
+	Type                 OpenOmciEventType_OpenOmciEventType `protobuf:"varint,1,opt,name=type,proto3,enum=omci.OpenOmciEventType_OpenOmciEventType" json:"type,omitempty"`
+	Data                 string                              `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                            `json:"-"`
+	XXX_unrecognized     []byte                              `json:"-"`
+	XXX_sizecache        int32                               `json:"-"`
+}
+
+func (m *OpenOmciEvent) Reset()         { *m = OpenOmciEvent{} }
+func (m *OpenOmciEvent) String() string { return proto.CompactTextString(m) }
+func (*OpenOmciEvent) ProtoMessage()    {}
+func (*OpenOmciEvent) Descriptor() ([]byte, []int) {
+	return fileDescriptor_omci_mib_db_2d13ee397f003988, []int{7}
+}
+func (m *OpenOmciEvent) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OpenOmciEvent.Unmarshal(m, b)
+}
+func (m *OpenOmciEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OpenOmciEvent.Marshal(b, m, deterministic)
+}
+func (dst *OpenOmciEvent) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OpenOmciEvent.Merge(dst, src)
+}
+func (m *OpenOmciEvent) XXX_Size() int {
+	return xxx_messageInfo_OpenOmciEvent.Size(m)
+}
+func (m *OpenOmciEvent) XXX_DiscardUnknown() {
+	xxx_messageInfo_OpenOmciEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OpenOmciEvent proto.InternalMessageInfo
+
+func (m *OpenOmciEvent) GetType() OpenOmciEventType_OpenOmciEventType {
+	if m != nil {
+		return m.Type
+	}
+	return OpenOmciEventType_state_change
+}
+
+func (m *OpenOmciEvent) GetData() string {
+	if m != nil {
+		return m.Data
+	}
+	return ""
+}
+
+func init() {
+	proto.RegisterType((*MibAttributeData)(nil), "omci.MibAttributeData")
+	proto.RegisterType((*MibInstanceData)(nil), "omci.MibInstanceData")
+	proto.RegisterType((*MibClassData)(nil), "omci.MibClassData")
+	proto.RegisterType((*ManagedEntity)(nil), "omci.ManagedEntity")
+	proto.RegisterType((*MessageType)(nil), "omci.MessageType")
+	proto.RegisterType((*MibDeviceData)(nil), "omci.MibDeviceData")
+	proto.RegisterType((*OpenOmciEventType)(nil), "omci.OpenOmciEventType")
+	proto.RegisterType((*OpenOmciEvent)(nil), "omci.OpenOmciEvent")
+	proto.RegisterEnum("omci.OpenOmciEventType_OpenOmciEventType", OpenOmciEventType_OpenOmciEventType_name, OpenOmciEventType_OpenOmciEventType_value)
+}
+
+func init() {
+	proto.RegisterFile("voltha_protos/omci_mib_db.proto", fileDescriptor_omci_mib_db_2d13ee397f003988)
+}
+
+var fileDescriptor_omci_mib_db_2d13ee397f003988 = []byte{
+	// 582 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xdb, 0x6a, 0xdb, 0x40,
+	0x10, 0xad, 0x1d, 0x25, 0x71, 0x46, 0x56, 0xe2, 0x6c, 0x2f, 0x6c, 0x03, 0xa1, 0x41, 0xb4, 0x25,
+	0xa1, 0xd4, 0x81, 0x14, 0x5a, 0x28, 0xa4, 0x50, 0x3b, 0xa1, 0x18, 0x2a, 0x02, 0x6a, 0x9e, 0xfa,
+	0x22, 0x56, 0xd2, 0xd4, 0x5e, 0xf0, 0xae, 0x8c, 0x77, 0x6d, 0xd0, 0x7f, 0xf5, 0x37, 0xf2, 0x13,
+	0x7d, 0xca, 0x17, 0xe4, 0xb9, 0xec, 0xea, 0x62, 0xb9, 0x2e, 0xa5, 0x6f, 0x3a, 0x73, 0x39, 0x33,
+	0x73, 0x8e, 0x58, 0x78, 0xb1, 0xcc, 0xa6, 0x7a, 0xc2, 0xa2, 0xd9, 0x3c, 0xd3, 0x99, 0x3a, 0xcf,
+	0x44, 0xc2, 0x23, 0xc1, 0xe3, 0x28, 0x8d, 0xfb, 0x36, 0x44, 0x1c, 0x13, 0x3a, 0xa2, 0xeb, 0x65,
+	0x02, 0x35, 0x2b, 0xf2, 0xfe, 0x10, 0x7a, 0x01, 0x8f, 0x3f, 0x6b, 0x3d, 0xe7, 0xf1, 0x42, 0xe3,
+	0x15, 0xd3, 0x8c, 0x3c, 0x07, 0x47, 0x32, 0x81, 0xb4, 0x75, 0xd2, 0x3a, 0xdd, 0x1b, 0x6c, 0xdf,
+	0x3f, 0xdc, 0x1d, 0xb7, 0x42, 0x1b, 0x22, 0x4f, 0x60, 0x7b, 0xc9, 0xa6, 0x0b, 0xa4, 0x6d, 0x93,
+	0x0b, 0x0b, 0xe0, 0xff, 0x6c, 0xc1, 0x41, 0xc0, 0xe3, 0x91, 0x54, 0x9a, 0xc9, 0xa4, 0x20, 0x79,
+	0x0d, 0x2e, 0x2f, 0x71, 0xc4, 0x53, 0xcb, 0xe5, 0x55, 0x5c, 0x50, 0x65, 0x46, 0x29, 0xa1, 0xb0,
+	0x9b, 0xcc, 0x91, 0x69, 0x4c, 0x4b, 0xce, 0x0a, 0x92, 0x23, 0xe8, 0x88, 0x2c, 0xe5, 0x3f, 0x38,
+	0xa6, 0x74, 0xcb, 0xa6, 0x6a, 0x4c, 0x86, 0x00, 0xac, 0xda, 0x59, 0x51, 0xe7, 0x64, 0xeb, 0xd4,
+	0xbd, 0x78, 0xd6, 0x37, 0xb7, 0xf6, 0xff, 0x3c, 0x67, 0xe0, 0xfe, 0x7a, 0xb8, 0x3b, 0xde, 0x29,
+	0x6e, 0x0a, 0x1b, 0x6d, 0x7e, 0x0e, 0xdd, 0x80, 0xc7, 0xc3, 0x29, 0x53, 0xca, 0xae, 0x7c, 0x02,
+	0x9d, 0xc4, 0x80, 0x8d, 0x7d, 0x77, 0x6d, 0x78, 0x94, 0x92, 0x2f, 0xb0, 0x57, 0xad, 0xae, 0x68,
+	0xdb, 0x4e, 0x7d, 0x5a, 0x4f, 0x6d, 0x9e, 0x3f, 0x20, 0x66, 0xa8, 0xb7, 0xa6, 0x41, 0xb8, 0xea,
+	0xf5, 0xbf, 0x82, 0x17, 0x30, 0xc9, 0xc6, 0x98, 0x5e, 0x4b, 0xcd, 0x75, 0xfe, 0x1f, 0xb3, 0x2b,
+	0x57, 0xda, 0x1b, 0xae, 0xf8, 0x1f, 0xc0, 0x0d, 0x50, 0x29, 0x36, 0xc6, 0xdb, 0x7c, 0x86, 0xe4,
+	0x14, 0xba, 0xa2, 0x80, 0x91, 0xce, 0x67, 0xb8, 0xce, 0xe7, 0x8a, 0x55, 0xa5, 0x7f, 0xdf, 0x06,
+	0x2f, 0xe0, 0xf1, 0x15, 0x2e, 0x79, 0x69, 0x9b, 0x0f, 0x7b, 0xa9, 0x45, 0xd5, 0x22, 0xf5, 0xa8,
+	0x4e, 0x11, 0xff, 0xa7, 0x65, 0x2f, 0x61, 0x7f, 0xca, 0x94, 0x8e, 0x54, 0x2e, 0x93, 0x48, 0x73,
+	0x81, 0xa5, 0x71, 0x5d, 0x13, 0xfd, 0x96, 0xcb, 0xe4, 0x96, 0x0b, 0x24, 0x3e, 0x78, 0xf6, 0x1f,
+	0x65, 0x9a, 0xd9, 0x4a, 0xea, 0x98, 0x05, 0x43, 0x57, 0xf0, 0xd8, 0xec, 0x60, 0xea, 0xcc, 0x8c,
+	0x25, 0xce, 0x15, 0xcf, 0x24, 0xdd, 0xb6, 0xd9, 0x0a, 0x92, 0x4b, 0x28, 0x24, 0x41, 0x45, 0x77,
+	0xac, 0x03, 0xa4, 0x76, 0xa0, 0xb6, 0x72, 0x70, 0x60, 0xe4, 0x87, 0x95, 0xa6, 0x61, 0xd5, 0x43,
+	0x3e, 0x41, 0x4f, 0x14, 0xca, 0x47, 0x68, 0xa4, 0xe7, 0xa8, 0xe8, 0xae, 0xe5, 0x79, 0x5c, 0xf2,
+	0x34, 0x7d, 0x09, 0x0f, 0x44, 0x03, 0x72, 0x54, 0xe4, 0x3d, 0x78, 0x4d, 0x71, 0x15, 0xed, 0xd8,
+	0xe6, 0xc3, 0xb2, 0x79, 0x25, 0x6e, 0xd8, 0x6d, 0x28, 0xad, 0xfc, 0x8f, 0x70, 0x78, 0x33, 0x43,
+	0x79, 0x23, 0x12, 0x7e, 0xbd, 0x44, 0xa9, 0xad, 0xfe, 0xaf, 0xfe, 0x12, 0x24, 0x3d, 0xe8, 0x2a,
+	0xcd, 0x34, 0x46, 0xc9, 0x84, 0xc9, 0x31, 0xf6, 0x1e, 0xf9, 0x31, 0x78, 0x6b, 0x65, 0xe4, 0x12,
+	0x9c, 0xda, 0xd9, 0xfd, 0x8b, 0xb3, 0x62, 0xf6, 0x06, 0xd3, 0x66, 0x24, 0xb4, 0x6d, 0x84, 0x80,
+	0x63, 0xc4, 0x2f, 0xdd, 0xb3, 0xdf, 0x83, 0x37, 0xdf, 0xcf, 0xc6, 0x5c, 0x4f, 0x16, 0x71, 0x3f,
+	0xc9, 0xc4, 0x79, 0x36, 0x43, 0x99, 0x64, 0xf3, 0xf4, 0xbc, 0x78, 0x38, 0xde, 0x96, 0x0f, 0xc7,
+	0x38, 0xb3, 0x4f, 0x4c, 0xbc, 0x63, 0xf1, 0xbb, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc6, 0xd7,
+	0x40, 0x10, 0x7f, 0x04, 0x00, 0x00,
+}
diff --git a/go/omci/omci_mib_db.proto b/go/omci/omci_mib_db.proto
deleted file mode 100644
index 9a2933a..0000000
--- a/go/omci/omci_mib_db.proto
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// Copyright 2018 - present the original author or authors.
-//
-// 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.
-//
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/omci";
-
-package omci;
-
-import "voltha_protos/meta.proto";
-
-
-message MibAttributeData {
-    string name        = 1 [(voltha.access) = READ_ONLY];
-    string value       = 2;
-}
-
-message MibInstanceData {
-    uint32 instance_id      = 1 [(voltha.access) = READ_ONLY];
-    string created          = 2;
-    string modified         = 3;
-
-    repeated MibAttributeData attributes = 4
-    [(voltha.child_node) = {key: "name"}];
-}
-
-message MibClassData {
-    uint32 class_id         = 1 [(voltha.access) = READ_ONLY];
-
-    repeated MibInstanceData instances= 2
-    [(voltha.child_node) = {key: "instance_id"}];
-}
-
-message ManagedEntity {
-    uint32 class_id  = 1 [(voltha.access) = READ_ONLY];
-    string name      = 2 [(voltha.access) = READ_ONLY];
-}
-
-message MessageType {
-    uint32 message_type = 1 [(voltha.access) = READ_ONLY];
-}
-
-message MibDeviceData {
-    string device_id        = 1 [(voltha.access) = READ_ONLY];
-    string created          = 2;
-    string last_sync_time   = 3;
-    uint32 mib_data_sync    = 4;
-    uint32 version          = 5;
-
-    repeated MibClassData classes = 6
-    [(voltha.child_node) = {key: "class_id"}];
-
-    repeated ManagedEntity managed_entities = 7;
-    repeated MessageType message_types = 8;
-}
-
-message OpenOmciEventType {
-    enum OpenOmciEventType {
-        state_change = 0; // A state machine has transitioned to a new state
-    }
-}
-
-message OpenOmciEvent {
-    OpenOmciEventType.OpenOmciEventType type = 1;
-
-    string data = 2; // associated data, in json format
-}
diff --git a/go/openflow_13/openflow_13.pb.go b/go/openflow_13/openflow_13.pb.go
new file mode 100644
index 0000000..013a205
--- /dev/null
+++ b/go/openflow_13/openflow_13.pb.go
@@ -0,0 +1,11020 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/openflow_13.proto
+
+package openflow_13 // import "github.com/opencord/voltha-protos/go/openflow_13"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import common "github.com/opencord/voltha-protos/go/common"
+import _ "google.golang.org/genproto/googleapis/api/annotations"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+// InlineNode from public import voltha_protos/yang_options.proto
+type InlineNode = common.InlineNode
+
+// RpcReturnDef from public import voltha_protos/yang_options.proto
+type RpcReturnDef = common.RpcReturnDef
+
+// MessageParserOption from public import voltha_protos/yang_options.proto
+type MessageParserOption = common.MessageParserOption
+
+var MessageParserOption_name = common.MessageParserOption_name
+var MessageParserOption_value = common.MessageParserOption_value
+
+const MessageParserOption_MOVE_TO_PARENT_LEVEL = MessageParserOption(common.MessageParserOption_MOVE_TO_PARENT_LEVEL)
+const MessageParserOption_CREATE_BOTH_GROUPING_AND_CONTAINER = MessageParserOption(common.MessageParserOption_CREATE_BOTH_GROUPING_AND_CONTAINER)
+
+// yang_child_rule from public import voltha_protos/yang_options.proto
+var E_YangChildRule = common.E_YangChildRule
+
+// yang_message_rule from public import voltha_protos/yang_options.proto
+var E_YangMessageRule = common.E_YangMessageRule
+
+// yang_inline_node from public import voltha_protos/yang_options.proto
+var E_YangInlineNode = common.E_YangInlineNode
+
+// yang_xml_tag from public import voltha_protos/yang_options.proto
+var E_YangXmlTag = common.E_YangXmlTag
+
+// Port numbering. Ports are numbered starting from 1.
+type OfpPortNo int32
+
+const (
+	OfpPortNo_OFPP_INVALID OfpPortNo = 0
+	// Maximum number of physical and logical switch ports.
+	OfpPortNo_OFPP_MAX OfpPortNo = 2147483392
+	// Reserved OpenFlow Port (fake output "ports").
+	OfpPortNo_OFPP_IN_PORT    OfpPortNo = 2147483640
+	OfpPortNo_OFPP_TABLE      OfpPortNo = 2147483641
+	OfpPortNo_OFPP_NORMAL     OfpPortNo = 2147483642
+	OfpPortNo_OFPP_FLOOD      OfpPortNo = 2147483643
+	OfpPortNo_OFPP_ALL        OfpPortNo = 2147483644
+	OfpPortNo_OFPP_CONTROLLER OfpPortNo = 2147483645
+	OfpPortNo_OFPP_LOCAL      OfpPortNo = 2147483646
+	OfpPortNo_OFPP_ANY        OfpPortNo = 2147483647
+)
+
+var OfpPortNo_name = map[int32]string{
+	0:          "OFPP_INVALID",
+	2147483392: "OFPP_MAX",
+	2147483640: "OFPP_IN_PORT",
+	2147483641: "OFPP_TABLE",
+	2147483642: "OFPP_NORMAL",
+	2147483643: "OFPP_FLOOD",
+	2147483644: "OFPP_ALL",
+	2147483645: "OFPP_CONTROLLER",
+	2147483646: "OFPP_LOCAL",
+	2147483647: "OFPP_ANY",
+}
+var OfpPortNo_value = map[string]int32{
+	"OFPP_INVALID":    0,
+	"OFPP_MAX":        2147483392,
+	"OFPP_IN_PORT":    2147483640,
+	"OFPP_TABLE":      2147483641,
+	"OFPP_NORMAL":     2147483642,
+	"OFPP_FLOOD":      2147483643,
+	"OFPP_ALL":        2147483644,
+	"OFPP_CONTROLLER": 2147483645,
+	"OFPP_LOCAL":      2147483646,
+	"OFPP_ANY":        2147483647,
+}
+
+func (x OfpPortNo) String() string {
+	return proto.EnumName(OfpPortNo_name, int32(x))
+}
+func (OfpPortNo) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{0}
+}
+
+type OfpType int32
+
+const (
+	// Immutable messages.
+	OfpType_OFPT_HELLO        OfpType = 0
+	OfpType_OFPT_ERROR        OfpType = 1
+	OfpType_OFPT_ECHO_REQUEST OfpType = 2
+	OfpType_OFPT_ECHO_REPLY   OfpType = 3
+	OfpType_OFPT_EXPERIMENTER OfpType = 4
+	// Switch configuration messages.
+	OfpType_OFPT_FEATURES_REQUEST   OfpType = 5
+	OfpType_OFPT_FEATURES_REPLY     OfpType = 6
+	OfpType_OFPT_GET_CONFIG_REQUEST OfpType = 7
+	OfpType_OFPT_GET_CONFIG_REPLY   OfpType = 8
+	OfpType_OFPT_SET_CONFIG         OfpType = 9
+	// Asynchronous messages.
+	OfpType_OFPT_PACKET_IN    OfpType = 10
+	OfpType_OFPT_FLOW_REMOVED OfpType = 11
+	OfpType_OFPT_PORT_STATUS  OfpType = 12
+	// Controller command messages.
+	OfpType_OFPT_PACKET_OUT OfpType = 13
+	OfpType_OFPT_FLOW_MOD   OfpType = 14
+	OfpType_OFPT_GROUP_MOD  OfpType = 15
+	OfpType_OFPT_PORT_MOD   OfpType = 16
+	OfpType_OFPT_TABLE_MOD  OfpType = 17
+	// Multipart messages.
+	OfpType_OFPT_MULTIPART_REQUEST OfpType = 18
+	OfpType_OFPT_MULTIPART_REPLY   OfpType = 19
+	// Barrier messages.
+	OfpType_OFPT_BARRIER_REQUEST OfpType = 20
+	OfpType_OFPT_BARRIER_REPLY   OfpType = 21
+	// Queue Configuration messages.
+	OfpType_OFPT_QUEUE_GET_CONFIG_REQUEST OfpType = 22
+	OfpType_OFPT_QUEUE_GET_CONFIG_REPLY   OfpType = 23
+	// Controller role change request messages.
+	OfpType_OFPT_ROLE_REQUEST OfpType = 24
+	OfpType_OFPT_ROLE_REPLY   OfpType = 25
+	// Asynchronous message configuration.
+	OfpType_OFPT_GET_ASYNC_REQUEST OfpType = 26
+	OfpType_OFPT_GET_ASYNC_REPLY   OfpType = 27
+	OfpType_OFPT_SET_ASYNC         OfpType = 28
+	// Meters and rate limiters configuration messages.
+	OfpType_OFPT_METER_MOD OfpType = 29
+)
+
+var OfpType_name = map[int32]string{
+	0:  "OFPT_HELLO",
+	1:  "OFPT_ERROR",
+	2:  "OFPT_ECHO_REQUEST",
+	3:  "OFPT_ECHO_REPLY",
+	4:  "OFPT_EXPERIMENTER",
+	5:  "OFPT_FEATURES_REQUEST",
+	6:  "OFPT_FEATURES_REPLY",
+	7:  "OFPT_GET_CONFIG_REQUEST",
+	8:  "OFPT_GET_CONFIG_REPLY",
+	9:  "OFPT_SET_CONFIG",
+	10: "OFPT_PACKET_IN",
+	11: "OFPT_FLOW_REMOVED",
+	12: "OFPT_PORT_STATUS",
+	13: "OFPT_PACKET_OUT",
+	14: "OFPT_FLOW_MOD",
+	15: "OFPT_GROUP_MOD",
+	16: "OFPT_PORT_MOD",
+	17: "OFPT_TABLE_MOD",
+	18: "OFPT_MULTIPART_REQUEST",
+	19: "OFPT_MULTIPART_REPLY",
+	20: "OFPT_BARRIER_REQUEST",
+	21: "OFPT_BARRIER_REPLY",
+	22: "OFPT_QUEUE_GET_CONFIG_REQUEST",
+	23: "OFPT_QUEUE_GET_CONFIG_REPLY",
+	24: "OFPT_ROLE_REQUEST",
+	25: "OFPT_ROLE_REPLY",
+	26: "OFPT_GET_ASYNC_REQUEST",
+	27: "OFPT_GET_ASYNC_REPLY",
+	28: "OFPT_SET_ASYNC",
+	29: "OFPT_METER_MOD",
+}
+var OfpType_value = map[string]int32{
+	"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_MULTIPART_REQUEST":        18,
+	"OFPT_MULTIPART_REPLY":          19,
+	"OFPT_BARRIER_REQUEST":          20,
+	"OFPT_BARRIER_REPLY":            21,
+	"OFPT_QUEUE_GET_CONFIG_REQUEST": 22,
+	"OFPT_QUEUE_GET_CONFIG_REPLY":   23,
+	"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,
+}
+
+func (x OfpType) String() string {
+	return proto.EnumName(OfpType_name, int32(x))
+}
+func (OfpType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{1}
+}
+
+// Hello elements types.
+type OfpHelloElemType int32
+
+const (
+	OfpHelloElemType_OFPHET_INVALID       OfpHelloElemType = 0
+	OfpHelloElemType_OFPHET_VERSIONBITMAP OfpHelloElemType = 1
+)
+
+var OfpHelloElemType_name = map[int32]string{
+	0: "OFPHET_INVALID",
+	1: "OFPHET_VERSIONBITMAP",
+}
+var OfpHelloElemType_value = map[string]int32{
+	"OFPHET_INVALID":       0,
+	"OFPHET_VERSIONBITMAP": 1,
+}
+
+func (x OfpHelloElemType) String() string {
+	return proto.EnumName(OfpHelloElemType_name, int32(x))
+}
+func (OfpHelloElemType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{2}
+}
+
+type OfpConfigFlags int32
+
+const (
+	// Handling of IP fragments.
+	OfpConfigFlags_OFPC_FRAG_NORMAL OfpConfigFlags = 0
+	OfpConfigFlags_OFPC_FRAG_DROP   OfpConfigFlags = 1
+	OfpConfigFlags_OFPC_FRAG_REASM  OfpConfigFlags = 2
+	OfpConfigFlags_OFPC_FRAG_MASK   OfpConfigFlags = 3
+)
+
+var OfpConfigFlags_name = map[int32]string{
+	0: "OFPC_FRAG_NORMAL",
+	1: "OFPC_FRAG_DROP",
+	2: "OFPC_FRAG_REASM",
+	3: "OFPC_FRAG_MASK",
+}
+var OfpConfigFlags_value = map[string]int32{
+	"OFPC_FRAG_NORMAL": 0,
+	"OFPC_FRAG_DROP":   1,
+	"OFPC_FRAG_REASM":  2,
+	"OFPC_FRAG_MASK":   3,
+}
+
+func (x OfpConfigFlags) String() string {
+	return proto.EnumName(OfpConfigFlags_name, int32(x))
+}
+func (OfpConfigFlags) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{3}
+}
+
+// Flags to configure the table. Reserved for future use.
+type OfpTableConfig int32
+
+const (
+	OfpTableConfig_OFPTC_INVALID         OfpTableConfig = 0
+	OfpTableConfig_OFPTC_DEPRECATED_MASK OfpTableConfig = 3
+)
+
+var OfpTableConfig_name = map[int32]string{
+	0: "OFPTC_INVALID",
+	3: "OFPTC_DEPRECATED_MASK",
+}
+var OfpTableConfig_value = map[string]int32{
+	"OFPTC_INVALID":         0,
+	"OFPTC_DEPRECATED_MASK": 3,
+}
+
+func (x OfpTableConfig) String() string {
+	return proto.EnumName(OfpTableConfig_name, int32(x))
+}
+func (OfpTableConfig) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{4}
+}
+
+// Table numbering. Tables can use any number up to OFPT_MAX.
+type OfpTable int32
+
+const (
+	OfpTable_OFPTT_INVALID OfpTable = 0
+	// Last usable table number.
+	OfpTable_OFPTT_MAX OfpTable = 254
+	// Fake tables.
+	OfpTable_OFPTT_ALL OfpTable = 255
+)
+
+var OfpTable_name = map[int32]string{
+	0:   "OFPTT_INVALID",
+	254: "OFPTT_MAX",
+	255: "OFPTT_ALL",
+}
+var OfpTable_value = map[string]int32{
+	"OFPTT_INVALID": 0,
+	"OFPTT_MAX":     254,
+	"OFPTT_ALL":     255,
+}
+
+func (x OfpTable) String() string {
+	return proto.EnumName(OfpTable_name, int32(x))
+}
+func (OfpTable) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{5}
+}
+
+// Capabilities supported by the datapath.
+type OfpCapabilities int32
+
+const (
+	OfpCapabilities_OFPC_INVALID      OfpCapabilities = 0
+	OfpCapabilities_OFPC_FLOW_STATS   OfpCapabilities = 1
+	OfpCapabilities_OFPC_TABLE_STATS  OfpCapabilities = 2
+	OfpCapabilities_OFPC_PORT_STATS   OfpCapabilities = 4
+	OfpCapabilities_OFPC_GROUP_STATS  OfpCapabilities = 8
+	OfpCapabilities_OFPC_IP_REASM     OfpCapabilities = 32
+	OfpCapabilities_OFPC_QUEUE_STATS  OfpCapabilities = 64
+	OfpCapabilities_OFPC_PORT_BLOCKED OfpCapabilities = 256
+)
+
+var OfpCapabilities_name = map[int32]string{
+	0:   "OFPC_INVALID",
+	1:   "OFPC_FLOW_STATS",
+	2:   "OFPC_TABLE_STATS",
+	4:   "OFPC_PORT_STATS",
+	8:   "OFPC_GROUP_STATS",
+	32:  "OFPC_IP_REASM",
+	64:  "OFPC_QUEUE_STATS",
+	256: "OFPC_PORT_BLOCKED",
+}
+var OfpCapabilities_value = map[string]int32{
+	"OFPC_INVALID":      0,
+	"OFPC_FLOW_STATS":   1,
+	"OFPC_TABLE_STATS":  2,
+	"OFPC_PORT_STATS":   4,
+	"OFPC_GROUP_STATS":  8,
+	"OFPC_IP_REASM":     32,
+	"OFPC_QUEUE_STATS":  64,
+	"OFPC_PORT_BLOCKED": 256,
+}
+
+func (x OfpCapabilities) String() string {
+	return proto.EnumName(OfpCapabilities_name, int32(x))
+}
+func (OfpCapabilities) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{6}
+}
+
+// Flags to indicate behavior of the physical port.  These flags are
+// used in ofp_port to describe the current configuration.  They are
+// used in the ofp_port_mod message to configure the port's behavior.
+type OfpPortConfig int32
+
+const (
+	OfpPortConfig_OFPPC_INVALID      OfpPortConfig = 0
+	OfpPortConfig_OFPPC_PORT_DOWN    OfpPortConfig = 1
+	OfpPortConfig_OFPPC_NO_RECV      OfpPortConfig = 4
+	OfpPortConfig_OFPPC_NO_FWD       OfpPortConfig = 32
+	OfpPortConfig_OFPPC_NO_PACKET_IN OfpPortConfig = 64
+)
+
+var OfpPortConfig_name = map[int32]string{
+	0:  "OFPPC_INVALID",
+	1:  "OFPPC_PORT_DOWN",
+	4:  "OFPPC_NO_RECV",
+	32: "OFPPC_NO_FWD",
+	64: "OFPPC_NO_PACKET_IN",
+}
+var OfpPortConfig_value = map[string]int32{
+	"OFPPC_INVALID":      0,
+	"OFPPC_PORT_DOWN":    1,
+	"OFPPC_NO_RECV":      4,
+	"OFPPC_NO_FWD":       32,
+	"OFPPC_NO_PACKET_IN": 64,
+}
+
+func (x OfpPortConfig) String() string {
+	return proto.EnumName(OfpPortConfig_name, int32(x))
+}
+func (OfpPortConfig) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{7}
+}
+
+// Current state of the physical port.  These are not configurable from
+// the controller.
+type OfpPortState int32
+
+const (
+	OfpPortState_OFPPS_INVALID   OfpPortState = 0
+	OfpPortState_OFPPS_LINK_DOWN OfpPortState = 1
+	OfpPortState_OFPPS_BLOCKED   OfpPortState = 2
+	OfpPortState_OFPPS_LIVE      OfpPortState = 4
+)
+
+var OfpPortState_name = map[int32]string{
+	0: "OFPPS_INVALID",
+	1: "OFPPS_LINK_DOWN",
+	2: "OFPPS_BLOCKED",
+	4: "OFPPS_LIVE",
+}
+var OfpPortState_value = map[string]int32{
+	"OFPPS_INVALID":   0,
+	"OFPPS_LINK_DOWN": 1,
+	"OFPPS_BLOCKED":   2,
+	"OFPPS_LIVE":      4,
+}
+
+func (x OfpPortState) String() string {
+	return proto.EnumName(OfpPortState_name, int32(x))
+}
+func (OfpPortState) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{8}
+}
+
+// Features of ports available in a datapath.
+type OfpPortFeatures int32
+
+const (
+	OfpPortFeatures_OFPPF_INVALID    OfpPortFeatures = 0
+	OfpPortFeatures_OFPPF_10MB_HD    OfpPortFeatures = 1
+	OfpPortFeatures_OFPPF_10MB_FD    OfpPortFeatures = 2
+	OfpPortFeatures_OFPPF_100MB_HD   OfpPortFeatures = 4
+	OfpPortFeatures_OFPPF_100MB_FD   OfpPortFeatures = 8
+	OfpPortFeatures_OFPPF_1GB_HD     OfpPortFeatures = 16
+	OfpPortFeatures_OFPPF_1GB_FD     OfpPortFeatures = 32
+	OfpPortFeatures_OFPPF_10GB_FD    OfpPortFeatures = 64
+	OfpPortFeatures_OFPPF_40GB_FD    OfpPortFeatures = 128
+	OfpPortFeatures_OFPPF_100GB_FD   OfpPortFeatures = 256
+	OfpPortFeatures_OFPPF_1TB_FD     OfpPortFeatures = 512
+	OfpPortFeatures_OFPPF_OTHER      OfpPortFeatures = 1024
+	OfpPortFeatures_OFPPF_COPPER     OfpPortFeatures = 2048
+	OfpPortFeatures_OFPPF_FIBER      OfpPortFeatures = 4096
+	OfpPortFeatures_OFPPF_AUTONEG    OfpPortFeatures = 8192
+	OfpPortFeatures_OFPPF_PAUSE      OfpPortFeatures = 16384
+	OfpPortFeatures_OFPPF_PAUSE_ASYM OfpPortFeatures = 32768
+)
+
+var OfpPortFeatures_name = map[int32]string{
+	0:     "OFPPF_INVALID",
+	1:     "OFPPF_10MB_HD",
+	2:     "OFPPF_10MB_FD",
+	4:     "OFPPF_100MB_HD",
+	8:     "OFPPF_100MB_FD",
+	16:    "OFPPF_1GB_HD",
+	32:    "OFPPF_1GB_FD",
+	64:    "OFPPF_10GB_FD",
+	128:   "OFPPF_40GB_FD",
+	256:   "OFPPF_100GB_FD",
+	512:   "OFPPF_1TB_FD",
+	1024:  "OFPPF_OTHER",
+	2048:  "OFPPF_COPPER",
+	4096:  "OFPPF_FIBER",
+	8192:  "OFPPF_AUTONEG",
+	16384: "OFPPF_PAUSE",
+	32768: "OFPPF_PAUSE_ASYM",
+}
+var OfpPortFeatures_value = map[string]int32{
+	"OFPPF_INVALID":    0,
+	"OFPPF_10MB_HD":    1,
+	"OFPPF_10MB_FD":    2,
+	"OFPPF_100MB_HD":   4,
+	"OFPPF_100MB_FD":   8,
+	"OFPPF_1GB_HD":     16,
+	"OFPPF_1GB_FD":     32,
+	"OFPPF_10GB_FD":    64,
+	"OFPPF_40GB_FD":    128,
+	"OFPPF_100GB_FD":   256,
+	"OFPPF_1TB_FD":     512,
+	"OFPPF_OTHER":      1024,
+	"OFPPF_COPPER":     2048,
+	"OFPPF_FIBER":      4096,
+	"OFPPF_AUTONEG":    8192,
+	"OFPPF_PAUSE":      16384,
+	"OFPPF_PAUSE_ASYM": 32768,
+}
+
+func (x OfpPortFeatures) String() string {
+	return proto.EnumName(OfpPortFeatures_name, int32(x))
+}
+func (OfpPortFeatures) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{9}
+}
+
+// What changed about the physical port
+type OfpPortReason int32
+
+const (
+	OfpPortReason_OFPPR_ADD    OfpPortReason = 0
+	OfpPortReason_OFPPR_DELETE OfpPortReason = 1
+	OfpPortReason_OFPPR_MODIFY OfpPortReason = 2
+)
+
+var OfpPortReason_name = map[int32]string{
+	0: "OFPPR_ADD",
+	1: "OFPPR_DELETE",
+	2: "OFPPR_MODIFY",
+}
+var OfpPortReason_value = map[string]int32{
+	"OFPPR_ADD":    0,
+	"OFPPR_DELETE": 1,
+	"OFPPR_MODIFY": 2,
+}
+
+func (x OfpPortReason) String() string {
+	return proto.EnumName(OfpPortReason_name, int32(x))
+}
+func (OfpPortReason) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{10}
+}
+
+// The match type indicates the match structure (set of fields that compose the
+// match) in use. The match type is placed in the type field at the beginning
+// of all match structures. The "OpenFlow Extensible Match" type corresponds
+// to OXM TLV format described below and must be supported by all OpenFlow
+// switches. Extensions that define other match types may be published on the
+// ONF wiki. Support for extensions is optional.
+type OfpMatchType int32
+
+const (
+	OfpMatchType_OFPMT_STANDARD OfpMatchType = 0
+	OfpMatchType_OFPMT_OXM      OfpMatchType = 1
+)
+
+var OfpMatchType_name = map[int32]string{
+	0: "OFPMT_STANDARD",
+	1: "OFPMT_OXM",
+}
+var OfpMatchType_value = map[string]int32{
+	"OFPMT_STANDARD": 0,
+	"OFPMT_OXM":      1,
+}
+
+func (x OfpMatchType) String() string {
+	return proto.EnumName(OfpMatchType_name, int32(x))
+}
+func (OfpMatchType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{11}
+}
+
+// OXM Class IDs.
+// The high order bit differentiate reserved classes from member classes.
+// Classes 0x0000 to 0x7FFF are member classes, allocated by ONF.
+// Classes 0x8000 to 0xFFFE are reserved classes, reserved for standardisation.
+type OfpOxmClass int32
+
+const (
+	OfpOxmClass_OFPXMC_NXM_0          OfpOxmClass = 0
+	OfpOxmClass_OFPXMC_NXM_1          OfpOxmClass = 1
+	OfpOxmClass_OFPXMC_OPENFLOW_BASIC OfpOxmClass = 32768
+	OfpOxmClass_OFPXMC_EXPERIMENTER   OfpOxmClass = 65535
+)
+
+var OfpOxmClass_name = map[int32]string{
+	0:     "OFPXMC_NXM_0",
+	1:     "OFPXMC_NXM_1",
+	32768: "OFPXMC_OPENFLOW_BASIC",
+	65535: "OFPXMC_EXPERIMENTER",
+}
+var OfpOxmClass_value = map[string]int32{
+	"OFPXMC_NXM_0":          0,
+	"OFPXMC_NXM_1":          1,
+	"OFPXMC_OPENFLOW_BASIC": 32768,
+	"OFPXMC_EXPERIMENTER":   65535,
+}
+
+func (x OfpOxmClass) String() string {
+	return proto.EnumName(OfpOxmClass_name, int32(x))
+}
+func (OfpOxmClass) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{12}
+}
+
+// OXM Flow field types for OpenFlow basic class.
+type OxmOfbFieldTypes int32
+
+const (
+	OxmOfbFieldTypes_OFPXMT_OFB_IN_PORT        OxmOfbFieldTypes = 0
+	OxmOfbFieldTypes_OFPXMT_OFB_IN_PHY_PORT    OxmOfbFieldTypes = 1
+	OxmOfbFieldTypes_OFPXMT_OFB_METADATA       OxmOfbFieldTypes = 2
+	OxmOfbFieldTypes_OFPXMT_OFB_ETH_DST        OxmOfbFieldTypes = 3
+	OxmOfbFieldTypes_OFPXMT_OFB_ETH_SRC        OxmOfbFieldTypes = 4
+	OxmOfbFieldTypes_OFPXMT_OFB_ETH_TYPE       OxmOfbFieldTypes = 5
+	OxmOfbFieldTypes_OFPXMT_OFB_VLAN_VID       OxmOfbFieldTypes = 6
+	OxmOfbFieldTypes_OFPXMT_OFB_VLAN_PCP       OxmOfbFieldTypes = 7
+	OxmOfbFieldTypes_OFPXMT_OFB_IP_DSCP        OxmOfbFieldTypes = 8
+	OxmOfbFieldTypes_OFPXMT_OFB_IP_ECN         OxmOfbFieldTypes = 9
+	OxmOfbFieldTypes_OFPXMT_OFB_IP_PROTO       OxmOfbFieldTypes = 10
+	OxmOfbFieldTypes_OFPXMT_OFB_IPV4_SRC       OxmOfbFieldTypes = 11
+	OxmOfbFieldTypes_OFPXMT_OFB_IPV4_DST       OxmOfbFieldTypes = 12
+	OxmOfbFieldTypes_OFPXMT_OFB_TCP_SRC        OxmOfbFieldTypes = 13
+	OxmOfbFieldTypes_OFPXMT_OFB_TCP_DST        OxmOfbFieldTypes = 14
+	OxmOfbFieldTypes_OFPXMT_OFB_UDP_SRC        OxmOfbFieldTypes = 15
+	OxmOfbFieldTypes_OFPXMT_OFB_UDP_DST        OxmOfbFieldTypes = 16
+	OxmOfbFieldTypes_OFPXMT_OFB_SCTP_SRC       OxmOfbFieldTypes = 17
+	OxmOfbFieldTypes_OFPXMT_OFB_SCTP_DST       OxmOfbFieldTypes = 18
+	OxmOfbFieldTypes_OFPXMT_OFB_ICMPV4_TYPE    OxmOfbFieldTypes = 19
+	OxmOfbFieldTypes_OFPXMT_OFB_ICMPV4_CODE    OxmOfbFieldTypes = 20
+	OxmOfbFieldTypes_OFPXMT_OFB_ARP_OP         OxmOfbFieldTypes = 21
+	OxmOfbFieldTypes_OFPXMT_OFB_ARP_SPA        OxmOfbFieldTypes = 22
+	OxmOfbFieldTypes_OFPXMT_OFB_ARP_TPA        OxmOfbFieldTypes = 23
+	OxmOfbFieldTypes_OFPXMT_OFB_ARP_SHA        OxmOfbFieldTypes = 24
+	OxmOfbFieldTypes_OFPXMT_OFB_ARP_THA        OxmOfbFieldTypes = 25
+	OxmOfbFieldTypes_OFPXMT_OFB_IPV6_SRC       OxmOfbFieldTypes = 26
+	OxmOfbFieldTypes_OFPXMT_OFB_IPV6_DST       OxmOfbFieldTypes = 27
+	OxmOfbFieldTypes_OFPXMT_OFB_IPV6_FLABEL    OxmOfbFieldTypes = 28
+	OxmOfbFieldTypes_OFPXMT_OFB_ICMPV6_TYPE    OxmOfbFieldTypes = 29
+	OxmOfbFieldTypes_OFPXMT_OFB_ICMPV6_CODE    OxmOfbFieldTypes = 30
+	OxmOfbFieldTypes_OFPXMT_OFB_IPV6_ND_TARGET OxmOfbFieldTypes = 31
+	OxmOfbFieldTypes_OFPXMT_OFB_IPV6_ND_SLL    OxmOfbFieldTypes = 32
+	OxmOfbFieldTypes_OFPXMT_OFB_IPV6_ND_TLL    OxmOfbFieldTypes = 33
+	OxmOfbFieldTypes_OFPXMT_OFB_MPLS_LABEL     OxmOfbFieldTypes = 34
+	OxmOfbFieldTypes_OFPXMT_OFB_MPLS_TC        OxmOfbFieldTypes = 35
+	OxmOfbFieldTypes_OFPXMT_OFB_MPLS_BOS       OxmOfbFieldTypes = 36
+	OxmOfbFieldTypes_OFPXMT_OFB_PBB_ISID       OxmOfbFieldTypes = 37
+	OxmOfbFieldTypes_OFPXMT_OFB_TUNNEL_ID      OxmOfbFieldTypes = 38
+	OxmOfbFieldTypes_OFPXMT_OFB_IPV6_EXTHDR    OxmOfbFieldTypes = 39
+)
+
+var OxmOfbFieldTypes_name = map[int32]string{
+	0:  "OFPXMT_OFB_IN_PORT",
+	1:  "OFPXMT_OFB_IN_PHY_PORT",
+	2:  "OFPXMT_OFB_METADATA",
+	3:  "OFPXMT_OFB_ETH_DST",
+	4:  "OFPXMT_OFB_ETH_SRC",
+	5:  "OFPXMT_OFB_ETH_TYPE",
+	6:  "OFPXMT_OFB_VLAN_VID",
+	7:  "OFPXMT_OFB_VLAN_PCP",
+	8:  "OFPXMT_OFB_IP_DSCP",
+	9:  "OFPXMT_OFB_IP_ECN",
+	10: "OFPXMT_OFB_IP_PROTO",
+	11: "OFPXMT_OFB_IPV4_SRC",
+	12: "OFPXMT_OFB_IPV4_DST",
+	13: "OFPXMT_OFB_TCP_SRC",
+	14: "OFPXMT_OFB_TCP_DST",
+	15: "OFPXMT_OFB_UDP_SRC",
+	16: "OFPXMT_OFB_UDP_DST",
+	17: "OFPXMT_OFB_SCTP_SRC",
+	18: "OFPXMT_OFB_SCTP_DST",
+	19: "OFPXMT_OFB_ICMPV4_TYPE",
+	20: "OFPXMT_OFB_ICMPV4_CODE",
+	21: "OFPXMT_OFB_ARP_OP",
+	22: "OFPXMT_OFB_ARP_SPA",
+	23: "OFPXMT_OFB_ARP_TPA",
+	24: "OFPXMT_OFB_ARP_SHA",
+	25: "OFPXMT_OFB_ARP_THA",
+	26: "OFPXMT_OFB_IPV6_SRC",
+	27: "OFPXMT_OFB_IPV6_DST",
+	28: "OFPXMT_OFB_IPV6_FLABEL",
+	29: "OFPXMT_OFB_ICMPV6_TYPE",
+	30: "OFPXMT_OFB_ICMPV6_CODE",
+	31: "OFPXMT_OFB_IPV6_ND_TARGET",
+	32: "OFPXMT_OFB_IPV6_ND_SLL",
+	33: "OFPXMT_OFB_IPV6_ND_TLL",
+	34: "OFPXMT_OFB_MPLS_LABEL",
+	35: "OFPXMT_OFB_MPLS_TC",
+	36: "OFPXMT_OFB_MPLS_BOS",
+	37: "OFPXMT_OFB_PBB_ISID",
+	38: "OFPXMT_OFB_TUNNEL_ID",
+	39: "OFPXMT_OFB_IPV6_EXTHDR",
+}
+var OxmOfbFieldTypes_value = map[string]int32{
+	"OFPXMT_OFB_IN_PORT":        0,
+	"OFPXMT_OFB_IN_PHY_PORT":    1,
+	"OFPXMT_OFB_METADATA":       2,
+	"OFPXMT_OFB_ETH_DST":        3,
+	"OFPXMT_OFB_ETH_SRC":        4,
+	"OFPXMT_OFB_ETH_TYPE":       5,
+	"OFPXMT_OFB_VLAN_VID":       6,
+	"OFPXMT_OFB_VLAN_PCP":       7,
+	"OFPXMT_OFB_IP_DSCP":        8,
+	"OFPXMT_OFB_IP_ECN":         9,
+	"OFPXMT_OFB_IP_PROTO":       10,
+	"OFPXMT_OFB_IPV4_SRC":       11,
+	"OFPXMT_OFB_IPV4_DST":       12,
+	"OFPXMT_OFB_TCP_SRC":        13,
+	"OFPXMT_OFB_TCP_DST":        14,
+	"OFPXMT_OFB_UDP_SRC":        15,
+	"OFPXMT_OFB_UDP_DST":        16,
+	"OFPXMT_OFB_SCTP_SRC":       17,
+	"OFPXMT_OFB_SCTP_DST":       18,
+	"OFPXMT_OFB_ICMPV4_TYPE":    19,
+	"OFPXMT_OFB_ICMPV4_CODE":    20,
+	"OFPXMT_OFB_ARP_OP":         21,
+	"OFPXMT_OFB_ARP_SPA":        22,
+	"OFPXMT_OFB_ARP_TPA":        23,
+	"OFPXMT_OFB_ARP_SHA":        24,
+	"OFPXMT_OFB_ARP_THA":        25,
+	"OFPXMT_OFB_IPV6_SRC":       26,
+	"OFPXMT_OFB_IPV6_DST":       27,
+	"OFPXMT_OFB_IPV6_FLABEL":    28,
+	"OFPXMT_OFB_ICMPV6_TYPE":    29,
+	"OFPXMT_OFB_ICMPV6_CODE":    30,
+	"OFPXMT_OFB_IPV6_ND_TARGET": 31,
+	"OFPXMT_OFB_IPV6_ND_SLL":    32,
+	"OFPXMT_OFB_IPV6_ND_TLL":    33,
+	"OFPXMT_OFB_MPLS_LABEL":     34,
+	"OFPXMT_OFB_MPLS_TC":        35,
+	"OFPXMT_OFB_MPLS_BOS":       36,
+	"OFPXMT_OFB_PBB_ISID":       37,
+	"OFPXMT_OFB_TUNNEL_ID":      38,
+	"OFPXMT_OFB_IPV6_EXTHDR":    39,
+}
+
+func (x OxmOfbFieldTypes) String() string {
+	return proto.EnumName(OxmOfbFieldTypes_name, int32(x))
+}
+func (OxmOfbFieldTypes) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{13}
+}
+
+// The VLAN id is 12-bits, so we can use the entire 16 bits to indicate
+// special conditions.
+type OfpVlanId int32
+
+const (
+	OfpVlanId_OFPVID_NONE    OfpVlanId = 0
+	OfpVlanId_OFPVID_PRESENT OfpVlanId = 4096
+)
+
+var OfpVlanId_name = map[int32]string{
+	0:    "OFPVID_NONE",
+	4096: "OFPVID_PRESENT",
+}
+var OfpVlanId_value = map[string]int32{
+	"OFPVID_NONE":    0,
+	"OFPVID_PRESENT": 4096,
+}
+
+func (x OfpVlanId) String() string {
+	return proto.EnumName(OfpVlanId_name, int32(x))
+}
+func (OfpVlanId) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{14}
+}
+
+// Bit definitions for IPv6 Extension Header pseudo-field.
+type OfpIpv6ExthdrFlags int32
+
+const (
+	OfpIpv6ExthdrFlags_OFPIEH_INVALID OfpIpv6ExthdrFlags = 0
+	OfpIpv6ExthdrFlags_OFPIEH_NONEXT  OfpIpv6ExthdrFlags = 1
+	OfpIpv6ExthdrFlags_OFPIEH_ESP     OfpIpv6ExthdrFlags = 2
+	OfpIpv6ExthdrFlags_OFPIEH_AUTH    OfpIpv6ExthdrFlags = 4
+	OfpIpv6ExthdrFlags_OFPIEH_DEST    OfpIpv6ExthdrFlags = 8
+	OfpIpv6ExthdrFlags_OFPIEH_FRAG    OfpIpv6ExthdrFlags = 16
+	OfpIpv6ExthdrFlags_OFPIEH_ROUTER  OfpIpv6ExthdrFlags = 32
+	OfpIpv6ExthdrFlags_OFPIEH_HOP     OfpIpv6ExthdrFlags = 64
+	OfpIpv6ExthdrFlags_OFPIEH_UNREP   OfpIpv6ExthdrFlags = 128
+	OfpIpv6ExthdrFlags_OFPIEH_UNSEQ   OfpIpv6ExthdrFlags = 256
+)
+
+var OfpIpv6ExthdrFlags_name = map[int32]string{
+	0:   "OFPIEH_INVALID",
+	1:   "OFPIEH_NONEXT",
+	2:   "OFPIEH_ESP",
+	4:   "OFPIEH_AUTH",
+	8:   "OFPIEH_DEST",
+	16:  "OFPIEH_FRAG",
+	32:  "OFPIEH_ROUTER",
+	64:  "OFPIEH_HOP",
+	128: "OFPIEH_UNREP",
+	256: "OFPIEH_UNSEQ",
+}
+var OfpIpv6ExthdrFlags_value = map[string]int32{
+	"OFPIEH_INVALID": 0,
+	"OFPIEH_NONEXT":  1,
+	"OFPIEH_ESP":     2,
+	"OFPIEH_AUTH":    4,
+	"OFPIEH_DEST":    8,
+	"OFPIEH_FRAG":    16,
+	"OFPIEH_ROUTER":  32,
+	"OFPIEH_HOP":     64,
+	"OFPIEH_UNREP":   128,
+	"OFPIEH_UNSEQ":   256,
+}
+
+func (x OfpIpv6ExthdrFlags) String() string {
+	return proto.EnumName(OfpIpv6ExthdrFlags_name, int32(x))
+}
+func (OfpIpv6ExthdrFlags) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{15}
+}
+
+type OfpActionType int32
+
+const (
+	OfpActionType_OFPAT_OUTPUT       OfpActionType = 0
+	OfpActionType_OFPAT_COPY_TTL_OUT OfpActionType = 11
+	OfpActionType_OFPAT_COPY_TTL_IN  OfpActionType = 12
+	OfpActionType_OFPAT_SET_MPLS_TTL OfpActionType = 15
+	OfpActionType_OFPAT_DEC_MPLS_TTL OfpActionType = 16
+	OfpActionType_OFPAT_PUSH_VLAN    OfpActionType = 17
+	OfpActionType_OFPAT_POP_VLAN     OfpActionType = 18
+	OfpActionType_OFPAT_PUSH_MPLS    OfpActionType = 19
+	OfpActionType_OFPAT_POP_MPLS     OfpActionType = 20
+	OfpActionType_OFPAT_SET_QUEUE    OfpActionType = 21
+	OfpActionType_OFPAT_GROUP        OfpActionType = 22
+	OfpActionType_OFPAT_SET_NW_TTL   OfpActionType = 23
+	OfpActionType_OFPAT_DEC_NW_TTL   OfpActionType = 24
+	OfpActionType_OFPAT_SET_FIELD    OfpActionType = 25
+	OfpActionType_OFPAT_PUSH_PBB     OfpActionType = 26
+	OfpActionType_OFPAT_POP_PBB      OfpActionType = 27
+	OfpActionType_OFPAT_EXPERIMENTER OfpActionType = 65535
+)
+
+var OfpActionType_name = map[int32]string{
+	0:     "OFPAT_OUTPUT",
+	11:    "OFPAT_COPY_TTL_OUT",
+	12:    "OFPAT_COPY_TTL_IN",
+	15:    "OFPAT_SET_MPLS_TTL",
+	16:    "OFPAT_DEC_MPLS_TTL",
+	17:    "OFPAT_PUSH_VLAN",
+	18:    "OFPAT_POP_VLAN",
+	19:    "OFPAT_PUSH_MPLS",
+	20:    "OFPAT_POP_MPLS",
+	21:    "OFPAT_SET_QUEUE",
+	22:    "OFPAT_GROUP",
+	23:    "OFPAT_SET_NW_TTL",
+	24:    "OFPAT_DEC_NW_TTL",
+	25:    "OFPAT_SET_FIELD",
+	26:    "OFPAT_PUSH_PBB",
+	27:    "OFPAT_POP_PBB",
+	65535: "OFPAT_EXPERIMENTER",
+}
+var OfpActionType_value = map[string]int32{
+	"OFPAT_OUTPUT":       0,
+	"OFPAT_COPY_TTL_OUT": 11,
+	"OFPAT_COPY_TTL_IN":  12,
+	"OFPAT_SET_MPLS_TTL": 15,
+	"OFPAT_DEC_MPLS_TTL": 16,
+	"OFPAT_PUSH_VLAN":    17,
+	"OFPAT_POP_VLAN":     18,
+	"OFPAT_PUSH_MPLS":    19,
+	"OFPAT_POP_MPLS":     20,
+	"OFPAT_SET_QUEUE":    21,
+	"OFPAT_GROUP":        22,
+	"OFPAT_SET_NW_TTL":   23,
+	"OFPAT_DEC_NW_TTL":   24,
+	"OFPAT_SET_FIELD":    25,
+	"OFPAT_PUSH_PBB":     26,
+	"OFPAT_POP_PBB":      27,
+	"OFPAT_EXPERIMENTER": 65535,
+}
+
+func (x OfpActionType) String() string {
+	return proto.EnumName(OfpActionType_name, int32(x))
+}
+func (OfpActionType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{16}
+}
+
+type OfpControllerMaxLen int32
+
+const (
+	OfpControllerMaxLen_OFPCML_INVALID   OfpControllerMaxLen = 0
+	OfpControllerMaxLen_OFPCML_MAX       OfpControllerMaxLen = 65509
+	OfpControllerMaxLen_OFPCML_NO_BUFFER OfpControllerMaxLen = 65535
+)
+
+var OfpControllerMaxLen_name = map[int32]string{
+	0:     "OFPCML_INVALID",
+	65509: "OFPCML_MAX",
+	65535: "OFPCML_NO_BUFFER",
+}
+var OfpControllerMaxLen_value = map[string]int32{
+	"OFPCML_INVALID":   0,
+	"OFPCML_MAX":       65509,
+	"OFPCML_NO_BUFFER": 65535,
+}
+
+func (x OfpControllerMaxLen) String() string {
+	return proto.EnumName(OfpControllerMaxLen_name, int32(x))
+}
+func (OfpControllerMaxLen) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{17}
+}
+
+type OfpInstructionType int32
+
+const (
+	OfpInstructionType_OFPIT_INVALID        OfpInstructionType = 0
+	OfpInstructionType_OFPIT_GOTO_TABLE     OfpInstructionType = 1
+	OfpInstructionType_OFPIT_WRITE_METADATA OfpInstructionType = 2
+	OfpInstructionType_OFPIT_WRITE_ACTIONS  OfpInstructionType = 3
+	OfpInstructionType_OFPIT_APPLY_ACTIONS  OfpInstructionType = 4
+	OfpInstructionType_OFPIT_CLEAR_ACTIONS  OfpInstructionType = 5
+	OfpInstructionType_OFPIT_METER          OfpInstructionType = 6
+	OfpInstructionType_OFPIT_EXPERIMENTER   OfpInstructionType = 65535
+)
+
+var OfpInstructionType_name = map[int32]string{
+	0:     "OFPIT_INVALID",
+	1:     "OFPIT_GOTO_TABLE",
+	2:     "OFPIT_WRITE_METADATA",
+	3:     "OFPIT_WRITE_ACTIONS",
+	4:     "OFPIT_APPLY_ACTIONS",
+	5:     "OFPIT_CLEAR_ACTIONS",
+	6:     "OFPIT_METER",
+	65535: "OFPIT_EXPERIMENTER",
+}
+var OfpInstructionType_value = map[string]int32{
+	"OFPIT_INVALID":        0,
+	"OFPIT_GOTO_TABLE":     1,
+	"OFPIT_WRITE_METADATA": 2,
+	"OFPIT_WRITE_ACTIONS":  3,
+	"OFPIT_APPLY_ACTIONS":  4,
+	"OFPIT_CLEAR_ACTIONS":  5,
+	"OFPIT_METER":          6,
+	"OFPIT_EXPERIMENTER":   65535,
+}
+
+func (x OfpInstructionType) String() string {
+	return proto.EnumName(OfpInstructionType_name, int32(x))
+}
+func (OfpInstructionType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{18}
+}
+
+type OfpFlowModCommand int32
+
+const (
+	OfpFlowModCommand_OFPFC_ADD           OfpFlowModCommand = 0
+	OfpFlowModCommand_OFPFC_MODIFY        OfpFlowModCommand = 1
+	OfpFlowModCommand_OFPFC_MODIFY_STRICT OfpFlowModCommand = 2
+	OfpFlowModCommand_OFPFC_DELETE        OfpFlowModCommand = 3
+	OfpFlowModCommand_OFPFC_DELETE_STRICT OfpFlowModCommand = 4
+)
+
+var OfpFlowModCommand_name = map[int32]string{
+	0: "OFPFC_ADD",
+	1: "OFPFC_MODIFY",
+	2: "OFPFC_MODIFY_STRICT",
+	3: "OFPFC_DELETE",
+	4: "OFPFC_DELETE_STRICT",
+}
+var OfpFlowModCommand_value = map[string]int32{
+	"OFPFC_ADD":           0,
+	"OFPFC_MODIFY":        1,
+	"OFPFC_MODIFY_STRICT": 2,
+	"OFPFC_DELETE":        3,
+	"OFPFC_DELETE_STRICT": 4,
+}
+
+func (x OfpFlowModCommand) String() string {
+	return proto.EnumName(OfpFlowModCommand_name, int32(x))
+}
+func (OfpFlowModCommand) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{19}
+}
+
+type OfpFlowModFlags int32
+
+const (
+	OfpFlowModFlags_OFPFF_INVALID       OfpFlowModFlags = 0
+	OfpFlowModFlags_OFPFF_SEND_FLOW_REM OfpFlowModFlags = 1
+	OfpFlowModFlags_OFPFF_CHECK_OVERLAP OfpFlowModFlags = 2
+	OfpFlowModFlags_OFPFF_RESET_COUNTS  OfpFlowModFlags = 4
+	OfpFlowModFlags_OFPFF_NO_PKT_COUNTS OfpFlowModFlags = 8
+	OfpFlowModFlags_OFPFF_NO_BYT_COUNTS OfpFlowModFlags = 16
+)
+
+var OfpFlowModFlags_name = map[int32]string{
+	0:  "OFPFF_INVALID",
+	1:  "OFPFF_SEND_FLOW_REM",
+	2:  "OFPFF_CHECK_OVERLAP",
+	4:  "OFPFF_RESET_COUNTS",
+	8:  "OFPFF_NO_PKT_COUNTS",
+	16: "OFPFF_NO_BYT_COUNTS",
+}
+var OfpFlowModFlags_value = map[string]int32{
+	"OFPFF_INVALID":       0,
+	"OFPFF_SEND_FLOW_REM": 1,
+	"OFPFF_CHECK_OVERLAP": 2,
+	"OFPFF_RESET_COUNTS":  4,
+	"OFPFF_NO_PKT_COUNTS": 8,
+	"OFPFF_NO_BYT_COUNTS": 16,
+}
+
+func (x OfpFlowModFlags) String() string {
+	return proto.EnumName(OfpFlowModFlags_name, int32(x))
+}
+func (OfpFlowModFlags) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{20}
+}
+
+// Group numbering. Groups can use any number up to OFPG_MAX.
+type OfpGroup int32
+
+const (
+	OfpGroup_OFPG_INVALID OfpGroup = 0
+	// Last usable group number.
+	OfpGroup_OFPG_MAX OfpGroup = 2147483392
+	// Fake groups.
+	OfpGroup_OFPG_ALL OfpGroup = 2147483644
+	OfpGroup_OFPG_ANY OfpGroup = 2147483647
+)
+
+var OfpGroup_name = map[int32]string{
+	0:          "OFPG_INVALID",
+	2147483392: "OFPG_MAX",
+	2147483644: "OFPG_ALL",
+	2147483647: "OFPG_ANY",
+}
+var OfpGroup_value = map[string]int32{
+	"OFPG_INVALID": 0,
+	"OFPG_MAX":     2147483392,
+	"OFPG_ALL":     2147483644,
+	"OFPG_ANY":     2147483647,
+}
+
+func (x OfpGroup) String() string {
+	return proto.EnumName(OfpGroup_name, int32(x))
+}
+func (OfpGroup) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{21}
+}
+
+// Group commands
+type OfpGroupModCommand int32
+
+const (
+	OfpGroupModCommand_OFPGC_ADD    OfpGroupModCommand = 0
+	OfpGroupModCommand_OFPGC_MODIFY OfpGroupModCommand = 1
+	OfpGroupModCommand_OFPGC_DELETE OfpGroupModCommand = 2
+)
+
+var OfpGroupModCommand_name = map[int32]string{
+	0: "OFPGC_ADD",
+	1: "OFPGC_MODIFY",
+	2: "OFPGC_DELETE",
+}
+var OfpGroupModCommand_value = map[string]int32{
+	"OFPGC_ADD":    0,
+	"OFPGC_MODIFY": 1,
+	"OFPGC_DELETE": 2,
+}
+
+func (x OfpGroupModCommand) String() string {
+	return proto.EnumName(OfpGroupModCommand_name, int32(x))
+}
+func (OfpGroupModCommand) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{22}
+}
+
+// Group types.  Values in the range [128; 255] are reserved for experimental
+// use.
+type OfpGroupType int32
+
+const (
+	OfpGroupType_OFPGT_ALL      OfpGroupType = 0
+	OfpGroupType_OFPGT_SELECT   OfpGroupType = 1
+	OfpGroupType_OFPGT_INDIRECT OfpGroupType = 2
+	OfpGroupType_OFPGT_FF       OfpGroupType = 3
+)
+
+var OfpGroupType_name = map[int32]string{
+	0: "OFPGT_ALL",
+	1: "OFPGT_SELECT",
+	2: "OFPGT_INDIRECT",
+	3: "OFPGT_FF",
+}
+var OfpGroupType_value = map[string]int32{
+	"OFPGT_ALL":      0,
+	"OFPGT_SELECT":   1,
+	"OFPGT_INDIRECT": 2,
+	"OFPGT_FF":       3,
+}
+
+func (x OfpGroupType) String() string {
+	return proto.EnumName(OfpGroupType_name, int32(x))
+}
+func (OfpGroupType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{23}
+}
+
+// Why is this packet being sent to the controller?
+type OfpPacketInReason int32
+
+const (
+	OfpPacketInReason_OFPR_NO_MATCH    OfpPacketInReason = 0
+	OfpPacketInReason_OFPR_ACTION      OfpPacketInReason = 1
+	OfpPacketInReason_OFPR_INVALID_TTL OfpPacketInReason = 2
+)
+
+var OfpPacketInReason_name = map[int32]string{
+	0: "OFPR_NO_MATCH",
+	1: "OFPR_ACTION",
+	2: "OFPR_INVALID_TTL",
+}
+var OfpPacketInReason_value = map[string]int32{
+	"OFPR_NO_MATCH":    0,
+	"OFPR_ACTION":      1,
+	"OFPR_INVALID_TTL": 2,
+}
+
+func (x OfpPacketInReason) String() string {
+	return proto.EnumName(OfpPacketInReason_name, int32(x))
+}
+func (OfpPacketInReason) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{24}
+}
+
+// Why was this flow removed?
+type OfpFlowRemovedReason int32
+
+const (
+	OfpFlowRemovedReason_OFPRR_IDLE_TIMEOUT OfpFlowRemovedReason = 0
+	OfpFlowRemovedReason_OFPRR_HARD_TIMEOUT OfpFlowRemovedReason = 1
+	OfpFlowRemovedReason_OFPRR_DELETE       OfpFlowRemovedReason = 2
+	OfpFlowRemovedReason_OFPRR_GROUP_DELETE OfpFlowRemovedReason = 3
+	OfpFlowRemovedReason_OFPRR_METER_DELETE OfpFlowRemovedReason = 4
+)
+
+var OfpFlowRemovedReason_name = map[int32]string{
+	0: "OFPRR_IDLE_TIMEOUT",
+	1: "OFPRR_HARD_TIMEOUT",
+	2: "OFPRR_DELETE",
+	3: "OFPRR_GROUP_DELETE",
+	4: "OFPRR_METER_DELETE",
+}
+var OfpFlowRemovedReason_value = map[string]int32{
+	"OFPRR_IDLE_TIMEOUT": 0,
+	"OFPRR_HARD_TIMEOUT": 1,
+	"OFPRR_DELETE":       2,
+	"OFPRR_GROUP_DELETE": 3,
+	"OFPRR_METER_DELETE": 4,
+}
+
+func (x OfpFlowRemovedReason) String() string {
+	return proto.EnumName(OfpFlowRemovedReason_name, int32(x))
+}
+func (OfpFlowRemovedReason) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{25}
+}
+
+// Meter numbering. Flow meters can use any number up to OFPM_MAX.
+type OfpMeter int32
+
+const (
+	OfpMeter_OFPM_ZERO OfpMeter = 0
+	// Last usable meter.
+	OfpMeter_OFPM_MAX OfpMeter = 2147418112
+	// Virtual meters.
+	OfpMeter_OFPM_SLOWPATH   OfpMeter = 2147483645
+	OfpMeter_OFPM_CONTROLLER OfpMeter = 2147483646
+	OfpMeter_OFPM_ALL        OfpMeter = 2147483647
+)
+
+var OfpMeter_name = map[int32]string{
+	0:          "OFPM_ZERO",
+	2147418112: "OFPM_MAX",
+	2147483645: "OFPM_SLOWPATH",
+	2147483646: "OFPM_CONTROLLER",
+	2147483647: "OFPM_ALL",
+}
+var OfpMeter_value = map[string]int32{
+	"OFPM_ZERO":       0,
+	"OFPM_MAX":        2147418112,
+	"OFPM_SLOWPATH":   2147483645,
+	"OFPM_CONTROLLER": 2147483646,
+	"OFPM_ALL":        2147483647,
+}
+
+func (x OfpMeter) String() string {
+	return proto.EnumName(OfpMeter_name, int32(x))
+}
+func (OfpMeter) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{26}
+}
+
+// Meter band types
+type OfpMeterBandType int32
+
+const (
+	OfpMeterBandType_OFPMBT_INVALID      OfpMeterBandType = 0
+	OfpMeterBandType_OFPMBT_DROP         OfpMeterBandType = 1
+	OfpMeterBandType_OFPMBT_DSCP_REMARK  OfpMeterBandType = 2
+	OfpMeterBandType_OFPMBT_EXPERIMENTER OfpMeterBandType = 65535
+)
+
+var OfpMeterBandType_name = map[int32]string{
+	0:     "OFPMBT_INVALID",
+	1:     "OFPMBT_DROP",
+	2:     "OFPMBT_DSCP_REMARK",
+	65535: "OFPMBT_EXPERIMENTER",
+}
+var OfpMeterBandType_value = map[string]int32{
+	"OFPMBT_INVALID":      0,
+	"OFPMBT_DROP":         1,
+	"OFPMBT_DSCP_REMARK":  2,
+	"OFPMBT_EXPERIMENTER": 65535,
+}
+
+func (x OfpMeterBandType) String() string {
+	return proto.EnumName(OfpMeterBandType_name, int32(x))
+}
+func (OfpMeterBandType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{27}
+}
+
+// Meter commands
+type OfpMeterModCommand int32
+
+const (
+	OfpMeterModCommand_OFPMC_ADD    OfpMeterModCommand = 0
+	OfpMeterModCommand_OFPMC_MODIFY OfpMeterModCommand = 1
+	OfpMeterModCommand_OFPMC_DELETE OfpMeterModCommand = 2
+)
+
+var OfpMeterModCommand_name = map[int32]string{
+	0: "OFPMC_ADD",
+	1: "OFPMC_MODIFY",
+	2: "OFPMC_DELETE",
+}
+var OfpMeterModCommand_value = map[string]int32{
+	"OFPMC_ADD":    0,
+	"OFPMC_MODIFY": 1,
+	"OFPMC_DELETE": 2,
+}
+
+func (x OfpMeterModCommand) String() string {
+	return proto.EnumName(OfpMeterModCommand_name, int32(x))
+}
+func (OfpMeterModCommand) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{28}
+}
+
+// Meter configuration flags
+type OfpMeterFlags int32
+
+const (
+	OfpMeterFlags_OFPMF_INVALID OfpMeterFlags = 0
+	OfpMeterFlags_OFPMF_KBPS    OfpMeterFlags = 1
+	OfpMeterFlags_OFPMF_PKTPS   OfpMeterFlags = 2
+	OfpMeterFlags_OFPMF_BURST   OfpMeterFlags = 4
+	OfpMeterFlags_OFPMF_STATS   OfpMeterFlags = 8
+)
+
+var OfpMeterFlags_name = map[int32]string{
+	0: "OFPMF_INVALID",
+	1: "OFPMF_KBPS",
+	2: "OFPMF_PKTPS",
+	4: "OFPMF_BURST",
+	8: "OFPMF_STATS",
+}
+var OfpMeterFlags_value = map[string]int32{
+	"OFPMF_INVALID": 0,
+	"OFPMF_KBPS":    1,
+	"OFPMF_PKTPS":   2,
+	"OFPMF_BURST":   4,
+	"OFPMF_STATS":   8,
+}
+
+func (x OfpMeterFlags) String() string {
+	return proto.EnumName(OfpMeterFlags_name, int32(x))
+}
+func (OfpMeterFlags) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{29}
+}
+
+// Values for 'type' in ofp_error_message.  These values are immutable: they
+// will not change in future versions of the protocol (although new values may
+// be added).
+type OfpErrorType int32
+
+const (
+	OfpErrorType_OFPET_HELLO_FAILED          OfpErrorType = 0
+	OfpErrorType_OFPET_BAD_REQUEST           OfpErrorType = 1
+	OfpErrorType_OFPET_BAD_ACTION            OfpErrorType = 2
+	OfpErrorType_OFPET_BAD_INSTRUCTION       OfpErrorType = 3
+	OfpErrorType_OFPET_BAD_MATCH             OfpErrorType = 4
+	OfpErrorType_OFPET_FLOW_MOD_FAILED       OfpErrorType = 5
+	OfpErrorType_OFPET_GROUP_MOD_FAILED      OfpErrorType = 6
+	OfpErrorType_OFPET_PORT_MOD_FAILED       OfpErrorType = 7
+	OfpErrorType_OFPET_TABLE_MOD_FAILED      OfpErrorType = 8
+	OfpErrorType_OFPET_QUEUE_OP_FAILED       OfpErrorType = 9
+	OfpErrorType_OFPET_SWITCH_CONFIG_FAILED  OfpErrorType = 10
+	OfpErrorType_OFPET_ROLE_REQUEST_FAILED   OfpErrorType = 11
+	OfpErrorType_OFPET_METER_MOD_FAILED      OfpErrorType = 12
+	OfpErrorType_OFPET_TABLE_FEATURES_FAILED OfpErrorType = 13
+	OfpErrorType_OFPET_EXPERIMENTER          OfpErrorType = 65535
+)
+
+var OfpErrorType_name = map[int32]string{
+	0:     "OFPET_HELLO_FAILED",
+	1:     "OFPET_BAD_REQUEST",
+	2:     "OFPET_BAD_ACTION",
+	3:     "OFPET_BAD_INSTRUCTION",
+	4:     "OFPET_BAD_MATCH",
+	5:     "OFPET_FLOW_MOD_FAILED",
+	6:     "OFPET_GROUP_MOD_FAILED",
+	7:     "OFPET_PORT_MOD_FAILED",
+	8:     "OFPET_TABLE_MOD_FAILED",
+	9:     "OFPET_QUEUE_OP_FAILED",
+	10:    "OFPET_SWITCH_CONFIG_FAILED",
+	11:    "OFPET_ROLE_REQUEST_FAILED",
+	12:    "OFPET_METER_MOD_FAILED",
+	13:    "OFPET_TABLE_FEATURES_FAILED",
+	65535: "OFPET_EXPERIMENTER",
+}
+var OfpErrorType_value = map[string]int32{
+	"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_EXPERIMENTER":          65535,
+}
+
+func (x OfpErrorType) String() string {
+	return proto.EnumName(OfpErrorType_name, int32(x))
+}
+func (OfpErrorType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{30}
+}
+
+// ofp_error_msg 'code' values for OFPET_HELLO_FAILED.  'data' contains an
+// ASCII text string that may give failure details.
+type OfpHelloFailedCode int32
+
+const (
+	OfpHelloFailedCode_OFPHFC_INCOMPATIBLE OfpHelloFailedCode = 0
+	OfpHelloFailedCode_OFPHFC_EPERM        OfpHelloFailedCode = 1
+)
+
+var OfpHelloFailedCode_name = map[int32]string{
+	0: "OFPHFC_INCOMPATIBLE",
+	1: "OFPHFC_EPERM",
+}
+var OfpHelloFailedCode_value = map[string]int32{
+	"OFPHFC_INCOMPATIBLE": 0,
+	"OFPHFC_EPERM":        1,
+}
+
+func (x OfpHelloFailedCode) String() string {
+	return proto.EnumName(OfpHelloFailedCode_name, int32(x))
+}
+func (OfpHelloFailedCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{31}
+}
+
+// ofp_error_msg 'code' values for OFPET_BAD_REQUEST.  'data' contains at least
+// the first 64 bytes of the failed request.
+type OfpBadRequestCode int32
+
+const (
+	OfpBadRequestCode_OFPBRC_BAD_VERSION               OfpBadRequestCode = 0
+	OfpBadRequestCode_OFPBRC_BAD_TYPE                  OfpBadRequestCode = 1
+	OfpBadRequestCode_OFPBRC_BAD_MULTIPART             OfpBadRequestCode = 2
+	OfpBadRequestCode_OFPBRC_BAD_EXPERIMENTER          OfpBadRequestCode = 3
+	OfpBadRequestCode_OFPBRC_BAD_EXP_TYPE              OfpBadRequestCode = 4
+	OfpBadRequestCode_OFPBRC_EPERM                     OfpBadRequestCode = 5
+	OfpBadRequestCode_OFPBRC_BAD_LEN                   OfpBadRequestCode = 6
+	OfpBadRequestCode_OFPBRC_BUFFER_EMPTY              OfpBadRequestCode = 7
+	OfpBadRequestCode_OFPBRC_BUFFER_UNKNOWN            OfpBadRequestCode = 8
+	OfpBadRequestCode_OFPBRC_BAD_TABLE_ID              OfpBadRequestCode = 9
+	OfpBadRequestCode_OFPBRC_IS_SLAVE                  OfpBadRequestCode = 10
+	OfpBadRequestCode_OFPBRC_BAD_PORT                  OfpBadRequestCode = 11
+	OfpBadRequestCode_OFPBRC_BAD_PACKET                OfpBadRequestCode = 12
+	OfpBadRequestCode_OFPBRC_MULTIPART_BUFFER_OVERFLOW OfpBadRequestCode = 13
+)
+
+var OfpBadRequestCode_name = map[int32]string{
+	0:  "OFPBRC_BAD_VERSION",
+	1:  "OFPBRC_BAD_TYPE",
+	2:  "OFPBRC_BAD_MULTIPART",
+	3:  "OFPBRC_BAD_EXPERIMENTER",
+	4:  "OFPBRC_BAD_EXP_TYPE",
+	5:  "OFPBRC_EPERM",
+	6:  "OFPBRC_BAD_LEN",
+	7:  "OFPBRC_BUFFER_EMPTY",
+	8:  "OFPBRC_BUFFER_UNKNOWN",
+	9:  "OFPBRC_BAD_TABLE_ID",
+	10: "OFPBRC_IS_SLAVE",
+	11: "OFPBRC_BAD_PORT",
+	12: "OFPBRC_BAD_PACKET",
+	13: "OFPBRC_MULTIPART_BUFFER_OVERFLOW",
+}
+var OfpBadRequestCode_value = map[string]int32{
+	"OFPBRC_BAD_VERSION":               0,
+	"OFPBRC_BAD_TYPE":                  1,
+	"OFPBRC_BAD_MULTIPART":             2,
+	"OFPBRC_BAD_EXPERIMENTER":          3,
+	"OFPBRC_BAD_EXP_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,
+}
+
+func (x OfpBadRequestCode) String() string {
+	return proto.EnumName(OfpBadRequestCode_name, int32(x))
+}
+func (OfpBadRequestCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{32}
+}
+
+// ofp_error_msg 'code' values for OFPET_BAD_ACTION.  'data' contains at least
+// the first 64 bytes of the failed request.
+type OfpBadActionCode int32
+
+const (
+	OfpBadActionCode_OFPBAC_BAD_TYPE           OfpBadActionCode = 0
+	OfpBadActionCode_OFPBAC_BAD_LEN            OfpBadActionCode = 1
+	OfpBadActionCode_OFPBAC_BAD_EXPERIMENTER   OfpBadActionCode = 2
+	OfpBadActionCode_OFPBAC_BAD_EXP_TYPE       OfpBadActionCode = 3
+	OfpBadActionCode_OFPBAC_BAD_OUT_PORT       OfpBadActionCode = 4
+	OfpBadActionCode_OFPBAC_BAD_ARGUMENT       OfpBadActionCode = 5
+	OfpBadActionCode_OFPBAC_EPERM              OfpBadActionCode = 6
+	OfpBadActionCode_OFPBAC_TOO_MANY           OfpBadActionCode = 7
+	OfpBadActionCode_OFPBAC_BAD_QUEUE          OfpBadActionCode = 8
+	OfpBadActionCode_OFPBAC_BAD_OUT_GROUP      OfpBadActionCode = 9
+	OfpBadActionCode_OFPBAC_MATCH_INCONSISTENT OfpBadActionCode = 10
+	OfpBadActionCode_OFPBAC_UNSUPPORTED_ORDER  OfpBadActionCode = 11
+	OfpBadActionCode_OFPBAC_BAD_TAG            OfpBadActionCode = 12
+	OfpBadActionCode_OFPBAC_BAD_SET_TYPE       OfpBadActionCode = 13
+	OfpBadActionCode_OFPBAC_BAD_SET_LEN        OfpBadActionCode = 14
+	OfpBadActionCode_OFPBAC_BAD_SET_ARGUMENT   OfpBadActionCode = 15
+)
+
+var OfpBadActionCode_name = map[int32]string{
+	0:  "OFPBAC_BAD_TYPE",
+	1:  "OFPBAC_BAD_LEN",
+	2:  "OFPBAC_BAD_EXPERIMENTER",
+	3:  "OFPBAC_BAD_EXP_TYPE",
+	4:  "OFPBAC_BAD_OUT_PORT",
+	5:  "OFPBAC_BAD_ARGUMENT",
+	6:  "OFPBAC_EPERM",
+	7:  "OFPBAC_TOO_MANY",
+	8:  "OFPBAC_BAD_QUEUE",
+	9:  "OFPBAC_BAD_OUT_GROUP",
+	10: "OFPBAC_MATCH_INCONSISTENT",
+	11: "OFPBAC_UNSUPPORTED_ORDER",
+	12: "OFPBAC_BAD_TAG",
+	13: "OFPBAC_BAD_SET_TYPE",
+	14: "OFPBAC_BAD_SET_LEN",
+	15: "OFPBAC_BAD_SET_ARGUMENT",
+}
+var OfpBadActionCode_value = map[string]int32{
+	"OFPBAC_BAD_TYPE":           0,
+	"OFPBAC_BAD_LEN":            1,
+	"OFPBAC_BAD_EXPERIMENTER":   2,
+	"OFPBAC_BAD_EXP_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,
+}
+
+func (x OfpBadActionCode) String() string {
+	return proto.EnumName(OfpBadActionCode_name, int32(x))
+}
+func (OfpBadActionCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{33}
+}
+
+// ofp_error_msg 'code' values for OFPET_BAD_INSTRUCTION.  'data' contains at
+// least the first 64 bytes of the failed request.
+type OfpBadInstructionCode int32
+
+const (
+	OfpBadInstructionCode_OFPBIC_UNKNOWN_INST        OfpBadInstructionCode = 0
+	OfpBadInstructionCode_OFPBIC_UNSUP_INST          OfpBadInstructionCode = 1
+	OfpBadInstructionCode_OFPBIC_BAD_TABLE_ID        OfpBadInstructionCode = 2
+	OfpBadInstructionCode_OFPBIC_UNSUP_METADATA      OfpBadInstructionCode = 3
+	OfpBadInstructionCode_OFPBIC_UNSUP_METADATA_MASK OfpBadInstructionCode = 4
+	OfpBadInstructionCode_OFPBIC_BAD_EXPERIMENTER    OfpBadInstructionCode = 5
+	OfpBadInstructionCode_OFPBIC_BAD_EXP_TYPE        OfpBadInstructionCode = 6
+	OfpBadInstructionCode_OFPBIC_BAD_LEN             OfpBadInstructionCode = 7
+	OfpBadInstructionCode_OFPBIC_EPERM               OfpBadInstructionCode = 8
+)
+
+var OfpBadInstructionCode_name = map[int32]string{
+	0: "OFPBIC_UNKNOWN_INST",
+	1: "OFPBIC_UNSUP_INST",
+	2: "OFPBIC_BAD_TABLE_ID",
+	3: "OFPBIC_UNSUP_METADATA",
+	4: "OFPBIC_UNSUP_METADATA_MASK",
+	5: "OFPBIC_BAD_EXPERIMENTER",
+	6: "OFPBIC_BAD_EXP_TYPE",
+	7: "OFPBIC_BAD_LEN",
+	8: "OFPBIC_EPERM",
+}
+var OfpBadInstructionCode_value = map[string]int32{
+	"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_EXP_TYPE":        6,
+	"OFPBIC_BAD_LEN":             7,
+	"OFPBIC_EPERM":               8,
+}
+
+func (x OfpBadInstructionCode) String() string {
+	return proto.EnumName(OfpBadInstructionCode_name, int32(x))
+}
+func (OfpBadInstructionCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{34}
+}
+
+// ofp_error_msg 'code' values for OFPET_BAD_MATCH.  'data' contains at least
+// the first 64 bytes of the failed request.
+type OfpBadMatchCode int32
+
+const (
+	OfpBadMatchCode_OFPBMC_BAD_TYPE         OfpBadMatchCode = 0
+	OfpBadMatchCode_OFPBMC_BAD_LEN          OfpBadMatchCode = 1
+	OfpBadMatchCode_OFPBMC_BAD_TAG          OfpBadMatchCode = 2
+	OfpBadMatchCode_OFPBMC_BAD_DL_ADDR_MASK OfpBadMatchCode = 3
+	OfpBadMatchCode_OFPBMC_BAD_NW_ADDR_MASK OfpBadMatchCode = 4
+	OfpBadMatchCode_OFPBMC_BAD_WILDCARDS    OfpBadMatchCode = 5
+	OfpBadMatchCode_OFPBMC_BAD_FIELD        OfpBadMatchCode = 6
+	OfpBadMatchCode_OFPBMC_BAD_VALUE        OfpBadMatchCode = 7
+	OfpBadMatchCode_OFPBMC_BAD_MASK         OfpBadMatchCode = 8
+	OfpBadMatchCode_OFPBMC_BAD_PREREQ       OfpBadMatchCode = 9
+	OfpBadMatchCode_OFPBMC_DUP_FIELD        OfpBadMatchCode = 10
+	OfpBadMatchCode_OFPBMC_EPERM            OfpBadMatchCode = 11
+)
+
+var OfpBadMatchCode_name = map[int32]string{
+	0:  "OFPBMC_BAD_TYPE",
+	1:  "OFPBMC_BAD_LEN",
+	2:  "OFPBMC_BAD_TAG",
+	3:  "OFPBMC_BAD_DL_ADDR_MASK",
+	4:  "OFPBMC_BAD_NW_ADDR_MASK",
+	5:  "OFPBMC_BAD_WILDCARDS",
+	6:  "OFPBMC_BAD_FIELD",
+	7:  "OFPBMC_BAD_VALUE",
+	8:  "OFPBMC_BAD_MASK",
+	9:  "OFPBMC_BAD_PREREQ",
+	10: "OFPBMC_DUP_FIELD",
+	11: "OFPBMC_EPERM",
+}
+var OfpBadMatchCode_value = map[string]int32{
+	"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,
+}
+
+func (x OfpBadMatchCode) String() string {
+	return proto.EnumName(OfpBadMatchCode_name, int32(x))
+}
+func (OfpBadMatchCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{35}
+}
+
+// ofp_error_msg 'code' values for OFPET_FLOW_MOD_FAILED.  'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpFlowModFailedCode int32
+
+const (
+	OfpFlowModFailedCode_OFPFMFC_UNKNOWN      OfpFlowModFailedCode = 0
+	OfpFlowModFailedCode_OFPFMFC_TABLE_FULL   OfpFlowModFailedCode = 1
+	OfpFlowModFailedCode_OFPFMFC_BAD_TABLE_ID OfpFlowModFailedCode = 2
+	OfpFlowModFailedCode_OFPFMFC_OVERLAP      OfpFlowModFailedCode = 3
+	OfpFlowModFailedCode_OFPFMFC_EPERM        OfpFlowModFailedCode = 4
+	OfpFlowModFailedCode_OFPFMFC_BAD_TIMEOUT  OfpFlowModFailedCode = 5
+	OfpFlowModFailedCode_OFPFMFC_BAD_COMMAND  OfpFlowModFailedCode = 6
+	OfpFlowModFailedCode_OFPFMFC_BAD_FLAGS    OfpFlowModFailedCode = 7
+)
+
+var OfpFlowModFailedCode_name = map[int32]string{
+	0: "OFPFMFC_UNKNOWN",
+	1: "OFPFMFC_TABLE_FULL",
+	2: "OFPFMFC_BAD_TABLE_ID",
+	3: "OFPFMFC_OVERLAP",
+	4: "OFPFMFC_EPERM",
+	5: "OFPFMFC_BAD_TIMEOUT",
+	6: "OFPFMFC_BAD_COMMAND",
+	7: "OFPFMFC_BAD_FLAGS",
+}
+var OfpFlowModFailedCode_value = map[string]int32{
+	"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,
+}
+
+func (x OfpFlowModFailedCode) String() string {
+	return proto.EnumName(OfpFlowModFailedCode_name, int32(x))
+}
+func (OfpFlowModFailedCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{36}
+}
+
+// ofp_error_msg 'code' values for OFPET_GROUP_MOD_FAILED.  'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpGroupModFailedCode int32
+
+const (
+	OfpGroupModFailedCode_OFPGMFC_GROUP_EXISTS         OfpGroupModFailedCode = 0
+	OfpGroupModFailedCode_OFPGMFC_INVALID_GROUP        OfpGroupModFailedCode = 1
+	OfpGroupModFailedCode_OFPGMFC_WEIGHT_UNSUPPORTED   OfpGroupModFailedCode = 2
+	OfpGroupModFailedCode_OFPGMFC_OUT_OF_GROUPS        OfpGroupModFailedCode = 3
+	OfpGroupModFailedCode_OFPGMFC_OUT_OF_BUCKETS       OfpGroupModFailedCode = 4
+	OfpGroupModFailedCode_OFPGMFC_CHAINING_UNSUPPORTED OfpGroupModFailedCode = 5
+	OfpGroupModFailedCode_OFPGMFC_WATCH_UNSUPPORTED    OfpGroupModFailedCode = 6
+	OfpGroupModFailedCode_OFPGMFC_LOOP                 OfpGroupModFailedCode = 7
+	OfpGroupModFailedCode_OFPGMFC_UNKNOWN_GROUP        OfpGroupModFailedCode = 8
+	OfpGroupModFailedCode_OFPGMFC_CHAINED_GROUP        OfpGroupModFailedCode = 9
+	OfpGroupModFailedCode_OFPGMFC_BAD_TYPE             OfpGroupModFailedCode = 10
+	OfpGroupModFailedCode_OFPGMFC_BAD_COMMAND          OfpGroupModFailedCode = 11
+	OfpGroupModFailedCode_OFPGMFC_BAD_BUCKET           OfpGroupModFailedCode = 12
+	OfpGroupModFailedCode_OFPGMFC_BAD_WATCH            OfpGroupModFailedCode = 13
+	OfpGroupModFailedCode_OFPGMFC_EPERM                OfpGroupModFailedCode = 14
+)
+
+var OfpGroupModFailedCode_name = map[int32]string{
+	0:  "OFPGMFC_GROUP_EXISTS",
+	1:  "OFPGMFC_INVALID_GROUP",
+	2:  "OFPGMFC_WEIGHT_UNSUPPORTED",
+	3:  "OFPGMFC_OUT_OF_GROUPS",
+	4:  "OFPGMFC_OUT_OF_BUCKETS",
+	5:  "OFPGMFC_CHAINING_UNSUPPORTED",
+	6:  "OFPGMFC_WATCH_UNSUPPORTED",
+	7:  "OFPGMFC_LOOP",
+	8:  "OFPGMFC_UNKNOWN_GROUP",
+	9:  "OFPGMFC_CHAINED_GROUP",
+	10: "OFPGMFC_BAD_TYPE",
+	11: "OFPGMFC_BAD_COMMAND",
+	12: "OFPGMFC_BAD_BUCKET",
+	13: "OFPGMFC_BAD_WATCH",
+	14: "OFPGMFC_EPERM",
+}
+var OfpGroupModFailedCode_value = map[string]int32{
+	"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,
+}
+
+func (x OfpGroupModFailedCode) String() string {
+	return proto.EnumName(OfpGroupModFailedCode_name, int32(x))
+}
+func (OfpGroupModFailedCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{37}
+}
+
+// ofp_error_msg 'code' values for OFPET_PORT_MOD_FAILED.  'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpPortModFailedCode int32
+
+const (
+	OfpPortModFailedCode_OFPPMFC_BAD_PORT      OfpPortModFailedCode = 0
+	OfpPortModFailedCode_OFPPMFC_BAD_HW_ADDR   OfpPortModFailedCode = 1
+	OfpPortModFailedCode_OFPPMFC_BAD_CONFIG    OfpPortModFailedCode = 2
+	OfpPortModFailedCode_OFPPMFC_BAD_ADVERTISE OfpPortModFailedCode = 3
+	OfpPortModFailedCode_OFPPMFC_EPERM         OfpPortModFailedCode = 4
+)
+
+var OfpPortModFailedCode_name = map[int32]string{
+	0: "OFPPMFC_BAD_PORT",
+	1: "OFPPMFC_BAD_HW_ADDR",
+	2: "OFPPMFC_BAD_CONFIG",
+	3: "OFPPMFC_BAD_ADVERTISE",
+	4: "OFPPMFC_EPERM",
+}
+var OfpPortModFailedCode_value = map[string]int32{
+	"OFPPMFC_BAD_PORT":      0,
+	"OFPPMFC_BAD_HW_ADDR":   1,
+	"OFPPMFC_BAD_CONFIG":    2,
+	"OFPPMFC_BAD_ADVERTISE": 3,
+	"OFPPMFC_EPERM":         4,
+}
+
+func (x OfpPortModFailedCode) String() string {
+	return proto.EnumName(OfpPortModFailedCode_name, int32(x))
+}
+func (OfpPortModFailedCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{38}
+}
+
+// ofp_error_msg 'code' values for OFPET_TABLE_MOD_FAILED.  'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpTableModFailedCode int32
+
+const (
+	OfpTableModFailedCode_OFPTMFC_BAD_TABLE  OfpTableModFailedCode = 0
+	OfpTableModFailedCode_OFPTMFC_BAD_CONFIG OfpTableModFailedCode = 1
+	OfpTableModFailedCode_OFPTMFC_EPERM      OfpTableModFailedCode = 2
+)
+
+var OfpTableModFailedCode_name = map[int32]string{
+	0: "OFPTMFC_BAD_TABLE",
+	1: "OFPTMFC_BAD_CONFIG",
+	2: "OFPTMFC_EPERM",
+}
+var OfpTableModFailedCode_value = map[string]int32{
+	"OFPTMFC_BAD_TABLE":  0,
+	"OFPTMFC_BAD_CONFIG": 1,
+	"OFPTMFC_EPERM":      2,
+}
+
+func (x OfpTableModFailedCode) String() string {
+	return proto.EnumName(OfpTableModFailedCode_name, int32(x))
+}
+func (OfpTableModFailedCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{39}
+}
+
+// ofp_error msg 'code' values for OFPET_QUEUE_OP_FAILED. 'data' contains
+// at least the first 64 bytes of the failed request
+type OfpQueueOpFailedCode int32
+
+const (
+	OfpQueueOpFailedCode_OFPQOFC_BAD_PORT  OfpQueueOpFailedCode = 0
+	OfpQueueOpFailedCode_OFPQOFC_BAD_QUEUE OfpQueueOpFailedCode = 1
+	OfpQueueOpFailedCode_OFPQOFC_EPERM     OfpQueueOpFailedCode = 2
+)
+
+var OfpQueueOpFailedCode_name = map[int32]string{
+	0: "OFPQOFC_BAD_PORT",
+	1: "OFPQOFC_BAD_QUEUE",
+	2: "OFPQOFC_EPERM",
+}
+var OfpQueueOpFailedCode_value = map[string]int32{
+	"OFPQOFC_BAD_PORT":  0,
+	"OFPQOFC_BAD_QUEUE": 1,
+	"OFPQOFC_EPERM":     2,
+}
+
+func (x OfpQueueOpFailedCode) String() string {
+	return proto.EnumName(OfpQueueOpFailedCode_name, int32(x))
+}
+func (OfpQueueOpFailedCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{40}
+}
+
+// ofp_error_msg 'code' values for OFPET_SWITCH_CONFIG_FAILED. 'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpSwitchConfigFailedCode int32
+
+const (
+	OfpSwitchConfigFailedCode_OFPSCFC_BAD_FLAGS OfpSwitchConfigFailedCode = 0
+	OfpSwitchConfigFailedCode_OFPSCFC_BAD_LEN   OfpSwitchConfigFailedCode = 1
+	OfpSwitchConfigFailedCode_OFPSCFC_EPERM     OfpSwitchConfigFailedCode = 2
+)
+
+var OfpSwitchConfigFailedCode_name = map[int32]string{
+	0: "OFPSCFC_BAD_FLAGS",
+	1: "OFPSCFC_BAD_LEN",
+	2: "OFPSCFC_EPERM",
+}
+var OfpSwitchConfigFailedCode_value = map[string]int32{
+	"OFPSCFC_BAD_FLAGS": 0,
+	"OFPSCFC_BAD_LEN":   1,
+	"OFPSCFC_EPERM":     2,
+}
+
+func (x OfpSwitchConfigFailedCode) String() string {
+	return proto.EnumName(OfpSwitchConfigFailedCode_name, int32(x))
+}
+func (OfpSwitchConfigFailedCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{41}
+}
+
+// ofp_error_msg 'code' values for OFPET_ROLE_REQUEST_FAILED. 'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpRoleRequestFailedCode int32
+
+const (
+	OfpRoleRequestFailedCode_OFPRRFC_STALE    OfpRoleRequestFailedCode = 0
+	OfpRoleRequestFailedCode_OFPRRFC_UNSUP    OfpRoleRequestFailedCode = 1
+	OfpRoleRequestFailedCode_OFPRRFC_BAD_ROLE OfpRoleRequestFailedCode = 2
+)
+
+var OfpRoleRequestFailedCode_name = map[int32]string{
+	0: "OFPRRFC_STALE",
+	1: "OFPRRFC_UNSUP",
+	2: "OFPRRFC_BAD_ROLE",
+}
+var OfpRoleRequestFailedCode_value = map[string]int32{
+	"OFPRRFC_STALE":    0,
+	"OFPRRFC_UNSUP":    1,
+	"OFPRRFC_BAD_ROLE": 2,
+}
+
+func (x OfpRoleRequestFailedCode) String() string {
+	return proto.EnumName(OfpRoleRequestFailedCode_name, int32(x))
+}
+func (OfpRoleRequestFailedCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{42}
+}
+
+// ofp_error_msg 'code' values for OFPET_METER_MOD_FAILED.  'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpMeterModFailedCode int32
+
+const (
+	OfpMeterModFailedCode_OFPMMFC_UNKNOWN        OfpMeterModFailedCode = 0
+	OfpMeterModFailedCode_OFPMMFC_METER_EXISTS   OfpMeterModFailedCode = 1
+	OfpMeterModFailedCode_OFPMMFC_INVALID_METER  OfpMeterModFailedCode = 2
+	OfpMeterModFailedCode_OFPMMFC_UNKNOWN_METER  OfpMeterModFailedCode = 3
+	OfpMeterModFailedCode_OFPMMFC_BAD_COMMAND    OfpMeterModFailedCode = 4
+	OfpMeterModFailedCode_OFPMMFC_BAD_FLAGS      OfpMeterModFailedCode = 5
+	OfpMeterModFailedCode_OFPMMFC_BAD_RATE       OfpMeterModFailedCode = 6
+	OfpMeterModFailedCode_OFPMMFC_BAD_BURST      OfpMeterModFailedCode = 7
+	OfpMeterModFailedCode_OFPMMFC_BAD_BAND       OfpMeterModFailedCode = 8
+	OfpMeterModFailedCode_OFPMMFC_BAD_BAND_VALUE OfpMeterModFailedCode = 9
+	OfpMeterModFailedCode_OFPMMFC_OUT_OF_METERS  OfpMeterModFailedCode = 10
+	OfpMeterModFailedCode_OFPMMFC_OUT_OF_BANDS   OfpMeterModFailedCode = 11
+)
+
+var OfpMeterModFailedCode_name = map[int32]string{
+	0:  "OFPMMFC_UNKNOWN",
+	1:  "OFPMMFC_METER_EXISTS",
+	2:  "OFPMMFC_INVALID_METER",
+	3:  "OFPMMFC_UNKNOWN_METER",
+	4:  "OFPMMFC_BAD_COMMAND",
+	5:  "OFPMMFC_BAD_FLAGS",
+	6:  "OFPMMFC_BAD_RATE",
+	7:  "OFPMMFC_BAD_BURST",
+	8:  "OFPMMFC_BAD_BAND",
+	9:  "OFPMMFC_BAD_BAND_VALUE",
+	10: "OFPMMFC_OUT_OF_METERS",
+	11: "OFPMMFC_OUT_OF_BANDS",
+}
+var OfpMeterModFailedCode_value = map[string]int32{
+	"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,
+}
+
+func (x OfpMeterModFailedCode) String() string {
+	return proto.EnumName(OfpMeterModFailedCode_name, int32(x))
+}
+func (OfpMeterModFailedCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{43}
+}
+
+// ofp_error_msg 'code' values for OFPET_TABLE_FEATURES_FAILED. 'data' contains
+// at least the first 64 bytes of the failed request.
+type OfpTableFeaturesFailedCode int32
+
+const (
+	OfpTableFeaturesFailedCode_OFPTFFC_BAD_TABLE    OfpTableFeaturesFailedCode = 0
+	OfpTableFeaturesFailedCode_OFPTFFC_BAD_METADATA OfpTableFeaturesFailedCode = 1
+	OfpTableFeaturesFailedCode_OFPTFFC_BAD_TYPE     OfpTableFeaturesFailedCode = 2
+	OfpTableFeaturesFailedCode_OFPTFFC_BAD_LEN      OfpTableFeaturesFailedCode = 3
+	OfpTableFeaturesFailedCode_OFPTFFC_BAD_ARGUMENT OfpTableFeaturesFailedCode = 4
+	OfpTableFeaturesFailedCode_OFPTFFC_EPERM        OfpTableFeaturesFailedCode = 5
+)
+
+var OfpTableFeaturesFailedCode_name = map[int32]string{
+	0: "OFPTFFC_BAD_TABLE",
+	1: "OFPTFFC_BAD_METADATA",
+	2: "OFPTFFC_BAD_TYPE",
+	3: "OFPTFFC_BAD_LEN",
+	4: "OFPTFFC_BAD_ARGUMENT",
+	5: "OFPTFFC_EPERM",
+}
+var OfpTableFeaturesFailedCode_value = map[string]int32{
+	"OFPTFFC_BAD_TABLE":    0,
+	"OFPTFFC_BAD_METADATA": 1,
+	"OFPTFFC_BAD_TYPE":     2,
+	"OFPTFFC_BAD_LEN":      3,
+	"OFPTFFC_BAD_ARGUMENT": 4,
+	"OFPTFFC_EPERM":        5,
+}
+
+func (x OfpTableFeaturesFailedCode) String() string {
+	return proto.EnumName(OfpTableFeaturesFailedCode_name, int32(x))
+}
+func (OfpTableFeaturesFailedCode) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{44}
+}
+
+type OfpMultipartType int32
+
+const (
+	// Description of this OpenFlow switch.
+	// The request body is empty.
+	// The reply body is struct ofp_desc.
+	OfpMultipartType_OFPMP_DESC OfpMultipartType = 0
+	// Individual flow statistics.
+	// The request body is struct ofp_flow_stats_request.
+	// The reply body is an array of struct ofp_flow_stats.
+	OfpMultipartType_OFPMP_FLOW OfpMultipartType = 1
+	// Aggregate flow statistics.
+	// The request body is struct ofp_aggregate_stats_request.
+	// The reply body is struct ofp_aggregate_stats_reply.
+	OfpMultipartType_OFPMP_AGGREGATE OfpMultipartType = 2
+	// Flow table statistics.
+	// The request body is empty.
+	// The reply body is an array of struct ofp_table_stats.
+	OfpMultipartType_OFPMP_TABLE OfpMultipartType = 3
+	// Port statistics.
+	// The request body is struct ofp_port_stats_request.
+	// The reply body is an array of struct ofp_port_stats.
+	OfpMultipartType_OFPMP_PORT_STATS OfpMultipartType = 4
+	// Queue statistics for a port
+	// The request body is struct ofp_queue_stats_request.
+	// The reply body is an array of struct ofp_queue_stats
+	OfpMultipartType_OFPMP_QUEUE OfpMultipartType = 5
+	// Group counter statistics.
+	// The request body is struct ofp_group_stats_request.
+	// The reply is an array of struct ofp_group_stats.
+	OfpMultipartType_OFPMP_GROUP OfpMultipartType = 6
+	// Group description.
+	// The request body is empty.
+	// The reply body is an array of struct ofp_group_desc.
+	OfpMultipartType_OFPMP_GROUP_DESC OfpMultipartType = 7
+	// Group features.
+	// The request body is empty.
+	// The reply body is struct ofp_group_features.
+	OfpMultipartType_OFPMP_GROUP_FEATURES OfpMultipartType = 8
+	// Meter statistics.
+	// The request body is struct ofp_meter_multipart_requests.
+	// The reply body is an array of struct ofp_meter_stats.
+	OfpMultipartType_OFPMP_METER OfpMultipartType = 9
+	// Meter configuration.
+	// The request body is struct ofp_meter_multipart_requests.
+	// The reply body is an array of struct ofp_meter_config.
+	OfpMultipartType_OFPMP_METER_CONFIG OfpMultipartType = 10
+	// Meter features.
+	// The request body is empty.
+	// The reply body is struct ofp_meter_features.
+	OfpMultipartType_OFPMP_METER_FEATURES OfpMultipartType = 11
+	// Table features.
+	// The request body is either empty or contains an array of
+	// struct ofp_table_features containing the controller's
+	// desired view of the switch. If the switch is unable to
+	// set the specified view an error is returned.
+	// The reply body is an array of struct ofp_table_features.
+	OfpMultipartType_OFPMP_TABLE_FEATURES OfpMultipartType = 12
+	// Port description.
+	// The request body is empty.
+	// The reply body is an array of struct ofp_port.
+	OfpMultipartType_OFPMP_PORT_DESC OfpMultipartType = 13
+	// Experimenter extension.
+	// The request and reply bodies begin with
+	// struct ofp_experimenter_multipart_header.
+	// The request and reply bodies are otherwise experimenter-defined.
+	OfpMultipartType_OFPMP_EXPERIMENTER OfpMultipartType = 65535
+)
+
+var OfpMultipartType_name = map[int32]string{
+	0:     "OFPMP_DESC",
+	1:     "OFPMP_FLOW",
+	2:     "OFPMP_AGGREGATE",
+	3:     "OFPMP_TABLE",
+	4:     "OFPMP_PORT_STATS",
+	5:     "OFPMP_QUEUE",
+	6:     "OFPMP_GROUP",
+	7:     "OFPMP_GROUP_DESC",
+	8:     "OFPMP_GROUP_FEATURES",
+	9:     "OFPMP_METER",
+	10:    "OFPMP_METER_CONFIG",
+	11:    "OFPMP_METER_FEATURES",
+	12:    "OFPMP_TABLE_FEATURES",
+	13:    "OFPMP_PORT_DESC",
+	65535: "OFPMP_EXPERIMENTER",
+}
+var OfpMultipartType_value = map[string]int32{
+	"OFPMP_DESC":           0,
+	"OFPMP_FLOW":           1,
+	"OFPMP_AGGREGATE":      2,
+	"OFPMP_TABLE":          3,
+	"OFPMP_PORT_STATS":     4,
+	"OFPMP_QUEUE":          5,
+	"OFPMP_GROUP":          6,
+	"OFPMP_GROUP_DESC":     7,
+	"OFPMP_GROUP_FEATURES": 8,
+	"OFPMP_METER":          9,
+	"OFPMP_METER_CONFIG":   10,
+	"OFPMP_METER_FEATURES": 11,
+	"OFPMP_TABLE_FEATURES": 12,
+	"OFPMP_PORT_DESC":      13,
+	"OFPMP_EXPERIMENTER":   65535,
+}
+
+func (x OfpMultipartType) String() string {
+	return proto.EnumName(OfpMultipartType_name, int32(x))
+}
+func (OfpMultipartType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{45}
+}
+
+type OfpMultipartRequestFlags int32
+
+const (
+	OfpMultipartRequestFlags_OFPMPF_REQ_INVALID OfpMultipartRequestFlags = 0
+	OfpMultipartRequestFlags_OFPMPF_REQ_MORE    OfpMultipartRequestFlags = 1
+)
+
+var OfpMultipartRequestFlags_name = map[int32]string{
+	0: "OFPMPF_REQ_INVALID",
+	1: "OFPMPF_REQ_MORE",
+}
+var OfpMultipartRequestFlags_value = map[string]int32{
+	"OFPMPF_REQ_INVALID": 0,
+	"OFPMPF_REQ_MORE":    1,
+}
+
+func (x OfpMultipartRequestFlags) String() string {
+	return proto.EnumName(OfpMultipartRequestFlags_name, int32(x))
+}
+func (OfpMultipartRequestFlags) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{46}
+}
+
+type OfpMultipartReplyFlags int32
+
+const (
+	OfpMultipartReplyFlags_OFPMPF_REPLY_INVALID OfpMultipartReplyFlags = 0
+	OfpMultipartReplyFlags_OFPMPF_REPLY_MORE    OfpMultipartReplyFlags = 1
+)
+
+var OfpMultipartReplyFlags_name = map[int32]string{
+	0: "OFPMPF_REPLY_INVALID",
+	1: "OFPMPF_REPLY_MORE",
+}
+var OfpMultipartReplyFlags_value = map[string]int32{
+	"OFPMPF_REPLY_INVALID": 0,
+	"OFPMPF_REPLY_MORE":    1,
+}
+
+func (x OfpMultipartReplyFlags) String() string {
+	return proto.EnumName(OfpMultipartReplyFlags_name, int32(x))
+}
+func (OfpMultipartReplyFlags) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{47}
+}
+
+// Table Feature property types.
+// Low order bit cleared indicates a property for a regular Flow Entry.
+// Low order bit set indicates a property for the Table-Miss Flow Entry.
+type OfpTableFeaturePropType int32
+
+const (
+	OfpTableFeaturePropType_OFPTFPT_INSTRUCTIONS        OfpTableFeaturePropType = 0
+	OfpTableFeaturePropType_OFPTFPT_INSTRUCTIONS_MISS   OfpTableFeaturePropType = 1
+	OfpTableFeaturePropType_OFPTFPT_NEXT_TABLES         OfpTableFeaturePropType = 2
+	OfpTableFeaturePropType_OFPTFPT_NEXT_TABLES_MISS    OfpTableFeaturePropType = 3
+	OfpTableFeaturePropType_OFPTFPT_WRITE_ACTIONS       OfpTableFeaturePropType = 4
+	OfpTableFeaturePropType_OFPTFPT_WRITE_ACTIONS_MISS  OfpTableFeaturePropType = 5
+	OfpTableFeaturePropType_OFPTFPT_APPLY_ACTIONS       OfpTableFeaturePropType = 6
+	OfpTableFeaturePropType_OFPTFPT_APPLY_ACTIONS_MISS  OfpTableFeaturePropType = 7
+	OfpTableFeaturePropType_OFPTFPT_MATCH               OfpTableFeaturePropType = 8
+	OfpTableFeaturePropType_OFPTFPT_WILDCARDS           OfpTableFeaturePropType = 10
+	OfpTableFeaturePropType_OFPTFPT_WRITE_SETFIELD      OfpTableFeaturePropType = 12
+	OfpTableFeaturePropType_OFPTFPT_WRITE_SETFIELD_MISS OfpTableFeaturePropType = 13
+	OfpTableFeaturePropType_OFPTFPT_APPLY_SETFIELD      OfpTableFeaturePropType = 14
+	OfpTableFeaturePropType_OFPTFPT_APPLY_SETFIELD_MISS OfpTableFeaturePropType = 15
+	OfpTableFeaturePropType_OFPTFPT_EXPERIMENTER        OfpTableFeaturePropType = 65534
+	OfpTableFeaturePropType_OFPTFPT_EXPERIMENTER_MISS   OfpTableFeaturePropType = 65535
+)
+
+var OfpTableFeaturePropType_name = map[int32]string{
+	0:     "OFPTFPT_INSTRUCTIONS",
+	1:     "OFPTFPT_INSTRUCTIONS_MISS",
+	2:     "OFPTFPT_NEXT_TABLES",
+	3:     "OFPTFPT_NEXT_TABLES_MISS",
+	4:     "OFPTFPT_WRITE_ACTIONS",
+	5:     "OFPTFPT_WRITE_ACTIONS_MISS",
+	6:     "OFPTFPT_APPLY_ACTIONS",
+	7:     "OFPTFPT_APPLY_ACTIONS_MISS",
+	8:     "OFPTFPT_MATCH",
+	10:    "OFPTFPT_WILDCARDS",
+	12:    "OFPTFPT_WRITE_SETFIELD",
+	13:    "OFPTFPT_WRITE_SETFIELD_MISS",
+	14:    "OFPTFPT_APPLY_SETFIELD",
+	15:    "OFPTFPT_APPLY_SETFIELD_MISS",
+	65534: "OFPTFPT_EXPERIMENTER",
+	65535: "OFPTFPT_EXPERIMENTER_MISS",
+}
+var OfpTableFeaturePropType_value = map[string]int32{
+	"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":           10,
+	"OFPTFPT_WRITE_SETFIELD":      12,
+	"OFPTFPT_WRITE_SETFIELD_MISS": 13,
+	"OFPTFPT_APPLY_SETFIELD":      14,
+	"OFPTFPT_APPLY_SETFIELD_MISS": 15,
+	"OFPTFPT_EXPERIMENTER":        65534,
+	"OFPTFPT_EXPERIMENTER_MISS":   65535,
+}
+
+func (x OfpTableFeaturePropType) String() string {
+	return proto.EnumName(OfpTableFeaturePropType_name, int32(x))
+}
+func (OfpTableFeaturePropType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{48}
+}
+
+// Group configuration flags
+type OfpGroupCapabilities int32
+
+const (
+	OfpGroupCapabilities_OFPGFC_INVALID         OfpGroupCapabilities = 0
+	OfpGroupCapabilities_OFPGFC_SELECT_WEIGHT   OfpGroupCapabilities = 1
+	OfpGroupCapabilities_OFPGFC_SELECT_LIVENESS OfpGroupCapabilities = 2
+	OfpGroupCapabilities_OFPGFC_CHAINING        OfpGroupCapabilities = 4
+	OfpGroupCapabilities_OFPGFC_CHAINING_CHECKS OfpGroupCapabilities = 8
+)
+
+var OfpGroupCapabilities_name = map[int32]string{
+	0: "OFPGFC_INVALID",
+	1: "OFPGFC_SELECT_WEIGHT",
+	2: "OFPGFC_SELECT_LIVENESS",
+	4: "OFPGFC_CHAINING",
+	8: "OFPGFC_CHAINING_CHECKS",
+}
+var OfpGroupCapabilities_value = map[string]int32{
+	"OFPGFC_INVALID":         0,
+	"OFPGFC_SELECT_WEIGHT":   1,
+	"OFPGFC_SELECT_LIVENESS": 2,
+	"OFPGFC_CHAINING":        4,
+	"OFPGFC_CHAINING_CHECKS": 8,
+}
+
+func (x OfpGroupCapabilities) String() string {
+	return proto.EnumName(OfpGroupCapabilities_name, int32(x))
+}
+func (OfpGroupCapabilities) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{49}
+}
+
+type OfpQueueProperties int32
+
+const (
+	OfpQueueProperties_OFPQT_INVALID      OfpQueueProperties = 0
+	OfpQueueProperties_OFPQT_MIN_RATE     OfpQueueProperties = 1
+	OfpQueueProperties_OFPQT_MAX_RATE     OfpQueueProperties = 2
+	OfpQueueProperties_OFPQT_EXPERIMENTER OfpQueueProperties = 65535
+)
+
+var OfpQueueProperties_name = map[int32]string{
+	0:     "OFPQT_INVALID",
+	1:     "OFPQT_MIN_RATE",
+	2:     "OFPQT_MAX_RATE",
+	65535: "OFPQT_EXPERIMENTER",
+}
+var OfpQueueProperties_value = map[string]int32{
+	"OFPQT_INVALID":      0,
+	"OFPQT_MIN_RATE":     1,
+	"OFPQT_MAX_RATE":     2,
+	"OFPQT_EXPERIMENTER": 65535,
+}
+
+func (x OfpQueueProperties) String() string {
+	return proto.EnumName(OfpQueueProperties_name, int32(x))
+}
+func (OfpQueueProperties) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{50}
+}
+
+// Controller roles.
+type OfpControllerRole int32
+
+const (
+	OfpControllerRole_OFPCR_ROLE_NOCHANGE OfpControllerRole = 0
+	OfpControllerRole_OFPCR_ROLE_EQUAL    OfpControllerRole = 1
+	OfpControllerRole_OFPCR_ROLE_MASTER   OfpControllerRole = 2
+	OfpControllerRole_OFPCR_ROLE_SLAVE    OfpControllerRole = 3
+)
+
+var OfpControllerRole_name = map[int32]string{
+	0: "OFPCR_ROLE_NOCHANGE",
+	1: "OFPCR_ROLE_EQUAL",
+	2: "OFPCR_ROLE_MASTER",
+	3: "OFPCR_ROLE_SLAVE",
+}
+var OfpControllerRole_value = map[string]int32{
+	"OFPCR_ROLE_NOCHANGE": 0,
+	"OFPCR_ROLE_EQUAL":    1,
+	"OFPCR_ROLE_MASTER":   2,
+	"OFPCR_ROLE_SLAVE":    3,
+}
+
+func (x OfpControllerRole) String() string {
+	return proto.EnumName(OfpControllerRole_name, int32(x))
+}
+func (OfpControllerRole) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{51}
+}
+
+// Header on all OpenFlow packets.
+type OfpHeader struct {
+	Version              uint32   `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
+	Type                 OfpType  `protobuf:"varint,2,opt,name=type,proto3,enum=openflow_13.OfpType" json:"type,omitempty"`
+	Xid                  uint32   `protobuf:"varint,3,opt,name=xid,proto3" json:"xid,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpHeader) Reset()         { *m = OfpHeader{} }
+func (m *OfpHeader) String() string { return proto.CompactTextString(m) }
+func (*OfpHeader) ProtoMessage()    {}
+func (*OfpHeader) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{0}
+}
+func (m *OfpHeader) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpHeader.Unmarshal(m, b)
+}
+func (m *OfpHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpHeader.Marshal(b, m, deterministic)
+}
+func (dst *OfpHeader) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpHeader.Merge(dst, src)
+}
+func (m *OfpHeader) XXX_Size() int {
+	return xxx_messageInfo_OfpHeader.Size(m)
+}
+func (m *OfpHeader) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpHeader.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpHeader proto.InternalMessageInfo
+
+func (m *OfpHeader) GetVersion() uint32 {
+	if m != nil {
+		return m.Version
+	}
+	return 0
+}
+
+func (m *OfpHeader) GetType() OfpType {
+	if m != nil {
+		return m.Type
+	}
+	return OfpType_OFPT_HELLO
+}
+
+func (m *OfpHeader) GetXid() uint32 {
+	if m != nil {
+		return m.Xid
+	}
+	return 0
+}
+
+// Common header for all Hello Elements
+type OfpHelloElemHeader struct {
+	Type OfpHelloElemType `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpHelloElemType" json:"type,omitempty"`
+	// Types that are valid to be assigned to Element:
+	//	*OfpHelloElemHeader_Versionbitmap
+	Element              isOfpHelloElemHeader_Element `protobuf_oneof:"element"`
+	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
+	XXX_unrecognized     []byte                       `json:"-"`
+	XXX_sizecache        int32                        `json:"-"`
+}
+
+func (m *OfpHelloElemHeader) Reset()         { *m = OfpHelloElemHeader{} }
+func (m *OfpHelloElemHeader) String() string { return proto.CompactTextString(m) }
+func (*OfpHelloElemHeader) ProtoMessage()    {}
+func (*OfpHelloElemHeader) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{1}
+}
+func (m *OfpHelloElemHeader) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpHelloElemHeader.Unmarshal(m, b)
+}
+func (m *OfpHelloElemHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpHelloElemHeader.Marshal(b, m, deterministic)
+}
+func (dst *OfpHelloElemHeader) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpHelloElemHeader.Merge(dst, src)
+}
+func (m *OfpHelloElemHeader) XXX_Size() int {
+	return xxx_messageInfo_OfpHelloElemHeader.Size(m)
+}
+func (m *OfpHelloElemHeader) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpHelloElemHeader.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpHelloElemHeader proto.InternalMessageInfo
+
+func (m *OfpHelloElemHeader) GetType() OfpHelloElemType {
+	if m != nil {
+		return m.Type
+	}
+	return OfpHelloElemType_OFPHET_INVALID
+}
+
+type isOfpHelloElemHeader_Element interface {
+	isOfpHelloElemHeader_Element()
+}
+
+type OfpHelloElemHeader_Versionbitmap struct {
+	Versionbitmap *OfpHelloElemVersionbitmap `protobuf:"bytes,2,opt,name=versionbitmap,proto3,oneof"`
+}
+
+func (*OfpHelloElemHeader_Versionbitmap) isOfpHelloElemHeader_Element() {}
+
+func (m *OfpHelloElemHeader) GetElement() isOfpHelloElemHeader_Element {
+	if m != nil {
+		return m.Element
+	}
+	return nil
+}
+
+func (m *OfpHelloElemHeader) GetVersionbitmap() *OfpHelloElemVersionbitmap {
+	if x, ok := m.GetElement().(*OfpHelloElemHeader_Versionbitmap); ok {
+		return x.Versionbitmap
+	}
+	return nil
+}
+
+// XXX_OneofFuncs is for the internal use of the proto package.
+func (*OfpHelloElemHeader) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
+	return _OfpHelloElemHeader_OneofMarshaler, _OfpHelloElemHeader_OneofUnmarshaler, _OfpHelloElemHeader_OneofSizer, []interface{}{
+		(*OfpHelloElemHeader_Versionbitmap)(nil),
+	}
+}
+
+func _OfpHelloElemHeader_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
+	m := msg.(*OfpHelloElemHeader)
+	// element
+	switch x := m.Element.(type) {
+	case *OfpHelloElemHeader_Versionbitmap:
+		b.EncodeVarint(2<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Versionbitmap); err != nil {
+			return err
+		}
+	case nil:
+	default:
+		return fmt.Errorf("OfpHelloElemHeader.Element has unexpected type %T", x)
+	}
+	return nil
+}
+
+func _OfpHelloElemHeader_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
+	m := msg.(*OfpHelloElemHeader)
+	switch tag {
+	case 2: // element.versionbitmap
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpHelloElemVersionbitmap)
+		err := b.DecodeMessage(msg)
+		m.Element = &OfpHelloElemHeader_Versionbitmap{msg}
+		return true, err
+	default:
+		return false, nil
+	}
+}
+
+func _OfpHelloElemHeader_OneofSizer(msg proto.Message) (n int) {
+	m := msg.(*OfpHelloElemHeader)
+	// element
+	switch x := m.Element.(type) {
+	case *OfpHelloElemHeader_Versionbitmap:
+		s := proto.Size(x.Versionbitmap)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case nil:
+	default:
+		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
+	}
+	return n
+}
+
+// Version bitmap Hello Element
+type OfpHelloElemVersionbitmap struct {
+	Bitmaps              []uint32 `protobuf:"varint,2,rep,packed,name=bitmaps,proto3" json:"bitmaps,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpHelloElemVersionbitmap) Reset()         { *m = OfpHelloElemVersionbitmap{} }
+func (m *OfpHelloElemVersionbitmap) String() string { return proto.CompactTextString(m) }
+func (*OfpHelloElemVersionbitmap) ProtoMessage()    {}
+func (*OfpHelloElemVersionbitmap) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{2}
+}
+func (m *OfpHelloElemVersionbitmap) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpHelloElemVersionbitmap.Unmarshal(m, b)
+}
+func (m *OfpHelloElemVersionbitmap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpHelloElemVersionbitmap.Marshal(b, m, deterministic)
+}
+func (dst *OfpHelloElemVersionbitmap) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpHelloElemVersionbitmap.Merge(dst, src)
+}
+func (m *OfpHelloElemVersionbitmap) XXX_Size() int {
+	return xxx_messageInfo_OfpHelloElemVersionbitmap.Size(m)
+}
+func (m *OfpHelloElemVersionbitmap) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpHelloElemVersionbitmap.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpHelloElemVersionbitmap proto.InternalMessageInfo
+
+func (m *OfpHelloElemVersionbitmap) GetBitmaps() []uint32 {
+	if m != nil {
+		return m.Bitmaps
+	}
+	return nil
+}
+
+// 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.
+type OfpHello struct {
+	// Hello element list
+	Elements             []*OfpHelloElemHeader `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *OfpHello) Reset()         { *m = OfpHello{} }
+func (m *OfpHello) String() string { return proto.CompactTextString(m) }
+func (*OfpHello) ProtoMessage()    {}
+func (*OfpHello) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{3}
+}
+func (m *OfpHello) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpHello.Unmarshal(m, b)
+}
+func (m *OfpHello) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpHello.Marshal(b, m, deterministic)
+}
+func (dst *OfpHello) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpHello.Merge(dst, src)
+}
+func (m *OfpHello) XXX_Size() int {
+	return xxx_messageInfo_OfpHello.Size(m)
+}
+func (m *OfpHello) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpHello.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpHello proto.InternalMessageInfo
+
+func (m *OfpHello) GetElements() []*OfpHelloElemHeader {
+	if m != nil {
+		return m.Elements
+	}
+	return nil
+}
+
+// Switch configuration.
+type OfpSwitchConfig struct {
+	// ofp_header header;
+	Flags                uint32   `protobuf:"varint,1,opt,name=flags,proto3" json:"flags,omitempty"`
+	MissSendLen          uint32   `protobuf:"varint,2,opt,name=miss_send_len,json=missSendLen,proto3" json:"miss_send_len,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpSwitchConfig) Reset()         { *m = OfpSwitchConfig{} }
+func (m *OfpSwitchConfig) String() string { return proto.CompactTextString(m) }
+func (*OfpSwitchConfig) ProtoMessage()    {}
+func (*OfpSwitchConfig) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{4}
+}
+func (m *OfpSwitchConfig) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpSwitchConfig.Unmarshal(m, b)
+}
+func (m *OfpSwitchConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpSwitchConfig.Marshal(b, m, deterministic)
+}
+func (dst *OfpSwitchConfig) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpSwitchConfig.Merge(dst, src)
+}
+func (m *OfpSwitchConfig) XXX_Size() int {
+	return xxx_messageInfo_OfpSwitchConfig.Size(m)
+}
+func (m *OfpSwitchConfig) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpSwitchConfig.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpSwitchConfig proto.InternalMessageInfo
+
+func (m *OfpSwitchConfig) GetFlags() uint32 {
+	if m != nil {
+		return m.Flags
+	}
+	return 0
+}
+
+func (m *OfpSwitchConfig) GetMissSendLen() uint32 {
+	if m != nil {
+		return m.MissSendLen
+	}
+	return 0
+}
+
+// Configure/Modify behavior of a flow table
+type OfpTableMod struct {
+	// ofp_header header;
+	TableId              uint32   `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+	Config               uint32   `protobuf:"varint,2,opt,name=config,proto3" json:"config,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpTableMod) Reset()         { *m = OfpTableMod{} }
+func (m *OfpTableMod) String() string { return proto.CompactTextString(m) }
+func (*OfpTableMod) ProtoMessage()    {}
+func (*OfpTableMod) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{5}
+}
+func (m *OfpTableMod) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpTableMod.Unmarshal(m, b)
+}
+func (m *OfpTableMod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpTableMod.Marshal(b, m, deterministic)
+}
+func (dst *OfpTableMod) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpTableMod.Merge(dst, src)
+}
+func (m *OfpTableMod) XXX_Size() int {
+	return xxx_messageInfo_OfpTableMod.Size(m)
+}
+func (m *OfpTableMod) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpTableMod.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableMod proto.InternalMessageInfo
+
+func (m *OfpTableMod) GetTableId() uint32 {
+	if m != nil {
+		return m.TableId
+	}
+	return 0
+}
+
+func (m *OfpTableMod) GetConfig() uint32 {
+	if m != nil {
+		return m.Config
+	}
+	return 0
+}
+
+// Description of a port
+type OfpPort struct {
+	PortNo uint32   `protobuf:"varint,1,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"`
+	HwAddr []uint32 `protobuf:"varint,2,rep,packed,name=hw_addr,json=hwAddr,proto3" json:"hw_addr,omitempty"`
+	Name   string   `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
+	Config uint32   `protobuf:"varint,4,opt,name=config,proto3" json:"config,omitempty"`
+	State  uint32   `protobuf:"varint,5,opt,name=state,proto3" json:"state,omitempty"`
+	// Bitmaps of OFPPF_* that describe features.  All bits zeroed if
+	// unsupported or unavailable.
+	Curr                 uint32   `protobuf:"varint,6,opt,name=curr,proto3" json:"curr,omitempty"`
+	Advertised           uint32   `protobuf:"varint,7,opt,name=advertised,proto3" json:"advertised,omitempty"`
+	Supported            uint32   `protobuf:"varint,8,opt,name=supported,proto3" json:"supported,omitempty"`
+	Peer                 uint32   `protobuf:"varint,9,opt,name=peer,proto3" json:"peer,omitempty"`
+	CurrSpeed            uint32   `protobuf:"varint,10,opt,name=curr_speed,json=currSpeed,proto3" json:"curr_speed,omitempty"`
+	MaxSpeed             uint32   `protobuf:"varint,11,opt,name=max_speed,json=maxSpeed,proto3" json:"max_speed,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpPort) Reset()         { *m = OfpPort{} }
+func (m *OfpPort) String() string { return proto.CompactTextString(m) }
+func (*OfpPort) ProtoMessage()    {}
+func (*OfpPort) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{6}
+}
+func (m *OfpPort) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpPort.Unmarshal(m, b)
+}
+func (m *OfpPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpPort.Marshal(b, m, deterministic)
+}
+func (dst *OfpPort) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpPort.Merge(dst, src)
+}
+func (m *OfpPort) XXX_Size() int {
+	return xxx_messageInfo_OfpPort.Size(m)
+}
+func (m *OfpPort) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpPort.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpPort proto.InternalMessageInfo
+
+func (m *OfpPort) GetPortNo() uint32 {
+	if m != nil {
+		return m.PortNo
+	}
+	return 0
+}
+
+func (m *OfpPort) GetHwAddr() []uint32 {
+	if m != nil {
+		return m.HwAddr
+	}
+	return nil
+}
+
+func (m *OfpPort) GetName() string {
+	if m != nil {
+		return m.Name
+	}
+	return ""
+}
+
+func (m *OfpPort) GetConfig() uint32 {
+	if m != nil {
+		return m.Config
+	}
+	return 0
+}
+
+func (m *OfpPort) GetState() uint32 {
+	if m != nil {
+		return m.State
+	}
+	return 0
+}
+
+func (m *OfpPort) GetCurr() uint32 {
+	if m != nil {
+		return m.Curr
+	}
+	return 0
+}
+
+func (m *OfpPort) GetAdvertised() uint32 {
+	if m != nil {
+		return m.Advertised
+	}
+	return 0
+}
+
+func (m *OfpPort) GetSupported() uint32 {
+	if m != nil {
+		return m.Supported
+	}
+	return 0
+}
+
+func (m *OfpPort) GetPeer() uint32 {
+	if m != nil {
+		return m.Peer
+	}
+	return 0
+}
+
+func (m *OfpPort) GetCurrSpeed() uint32 {
+	if m != nil {
+		return m.CurrSpeed
+	}
+	return 0
+}
+
+func (m *OfpPort) GetMaxSpeed() uint32 {
+	if m != nil {
+		return m.MaxSpeed
+	}
+	return 0
+}
+
+// Switch features.
+type OfpSwitchFeatures struct {
+	// ofp_header header;
+	DatapathId  uint64 `protobuf:"varint,1,opt,name=datapath_id,json=datapathId,proto3" json:"datapath_id,omitempty"`
+	NBuffers    uint32 `protobuf:"varint,2,opt,name=n_buffers,json=nBuffers,proto3" json:"n_buffers,omitempty"`
+	NTables     uint32 `protobuf:"varint,3,opt,name=n_tables,json=nTables,proto3" json:"n_tables,omitempty"`
+	AuxiliaryId uint32 `protobuf:"varint,4,opt,name=auxiliary_id,json=auxiliaryId,proto3" json:"auxiliary_id,omitempty"`
+	// Features.
+	Capabilities         uint32   `protobuf:"varint,5,opt,name=capabilities,proto3" json:"capabilities,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpSwitchFeatures) Reset()         { *m = OfpSwitchFeatures{} }
+func (m *OfpSwitchFeatures) String() string { return proto.CompactTextString(m) }
+func (*OfpSwitchFeatures) ProtoMessage()    {}
+func (*OfpSwitchFeatures) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{7}
+}
+func (m *OfpSwitchFeatures) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpSwitchFeatures.Unmarshal(m, b)
+}
+func (m *OfpSwitchFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpSwitchFeatures.Marshal(b, m, deterministic)
+}
+func (dst *OfpSwitchFeatures) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpSwitchFeatures.Merge(dst, src)
+}
+func (m *OfpSwitchFeatures) XXX_Size() int {
+	return xxx_messageInfo_OfpSwitchFeatures.Size(m)
+}
+func (m *OfpSwitchFeatures) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpSwitchFeatures.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpSwitchFeatures proto.InternalMessageInfo
+
+func (m *OfpSwitchFeatures) GetDatapathId() uint64 {
+	if m != nil {
+		return m.DatapathId
+	}
+	return 0
+}
+
+func (m *OfpSwitchFeatures) GetNBuffers() uint32 {
+	if m != nil {
+		return m.NBuffers
+	}
+	return 0
+}
+
+func (m *OfpSwitchFeatures) GetNTables() uint32 {
+	if m != nil {
+		return m.NTables
+	}
+	return 0
+}
+
+func (m *OfpSwitchFeatures) GetAuxiliaryId() uint32 {
+	if m != nil {
+		return m.AuxiliaryId
+	}
+	return 0
+}
+
+func (m *OfpSwitchFeatures) GetCapabilities() uint32 {
+	if m != nil {
+		return m.Capabilities
+	}
+	return 0
+}
+
+// A physical port has changed in the datapath
+type OfpPortStatus struct {
+	// ofp_header header;
+	Reason               OfpPortReason `protobuf:"varint,1,opt,name=reason,proto3,enum=openflow_13.OfpPortReason" json:"reason,omitempty"`
+	Desc                 *OfpPort      `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
+	XXX_unrecognized     []byte        `json:"-"`
+	XXX_sizecache        int32         `json:"-"`
+}
+
+func (m *OfpPortStatus) Reset()         { *m = OfpPortStatus{} }
+func (m *OfpPortStatus) String() string { return proto.CompactTextString(m) }
+func (*OfpPortStatus) ProtoMessage()    {}
+func (*OfpPortStatus) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{8}
+}
+func (m *OfpPortStatus) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpPortStatus.Unmarshal(m, b)
+}
+func (m *OfpPortStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpPortStatus.Marshal(b, m, deterministic)
+}
+func (dst *OfpPortStatus) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpPortStatus.Merge(dst, src)
+}
+func (m *OfpPortStatus) XXX_Size() int {
+	return xxx_messageInfo_OfpPortStatus.Size(m)
+}
+func (m *OfpPortStatus) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpPortStatus.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpPortStatus proto.InternalMessageInfo
+
+func (m *OfpPortStatus) GetReason() OfpPortReason {
+	if m != nil {
+		return m.Reason
+	}
+	return OfpPortReason_OFPPR_ADD
+}
+
+func (m *OfpPortStatus) GetDesc() *OfpPort {
+	if m != nil {
+		return m.Desc
+	}
+	return nil
+}
+
+// Modify behavior of the physical port
+type OfpPortMod struct {
+	// ofp_header header;
+	PortNo uint32   `protobuf:"varint,1,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"`
+	HwAddr []uint32 `protobuf:"varint,2,rep,packed,name=hw_addr,json=hwAddr,proto3" json:"hw_addr,omitempty"`
+	// The hardware address is not
+	// configurable.  This is used to
+	// sanity-check the request, so it must
+	// be the same as returned in an
+	// ofp_port struct.
+	Config               uint32   `protobuf:"varint,3,opt,name=config,proto3" json:"config,omitempty"`
+	Mask                 uint32   `protobuf:"varint,4,opt,name=mask,proto3" json:"mask,omitempty"`
+	Advertise            uint32   `protobuf:"varint,5,opt,name=advertise,proto3" json:"advertise,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpPortMod) Reset()         { *m = OfpPortMod{} }
+func (m *OfpPortMod) String() string { return proto.CompactTextString(m) }
+func (*OfpPortMod) ProtoMessage()    {}
+func (*OfpPortMod) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{9}
+}
+func (m *OfpPortMod) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpPortMod.Unmarshal(m, b)
+}
+func (m *OfpPortMod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpPortMod.Marshal(b, m, deterministic)
+}
+func (dst *OfpPortMod) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpPortMod.Merge(dst, src)
+}
+func (m *OfpPortMod) XXX_Size() int {
+	return xxx_messageInfo_OfpPortMod.Size(m)
+}
+func (m *OfpPortMod) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpPortMod.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpPortMod proto.InternalMessageInfo
+
+func (m *OfpPortMod) GetPortNo() uint32 {
+	if m != nil {
+		return m.PortNo
+	}
+	return 0
+}
+
+func (m *OfpPortMod) GetHwAddr() []uint32 {
+	if m != nil {
+		return m.HwAddr
+	}
+	return nil
+}
+
+func (m *OfpPortMod) GetConfig() uint32 {
+	if m != nil {
+		return m.Config
+	}
+	return 0
+}
+
+func (m *OfpPortMod) GetMask() uint32 {
+	if m != nil {
+		return m.Mask
+	}
+	return 0
+}
+
+func (m *OfpPortMod) GetAdvertise() uint32 {
+	if m != nil {
+		return m.Advertise
+	}
+	return 0
+}
+
+// Fields to match against flows
+type OfpMatch struct {
+	Type                 OfpMatchType   `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpMatchType" json:"type,omitempty"`
+	OxmFields            []*OfpOxmField `protobuf:"bytes,2,rep,name=oxm_fields,json=oxmFields,proto3" json:"oxm_fields,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
+	XXX_unrecognized     []byte         `json:"-"`
+	XXX_sizecache        int32          `json:"-"`
+}
+
+func (m *OfpMatch) Reset()         { *m = OfpMatch{} }
+func (m *OfpMatch) String() string { return proto.CompactTextString(m) }
+func (*OfpMatch) ProtoMessage()    {}
+func (*OfpMatch) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{10}
+}
+func (m *OfpMatch) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpMatch.Unmarshal(m, b)
+}
+func (m *OfpMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpMatch.Marshal(b, m, deterministic)
+}
+func (dst *OfpMatch) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpMatch.Merge(dst, src)
+}
+func (m *OfpMatch) XXX_Size() int {
+	return xxx_messageInfo_OfpMatch.Size(m)
+}
+func (m *OfpMatch) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpMatch.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMatch proto.InternalMessageInfo
+
+func (m *OfpMatch) GetType() OfpMatchType {
+	if m != nil {
+		return m.Type
+	}
+	return OfpMatchType_OFPMT_STANDARD
+}
+
+func (m *OfpMatch) GetOxmFields() []*OfpOxmField {
+	if m != nil {
+		return m.OxmFields
+	}
+	return nil
+}
+
+// OXM Flow match fields
+type OfpOxmField struct {
+	OxmClass OfpOxmClass `protobuf:"varint,1,opt,name=oxm_class,json=oxmClass,proto3,enum=openflow_13.OfpOxmClass" json:"oxm_class,omitempty"`
+	// Types that are valid to be assigned to Field:
+	//	*OfpOxmField_OfbField
+	//	*OfpOxmField_ExperimenterField
+	Field                isOfpOxmField_Field `protobuf_oneof:"field"`
+	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
+	XXX_unrecognized     []byte              `json:"-"`
+	XXX_sizecache        int32               `json:"-"`
+}
+
+func (m *OfpOxmField) Reset()         { *m = OfpOxmField{} }
+func (m *OfpOxmField) String() string { return proto.CompactTextString(m) }
+func (*OfpOxmField) ProtoMessage()    {}
+func (*OfpOxmField) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{11}
+}
+func (m *OfpOxmField) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpOxmField.Unmarshal(m, b)
+}
+func (m *OfpOxmField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpOxmField.Marshal(b, m, deterministic)
+}
+func (dst *OfpOxmField) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpOxmField.Merge(dst, src)
+}
+func (m *OfpOxmField) XXX_Size() int {
+	return xxx_messageInfo_OfpOxmField.Size(m)
+}
+func (m *OfpOxmField) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpOxmField.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpOxmField proto.InternalMessageInfo
+
+func (m *OfpOxmField) GetOxmClass() OfpOxmClass {
+	if m != nil {
+		return m.OxmClass
+	}
+	return OfpOxmClass_OFPXMC_NXM_0
+}
+
+type isOfpOxmField_Field interface {
+	isOfpOxmField_Field()
+}
+
+type OfpOxmField_OfbField struct {
+	OfbField *OfpOxmOfbField `protobuf:"bytes,4,opt,name=ofb_field,json=ofbField,proto3,oneof"`
+}
+
+type OfpOxmField_ExperimenterField struct {
+	ExperimenterField *OfpOxmExperimenterField `protobuf:"bytes,5,opt,name=experimenter_field,json=experimenterField,proto3,oneof"`
+}
+
+func (*OfpOxmField_OfbField) isOfpOxmField_Field() {}
+
+func (*OfpOxmField_ExperimenterField) isOfpOxmField_Field() {}
+
+func (m *OfpOxmField) GetField() isOfpOxmField_Field {
+	if m != nil {
+		return m.Field
+	}
+	return nil
+}
+
+func (m *OfpOxmField) GetOfbField() *OfpOxmOfbField {
+	if x, ok := m.GetField().(*OfpOxmField_OfbField); ok {
+		return x.OfbField
+	}
+	return nil
+}
+
+func (m *OfpOxmField) GetExperimenterField() *OfpOxmExperimenterField {
+	if x, ok := m.GetField().(*OfpOxmField_ExperimenterField); ok {
+		return x.ExperimenterField
+	}
+	return nil
+}
+
+// XXX_OneofFuncs is for the internal use of the proto package.
+func (*OfpOxmField) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
+	return _OfpOxmField_OneofMarshaler, _OfpOxmField_OneofUnmarshaler, _OfpOxmField_OneofSizer, []interface{}{
+		(*OfpOxmField_OfbField)(nil),
+		(*OfpOxmField_ExperimenterField)(nil),
+	}
+}
+
+func _OfpOxmField_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
+	m := msg.(*OfpOxmField)
+	// field
+	switch x := m.Field.(type) {
+	case *OfpOxmField_OfbField:
+		b.EncodeVarint(4<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.OfbField); err != nil {
+			return err
+		}
+	case *OfpOxmField_ExperimenterField:
+		b.EncodeVarint(5<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.ExperimenterField); err != nil {
+			return err
+		}
+	case nil:
+	default:
+		return fmt.Errorf("OfpOxmField.Field has unexpected type %T", x)
+	}
+	return nil
+}
+
+func _OfpOxmField_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
+	m := msg.(*OfpOxmField)
+	switch tag {
+	case 4: // field.ofb_field
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpOxmOfbField)
+		err := b.DecodeMessage(msg)
+		m.Field = &OfpOxmField_OfbField{msg}
+		return true, err
+	case 5: // field.experimenter_field
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpOxmExperimenterField)
+		err := b.DecodeMessage(msg)
+		m.Field = &OfpOxmField_ExperimenterField{msg}
+		return true, err
+	default:
+		return false, nil
+	}
+}
+
+func _OfpOxmField_OneofSizer(msg proto.Message) (n int) {
+	m := msg.(*OfpOxmField)
+	// field
+	switch x := m.Field.(type) {
+	case *OfpOxmField_OfbField:
+		s := proto.Size(x.OfbField)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpOxmField_ExperimenterField:
+		s := proto.Size(x.ExperimenterField)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case nil:
+	default:
+		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
+	}
+	return n
+}
+
+// OXM OpenFlow Basic Match Field
+type OfpOxmOfbField struct {
+	Type    OxmOfbFieldTypes `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OxmOfbFieldTypes" json:"type,omitempty"`
+	HasMask bool             `protobuf:"varint,2,opt,name=has_mask,json=hasMask,proto3" json:"has_mask,omitempty"`
+	// Types that are valid to be assigned to Value:
+	//	*OfpOxmOfbField_Port
+	//	*OfpOxmOfbField_PhysicalPort
+	//	*OfpOxmOfbField_TableMetadata
+	//	*OfpOxmOfbField_EthDst
+	//	*OfpOxmOfbField_EthSrc
+	//	*OfpOxmOfbField_EthType
+	//	*OfpOxmOfbField_VlanVid
+	//	*OfpOxmOfbField_VlanPcp
+	//	*OfpOxmOfbField_IpDscp
+	//	*OfpOxmOfbField_IpEcn
+	//	*OfpOxmOfbField_IpProto
+	//	*OfpOxmOfbField_Ipv4Src
+	//	*OfpOxmOfbField_Ipv4Dst
+	//	*OfpOxmOfbField_TcpSrc
+	//	*OfpOxmOfbField_TcpDst
+	//	*OfpOxmOfbField_UdpSrc
+	//	*OfpOxmOfbField_UdpDst
+	//	*OfpOxmOfbField_SctpSrc
+	//	*OfpOxmOfbField_SctpDst
+	//	*OfpOxmOfbField_Icmpv4Type
+	//	*OfpOxmOfbField_Icmpv4Code
+	//	*OfpOxmOfbField_ArpOp
+	//	*OfpOxmOfbField_ArpSpa
+	//	*OfpOxmOfbField_ArpTpa
+	//	*OfpOxmOfbField_ArpSha
+	//	*OfpOxmOfbField_ArpTha
+	//	*OfpOxmOfbField_Ipv6Src
+	//	*OfpOxmOfbField_Ipv6Dst
+	//	*OfpOxmOfbField_Ipv6Flabel
+	//	*OfpOxmOfbField_Icmpv6Type
+	//	*OfpOxmOfbField_Icmpv6Code
+	//	*OfpOxmOfbField_Ipv6NdTarget
+	//	*OfpOxmOfbField_Ipv6NdSsl
+	//	*OfpOxmOfbField_Ipv6NdTll
+	//	*OfpOxmOfbField_MplsLabel
+	//	*OfpOxmOfbField_MplsTc
+	//	*OfpOxmOfbField_MplsBos
+	//	*OfpOxmOfbField_PbbIsid
+	//	*OfpOxmOfbField_TunnelId
+	//	*OfpOxmOfbField_Ipv6Exthdr
+	Value isOfpOxmOfbField_Value `protobuf_oneof:"value"`
+	// Optional mask values (must be present when has_mask is true
+	//
+	// Types that are valid to be assigned to Mask:
+	//	*OfpOxmOfbField_TableMetadataMask
+	//	*OfpOxmOfbField_EthDstMask
+	//	*OfpOxmOfbField_EthSrcMask
+	//	*OfpOxmOfbField_VlanVidMask
+	//	*OfpOxmOfbField_Ipv4SrcMask
+	//	*OfpOxmOfbField_Ipv4DstMask
+	//	*OfpOxmOfbField_ArpSpaMask
+	//	*OfpOxmOfbField_ArpTpaMask
+	//	*OfpOxmOfbField_Ipv6SrcMask
+	//	*OfpOxmOfbField_Ipv6DstMask
+	//	*OfpOxmOfbField_Ipv6FlabelMask
+	//	*OfpOxmOfbField_PbbIsidMask
+	//	*OfpOxmOfbField_TunnelIdMask
+	//	*OfpOxmOfbField_Ipv6ExthdrMask
+	Mask                 isOfpOxmOfbField_Mask `protobuf_oneof:"mask"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *OfpOxmOfbField) Reset()         { *m = OfpOxmOfbField{} }
+func (m *OfpOxmOfbField) String() string { return proto.CompactTextString(m) }
+func (*OfpOxmOfbField) ProtoMessage()    {}
+func (*OfpOxmOfbField) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{12}
+}
+func (m *OfpOxmOfbField) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpOxmOfbField.Unmarshal(m, b)
+}
+func (m *OfpOxmOfbField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpOxmOfbField.Marshal(b, m, deterministic)
+}
+func (dst *OfpOxmOfbField) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpOxmOfbField.Merge(dst, src)
+}
+func (m *OfpOxmOfbField) XXX_Size() int {
+	return xxx_messageInfo_OfpOxmOfbField.Size(m)
+}
+func (m *OfpOxmOfbField) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpOxmOfbField.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpOxmOfbField proto.InternalMessageInfo
+
+func (m *OfpOxmOfbField) GetType() OxmOfbFieldTypes {
+	if m != nil {
+		return m.Type
+	}
+	return OxmOfbFieldTypes_OFPXMT_OFB_IN_PORT
+}
+
+func (m *OfpOxmOfbField) GetHasMask() bool {
+	if m != nil {
+		return m.HasMask
+	}
+	return false
+}
+
+type isOfpOxmOfbField_Value interface {
+	isOfpOxmOfbField_Value()
+}
+
+type OfpOxmOfbField_Port struct {
+	Port uint32 `protobuf:"varint,3,opt,name=port,proto3,oneof"`
+}
+
+type OfpOxmOfbField_PhysicalPort struct {
+	PhysicalPort uint32 `protobuf:"varint,4,opt,name=physical_port,json=physicalPort,proto3,oneof"`
+}
+
+type OfpOxmOfbField_TableMetadata struct {
+	TableMetadata uint64 `protobuf:"varint,5,opt,name=table_metadata,json=tableMetadata,proto3,oneof"`
+}
+
+type OfpOxmOfbField_EthDst struct {
+	EthDst []byte `protobuf:"bytes,6,opt,name=eth_dst,json=ethDst,proto3,oneof"`
+}
+
+type OfpOxmOfbField_EthSrc struct {
+	EthSrc []byte `protobuf:"bytes,7,opt,name=eth_src,json=ethSrc,proto3,oneof"`
+}
+
+type OfpOxmOfbField_EthType struct {
+	EthType uint32 `protobuf:"varint,8,opt,name=eth_type,json=ethType,proto3,oneof"`
+}
+
+type OfpOxmOfbField_VlanVid struct {
+	VlanVid uint32 `protobuf:"varint,9,opt,name=vlan_vid,json=vlanVid,proto3,oneof"`
+}
+
+type OfpOxmOfbField_VlanPcp struct {
+	VlanPcp uint32 `protobuf:"varint,10,opt,name=vlan_pcp,json=vlanPcp,proto3,oneof"`
+}
+
+type OfpOxmOfbField_IpDscp struct {
+	IpDscp uint32 `protobuf:"varint,11,opt,name=ip_dscp,json=ipDscp,proto3,oneof"`
+}
+
+type OfpOxmOfbField_IpEcn struct {
+	IpEcn uint32 `protobuf:"varint,12,opt,name=ip_ecn,json=ipEcn,proto3,oneof"`
+}
+
+type OfpOxmOfbField_IpProto struct {
+	IpProto uint32 `protobuf:"varint,13,opt,name=ip_proto,json=ipProto,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv4Src struct {
+	Ipv4Src uint32 `protobuf:"varint,14,opt,name=ipv4_src,json=ipv4Src,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv4Dst struct {
+	Ipv4Dst uint32 `protobuf:"varint,15,opt,name=ipv4_dst,json=ipv4Dst,proto3,oneof"`
+}
+
+type OfpOxmOfbField_TcpSrc struct {
+	TcpSrc uint32 `protobuf:"varint,16,opt,name=tcp_src,json=tcpSrc,proto3,oneof"`
+}
+
+type OfpOxmOfbField_TcpDst struct {
+	TcpDst uint32 `protobuf:"varint,17,opt,name=tcp_dst,json=tcpDst,proto3,oneof"`
+}
+
+type OfpOxmOfbField_UdpSrc struct {
+	UdpSrc uint32 `protobuf:"varint,18,opt,name=udp_src,json=udpSrc,proto3,oneof"`
+}
+
+type OfpOxmOfbField_UdpDst struct {
+	UdpDst uint32 `protobuf:"varint,19,opt,name=udp_dst,json=udpDst,proto3,oneof"`
+}
+
+type OfpOxmOfbField_SctpSrc struct {
+	SctpSrc uint32 `protobuf:"varint,20,opt,name=sctp_src,json=sctpSrc,proto3,oneof"`
+}
+
+type OfpOxmOfbField_SctpDst struct {
+	SctpDst uint32 `protobuf:"varint,21,opt,name=sctp_dst,json=sctpDst,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Icmpv4Type struct {
+	Icmpv4Type uint32 `protobuf:"varint,22,opt,name=icmpv4_type,json=icmpv4Type,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Icmpv4Code struct {
+	Icmpv4Code uint32 `protobuf:"varint,23,opt,name=icmpv4_code,json=icmpv4Code,proto3,oneof"`
+}
+
+type OfpOxmOfbField_ArpOp struct {
+	ArpOp uint32 `protobuf:"varint,24,opt,name=arp_op,json=arpOp,proto3,oneof"`
+}
+
+type OfpOxmOfbField_ArpSpa struct {
+	ArpSpa uint32 `protobuf:"varint,25,opt,name=arp_spa,json=arpSpa,proto3,oneof"`
+}
+
+type OfpOxmOfbField_ArpTpa struct {
+	ArpTpa uint32 `protobuf:"varint,26,opt,name=arp_tpa,json=arpTpa,proto3,oneof"`
+}
+
+type OfpOxmOfbField_ArpSha struct {
+	ArpSha []byte `protobuf:"bytes,27,opt,name=arp_sha,json=arpSha,proto3,oneof"`
+}
+
+type OfpOxmOfbField_ArpTha struct {
+	ArpTha []byte `protobuf:"bytes,28,opt,name=arp_tha,json=arpTha,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6Src struct {
+	Ipv6Src []byte `protobuf:"bytes,29,opt,name=ipv6_src,json=ipv6Src,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6Dst struct {
+	Ipv6Dst []byte `protobuf:"bytes,30,opt,name=ipv6_dst,json=ipv6Dst,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6Flabel struct {
+	Ipv6Flabel uint32 `protobuf:"varint,31,opt,name=ipv6_flabel,json=ipv6Flabel,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Icmpv6Type struct {
+	Icmpv6Type uint32 `protobuf:"varint,32,opt,name=icmpv6_type,json=icmpv6Type,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Icmpv6Code struct {
+	Icmpv6Code uint32 `protobuf:"varint,33,opt,name=icmpv6_code,json=icmpv6Code,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6NdTarget struct {
+	Ipv6NdTarget []byte `protobuf:"bytes,34,opt,name=ipv6_nd_target,json=ipv6NdTarget,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6NdSsl struct {
+	Ipv6NdSsl []byte `protobuf:"bytes,35,opt,name=ipv6_nd_ssl,json=ipv6NdSsl,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6NdTll struct {
+	Ipv6NdTll []byte `protobuf:"bytes,36,opt,name=ipv6_nd_tll,json=ipv6NdTll,proto3,oneof"`
+}
+
+type OfpOxmOfbField_MplsLabel struct {
+	MplsLabel uint32 `protobuf:"varint,37,opt,name=mpls_label,json=mplsLabel,proto3,oneof"`
+}
+
+type OfpOxmOfbField_MplsTc struct {
+	MplsTc uint32 `protobuf:"varint,38,opt,name=mpls_tc,json=mplsTc,proto3,oneof"`
+}
+
+type OfpOxmOfbField_MplsBos struct {
+	MplsBos uint32 `protobuf:"varint,39,opt,name=mpls_bos,json=mplsBos,proto3,oneof"`
+}
+
+type OfpOxmOfbField_PbbIsid struct {
+	PbbIsid uint32 `protobuf:"varint,40,opt,name=pbb_isid,json=pbbIsid,proto3,oneof"`
+}
+
+type OfpOxmOfbField_TunnelId struct {
+	TunnelId uint64 `protobuf:"varint,41,opt,name=tunnel_id,json=tunnelId,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6Exthdr struct {
+	Ipv6Exthdr uint32 `protobuf:"varint,42,opt,name=ipv6_exthdr,json=ipv6Exthdr,proto3,oneof"`
+}
+
+func (*OfpOxmOfbField_Port) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_PhysicalPort) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_TableMetadata) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_EthDst) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_EthSrc) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_EthType) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_VlanVid) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_VlanPcp) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_IpDscp) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_IpEcn) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_IpProto) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv4Src) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv4Dst) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_TcpSrc) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_TcpDst) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_UdpSrc) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_UdpDst) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_SctpSrc) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_SctpDst) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Icmpv4Type) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Icmpv4Code) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_ArpOp) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_ArpSpa) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_ArpTpa) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_ArpSha) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_ArpTha) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv6Src) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv6Dst) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv6Flabel) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Icmpv6Type) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Icmpv6Code) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv6NdTarget) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv6NdSsl) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv6NdTll) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_MplsLabel) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_MplsTc) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_MplsBos) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_PbbIsid) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_TunnelId) isOfpOxmOfbField_Value() {}
+
+func (*OfpOxmOfbField_Ipv6Exthdr) isOfpOxmOfbField_Value() {}
+
+func (m *OfpOxmOfbField) GetValue() isOfpOxmOfbField_Value {
+	if m != nil {
+		return m.Value
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetPort() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_Port); ok {
+		return x.Port
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetPhysicalPort() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_PhysicalPort); ok {
+		return x.PhysicalPort
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetTableMetadata() uint64 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_TableMetadata); ok {
+		return x.TableMetadata
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetEthDst() []byte {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_EthDst); ok {
+		return x.EthDst
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetEthSrc() []byte {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_EthSrc); ok {
+		return x.EthSrc
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetEthType() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_EthType); ok {
+		return x.EthType
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetVlanVid() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_VlanVid); ok {
+		return x.VlanVid
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetVlanPcp() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_VlanPcp); ok {
+		return x.VlanPcp
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIpDscp() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_IpDscp); ok {
+		return x.IpDscp
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIpEcn() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_IpEcn); ok {
+		return x.IpEcn
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIpProto() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_IpProto); ok {
+		return x.IpProto
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv4Src() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv4Src); ok {
+		return x.Ipv4Src
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv4Dst() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv4Dst); ok {
+		return x.Ipv4Dst
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetTcpSrc() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_TcpSrc); ok {
+		return x.TcpSrc
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetTcpDst() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_TcpDst); ok {
+		return x.TcpDst
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetUdpSrc() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_UdpSrc); ok {
+		return x.UdpSrc
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetUdpDst() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_UdpDst); ok {
+		return x.UdpDst
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetSctpSrc() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_SctpSrc); ok {
+		return x.SctpSrc
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetSctpDst() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_SctpDst); ok {
+		return x.SctpDst
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIcmpv4Type() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_Icmpv4Type); ok {
+		return x.Icmpv4Type
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIcmpv4Code() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_Icmpv4Code); ok {
+		return x.Icmpv4Code
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetArpOp() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_ArpOp); ok {
+		return x.ArpOp
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetArpSpa() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_ArpSpa); ok {
+		return x.ArpSpa
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetArpTpa() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_ArpTpa); ok {
+		return x.ArpTpa
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetArpSha() []byte {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_ArpSha); ok {
+		return x.ArpSha
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetArpTha() []byte {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_ArpTha); ok {
+		return x.ArpTha
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetIpv6Src() []byte {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv6Src); ok {
+		return x.Ipv6Src
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetIpv6Dst() []byte {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv6Dst); ok {
+		return x.Ipv6Dst
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetIpv6Flabel() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv6Flabel); ok {
+		return x.Ipv6Flabel
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIcmpv6Type() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_Icmpv6Type); ok {
+		return x.Icmpv6Type
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIcmpv6Code() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_Icmpv6Code); ok {
+		return x.Icmpv6Code
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv6NdTarget() []byte {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv6NdTarget); ok {
+		return x.Ipv6NdTarget
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetIpv6NdSsl() []byte {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv6NdSsl); ok {
+		return x.Ipv6NdSsl
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetIpv6NdTll() []byte {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv6NdTll); ok {
+		return x.Ipv6NdTll
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetMplsLabel() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_MplsLabel); ok {
+		return x.MplsLabel
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetMplsTc() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_MplsTc); ok {
+		return x.MplsTc
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetMplsBos() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_MplsBos); ok {
+		return x.MplsBos
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetPbbIsid() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_PbbIsid); ok {
+		return x.PbbIsid
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetTunnelId() uint64 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_TunnelId); ok {
+		return x.TunnelId
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv6Exthdr() uint32 {
+	if x, ok := m.GetValue().(*OfpOxmOfbField_Ipv6Exthdr); ok {
+		return x.Ipv6Exthdr
+	}
+	return 0
+}
+
+type isOfpOxmOfbField_Mask interface {
+	isOfpOxmOfbField_Mask()
+}
+
+type OfpOxmOfbField_TableMetadataMask struct {
+	TableMetadataMask uint64 `protobuf:"varint,105,opt,name=table_metadata_mask,json=tableMetadataMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_EthDstMask struct {
+	EthDstMask []byte `protobuf:"bytes,106,opt,name=eth_dst_mask,json=ethDstMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_EthSrcMask struct {
+	EthSrcMask []byte `protobuf:"bytes,107,opt,name=eth_src_mask,json=ethSrcMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_VlanVidMask struct {
+	VlanVidMask uint32 `protobuf:"varint,109,opt,name=vlan_vid_mask,json=vlanVidMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv4SrcMask struct {
+	Ipv4SrcMask uint32 `protobuf:"varint,114,opt,name=ipv4_src_mask,json=ipv4SrcMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv4DstMask struct {
+	Ipv4DstMask uint32 `protobuf:"varint,115,opt,name=ipv4_dst_mask,json=ipv4DstMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_ArpSpaMask struct {
+	ArpSpaMask uint32 `protobuf:"varint,125,opt,name=arp_spa_mask,json=arpSpaMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_ArpTpaMask struct {
+	ArpTpaMask uint32 `protobuf:"varint,126,opt,name=arp_tpa_mask,json=arpTpaMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6SrcMask struct {
+	Ipv6SrcMask []byte `protobuf:"bytes,129,opt,name=ipv6_src_mask,json=ipv6SrcMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6DstMask struct {
+	Ipv6DstMask []byte `protobuf:"bytes,130,opt,name=ipv6_dst_mask,json=ipv6DstMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6FlabelMask struct {
+	Ipv6FlabelMask uint32 `protobuf:"varint,131,opt,name=ipv6_flabel_mask,json=ipv6FlabelMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_PbbIsidMask struct {
+	PbbIsidMask uint32 `protobuf:"varint,140,opt,name=pbb_isid_mask,json=pbbIsidMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_TunnelIdMask struct {
+	TunnelIdMask uint64 `protobuf:"varint,141,opt,name=tunnel_id_mask,json=tunnelIdMask,proto3,oneof"`
+}
+
+type OfpOxmOfbField_Ipv6ExthdrMask struct {
+	Ipv6ExthdrMask uint32 `protobuf:"varint,142,opt,name=ipv6_exthdr_mask,json=ipv6ExthdrMask,proto3,oneof"`
+}
+
+func (*OfpOxmOfbField_TableMetadataMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_EthDstMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_EthSrcMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_VlanVidMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_Ipv4SrcMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_Ipv4DstMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_ArpSpaMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_ArpTpaMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_Ipv6SrcMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_Ipv6DstMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_Ipv6FlabelMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_PbbIsidMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_TunnelIdMask) isOfpOxmOfbField_Mask() {}
+
+func (*OfpOxmOfbField_Ipv6ExthdrMask) isOfpOxmOfbField_Mask() {}
+
+func (m *OfpOxmOfbField) GetMask() isOfpOxmOfbField_Mask {
+	if m != nil {
+		return m.Mask
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetTableMetadataMask() uint64 {
+	if x, ok := m.GetMask().(*OfpOxmOfbField_TableMetadataMask); ok {
+		return x.TableMetadataMask
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetEthDstMask() []byte {
+	if x, ok := m.GetMask().(*OfpOxmOfbField_EthDstMask); ok {
+		return x.EthDstMask
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetEthSrcMask() []byte {
+	if x, ok := m.GetMask().(*OfpOxmOfbField_EthSrcMask); ok {
+		return x.EthSrcMask
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetVlanVidMask() uint32 {
+	if x, ok := m.GetMask().(*OfpOxmOfbField_VlanVidMask); ok {
+		return x.VlanVidMask
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv4SrcMask() uint32 {
+	if x, ok := m.GetMask().(*OfpOxmOfbField_Ipv4SrcMask); ok {
+		return x.Ipv4SrcMask
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv4DstMask() uint32 {
+	if x, ok := m.GetMask().(*OfpOxmOfbField_Ipv4DstMask); ok {
+		return x.Ipv4DstMask
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetArpSpaMask() uint32 {
+	if x, ok := m.GetMask().(*OfpOxmOfbField_ArpSpaMask); ok {
+		return x.ArpSpaMask
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetArpTpaMask() uint32 {
+	if x, ok := m.GetMask().(*OfpOxmOfbField_ArpTpaMask); ok {
+		return x.ArpTpaMask
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv6SrcMask() []byte {
+	if x, ok := m.GetMask().(*OfpOxmOfbField_Ipv6SrcMask); ok {
+		return x.Ipv6SrcMask
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetIpv6DstMask() []byte {
+	if x, ok := m.GetMask().(*OfpOxmOfbField_Ipv6DstMask); ok {
+		return x.Ipv6DstMask
+	}
+	return nil
+}
+
+func (m *OfpOxmOfbField) GetIpv6FlabelMask() uint32 {
+	if x, ok := m.GetMask().(*OfpOxmOfbField_Ipv6FlabelMask); ok {
+		return x.Ipv6FlabelMask
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetPbbIsidMask() uint32 {
+	if x, ok := m.GetMask().(*OfpOxmOfbField_PbbIsidMask); ok {
+		return x.PbbIsidMask
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetTunnelIdMask() uint64 {
+	if x, ok := m.GetMask().(*OfpOxmOfbField_TunnelIdMask); ok {
+		return x.TunnelIdMask
+	}
+	return 0
+}
+
+func (m *OfpOxmOfbField) GetIpv6ExthdrMask() uint32 {
+	if x, ok := m.GetMask().(*OfpOxmOfbField_Ipv6ExthdrMask); ok {
+		return x.Ipv6ExthdrMask
+	}
+	return 0
+}
+
+// XXX_OneofFuncs is for the internal use of the proto package.
+func (*OfpOxmOfbField) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
+	return _OfpOxmOfbField_OneofMarshaler, _OfpOxmOfbField_OneofUnmarshaler, _OfpOxmOfbField_OneofSizer, []interface{}{
+		(*OfpOxmOfbField_Port)(nil),
+		(*OfpOxmOfbField_PhysicalPort)(nil),
+		(*OfpOxmOfbField_TableMetadata)(nil),
+		(*OfpOxmOfbField_EthDst)(nil),
+		(*OfpOxmOfbField_EthSrc)(nil),
+		(*OfpOxmOfbField_EthType)(nil),
+		(*OfpOxmOfbField_VlanVid)(nil),
+		(*OfpOxmOfbField_VlanPcp)(nil),
+		(*OfpOxmOfbField_IpDscp)(nil),
+		(*OfpOxmOfbField_IpEcn)(nil),
+		(*OfpOxmOfbField_IpProto)(nil),
+		(*OfpOxmOfbField_Ipv4Src)(nil),
+		(*OfpOxmOfbField_Ipv4Dst)(nil),
+		(*OfpOxmOfbField_TcpSrc)(nil),
+		(*OfpOxmOfbField_TcpDst)(nil),
+		(*OfpOxmOfbField_UdpSrc)(nil),
+		(*OfpOxmOfbField_UdpDst)(nil),
+		(*OfpOxmOfbField_SctpSrc)(nil),
+		(*OfpOxmOfbField_SctpDst)(nil),
+		(*OfpOxmOfbField_Icmpv4Type)(nil),
+		(*OfpOxmOfbField_Icmpv4Code)(nil),
+		(*OfpOxmOfbField_ArpOp)(nil),
+		(*OfpOxmOfbField_ArpSpa)(nil),
+		(*OfpOxmOfbField_ArpTpa)(nil),
+		(*OfpOxmOfbField_ArpSha)(nil),
+		(*OfpOxmOfbField_ArpTha)(nil),
+		(*OfpOxmOfbField_Ipv6Src)(nil),
+		(*OfpOxmOfbField_Ipv6Dst)(nil),
+		(*OfpOxmOfbField_Ipv6Flabel)(nil),
+		(*OfpOxmOfbField_Icmpv6Type)(nil),
+		(*OfpOxmOfbField_Icmpv6Code)(nil),
+		(*OfpOxmOfbField_Ipv6NdTarget)(nil),
+		(*OfpOxmOfbField_Ipv6NdSsl)(nil),
+		(*OfpOxmOfbField_Ipv6NdTll)(nil),
+		(*OfpOxmOfbField_MplsLabel)(nil),
+		(*OfpOxmOfbField_MplsTc)(nil),
+		(*OfpOxmOfbField_MplsBos)(nil),
+		(*OfpOxmOfbField_PbbIsid)(nil),
+		(*OfpOxmOfbField_TunnelId)(nil),
+		(*OfpOxmOfbField_Ipv6Exthdr)(nil),
+		(*OfpOxmOfbField_TableMetadataMask)(nil),
+		(*OfpOxmOfbField_EthDstMask)(nil),
+		(*OfpOxmOfbField_EthSrcMask)(nil),
+		(*OfpOxmOfbField_VlanVidMask)(nil),
+		(*OfpOxmOfbField_Ipv4SrcMask)(nil),
+		(*OfpOxmOfbField_Ipv4DstMask)(nil),
+		(*OfpOxmOfbField_ArpSpaMask)(nil),
+		(*OfpOxmOfbField_ArpTpaMask)(nil),
+		(*OfpOxmOfbField_Ipv6SrcMask)(nil),
+		(*OfpOxmOfbField_Ipv6DstMask)(nil),
+		(*OfpOxmOfbField_Ipv6FlabelMask)(nil),
+		(*OfpOxmOfbField_PbbIsidMask)(nil),
+		(*OfpOxmOfbField_TunnelIdMask)(nil),
+		(*OfpOxmOfbField_Ipv6ExthdrMask)(nil),
+	}
+}
+
+func _OfpOxmOfbField_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
+	m := msg.(*OfpOxmOfbField)
+	// value
+	switch x := m.Value.(type) {
+	case *OfpOxmOfbField_Port:
+		b.EncodeVarint(3<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.Port))
+	case *OfpOxmOfbField_PhysicalPort:
+		b.EncodeVarint(4<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.PhysicalPort))
+	case *OfpOxmOfbField_TableMetadata:
+		b.EncodeVarint(5<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.TableMetadata))
+	case *OfpOxmOfbField_EthDst:
+		b.EncodeVarint(6<<3 | proto.WireBytes)
+		b.EncodeRawBytes(x.EthDst)
+	case *OfpOxmOfbField_EthSrc:
+		b.EncodeVarint(7<<3 | proto.WireBytes)
+		b.EncodeRawBytes(x.EthSrc)
+	case *OfpOxmOfbField_EthType:
+		b.EncodeVarint(8<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.EthType))
+	case *OfpOxmOfbField_VlanVid:
+		b.EncodeVarint(9<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.VlanVid))
+	case *OfpOxmOfbField_VlanPcp:
+		b.EncodeVarint(10<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.VlanPcp))
+	case *OfpOxmOfbField_IpDscp:
+		b.EncodeVarint(11<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.IpDscp))
+	case *OfpOxmOfbField_IpEcn:
+		b.EncodeVarint(12<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.IpEcn))
+	case *OfpOxmOfbField_IpProto:
+		b.EncodeVarint(13<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.IpProto))
+	case *OfpOxmOfbField_Ipv4Src:
+		b.EncodeVarint(14<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.Ipv4Src))
+	case *OfpOxmOfbField_Ipv4Dst:
+		b.EncodeVarint(15<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.Ipv4Dst))
+	case *OfpOxmOfbField_TcpSrc:
+		b.EncodeVarint(16<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.TcpSrc))
+	case *OfpOxmOfbField_TcpDst:
+		b.EncodeVarint(17<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.TcpDst))
+	case *OfpOxmOfbField_UdpSrc:
+		b.EncodeVarint(18<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.UdpSrc))
+	case *OfpOxmOfbField_UdpDst:
+		b.EncodeVarint(19<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.UdpDst))
+	case *OfpOxmOfbField_SctpSrc:
+		b.EncodeVarint(20<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.SctpSrc))
+	case *OfpOxmOfbField_SctpDst:
+		b.EncodeVarint(21<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.SctpDst))
+	case *OfpOxmOfbField_Icmpv4Type:
+		b.EncodeVarint(22<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.Icmpv4Type))
+	case *OfpOxmOfbField_Icmpv4Code:
+		b.EncodeVarint(23<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.Icmpv4Code))
+	case *OfpOxmOfbField_ArpOp:
+		b.EncodeVarint(24<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.ArpOp))
+	case *OfpOxmOfbField_ArpSpa:
+		b.EncodeVarint(25<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.ArpSpa))
+	case *OfpOxmOfbField_ArpTpa:
+		b.EncodeVarint(26<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.ArpTpa))
+	case *OfpOxmOfbField_ArpSha:
+		b.EncodeVarint(27<<3 | proto.WireBytes)
+		b.EncodeRawBytes(x.ArpSha)
+	case *OfpOxmOfbField_ArpTha:
+		b.EncodeVarint(28<<3 | proto.WireBytes)
+		b.EncodeRawBytes(x.ArpTha)
+	case *OfpOxmOfbField_Ipv6Src:
+		b.EncodeVarint(29<<3 | proto.WireBytes)
+		b.EncodeRawBytes(x.Ipv6Src)
+	case *OfpOxmOfbField_Ipv6Dst:
+		b.EncodeVarint(30<<3 | proto.WireBytes)
+		b.EncodeRawBytes(x.Ipv6Dst)
+	case *OfpOxmOfbField_Ipv6Flabel:
+		b.EncodeVarint(31<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.Ipv6Flabel))
+	case *OfpOxmOfbField_Icmpv6Type:
+		b.EncodeVarint(32<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.Icmpv6Type))
+	case *OfpOxmOfbField_Icmpv6Code:
+		b.EncodeVarint(33<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.Icmpv6Code))
+	case *OfpOxmOfbField_Ipv6NdTarget:
+		b.EncodeVarint(34<<3 | proto.WireBytes)
+		b.EncodeRawBytes(x.Ipv6NdTarget)
+	case *OfpOxmOfbField_Ipv6NdSsl:
+		b.EncodeVarint(35<<3 | proto.WireBytes)
+		b.EncodeRawBytes(x.Ipv6NdSsl)
+	case *OfpOxmOfbField_Ipv6NdTll:
+		b.EncodeVarint(36<<3 | proto.WireBytes)
+		b.EncodeRawBytes(x.Ipv6NdTll)
+	case *OfpOxmOfbField_MplsLabel:
+		b.EncodeVarint(37<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.MplsLabel))
+	case *OfpOxmOfbField_MplsTc:
+		b.EncodeVarint(38<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.MplsTc))
+	case *OfpOxmOfbField_MplsBos:
+		b.EncodeVarint(39<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.MplsBos))
+	case *OfpOxmOfbField_PbbIsid:
+		b.EncodeVarint(40<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.PbbIsid))
+	case *OfpOxmOfbField_TunnelId:
+		b.EncodeVarint(41<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.TunnelId))
+	case *OfpOxmOfbField_Ipv6Exthdr:
+		b.EncodeVarint(42<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.Ipv6Exthdr))
+	case nil:
+	default:
+		return fmt.Errorf("OfpOxmOfbField.Value has unexpected type %T", x)
+	}
+	// mask
+	switch x := m.Mask.(type) {
+	case *OfpOxmOfbField_TableMetadataMask:
+		b.EncodeVarint(105<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.TableMetadataMask))
+	case *OfpOxmOfbField_EthDstMask:
+		b.EncodeVarint(106<<3 | proto.WireBytes)
+		b.EncodeRawBytes(x.EthDstMask)
+	case *OfpOxmOfbField_EthSrcMask:
+		b.EncodeVarint(107<<3 | proto.WireBytes)
+		b.EncodeRawBytes(x.EthSrcMask)
+	case *OfpOxmOfbField_VlanVidMask:
+		b.EncodeVarint(109<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.VlanVidMask))
+	case *OfpOxmOfbField_Ipv4SrcMask:
+		b.EncodeVarint(114<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.Ipv4SrcMask))
+	case *OfpOxmOfbField_Ipv4DstMask:
+		b.EncodeVarint(115<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.Ipv4DstMask))
+	case *OfpOxmOfbField_ArpSpaMask:
+		b.EncodeVarint(125<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.ArpSpaMask))
+	case *OfpOxmOfbField_ArpTpaMask:
+		b.EncodeVarint(126<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.ArpTpaMask))
+	case *OfpOxmOfbField_Ipv6SrcMask:
+		b.EncodeVarint(129<<3 | proto.WireBytes)
+		b.EncodeRawBytes(x.Ipv6SrcMask)
+	case *OfpOxmOfbField_Ipv6DstMask:
+		b.EncodeVarint(130<<3 | proto.WireBytes)
+		b.EncodeRawBytes(x.Ipv6DstMask)
+	case *OfpOxmOfbField_Ipv6FlabelMask:
+		b.EncodeVarint(131<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.Ipv6FlabelMask))
+	case *OfpOxmOfbField_PbbIsidMask:
+		b.EncodeVarint(140<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.PbbIsidMask))
+	case *OfpOxmOfbField_TunnelIdMask:
+		b.EncodeVarint(141<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.TunnelIdMask))
+	case *OfpOxmOfbField_Ipv6ExthdrMask:
+		b.EncodeVarint(142<<3 | proto.WireVarint)
+		b.EncodeVarint(uint64(x.Ipv6ExthdrMask))
+	case nil:
+	default:
+		return fmt.Errorf("OfpOxmOfbField.Mask has unexpected type %T", x)
+	}
+	return nil
+}
+
+func _OfpOxmOfbField_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
+	m := msg.(*OfpOxmOfbField)
+	switch tag {
+	case 3: // value.port
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_Port{uint32(x)}
+		return true, err
+	case 4: // value.physical_port
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_PhysicalPort{uint32(x)}
+		return true, err
+	case 5: // value.table_metadata
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_TableMetadata{x}
+		return true, err
+	case 6: // value.eth_dst
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeRawBytes(true)
+		m.Value = &OfpOxmOfbField_EthDst{x}
+		return true, err
+	case 7: // value.eth_src
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeRawBytes(true)
+		m.Value = &OfpOxmOfbField_EthSrc{x}
+		return true, err
+	case 8: // value.eth_type
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_EthType{uint32(x)}
+		return true, err
+	case 9: // value.vlan_vid
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_VlanVid{uint32(x)}
+		return true, err
+	case 10: // value.vlan_pcp
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_VlanPcp{uint32(x)}
+		return true, err
+	case 11: // value.ip_dscp
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_IpDscp{uint32(x)}
+		return true, err
+	case 12: // value.ip_ecn
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_IpEcn{uint32(x)}
+		return true, err
+	case 13: // value.ip_proto
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_IpProto{uint32(x)}
+		return true, err
+	case 14: // value.ipv4_src
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_Ipv4Src{uint32(x)}
+		return true, err
+	case 15: // value.ipv4_dst
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_Ipv4Dst{uint32(x)}
+		return true, err
+	case 16: // value.tcp_src
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_TcpSrc{uint32(x)}
+		return true, err
+	case 17: // value.tcp_dst
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_TcpDst{uint32(x)}
+		return true, err
+	case 18: // value.udp_src
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_UdpSrc{uint32(x)}
+		return true, err
+	case 19: // value.udp_dst
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_UdpDst{uint32(x)}
+		return true, err
+	case 20: // value.sctp_src
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_SctpSrc{uint32(x)}
+		return true, err
+	case 21: // value.sctp_dst
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_SctpDst{uint32(x)}
+		return true, err
+	case 22: // value.icmpv4_type
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_Icmpv4Type{uint32(x)}
+		return true, err
+	case 23: // value.icmpv4_code
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_Icmpv4Code{uint32(x)}
+		return true, err
+	case 24: // value.arp_op
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_ArpOp{uint32(x)}
+		return true, err
+	case 25: // value.arp_spa
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_ArpSpa{uint32(x)}
+		return true, err
+	case 26: // value.arp_tpa
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_ArpTpa{uint32(x)}
+		return true, err
+	case 27: // value.arp_sha
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeRawBytes(true)
+		m.Value = &OfpOxmOfbField_ArpSha{x}
+		return true, err
+	case 28: // value.arp_tha
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeRawBytes(true)
+		m.Value = &OfpOxmOfbField_ArpTha{x}
+		return true, err
+	case 29: // value.ipv6_src
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeRawBytes(true)
+		m.Value = &OfpOxmOfbField_Ipv6Src{x}
+		return true, err
+	case 30: // value.ipv6_dst
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeRawBytes(true)
+		m.Value = &OfpOxmOfbField_Ipv6Dst{x}
+		return true, err
+	case 31: // value.ipv6_flabel
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_Ipv6Flabel{uint32(x)}
+		return true, err
+	case 32: // value.icmpv6_type
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_Icmpv6Type{uint32(x)}
+		return true, err
+	case 33: // value.icmpv6_code
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_Icmpv6Code{uint32(x)}
+		return true, err
+	case 34: // value.ipv6_nd_target
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeRawBytes(true)
+		m.Value = &OfpOxmOfbField_Ipv6NdTarget{x}
+		return true, err
+	case 35: // value.ipv6_nd_ssl
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeRawBytes(true)
+		m.Value = &OfpOxmOfbField_Ipv6NdSsl{x}
+		return true, err
+	case 36: // value.ipv6_nd_tll
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeRawBytes(true)
+		m.Value = &OfpOxmOfbField_Ipv6NdTll{x}
+		return true, err
+	case 37: // value.mpls_label
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_MplsLabel{uint32(x)}
+		return true, err
+	case 38: // value.mpls_tc
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_MplsTc{uint32(x)}
+		return true, err
+	case 39: // value.mpls_bos
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_MplsBos{uint32(x)}
+		return true, err
+	case 40: // value.pbb_isid
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_PbbIsid{uint32(x)}
+		return true, err
+	case 41: // value.tunnel_id
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_TunnelId{x}
+		return true, err
+	case 42: // value.ipv6_exthdr
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Value = &OfpOxmOfbField_Ipv6Exthdr{uint32(x)}
+		return true, err
+	case 105: // mask.table_metadata_mask
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Mask = &OfpOxmOfbField_TableMetadataMask{x}
+		return true, err
+	case 106: // mask.eth_dst_mask
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeRawBytes(true)
+		m.Mask = &OfpOxmOfbField_EthDstMask{x}
+		return true, err
+	case 107: // mask.eth_src_mask
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeRawBytes(true)
+		m.Mask = &OfpOxmOfbField_EthSrcMask{x}
+		return true, err
+	case 109: // mask.vlan_vid_mask
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Mask = &OfpOxmOfbField_VlanVidMask{uint32(x)}
+		return true, err
+	case 114: // mask.ipv4_src_mask
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Mask = &OfpOxmOfbField_Ipv4SrcMask{uint32(x)}
+		return true, err
+	case 115: // mask.ipv4_dst_mask
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Mask = &OfpOxmOfbField_Ipv4DstMask{uint32(x)}
+		return true, err
+	case 125: // mask.arp_spa_mask
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Mask = &OfpOxmOfbField_ArpSpaMask{uint32(x)}
+		return true, err
+	case 126: // mask.arp_tpa_mask
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Mask = &OfpOxmOfbField_ArpTpaMask{uint32(x)}
+		return true, err
+	case 129: // mask.ipv6_src_mask
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeRawBytes(true)
+		m.Mask = &OfpOxmOfbField_Ipv6SrcMask{x}
+		return true, err
+	case 130: // mask.ipv6_dst_mask
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeRawBytes(true)
+		m.Mask = &OfpOxmOfbField_Ipv6DstMask{x}
+		return true, err
+	case 131: // mask.ipv6_flabel_mask
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Mask = &OfpOxmOfbField_Ipv6FlabelMask{uint32(x)}
+		return true, err
+	case 140: // mask.pbb_isid_mask
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Mask = &OfpOxmOfbField_PbbIsidMask{uint32(x)}
+		return true, err
+	case 141: // mask.tunnel_id_mask
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Mask = &OfpOxmOfbField_TunnelIdMask{x}
+		return true, err
+	case 142: // mask.ipv6_exthdr_mask
+		if wire != proto.WireVarint {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeVarint()
+		m.Mask = &OfpOxmOfbField_Ipv6ExthdrMask{uint32(x)}
+		return true, err
+	default:
+		return false, nil
+	}
+}
+
+func _OfpOxmOfbField_OneofSizer(msg proto.Message) (n int) {
+	m := msg.(*OfpOxmOfbField)
+	// value
+	switch x := m.Value.(type) {
+	case *OfpOxmOfbField_Port:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(x.Port))
+	case *OfpOxmOfbField_PhysicalPort:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(x.PhysicalPort))
+	case *OfpOxmOfbField_TableMetadata:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(x.TableMetadata))
+	case *OfpOxmOfbField_EthDst:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.EthDst)))
+		n += len(x.EthDst)
+	case *OfpOxmOfbField_EthSrc:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.EthSrc)))
+		n += len(x.EthSrc)
+	case *OfpOxmOfbField_EthType:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(x.EthType))
+	case *OfpOxmOfbField_VlanVid:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(x.VlanVid))
+	case *OfpOxmOfbField_VlanPcp:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(x.VlanPcp))
+	case *OfpOxmOfbField_IpDscp:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(x.IpDscp))
+	case *OfpOxmOfbField_IpEcn:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(x.IpEcn))
+	case *OfpOxmOfbField_IpProto:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(x.IpProto))
+	case *OfpOxmOfbField_Ipv4Src:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(x.Ipv4Src))
+	case *OfpOxmOfbField_Ipv4Dst:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(x.Ipv4Dst))
+	case *OfpOxmOfbField_TcpSrc:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.TcpSrc))
+	case *OfpOxmOfbField_TcpDst:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.TcpDst))
+	case *OfpOxmOfbField_UdpSrc:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.UdpSrc))
+	case *OfpOxmOfbField_UdpDst:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.UdpDst))
+	case *OfpOxmOfbField_SctpSrc:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.SctpSrc))
+	case *OfpOxmOfbField_SctpDst:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.SctpDst))
+	case *OfpOxmOfbField_Icmpv4Type:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.Icmpv4Type))
+	case *OfpOxmOfbField_Icmpv4Code:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.Icmpv4Code))
+	case *OfpOxmOfbField_ArpOp:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.ArpOp))
+	case *OfpOxmOfbField_ArpSpa:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.ArpSpa))
+	case *OfpOxmOfbField_ArpTpa:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.ArpTpa))
+	case *OfpOxmOfbField_ArpSha:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.ArpSha)))
+		n += len(x.ArpSha)
+	case *OfpOxmOfbField_ArpTha:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.ArpTha)))
+		n += len(x.ArpTha)
+	case *OfpOxmOfbField_Ipv6Src:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.Ipv6Src)))
+		n += len(x.Ipv6Src)
+	case *OfpOxmOfbField_Ipv6Dst:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.Ipv6Dst)))
+		n += len(x.Ipv6Dst)
+	case *OfpOxmOfbField_Ipv6Flabel:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.Ipv6Flabel))
+	case *OfpOxmOfbField_Icmpv6Type:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.Icmpv6Type))
+	case *OfpOxmOfbField_Icmpv6Code:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.Icmpv6Code))
+	case *OfpOxmOfbField_Ipv6NdTarget:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.Ipv6NdTarget)))
+		n += len(x.Ipv6NdTarget)
+	case *OfpOxmOfbField_Ipv6NdSsl:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.Ipv6NdSsl)))
+		n += len(x.Ipv6NdSsl)
+	case *OfpOxmOfbField_Ipv6NdTll:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.Ipv6NdTll)))
+		n += len(x.Ipv6NdTll)
+	case *OfpOxmOfbField_MplsLabel:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.MplsLabel))
+	case *OfpOxmOfbField_MplsTc:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.MplsTc))
+	case *OfpOxmOfbField_MplsBos:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.MplsBos))
+	case *OfpOxmOfbField_PbbIsid:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.PbbIsid))
+	case *OfpOxmOfbField_TunnelId:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.TunnelId))
+	case *OfpOxmOfbField_Ipv6Exthdr:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.Ipv6Exthdr))
+	case nil:
+	default:
+		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
+	}
+	// mask
+	switch x := m.Mask.(type) {
+	case *OfpOxmOfbField_TableMetadataMask:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.TableMetadataMask))
+	case *OfpOxmOfbField_EthDstMask:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.EthDstMask)))
+		n += len(x.EthDstMask)
+	case *OfpOxmOfbField_EthSrcMask:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.EthSrcMask)))
+		n += len(x.EthSrcMask)
+	case *OfpOxmOfbField_VlanVidMask:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.VlanVidMask))
+	case *OfpOxmOfbField_Ipv4SrcMask:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.Ipv4SrcMask))
+	case *OfpOxmOfbField_Ipv4DstMask:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.Ipv4DstMask))
+	case *OfpOxmOfbField_ArpSpaMask:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.ArpSpaMask))
+	case *OfpOxmOfbField_ArpTpaMask:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.ArpTpaMask))
+	case *OfpOxmOfbField_Ipv6SrcMask:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.Ipv6SrcMask)))
+		n += len(x.Ipv6SrcMask)
+	case *OfpOxmOfbField_Ipv6DstMask:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.Ipv6DstMask)))
+		n += len(x.Ipv6DstMask)
+	case *OfpOxmOfbField_Ipv6FlabelMask:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.Ipv6FlabelMask))
+	case *OfpOxmOfbField_PbbIsidMask:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.PbbIsidMask))
+	case *OfpOxmOfbField_TunnelIdMask:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.TunnelIdMask))
+	case *OfpOxmOfbField_Ipv6ExthdrMask:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(x.Ipv6ExthdrMask))
+	case nil:
+	default:
+		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
+	}
+	return n
+}
+
+// Header for OXM experimenter match fields.
+// The experimenter class should not use OXM_HEADER() macros for defining
+// fields due to this extra header.
+type OfpOxmExperimenterField struct {
+	OxmHeader            uint32   `protobuf:"varint,1,opt,name=oxm_header,json=oxmHeader,proto3" json:"oxm_header,omitempty"`
+	Experimenter         uint32   `protobuf:"varint,2,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpOxmExperimenterField) Reset()         { *m = OfpOxmExperimenterField{} }
+func (m *OfpOxmExperimenterField) String() string { return proto.CompactTextString(m) }
+func (*OfpOxmExperimenterField) ProtoMessage()    {}
+func (*OfpOxmExperimenterField) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{13}
+}
+func (m *OfpOxmExperimenterField) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpOxmExperimenterField.Unmarshal(m, b)
+}
+func (m *OfpOxmExperimenterField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpOxmExperimenterField.Marshal(b, m, deterministic)
+}
+func (dst *OfpOxmExperimenterField) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpOxmExperimenterField.Merge(dst, src)
+}
+func (m *OfpOxmExperimenterField) XXX_Size() int {
+	return xxx_messageInfo_OfpOxmExperimenterField.Size(m)
+}
+func (m *OfpOxmExperimenterField) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpOxmExperimenterField.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpOxmExperimenterField proto.InternalMessageInfo
+
+func (m *OfpOxmExperimenterField) GetOxmHeader() uint32 {
+	if m != nil {
+		return m.OxmHeader
+	}
+	return 0
+}
+
+func (m *OfpOxmExperimenterField) GetExperimenter() uint32 {
+	if m != nil {
+		return m.Experimenter
+	}
+	return 0
+}
+
+// Action header that is common to all actions.  The length includes the
+// header and any padding used to make the action 64-bit aligned.
+// NB: The length of an action *must* always be a multiple of eight.
+type OfpAction struct {
+	Type OfpActionType `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpActionType" json:"type,omitempty"`
+	// Types that are valid to be assigned to Action:
+	//	*OfpAction_Output
+	//	*OfpAction_MplsTtl
+	//	*OfpAction_Push
+	//	*OfpAction_PopMpls
+	//	*OfpAction_Group
+	//	*OfpAction_NwTtl
+	//	*OfpAction_SetField
+	//	*OfpAction_Experimenter
+	Action               isOfpAction_Action `protobuf_oneof:"action"`
+	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
+	XXX_unrecognized     []byte             `json:"-"`
+	XXX_sizecache        int32              `json:"-"`
+}
+
+func (m *OfpAction) Reset()         { *m = OfpAction{} }
+func (m *OfpAction) String() string { return proto.CompactTextString(m) }
+func (*OfpAction) ProtoMessage()    {}
+func (*OfpAction) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{14}
+}
+func (m *OfpAction) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpAction.Unmarshal(m, b)
+}
+func (m *OfpAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpAction.Marshal(b, m, deterministic)
+}
+func (dst *OfpAction) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpAction.Merge(dst, src)
+}
+func (m *OfpAction) XXX_Size() int {
+	return xxx_messageInfo_OfpAction.Size(m)
+}
+func (m *OfpAction) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpAction.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpAction proto.InternalMessageInfo
+
+func (m *OfpAction) GetType() OfpActionType {
+	if m != nil {
+		return m.Type
+	}
+	return OfpActionType_OFPAT_OUTPUT
+}
+
+type isOfpAction_Action interface {
+	isOfpAction_Action()
+}
+
+type OfpAction_Output struct {
+	Output *OfpActionOutput `protobuf:"bytes,2,opt,name=output,proto3,oneof"`
+}
+
+type OfpAction_MplsTtl struct {
+	MplsTtl *OfpActionMplsTtl `protobuf:"bytes,3,opt,name=mpls_ttl,json=mplsTtl,proto3,oneof"`
+}
+
+type OfpAction_Push struct {
+	Push *OfpActionPush `protobuf:"bytes,4,opt,name=push,proto3,oneof"`
+}
+
+type OfpAction_PopMpls struct {
+	PopMpls *OfpActionPopMpls `protobuf:"bytes,5,opt,name=pop_mpls,json=popMpls,proto3,oneof"`
+}
+
+type OfpAction_Group struct {
+	Group *OfpActionGroup `protobuf:"bytes,6,opt,name=group,proto3,oneof"`
+}
+
+type OfpAction_NwTtl struct {
+	NwTtl *OfpActionNwTtl `protobuf:"bytes,7,opt,name=nw_ttl,json=nwTtl,proto3,oneof"`
+}
+
+type OfpAction_SetField struct {
+	SetField *OfpActionSetField `protobuf:"bytes,8,opt,name=set_field,json=setField,proto3,oneof"`
+}
+
+type OfpAction_Experimenter struct {
+	Experimenter *OfpActionExperimenter `protobuf:"bytes,9,opt,name=experimenter,proto3,oneof"`
+}
+
+func (*OfpAction_Output) isOfpAction_Action() {}
+
+func (*OfpAction_MplsTtl) isOfpAction_Action() {}
+
+func (*OfpAction_Push) isOfpAction_Action() {}
+
+func (*OfpAction_PopMpls) isOfpAction_Action() {}
+
+func (*OfpAction_Group) isOfpAction_Action() {}
+
+func (*OfpAction_NwTtl) isOfpAction_Action() {}
+
+func (*OfpAction_SetField) isOfpAction_Action() {}
+
+func (*OfpAction_Experimenter) isOfpAction_Action() {}
+
+func (m *OfpAction) GetAction() isOfpAction_Action {
+	if m != nil {
+		return m.Action
+	}
+	return nil
+}
+
+func (m *OfpAction) GetOutput() *OfpActionOutput {
+	if x, ok := m.GetAction().(*OfpAction_Output); ok {
+		return x.Output
+	}
+	return nil
+}
+
+func (m *OfpAction) GetMplsTtl() *OfpActionMplsTtl {
+	if x, ok := m.GetAction().(*OfpAction_MplsTtl); ok {
+		return x.MplsTtl
+	}
+	return nil
+}
+
+func (m *OfpAction) GetPush() *OfpActionPush {
+	if x, ok := m.GetAction().(*OfpAction_Push); ok {
+		return x.Push
+	}
+	return nil
+}
+
+func (m *OfpAction) GetPopMpls() *OfpActionPopMpls {
+	if x, ok := m.GetAction().(*OfpAction_PopMpls); ok {
+		return x.PopMpls
+	}
+	return nil
+}
+
+func (m *OfpAction) GetGroup() *OfpActionGroup {
+	if x, ok := m.GetAction().(*OfpAction_Group); ok {
+		return x.Group
+	}
+	return nil
+}
+
+func (m *OfpAction) GetNwTtl() *OfpActionNwTtl {
+	if x, ok := m.GetAction().(*OfpAction_NwTtl); ok {
+		return x.NwTtl
+	}
+	return nil
+}
+
+func (m *OfpAction) GetSetField() *OfpActionSetField {
+	if x, ok := m.GetAction().(*OfpAction_SetField); ok {
+		return x.SetField
+	}
+	return nil
+}
+
+func (m *OfpAction) GetExperimenter() *OfpActionExperimenter {
+	if x, ok := m.GetAction().(*OfpAction_Experimenter); ok {
+		return x.Experimenter
+	}
+	return nil
+}
+
+// XXX_OneofFuncs is for the internal use of the proto package.
+func (*OfpAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
+	return _OfpAction_OneofMarshaler, _OfpAction_OneofUnmarshaler, _OfpAction_OneofSizer, []interface{}{
+		(*OfpAction_Output)(nil),
+		(*OfpAction_MplsTtl)(nil),
+		(*OfpAction_Push)(nil),
+		(*OfpAction_PopMpls)(nil),
+		(*OfpAction_Group)(nil),
+		(*OfpAction_NwTtl)(nil),
+		(*OfpAction_SetField)(nil),
+		(*OfpAction_Experimenter)(nil),
+	}
+}
+
+func _OfpAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
+	m := msg.(*OfpAction)
+	// action
+	switch x := m.Action.(type) {
+	case *OfpAction_Output:
+		b.EncodeVarint(2<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Output); err != nil {
+			return err
+		}
+	case *OfpAction_MplsTtl:
+		b.EncodeVarint(3<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.MplsTtl); err != nil {
+			return err
+		}
+	case *OfpAction_Push:
+		b.EncodeVarint(4<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Push); err != nil {
+			return err
+		}
+	case *OfpAction_PopMpls:
+		b.EncodeVarint(5<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.PopMpls); err != nil {
+			return err
+		}
+	case *OfpAction_Group:
+		b.EncodeVarint(6<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Group); err != nil {
+			return err
+		}
+	case *OfpAction_NwTtl:
+		b.EncodeVarint(7<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.NwTtl); err != nil {
+			return err
+		}
+	case *OfpAction_SetField:
+		b.EncodeVarint(8<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.SetField); err != nil {
+			return err
+		}
+	case *OfpAction_Experimenter:
+		b.EncodeVarint(9<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Experimenter); err != nil {
+			return err
+		}
+	case nil:
+	default:
+		return fmt.Errorf("OfpAction.Action has unexpected type %T", x)
+	}
+	return nil
+}
+
+func _OfpAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
+	m := msg.(*OfpAction)
+	switch tag {
+	case 2: // action.output
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpActionOutput)
+		err := b.DecodeMessage(msg)
+		m.Action = &OfpAction_Output{msg}
+		return true, err
+	case 3: // action.mpls_ttl
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpActionMplsTtl)
+		err := b.DecodeMessage(msg)
+		m.Action = &OfpAction_MplsTtl{msg}
+		return true, err
+	case 4: // action.push
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpActionPush)
+		err := b.DecodeMessage(msg)
+		m.Action = &OfpAction_Push{msg}
+		return true, err
+	case 5: // action.pop_mpls
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpActionPopMpls)
+		err := b.DecodeMessage(msg)
+		m.Action = &OfpAction_PopMpls{msg}
+		return true, err
+	case 6: // action.group
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpActionGroup)
+		err := b.DecodeMessage(msg)
+		m.Action = &OfpAction_Group{msg}
+		return true, err
+	case 7: // action.nw_ttl
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpActionNwTtl)
+		err := b.DecodeMessage(msg)
+		m.Action = &OfpAction_NwTtl{msg}
+		return true, err
+	case 8: // action.set_field
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpActionSetField)
+		err := b.DecodeMessage(msg)
+		m.Action = &OfpAction_SetField{msg}
+		return true, err
+	case 9: // action.experimenter
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpActionExperimenter)
+		err := b.DecodeMessage(msg)
+		m.Action = &OfpAction_Experimenter{msg}
+		return true, err
+	default:
+		return false, nil
+	}
+}
+
+func _OfpAction_OneofSizer(msg proto.Message) (n int) {
+	m := msg.(*OfpAction)
+	// action
+	switch x := m.Action.(type) {
+	case *OfpAction_Output:
+		s := proto.Size(x.Output)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpAction_MplsTtl:
+		s := proto.Size(x.MplsTtl)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpAction_Push:
+		s := proto.Size(x.Push)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpAction_PopMpls:
+		s := proto.Size(x.PopMpls)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpAction_Group:
+		s := proto.Size(x.Group)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpAction_NwTtl:
+		s := proto.Size(x.NwTtl)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpAction_SetField:
+		s := proto.Size(x.SetField)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpAction_Experimenter:
+		s := proto.Size(x.Experimenter)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case nil:
+	default:
+		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
+	}
+	return n
+}
+
+// Action structure for OFPAT_OUTPUT, which sends packets out 'port'.
+// When the 'port' is the OFPP_CONTROLLER, 'max_len' indicates the max
+// number of bytes to send.  A 'max_len' of zero means no bytes of the
+// packet should be sent. A 'max_len' of OFPCML_NO_BUFFER means that
+// the packet is not buffered and the complete packet is to be sent to
+// the controller.
+type OfpActionOutput struct {
+	Port                 uint32   `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
+	MaxLen               uint32   `protobuf:"varint,2,opt,name=max_len,json=maxLen,proto3" json:"max_len,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpActionOutput) Reset()         { *m = OfpActionOutput{} }
+func (m *OfpActionOutput) String() string { return proto.CompactTextString(m) }
+func (*OfpActionOutput) ProtoMessage()    {}
+func (*OfpActionOutput) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{15}
+}
+func (m *OfpActionOutput) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpActionOutput.Unmarshal(m, b)
+}
+func (m *OfpActionOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpActionOutput.Marshal(b, m, deterministic)
+}
+func (dst *OfpActionOutput) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpActionOutput.Merge(dst, src)
+}
+func (m *OfpActionOutput) XXX_Size() int {
+	return xxx_messageInfo_OfpActionOutput.Size(m)
+}
+func (m *OfpActionOutput) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpActionOutput.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionOutput proto.InternalMessageInfo
+
+func (m *OfpActionOutput) GetPort() uint32 {
+	if m != nil {
+		return m.Port
+	}
+	return 0
+}
+
+func (m *OfpActionOutput) GetMaxLen() uint32 {
+	if m != nil {
+		return m.MaxLen
+	}
+	return 0
+}
+
+// Action structure for OFPAT_SET_MPLS_TTL.
+type OfpActionMplsTtl struct {
+	MplsTtl              uint32   `protobuf:"varint,1,opt,name=mpls_ttl,json=mplsTtl,proto3" json:"mpls_ttl,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpActionMplsTtl) Reset()         { *m = OfpActionMplsTtl{} }
+func (m *OfpActionMplsTtl) String() string { return proto.CompactTextString(m) }
+func (*OfpActionMplsTtl) ProtoMessage()    {}
+func (*OfpActionMplsTtl) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{16}
+}
+func (m *OfpActionMplsTtl) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpActionMplsTtl.Unmarshal(m, b)
+}
+func (m *OfpActionMplsTtl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpActionMplsTtl.Marshal(b, m, deterministic)
+}
+func (dst *OfpActionMplsTtl) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpActionMplsTtl.Merge(dst, src)
+}
+func (m *OfpActionMplsTtl) XXX_Size() int {
+	return xxx_messageInfo_OfpActionMplsTtl.Size(m)
+}
+func (m *OfpActionMplsTtl) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpActionMplsTtl.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionMplsTtl proto.InternalMessageInfo
+
+func (m *OfpActionMplsTtl) GetMplsTtl() uint32 {
+	if m != nil {
+		return m.MplsTtl
+	}
+	return 0
+}
+
+// Action structure for OFPAT_PUSH_VLAN/MPLS/PBB.
+type OfpActionPush struct {
+	Ethertype            uint32   `protobuf:"varint,1,opt,name=ethertype,proto3" json:"ethertype,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpActionPush) Reset()         { *m = OfpActionPush{} }
+func (m *OfpActionPush) String() string { return proto.CompactTextString(m) }
+func (*OfpActionPush) ProtoMessage()    {}
+func (*OfpActionPush) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{17}
+}
+func (m *OfpActionPush) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpActionPush.Unmarshal(m, b)
+}
+func (m *OfpActionPush) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpActionPush.Marshal(b, m, deterministic)
+}
+func (dst *OfpActionPush) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpActionPush.Merge(dst, src)
+}
+func (m *OfpActionPush) XXX_Size() int {
+	return xxx_messageInfo_OfpActionPush.Size(m)
+}
+func (m *OfpActionPush) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpActionPush.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionPush proto.InternalMessageInfo
+
+func (m *OfpActionPush) GetEthertype() uint32 {
+	if m != nil {
+		return m.Ethertype
+	}
+	return 0
+}
+
+// Action structure for OFPAT_POP_MPLS.
+type OfpActionPopMpls struct {
+	Ethertype            uint32   `protobuf:"varint,1,opt,name=ethertype,proto3" json:"ethertype,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpActionPopMpls) Reset()         { *m = OfpActionPopMpls{} }
+func (m *OfpActionPopMpls) String() string { return proto.CompactTextString(m) }
+func (*OfpActionPopMpls) ProtoMessage()    {}
+func (*OfpActionPopMpls) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{18}
+}
+func (m *OfpActionPopMpls) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpActionPopMpls.Unmarshal(m, b)
+}
+func (m *OfpActionPopMpls) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpActionPopMpls.Marshal(b, m, deterministic)
+}
+func (dst *OfpActionPopMpls) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpActionPopMpls.Merge(dst, src)
+}
+func (m *OfpActionPopMpls) XXX_Size() int {
+	return xxx_messageInfo_OfpActionPopMpls.Size(m)
+}
+func (m *OfpActionPopMpls) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpActionPopMpls.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionPopMpls proto.InternalMessageInfo
+
+func (m *OfpActionPopMpls) GetEthertype() uint32 {
+	if m != nil {
+		return m.Ethertype
+	}
+	return 0
+}
+
+// Action structure for OFPAT_GROUP.
+type OfpActionGroup struct {
+	GroupId              uint32   `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpActionGroup) Reset()         { *m = OfpActionGroup{} }
+func (m *OfpActionGroup) String() string { return proto.CompactTextString(m) }
+func (*OfpActionGroup) ProtoMessage()    {}
+func (*OfpActionGroup) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{19}
+}
+func (m *OfpActionGroup) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpActionGroup.Unmarshal(m, b)
+}
+func (m *OfpActionGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpActionGroup.Marshal(b, m, deterministic)
+}
+func (dst *OfpActionGroup) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpActionGroup.Merge(dst, src)
+}
+func (m *OfpActionGroup) XXX_Size() int {
+	return xxx_messageInfo_OfpActionGroup.Size(m)
+}
+func (m *OfpActionGroup) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpActionGroup.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionGroup proto.InternalMessageInfo
+
+func (m *OfpActionGroup) GetGroupId() uint32 {
+	if m != nil {
+		return m.GroupId
+	}
+	return 0
+}
+
+// Action structure for OFPAT_SET_NW_TTL.
+type OfpActionNwTtl struct {
+	NwTtl                uint32   `protobuf:"varint,1,opt,name=nw_ttl,json=nwTtl,proto3" json:"nw_ttl,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpActionNwTtl) Reset()         { *m = OfpActionNwTtl{} }
+func (m *OfpActionNwTtl) String() string { return proto.CompactTextString(m) }
+func (*OfpActionNwTtl) ProtoMessage()    {}
+func (*OfpActionNwTtl) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{20}
+}
+func (m *OfpActionNwTtl) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpActionNwTtl.Unmarshal(m, b)
+}
+func (m *OfpActionNwTtl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpActionNwTtl.Marshal(b, m, deterministic)
+}
+func (dst *OfpActionNwTtl) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpActionNwTtl.Merge(dst, src)
+}
+func (m *OfpActionNwTtl) XXX_Size() int {
+	return xxx_messageInfo_OfpActionNwTtl.Size(m)
+}
+func (m *OfpActionNwTtl) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpActionNwTtl.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionNwTtl proto.InternalMessageInfo
+
+func (m *OfpActionNwTtl) GetNwTtl() uint32 {
+	if m != nil {
+		return m.NwTtl
+	}
+	return 0
+}
+
+// Action structure for OFPAT_SET_FIELD.
+type OfpActionSetField struct {
+	Field                *OfpOxmField `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
+	XXX_unrecognized     []byte       `json:"-"`
+	XXX_sizecache        int32        `json:"-"`
+}
+
+func (m *OfpActionSetField) Reset()         { *m = OfpActionSetField{} }
+func (m *OfpActionSetField) String() string { return proto.CompactTextString(m) }
+func (*OfpActionSetField) ProtoMessage()    {}
+func (*OfpActionSetField) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{21}
+}
+func (m *OfpActionSetField) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpActionSetField.Unmarshal(m, b)
+}
+func (m *OfpActionSetField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpActionSetField.Marshal(b, m, deterministic)
+}
+func (dst *OfpActionSetField) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpActionSetField.Merge(dst, src)
+}
+func (m *OfpActionSetField) XXX_Size() int {
+	return xxx_messageInfo_OfpActionSetField.Size(m)
+}
+func (m *OfpActionSetField) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpActionSetField.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionSetField proto.InternalMessageInfo
+
+func (m *OfpActionSetField) GetField() *OfpOxmField {
+	if m != nil {
+		return m.Field
+	}
+	return nil
+}
+
+// Action header for OFPAT_EXPERIMENTER.
+// The rest of the body is experimenter-defined.
+type OfpActionExperimenter struct {
+	Experimenter         uint32   `protobuf:"varint,1,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+	Data                 []byte   `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpActionExperimenter) Reset()         { *m = OfpActionExperimenter{} }
+func (m *OfpActionExperimenter) String() string { return proto.CompactTextString(m) }
+func (*OfpActionExperimenter) ProtoMessage()    {}
+func (*OfpActionExperimenter) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{22}
+}
+func (m *OfpActionExperimenter) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpActionExperimenter.Unmarshal(m, b)
+}
+func (m *OfpActionExperimenter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpActionExperimenter.Marshal(b, m, deterministic)
+}
+func (dst *OfpActionExperimenter) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpActionExperimenter.Merge(dst, src)
+}
+func (m *OfpActionExperimenter) XXX_Size() int {
+	return xxx_messageInfo_OfpActionExperimenter.Size(m)
+}
+func (m *OfpActionExperimenter) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpActionExperimenter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionExperimenter proto.InternalMessageInfo
+
+func (m *OfpActionExperimenter) GetExperimenter() uint32 {
+	if m != nil {
+		return m.Experimenter
+	}
+	return 0
+}
+
+func (m *OfpActionExperimenter) GetData() []byte {
+	if m != nil {
+		return m.Data
+	}
+	return nil
+}
+
+// Instruction header that is common to all instructions.  The length includes
+// the header and any padding used to make the instruction 64-bit aligned.
+// NB: The length of an instruction *must* always be a multiple of eight.
+type OfpInstruction struct {
+	Type uint32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
+	// Types that are valid to be assigned to Data:
+	//	*OfpInstruction_GotoTable
+	//	*OfpInstruction_WriteMetadata
+	//	*OfpInstruction_Actions
+	//	*OfpInstruction_Meter
+	//	*OfpInstruction_Experimenter
+	Data                 isOfpInstruction_Data `protobuf_oneof:"data"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *OfpInstruction) Reset()         { *m = OfpInstruction{} }
+func (m *OfpInstruction) String() string { return proto.CompactTextString(m) }
+func (*OfpInstruction) ProtoMessage()    {}
+func (*OfpInstruction) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{23}
+}
+func (m *OfpInstruction) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpInstruction.Unmarshal(m, b)
+}
+func (m *OfpInstruction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpInstruction.Marshal(b, m, deterministic)
+}
+func (dst *OfpInstruction) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpInstruction.Merge(dst, src)
+}
+func (m *OfpInstruction) XXX_Size() int {
+	return xxx_messageInfo_OfpInstruction.Size(m)
+}
+func (m *OfpInstruction) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpInstruction.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpInstruction proto.InternalMessageInfo
+
+func (m *OfpInstruction) GetType() uint32 {
+	if m != nil {
+		return m.Type
+	}
+	return 0
+}
+
+type isOfpInstruction_Data interface {
+	isOfpInstruction_Data()
+}
+
+type OfpInstruction_GotoTable struct {
+	GotoTable *OfpInstructionGotoTable `protobuf:"bytes,2,opt,name=goto_table,json=gotoTable,proto3,oneof"`
+}
+
+type OfpInstruction_WriteMetadata struct {
+	WriteMetadata *OfpInstructionWriteMetadata `protobuf:"bytes,3,opt,name=write_metadata,json=writeMetadata,proto3,oneof"`
+}
+
+type OfpInstruction_Actions struct {
+	Actions *OfpInstructionActions `protobuf:"bytes,4,opt,name=actions,proto3,oneof"`
+}
+
+type OfpInstruction_Meter struct {
+	Meter *OfpInstructionMeter `protobuf:"bytes,5,opt,name=meter,proto3,oneof"`
+}
+
+type OfpInstruction_Experimenter struct {
+	Experimenter *OfpInstructionExperimenter `protobuf:"bytes,6,opt,name=experimenter,proto3,oneof"`
+}
+
+func (*OfpInstruction_GotoTable) isOfpInstruction_Data() {}
+
+func (*OfpInstruction_WriteMetadata) isOfpInstruction_Data() {}
+
+func (*OfpInstruction_Actions) isOfpInstruction_Data() {}
+
+func (*OfpInstruction_Meter) isOfpInstruction_Data() {}
+
+func (*OfpInstruction_Experimenter) isOfpInstruction_Data() {}
+
+func (m *OfpInstruction) GetData() isOfpInstruction_Data {
+	if m != nil {
+		return m.Data
+	}
+	return nil
+}
+
+func (m *OfpInstruction) GetGotoTable() *OfpInstructionGotoTable {
+	if x, ok := m.GetData().(*OfpInstruction_GotoTable); ok {
+		return x.GotoTable
+	}
+	return nil
+}
+
+func (m *OfpInstruction) GetWriteMetadata() *OfpInstructionWriteMetadata {
+	if x, ok := m.GetData().(*OfpInstruction_WriteMetadata); ok {
+		return x.WriteMetadata
+	}
+	return nil
+}
+
+func (m *OfpInstruction) GetActions() *OfpInstructionActions {
+	if x, ok := m.GetData().(*OfpInstruction_Actions); ok {
+		return x.Actions
+	}
+	return nil
+}
+
+func (m *OfpInstruction) GetMeter() *OfpInstructionMeter {
+	if x, ok := m.GetData().(*OfpInstruction_Meter); ok {
+		return x.Meter
+	}
+	return nil
+}
+
+func (m *OfpInstruction) GetExperimenter() *OfpInstructionExperimenter {
+	if x, ok := m.GetData().(*OfpInstruction_Experimenter); ok {
+		return x.Experimenter
+	}
+	return nil
+}
+
+// XXX_OneofFuncs is for the internal use of the proto package.
+func (*OfpInstruction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
+	return _OfpInstruction_OneofMarshaler, _OfpInstruction_OneofUnmarshaler, _OfpInstruction_OneofSizer, []interface{}{
+		(*OfpInstruction_GotoTable)(nil),
+		(*OfpInstruction_WriteMetadata)(nil),
+		(*OfpInstruction_Actions)(nil),
+		(*OfpInstruction_Meter)(nil),
+		(*OfpInstruction_Experimenter)(nil),
+	}
+}
+
+func _OfpInstruction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
+	m := msg.(*OfpInstruction)
+	// data
+	switch x := m.Data.(type) {
+	case *OfpInstruction_GotoTable:
+		b.EncodeVarint(2<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.GotoTable); err != nil {
+			return err
+		}
+	case *OfpInstruction_WriteMetadata:
+		b.EncodeVarint(3<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.WriteMetadata); err != nil {
+			return err
+		}
+	case *OfpInstruction_Actions:
+		b.EncodeVarint(4<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Actions); err != nil {
+			return err
+		}
+	case *OfpInstruction_Meter:
+		b.EncodeVarint(5<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Meter); err != nil {
+			return err
+		}
+	case *OfpInstruction_Experimenter:
+		b.EncodeVarint(6<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Experimenter); err != nil {
+			return err
+		}
+	case nil:
+	default:
+		return fmt.Errorf("OfpInstruction.Data has unexpected type %T", x)
+	}
+	return nil
+}
+
+func _OfpInstruction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
+	m := msg.(*OfpInstruction)
+	switch tag {
+	case 2: // data.goto_table
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpInstructionGotoTable)
+		err := b.DecodeMessage(msg)
+		m.Data = &OfpInstruction_GotoTable{msg}
+		return true, err
+	case 3: // data.write_metadata
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpInstructionWriteMetadata)
+		err := b.DecodeMessage(msg)
+		m.Data = &OfpInstruction_WriteMetadata{msg}
+		return true, err
+	case 4: // data.actions
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpInstructionActions)
+		err := b.DecodeMessage(msg)
+		m.Data = &OfpInstruction_Actions{msg}
+		return true, err
+	case 5: // data.meter
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpInstructionMeter)
+		err := b.DecodeMessage(msg)
+		m.Data = &OfpInstruction_Meter{msg}
+		return true, err
+	case 6: // data.experimenter
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpInstructionExperimenter)
+		err := b.DecodeMessage(msg)
+		m.Data = &OfpInstruction_Experimenter{msg}
+		return true, err
+	default:
+		return false, nil
+	}
+}
+
+func _OfpInstruction_OneofSizer(msg proto.Message) (n int) {
+	m := msg.(*OfpInstruction)
+	// data
+	switch x := m.Data.(type) {
+	case *OfpInstruction_GotoTable:
+		s := proto.Size(x.GotoTable)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpInstruction_WriteMetadata:
+		s := proto.Size(x.WriteMetadata)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpInstruction_Actions:
+		s := proto.Size(x.Actions)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpInstruction_Meter:
+		s := proto.Size(x.Meter)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpInstruction_Experimenter:
+		s := proto.Size(x.Experimenter)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case nil:
+	default:
+		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
+	}
+	return n
+}
+
+// Instruction structure for OFPIT_GOTO_TABLE
+type OfpInstructionGotoTable struct {
+	TableId              uint32   `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpInstructionGotoTable) Reset()         { *m = OfpInstructionGotoTable{} }
+func (m *OfpInstructionGotoTable) String() string { return proto.CompactTextString(m) }
+func (*OfpInstructionGotoTable) ProtoMessage()    {}
+func (*OfpInstructionGotoTable) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{24}
+}
+func (m *OfpInstructionGotoTable) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpInstructionGotoTable.Unmarshal(m, b)
+}
+func (m *OfpInstructionGotoTable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpInstructionGotoTable.Marshal(b, m, deterministic)
+}
+func (dst *OfpInstructionGotoTable) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpInstructionGotoTable.Merge(dst, src)
+}
+func (m *OfpInstructionGotoTable) XXX_Size() int {
+	return xxx_messageInfo_OfpInstructionGotoTable.Size(m)
+}
+func (m *OfpInstructionGotoTable) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpInstructionGotoTable.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpInstructionGotoTable proto.InternalMessageInfo
+
+func (m *OfpInstructionGotoTable) GetTableId() uint32 {
+	if m != nil {
+		return m.TableId
+	}
+	return 0
+}
+
+// Instruction structure for OFPIT_WRITE_METADATA
+type OfpInstructionWriteMetadata struct {
+	Metadata             uint64   `protobuf:"varint,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
+	MetadataMask         uint64   `protobuf:"varint,2,opt,name=metadata_mask,json=metadataMask,proto3" json:"metadata_mask,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpInstructionWriteMetadata) Reset()         { *m = OfpInstructionWriteMetadata{} }
+func (m *OfpInstructionWriteMetadata) String() string { return proto.CompactTextString(m) }
+func (*OfpInstructionWriteMetadata) ProtoMessage()    {}
+func (*OfpInstructionWriteMetadata) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{25}
+}
+func (m *OfpInstructionWriteMetadata) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpInstructionWriteMetadata.Unmarshal(m, b)
+}
+func (m *OfpInstructionWriteMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpInstructionWriteMetadata.Marshal(b, m, deterministic)
+}
+func (dst *OfpInstructionWriteMetadata) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpInstructionWriteMetadata.Merge(dst, src)
+}
+func (m *OfpInstructionWriteMetadata) XXX_Size() int {
+	return xxx_messageInfo_OfpInstructionWriteMetadata.Size(m)
+}
+func (m *OfpInstructionWriteMetadata) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpInstructionWriteMetadata.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpInstructionWriteMetadata proto.InternalMessageInfo
+
+func (m *OfpInstructionWriteMetadata) GetMetadata() uint64 {
+	if m != nil {
+		return m.Metadata
+	}
+	return 0
+}
+
+func (m *OfpInstructionWriteMetadata) GetMetadataMask() uint64 {
+	if m != nil {
+		return m.MetadataMask
+	}
+	return 0
+}
+
+// Instruction structure for OFPIT_WRITE/APPLY/CLEAR_ACTIONS
+type OfpInstructionActions struct {
+	Actions              []*OfpAction `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
+	XXX_unrecognized     []byte       `json:"-"`
+	XXX_sizecache        int32        `json:"-"`
+}
+
+func (m *OfpInstructionActions) Reset()         { *m = OfpInstructionActions{} }
+func (m *OfpInstructionActions) String() string { return proto.CompactTextString(m) }
+func (*OfpInstructionActions) ProtoMessage()    {}
+func (*OfpInstructionActions) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{26}
+}
+func (m *OfpInstructionActions) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpInstructionActions.Unmarshal(m, b)
+}
+func (m *OfpInstructionActions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpInstructionActions.Marshal(b, m, deterministic)
+}
+func (dst *OfpInstructionActions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpInstructionActions.Merge(dst, src)
+}
+func (m *OfpInstructionActions) XXX_Size() int {
+	return xxx_messageInfo_OfpInstructionActions.Size(m)
+}
+func (m *OfpInstructionActions) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpInstructionActions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpInstructionActions proto.InternalMessageInfo
+
+func (m *OfpInstructionActions) GetActions() []*OfpAction {
+	if m != nil {
+		return m.Actions
+	}
+	return nil
+}
+
+// Instruction structure for OFPIT_METER
+type OfpInstructionMeter struct {
+	MeterId              uint32   `protobuf:"varint,1,opt,name=meter_id,json=meterId,proto3" json:"meter_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpInstructionMeter) Reset()         { *m = OfpInstructionMeter{} }
+func (m *OfpInstructionMeter) String() string { return proto.CompactTextString(m) }
+func (*OfpInstructionMeter) ProtoMessage()    {}
+func (*OfpInstructionMeter) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{27}
+}
+func (m *OfpInstructionMeter) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpInstructionMeter.Unmarshal(m, b)
+}
+func (m *OfpInstructionMeter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpInstructionMeter.Marshal(b, m, deterministic)
+}
+func (dst *OfpInstructionMeter) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpInstructionMeter.Merge(dst, src)
+}
+func (m *OfpInstructionMeter) XXX_Size() int {
+	return xxx_messageInfo_OfpInstructionMeter.Size(m)
+}
+func (m *OfpInstructionMeter) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpInstructionMeter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpInstructionMeter proto.InternalMessageInfo
+
+func (m *OfpInstructionMeter) GetMeterId() uint32 {
+	if m != nil {
+		return m.MeterId
+	}
+	return 0
+}
+
+// Instruction structure for experimental instructions
+type OfpInstructionExperimenter struct {
+	Experimenter uint32 `protobuf:"varint,1,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+	// Experimenter-defined arbitrary additional data.
+	Data                 []byte   `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpInstructionExperimenter) Reset()         { *m = OfpInstructionExperimenter{} }
+func (m *OfpInstructionExperimenter) String() string { return proto.CompactTextString(m) }
+func (*OfpInstructionExperimenter) ProtoMessage()    {}
+func (*OfpInstructionExperimenter) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{28}
+}
+func (m *OfpInstructionExperimenter) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpInstructionExperimenter.Unmarshal(m, b)
+}
+func (m *OfpInstructionExperimenter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpInstructionExperimenter.Marshal(b, m, deterministic)
+}
+func (dst *OfpInstructionExperimenter) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpInstructionExperimenter.Merge(dst, src)
+}
+func (m *OfpInstructionExperimenter) XXX_Size() int {
+	return xxx_messageInfo_OfpInstructionExperimenter.Size(m)
+}
+func (m *OfpInstructionExperimenter) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpInstructionExperimenter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpInstructionExperimenter proto.InternalMessageInfo
+
+func (m *OfpInstructionExperimenter) GetExperimenter() uint32 {
+	if m != nil {
+		return m.Experimenter
+	}
+	return 0
+}
+
+func (m *OfpInstructionExperimenter) GetData() []byte {
+	if m != nil {
+		return m.Data
+	}
+	return nil
+}
+
+// Flow setup and teardown (controller -> datapath).
+type OfpFlowMod struct {
+	// ofp_header header;
+	Cookie               uint64            `protobuf:"varint,1,opt,name=cookie,proto3" json:"cookie,omitempty"`
+	CookieMask           uint64            `protobuf:"varint,2,opt,name=cookie_mask,json=cookieMask,proto3" json:"cookie_mask,omitempty"`
+	TableId              uint32            `protobuf:"varint,3,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+	Command              OfpFlowModCommand `protobuf:"varint,4,opt,name=command,proto3,enum=openflow_13.OfpFlowModCommand" json:"command,omitempty"`
+	IdleTimeout          uint32            `protobuf:"varint,5,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"`
+	HardTimeout          uint32            `protobuf:"varint,6,opt,name=hard_timeout,json=hardTimeout,proto3" json:"hard_timeout,omitempty"`
+	Priority             uint32            `protobuf:"varint,7,opt,name=priority,proto3" json:"priority,omitempty"`
+	BufferId             uint32            `protobuf:"varint,8,opt,name=buffer_id,json=bufferId,proto3" json:"buffer_id,omitempty"`
+	OutPort              uint32            `protobuf:"varint,9,opt,name=out_port,json=outPort,proto3" json:"out_port,omitempty"`
+	OutGroup             uint32            `protobuf:"varint,10,opt,name=out_group,json=outGroup,proto3" json:"out_group,omitempty"`
+	Flags                uint32            `protobuf:"varint,11,opt,name=flags,proto3" json:"flags,omitempty"`
+	Match                *OfpMatch         `protobuf:"bytes,12,opt,name=match,proto3" json:"match,omitempty"`
+	Instructions         []*OfpInstruction `protobuf:"bytes,13,rep,name=instructions,proto3" json:"instructions,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *OfpFlowMod) Reset()         { *m = OfpFlowMod{} }
+func (m *OfpFlowMod) String() string { return proto.CompactTextString(m) }
+func (*OfpFlowMod) ProtoMessage()    {}
+func (*OfpFlowMod) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{29}
+}
+func (m *OfpFlowMod) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpFlowMod.Unmarshal(m, b)
+}
+func (m *OfpFlowMod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpFlowMod.Marshal(b, m, deterministic)
+}
+func (dst *OfpFlowMod) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpFlowMod.Merge(dst, src)
+}
+func (m *OfpFlowMod) XXX_Size() int {
+	return xxx_messageInfo_OfpFlowMod.Size(m)
+}
+func (m *OfpFlowMod) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpFlowMod.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpFlowMod proto.InternalMessageInfo
+
+func (m *OfpFlowMod) GetCookie() uint64 {
+	if m != nil {
+		return m.Cookie
+	}
+	return 0
+}
+
+func (m *OfpFlowMod) GetCookieMask() uint64 {
+	if m != nil {
+		return m.CookieMask
+	}
+	return 0
+}
+
+func (m *OfpFlowMod) GetTableId() uint32 {
+	if m != nil {
+		return m.TableId
+	}
+	return 0
+}
+
+func (m *OfpFlowMod) GetCommand() OfpFlowModCommand {
+	if m != nil {
+		return m.Command
+	}
+	return OfpFlowModCommand_OFPFC_ADD
+}
+
+func (m *OfpFlowMod) GetIdleTimeout() uint32 {
+	if m != nil {
+		return m.IdleTimeout
+	}
+	return 0
+}
+
+func (m *OfpFlowMod) GetHardTimeout() uint32 {
+	if m != nil {
+		return m.HardTimeout
+	}
+	return 0
+}
+
+func (m *OfpFlowMod) GetPriority() uint32 {
+	if m != nil {
+		return m.Priority
+	}
+	return 0
+}
+
+func (m *OfpFlowMod) GetBufferId() uint32 {
+	if m != nil {
+		return m.BufferId
+	}
+	return 0
+}
+
+func (m *OfpFlowMod) GetOutPort() uint32 {
+	if m != nil {
+		return m.OutPort
+	}
+	return 0
+}
+
+func (m *OfpFlowMod) GetOutGroup() uint32 {
+	if m != nil {
+		return m.OutGroup
+	}
+	return 0
+}
+
+func (m *OfpFlowMod) GetFlags() uint32 {
+	if m != nil {
+		return m.Flags
+	}
+	return 0
+}
+
+func (m *OfpFlowMod) GetMatch() *OfpMatch {
+	if m != nil {
+		return m.Match
+	}
+	return nil
+}
+
+func (m *OfpFlowMod) GetInstructions() []*OfpInstruction {
+	if m != nil {
+		return m.Instructions
+	}
+	return nil
+}
+
+// Bucket for use in groups.
+type OfpBucket struct {
+	Weight               uint32       `protobuf:"varint,1,opt,name=weight,proto3" json:"weight,omitempty"`
+	WatchPort            uint32       `protobuf:"varint,2,opt,name=watch_port,json=watchPort,proto3" json:"watch_port,omitempty"`
+	WatchGroup           uint32       `protobuf:"varint,3,opt,name=watch_group,json=watchGroup,proto3" json:"watch_group,omitempty"`
+	Actions              []*OfpAction `protobuf:"bytes,4,rep,name=actions,proto3" json:"actions,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
+	XXX_unrecognized     []byte       `json:"-"`
+	XXX_sizecache        int32        `json:"-"`
+}
+
+func (m *OfpBucket) Reset()         { *m = OfpBucket{} }
+func (m *OfpBucket) String() string { return proto.CompactTextString(m) }
+func (*OfpBucket) ProtoMessage()    {}
+func (*OfpBucket) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{30}
+}
+func (m *OfpBucket) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpBucket.Unmarshal(m, b)
+}
+func (m *OfpBucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpBucket.Marshal(b, m, deterministic)
+}
+func (dst *OfpBucket) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpBucket.Merge(dst, src)
+}
+func (m *OfpBucket) XXX_Size() int {
+	return xxx_messageInfo_OfpBucket.Size(m)
+}
+func (m *OfpBucket) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpBucket.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpBucket proto.InternalMessageInfo
+
+func (m *OfpBucket) GetWeight() uint32 {
+	if m != nil {
+		return m.Weight
+	}
+	return 0
+}
+
+func (m *OfpBucket) GetWatchPort() uint32 {
+	if m != nil {
+		return m.WatchPort
+	}
+	return 0
+}
+
+func (m *OfpBucket) GetWatchGroup() uint32 {
+	if m != nil {
+		return m.WatchGroup
+	}
+	return 0
+}
+
+func (m *OfpBucket) GetActions() []*OfpAction {
+	if m != nil {
+		return m.Actions
+	}
+	return nil
+}
+
+// Group setup and teardown (controller -> datapath).
+type OfpGroupMod struct {
+	// ofp_header header;
+	Command              OfpGroupModCommand `protobuf:"varint,1,opt,name=command,proto3,enum=openflow_13.OfpGroupModCommand" json:"command,omitempty"`
+	Type                 OfpGroupType       `protobuf:"varint,2,opt,name=type,proto3,enum=openflow_13.OfpGroupType" json:"type,omitempty"`
+	GroupId              uint32             `protobuf:"varint,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
+	Buckets              []*OfpBucket       `protobuf:"bytes,4,rep,name=buckets,proto3" json:"buckets,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
+	XXX_unrecognized     []byte             `json:"-"`
+	XXX_sizecache        int32              `json:"-"`
+}
+
+func (m *OfpGroupMod) Reset()         { *m = OfpGroupMod{} }
+func (m *OfpGroupMod) String() string { return proto.CompactTextString(m) }
+func (*OfpGroupMod) ProtoMessage()    {}
+func (*OfpGroupMod) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{31}
+}
+func (m *OfpGroupMod) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpGroupMod.Unmarshal(m, b)
+}
+func (m *OfpGroupMod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpGroupMod.Marshal(b, m, deterministic)
+}
+func (dst *OfpGroupMod) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpGroupMod.Merge(dst, src)
+}
+func (m *OfpGroupMod) XXX_Size() int {
+	return xxx_messageInfo_OfpGroupMod.Size(m)
+}
+func (m *OfpGroupMod) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpGroupMod.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpGroupMod proto.InternalMessageInfo
+
+func (m *OfpGroupMod) GetCommand() OfpGroupModCommand {
+	if m != nil {
+		return m.Command
+	}
+	return OfpGroupModCommand_OFPGC_ADD
+}
+
+func (m *OfpGroupMod) GetType() OfpGroupType {
+	if m != nil {
+		return m.Type
+	}
+	return OfpGroupType_OFPGT_ALL
+}
+
+func (m *OfpGroupMod) GetGroupId() uint32 {
+	if m != nil {
+		return m.GroupId
+	}
+	return 0
+}
+
+func (m *OfpGroupMod) GetBuckets() []*OfpBucket {
+	if m != nil {
+		return m.Buckets
+	}
+	return nil
+}
+
+// Send packet (controller -> datapath).
+type OfpPacketOut struct {
+	// ofp_header header;
+	BufferId uint32       `protobuf:"varint,1,opt,name=buffer_id,json=bufferId,proto3" json:"buffer_id,omitempty"`
+	InPort   uint32       `protobuf:"varint,2,opt,name=in_port,json=inPort,proto3" json:"in_port,omitempty"`
+	Actions  []*OfpAction `protobuf:"bytes,3,rep,name=actions,proto3" json:"actions,omitempty"`
+	// The variable size action list is optionally followed by packet data.
+	// This data is only present and meaningful if buffer_id == -1.
+	Data                 []byte   `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpPacketOut) Reset()         { *m = OfpPacketOut{} }
+func (m *OfpPacketOut) String() string { return proto.CompactTextString(m) }
+func (*OfpPacketOut) ProtoMessage()    {}
+func (*OfpPacketOut) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{32}
+}
+func (m *OfpPacketOut) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpPacketOut.Unmarshal(m, b)
+}
+func (m *OfpPacketOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpPacketOut.Marshal(b, m, deterministic)
+}
+func (dst *OfpPacketOut) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpPacketOut.Merge(dst, src)
+}
+func (m *OfpPacketOut) XXX_Size() int {
+	return xxx_messageInfo_OfpPacketOut.Size(m)
+}
+func (m *OfpPacketOut) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpPacketOut.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpPacketOut proto.InternalMessageInfo
+
+func (m *OfpPacketOut) GetBufferId() uint32 {
+	if m != nil {
+		return m.BufferId
+	}
+	return 0
+}
+
+func (m *OfpPacketOut) GetInPort() uint32 {
+	if m != nil {
+		return m.InPort
+	}
+	return 0
+}
+
+func (m *OfpPacketOut) GetActions() []*OfpAction {
+	if m != nil {
+		return m.Actions
+	}
+	return nil
+}
+
+func (m *OfpPacketOut) GetData() []byte {
+	if m != nil {
+		return m.Data
+	}
+	return nil
+}
+
+// Packet received on port (datapath -> controller).
+type OfpPacketIn struct {
+	// ofp_header header;
+	BufferId             uint32            `protobuf:"varint,1,opt,name=buffer_id,json=bufferId,proto3" json:"buffer_id,omitempty"`
+	Reason               OfpPacketInReason `protobuf:"varint,2,opt,name=reason,proto3,enum=openflow_13.OfpPacketInReason" json:"reason,omitempty"`
+	TableId              uint32            `protobuf:"varint,3,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+	Cookie               uint64            `protobuf:"varint,4,opt,name=cookie,proto3" json:"cookie,omitempty"`
+	Match                *OfpMatch         `protobuf:"bytes,5,opt,name=match,proto3" json:"match,omitempty"`
+	Data                 []byte            `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *OfpPacketIn) Reset()         { *m = OfpPacketIn{} }
+func (m *OfpPacketIn) String() string { return proto.CompactTextString(m) }
+func (*OfpPacketIn) ProtoMessage()    {}
+func (*OfpPacketIn) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{33}
+}
+func (m *OfpPacketIn) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpPacketIn.Unmarshal(m, b)
+}
+func (m *OfpPacketIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpPacketIn.Marshal(b, m, deterministic)
+}
+func (dst *OfpPacketIn) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpPacketIn.Merge(dst, src)
+}
+func (m *OfpPacketIn) XXX_Size() int {
+	return xxx_messageInfo_OfpPacketIn.Size(m)
+}
+func (m *OfpPacketIn) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpPacketIn.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpPacketIn proto.InternalMessageInfo
+
+func (m *OfpPacketIn) GetBufferId() uint32 {
+	if m != nil {
+		return m.BufferId
+	}
+	return 0
+}
+
+func (m *OfpPacketIn) GetReason() OfpPacketInReason {
+	if m != nil {
+		return m.Reason
+	}
+	return OfpPacketInReason_OFPR_NO_MATCH
+}
+
+func (m *OfpPacketIn) GetTableId() uint32 {
+	if m != nil {
+		return m.TableId
+	}
+	return 0
+}
+
+func (m *OfpPacketIn) GetCookie() uint64 {
+	if m != nil {
+		return m.Cookie
+	}
+	return 0
+}
+
+func (m *OfpPacketIn) GetMatch() *OfpMatch {
+	if m != nil {
+		return m.Match
+	}
+	return nil
+}
+
+func (m *OfpPacketIn) GetData() []byte {
+	if m != nil {
+		return m.Data
+	}
+	return nil
+}
+
+// Flow removed (datapath -> controller).
+type OfpFlowRemoved struct {
+	// ofp_header header;
+	Cookie               uint64               `protobuf:"varint,1,opt,name=cookie,proto3" json:"cookie,omitempty"`
+	Priority             uint32               `protobuf:"varint,2,opt,name=priority,proto3" json:"priority,omitempty"`
+	Reason               OfpFlowRemovedReason `protobuf:"varint,3,opt,name=reason,proto3,enum=openflow_13.OfpFlowRemovedReason" json:"reason,omitempty"`
+	TableId              uint32               `protobuf:"varint,4,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+	DurationSec          uint32               `protobuf:"varint,5,opt,name=duration_sec,json=durationSec,proto3" json:"duration_sec,omitempty"`
+	DurationNsec         uint32               `protobuf:"varint,6,opt,name=duration_nsec,json=durationNsec,proto3" json:"duration_nsec,omitempty"`
+	IdleTimeout          uint32               `protobuf:"varint,7,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"`
+	HardTimeout          uint32               `protobuf:"varint,8,opt,name=hard_timeout,json=hardTimeout,proto3" json:"hard_timeout,omitempty"`
+	PacketCount          uint64               `protobuf:"varint,9,opt,name=packet_count,json=packetCount,proto3" json:"packet_count,omitempty"`
+	ByteCount            uint64               `protobuf:"varint,10,opt,name=byte_count,json=byteCount,proto3" json:"byte_count,omitempty"`
+	Match                *OfpMatch            `protobuf:"bytes,121,opt,name=match,proto3" json:"match,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
+	XXX_unrecognized     []byte               `json:"-"`
+	XXX_sizecache        int32                `json:"-"`
+}
+
+func (m *OfpFlowRemoved) Reset()         { *m = OfpFlowRemoved{} }
+func (m *OfpFlowRemoved) String() string { return proto.CompactTextString(m) }
+func (*OfpFlowRemoved) ProtoMessage()    {}
+func (*OfpFlowRemoved) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{34}
+}
+func (m *OfpFlowRemoved) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpFlowRemoved.Unmarshal(m, b)
+}
+func (m *OfpFlowRemoved) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpFlowRemoved.Marshal(b, m, deterministic)
+}
+func (dst *OfpFlowRemoved) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpFlowRemoved.Merge(dst, src)
+}
+func (m *OfpFlowRemoved) XXX_Size() int {
+	return xxx_messageInfo_OfpFlowRemoved.Size(m)
+}
+func (m *OfpFlowRemoved) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpFlowRemoved.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpFlowRemoved proto.InternalMessageInfo
+
+func (m *OfpFlowRemoved) GetCookie() uint64 {
+	if m != nil {
+		return m.Cookie
+	}
+	return 0
+}
+
+func (m *OfpFlowRemoved) GetPriority() uint32 {
+	if m != nil {
+		return m.Priority
+	}
+	return 0
+}
+
+func (m *OfpFlowRemoved) GetReason() OfpFlowRemovedReason {
+	if m != nil {
+		return m.Reason
+	}
+	return OfpFlowRemovedReason_OFPRR_IDLE_TIMEOUT
+}
+
+func (m *OfpFlowRemoved) GetTableId() uint32 {
+	if m != nil {
+		return m.TableId
+	}
+	return 0
+}
+
+func (m *OfpFlowRemoved) GetDurationSec() uint32 {
+	if m != nil {
+		return m.DurationSec
+	}
+	return 0
+}
+
+func (m *OfpFlowRemoved) GetDurationNsec() uint32 {
+	if m != nil {
+		return m.DurationNsec
+	}
+	return 0
+}
+
+func (m *OfpFlowRemoved) GetIdleTimeout() uint32 {
+	if m != nil {
+		return m.IdleTimeout
+	}
+	return 0
+}
+
+func (m *OfpFlowRemoved) GetHardTimeout() uint32 {
+	if m != nil {
+		return m.HardTimeout
+	}
+	return 0
+}
+
+func (m *OfpFlowRemoved) GetPacketCount() uint64 {
+	if m != nil {
+		return m.PacketCount
+	}
+	return 0
+}
+
+func (m *OfpFlowRemoved) GetByteCount() uint64 {
+	if m != nil {
+		return m.ByteCount
+	}
+	return 0
+}
+
+func (m *OfpFlowRemoved) GetMatch() *OfpMatch {
+	if m != nil {
+		return m.Match
+	}
+	return nil
+}
+
+// Common header for all meter bands
+type OfpMeterBandHeader struct {
+	Type      OfpMeterBandType `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpMeterBandType" json:"type,omitempty"`
+	Len       uint32           `protobuf:"varint,2,opt,name=len,proto3" json:"len,omitempty"`
+	Rate      uint32           `protobuf:"varint,3,opt,name=rate,proto3" json:"rate,omitempty"`
+	BurstSize uint32           `protobuf:"varint,4,opt,name=burst_size,json=burstSize,proto3" json:"burst_size,omitempty"`
+	// Types that are valid to be assigned to Data:
+	//	*OfpMeterBandHeader_Drop
+	//	*OfpMeterBandHeader_DscpRemark
+	//	*OfpMeterBandHeader_Experimenter
+	Data                 isOfpMeterBandHeader_Data `protobuf_oneof:"data"`
+	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
+	XXX_unrecognized     []byte                    `json:"-"`
+	XXX_sizecache        int32                     `json:"-"`
+}
+
+func (m *OfpMeterBandHeader) Reset()         { *m = OfpMeterBandHeader{} }
+func (m *OfpMeterBandHeader) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterBandHeader) ProtoMessage()    {}
+func (*OfpMeterBandHeader) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{35}
+}
+func (m *OfpMeterBandHeader) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpMeterBandHeader.Unmarshal(m, b)
+}
+func (m *OfpMeterBandHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpMeterBandHeader.Marshal(b, m, deterministic)
+}
+func (dst *OfpMeterBandHeader) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpMeterBandHeader.Merge(dst, src)
+}
+func (m *OfpMeterBandHeader) XXX_Size() int {
+	return xxx_messageInfo_OfpMeterBandHeader.Size(m)
+}
+func (m *OfpMeterBandHeader) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpMeterBandHeader.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterBandHeader proto.InternalMessageInfo
+
+func (m *OfpMeterBandHeader) GetType() OfpMeterBandType {
+	if m != nil {
+		return m.Type
+	}
+	return OfpMeterBandType_OFPMBT_INVALID
+}
+
+func (m *OfpMeterBandHeader) GetLen() uint32 {
+	if m != nil {
+		return m.Len
+	}
+	return 0
+}
+
+func (m *OfpMeterBandHeader) GetRate() uint32 {
+	if m != nil {
+		return m.Rate
+	}
+	return 0
+}
+
+func (m *OfpMeterBandHeader) GetBurstSize() uint32 {
+	if m != nil {
+		return m.BurstSize
+	}
+	return 0
+}
+
+type isOfpMeterBandHeader_Data interface {
+	isOfpMeterBandHeader_Data()
+}
+
+type OfpMeterBandHeader_Drop struct {
+	Drop *OfpMeterBandDrop `protobuf:"bytes,5,opt,name=drop,proto3,oneof"`
+}
+
+type OfpMeterBandHeader_DscpRemark struct {
+	DscpRemark *OfpMeterBandDscpRemark `protobuf:"bytes,6,opt,name=dscp_remark,json=dscpRemark,proto3,oneof"`
+}
+
+type OfpMeterBandHeader_Experimenter struct {
+	Experimenter *OfpMeterBandExperimenter `protobuf:"bytes,7,opt,name=experimenter,proto3,oneof"`
+}
+
+func (*OfpMeterBandHeader_Drop) isOfpMeterBandHeader_Data() {}
+
+func (*OfpMeterBandHeader_DscpRemark) isOfpMeterBandHeader_Data() {}
+
+func (*OfpMeterBandHeader_Experimenter) isOfpMeterBandHeader_Data() {}
+
+func (m *OfpMeterBandHeader) GetData() isOfpMeterBandHeader_Data {
+	if m != nil {
+		return m.Data
+	}
+	return nil
+}
+
+func (m *OfpMeterBandHeader) GetDrop() *OfpMeterBandDrop {
+	if x, ok := m.GetData().(*OfpMeterBandHeader_Drop); ok {
+		return x.Drop
+	}
+	return nil
+}
+
+func (m *OfpMeterBandHeader) GetDscpRemark() *OfpMeterBandDscpRemark {
+	if x, ok := m.GetData().(*OfpMeterBandHeader_DscpRemark); ok {
+		return x.DscpRemark
+	}
+	return nil
+}
+
+func (m *OfpMeterBandHeader) GetExperimenter() *OfpMeterBandExperimenter {
+	if x, ok := m.GetData().(*OfpMeterBandHeader_Experimenter); ok {
+		return x.Experimenter
+	}
+	return nil
+}
+
+// XXX_OneofFuncs is for the internal use of the proto package.
+func (*OfpMeterBandHeader) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
+	return _OfpMeterBandHeader_OneofMarshaler, _OfpMeterBandHeader_OneofUnmarshaler, _OfpMeterBandHeader_OneofSizer, []interface{}{
+		(*OfpMeterBandHeader_Drop)(nil),
+		(*OfpMeterBandHeader_DscpRemark)(nil),
+		(*OfpMeterBandHeader_Experimenter)(nil),
+	}
+}
+
+func _OfpMeterBandHeader_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
+	m := msg.(*OfpMeterBandHeader)
+	// data
+	switch x := m.Data.(type) {
+	case *OfpMeterBandHeader_Drop:
+		b.EncodeVarint(5<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Drop); err != nil {
+			return err
+		}
+	case *OfpMeterBandHeader_DscpRemark:
+		b.EncodeVarint(6<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.DscpRemark); err != nil {
+			return err
+		}
+	case *OfpMeterBandHeader_Experimenter:
+		b.EncodeVarint(7<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Experimenter); err != nil {
+			return err
+		}
+	case nil:
+	default:
+		return fmt.Errorf("OfpMeterBandHeader.Data has unexpected type %T", x)
+	}
+	return nil
+}
+
+func _OfpMeterBandHeader_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
+	m := msg.(*OfpMeterBandHeader)
+	switch tag {
+	case 5: // data.drop
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpMeterBandDrop)
+		err := b.DecodeMessage(msg)
+		m.Data = &OfpMeterBandHeader_Drop{msg}
+		return true, err
+	case 6: // data.dscp_remark
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpMeterBandDscpRemark)
+		err := b.DecodeMessage(msg)
+		m.Data = &OfpMeterBandHeader_DscpRemark{msg}
+		return true, err
+	case 7: // data.experimenter
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpMeterBandExperimenter)
+		err := b.DecodeMessage(msg)
+		m.Data = &OfpMeterBandHeader_Experimenter{msg}
+		return true, err
+	default:
+		return false, nil
+	}
+}
+
+func _OfpMeterBandHeader_OneofSizer(msg proto.Message) (n int) {
+	m := msg.(*OfpMeterBandHeader)
+	// data
+	switch x := m.Data.(type) {
+	case *OfpMeterBandHeader_Drop:
+		s := proto.Size(x.Drop)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpMeterBandHeader_DscpRemark:
+		s := proto.Size(x.DscpRemark)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpMeterBandHeader_Experimenter:
+		s := proto.Size(x.Experimenter)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case nil:
+	default:
+		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
+	}
+	return n
+}
+
+// OFPMBT_DROP band - drop packets
+type OfpMeterBandDrop struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpMeterBandDrop) Reset()         { *m = OfpMeterBandDrop{} }
+func (m *OfpMeterBandDrop) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterBandDrop) ProtoMessage()    {}
+func (*OfpMeterBandDrop) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{36}
+}
+func (m *OfpMeterBandDrop) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpMeterBandDrop.Unmarshal(m, b)
+}
+func (m *OfpMeterBandDrop) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpMeterBandDrop.Marshal(b, m, deterministic)
+}
+func (dst *OfpMeterBandDrop) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpMeterBandDrop.Merge(dst, src)
+}
+func (m *OfpMeterBandDrop) XXX_Size() int {
+	return xxx_messageInfo_OfpMeterBandDrop.Size(m)
+}
+func (m *OfpMeterBandDrop) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpMeterBandDrop.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterBandDrop proto.InternalMessageInfo
+
+// OFPMBT_DSCP_REMARK band - Remark DSCP in the IP header
+type OfpMeterBandDscpRemark struct {
+	PrecLevel            uint32   `protobuf:"varint,1,opt,name=prec_level,json=precLevel,proto3" json:"prec_level,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpMeterBandDscpRemark) Reset()         { *m = OfpMeterBandDscpRemark{} }
+func (m *OfpMeterBandDscpRemark) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterBandDscpRemark) ProtoMessage()    {}
+func (*OfpMeterBandDscpRemark) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{37}
+}
+func (m *OfpMeterBandDscpRemark) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpMeterBandDscpRemark.Unmarshal(m, b)
+}
+func (m *OfpMeterBandDscpRemark) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpMeterBandDscpRemark.Marshal(b, m, deterministic)
+}
+func (dst *OfpMeterBandDscpRemark) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpMeterBandDscpRemark.Merge(dst, src)
+}
+func (m *OfpMeterBandDscpRemark) XXX_Size() int {
+	return xxx_messageInfo_OfpMeterBandDscpRemark.Size(m)
+}
+func (m *OfpMeterBandDscpRemark) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpMeterBandDscpRemark.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterBandDscpRemark proto.InternalMessageInfo
+
+func (m *OfpMeterBandDscpRemark) GetPrecLevel() uint32 {
+	if m != nil {
+		return m.PrecLevel
+	}
+	return 0
+}
+
+// OFPMBT_EXPERIMENTER band - Experimenter type.
+// The rest of the band is experimenter-defined.
+type OfpMeterBandExperimenter struct {
+	Experimenter         uint32   `protobuf:"varint,1,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpMeterBandExperimenter) Reset()         { *m = OfpMeterBandExperimenter{} }
+func (m *OfpMeterBandExperimenter) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterBandExperimenter) ProtoMessage()    {}
+func (*OfpMeterBandExperimenter) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{38}
+}
+func (m *OfpMeterBandExperimenter) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpMeterBandExperimenter.Unmarshal(m, b)
+}
+func (m *OfpMeterBandExperimenter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpMeterBandExperimenter.Marshal(b, m, deterministic)
+}
+func (dst *OfpMeterBandExperimenter) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpMeterBandExperimenter.Merge(dst, src)
+}
+func (m *OfpMeterBandExperimenter) XXX_Size() int {
+	return xxx_messageInfo_OfpMeterBandExperimenter.Size(m)
+}
+func (m *OfpMeterBandExperimenter) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpMeterBandExperimenter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterBandExperimenter proto.InternalMessageInfo
+
+func (m *OfpMeterBandExperimenter) GetExperimenter() uint32 {
+	if m != nil {
+		return m.Experimenter
+	}
+	return 0
+}
+
+// Meter configuration. OFPT_METER_MOD.
+type OfpMeterMod struct {
+	Command              OfpMeterModCommand    `protobuf:"varint,1,opt,name=command,proto3,enum=openflow_13.OfpMeterModCommand" json:"command,omitempty"`
+	Flags                uint32                `protobuf:"varint,2,opt,name=flags,proto3" json:"flags,omitempty"`
+	MeterId              uint32                `protobuf:"varint,3,opt,name=meter_id,json=meterId,proto3" json:"meter_id,omitempty"`
+	Bands                []*OfpMeterBandHeader `protobuf:"bytes,4,rep,name=bands,proto3" json:"bands,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *OfpMeterMod) Reset()         { *m = OfpMeterMod{} }
+func (m *OfpMeterMod) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterMod) ProtoMessage()    {}
+func (*OfpMeterMod) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{39}
+}
+func (m *OfpMeterMod) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpMeterMod.Unmarshal(m, b)
+}
+func (m *OfpMeterMod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpMeterMod.Marshal(b, m, deterministic)
+}
+func (dst *OfpMeterMod) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpMeterMod.Merge(dst, src)
+}
+func (m *OfpMeterMod) XXX_Size() int {
+	return xxx_messageInfo_OfpMeterMod.Size(m)
+}
+func (m *OfpMeterMod) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpMeterMod.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterMod proto.InternalMessageInfo
+
+func (m *OfpMeterMod) GetCommand() OfpMeterModCommand {
+	if m != nil {
+		return m.Command
+	}
+	return OfpMeterModCommand_OFPMC_ADD
+}
+
+func (m *OfpMeterMod) GetFlags() uint32 {
+	if m != nil {
+		return m.Flags
+	}
+	return 0
+}
+
+func (m *OfpMeterMod) GetMeterId() uint32 {
+	if m != nil {
+		return m.MeterId
+	}
+	return 0
+}
+
+func (m *OfpMeterMod) GetBands() []*OfpMeterBandHeader {
+	if m != nil {
+		return m.Bands
+	}
+	return nil
+}
+
+// OFPT_ERROR: Error message (datapath -> controller).
+type OfpErrorMsg struct {
+	// ofp_header header;
+	Type                 uint32   `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
+	Code                 uint32   `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
+	Data                 []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpErrorMsg) Reset()         { *m = OfpErrorMsg{} }
+func (m *OfpErrorMsg) String() string { return proto.CompactTextString(m) }
+func (*OfpErrorMsg) ProtoMessage()    {}
+func (*OfpErrorMsg) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{40}
+}
+func (m *OfpErrorMsg) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpErrorMsg.Unmarshal(m, b)
+}
+func (m *OfpErrorMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpErrorMsg.Marshal(b, m, deterministic)
+}
+func (dst *OfpErrorMsg) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpErrorMsg.Merge(dst, src)
+}
+func (m *OfpErrorMsg) XXX_Size() int {
+	return xxx_messageInfo_OfpErrorMsg.Size(m)
+}
+func (m *OfpErrorMsg) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpErrorMsg.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpErrorMsg proto.InternalMessageInfo
+
+func (m *OfpErrorMsg) GetType() uint32 {
+	if m != nil {
+		return m.Type
+	}
+	return 0
+}
+
+func (m *OfpErrorMsg) GetCode() uint32 {
+	if m != nil {
+		return m.Code
+	}
+	return 0
+}
+
+func (m *OfpErrorMsg) GetData() []byte {
+	if m != nil {
+		return m.Data
+	}
+	return nil
+}
+
+// OFPET_EXPERIMENTER: Error message (datapath -> controller).
+type OfpErrorExperimenterMsg struct {
+	Type                 uint32   `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
+	ExpType              uint32   `protobuf:"varint,2,opt,name=exp_type,json=expType,proto3" json:"exp_type,omitempty"`
+	Experimenter         uint32   `protobuf:"varint,3,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+	Data                 []byte   `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpErrorExperimenterMsg) Reset()         { *m = OfpErrorExperimenterMsg{} }
+func (m *OfpErrorExperimenterMsg) String() string { return proto.CompactTextString(m) }
+func (*OfpErrorExperimenterMsg) ProtoMessage()    {}
+func (*OfpErrorExperimenterMsg) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{41}
+}
+func (m *OfpErrorExperimenterMsg) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpErrorExperimenterMsg.Unmarshal(m, b)
+}
+func (m *OfpErrorExperimenterMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpErrorExperimenterMsg.Marshal(b, m, deterministic)
+}
+func (dst *OfpErrorExperimenterMsg) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpErrorExperimenterMsg.Merge(dst, src)
+}
+func (m *OfpErrorExperimenterMsg) XXX_Size() int {
+	return xxx_messageInfo_OfpErrorExperimenterMsg.Size(m)
+}
+func (m *OfpErrorExperimenterMsg) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpErrorExperimenterMsg.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpErrorExperimenterMsg proto.InternalMessageInfo
+
+func (m *OfpErrorExperimenterMsg) GetType() uint32 {
+	if m != nil {
+		return m.Type
+	}
+	return 0
+}
+
+func (m *OfpErrorExperimenterMsg) GetExpType() uint32 {
+	if m != nil {
+		return m.ExpType
+	}
+	return 0
+}
+
+func (m *OfpErrorExperimenterMsg) GetExperimenter() uint32 {
+	if m != nil {
+		return m.Experimenter
+	}
+	return 0
+}
+
+func (m *OfpErrorExperimenterMsg) GetData() []byte {
+	if m != nil {
+		return m.Data
+	}
+	return nil
+}
+
+type OfpMultipartRequest struct {
+	// ofp_header header;
+	Type                 OfpMultipartType `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpMultipartType" json:"type,omitempty"`
+	Flags                uint32           `protobuf:"varint,2,opt,name=flags,proto3" json:"flags,omitempty"`
+	Body                 []byte           `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
+}
+
+func (m *OfpMultipartRequest) Reset()         { *m = OfpMultipartRequest{} }
+func (m *OfpMultipartRequest) String() string { return proto.CompactTextString(m) }
+func (*OfpMultipartRequest) ProtoMessage()    {}
+func (*OfpMultipartRequest) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{42}
+}
+func (m *OfpMultipartRequest) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpMultipartRequest.Unmarshal(m, b)
+}
+func (m *OfpMultipartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpMultipartRequest.Marshal(b, m, deterministic)
+}
+func (dst *OfpMultipartRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpMultipartRequest.Merge(dst, src)
+}
+func (m *OfpMultipartRequest) XXX_Size() int {
+	return xxx_messageInfo_OfpMultipartRequest.Size(m)
+}
+func (m *OfpMultipartRequest) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpMultipartRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMultipartRequest proto.InternalMessageInfo
+
+func (m *OfpMultipartRequest) GetType() OfpMultipartType {
+	if m != nil {
+		return m.Type
+	}
+	return OfpMultipartType_OFPMP_DESC
+}
+
+func (m *OfpMultipartRequest) GetFlags() uint32 {
+	if m != nil {
+		return m.Flags
+	}
+	return 0
+}
+
+func (m *OfpMultipartRequest) GetBody() []byte {
+	if m != nil {
+		return m.Body
+	}
+	return nil
+}
+
+type OfpMultipartReply struct {
+	// ofp_header header;
+	Type                 OfpMultipartType `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpMultipartType" json:"type,omitempty"`
+	Flags                uint32           `protobuf:"varint,2,opt,name=flags,proto3" json:"flags,omitempty"`
+	Body                 []byte           `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
+}
+
+func (m *OfpMultipartReply) Reset()         { *m = OfpMultipartReply{} }
+func (m *OfpMultipartReply) String() string { return proto.CompactTextString(m) }
+func (*OfpMultipartReply) ProtoMessage()    {}
+func (*OfpMultipartReply) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{43}
+}
+func (m *OfpMultipartReply) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpMultipartReply.Unmarshal(m, b)
+}
+func (m *OfpMultipartReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpMultipartReply.Marshal(b, m, deterministic)
+}
+func (dst *OfpMultipartReply) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpMultipartReply.Merge(dst, src)
+}
+func (m *OfpMultipartReply) XXX_Size() int {
+	return xxx_messageInfo_OfpMultipartReply.Size(m)
+}
+func (m *OfpMultipartReply) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpMultipartReply.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMultipartReply proto.InternalMessageInfo
+
+func (m *OfpMultipartReply) GetType() OfpMultipartType {
+	if m != nil {
+		return m.Type
+	}
+	return OfpMultipartType_OFPMP_DESC
+}
+
+func (m *OfpMultipartReply) GetFlags() uint32 {
+	if m != nil {
+		return m.Flags
+	}
+	return 0
+}
+
+func (m *OfpMultipartReply) GetBody() []byte {
+	if m != nil {
+		return m.Body
+	}
+	return nil
+}
+
+// Body of reply to OFPMP_DESC request.  Each entry is a NULL-terminated
+// ASCII string.
+type OfpDesc struct {
+	MfrDesc              string   `protobuf:"bytes,1,opt,name=mfr_desc,json=mfrDesc,proto3" json:"mfr_desc,omitempty"`
+	HwDesc               string   `protobuf:"bytes,2,opt,name=hw_desc,json=hwDesc,proto3" json:"hw_desc,omitempty"`
+	SwDesc               string   `protobuf:"bytes,3,opt,name=sw_desc,json=swDesc,proto3" json:"sw_desc,omitempty"`
+	SerialNum            string   `protobuf:"bytes,4,opt,name=serial_num,json=serialNum,proto3" json:"serial_num,omitempty"`
+	DpDesc               string   `protobuf:"bytes,5,opt,name=dp_desc,json=dpDesc,proto3" json:"dp_desc,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpDesc) Reset()         { *m = OfpDesc{} }
+func (m *OfpDesc) String() string { return proto.CompactTextString(m) }
+func (*OfpDesc) ProtoMessage()    {}
+func (*OfpDesc) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{44}
+}
+func (m *OfpDesc) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpDesc.Unmarshal(m, b)
+}
+func (m *OfpDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpDesc.Marshal(b, m, deterministic)
+}
+func (dst *OfpDesc) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpDesc.Merge(dst, src)
+}
+func (m *OfpDesc) XXX_Size() int {
+	return xxx_messageInfo_OfpDesc.Size(m)
+}
+func (m *OfpDesc) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpDesc.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpDesc proto.InternalMessageInfo
+
+func (m *OfpDesc) GetMfrDesc() string {
+	if m != nil {
+		return m.MfrDesc
+	}
+	return ""
+}
+
+func (m *OfpDesc) GetHwDesc() string {
+	if m != nil {
+		return m.HwDesc
+	}
+	return ""
+}
+
+func (m *OfpDesc) GetSwDesc() string {
+	if m != nil {
+		return m.SwDesc
+	}
+	return ""
+}
+
+func (m *OfpDesc) GetSerialNum() string {
+	if m != nil {
+		return m.SerialNum
+	}
+	return ""
+}
+
+func (m *OfpDesc) GetDpDesc() string {
+	if m != nil {
+		return m.DpDesc
+	}
+	return ""
+}
+
+// Body for ofp_multipart_request of type OFPMP_FLOW.
+type OfpFlowStatsRequest struct {
+	TableId              uint32    `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+	OutPort              uint32    `protobuf:"varint,2,opt,name=out_port,json=outPort,proto3" json:"out_port,omitempty"`
+	OutGroup             uint32    `protobuf:"varint,3,opt,name=out_group,json=outGroup,proto3" json:"out_group,omitempty"`
+	Cookie               uint64    `protobuf:"varint,4,opt,name=cookie,proto3" json:"cookie,omitempty"`
+	CookieMask           uint64    `protobuf:"varint,5,opt,name=cookie_mask,json=cookieMask,proto3" json:"cookie_mask,omitempty"`
+	Match                *OfpMatch `protobuf:"bytes,6,opt,name=match,proto3" json:"match,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
+	XXX_unrecognized     []byte    `json:"-"`
+	XXX_sizecache        int32     `json:"-"`
+}
+
+func (m *OfpFlowStatsRequest) Reset()         { *m = OfpFlowStatsRequest{} }
+func (m *OfpFlowStatsRequest) String() string { return proto.CompactTextString(m) }
+func (*OfpFlowStatsRequest) ProtoMessage()    {}
+func (*OfpFlowStatsRequest) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{45}
+}
+func (m *OfpFlowStatsRequest) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpFlowStatsRequest.Unmarshal(m, b)
+}
+func (m *OfpFlowStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpFlowStatsRequest.Marshal(b, m, deterministic)
+}
+func (dst *OfpFlowStatsRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpFlowStatsRequest.Merge(dst, src)
+}
+func (m *OfpFlowStatsRequest) XXX_Size() int {
+	return xxx_messageInfo_OfpFlowStatsRequest.Size(m)
+}
+func (m *OfpFlowStatsRequest) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpFlowStatsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpFlowStatsRequest proto.InternalMessageInfo
+
+func (m *OfpFlowStatsRequest) GetTableId() uint32 {
+	if m != nil {
+		return m.TableId
+	}
+	return 0
+}
+
+func (m *OfpFlowStatsRequest) GetOutPort() uint32 {
+	if m != nil {
+		return m.OutPort
+	}
+	return 0
+}
+
+func (m *OfpFlowStatsRequest) GetOutGroup() uint32 {
+	if m != nil {
+		return m.OutGroup
+	}
+	return 0
+}
+
+func (m *OfpFlowStatsRequest) GetCookie() uint64 {
+	if m != nil {
+		return m.Cookie
+	}
+	return 0
+}
+
+func (m *OfpFlowStatsRequest) GetCookieMask() uint64 {
+	if m != nil {
+		return m.CookieMask
+	}
+	return 0
+}
+
+func (m *OfpFlowStatsRequest) GetMatch() *OfpMatch {
+	if m != nil {
+		return m.Match
+	}
+	return nil
+}
+
+// Body of reply to OFPMP_FLOW request.
+type OfpFlowStats struct {
+	Id                   uint64            `protobuf:"varint,14,opt,name=id,proto3" json:"id,omitempty"`
+	TableId              uint32            `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+	DurationSec          uint32            `protobuf:"varint,2,opt,name=duration_sec,json=durationSec,proto3" json:"duration_sec,omitempty"`
+	DurationNsec         uint32            `protobuf:"varint,3,opt,name=duration_nsec,json=durationNsec,proto3" json:"duration_nsec,omitempty"`
+	Priority             uint32            `protobuf:"varint,4,opt,name=priority,proto3" json:"priority,omitempty"`
+	IdleTimeout          uint32            `protobuf:"varint,5,opt,name=idle_timeout,json=idleTimeout,proto3" json:"idle_timeout,omitempty"`
+	HardTimeout          uint32            `protobuf:"varint,6,opt,name=hard_timeout,json=hardTimeout,proto3" json:"hard_timeout,omitempty"`
+	Flags                uint32            `protobuf:"varint,7,opt,name=flags,proto3" json:"flags,omitempty"`
+	Cookie               uint64            `protobuf:"varint,8,opt,name=cookie,proto3" json:"cookie,omitempty"`
+	PacketCount          uint64            `protobuf:"varint,9,opt,name=packet_count,json=packetCount,proto3" json:"packet_count,omitempty"`
+	ByteCount            uint64            `protobuf:"varint,10,opt,name=byte_count,json=byteCount,proto3" json:"byte_count,omitempty"`
+	Match                *OfpMatch         `protobuf:"bytes,12,opt,name=match,proto3" json:"match,omitempty"`
+	Instructions         []*OfpInstruction `protobuf:"bytes,13,rep,name=instructions,proto3" json:"instructions,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *OfpFlowStats) Reset()         { *m = OfpFlowStats{} }
+func (m *OfpFlowStats) String() string { return proto.CompactTextString(m) }
+func (*OfpFlowStats) ProtoMessage()    {}
+func (*OfpFlowStats) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{46}
+}
+func (m *OfpFlowStats) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpFlowStats.Unmarshal(m, b)
+}
+func (m *OfpFlowStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpFlowStats.Marshal(b, m, deterministic)
+}
+func (dst *OfpFlowStats) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpFlowStats.Merge(dst, src)
+}
+func (m *OfpFlowStats) XXX_Size() int {
+	return xxx_messageInfo_OfpFlowStats.Size(m)
+}
+func (m *OfpFlowStats) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpFlowStats.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpFlowStats proto.InternalMessageInfo
+
+func (m *OfpFlowStats) GetId() uint64 {
+	if m != nil {
+		return m.Id
+	}
+	return 0
+}
+
+func (m *OfpFlowStats) GetTableId() uint32 {
+	if m != nil {
+		return m.TableId
+	}
+	return 0
+}
+
+func (m *OfpFlowStats) GetDurationSec() uint32 {
+	if m != nil {
+		return m.DurationSec
+	}
+	return 0
+}
+
+func (m *OfpFlowStats) GetDurationNsec() uint32 {
+	if m != nil {
+		return m.DurationNsec
+	}
+	return 0
+}
+
+func (m *OfpFlowStats) GetPriority() uint32 {
+	if m != nil {
+		return m.Priority
+	}
+	return 0
+}
+
+func (m *OfpFlowStats) GetIdleTimeout() uint32 {
+	if m != nil {
+		return m.IdleTimeout
+	}
+	return 0
+}
+
+func (m *OfpFlowStats) GetHardTimeout() uint32 {
+	if m != nil {
+		return m.HardTimeout
+	}
+	return 0
+}
+
+func (m *OfpFlowStats) GetFlags() uint32 {
+	if m != nil {
+		return m.Flags
+	}
+	return 0
+}
+
+func (m *OfpFlowStats) GetCookie() uint64 {
+	if m != nil {
+		return m.Cookie
+	}
+	return 0
+}
+
+func (m *OfpFlowStats) GetPacketCount() uint64 {
+	if m != nil {
+		return m.PacketCount
+	}
+	return 0
+}
+
+func (m *OfpFlowStats) GetByteCount() uint64 {
+	if m != nil {
+		return m.ByteCount
+	}
+	return 0
+}
+
+func (m *OfpFlowStats) GetMatch() *OfpMatch {
+	if m != nil {
+		return m.Match
+	}
+	return nil
+}
+
+func (m *OfpFlowStats) GetInstructions() []*OfpInstruction {
+	if m != nil {
+		return m.Instructions
+	}
+	return nil
+}
+
+// Body for ofp_multipart_request of type OFPMP_AGGREGATE.
+type OfpAggregateStatsRequest struct {
+	TableId              uint32    `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+	OutPort              uint32    `protobuf:"varint,2,opt,name=out_port,json=outPort,proto3" json:"out_port,omitempty"`
+	OutGroup             uint32    `protobuf:"varint,3,opt,name=out_group,json=outGroup,proto3" json:"out_group,omitempty"`
+	Cookie               uint64    `protobuf:"varint,4,opt,name=cookie,proto3" json:"cookie,omitempty"`
+	CookieMask           uint64    `protobuf:"varint,5,opt,name=cookie_mask,json=cookieMask,proto3" json:"cookie_mask,omitempty"`
+	Match                *OfpMatch `protobuf:"bytes,6,opt,name=match,proto3" json:"match,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
+	XXX_unrecognized     []byte    `json:"-"`
+	XXX_sizecache        int32     `json:"-"`
+}
+
+func (m *OfpAggregateStatsRequest) Reset()         { *m = OfpAggregateStatsRequest{} }
+func (m *OfpAggregateStatsRequest) String() string { return proto.CompactTextString(m) }
+func (*OfpAggregateStatsRequest) ProtoMessage()    {}
+func (*OfpAggregateStatsRequest) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{47}
+}
+func (m *OfpAggregateStatsRequest) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpAggregateStatsRequest.Unmarshal(m, b)
+}
+func (m *OfpAggregateStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpAggregateStatsRequest.Marshal(b, m, deterministic)
+}
+func (dst *OfpAggregateStatsRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpAggregateStatsRequest.Merge(dst, src)
+}
+func (m *OfpAggregateStatsRequest) XXX_Size() int {
+	return xxx_messageInfo_OfpAggregateStatsRequest.Size(m)
+}
+func (m *OfpAggregateStatsRequest) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpAggregateStatsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpAggregateStatsRequest proto.InternalMessageInfo
+
+func (m *OfpAggregateStatsRequest) GetTableId() uint32 {
+	if m != nil {
+		return m.TableId
+	}
+	return 0
+}
+
+func (m *OfpAggregateStatsRequest) GetOutPort() uint32 {
+	if m != nil {
+		return m.OutPort
+	}
+	return 0
+}
+
+func (m *OfpAggregateStatsRequest) GetOutGroup() uint32 {
+	if m != nil {
+		return m.OutGroup
+	}
+	return 0
+}
+
+func (m *OfpAggregateStatsRequest) GetCookie() uint64 {
+	if m != nil {
+		return m.Cookie
+	}
+	return 0
+}
+
+func (m *OfpAggregateStatsRequest) GetCookieMask() uint64 {
+	if m != nil {
+		return m.CookieMask
+	}
+	return 0
+}
+
+func (m *OfpAggregateStatsRequest) GetMatch() *OfpMatch {
+	if m != nil {
+		return m.Match
+	}
+	return nil
+}
+
+// Body of reply to OFPMP_AGGREGATE request.
+type OfpAggregateStatsReply struct {
+	PacketCount          uint64   `protobuf:"varint,1,opt,name=packet_count,json=packetCount,proto3" json:"packet_count,omitempty"`
+	ByteCount            uint64   `protobuf:"varint,2,opt,name=byte_count,json=byteCount,proto3" json:"byte_count,omitempty"`
+	FlowCount            uint32   `protobuf:"varint,3,opt,name=flow_count,json=flowCount,proto3" json:"flow_count,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpAggregateStatsReply) Reset()         { *m = OfpAggregateStatsReply{} }
+func (m *OfpAggregateStatsReply) String() string { return proto.CompactTextString(m) }
+func (*OfpAggregateStatsReply) ProtoMessage()    {}
+func (*OfpAggregateStatsReply) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{48}
+}
+func (m *OfpAggregateStatsReply) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpAggregateStatsReply.Unmarshal(m, b)
+}
+func (m *OfpAggregateStatsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpAggregateStatsReply.Marshal(b, m, deterministic)
+}
+func (dst *OfpAggregateStatsReply) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpAggregateStatsReply.Merge(dst, src)
+}
+func (m *OfpAggregateStatsReply) XXX_Size() int {
+	return xxx_messageInfo_OfpAggregateStatsReply.Size(m)
+}
+func (m *OfpAggregateStatsReply) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpAggregateStatsReply.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpAggregateStatsReply proto.InternalMessageInfo
+
+func (m *OfpAggregateStatsReply) GetPacketCount() uint64 {
+	if m != nil {
+		return m.PacketCount
+	}
+	return 0
+}
+
+func (m *OfpAggregateStatsReply) GetByteCount() uint64 {
+	if m != nil {
+		return m.ByteCount
+	}
+	return 0
+}
+
+func (m *OfpAggregateStatsReply) GetFlowCount() uint32 {
+	if m != nil {
+		return m.FlowCount
+	}
+	return 0
+}
+
+// Common header for all Table Feature Properties
+type OfpTableFeatureProperty struct {
+	Type OfpTableFeaturePropType `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpTableFeaturePropType" json:"type,omitempty"`
+	// Types that are valid to be assigned to Value:
+	//	*OfpTableFeatureProperty_Instructions
+	//	*OfpTableFeatureProperty_NextTables
+	//	*OfpTableFeatureProperty_Actions
+	//	*OfpTableFeatureProperty_Oxm
+	//	*OfpTableFeatureProperty_Experimenter
+	Value                isOfpTableFeatureProperty_Value `protobuf_oneof:"value"`
+	XXX_NoUnkeyedLiteral struct{}                        `json:"-"`
+	XXX_unrecognized     []byte                          `json:"-"`
+	XXX_sizecache        int32                           `json:"-"`
+}
+
+func (m *OfpTableFeatureProperty) Reset()         { *m = OfpTableFeatureProperty{} }
+func (m *OfpTableFeatureProperty) String() string { return proto.CompactTextString(m) }
+func (*OfpTableFeatureProperty) ProtoMessage()    {}
+func (*OfpTableFeatureProperty) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{49}
+}
+func (m *OfpTableFeatureProperty) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpTableFeatureProperty.Unmarshal(m, b)
+}
+func (m *OfpTableFeatureProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpTableFeatureProperty.Marshal(b, m, deterministic)
+}
+func (dst *OfpTableFeatureProperty) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpTableFeatureProperty.Merge(dst, src)
+}
+func (m *OfpTableFeatureProperty) XXX_Size() int {
+	return xxx_messageInfo_OfpTableFeatureProperty.Size(m)
+}
+func (m *OfpTableFeatureProperty) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpTableFeatureProperty.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableFeatureProperty proto.InternalMessageInfo
+
+func (m *OfpTableFeatureProperty) GetType() OfpTableFeaturePropType {
+	if m != nil {
+		return m.Type
+	}
+	return OfpTableFeaturePropType_OFPTFPT_INSTRUCTIONS
+}
+
+type isOfpTableFeatureProperty_Value interface {
+	isOfpTableFeatureProperty_Value()
+}
+
+type OfpTableFeatureProperty_Instructions struct {
+	Instructions *OfpTableFeaturePropInstructions `protobuf:"bytes,2,opt,name=instructions,proto3,oneof"`
+}
+
+type OfpTableFeatureProperty_NextTables struct {
+	NextTables *OfpTableFeaturePropNextTables `protobuf:"bytes,3,opt,name=next_tables,json=nextTables,proto3,oneof"`
+}
+
+type OfpTableFeatureProperty_Actions struct {
+	Actions *OfpTableFeaturePropActions `protobuf:"bytes,4,opt,name=actions,proto3,oneof"`
+}
+
+type OfpTableFeatureProperty_Oxm struct {
+	Oxm *OfpTableFeaturePropOxm `protobuf:"bytes,5,opt,name=oxm,proto3,oneof"`
+}
+
+type OfpTableFeatureProperty_Experimenter struct {
+	Experimenter *OfpTableFeaturePropExperimenter `protobuf:"bytes,6,opt,name=experimenter,proto3,oneof"`
+}
+
+func (*OfpTableFeatureProperty_Instructions) isOfpTableFeatureProperty_Value() {}
+
+func (*OfpTableFeatureProperty_NextTables) isOfpTableFeatureProperty_Value() {}
+
+func (*OfpTableFeatureProperty_Actions) isOfpTableFeatureProperty_Value() {}
+
+func (*OfpTableFeatureProperty_Oxm) isOfpTableFeatureProperty_Value() {}
+
+func (*OfpTableFeatureProperty_Experimenter) isOfpTableFeatureProperty_Value() {}
+
+func (m *OfpTableFeatureProperty) GetValue() isOfpTableFeatureProperty_Value {
+	if m != nil {
+		return m.Value
+	}
+	return nil
+}
+
+func (m *OfpTableFeatureProperty) GetInstructions() *OfpTableFeaturePropInstructions {
+	if x, ok := m.GetValue().(*OfpTableFeatureProperty_Instructions); ok {
+		return x.Instructions
+	}
+	return nil
+}
+
+func (m *OfpTableFeatureProperty) GetNextTables() *OfpTableFeaturePropNextTables {
+	if x, ok := m.GetValue().(*OfpTableFeatureProperty_NextTables); ok {
+		return x.NextTables
+	}
+	return nil
+}
+
+func (m *OfpTableFeatureProperty) GetActions() *OfpTableFeaturePropActions {
+	if x, ok := m.GetValue().(*OfpTableFeatureProperty_Actions); ok {
+		return x.Actions
+	}
+	return nil
+}
+
+func (m *OfpTableFeatureProperty) GetOxm() *OfpTableFeaturePropOxm {
+	if x, ok := m.GetValue().(*OfpTableFeatureProperty_Oxm); ok {
+		return x.Oxm
+	}
+	return nil
+}
+
+func (m *OfpTableFeatureProperty) GetExperimenter() *OfpTableFeaturePropExperimenter {
+	if x, ok := m.GetValue().(*OfpTableFeatureProperty_Experimenter); ok {
+		return x.Experimenter
+	}
+	return nil
+}
+
+// XXX_OneofFuncs is for the internal use of the proto package.
+func (*OfpTableFeatureProperty) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
+	return _OfpTableFeatureProperty_OneofMarshaler, _OfpTableFeatureProperty_OneofUnmarshaler, _OfpTableFeatureProperty_OneofSizer, []interface{}{
+		(*OfpTableFeatureProperty_Instructions)(nil),
+		(*OfpTableFeatureProperty_NextTables)(nil),
+		(*OfpTableFeatureProperty_Actions)(nil),
+		(*OfpTableFeatureProperty_Oxm)(nil),
+		(*OfpTableFeatureProperty_Experimenter)(nil),
+	}
+}
+
+func _OfpTableFeatureProperty_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
+	m := msg.(*OfpTableFeatureProperty)
+	// value
+	switch x := m.Value.(type) {
+	case *OfpTableFeatureProperty_Instructions:
+		b.EncodeVarint(2<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Instructions); err != nil {
+			return err
+		}
+	case *OfpTableFeatureProperty_NextTables:
+		b.EncodeVarint(3<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.NextTables); err != nil {
+			return err
+		}
+	case *OfpTableFeatureProperty_Actions:
+		b.EncodeVarint(4<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Actions); err != nil {
+			return err
+		}
+	case *OfpTableFeatureProperty_Oxm:
+		b.EncodeVarint(5<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Oxm); err != nil {
+			return err
+		}
+	case *OfpTableFeatureProperty_Experimenter:
+		b.EncodeVarint(6<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.Experimenter); err != nil {
+			return err
+		}
+	case nil:
+	default:
+		return fmt.Errorf("OfpTableFeatureProperty.Value has unexpected type %T", x)
+	}
+	return nil
+}
+
+func _OfpTableFeatureProperty_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
+	m := msg.(*OfpTableFeatureProperty)
+	switch tag {
+	case 2: // value.instructions
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpTableFeaturePropInstructions)
+		err := b.DecodeMessage(msg)
+		m.Value = &OfpTableFeatureProperty_Instructions{msg}
+		return true, err
+	case 3: // value.next_tables
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpTableFeaturePropNextTables)
+		err := b.DecodeMessage(msg)
+		m.Value = &OfpTableFeatureProperty_NextTables{msg}
+		return true, err
+	case 4: // value.actions
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpTableFeaturePropActions)
+		err := b.DecodeMessage(msg)
+		m.Value = &OfpTableFeatureProperty_Actions{msg}
+		return true, err
+	case 5: // value.oxm
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpTableFeaturePropOxm)
+		err := b.DecodeMessage(msg)
+		m.Value = &OfpTableFeatureProperty_Oxm{msg}
+		return true, err
+	case 6: // value.experimenter
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpTableFeaturePropExperimenter)
+		err := b.DecodeMessage(msg)
+		m.Value = &OfpTableFeatureProperty_Experimenter{msg}
+		return true, err
+	default:
+		return false, nil
+	}
+}
+
+func _OfpTableFeatureProperty_OneofSizer(msg proto.Message) (n int) {
+	m := msg.(*OfpTableFeatureProperty)
+	// value
+	switch x := m.Value.(type) {
+	case *OfpTableFeatureProperty_Instructions:
+		s := proto.Size(x.Instructions)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpTableFeatureProperty_NextTables:
+		s := proto.Size(x.NextTables)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpTableFeatureProperty_Actions:
+		s := proto.Size(x.Actions)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpTableFeatureProperty_Oxm:
+		s := proto.Size(x.Oxm)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case *OfpTableFeatureProperty_Experimenter:
+		s := proto.Size(x.Experimenter)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case nil:
+	default:
+		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
+	}
+	return n
+}
+
+// Instructions property
+type OfpTableFeaturePropInstructions struct {
+	// One of OFPTFPT_INSTRUCTIONS,
+	// OFPTFPT_INSTRUCTIONS_MISS.
+	Instructions         []*OfpInstruction `protobuf:"bytes,1,rep,name=instructions,proto3" json:"instructions,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *OfpTableFeaturePropInstructions) Reset()         { *m = OfpTableFeaturePropInstructions{} }
+func (m *OfpTableFeaturePropInstructions) String() string { return proto.CompactTextString(m) }
+func (*OfpTableFeaturePropInstructions) ProtoMessage()    {}
+func (*OfpTableFeaturePropInstructions) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{50}
+}
+func (m *OfpTableFeaturePropInstructions) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpTableFeaturePropInstructions.Unmarshal(m, b)
+}
+func (m *OfpTableFeaturePropInstructions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpTableFeaturePropInstructions.Marshal(b, m, deterministic)
+}
+func (dst *OfpTableFeaturePropInstructions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpTableFeaturePropInstructions.Merge(dst, src)
+}
+func (m *OfpTableFeaturePropInstructions) XXX_Size() int {
+	return xxx_messageInfo_OfpTableFeaturePropInstructions.Size(m)
+}
+func (m *OfpTableFeaturePropInstructions) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpTableFeaturePropInstructions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableFeaturePropInstructions proto.InternalMessageInfo
+
+func (m *OfpTableFeaturePropInstructions) GetInstructions() []*OfpInstruction {
+	if m != nil {
+		return m.Instructions
+	}
+	return nil
+}
+
+// Next Tables property
+type OfpTableFeaturePropNextTables struct {
+	// One of OFPTFPT_NEXT_TABLES,
+	// OFPTFPT_NEXT_TABLES_MISS.
+	NextTableIds         []uint32 `protobuf:"varint,1,rep,packed,name=next_table_ids,json=nextTableIds,proto3" json:"next_table_ids,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpTableFeaturePropNextTables) Reset()         { *m = OfpTableFeaturePropNextTables{} }
+func (m *OfpTableFeaturePropNextTables) String() string { return proto.CompactTextString(m) }
+func (*OfpTableFeaturePropNextTables) ProtoMessage()    {}
+func (*OfpTableFeaturePropNextTables) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{51}
+}
+func (m *OfpTableFeaturePropNextTables) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpTableFeaturePropNextTables.Unmarshal(m, b)
+}
+func (m *OfpTableFeaturePropNextTables) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpTableFeaturePropNextTables.Marshal(b, m, deterministic)
+}
+func (dst *OfpTableFeaturePropNextTables) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpTableFeaturePropNextTables.Merge(dst, src)
+}
+func (m *OfpTableFeaturePropNextTables) XXX_Size() int {
+	return xxx_messageInfo_OfpTableFeaturePropNextTables.Size(m)
+}
+func (m *OfpTableFeaturePropNextTables) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpTableFeaturePropNextTables.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableFeaturePropNextTables proto.InternalMessageInfo
+
+func (m *OfpTableFeaturePropNextTables) GetNextTableIds() []uint32 {
+	if m != nil {
+		return m.NextTableIds
+	}
+	return nil
+}
+
+// Actions property
+type OfpTableFeaturePropActions struct {
+	// One of OFPTFPT_WRITE_ACTIONS,
+	// OFPTFPT_WRITE_ACTIONS_MISS,
+	// OFPTFPT_APPLY_ACTIONS,
+	// OFPTFPT_APPLY_ACTIONS_MISS.
+	Actions              []*OfpAction `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
+	XXX_unrecognized     []byte       `json:"-"`
+	XXX_sizecache        int32        `json:"-"`
+}
+
+func (m *OfpTableFeaturePropActions) Reset()         { *m = OfpTableFeaturePropActions{} }
+func (m *OfpTableFeaturePropActions) String() string { return proto.CompactTextString(m) }
+func (*OfpTableFeaturePropActions) ProtoMessage()    {}
+func (*OfpTableFeaturePropActions) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{52}
+}
+func (m *OfpTableFeaturePropActions) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpTableFeaturePropActions.Unmarshal(m, b)
+}
+func (m *OfpTableFeaturePropActions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpTableFeaturePropActions.Marshal(b, m, deterministic)
+}
+func (dst *OfpTableFeaturePropActions) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpTableFeaturePropActions.Merge(dst, src)
+}
+func (m *OfpTableFeaturePropActions) XXX_Size() int {
+	return xxx_messageInfo_OfpTableFeaturePropActions.Size(m)
+}
+func (m *OfpTableFeaturePropActions) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpTableFeaturePropActions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableFeaturePropActions proto.InternalMessageInfo
+
+func (m *OfpTableFeaturePropActions) GetActions() []*OfpAction {
+	if m != nil {
+		return m.Actions
+	}
+	return nil
+}
+
+// Match, Wildcard or Set-Field property
+type OfpTableFeaturePropOxm struct {
+	// TODO is this a uint32???
+	OxmIds               []uint32 `protobuf:"varint,3,rep,packed,name=oxm_ids,json=oxmIds,proto3" json:"oxm_ids,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpTableFeaturePropOxm) Reset()         { *m = OfpTableFeaturePropOxm{} }
+func (m *OfpTableFeaturePropOxm) String() string { return proto.CompactTextString(m) }
+func (*OfpTableFeaturePropOxm) ProtoMessage()    {}
+func (*OfpTableFeaturePropOxm) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{53}
+}
+func (m *OfpTableFeaturePropOxm) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpTableFeaturePropOxm.Unmarshal(m, b)
+}
+func (m *OfpTableFeaturePropOxm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpTableFeaturePropOxm.Marshal(b, m, deterministic)
+}
+func (dst *OfpTableFeaturePropOxm) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpTableFeaturePropOxm.Merge(dst, src)
+}
+func (m *OfpTableFeaturePropOxm) XXX_Size() int {
+	return xxx_messageInfo_OfpTableFeaturePropOxm.Size(m)
+}
+func (m *OfpTableFeaturePropOxm) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpTableFeaturePropOxm.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableFeaturePropOxm proto.InternalMessageInfo
+
+func (m *OfpTableFeaturePropOxm) GetOxmIds() []uint32 {
+	if m != nil {
+		return m.OxmIds
+	}
+	return nil
+}
+
+// Experimenter table feature property
+type OfpTableFeaturePropExperimenter struct {
+	// One of OFPTFPT_EXPERIMENTER,
+	// OFPTFPT_EXPERIMENTER_MISS.
+	Experimenter         uint32   `protobuf:"varint,2,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+	ExpType              uint32   `protobuf:"varint,3,opt,name=exp_type,json=expType,proto3" json:"exp_type,omitempty"`
+	ExperimenterData     []uint32 `protobuf:"varint,4,rep,packed,name=experimenter_data,json=experimenterData,proto3" json:"experimenter_data,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpTableFeaturePropExperimenter) Reset()         { *m = OfpTableFeaturePropExperimenter{} }
+func (m *OfpTableFeaturePropExperimenter) String() string { return proto.CompactTextString(m) }
+func (*OfpTableFeaturePropExperimenter) ProtoMessage()    {}
+func (*OfpTableFeaturePropExperimenter) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{54}
+}
+func (m *OfpTableFeaturePropExperimenter) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpTableFeaturePropExperimenter.Unmarshal(m, b)
+}
+func (m *OfpTableFeaturePropExperimenter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpTableFeaturePropExperimenter.Marshal(b, m, deterministic)
+}
+func (dst *OfpTableFeaturePropExperimenter) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpTableFeaturePropExperimenter.Merge(dst, src)
+}
+func (m *OfpTableFeaturePropExperimenter) XXX_Size() int {
+	return xxx_messageInfo_OfpTableFeaturePropExperimenter.Size(m)
+}
+func (m *OfpTableFeaturePropExperimenter) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpTableFeaturePropExperimenter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableFeaturePropExperimenter proto.InternalMessageInfo
+
+func (m *OfpTableFeaturePropExperimenter) GetExperimenter() uint32 {
+	if m != nil {
+		return m.Experimenter
+	}
+	return 0
+}
+
+func (m *OfpTableFeaturePropExperimenter) GetExpType() uint32 {
+	if m != nil {
+		return m.ExpType
+	}
+	return 0
+}
+
+func (m *OfpTableFeaturePropExperimenter) GetExperimenterData() []uint32 {
+	if m != nil {
+		return m.ExperimenterData
+	}
+	return nil
+}
+
+// Body for ofp_multipart_request of type OFPMP_TABLE_FEATURES./
+// Body of reply to OFPMP_TABLE_FEATURES request.
+type OfpTableFeatures struct {
+	TableId       uint32 `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+	Name          string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+	MetadataMatch uint64 `protobuf:"varint,3,opt,name=metadata_match,json=metadataMatch,proto3" json:"metadata_match,omitempty"`
+	MetadataWrite uint64 `protobuf:"varint,4,opt,name=metadata_write,json=metadataWrite,proto3" json:"metadata_write,omitempty"`
+	Config        uint32 `protobuf:"varint,5,opt,name=config,proto3" json:"config,omitempty"`
+	MaxEntries    uint32 `protobuf:"varint,6,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty"`
+	// Table Feature Property list
+	Properties           []*OfpTableFeatureProperty `protobuf:"bytes,7,rep,name=properties,proto3" json:"properties,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
+	XXX_unrecognized     []byte                     `json:"-"`
+	XXX_sizecache        int32                      `json:"-"`
+}
+
+func (m *OfpTableFeatures) Reset()         { *m = OfpTableFeatures{} }
+func (m *OfpTableFeatures) String() string { return proto.CompactTextString(m) }
+func (*OfpTableFeatures) ProtoMessage()    {}
+func (*OfpTableFeatures) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{55}
+}
+func (m *OfpTableFeatures) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpTableFeatures.Unmarshal(m, b)
+}
+func (m *OfpTableFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpTableFeatures.Marshal(b, m, deterministic)
+}
+func (dst *OfpTableFeatures) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpTableFeatures.Merge(dst, src)
+}
+func (m *OfpTableFeatures) XXX_Size() int {
+	return xxx_messageInfo_OfpTableFeatures.Size(m)
+}
+func (m *OfpTableFeatures) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpTableFeatures.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableFeatures proto.InternalMessageInfo
+
+func (m *OfpTableFeatures) GetTableId() uint32 {
+	if m != nil {
+		return m.TableId
+	}
+	return 0
+}
+
+func (m *OfpTableFeatures) GetName() string {
+	if m != nil {
+		return m.Name
+	}
+	return ""
+}
+
+func (m *OfpTableFeatures) GetMetadataMatch() uint64 {
+	if m != nil {
+		return m.MetadataMatch
+	}
+	return 0
+}
+
+func (m *OfpTableFeatures) GetMetadataWrite() uint64 {
+	if m != nil {
+		return m.MetadataWrite
+	}
+	return 0
+}
+
+func (m *OfpTableFeatures) GetConfig() uint32 {
+	if m != nil {
+		return m.Config
+	}
+	return 0
+}
+
+func (m *OfpTableFeatures) GetMaxEntries() uint32 {
+	if m != nil {
+		return m.MaxEntries
+	}
+	return 0
+}
+
+func (m *OfpTableFeatures) GetProperties() []*OfpTableFeatureProperty {
+	if m != nil {
+		return m.Properties
+	}
+	return nil
+}
+
+// Body of reply to OFPMP_TABLE request.
+type OfpTableStats struct {
+	TableId              uint32   `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"`
+	ActiveCount          uint32   `protobuf:"varint,2,opt,name=active_count,json=activeCount,proto3" json:"active_count,omitempty"`
+	LookupCount          uint64   `protobuf:"varint,3,opt,name=lookup_count,json=lookupCount,proto3" json:"lookup_count,omitempty"`
+	MatchedCount         uint64   `protobuf:"varint,4,opt,name=matched_count,json=matchedCount,proto3" json:"matched_count,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpTableStats) Reset()         { *m = OfpTableStats{} }
+func (m *OfpTableStats) String() string { return proto.CompactTextString(m) }
+func (*OfpTableStats) ProtoMessage()    {}
+func (*OfpTableStats) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{56}
+}
+func (m *OfpTableStats) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpTableStats.Unmarshal(m, b)
+}
+func (m *OfpTableStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpTableStats.Marshal(b, m, deterministic)
+}
+func (dst *OfpTableStats) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpTableStats.Merge(dst, src)
+}
+func (m *OfpTableStats) XXX_Size() int {
+	return xxx_messageInfo_OfpTableStats.Size(m)
+}
+func (m *OfpTableStats) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpTableStats.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpTableStats proto.InternalMessageInfo
+
+func (m *OfpTableStats) GetTableId() uint32 {
+	if m != nil {
+		return m.TableId
+	}
+	return 0
+}
+
+func (m *OfpTableStats) GetActiveCount() uint32 {
+	if m != nil {
+		return m.ActiveCount
+	}
+	return 0
+}
+
+func (m *OfpTableStats) GetLookupCount() uint64 {
+	if m != nil {
+		return m.LookupCount
+	}
+	return 0
+}
+
+func (m *OfpTableStats) GetMatchedCount() uint64 {
+	if m != nil {
+		return m.MatchedCount
+	}
+	return 0
+}
+
+// Body for ofp_multipart_request of type OFPMP_PORT.
+type OfpPortStatsRequest struct {
+	PortNo               uint32   `protobuf:"varint,1,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpPortStatsRequest) Reset()         { *m = OfpPortStatsRequest{} }
+func (m *OfpPortStatsRequest) String() string { return proto.CompactTextString(m) }
+func (*OfpPortStatsRequest) ProtoMessage()    {}
+func (*OfpPortStatsRequest) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{57}
+}
+func (m *OfpPortStatsRequest) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpPortStatsRequest.Unmarshal(m, b)
+}
+func (m *OfpPortStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpPortStatsRequest.Marshal(b, m, deterministic)
+}
+func (dst *OfpPortStatsRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpPortStatsRequest.Merge(dst, src)
+}
+func (m *OfpPortStatsRequest) XXX_Size() int {
+	return xxx_messageInfo_OfpPortStatsRequest.Size(m)
+}
+func (m *OfpPortStatsRequest) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpPortStatsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpPortStatsRequest proto.InternalMessageInfo
+
+func (m *OfpPortStatsRequest) GetPortNo() uint32 {
+	if m != nil {
+		return m.PortNo
+	}
+	return 0
+}
+
+// Body of reply to OFPMP_PORT request. If a counter is unsupported, set
+// the field to all ones.
+type OfpPortStats struct {
+	PortNo               uint32   `protobuf:"varint,1,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"`
+	RxPackets            uint64   `protobuf:"varint,2,opt,name=rx_packets,json=rxPackets,proto3" json:"rx_packets,omitempty"`
+	TxPackets            uint64   `protobuf:"varint,3,opt,name=tx_packets,json=txPackets,proto3" json:"tx_packets,omitempty"`
+	RxBytes              uint64   `protobuf:"varint,4,opt,name=rx_bytes,json=rxBytes,proto3" json:"rx_bytes,omitempty"`
+	TxBytes              uint64   `protobuf:"varint,5,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"`
+	RxDropped            uint64   `protobuf:"varint,6,opt,name=rx_dropped,json=rxDropped,proto3" json:"rx_dropped,omitempty"`
+	TxDropped            uint64   `protobuf:"varint,7,opt,name=tx_dropped,json=txDropped,proto3" json:"tx_dropped,omitempty"`
+	RxErrors             uint64   `protobuf:"varint,8,opt,name=rx_errors,json=rxErrors,proto3" json:"rx_errors,omitempty"`
+	TxErrors             uint64   `protobuf:"varint,9,opt,name=tx_errors,json=txErrors,proto3" json:"tx_errors,omitempty"`
+	RxFrameErr           uint64   `protobuf:"varint,10,opt,name=rx_frame_err,json=rxFrameErr,proto3" json:"rx_frame_err,omitempty"`
+	RxOverErr            uint64   `protobuf:"varint,11,opt,name=rx_over_err,json=rxOverErr,proto3" json:"rx_over_err,omitempty"`
+	RxCrcErr             uint64   `protobuf:"varint,12,opt,name=rx_crc_err,json=rxCrcErr,proto3" json:"rx_crc_err,omitempty"`
+	Collisions           uint64   `protobuf:"varint,13,opt,name=collisions,proto3" json:"collisions,omitempty"`
+	DurationSec          uint32   `protobuf:"varint,14,opt,name=duration_sec,json=durationSec,proto3" json:"duration_sec,omitempty"`
+	DurationNsec         uint32   `protobuf:"varint,15,opt,name=duration_nsec,json=durationNsec,proto3" json:"duration_nsec,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpPortStats) Reset()         { *m = OfpPortStats{} }
+func (m *OfpPortStats) String() string { return proto.CompactTextString(m) }
+func (*OfpPortStats) ProtoMessage()    {}
+func (*OfpPortStats) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{58}
+}
+func (m *OfpPortStats) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpPortStats.Unmarshal(m, b)
+}
+func (m *OfpPortStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpPortStats.Marshal(b, m, deterministic)
+}
+func (dst *OfpPortStats) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpPortStats.Merge(dst, src)
+}
+func (m *OfpPortStats) XXX_Size() int {
+	return xxx_messageInfo_OfpPortStats.Size(m)
+}
+func (m *OfpPortStats) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpPortStats.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpPortStats proto.InternalMessageInfo
+
+func (m *OfpPortStats) GetPortNo() uint32 {
+	if m != nil {
+		return m.PortNo
+	}
+	return 0
+}
+
+func (m *OfpPortStats) GetRxPackets() uint64 {
+	if m != nil {
+		return m.RxPackets
+	}
+	return 0
+}
+
+func (m *OfpPortStats) GetTxPackets() uint64 {
+	if m != nil {
+		return m.TxPackets
+	}
+	return 0
+}
+
+func (m *OfpPortStats) GetRxBytes() uint64 {
+	if m != nil {
+		return m.RxBytes
+	}
+	return 0
+}
+
+func (m *OfpPortStats) GetTxBytes() uint64 {
+	if m != nil {
+		return m.TxBytes
+	}
+	return 0
+}
+
+func (m *OfpPortStats) GetRxDropped() uint64 {
+	if m != nil {
+		return m.RxDropped
+	}
+	return 0
+}
+
+func (m *OfpPortStats) GetTxDropped() uint64 {
+	if m != nil {
+		return m.TxDropped
+	}
+	return 0
+}
+
+func (m *OfpPortStats) GetRxErrors() uint64 {
+	if m != nil {
+		return m.RxErrors
+	}
+	return 0
+}
+
+func (m *OfpPortStats) GetTxErrors() uint64 {
+	if m != nil {
+		return m.TxErrors
+	}
+	return 0
+}
+
+func (m *OfpPortStats) GetRxFrameErr() uint64 {
+	if m != nil {
+		return m.RxFrameErr
+	}
+	return 0
+}
+
+func (m *OfpPortStats) GetRxOverErr() uint64 {
+	if m != nil {
+		return m.RxOverErr
+	}
+	return 0
+}
+
+func (m *OfpPortStats) GetRxCrcErr() uint64 {
+	if m != nil {
+		return m.RxCrcErr
+	}
+	return 0
+}
+
+func (m *OfpPortStats) GetCollisions() uint64 {
+	if m != nil {
+		return m.Collisions
+	}
+	return 0
+}
+
+func (m *OfpPortStats) GetDurationSec() uint32 {
+	if m != nil {
+		return m.DurationSec
+	}
+	return 0
+}
+
+func (m *OfpPortStats) GetDurationNsec() uint32 {
+	if m != nil {
+		return m.DurationNsec
+	}
+	return 0
+}
+
+// Body of OFPMP_GROUP request.
+type OfpGroupStatsRequest struct {
+	GroupId              uint32   `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpGroupStatsRequest) Reset()         { *m = OfpGroupStatsRequest{} }
+func (m *OfpGroupStatsRequest) String() string { return proto.CompactTextString(m) }
+func (*OfpGroupStatsRequest) ProtoMessage()    {}
+func (*OfpGroupStatsRequest) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{59}
+}
+func (m *OfpGroupStatsRequest) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpGroupStatsRequest.Unmarshal(m, b)
+}
+func (m *OfpGroupStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpGroupStatsRequest.Marshal(b, m, deterministic)
+}
+func (dst *OfpGroupStatsRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpGroupStatsRequest.Merge(dst, src)
+}
+func (m *OfpGroupStatsRequest) XXX_Size() int {
+	return xxx_messageInfo_OfpGroupStatsRequest.Size(m)
+}
+func (m *OfpGroupStatsRequest) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpGroupStatsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpGroupStatsRequest proto.InternalMessageInfo
+
+func (m *OfpGroupStatsRequest) GetGroupId() uint32 {
+	if m != nil {
+		return m.GroupId
+	}
+	return 0
+}
+
+// Used in group stats replies.
+type OfpBucketCounter struct {
+	PacketCount          uint64   `protobuf:"varint,1,opt,name=packet_count,json=packetCount,proto3" json:"packet_count,omitempty"`
+	ByteCount            uint64   `protobuf:"varint,2,opt,name=byte_count,json=byteCount,proto3" json:"byte_count,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpBucketCounter) Reset()         { *m = OfpBucketCounter{} }
+func (m *OfpBucketCounter) String() string { return proto.CompactTextString(m) }
+func (*OfpBucketCounter) ProtoMessage()    {}
+func (*OfpBucketCounter) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{60}
+}
+func (m *OfpBucketCounter) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpBucketCounter.Unmarshal(m, b)
+}
+func (m *OfpBucketCounter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpBucketCounter.Marshal(b, m, deterministic)
+}
+func (dst *OfpBucketCounter) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpBucketCounter.Merge(dst, src)
+}
+func (m *OfpBucketCounter) XXX_Size() int {
+	return xxx_messageInfo_OfpBucketCounter.Size(m)
+}
+func (m *OfpBucketCounter) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpBucketCounter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpBucketCounter proto.InternalMessageInfo
+
+func (m *OfpBucketCounter) GetPacketCount() uint64 {
+	if m != nil {
+		return m.PacketCount
+	}
+	return 0
+}
+
+func (m *OfpBucketCounter) GetByteCount() uint64 {
+	if m != nil {
+		return m.ByteCount
+	}
+	return 0
+}
+
+// Body of reply to OFPMP_GROUP request.
+type OfpGroupStats struct {
+	GroupId              uint32              `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
+	RefCount             uint32              `protobuf:"varint,2,opt,name=ref_count,json=refCount,proto3" json:"ref_count,omitempty"`
+	PacketCount          uint64              `protobuf:"varint,3,opt,name=packet_count,json=packetCount,proto3" json:"packet_count,omitempty"`
+	ByteCount            uint64              `protobuf:"varint,4,opt,name=byte_count,json=byteCount,proto3" json:"byte_count,omitempty"`
+	DurationSec          uint32              `protobuf:"varint,5,opt,name=duration_sec,json=durationSec,proto3" json:"duration_sec,omitempty"`
+	DurationNsec         uint32              `protobuf:"varint,6,opt,name=duration_nsec,json=durationNsec,proto3" json:"duration_nsec,omitempty"`
+	BucketStats          []*OfpBucketCounter `protobuf:"bytes,7,rep,name=bucket_stats,json=bucketStats,proto3" json:"bucket_stats,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
+	XXX_unrecognized     []byte              `json:"-"`
+	XXX_sizecache        int32               `json:"-"`
+}
+
+func (m *OfpGroupStats) Reset()         { *m = OfpGroupStats{} }
+func (m *OfpGroupStats) String() string { return proto.CompactTextString(m) }
+func (*OfpGroupStats) ProtoMessage()    {}
+func (*OfpGroupStats) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{61}
+}
+func (m *OfpGroupStats) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpGroupStats.Unmarshal(m, b)
+}
+func (m *OfpGroupStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpGroupStats.Marshal(b, m, deterministic)
+}
+func (dst *OfpGroupStats) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpGroupStats.Merge(dst, src)
+}
+func (m *OfpGroupStats) XXX_Size() int {
+	return xxx_messageInfo_OfpGroupStats.Size(m)
+}
+func (m *OfpGroupStats) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpGroupStats.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpGroupStats proto.InternalMessageInfo
+
+func (m *OfpGroupStats) GetGroupId() uint32 {
+	if m != nil {
+		return m.GroupId
+	}
+	return 0
+}
+
+func (m *OfpGroupStats) GetRefCount() uint32 {
+	if m != nil {
+		return m.RefCount
+	}
+	return 0
+}
+
+func (m *OfpGroupStats) GetPacketCount() uint64 {
+	if m != nil {
+		return m.PacketCount
+	}
+	return 0
+}
+
+func (m *OfpGroupStats) GetByteCount() uint64 {
+	if m != nil {
+		return m.ByteCount
+	}
+	return 0
+}
+
+func (m *OfpGroupStats) GetDurationSec() uint32 {
+	if m != nil {
+		return m.DurationSec
+	}
+	return 0
+}
+
+func (m *OfpGroupStats) GetDurationNsec() uint32 {
+	if m != nil {
+		return m.DurationNsec
+	}
+	return 0
+}
+
+func (m *OfpGroupStats) GetBucketStats() []*OfpBucketCounter {
+	if m != nil {
+		return m.BucketStats
+	}
+	return nil
+}
+
+// Body of reply to OFPMP_GROUP_DESC request.
+type OfpGroupDesc struct {
+	Type                 OfpGroupType `protobuf:"varint,1,opt,name=type,proto3,enum=openflow_13.OfpGroupType" json:"type,omitempty"`
+	GroupId              uint32       `protobuf:"varint,2,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
+	Buckets              []*OfpBucket `protobuf:"bytes,3,rep,name=buckets,proto3" json:"buckets,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
+	XXX_unrecognized     []byte       `json:"-"`
+	XXX_sizecache        int32        `json:"-"`
+}
+
+func (m *OfpGroupDesc) Reset()         { *m = OfpGroupDesc{} }
+func (m *OfpGroupDesc) String() string { return proto.CompactTextString(m) }
+func (*OfpGroupDesc) ProtoMessage()    {}
+func (*OfpGroupDesc) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{62}
+}
+func (m *OfpGroupDesc) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpGroupDesc.Unmarshal(m, b)
+}
+func (m *OfpGroupDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpGroupDesc.Marshal(b, m, deterministic)
+}
+func (dst *OfpGroupDesc) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpGroupDesc.Merge(dst, src)
+}
+func (m *OfpGroupDesc) XXX_Size() int {
+	return xxx_messageInfo_OfpGroupDesc.Size(m)
+}
+func (m *OfpGroupDesc) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpGroupDesc.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpGroupDesc proto.InternalMessageInfo
+
+func (m *OfpGroupDesc) GetType() OfpGroupType {
+	if m != nil {
+		return m.Type
+	}
+	return OfpGroupType_OFPGT_ALL
+}
+
+func (m *OfpGroupDesc) GetGroupId() uint32 {
+	if m != nil {
+		return m.GroupId
+	}
+	return 0
+}
+
+func (m *OfpGroupDesc) GetBuckets() []*OfpBucket {
+	if m != nil {
+		return m.Buckets
+	}
+	return nil
+}
+
+type OfpGroupEntry struct {
+	Desc                 *OfpGroupDesc  `protobuf:"bytes,1,opt,name=desc,proto3" json:"desc,omitempty"`
+	Stats                *OfpGroupStats `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
+	XXX_unrecognized     []byte         `json:"-"`
+	XXX_sizecache        int32          `json:"-"`
+}
+
+func (m *OfpGroupEntry) Reset()         { *m = OfpGroupEntry{} }
+func (m *OfpGroupEntry) String() string { return proto.CompactTextString(m) }
+func (*OfpGroupEntry) ProtoMessage()    {}
+func (*OfpGroupEntry) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{63}
+}
+func (m *OfpGroupEntry) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpGroupEntry.Unmarshal(m, b)
+}
+func (m *OfpGroupEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpGroupEntry.Marshal(b, m, deterministic)
+}
+func (dst *OfpGroupEntry) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpGroupEntry.Merge(dst, src)
+}
+func (m *OfpGroupEntry) XXX_Size() int {
+	return xxx_messageInfo_OfpGroupEntry.Size(m)
+}
+func (m *OfpGroupEntry) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpGroupEntry.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpGroupEntry proto.InternalMessageInfo
+
+func (m *OfpGroupEntry) GetDesc() *OfpGroupDesc {
+	if m != nil {
+		return m.Desc
+	}
+	return nil
+}
+
+func (m *OfpGroupEntry) GetStats() *OfpGroupStats {
+	if m != nil {
+		return m.Stats
+	}
+	return nil
+}
+
+// Body of reply to OFPMP_GROUP_FEATURES request. Group features.
+type OfpGroupFeatures struct {
+	Types                uint32   `protobuf:"varint,1,opt,name=types,proto3" json:"types,omitempty"`
+	Capabilities         uint32   `protobuf:"varint,2,opt,name=capabilities,proto3" json:"capabilities,omitempty"`
+	MaxGroups            []uint32 `protobuf:"varint,3,rep,packed,name=max_groups,json=maxGroups,proto3" json:"max_groups,omitempty"`
+	Actions              []uint32 `protobuf:"varint,4,rep,packed,name=actions,proto3" json:"actions,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpGroupFeatures) Reset()         { *m = OfpGroupFeatures{} }
+func (m *OfpGroupFeatures) String() string { return proto.CompactTextString(m) }
+func (*OfpGroupFeatures) ProtoMessage()    {}
+func (*OfpGroupFeatures) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{64}
+}
+func (m *OfpGroupFeatures) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpGroupFeatures.Unmarshal(m, b)
+}
+func (m *OfpGroupFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpGroupFeatures.Marshal(b, m, deterministic)
+}
+func (dst *OfpGroupFeatures) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpGroupFeatures.Merge(dst, src)
+}
+func (m *OfpGroupFeatures) XXX_Size() int {
+	return xxx_messageInfo_OfpGroupFeatures.Size(m)
+}
+func (m *OfpGroupFeatures) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpGroupFeatures.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpGroupFeatures proto.InternalMessageInfo
+
+func (m *OfpGroupFeatures) GetTypes() uint32 {
+	if m != nil {
+		return m.Types
+	}
+	return 0
+}
+
+func (m *OfpGroupFeatures) GetCapabilities() uint32 {
+	if m != nil {
+		return m.Capabilities
+	}
+	return 0
+}
+
+func (m *OfpGroupFeatures) GetMaxGroups() []uint32 {
+	if m != nil {
+		return m.MaxGroups
+	}
+	return nil
+}
+
+func (m *OfpGroupFeatures) GetActions() []uint32 {
+	if m != nil {
+		return m.Actions
+	}
+	return nil
+}
+
+// Body of OFPMP_METER and OFPMP_METER_CONFIG requests.
+type OfpMeterMultipartRequest struct {
+	MeterId              uint32   `protobuf:"varint,1,opt,name=meter_id,json=meterId,proto3" json:"meter_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpMeterMultipartRequest) Reset()         { *m = OfpMeterMultipartRequest{} }
+func (m *OfpMeterMultipartRequest) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterMultipartRequest) ProtoMessage()    {}
+func (*OfpMeterMultipartRequest) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{65}
+}
+func (m *OfpMeterMultipartRequest) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpMeterMultipartRequest.Unmarshal(m, b)
+}
+func (m *OfpMeterMultipartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpMeterMultipartRequest.Marshal(b, m, deterministic)
+}
+func (dst *OfpMeterMultipartRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpMeterMultipartRequest.Merge(dst, src)
+}
+func (m *OfpMeterMultipartRequest) XXX_Size() int {
+	return xxx_messageInfo_OfpMeterMultipartRequest.Size(m)
+}
+func (m *OfpMeterMultipartRequest) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpMeterMultipartRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterMultipartRequest proto.InternalMessageInfo
+
+func (m *OfpMeterMultipartRequest) GetMeterId() uint32 {
+	if m != nil {
+		return m.MeterId
+	}
+	return 0
+}
+
+// Statistics for each meter band
+type OfpMeterBandStats struct {
+	PacketBandCount      uint64   `protobuf:"varint,1,opt,name=packet_band_count,json=packetBandCount,proto3" json:"packet_band_count,omitempty"`
+	ByteBandCount        uint64   `protobuf:"varint,2,opt,name=byte_band_count,json=byteBandCount,proto3" json:"byte_band_count,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpMeterBandStats) Reset()         { *m = OfpMeterBandStats{} }
+func (m *OfpMeterBandStats) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterBandStats) ProtoMessage()    {}
+func (*OfpMeterBandStats) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{66}
+}
+func (m *OfpMeterBandStats) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpMeterBandStats.Unmarshal(m, b)
+}
+func (m *OfpMeterBandStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpMeterBandStats.Marshal(b, m, deterministic)
+}
+func (dst *OfpMeterBandStats) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpMeterBandStats.Merge(dst, src)
+}
+func (m *OfpMeterBandStats) XXX_Size() int {
+	return xxx_messageInfo_OfpMeterBandStats.Size(m)
+}
+func (m *OfpMeterBandStats) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpMeterBandStats.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterBandStats proto.InternalMessageInfo
+
+func (m *OfpMeterBandStats) GetPacketBandCount() uint64 {
+	if m != nil {
+		return m.PacketBandCount
+	}
+	return 0
+}
+
+func (m *OfpMeterBandStats) GetByteBandCount() uint64 {
+	if m != nil {
+		return m.ByteBandCount
+	}
+	return 0
+}
+
+// Body of reply to OFPMP_METER request. Meter statistics.
+type OfpMeterStats struct {
+	MeterId              uint32               `protobuf:"varint,1,opt,name=meter_id,json=meterId,proto3" json:"meter_id,omitempty"`
+	FlowCount            uint32               `protobuf:"varint,2,opt,name=flow_count,json=flowCount,proto3" json:"flow_count,omitempty"`
+	PacketInCount        uint64               `protobuf:"varint,3,opt,name=packet_in_count,json=packetInCount,proto3" json:"packet_in_count,omitempty"`
+	ByteInCount          uint64               `protobuf:"varint,4,opt,name=byte_in_count,json=byteInCount,proto3" json:"byte_in_count,omitempty"`
+	DurationSec          uint32               `protobuf:"varint,5,opt,name=duration_sec,json=durationSec,proto3" json:"duration_sec,omitempty"`
+	DurationNsec         uint32               `protobuf:"varint,6,opt,name=duration_nsec,json=durationNsec,proto3" json:"duration_nsec,omitempty"`
+	BandStats            []*OfpMeterBandStats `protobuf:"bytes,7,rep,name=band_stats,json=bandStats,proto3" json:"band_stats,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
+	XXX_unrecognized     []byte               `json:"-"`
+	XXX_sizecache        int32                `json:"-"`
+}
+
+func (m *OfpMeterStats) Reset()         { *m = OfpMeterStats{} }
+func (m *OfpMeterStats) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterStats) ProtoMessage()    {}
+func (*OfpMeterStats) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{67}
+}
+func (m *OfpMeterStats) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpMeterStats.Unmarshal(m, b)
+}
+func (m *OfpMeterStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpMeterStats.Marshal(b, m, deterministic)
+}
+func (dst *OfpMeterStats) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpMeterStats.Merge(dst, src)
+}
+func (m *OfpMeterStats) XXX_Size() int {
+	return xxx_messageInfo_OfpMeterStats.Size(m)
+}
+func (m *OfpMeterStats) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpMeterStats.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterStats proto.InternalMessageInfo
+
+func (m *OfpMeterStats) GetMeterId() uint32 {
+	if m != nil {
+		return m.MeterId
+	}
+	return 0
+}
+
+func (m *OfpMeterStats) GetFlowCount() uint32 {
+	if m != nil {
+		return m.FlowCount
+	}
+	return 0
+}
+
+func (m *OfpMeterStats) GetPacketInCount() uint64 {
+	if m != nil {
+		return m.PacketInCount
+	}
+	return 0
+}
+
+func (m *OfpMeterStats) GetByteInCount() uint64 {
+	if m != nil {
+		return m.ByteInCount
+	}
+	return 0
+}
+
+func (m *OfpMeterStats) GetDurationSec() uint32 {
+	if m != nil {
+		return m.DurationSec
+	}
+	return 0
+}
+
+func (m *OfpMeterStats) GetDurationNsec() uint32 {
+	if m != nil {
+		return m.DurationNsec
+	}
+	return 0
+}
+
+func (m *OfpMeterStats) GetBandStats() []*OfpMeterBandStats {
+	if m != nil {
+		return m.BandStats
+	}
+	return nil
+}
+
+// Body of reply to OFPMP_METER_CONFIG request. Meter configuration.
+type OfpMeterConfig struct {
+	Flags                uint32                `protobuf:"varint,1,opt,name=flags,proto3" json:"flags,omitempty"`
+	MeterId              uint32                `protobuf:"varint,2,opt,name=meter_id,json=meterId,proto3" json:"meter_id,omitempty"`
+	Bands                []*OfpMeterBandHeader `protobuf:"bytes,3,rep,name=bands,proto3" json:"bands,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *OfpMeterConfig) Reset()         { *m = OfpMeterConfig{} }
+func (m *OfpMeterConfig) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterConfig) ProtoMessage()    {}
+func (*OfpMeterConfig) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{68}
+}
+func (m *OfpMeterConfig) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpMeterConfig.Unmarshal(m, b)
+}
+func (m *OfpMeterConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpMeterConfig.Marshal(b, m, deterministic)
+}
+func (dst *OfpMeterConfig) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpMeterConfig.Merge(dst, src)
+}
+func (m *OfpMeterConfig) XXX_Size() int {
+	return xxx_messageInfo_OfpMeterConfig.Size(m)
+}
+func (m *OfpMeterConfig) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpMeterConfig.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterConfig proto.InternalMessageInfo
+
+func (m *OfpMeterConfig) GetFlags() uint32 {
+	if m != nil {
+		return m.Flags
+	}
+	return 0
+}
+
+func (m *OfpMeterConfig) GetMeterId() uint32 {
+	if m != nil {
+		return m.MeterId
+	}
+	return 0
+}
+
+func (m *OfpMeterConfig) GetBands() []*OfpMeterBandHeader {
+	if m != nil {
+		return m.Bands
+	}
+	return nil
+}
+
+// Body of reply to OFPMP_METER_FEATURES request. Meter features.
+type OfpMeterFeatures struct {
+	MaxMeter             uint32   `protobuf:"varint,1,opt,name=max_meter,json=maxMeter,proto3" json:"max_meter,omitempty"`
+	BandTypes            uint32   `protobuf:"varint,2,opt,name=band_types,json=bandTypes,proto3" json:"band_types,omitempty"`
+	Capabilities         uint32   `protobuf:"varint,3,opt,name=capabilities,proto3" json:"capabilities,omitempty"`
+	MaxBands             uint32   `protobuf:"varint,4,opt,name=max_bands,json=maxBands,proto3" json:"max_bands,omitempty"`
+	MaxColor             uint32   `protobuf:"varint,5,opt,name=max_color,json=maxColor,proto3" json:"max_color,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpMeterFeatures) Reset()         { *m = OfpMeterFeatures{} }
+func (m *OfpMeterFeatures) String() string { return proto.CompactTextString(m) }
+func (*OfpMeterFeatures) ProtoMessage()    {}
+func (*OfpMeterFeatures) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{69}
+}
+func (m *OfpMeterFeatures) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpMeterFeatures.Unmarshal(m, b)
+}
+func (m *OfpMeterFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpMeterFeatures.Marshal(b, m, deterministic)
+}
+func (dst *OfpMeterFeatures) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpMeterFeatures.Merge(dst, src)
+}
+func (m *OfpMeterFeatures) XXX_Size() int {
+	return xxx_messageInfo_OfpMeterFeatures.Size(m)
+}
+func (m *OfpMeterFeatures) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpMeterFeatures.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpMeterFeatures proto.InternalMessageInfo
+
+func (m *OfpMeterFeatures) GetMaxMeter() uint32 {
+	if m != nil {
+		return m.MaxMeter
+	}
+	return 0
+}
+
+func (m *OfpMeterFeatures) GetBandTypes() uint32 {
+	if m != nil {
+		return m.BandTypes
+	}
+	return 0
+}
+
+func (m *OfpMeterFeatures) GetCapabilities() uint32 {
+	if m != nil {
+		return m.Capabilities
+	}
+	return 0
+}
+
+func (m *OfpMeterFeatures) GetMaxBands() uint32 {
+	if m != nil {
+		return m.MaxBands
+	}
+	return 0
+}
+
+func (m *OfpMeterFeatures) GetMaxColor() uint32 {
+	if m != nil {
+		return m.MaxColor
+	}
+	return 0
+}
+
+// Body for ofp_multipart_request/reply of type OFPMP_EXPERIMENTER.
+type OfpExperimenterMultipartHeader struct {
+	Experimenter         uint32   `protobuf:"varint,1,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+	ExpType              uint32   `protobuf:"varint,2,opt,name=exp_type,json=expType,proto3" json:"exp_type,omitempty"`
+	Data                 []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpExperimenterMultipartHeader) Reset()         { *m = OfpExperimenterMultipartHeader{} }
+func (m *OfpExperimenterMultipartHeader) String() string { return proto.CompactTextString(m) }
+func (*OfpExperimenterMultipartHeader) ProtoMessage()    {}
+func (*OfpExperimenterMultipartHeader) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{70}
+}
+func (m *OfpExperimenterMultipartHeader) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpExperimenterMultipartHeader.Unmarshal(m, b)
+}
+func (m *OfpExperimenterMultipartHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpExperimenterMultipartHeader.Marshal(b, m, deterministic)
+}
+func (dst *OfpExperimenterMultipartHeader) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpExperimenterMultipartHeader.Merge(dst, src)
+}
+func (m *OfpExperimenterMultipartHeader) XXX_Size() int {
+	return xxx_messageInfo_OfpExperimenterMultipartHeader.Size(m)
+}
+func (m *OfpExperimenterMultipartHeader) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpExperimenterMultipartHeader.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpExperimenterMultipartHeader proto.InternalMessageInfo
+
+func (m *OfpExperimenterMultipartHeader) GetExperimenter() uint32 {
+	if m != nil {
+		return m.Experimenter
+	}
+	return 0
+}
+
+func (m *OfpExperimenterMultipartHeader) GetExpType() uint32 {
+	if m != nil {
+		return m.ExpType
+	}
+	return 0
+}
+
+func (m *OfpExperimenterMultipartHeader) GetData() []byte {
+	if m != nil {
+		return m.Data
+	}
+	return nil
+}
+
+// Experimenter extension.
+type OfpExperimenterHeader struct {
+	// ofp_header header;  /* Type OFPT_EXPERIMENTER. */
+	Experimenter         uint32   `protobuf:"varint,1,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+	ExpType              uint32   `protobuf:"varint,2,opt,name=exp_type,json=expType,proto3" json:"exp_type,omitempty"`
+	Data                 []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpExperimenterHeader) Reset()         { *m = OfpExperimenterHeader{} }
+func (m *OfpExperimenterHeader) String() string { return proto.CompactTextString(m) }
+func (*OfpExperimenterHeader) ProtoMessage()    {}
+func (*OfpExperimenterHeader) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{71}
+}
+func (m *OfpExperimenterHeader) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpExperimenterHeader.Unmarshal(m, b)
+}
+func (m *OfpExperimenterHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpExperimenterHeader.Marshal(b, m, deterministic)
+}
+func (dst *OfpExperimenterHeader) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpExperimenterHeader.Merge(dst, src)
+}
+func (m *OfpExperimenterHeader) XXX_Size() int {
+	return xxx_messageInfo_OfpExperimenterHeader.Size(m)
+}
+func (m *OfpExperimenterHeader) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpExperimenterHeader.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpExperimenterHeader proto.InternalMessageInfo
+
+func (m *OfpExperimenterHeader) GetExperimenter() uint32 {
+	if m != nil {
+		return m.Experimenter
+	}
+	return 0
+}
+
+func (m *OfpExperimenterHeader) GetExpType() uint32 {
+	if m != nil {
+		return m.ExpType
+	}
+	return 0
+}
+
+func (m *OfpExperimenterHeader) GetData() []byte {
+	if m != nil {
+		return m.Data
+	}
+	return nil
+}
+
+// Common description for a queue.
+type OfpQueuePropHeader struct {
+	Property             uint32   `protobuf:"varint,1,opt,name=property,proto3" json:"property,omitempty"`
+	Len                  uint32   `protobuf:"varint,2,opt,name=len,proto3" json:"len,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpQueuePropHeader) Reset()         { *m = OfpQueuePropHeader{} }
+func (m *OfpQueuePropHeader) String() string { return proto.CompactTextString(m) }
+func (*OfpQueuePropHeader) ProtoMessage()    {}
+func (*OfpQueuePropHeader) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{72}
+}
+func (m *OfpQueuePropHeader) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpQueuePropHeader.Unmarshal(m, b)
+}
+func (m *OfpQueuePropHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpQueuePropHeader.Marshal(b, m, deterministic)
+}
+func (dst *OfpQueuePropHeader) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpQueuePropHeader.Merge(dst, src)
+}
+func (m *OfpQueuePropHeader) XXX_Size() int {
+	return xxx_messageInfo_OfpQueuePropHeader.Size(m)
+}
+func (m *OfpQueuePropHeader) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpQueuePropHeader.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpQueuePropHeader proto.InternalMessageInfo
+
+func (m *OfpQueuePropHeader) GetProperty() uint32 {
+	if m != nil {
+		return m.Property
+	}
+	return 0
+}
+
+func (m *OfpQueuePropHeader) GetLen() uint32 {
+	if m != nil {
+		return m.Len
+	}
+	return 0
+}
+
+// Min-Rate queue property description.
+type OfpQueuePropMinRate struct {
+	PropHeader           *OfpQueuePropHeader `protobuf:"bytes,1,opt,name=prop_header,json=propHeader,proto3" json:"prop_header,omitempty"`
+	Rate                 uint32              `protobuf:"varint,2,opt,name=rate,proto3" json:"rate,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
+	XXX_unrecognized     []byte              `json:"-"`
+	XXX_sizecache        int32               `json:"-"`
+}
+
+func (m *OfpQueuePropMinRate) Reset()         { *m = OfpQueuePropMinRate{} }
+func (m *OfpQueuePropMinRate) String() string { return proto.CompactTextString(m) }
+func (*OfpQueuePropMinRate) ProtoMessage()    {}
+func (*OfpQueuePropMinRate) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{73}
+}
+func (m *OfpQueuePropMinRate) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpQueuePropMinRate.Unmarshal(m, b)
+}
+func (m *OfpQueuePropMinRate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpQueuePropMinRate.Marshal(b, m, deterministic)
+}
+func (dst *OfpQueuePropMinRate) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpQueuePropMinRate.Merge(dst, src)
+}
+func (m *OfpQueuePropMinRate) XXX_Size() int {
+	return xxx_messageInfo_OfpQueuePropMinRate.Size(m)
+}
+func (m *OfpQueuePropMinRate) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpQueuePropMinRate.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpQueuePropMinRate proto.InternalMessageInfo
+
+func (m *OfpQueuePropMinRate) GetPropHeader() *OfpQueuePropHeader {
+	if m != nil {
+		return m.PropHeader
+	}
+	return nil
+}
+
+func (m *OfpQueuePropMinRate) GetRate() uint32 {
+	if m != nil {
+		return m.Rate
+	}
+	return 0
+}
+
+// Max-Rate queue property description.
+type OfpQueuePropMaxRate struct {
+	PropHeader           *OfpQueuePropHeader `protobuf:"bytes,1,opt,name=prop_header,json=propHeader,proto3" json:"prop_header,omitempty"`
+	Rate                 uint32              `protobuf:"varint,2,opt,name=rate,proto3" json:"rate,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
+	XXX_unrecognized     []byte              `json:"-"`
+	XXX_sizecache        int32               `json:"-"`
+}
+
+func (m *OfpQueuePropMaxRate) Reset()         { *m = OfpQueuePropMaxRate{} }
+func (m *OfpQueuePropMaxRate) String() string { return proto.CompactTextString(m) }
+func (*OfpQueuePropMaxRate) ProtoMessage()    {}
+func (*OfpQueuePropMaxRate) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{74}
+}
+func (m *OfpQueuePropMaxRate) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpQueuePropMaxRate.Unmarshal(m, b)
+}
+func (m *OfpQueuePropMaxRate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpQueuePropMaxRate.Marshal(b, m, deterministic)
+}
+func (dst *OfpQueuePropMaxRate) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpQueuePropMaxRate.Merge(dst, src)
+}
+func (m *OfpQueuePropMaxRate) XXX_Size() int {
+	return xxx_messageInfo_OfpQueuePropMaxRate.Size(m)
+}
+func (m *OfpQueuePropMaxRate) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpQueuePropMaxRate.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpQueuePropMaxRate proto.InternalMessageInfo
+
+func (m *OfpQueuePropMaxRate) GetPropHeader() *OfpQueuePropHeader {
+	if m != nil {
+		return m.PropHeader
+	}
+	return nil
+}
+
+func (m *OfpQueuePropMaxRate) GetRate() uint32 {
+	if m != nil {
+		return m.Rate
+	}
+	return 0
+}
+
+// Experimenter queue property description.
+type OfpQueuePropExperimenter struct {
+	PropHeader           *OfpQueuePropHeader `protobuf:"bytes,1,opt,name=prop_header,json=propHeader,proto3" json:"prop_header,omitempty"`
+	Experimenter         uint32              `protobuf:"varint,2,opt,name=experimenter,proto3" json:"experimenter,omitempty"`
+	Data                 []byte              `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
+	XXX_unrecognized     []byte              `json:"-"`
+	XXX_sizecache        int32               `json:"-"`
+}
+
+func (m *OfpQueuePropExperimenter) Reset()         { *m = OfpQueuePropExperimenter{} }
+func (m *OfpQueuePropExperimenter) String() string { return proto.CompactTextString(m) }
+func (*OfpQueuePropExperimenter) ProtoMessage()    {}
+func (*OfpQueuePropExperimenter) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{75}
+}
+func (m *OfpQueuePropExperimenter) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpQueuePropExperimenter.Unmarshal(m, b)
+}
+func (m *OfpQueuePropExperimenter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpQueuePropExperimenter.Marshal(b, m, deterministic)
+}
+func (dst *OfpQueuePropExperimenter) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpQueuePropExperimenter.Merge(dst, src)
+}
+func (m *OfpQueuePropExperimenter) XXX_Size() int {
+	return xxx_messageInfo_OfpQueuePropExperimenter.Size(m)
+}
+func (m *OfpQueuePropExperimenter) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpQueuePropExperimenter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpQueuePropExperimenter proto.InternalMessageInfo
+
+func (m *OfpQueuePropExperimenter) GetPropHeader() *OfpQueuePropHeader {
+	if m != nil {
+		return m.PropHeader
+	}
+	return nil
+}
+
+func (m *OfpQueuePropExperimenter) GetExperimenter() uint32 {
+	if m != nil {
+		return m.Experimenter
+	}
+	return 0
+}
+
+func (m *OfpQueuePropExperimenter) GetData() []byte {
+	if m != nil {
+		return m.Data
+	}
+	return nil
+}
+
+// Full description for a queue.
+type OfpPacketQueue struct {
+	QueueId              uint32                `protobuf:"varint,1,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"`
+	Port                 uint32                `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
+	Properties           []*OfpQueuePropHeader `protobuf:"bytes,4,rep,name=properties,proto3" json:"properties,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
+	XXX_unrecognized     []byte                `json:"-"`
+	XXX_sizecache        int32                 `json:"-"`
+}
+
+func (m *OfpPacketQueue) Reset()         { *m = OfpPacketQueue{} }
+func (m *OfpPacketQueue) String() string { return proto.CompactTextString(m) }
+func (*OfpPacketQueue) ProtoMessage()    {}
+func (*OfpPacketQueue) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{76}
+}
+func (m *OfpPacketQueue) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpPacketQueue.Unmarshal(m, b)
+}
+func (m *OfpPacketQueue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpPacketQueue.Marshal(b, m, deterministic)
+}
+func (dst *OfpPacketQueue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpPacketQueue.Merge(dst, src)
+}
+func (m *OfpPacketQueue) XXX_Size() int {
+	return xxx_messageInfo_OfpPacketQueue.Size(m)
+}
+func (m *OfpPacketQueue) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpPacketQueue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpPacketQueue proto.InternalMessageInfo
+
+func (m *OfpPacketQueue) GetQueueId() uint32 {
+	if m != nil {
+		return m.QueueId
+	}
+	return 0
+}
+
+func (m *OfpPacketQueue) GetPort() uint32 {
+	if m != nil {
+		return m.Port
+	}
+	return 0
+}
+
+func (m *OfpPacketQueue) GetProperties() []*OfpQueuePropHeader {
+	if m != nil {
+		return m.Properties
+	}
+	return nil
+}
+
+// Query for port queue configuration.
+type OfpQueueGetConfigRequest struct {
+	// ofp_header header;
+	Port                 uint32   `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpQueueGetConfigRequest) Reset()         { *m = OfpQueueGetConfigRequest{} }
+func (m *OfpQueueGetConfigRequest) String() string { return proto.CompactTextString(m) }
+func (*OfpQueueGetConfigRequest) ProtoMessage()    {}
+func (*OfpQueueGetConfigRequest) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{77}
+}
+func (m *OfpQueueGetConfigRequest) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpQueueGetConfigRequest.Unmarshal(m, b)
+}
+func (m *OfpQueueGetConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpQueueGetConfigRequest.Marshal(b, m, deterministic)
+}
+func (dst *OfpQueueGetConfigRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpQueueGetConfigRequest.Merge(dst, src)
+}
+func (m *OfpQueueGetConfigRequest) XXX_Size() int {
+	return xxx_messageInfo_OfpQueueGetConfigRequest.Size(m)
+}
+func (m *OfpQueueGetConfigRequest) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpQueueGetConfigRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpQueueGetConfigRequest proto.InternalMessageInfo
+
+func (m *OfpQueueGetConfigRequest) GetPort() uint32 {
+	if m != nil {
+		return m.Port
+	}
+	return 0
+}
+
+// Queue configuration for a given port.
+type OfpQueueGetConfigReply struct {
+	// ofp_header header;
+	Port                 uint32            `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
+	Queues               []*OfpPacketQueue `protobuf:"bytes,2,rep,name=queues,proto3" json:"queues,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *OfpQueueGetConfigReply) Reset()         { *m = OfpQueueGetConfigReply{} }
+func (m *OfpQueueGetConfigReply) String() string { return proto.CompactTextString(m) }
+func (*OfpQueueGetConfigReply) ProtoMessage()    {}
+func (*OfpQueueGetConfigReply) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{78}
+}
+func (m *OfpQueueGetConfigReply) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpQueueGetConfigReply.Unmarshal(m, b)
+}
+func (m *OfpQueueGetConfigReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpQueueGetConfigReply.Marshal(b, m, deterministic)
+}
+func (dst *OfpQueueGetConfigReply) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpQueueGetConfigReply.Merge(dst, src)
+}
+func (m *OfpQueueGetConfigReply) XXX_Size() int {
+	return xxx_messageInfo_OfpQueueGetConfigReply.Size(m)
+}
+func (m *OfpQueueGetConfigReply) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpQueueGetConfigReply.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpQueueGetConfigReply proto.InternalMessageInfo
+
+func (m *OfpQueueGetConfigReply) GetPort() uint32 {
+	if m != nil {
+		return m.Port
+	}
+	return 0
+}
+
+func (m *OfpQueueGetConfigReply) GetQueues() []*OfpPacketQueue {
+	if m != nil {
+		return m.Queues
+	}
+	return nil
+}
+
+// OFPAT_SET_QUEUE action struct: send packets to given queue on port.
+type OfpActionSetQueue struct {
+	Type                 uint32   `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
+	QueueId              uint32   `protobuf:"varint,3,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpActionSetQueue) Reset()         { *m = OfpActionSetQueue{} }
+func (m *OfpActionSetQueue) String() string { return proto.CompactTextString(m) }
+func (*OfpActionSetQueue) ProtoMessage()    {}
+func (*OfpActionSetQueue) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{79}
+}
+func (m *OfpActionSetQueue) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpActionSetQueue.Unmarshal(m, b)
+}
+func (m *OfpActionSetQueue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpActionSetQueue.Marshal(b, m, deterministic)
+}
+func (dst *OfpActionSetQueue) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpActionSetQueue.Merge(dst, src)
+}
+func (m *OfpActionSetQueue) XXX_Size() int {
+	return xxx_messageInfo_OfpActionSetQueue.Size(m)
+}
+func (m *OfpActionSetQueue) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpActionSetQueue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpActionSetQueue proto.InternalMessageInfo
+
+func (m *OfpActionSetQueue) GetType() uint32 {
+	if m != nil {
+		return m.Type
+	}
+	return 0
+}
+
+func (m *OfpActionSetQueue) GetQueueId() uint32 {
+	if m != nil {
+		return m.QueueId
+	}
+	return 0
+}
+
+type OfpQueueStatsRequest struct {
+	PortNo               uint32   `protobuf:"varint,1,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"`
+	QueueId              uint32   `protobuf:"varint,2,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpQueueStatsRequest) Reset()         { *m = OfpQueueStatsRequest{} }
+func (m *OfpQueueStatsRequest) String() string { return proto.CompactTextString(m) }
+func (*OfpQueueStatsRequest) ProtoMessage()    {}
+func (*OfpQueueStatsRequest) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{80}
+}
+func (m *OfpQueueStatsRequest) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpQueueStatsRequest.Unmarshal(m, b)
+}
+func (m *OfpQueueStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpQueueStatsRequest.Marshal(b, m, deterministic)
+}
+func (dst *OfpQueueStatsRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpQueueStatsRequest.Merge(dst, src)
+}
+func (m *OfpQueueStatsRequest) XXX_Size() int {
+	return xxx_messageInfo_OfpQueueStatsRequest.Size(m)
+}
+func (m *OfpQueueStatsRequest) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpQueueStatsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpQueueStatsRequest proto.InternalMessageInfo
+
+func (m *OfpQueueStatsRequest) GetPortNo() uint32 {
+	if m != nil {
+		return m.PortNo
+	}
+	return 0
+}
+
+func (m *OfpQueueStatsRequest) GetQueueId() uint32 {
+	if m != nil {
+		return m.QueueId
+	}
+	return 0
+}
+
+type OfpQueueStats struct {
+	PortNo               uint32   `protobuf:"varint,1,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"`
+	QueueId              uint32   `protobuf:"varint,2,opt,name=queue_id,json=queueId,proto3" json:"queue_id,omitempty"`
+	TxBytes              uint64   `protobuf:"varint,3,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"`
+	TxPackets            uint64   `protobuf:"varint,4,opt,name=tx_packets,json=txPackets,proto3" json:"tx_packets,omitempty"`
+	TxErrors             uint64   `protobuf:"varint,5,opt,name=tx_errors,json=txErrors,proto3" json:"tx_errors,omitempty"`
+	DurationSec          uint32   `protobuf:"varint,6,opt,name=duration_sec,json=durationSec,proto3" json:"duration_sec,omitempty"`
+	DurationNsec         uint32   `protobuf:"varint,7,opt,name=duration_nsec,json=durationNsec,proto3" json:"duration_nsec,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpQueueStats) Reset()         { *m = OfpQueueStats{} }
+func (m *OfpQueueStats) String() string { return proto.CompactTextString(m) }
+func (*OfpQueueStats) ProtoMessage()    {}
+func (*OfpQueueStats) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{81}
+}
+func (m *OfpQueueStats) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpQueueStats.Unmarshal(m, b)
+}
+func (m *OfpQueueStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpQueueStats.Marshal(b, m, deterministic)
+}
+func (dst *OfpQueueStats) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpQueueStats.Merge(dst, src)
+}
+func (m *OfpQueueStats) XXX_Size() int {
+	return xxx_messageInfo_OfpQueueStats.Size(m)
+}
+func (m *OfpQueueStats) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpQueueStats.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpQueueStats proto.InternalMessageInfo
+
+func (m *OfpQueueStats) GetPortNo() uint32 {
+	if m != nil {
+		return m.PortNo
+	}
+	return 0
+}
+
+func (m *OfpQueueStats) GetQueueId() uint32 {
+	if m != nil {
+		return m.QueueId
+	}
+	return 0
+}
+
+func (m *OfpQueueStats) GetTxBytes() uint64 {
+	if m != nil {
+		return m.TxBytes
+	}
+	return 0
+}
+
+func (m *OfpQueueStats) GetTxPackets() uint64 {
+	if m != nil {
+		return m.TxPackets
+	}
+	return 0
+}
+
+func (m *OfpQueueStats) GetTxErrors() uint64 {
+	if m != nil {
+		return m.TxErrors
+	}
+	return 0
+}
+
+func (m *OfpQueueStats) GetDurationSec() uint32 {
+	if m != nil {
+		return m.DurationSec
+	}
+	return 0
+}
+
+func (m *OfpQueueStats) GetDurationNsec() uint32 {
+	if m != nil {
+		return m.DurationNsec
+	}
+	return 0
+}
+
+// Role request and reply message.
+type OfpRoleRequest struct {
+	// ofp_header header;        /* Type OFPT_ROLE_REQUEST/OFPT_ROLE_REPLY. */
+	Role                 OfpControllerRole `protobuf:"varint,1,opt,name=role,proto3,enum=openflow_13.OfpControllerRole" json:"role,omitempty"`
+	GenerationId         uint64            `protobuf:"varint,2,opt,name=generation_id,json=generationId,proto3" json:"generation_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *OfpRoleRequest) Reset()         { *m = OfpRoleRequest{} }
+func (m *OfpRoleRequest) String() string { return proto.CompactTextString(m) }
+func (*OfpRoleRequest) ProtoMessage()    {}
+func (*OfpRoleRequest) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{82}
+}
+func (m *OfpRoleRequest) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpRoleRequest.Unmarshal(m, b)
+}
+func (m *OfpRoleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpRoleRequest.Marshal(b, m, deterministic)
+}
+func (dst *OfpRoleRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpRoleRequest.Merge(dst, src)
+}
+func (m *OfpRoleRequest) XXX_Size() int {
+	return xxx_messageInfo_OfpRoleRequest.Size(m)
+}
+func (m *OfpRoleRequest) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpRoleRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpRoleRequest proto.InternalMessageInfo
+
+func (m *OfpRoleRequest) GetRole() OfpControllerRole {
+	if m != nil {
+		return m.Role
+	}
+	return OfpControllerRole_OFPCR_ROLE_NOCHANGE
+}
+
+func (m *OfpRoleRequest) GetGenerationId() uint64 {
+	if m != nil {
+		return m.GenerationId
+	}
+	return 0
+}
+
+// Asynchronous message configuration.
+type OfpAsyncConfig struct {
+	// ofp_header header;    /* OFPT_GET_ASYNC_REPLY or OFPT_SET_ASYNC. */
+	PacketInMask         []uint32 `protobuf:"varint,1,rep,packed,name=packet_in_mask,json=packetInMask,proto3" json:"packet_in_mask,omitempty"`
+	PortStatusMask       []uint32 `protobuf:"varint,2,rep,packed,name=port_status_mask,json=portStatusMask,proto3" json:"port_status_mask,omitempty"`
+	FlowRemovedMask      []uint32 `protobuf:"varint,3,rep,packed,name=flow_removed_mask,json=flowRemovedMask,proto3" json:"flow_removed_mask,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfpAsyncConfig) Reset()         { *m = OfpAsyncConfig{} }
+func (m *OfpAsyncConfig) String() string { return proto.CompactTextString(m) }
+func (*OfpAsyncConfig) ProtoMessage()    {}
+func (*OfpAsyncConfig) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{83}
+}
+func (m *OfpAsyncConfig) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfpAsyncConfig.Unmarshal(m, b)
+}
+func (m *OfpAsyncConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfpAsyncConfig.Marshal(b, m, deterministic)
+}
+func (dst *OfpAsyncConfig) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfpAsyncConfig.Merge(dst, src)
+}
+func (m *OfpAsyncConfig) XXX_Size() int {
+	return xxx_messageInfo_OfpAsyncConfig.Size(m)
+}
+func (m *OfpAsyncConfig) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfpAsyncConfig.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfpAsyncConfig proto.InternalMessageInfo
+
+func (m *OfpAsyncConfig) GetPacketInMask() []uint32 {
+	if m != nil {
+		return m.PacketInMask
+	}
+	return nil
+}
+
+func (m *OfpAsyncConfig) GetPortStatusMask() []uint32 {
+	if m != nil {
+		return m.PortStatusMask
+	}
+	return nil
+}
+
+func (m *OfpAsyncConfig) GetFlowRemovedMask() []uint32 {
+	if m != nil {
+		return m.FlowRemovedMask
+	}
+	return nil
+}
+
+type MeterModUpdate struct {
+	Id                   string       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	MeterMod             *OfpMeterMod `protobuf:"bytes,2,opt,name=meter_mod,json=meterMod,proto3" json:"meter_mod,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
+	XXX_unrecognized     []byte       `json:"-"`
+	XXX_sizecache        int32        `json:"-"`
+}
+
+func (m *MeterModUpdate) Reset()         { *m = MeterModUpdate{} }
+func (m *MeterModUpdate) String() string { return proto.CompactTextString(m) }
+func (*MeterModUpdate) ProtoMessage()    {}
+func (*MeterModUpdate) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{84}
+}
+func (m *MeterModUpdate) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_MeterModUpdate.Unmarshal(m, b)
+}
+func (m *MeterModUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_MeterModUpdate.Marshal(b, m, deterministic)
+}
+func (dst *MeterModUpdate) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MeterModUpdate.Merge(dst, src)
+}
+func (m *MeterModUpdate) XXX_Size() int {
+	return xxx_messageInfo_MeterModUpdate.Size(m)
+}
+func (m *MeterModUpdate) XXX_DiscardUnknown() {
+	xxx_messageInfo_MeterModUpdate.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MeterModUpdate proto.InternalMessageInfo
+
+func (m *MeterModUpdate) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *MeterModUpdate) GetMeterMod() *OfpMeterMod {
+	if m != nil {
+		return m.MeterMod
+	}
+	return nil
+}
+
+type MeterStatsReply struct {
+	MeterStats           []*OfpMeterStats `protobuf:"bytes,1,rep,name=meter_stats,json=meterStats,proto3" json:"meter_stats,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
+}
+
+func (m *MeterStatsReply) Reset()         { *m = MeterStatsReply{} }
+func (m *MeterStatsReply) String() string { return proto.CompactTextString(m) }
+func (*MeterStatsReply) ProtoMessage()    {}
+func (*MeterStatsReply) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{85}
+}
+func (m *MeterStatsReply) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_MeterStatsReply.Unmarshal(m, b)
+}
+func (m *MeterStatsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_MeterStatsReply.Marshal(b, m, deterministic)
+}
+func (dst *MeterStatsReply) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MeterStatsReply.Merge(dst, src)
+}
+func (m *MeterStatsReply) XXX_Size() int {
+	return xxx_messageInfo_MeterStatsReply.Size(m)
+}
+func (m *MeterStatsReply) XXX_DiscardUnknown() {
+	xxx_messageInfo_MeterStatsReply.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MeterStatsReply proto.InternalMessageInfo
+
+func (m *MeterStatsReply) GetMeterStats() []*OfpMeterStats {
+	if m != nil {
+		return m.MeterStats
+	}
+	return nil
+}
+
+type FlowTableUpdate struct {
+	Id                   string      `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	FlowMod              *OfpFlowMod `protobuf:"bytes,2,opt,name=flow_mod,json=flowMod,proto3" json:"flow_mod,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
+	XXX_unrecognized     []byte      `json:"-"`
+	XXX_sizecache        int32       `json:"-"`
+}
+
+func (m *FlowTableUpdate) Reset()         { *m = FlowTableUpdate{} }
+func (m *FlowTableUpdate) String() string { return proto.CompactTextString(m) }
+func (*FlowTableUpdate) ProtoMessage()    {}
+func (*FlowTableUpdate) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{86}
+}
+func (m *FlowTableUpdate) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_FlowTableUpdate.Unmarshal(m, b)
+}
+func (m *FlowTableUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_FlowTableUpdate.Marshal(b, m, deterministic)
+}
+func (dst *FlowTableUpdate) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FlowTableUpdate.Merge(dst, src)
+}
+func (m *FlowTableUpdate) XXX_Size() int {
+	return xxx_messageInfo_FlowTableUpdate.Size(m)
+}
+func (m *FlowTableUpdate) XXX_DiscardUnknown() {
+	xxx_messageInfo_FlowTableUpdate.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FlowTableUpdate proto.InternalMessageInfo
+
+func (m *FlowTableUpdate) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *FlowTableUpdate) GetFlowMod() *OfpFlowMod {
+	if m != nil {
+		return m.FlowMod
+	}
+	return nil
+}
+
+type FlowGroupTableUpdate struct {
+	Id                   string       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	GroupMod             *OfpGroupMod `protobuf:"bytes,2,opt,name=group_mod,json=groupMod,proto3" json:"group_mod,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
+	XXX_unrecognized     []byte       `json:"-"`
+	XXX_sizecache        int32        `json:"-"`
+}
+
+func (m *FlowGroupTableUpdate) Reset()         { *m = FlowGroupTableUpdate{} }
+func (m *FlowGroupTableUpdate) String() string { return proto.CompactTextString(m) }
+func (*FlowGroupTableUpdate) ProtoMessage()    {}
+func (*FlowGroupTableUpdate) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{87}
+}
+func (m *FlowGroupTableUpdate) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_FlowGroupTableUpdate.Unmarshal(m, b)
+}
+func (m *FlowGroupTableUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_FlowGroupTableUpdate.Marshal(b, m, deterministic)
+}
+func (dst *FlowGroupTableUpdate) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FlowGroupTableUpdate.Merge(dst, src)
+}
+func (m *FlowGroupTableUpdate) XXX_Size() int {
+	return xxx_messageInfo_FlowGroupTableUpdate.Size(m)
+}
+func (m *FlowGroupTableUpdate) XXX_DiscardUnknown() {
+	xxx_messageInfo_FlowGroupTableUpdate.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FlowGroupTableUpdate proto.InternalMessageInfo
+
+func (m *FlowGroupTableUpdate) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *FlowGroupTableUpdate) GetGroupMod() *OfpGroupMod {
+	if m != nil {
+		return m.GroupMod
+	}
+	return nil
+}
+
+type Flows struct {
+	Items                []*OfpFlowStats `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
+	XXX_unrecognized     []byte          `json:"-"`
+	XXX_sizecache        int32           `json:"-"`
+}
+
+func (m *Flows) Reset()         { *m = Flows{} }
+func (m *Flows) String() string { return proto.CompactTextString(m) }
+func (*Flows) ProtoMessage()    {}
+func (*Flows) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{88}
+}
+func (m *Flows) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Flows.Unmarshal(m, b)
+}
+func (m *Flows) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Flows.Marshal(b, m, deterministic)
+}
+func (dst *Flows) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Flows.Merge(dst, src)
+}
+func (m *Flows) XXX_Size() int {
+	return xxx_messageInfo_Flows.Size(m)
+}
+func (m *Flows) XXX_DiscardUnknown() {
+	xxx_messageInfo_Flows.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Flows proto.InternalMessageInfo
+
+func (m *Flows) GetItems() []*OfpFlowStats {
+	if m != nil {
+		return m.Items
+	}
+	return nil
+}
+
+type Meters struct {
+	Items                []*OfpMeterConfig `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *Meters) Reset()         { *m = Meters{} }
+func (m *Meters) String() string { return proto.CompactTextString(m) }
+func (*Meters) ProtoMessage()    {}
+func (*Meters) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{89}
+}
+func (m *Meters) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Meters.Unmarshal(m, b)
+}
+func (m *Meters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Meters.Marshal(b, m, deterministic)
+}
+func (dst *Meters) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Meters.Merge(dst, src)
+}
+func (m *Meters) XXX_Size() int {
+	return xxx_messageInfo_Meters.Size(m)
+}
+func (m *Meters) XXX_DiscardUnknown() {
+	xxx_messageInfo_Meters.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Meters proto.InternalMessageInfo
+
+func (m *Meters) GetItems() []*OfpMeterConfig {
+	if m != nil {
+		return m.Items
+	}
+	return nil
+}
+
+type FlowGroups struct {
+	Items                []*OfpGroupEntry `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
+}
+
+func (m *FlowGroups) Reset()         { *m = FlowGroups{} }
+func (m *FlowGroups) String() string { return proto.CompactTextString(m) }
+func (*FlowGroups) ProtoMessage()    {}
+func (*FlowGroups) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{90}
+}
+func (m *FlowGroups) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_FlowGroups.Unmarshal(m, b)
+}
+func (m *FlowGroups) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_FlowGroups.Marshal(b, m, deterministic)
+}
+func (dst *FlowGroups) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FlowGroups.Merge(dst, src)
+}
+func (m *FlowGroups) XXX_Size() int {
+	return xxx_messageInfo_FlowGroups.Size(m)
+}
+func (m *FlowGroups) XXX_DiscardUnknown() {
+	xxx_messageInfo_FlowGroups.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FlowGroups proto.InternalMessageInfo
+
+func (m *FlowGroups) GetItems() []*OfpGroupEntry {
+	if m != nil {
+		return m.Items
+	}
+	return nil
+}
+
+type FlowChanges struct {
+	ToAdd                *Flows   `protobuf:"bytes,1,opt,name=to_add,json=toAdd,proto3" json:"to_add,omitempty"`
+	ToRemove             *Flows   `protobuf:"bytes,2,opt,name=to_remove,json=toRemove,proto3" json:"to_remove,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *FlowChanges) Reset()         { *m = FlowChanges{} }
+func (m *FlowChanges) String() string { return proto.CompactTextString(m) }
+func (*FlowChanges) ProtoMessage()    {}
+func (*FlowChanges) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{91}
+}
+func (m *FlowChanges) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_FlowChanges.Unmarshal(m, b)
+}
+func (m *FlowChanges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_FlowChanges.Marshal(b, m, deterministic)
+}
+func (dst *FlowChanges) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FlowChanges.Merge(dst, src)
+}
+func (m *FlowChanges) XXX_Size() int {
+	return xxx_messageInfo_FlowChanges.Size(m)
+}
+func (m *FlowChanges) XXX_DiscardUnknown() {
+	xxx_messageInfo_FlowChanges.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FlowChanges proto.InternalMessageInfo
+
+func (m *FlowChanges) GetToAdd() *Flows {
+	if m != nil {
+		return m.ToAdd
+	}
+	return nil
+}
+
+func (m *FlowChanges) GetToRemove() *Flows {
+	if m != nil {
+		return m.ToRemove
+	}
+	return nil
+}
+
+type FlowGroupChanges struct {
+	ToAdd                *FlowGroups `protobuf:"bytes,1,opt,name=to_add,json=toAdd,proto3" json:"to_add,omitempty"`
+	ToRemove             *FlowGroups `protobuf:"bytes,2,opt,name=to_remove,json=toRemove,proto3" json:"to_remove,omitempty"`
+	ToUpdate             *FlowGroups `protobuf:"bytes,3,opt,name=to_update,json=toUpdate,proto3" json:"to_update,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
+	XXX_unrecognized     []byte      `json:"-"`
+	XXX_sizecache        int32       `json:"-"`
+}
+
+func (m *FlowGroupChanges) Reset()         { *m = FlowGroupChanges{} }
+func (m *FlowGroupChanges) String() string { return proto.CompactTextString(m) }
+func (*FlowGroupChanges) ProtoMessage()    {}
+func (*FlowGroupChanges) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{92}
+}
+func (m *FlowGroupChanges) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_FlowGroupChanges.Unmarshal(m, b)
+}
+func (m *FlowGroupChanges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_FlowGroupChanges.Marshal(b, m, deterministic)
+}
+func (dst *FlowGroupChanges) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FlowGroupChanges.Merge(dst, src)
+}
+func (m *FlowGroupChanges) XXX_Size() int {
+	return xxx_messageInfo_FlowGroupChanges.Size(m)
+}
+func (m *FlowGroupChanges) XXX_DiscardUnknown() {
+	xxx_messageInfo_FlowGroupChanges.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FlowGroupChanges proto.InternalMessageInfo
+
+func (m *FlowGroupChanges) GetToAdd() *FlowGroups {
+	if m != nil {
+		return m.ToAdd
+	}
+	return nil
+}
+
+func (m *FlowGroupChanges) GetToRemove() *FlowGroups {
+	if m != nil {
+		return m.ToRemove
+	}
+	return nil
+}
+
+func (m *FlowGroupChanges) GetToUpdate() *FlowGroups {
+	if m != nil {
+		return m.ToUpdate
+	}
+	return nil
+}
+
+type PacketIn struct {
+	Id                   string       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	PacketIn             *OfpPacketIn `protobuf:"bytes,2,opt,name=packet_in,json=packetIn,proto3" json:"packet_in,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
+	XXX_unrecognized     []byte       `json:"-"`
+	XXX_sizecache        int32        `json:"-"`
+}
+
+func (m *PacketIn) Reset()         { *m = PacketIn{} }
+func (m *PacketIn) String() string { return proto.CompactTextString(m) }
+func (*PacketIn) ProtoMessage()    {}
+func (*PacketIn) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{93}
+}
+func (m *PacketIn) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PacketIn.Unmarshal(m, b)
+}
+func (m *PacketIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PacketIn.Marshal(b, m, deterministic)
+}
+func (dst *PacketIn) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PacketIn.Merge(dst, src)
+}
+func (m *PacketIn) XXX_Size() int {
+	return xxx_messageInfo_PacketIn.Size(m)
+}
+func (m *PacketIn) XXX_DiscardUnknown() {
+	xxx_messageInfo_PacketIn.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PacketIn proto.InternalMessageInfo
+
+func (m *PacketIn) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *PacketIn) GetPacketIn() *OfpPacketIn {
+	if m != nil {
+		return m.PacketIn
+	}
+	return nil
+}
+
+type PacketOut struct {
+	Id                   string        `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	PacketOut            *OfpPacketOut `protobuf:"bytes,2,opt,name=packet_out,json=packetOut,proto3" json:"packet_out,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
+	XXX_unrecognized     []byte        `json:"-"`
+	XXX_sizecache        int32         `json:"-"`
+}
+
+func (m *PacketOut) Reset()         { *m = PacketOut{} }
+func (m *PacketOut) String() string { return proto.CompactTextString(m) }
+func (*PacketOut) ProtoMessage()    {}
+func (*PacketOut) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{94}
+}
+func (m *PacketOut) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PacketOut.Unmarshal(m, b)
+}
+func (m *PacketOut) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PacketOut.Marshal(b, m, deterministic)
+}
+func (dst *PacketOut) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PacketOut.Merge(dst, src)
+}
+func (m *PacketOut) XXX_Size() int {
+	return xxx_messageInfo_PacketOut.Size(m)
+}
+func (m *PacketOut) XXX_DiscardUnknown() {
+	xxx_messageInfo_PacketOut.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PacketOut proto.InternalMessageInfo
+
+func (m *PacketOut) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *PacketOut) GetPacketOut() *OfpPacketOut {
+	if m != nil {
+		return m.PacketOut
+	}
+	return nil
+}
+
+type ChangeEvent struct {
+	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	// Types that are valid to be assigned to Event:
+	//	*ChangeEvent_PortStatus
+	Event                isChangeEvent_Event `protobuf_oneof:"event"`
+	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
+	XXX_unrecognized     []byte              `json:"-"`
+	XXX_sizecache        int32               `json:"-"`
+}
+
+func (m *ChangeEvent) Reset()         { *m = ChangeEvent{} }
+func (m *ChangeEvent) String() string { return proto.CompactTextString(m) }
+func (*ChangeEvent) ProtoMessage()    {}
+func (*ChangeEvent) Descriptor() ([]byte, []int) {
+	return fileDescriptor_openflow_13_72e0202e73bb47da, []int{95}
+}
+func (m *ChangeEvent) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_ChangeEvent.Unmarshal(m, b)
+}
+func (m *ChangeEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_ChangeEvent.Marshal(b, m, deterministic)
+}
+func (dst *ChangeEvent) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ChangeEvent.Merge(dst, src)
+}
+func (m *ChangeEvent) XXX_Size() int {
+	return xxx_messageInfo_ChangeEvent.Size(m)
+}
+func (m *ChangeEvent) XXX_DiscardUnknown() {
+	xxx_messageInfo_ChangeEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ChangeEvent proto.InternalMessageInfo
+
+func (m *ChangeEvent) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+type isChangeEvent_Event interface {
+	isChangeEvent_Event()
+}
+
+type ChangeEvent_PortStatus struct {
+	PortStatus *OfpPortStatus `protobuf:"bytes,2,opt,name=port_status,json=portStatus,proto3,oneof"`
+}
+
+func (*ChangeEvent_PortStatus) isChangeEvent_Event() {}
+
+func (m *ChangeEvent) GetEvent() isChangeEvent_Event {
+	if m != nil {
+		return m.Event
+	}
+	return nil
+}
+
+func (m *ChangeEvent) GetPortStatus() *OfpPortStatus {
+	if x, ok := m.GetEvent().(*ChangeEvent_PortStatus); ok {
+		return x.PortStatus
+	}
+	return nil
+}
+
+// XXX_OneofFuncs is for the internal use of the proto package.
+func (*ChangeEvent) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
+	return _ChangeEvent_OneofMarshaler, _ChangeEvent_OneofUnmarshaler, _ChangeEvent_OneofSizer, []interface{}{
+		(*ChangeEvent_PortStatus)(nil),
+	}
+}
+
+func _ChangeEvent_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
+	m := msg.(*ChangeEvent)
+	// event
+	switch x := m.Event.(type) {
+	case *ChangeEvent_PortStatus:
+		b.EncodeVarint(2<<3 | proto.WireBytes)
+		if err := b.EncodeMessage(x.PortStatus); err != nil {
+			return err
+		}
+	case nil:
+	default:
+		return fmt.Errorf("ChangeEvent.Event has unexpected type %T", x)
+	}
+	return nil
+}
+
+func _ChangeEvent_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
+	m := msg.(*ChangeEvent)
+	switch tag {
+	case 2: // event.port_status
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		msg := new(OfpPortStatus)
+		err := b.DecodeMessage(msg)
+		m.Event = &ChangeEvent_PortStatus{msg}
+		return true, err
+	default:
+		return false, nil
+	}
+}
+
+func _ChangeEvent_OneofSizer(msg proto.Message) (n int) {
+	m := msg.(*ChangeEvent)
+	// event
+	switch x := m.Event.(type) {
+	case *ChangeEvent_PortStatus:
+		s := proto.Size(x.PortStatus)
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(s))
+		n += s
+	case nil:
+	default:
+		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
+	}
+	return n
+}
+
+func init() {
+	proto.RegisterType((*OfpHeader)(nil), "openflow_13.ofp_header")
+	proto.RegisterType((*OfpHelloElemHeader)(nil), "openflow_13.ofp_hello_elem_header")
+	proto.RegisterType((*OfpHelloElemVersionbitmap)(nil), "openflow_13.ofp_hello_elem_versionbitmap")
+	proto.RegisterType((*OfpHello)(nil), "openflow_13.ofp_hello")
+	proto.RegisterType((*OfpSwitchConfig)(nil), "openflow_13.ofp_switch_config")
+	proto.RegisterType((*OfpTableMod)(nil), "openflow_13.ofp_table_mod")
+	proto.RegisterType((*OfpPort)(nil), "openflow_13.ofp_port")
+	proto.RegisterType((*OfpSwitchFeatures)(nil), "openflow_13.ofp_switch_features")
+	proto.RegisterType((*OfpPortStatus)(nil), "openflow_13.ofp_port_status")
+	proto.RegisterType((*OfpPortMod)(nil), "openflow_13.ofp_port_mod")
+	proto.RegisterType((*OfpMatch)(nil), "openflow_13.ofp_match")
+	proto.RegisterType((*OfpOxmField)(nil), "openflow_13.ofp_oxm_field")
+	proto.RegisterType((*OfpOxmOfbField)(nil), "openflow_13.ofp_oxm_ofb_field")
+	proto.RegisterType((*OfpOxmExperimenterField)(nil), "openflow_13.ofp_oxm_experimenter_field")
+	proto.RegisterType((*OfpAction)(nil), "openflow_13.ofp_action")
+	proto.RegisterType((*OfpActionOutput)(nil), "openflow_13.ofp_action_output")
+	proto.RegisterType((*OfpActionMplsTtl)(nil), "openflow_13.ofp_action_mpls_ttl")
+	proto.RegisterType((*OfpActionPush)(nil), "openflow_13.ofp_action_push")
+	proto.RegisterType((*OfpActionPopMpls)(nil), "openflow_13.ofp_action_pop_mpls")
+	proto.RegisterType((*OfpActionGroup)(nil), "openflow_13.ofp_action_group")
+	proto.RegisterType((*OfpActionNwTtl)(nil), "openflow_13.ofp_action_nw_ttl")
+	proto.RegisterType((*OfpActionSetField)(nil), "openflow_13.ofp_action_set_field")
+	proto.RegisterType((*OfpActionExperimenter)(nil), "openflow_13.ofp_action_experimenter")
+	proto.RegisterType((*OfpInstruction)(nil), "openflow_13.ofp_instruction")
+	proto.RegisterType((*OfpInstructionGotoTable)(nil), "openflow_13.ofp_instruction_goto_table")
+	proto.RegisterType((*OfpInstructionWriteMetadata)(nil), "openflow_13.ofp_instruction_write_metadata")
+	proto.RegisterType((*OfpInstructionActions)(nil), "openflow_13.ofp_instruction_actions")
+	proto.RegisterType((*OfpInstructionMeter)(nil), "openflow_13.ofp_instruction_meter")
+	proto.RegisterType((*OfpInstructionExperimenter)(nil), "openflow_13.ofp_instruction_experimenter")
+	proto.RegisterType((*OfpFlowMod)(nil), "openflow_13.ofp_flow_mod")
+	proto.RegisterType((*OfpBucket)(nil), "openflow_13.ofp_bucket")
+	proto.RegisterType((*OfpGroupMod)(nil), "openflow_13.ofp_group_mod")
+	proto.RegisterType((*OfpPacketOut)(nil), "openflow_13.ofp_packet_out")
+	proto.RegisterType((*OfpPacketIn)(nil), "openflow_13.ofp_packet_in")
+	proto.RegisterType((*OfpFlowRemoved)(nil), "openflow_13.ofp_flow_removed")
+	proto.RegisterType((*OfpMeterBandHeader)(nil), "openflow_13.ofp_meter_band_header")
+	proto.RegisterType((*OfpMeterBandDrop)(nil), "openflow_13.ofp_meter_band_drop")
+	proto.RegisterType((*OfpMeterBandDscpRemark)(nil), "openflow_13.ofp_meter_band_dscp_remark")
+	proto.RegisterType((*OfpMeterBandExperimenter)(nil), "openflow_13.ofp_meter_band_experimenter")
+	proto.RegisterType((*OfpMeterMod)(nil), "openflow_13.ofp_meter_mod")
+	proto.RegisterType((*OfpErrorMsg)(nil), "openflow_13.ofp_error_msg")
+	proto.RegisterType((*OfpErrorExperimenterMsg)(nil), "openflow_13.ofp_error_experimenter_msg")
+	proto.RegisterType((*OfpMultipartRequest)(nil), "openflow_13.ofp_multipart_request")
+	proto.RegisterType((*OfpMultipartReply)(nil), "openflow_13.ofp_multipart_reply")
+	proto.RegisterType((*OfpDesc)(nil), "openflow_13.ofp_desc")
+	proto.RegisterType((*OfpFlowStatsRequest)(nil), "openflow_13.ofp_flow_stats_request")
+	proto.RegisterType((*OfpFlowStats)(nil), "openflow_13.ofp_flow_stats")
+	proto.RegisterType((*OfpAggregateStatsRequest)(nil), "openflow_13.ofp_aggregate_stats_request")
+	proto.RegisterType((*OfpAggregateStatsReply)(nil), "openflow_13.ofp_aggregate_stats_reply")
+	proto.RegisterType((*OfpTableFeatureProperty)(nil), "openflow_13.ofp_table_feature_property")
+	proto.RegisterType((*OfpTableFeaturePropInstructions)(nil), "openflow_13.ofp_table_feature_prop_instructions")
+	proto.RegisterType((*OfpTableFeaturePropNextTables)(nil), "openflow_13.ofp_table_feature_prop_next_tables")
+	proto.RegisterType((*OfpTableFeaturePropActions)(nil), "openflow_13.ofp_table_feature_prop_actions")
+	proto.RegisterType((*OfpTableFeaturePropOxm)(nil), "openflow_13.ofp_table_feature_prop_oxm")
+	proto.RegisterType((*OfpTableFeaturePropExperimenter)(nil), "openflow_13.ofp_table_feature_prop_experimenter")
+	proto.RegisterType((*OfpTableFeatures)(nil), "openflow_13.ofp_table_features")
+	proto.RegisterType((*OfpTableStats)(nil), "openflow_13.ofp_table_stats")
+	proto.RegisterType((*OfpPortStatsRequest)(nil), "openflow_13.ofp_port_stats_request")
+	proto.RegisterType((*OfpPortStats)(nil), "openflow_13.ofp_port_stats")
+	proto.RegisterType((*OfpGroupStatsRequest)(nil), "openflow_13.ofp_group_stats_request")
+	proto.RegisterType((*OfpBucketCounter)(nil), "openflow_13.ofp_bucket_counter")
+	proto.RegisterType((*OfpGroupStats)(nil), "openflow_13.ofp_group_stats")
+	proto.RegisterType((*OfpGroupDesc)(nil), "openflow_13.ofp_group_desc")
+	proto.RegisterType((*OfpGroupEntry)(nil), "openflow_13.ofp_group_entry")
+	proto.RegisterType((*OfpGroupFeatures)(nil), "openflow_13.ofp_group_features")
+	proto.RegisterType((*OfpMeterMultipartRequest)(nil), "openflow_13.ofp_meter_multipart_request")
+	proto.RegisterType((*OfpMeterBandStats)(nil), "openflow_13.ofp_meter_band_stats")
+	proto.RegisterType((*OfpMeterStats)(nil), "openflow_13.ofp_meter_stats")
+	proto.RegisterType((*OfpMeterConfig)(nil), "openflow_13.ofp_meter_config")
+	proto.RegisterType((*OfpMeterFeatures)(nil), "openflow_13.ofp_meter_features")
+	proto.RegisterType((*OfpExperimenterMultipartHeader)(nil), "openflow_13.ofp_experimenter_multipart_header")
+	proto.RegisterType((*OfpExperimenterHeader)(nil), "openflow_13.ofp_experimenter_header")
+	proto.RegisterType((*OfpQueuePropHeader)(nil), "openflow_13.ofp_queue_prop_header")
+	proto.RegisterType((*OfpQueuePropMinRate)(nil), "openflow_13.ofp_queue_prop_min_rate")
+	proto.RegisterType((*OfpQueuePropMaxRate)(nil), "openflow_13.ofp_queue_prop_max_rate")
+	proto.RegisterType((*OfpQueuePropExperimenter)(nil), "openflow_13.ofp_queue_prop_experimenter")
+	proto.RegisterType((*OfpPacketQueue)(nil), "openflow_13.ofp_packet_queue")
+	proto.RegisterType((*OfpQueueGetConfigRequest)(nil), "openflow_13.ofp_queue_get_config_request")
+	proto.RegisterType((*OfpQueueGetConfigReply)(nil), "openflow_13.ofp_queue_get_config_reply")
+	proto.RegisterType((*OfpActionSetQueue)(nil), "openflow_13.ofp_action_set_queue")
+	proto.RegisterType((*OfpQueueStatsRequest)(nil), "openflow_13.ofp_queue_stats_request")
+	proto.RegisterType((*OfpQueueStats)(nil), "openflow_13.ofp_queue_stats")
+	proto.RegisterType((*OfpRoleRequest)(nil), "openflow_13.ofp_role_request")
+	proto.RegisterType((*OfpAsyncConfig)(nil), "openflow_13.ofp_async_config")
+	proto.RegisterType((*MeterModUpdate)(nil), "openflow_13.MeterModUpdate")
+	proto.RegisterType((*MeterStatsReply)(nil), "openflow_13.MeterStatsReply")
+	proto.RegisterType((*FlowTableUpdate)(nil), "openflow_13.FlowTableUpdate")
+	proto.RegisterType((*FlowGroupTableUpdate)(nil), "openflow_13.FlowGroupTableUpdate")
+	proto.RegisterType((*Flows)(nil), "openflow_13.Flows")
+	proto.RegisterType((*Meters)(nil), "openflow_13.Meters")
+	proto.RegisterType((*FlowGroups)(nil), "openflow_13.FlowGroups")
+	proto.RegisterType((*FlowChanges)(nil), "openflow_13.FlowChanges")
+	proto.RegisterType((*FlowGroupChanges)(nil), "openflow_13.FlowGroupChanges")
+	proto.RegisterType((*PacketIn)(nil), "openflow_13.PacketIn")
+	proto.RegisterType((*PacketOut)(nil), "openflow_13.PacketOut")
+	proto.RegisterType((*ChangeEvent)(nil), "openflow_13.ChangeEvent")
+	proto.RegisterEnum("openflow_13.OfpPortNo", OfpPortNo_name, OfpPortNo_value)
+	proto.RegisterEnum("openflow_13.OfpType", OfpType_name, OfpType_value)
+	proto.RegisterEnum("openflow_13.OfpHelloElemType", OfpHelloElemType_name, OfpHelloElemType_value)
+	proto.RegisterEnum("openflow_13.OfpConfigFlags", OfpConfigFlags_name, OfpConfigFlags_value)
+	proto.RegisterEnum("openflow_13.OfpTableConfig", OfpTableConfig_name, OfpTableConfig_value)
+	proto.RegisterEnum("openflow_13.OfpTable", OfpTable_name, OfpTable_value)
+	proto.RegisterEnum("openflow_13.OfpCapabilities", OfpCapabilities_name, OfpCapabilities_value)
+	proto.RegisterEnum("openflow_13.OfpPortConfig", OfpPortConfig_name, OfpPortConfig_value)
+	proto.RegisterEnum("openflow_13.OfpPortState", OfpPortState_name, OfpPortState_value)
+	proto.RegisterEnum("openflow_13.OfpPortFeatures", OfpPortFeatures_name, OfpPortFeatures_value)
+	proto.RegisterEnum("openflow_13.OfpPortReason", OfpPortReason_name, OfpPortReason_value)
+	proto.RegisterEnum("openflow_13.OfpMatchType", OfpMatchType_name, OfpMatchType_value)
+	proto.RegisterEnum("openflow_13.OfpOxmClass", OfpOxmClass_name, OfpOxmClass_value)
+	proto.RegisterEnum("openflow_13.OxmOfbFieldTypes", OxmOfbFieldTypes_name, OxmOfbFieldTypes_value)
+	proto.RegisterEnum("openflow_13.OfpVlanId", OfpVlanId_name, OfpVlanId_value)
+	proto.RegisterEnum("openflow_13.OfpIpv6ExthdrFlags", OfpIpv6ExthdrFlags_name, OfpIpv6ExthdrFlags_value)
+	proto.RegisterEnum("openflow_13.OfpActionType", OfpActionType_name, OfpActionType_value)
+	proto.RegisterEnum("openflow_13.OfpControllerMaxLen", OfpControllerMaxLen_name, OfpControllerMaxLen_value)
+	proto.RegisterEnum("openflow_13.OfpInstructionType", OfpInstructionType_name, OfpInstructionType_value)
+	proto.RegisterEnum("openflow_13.OfpFlowModCommand", OfpFlowModCommand_name, OfpFlowModCommand_value)
+	proto.RegisterEnum("openflow_13.OfpFlowModFlags", OfpFlowModFlags_name, OfpFlowModFlags_value)
+	proto.RegisterEnum("openflow_13.OfpGroup", OfpGroup_name, OfpGroup_value)
+	proto.RegisterEnum("openflow_13.OfpGroupModCommand", OfpGroupModCommand_name, OfpGroupModCommand_value)
+	proto.RegisterEnum("openflow_13.OfpGroupType", OfpGroupType_name, OfpGroupType_value)
+	proto.RegisterEnum("openflow_13.OfpPacketInReason", OfpPacketInReason_name, OfpPacketInReason_value)
+	proto.RegisterEnum("openflow_13.OfpFlowRemovedReason", OfpFlowRemovedReason_name, OfpFlowRemovedReason_value)
+	proto.RegisterEnum("openflow_13.OfpMeter", OfpMeter_name, OfpMeter_value)
+	proto.RegisterEnum("openflow_13.OfpMeterBandType", OfpMeterBandType_name, OfpMeterBandType_value)
+	proto.RegisterEnum("openflow_13.OfpMeterModCommand", OfpMeterModCommand_name, OfpMeterModCommand_value)
+	proto.RegisterEnum("openflow_13.OfpMeterFlags", OfpMeterFlags_name, OfpMeterFlags_value)
+	proto.RegisterEnum("openflow_13.OfpErrorType", OfpErrorType_name, OfpErrorType_value)
+	proto.RegisterEnum("openflow_13.OfpHelloFailedCode", OfpHelloFailedCode_name, OfpHelloFailedCode_value)
+	proto.RegisterEnum("openflow_13.OfpBadRequestCode", OfpBadRequestCode_name, OfpBadRequestCode_value)
+	proto.RegisterEnum("openflow_13.OfpBadActionCode", OfpBadActionCode_name, OfpBadActionCode_value)
+	proto.RegisterEnum("openflow_13.OfpBadInstructionCode", OfpBadInstructionCode_name, OfpBadInstructionCode_value)
+	proto.RegisterEnum("openflow_13.OfpBadMatchCode", OfpBadMatchCode_name, OfpBadMatchCode_value)
+	proto.RegisterEnum("openflow_13.OfpFlowModFailedCode", OfpFlowModFailedCode_name, OfpFlowModFailedCode_value)
+	proto.RegisterEnum("openflow_13.OfpGroupModFailedCode", OfpGroupModFailedCode_name, OfpGroupModFailedCode_value)
+	proto.RegisterEnum("openflow_13.OfpPortModFailedCode", OfpPortModFailedCode_name, OfpPortModFailedCode_value)
+	proto.RegisterEnum("openflow_13.OfpTableModFailedCode", OfpTableModFailedCode_name, OfpTableModFailedCode_value)
+	proto.RegisterEnum("openflow_13.OfpQueueOpFailedCode", OfpQueueOpFailedCode_name, OfpQueueOpFailedCode_value)
+	proto.RegisterEnum("openflow_13.OfpSwitchConfigFailedCode", OfpSwitchConfigFailedCode_name, OfpSwitchConfigFailedCode_value)
+	proto.RegisterEnum("openflow_13.OfpRoleRequestFailedCode", OfpRoleRequestFailedCode_name, OfpRoleRequestFailedCode_value)
+	proto.RegisterEnum("openflow_13.OfpMeterModFailedCode", OfpMeterModFailedCode_name, OfpMeterModFailedCode_value)
+	proto.RegisterEnum("openflow_13.OfpTableFeaturesFailedCode", OfpTableFeaturesFailedCode_name, OfpTableFeaturesFailedCode_value)
+	proto.RegisterEnum("openflow_13.OfpMultipartType", OfpMultipartType_name, OfpMultipartType_value)
+	proto.RegisterEnum("openflow_13.OfpMultipartRequestFlags", OfpMultipartRequestFlags_name, OfpMultipartRequestFlags_value)
+	proto.RegisterEnum("openflow_13.OfpMultipartReplyFlags", OfpMultipartReplyFlags_name, OfpMultipartReplyFlags_value)
+	proto.RegisterEnum("openflow_13.OfpTableFeaturePropType", OfpTableFeaturePropType_name, OfpTableFeaturePropType_value)
+	proto.RegisterEnum("openflow_13.OfpGroupCapabilities", OfpGroupCapabilities_name, OfpGroupCapabilities_value)
+	proto.RegisterEnum("openflow_13.OfpQueueProperties", OfpQueueProperties_name, OfpQueueProperties_value)
+	proto.RegisterEnum("openflow_13.OfpControllerRole", OfpControllerRole_name, OfpControllerRole_value)
+}
+
+func init() {
+	proto.RegisterFile("voltha_protos/openflow_13.proto", fileDescriptor_openflow_13_72e0202e73bb47da)
+}
+
+var fileDescriptor_openflow_13_72e0202e73bb47da = []byte{
+	// 8433 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x7d, 0x5b, 0x8c, 0x1b, 0x5b,
+	0x72, 0x98, 0xf8, 0x98, 0x19, 0xf2, 0x70, 0x66, 0xd4, 0x6a, 0xbd, 0x28, 0x8d, 0x74, 0x25, 0x71,
+	0xef, 0xee, 0xbd, 0xcb, 0xb5, 0xf7, 0xde, 0xab, 0xab, 0xd5, 0xae, 0x77, 0xbd, 0x8e, 0x9a, 0x64,
+	0x73, 0x86, 0x57, 0x7c, 0xb4, 0xba, 0x7b, 0x46, 0xd2, 0x06, 0x4e, 0x83, 0x43, 0xb6, 0x66, 0xe8,
+	0x4b, 0xb2, 0xb9, 0xdd, 0x3d, 0xa3, 0x91, 0x13, 0x07, 0x8a, 0x8d, 0x20, 0x40, 0x12, 0xdb, 0x09,
+	0xfc, 0xb1, 0x40, 0xe0, 0x00, 0x31, 0xe2, 0x7c, 0x04, 0x01, 0xf2, 0x11, 0x20, 0x40, 0x80, 0xfc,
+	0x26, 0x40, 0x02, 0xe4, 0x01, 0x18, 0x08, 0xfc, 0x13, 0xff, 0x39, 0x3f, 0x01, 0x9c, 0xdf, 0x24,
+	0xce, 0x66, 0x15, 0xd4, 0xa9, 0x3a, 0xa7, 0x4f, 0xf3, 0x31, 0x77, 0x76, 0x73, 0x37, 0x1f, 0xf9,
+	0x12, 0xbb, 0xaa, 0x4e, 0x9d, 0x3a, 0x75, 0xaa, 0xea, 0x54, 0x55, 0x9f, 0x1e, 0xb1, 0x7b, 0xa7,
+	0xc1, 0x38, 0x3e, 0xee, 0x7b, 0xb3, 0x30, 0x88, 0x83, 0xe8, 0xa3, 0x60, 0xe6, 0x4f, 0x5f, 0x8d,
+	0x83, 0xd7, 0xde, 0x27, 0x9f, 0x7e, 0x93, 0x83, 0xf4, 0x92, 0x02, 0xba, 0x7d, 0xe7, 0x28, 0x08,
+	0x8e, 0xc6, 0xfe, 0x47, 0xfd, 0xd9, 0xe8, 0xa3, 0xfe, 0x74, 0x1a, 0xc4, 0xfd, 0x78, 0x14, 0x4c,
+	0x23, 0x24, 0xbd, 0x7d, 0x3f, 0xcd, 0xeb, 0x4d, 0x7f, 0x7a, 0xe4, 0x05, 0x33, 0x85, 0xa2, 0x32,
+	0x60, 0x2c, 0x78, 0x35, 0xf3, 0x8e, 0xfd, 0xfe, 0xd0, 0x0f, 0xf5, 0x32, 0xdb, 0x38, 0xf5, 0xc3,
+	0x68, 0x14, 0x4c, 0xcb, 0x99, 0xfb, 0x99, 0x0f, 0xb7, 0x6c, 0xf1, 0xa8, 0x7f, 0x9d, 0xe5, 0xe3,
+	0x37, 0x33, 0xbf, 0x9c, 0xbd, 0x9f, 0xf9, 0x70, 0xfb, 0xe1, 0xf5, 0x6f, 0xaa, 0x62, 0x01, 0x03,
+	0x40, 0xda, 0x9c, 0x44, 0xd7, 0x58, 0xee, 0x6c, 0x34, 0x2c, 0xe7, 0x38, 0x03, 0xf8, 0x59, 0xf9,
+	0x27, 0x19, 0x76, 0x1d, 0x67, 0x19, 0x8f, 0x03, 0xcf, 0x1f, 0xfb, 0x13, 0x31, 0xe1, 0x23, 0x62,
+	0x9b, 0xe1, 0x6c, 0xef, 0x2f, 0xb0, 0x55, 0x46, 0x28, 0x33, 0x3c, 0x63, 0x5b, 0x24, 0xd7, 0xe1,
+	0x28, 0x9e, 0xf4, 0x67, 0x5c, 0xaa, 0xd2, 0xc3, 0xaf, 0x9f, 0x37, 0x3c, 0x35, 0x60, 0xef, 0x92,
+	0x9d, 0xe6, 0x50, 0x2b, 0xb2, 0x0d, 0x20, 0xf3, 0xa7, 0x71, 0xe5, 0x3b, 0xec, 0xce, 0x79, 0x63,
+	0x41, 0x49, 0xf8, 0x2b, 0x2a, 0x67, 0xef, 0xe7, 0x40, 0x49, 0xf4, 0x58, 0x79, 0xca, 0x8a, 0x72,
+	0xa4, 0xfe, 0x2b, 0xac, 0x40, 0x1c, 0xa3, 0x72, 0xe6, 0x7e, 0xee, 0xc3, 0xd2, 0xc3, 0xca, 0x79,
+	0xf2, 0xa1, 0x42, 0x6c, 0x39, 0xa6, 0xd2, 0x61, 0x57, 0x80, 0x24, 0x7a, 0x3d, 0x8a, 0x07, 0xc7,
+	0xde, 0x20, 0x98, 0xbe, 0x1a, 0x1d, 0xe9, 0xd7, 0xd8, 0xda, 0xab, 0x71, 0xff, 0x28, 0xa2, 0xed,
+	0xc1, 0x07, 0xbd, 0xc2, 0xb6, 0x26, 0xa3, 0x28, 0xf2, 0x22, 0x7f, 0x3a, 0xf4, 0xc6, 0xfe, 0x94,
+	0xeb, 0x63, 0xcb, 0x2e, 0x01, 0xd0, 0xf1, 0xa7, 0xc3, 0xb6, 0x3f, 0xad, 0xd4, 0xd8, 0x16, 0xdf,
+	0xa7, 0xfe, 0xe1, 0xd8, 0xf7, 0x26, 0xc1, 0x50, 0xbf, 0xc5, 0x0a, 0xf8, 0x30, 0x1a, 0x8a, 0xcd,
+	0xe6, 0xcf, 0xad, 0xa1, 0x7e, 0x83, 0xad, 0xe3, 0x7c, 0xc4, 0x88, 0x9e, 0x2a, 0xff, 0x20, 0xcb,
+	0x0a, 0xc0, 0x64, 0x16, 0x84, 0xb1, 0x7e, 0x93, 0x6d, 0xc0, 0xbf, 0xde, 0x34, 0xa0, 0xe1, 0xeb,
+	0xf0, 0xd8, 0x0d, 0x00, 0x71, 0xfc, 0xda, 0xeb, 0x0f, 0x87, 0x21, 0xe9, 0x67, 0xfd, 0xf8, 0xb5,
+	0x31, 0x1c, 0x86, 0xba, 0xce, 0xf2, 0xd3, 0xfe, 0xc4, 0xe7, 0x96, 0x51, 0xb4, 0xf9, 0x6f, 0x65,
+	0xaa, 0xbc, 0x3a, 0x15, 0x2c, 0x34, 0x8a, 0xfb, 0xb1, 0x5f, 0x5e, 0xc3, 0x85, 0xf2, 0x07, 0xe0,
+	0x30, 0x38, 0x09, 0xc3, 0xf2, 0x3a, 0x07, 0xf2, 0xdf, 0xfa, 0x7b, 0x8c, 0xf5, 0x87, 0xa7, 0x7e,
+	0x18, 0x8f, 0x22, 0x7f, 0x58, 0xde, 0xe0, 0x18, 0x05, 0xa2, 0xdf, 0x61, 0xc5, 0xe8, 0x64, 0x06,
+	0xb2, 0xf9, 0xc3, 0x72, 0x81, 0xa3, 0x13, 0x00, 0x70, 0x9c, 0xf9, 0x7e, 0x58, 0x2e, 0x22, 0x47,
+	0xf8, 0xad, 0xdf, 0x65, 0x0c, 0x38, 0x7b, 0xd1, 0xcc, 0xf7, 0x87, 0x65, 0x86, 0x43, 0x00, 0xe2,
+	0x00, 0x40, 0xdf, 0x61, 0xc5, 0x49, 0xff, 0x8c, 0xb0, 0x25, 0x8e, 0x2d, 0x4c, 0xfa, 0x67, 0x1c,
+	0x59, 0xf9, 0xe7, 0x19, 0x76, 0x55, 0xd9, 0xb6, 0x57, 0x7e, 0x3f, 0x3e, 0x09, 0xfd, 0x48, 0xbf,
+	0xc7, 0x4a, 0xc3, 0x7e, 0xdc, 0x9f, 0xf5, 0xe3, 0x63, 0xa1, 0xf0, 0xbc, 0xcd, 0x04, 0xa8, 0xc5,
+	0xb9, 0x4e, 0xbd, 0xc3, 0x93, 0x57, 0xaf, 0xfc, 0x30, 0x22, 0xb5, 0x17, 0xa6, 0x35, 0x7c, 0x86,
+	0xbd, 0x9a, 0xe2, 0xd6, 0x45, 0xe4, 0x57, 0x1b, 0x53, 0x97, 0x3f, 0xea, 0x0f, 0xd8, 0x66, 0xff,
+	0xe4, 0x6c, 0x34, 0x1e, 0xf5, 0xc3, 0x37, 0xc0, 0x19, 0xd5, 0x58, 0x92, 0xb0, 0xd6, 0x50, 0xaf,
+	0xb0, 0xcd, 0x41, 0x7f, 0xd6, 0x3f, 0x1c, 0x8d, 0x47, 0xf1, 0xc8, 0x8f, 0x48, 0xa5, 0x29, 0x58,
+	0x25, 0x64, 0x97, 0xc5, 0xce, 0x7a, 0xa0, 0xeb, 0x93, 0x48, 0x7f, 0xc4, 0xd6, 0x43, 0xbf, 0x1f,
+	0x51, 0x2c, 0xd8, 0x7e, 0x78, 0x67, 0xc1, 0x7c, 0x39, 0x35, 0xd2, 0xd8, 0x44, 0x0b, 0x81, 0x62,
+	0xe8, 0x47, 0x03, 0x72, 0xc9, 0xeb, 0x4b, 0xc7, 0xd8, 0x9c, 0xa4, 0xf2, 0x37, 0x33, 0x6c, 0x53,
+	0xb2, 0x01, 0x93, 0xfc, 0xe9, 0x4d, 0x2a, 0x31, 0x9f, 0x5c, 0xca, 0x7c, 0x74, 0x96, 0x9f, 0xf4,
+	0xa3, 0xcf, 0x49, 0x1b, 0xfc, 0x37, 0x18, 0x82, 0x34, 0x0b, 0xd2, 0x41, 0x02, 0xa8, 0xbc, 0x46,
+	0xdf, 0x9d, 0xf4, 0xe3, 0xc1, 0xb1, 0xfe, 0x51, 0x2a, 0x2c, 0xed, 0x2c, 0x2c, 0x82, 0x53, 0xa9,
+	0x11, 0xe9, 0x97, 0x18, 0x0b, 0xce, 0x26, 0xde, 0xab, 0x91, 0x3f, 0x1e, 0x62, 0x58, 0x28, 0x3d,
+	0xbc, 0xbd, 0x30, 0x4c, 0x92, 0xd8, 0xc5, 0xe0, 0x6c, 0xd2, 0xe4, 0xc4, 0x95, 0xff, 0x9a, 0x41,
+	0xcf, 0x94, 0x48, 0xfd, 0xdb, 0x0c, 0xd0, 0xde, 0x60, 0xdc, 0x8f, 0x22, 0x12, 0x61, 0x39, 0x2f,
+	0x4e, 0x61, 0x17, 0x82, 0xb3, 0x49, 0x1d, 0x7e, 0xe9, 0xdf, 0x87, 0x35, 0x1c, 0x22, 0x17, 0xbe,
+	0xf4, 0xd2, 0xc3, 0xf7, 0x96, 0x0e, 0x94, 0x54, 0x7b, 0x97, 0xec, 0x42, 0xf0, 0xea, 0x90, 0x8b,
+	0xa2, 0xbf, 0x60, 0xba, 0x7f, 0x36, 0xf3, 0xc3, 0x11, 0x04, 0x20, 0x3f, 0x24, 0x3e, 0x6b, 0x9c,
+	0xcf, 0x07, 0x4b, 0xf9, 0x2c, 0x92, 0xef, 0x5d, 0xb2, 0xaf, 0xa8, 0x50, 0xce, 0xb9, 0xb6, 0xc1,
+	0xd6, 0x38, 0xb6, 0xf2, 0xc7, 0xdb, 0x18, 0xd5, 0x52, 0x42, 0x9c, 0x7f, 0x0a, 0xa8, 0x94, 0x5c,
+	0xe5, 0x11, 0xe9, 0xfc, 0x16, 0x2b, 0x1c, 0xf7, 0x23, 0x8f, 0xef, 0x33, 0x58, 0x5b, 0xc1, 0xde,
+	0x38, 0xee, 0x47, 0x1d, 0xd8, 0xea, 0x6b, 0x2c, 0x0f, 0x96, 0x83, 0x46, 0xb1, 0x77, 0xc9, 0xe6,
+	0x4f, 0xfa, 0x57, 0xd9, 0xd6, 0xec, 0xf8, 0x4d, 0x34, 0x1a, 0xf4, 0xc7, 0xdc, 0xe6, 0xd0, 0x3a,
+	0xf6, 0x2e, 0xd9, 0x9b, 0x02, 0x6c, 0x01, 0xd9, 0x07, 0x6c, 0x9b, 0xa2, 0xa4, 0x1f, 0xf7, 0xc1,
+	0x43, 0xb9, 0x0a, 0xf2, 0x70, 0x66, 0x70, 0x78, 0x87, 0xc0, 0xfa, 0x2d, 0xb6, 0xe1, 0xc7, 0xc7,
+	0xde, 0x30, 0x8a, 0x79, 0x40, 0xda, 0xdc, 0xbb, 0x64, 0xaf, 0xfb, 0xf1, 0x71, 0x23, 0x8a, 0x05,
+	0x2a, 0x0a, 0x07, 0x3c, 0x22, 0x09, 0x94, 0x13, 0x0e, 0xf4, 0x1d, 0x56, 0x00, 0x14, 0x5f, 0x70,
+	0x81, 0x04, 0x00, 0x62, 0x17, 0xd6, 0xb4, 0xc3, 0x0a, 0xa7, 0xe3, 0xfe, 0xd4, 0x3b, 0x1d, 0x0d,
+	0x31, 0x24, 0x01, 0x12, 0x20, 0x07, 0xa3, 0xa1, 0x44, 0xce, 0x06, 0x33, 0x8c, 0x4a, 0x02, 0x69,
+	0x0d, 0x66, 0x30, 0xe3, 0x68, 0xe6, 0x0d, 0xa3, 0xc1, 0x0c, 0x63, 0x12, 0xcc, 0x38, 0x9a, 0x35,
+	0xa2, 0xc1, 0x4c, 0xbf, 0xc9, 0xd6, 0x47, 0x33, 0xcf, 0x1f, 0x4c, 0xcb, 0x9b, 0x84, 0x59, 0x1b,
+	0xcd, 0xcc, 0xc1, 0x14, 0x18, 0x8e, 0x66, 0x98, 0x1c, 0x94, 0xb7, 0x04, 0xc3, 0xd1, 0xcc, 0xe2,
+	0x69, 0x06, 0x47, 0x9e, 0x3e, 0xe2, 0x6b, 0xd8, 0x4e, 0x90, 0xa7, 0x8f, 0x68, 0x11, 0x1c, 0x09,
+	0x6b, 0xbf, 0xac, 0x22, 0x69, 0xf1, 0xf1, 0x60, 0xc6, 0x07, 0x6a, 0x42, 0x94, 0x78, 0x30, 0x83,
+	0x71, 0x84, 0x82, 0x61, 0x57, 0x14, 0x14, 0x8d, 0x3a, 0x19, 0xe2, 0x28, 0x5d, 0xa0, 0x4e, 0x86,
+	0x62, 0x14, 0xa0, 0x60, 0xd4, 0x55, 0x05, 0x05, 0xa3, 0x76, 0x58, 0x21, 0x1a, 0xc4, 0x38, 0xec,
+	0x9a, 0x10, 0x04, 0x20, 0x24, 0x25, 0x47, 0xc2, 0xc0, 0xeb, 0x2a, 0x12, 0x46, 0x3e, 0x60, 0xa5,
+	0xd1, 0x60, 0x02, 0x8b, 0xe0, 0x5b, 0x71, 0x83, 0xf0, 0x0c, 0x81, 0x7c, 0x37, 0x12, 0x92, 0x41,
+	0x30, 0xf4, 0xcb, 0x37, 0xd3, 0x24, 0xf5, 0x60, 0xe8, 0x83, 0x6e, 0xfb, 0xe1, 0xcc, 0x0b, 0x66,
+	0xe5, 0xb2, 0xd0, 0x6d, 0x3f, 0x9c, 0xf5, 0xf8, 0x7e, 0x00, 0x22, 0x9a, 0xf5, 0xcb, 0xb7, 0x84,
+	0xcc, 0xfd, 0x70, 0xe6, 0xcc, 0xfa, 0x02, 0x15, 0xcf, 0xfa, 0xe5, 0xdb, 0x0a, 0xca, 0x4d, 0x50,
+	0xd1, 0x71, 0xbf, 0xbc, 0x23, 0xec, 0x06, 0x46, 0x1d, 0x27, 0xa3, 0x8e, 0xfb, 0xe5, 0x3b, 0x0a,
+	0xca, 0x3d, 0xee, 0xd3, 0x6e, 0x3c, 0xe6, 0x4a, 0xb8, 0x4b, 0x38, 0xd8, 0x8d, 0xc7, 0xc9, 0x56,
+	0x3d, 0xe6, 0x4a, 0x78, 0x4f, 0x45, 0x0a, 0x25, 0x00, 0xf2, 0xd5, 0xb8, 0x7f, 0xe8, 0x8f, 0xcb,
+	0xf7, 0xe4, 0x0a, 0x67, 0xa7, 0x8f, 0x9b, 0x1c, 0x26, 0x95, 0xf0, 0x18, 0xf5, 0x74, 0x3f, 0xa5,
+	0x84, 0xc7, 0x29, 0x3d, 0x3d, 0x46, 0x3d, 0x3d, 0x48, 0x93, 0x70, 0x3d, 0x7d, 0x8d, 0x6d, 0xf3,
+	0x89, 0xa6, 0x43, 0x2f, 0xee, 0x87, 0x47, 0x7e, 0x5c, 0xae, 0x90, 0x2c, 0x9b, 0x00, 0xef, 0x0e,
+	0x5d, 0x0e, 0xd5, 0xef, 0x93, 0x40, 0xd3, 0xa1, 0x17, 0x45, 0xe3, 0xf2, 0x57, 0x88, 0xa8, 0x88,
+	0x44, 0x4e, 0x34, 0x56, 0x29, 0xe2, 0xf1, 0xb8, 0xfc, 0x7e, 0x9a, 0xc2, 0x1d, 0x8f, 0xf5, 0x7b,
+	0x8c, 0x4d, 0x66, 0xe3, 0xc8, 0xc3, 0x35, 0x7d, 0x95, 0xa4, 0x29, 0x02, 0xac, 0xcd, 0x97, 0x74,
+	0x8b, 0x6d, 0x70, 0x82, 0x78, 0x50, 0xfe, 0x9a, 0xd8, 0x00, 0x00, 0xb8, 0x5c, 0x5b, 0x1c, 0x75,
+	0x18, 0x44, 0xe5, 0x0f, 0x84, 0xc9, 0x00, 0xa4, 0x16, 0x44, 0x80, 0x9c, 0x1d, 0x1e, 0x7a, 0xa3,
+	0x68, 0x34, 0x2c, 0x7f, 0x28, 0x90, 0xb3, 0xc3, 0xc3, 0x56, 0x34, 0x1a, 0xea, 0x77, 0x59, 0x31,
+	0x3e, 0x99, 0x4e, 0xfd, 0x31, 0x9c, 0xc2, 0x5f, 0xa7, 0x88, 0x51, 0x40, 0x50, 0x6b, 0x28, 0x35,
+	0xed, 0x9f, 0xc5, 0xc7, 0xc3, 0xb0, 0x5c, 0x55, 0x35, 0x6d, 0x72, 0x98, 0xfe, 0x31, 0xbb, 0x9a,
+	0x0e, 0x3c, 0x18, 0xdb, 0x46, 0x9c, 0x57, 0xc6, 0xbe, 0x92, 0x8a, 0x3e, 0x3c, 0xce, 0x55, 0xd8,
+	0x26, 0x45, 0x20, 0x24, 0xfd, 0x35, 0xae, 0x8c, 0x8c, 0xcd, 0x30, 0x0c, 0xa9, 0x34, 0x51, 0x38,
+	0x40, 0x9a, 0xcf, 0x15, 0x1a, 0x27, 0x1c, 0x70, 0x9a, 0xf7, 0xd9, 0x96, 0x08, 0x3b, 0x48, 0x34,
+	0xe1, 0xe2, 0x65, 0xec, 0x12, 0xc5, 0x1e, 0x41, 0x25, 0x22, 0x02, 0x52, 0x85, 0x82, 0x8a, 0xc2,
+	0x42, 0x8a, 0x4a, 0x0a, 0x15, 0xa9, 0x54, 0x8a, 0x54, 0xe4, 0x1e, 0x48, 0xf4, 0x1b, 0x44, 0xc4,
+	0xd0, 0x47, 0x54, 0x9a, 0x58, 0xd0, 0xfc, 0x55, 0x85, 0xc6, 0x25, 0x9a, 0xaf, 0xf2, 0xd9, 0x1e,
+	0x27, 0x32, 0xfd, 0xb5, 0x0c, 0xad, 0xaf, 0x44, 0x0e, 0x90, 0x22, 0x93, 0x42, 0xfd, 0x66, 0x8a,
+	0x4c, 0x48, 0xf5, 0x0d, 0xa6, 0x29, 0xee, 0x80, 0x94, 0xbf, 0x95, 0xa1, 0x69, 0xb7, 0x13, 0xa7,
+	0x10, 0x3c, 0x85, 0x35, 0x20, 0xe5, 0xdf, 0x16, 0x94, 0x25, 0xb2, 0x09, 0x4e, 0x06, 0xc7, 0x89,
+	0xb0, 0x0b, 0xa4, 0xfb, 0xed, 0x0c, 0xed, 0xe8, 0xa6, 0xb0, 0x8e, 0xd4, 0xe4, 0x68, 0x21, 0x48,
+	0xfa, 0x3b, 0xa9, 0xc9, 0xd1, 0x4e, 0x80, 0x18, 0x4e, 0xd4, 0xd3, 0xfe, 0xf8, 0xc4, 0xaf, 0xad,
+	0x63, 0xa6, 0x53, 0xf1, 0xd8, 0xed, 0xd5, 0xa7, 0x32, 0xa4, 0xb4, 0x80, 0xc1, 0x22, 0x83, 0x92,
+	0x2b, 0x48, 0x32, 0xf6, 0xb0, 0x0c, 0x03, 0x1b, 0x51, 0x06, 0x51, 0xfe, 0x99, 0x82, 0x55, 0xfe,
+	0x59, 0x1e, 0x4b, 0xc5, 0xfe, 0x00, 0xea, 0x47, 0xfd, 0xe3, 0xd4, 0x99, 0xbd, 0x98, 0x1b, 0x22,
+	0x99, 0x9a, 0x23, 0x7d, 0x87, 0xad, 0x07, 0x27, 0xf1, 0xec, 0x24, 0xa6, 0xdc, 0xf0, 0xbd, 0x55,
+	0x63, 0x90, 0x0a, 0x9c, 0x12, 0x7f, 0xe9, 0xdf, 0x27, 0xa7, 0x8c, 0xe3, 0x31, 0x3f, 0xd2, 0x4b,
+	0x4b, 0x2a, 0x45, 0x1a, 0x2b, 0xe8, 0x84, 0xdb, 0xba, 0xf1, 0x58, 0x7f, 0xc8, 0xf2, 0xb3, 0x93,
+	0xe8, 0x98, 0x32, 0xa2, 0x95, 0xa2, 0x02, 0x0d, 0xcf, 0x15, 0x4e, 0xa2, 0x63, 0x98, 0x72, 0x16,
+	0xcc, 0x38, 0x3b, 0xca, 0x80, 0x56, 0x4e, 0x29, 0xe8, 0x78, 0x30, 0x08, 0x66, 0x9d, 0xd9, 0x38,
+	0xd2, 0xbf, 0xc5, 0xd6, 0x8e, 0xc2, 0xe0, 0x64, 0xc6, 0x13, 0x83, 0xd2, 0xc3, 0xbb, 0xab, 0xc6,
+	0x72, 0x22, 0x38, 0x34, 0xf8, 0x0f, 0xfd, 0xdb, 0x6c, 0x7d, 0xfa, 0x9a, 0x2f, 0x73, 0xe3, 0x7c,
+	0x15, 0x21, 0x15, 0x0c, 0x9c, 0xbe, 0x86, 0x25, 0x3e, 0x61, 0xc5, 0xc8, 0x8f, 0x29, 0x63, 0x2b,
+	0xf0, 0xb1, 0x0f, 0x56, 0x8d, 0x95, 0x84, 0x10, 0x9f, 0x22, 0x3f, 0xc6, 0xe4, 0xef, 0xb3, 0x39,
+	0x13, 0x28, 0x72, 0x26, 0xef, 0xaf, 0x62, 0xa2, 0xd2, 0x42, 0x10, 0x57, 0x9f, 0x6b, 0x05, 0xb6,
+	0x8e, 0x64, 0x95, 0x27, 0x98, 0xee, 0xa5, 0x36, 0x96, 0xd7, 0x5c, 0x90, 0x7e, 0x65, 0xa8, 0xe6,
+	0xa2, 0x6a, 0x12, 0x8a, 0xaa, 0xa4, 0x78, 0x5d, 0x9f, 0xf4, 0xcf, 0xa0, 0x6e, 0xfd, 0x18, 0xeb,
+	0xa9, 0xb9, 0xed, 0x85, 0xe4, 0x4f, 0x9a, 0x04, 0x55, 0xaf, 0xb4, 0xdd, 0x95, 0x8f, 0xb0, 0x94,
+	0x51, 0x76, 0x15, 0x52, 0x7f, 0x3f, 0x3e, 0xf6, 0x43, 0x69, 0xb1, 0x5b, 0x76, 0x02, 0xa8, 0x7c,
+	0x9a, 0x9a, 0x42, 0x6c, 0xe7, 0x17, 0x0c, 0xfa, 0x45, 0xa6, 0xcd, 0xef, 0x23, 0x08, 0xc5, 0x7f,
+	0x28, 0x25, 0x35, 0x7f, 0x6e, 0x0d, 0x2b, 0xd5, 0x94, 0x22, 0x70, 0xfb, 0xf4, 0xeb, 0x72, 0xbb,
+	0xa9, 0x9c, 0xe7, 0x9b, 0x59, 0xd9, 0x63, 0xd7, 0x96, 0x6d, 0x97, 0xfe, 0x31, 0x65, 0xd1, 0x9c,
+	0xfa, 0xfc, 0xfa, 0x82, 0xd2, 0xed, 0x67, 0xec, 0xe6, 0x8a, 0x3d, 0x5b, 0x70, 0xf9, 0xcc, 0xa2,
+	0xcb, 0xc3, 0x46, 0xf1, 0xfc, 0x17, 0x76, 0x64, 0xd3, 0xe6, 0xbf, 0x2b, 0xbf, 0x9f, 0x43, 0xf5,
+	0x8e, 0xa6, 0x51, 0x1c, 0x9e, 0x60, 0x2c, 0xd0, 0x95, 0x58, 0xb0, 0x45, 0xde, 0xbe, 0xc7, 0xd8,
+	0x51, 0x10, 0x07, 0x58, 0xb5, 0x92, 0xc7, 0x2f, 0x16, 0x11, 0x0a, 0x17, 0x2f, 0x21, 0x87, 0xd3,
+	0x1a, 0x9e, 0x78, 0x89, 0xab, 0xbb, 0x6c, 0xfb, 0x75, 0x38, 0x8a, 0x95, 0x7c, 0x1c, 0x63, 0xc0,
+	0x37, 0xce, 0xe5, 0x96, 0x1e, 0x02, 0xc9, 0x3b, 0x87, 0xc8, 0xe4, 0xfd, 0x09, 0xdb, 0x40, 0xb5,
+	0x44, 0x14, 0x17, 0xde, 0x3f, 0x97, 0x1d, 0xd1, 0x82, 0x8f, 0xd3, 0x4f, 0xfd, 0xbb, 0x6c, 0x6d,
+	0xe2, 0x83, 0xea, 0x30, 0x3e, 0x54, 0xce, 0x1d, 0xcf, 0x29, 0xc1, 0x5f, 0xf9, 0x0f, 0xbd, 0x37,
+	0xa7, 0xfd, 0xf5, 0x15, 0x0d, 0x2c, 0x95, 0xc5, 0xb9, 0x2e, 0xb7, 0x8e, 0x5b, 0x55, 0xf9, 0x36,
+	0x1e, 0x03, 0xcb, 0xf5, 0x7a, 0x4e, 0xcf, 0xa7, 0xd2, 0x67, 0xef, 0x9d, 0xaf, 0x42, 0xfd, 0x36,
+	0x2b, 0xc8, 0x1d, 0xc0, 0xfe, 0x85, 0x7c, 0xd6, 0xbf, 0xc2, 0xb6, 0xd2, 0x49, 0x4b, 0x96, 0x13,
+	0x6c, 0x4e, 0x94, 0x6c, 0xa5, 0xd2, 0x46, 0x6b, 0x5c, 0xa2, 0x56, 0xfd, 0x93, 0x64, 0x37, 0xb0,
+	0x57, 0x76, 0x73, 0x45, 0xe0, 0x91, 0xea, 0xaf, 0x3c, 0xc4, 0x9e, 0xe2, 0x82, 0x92, 0x79, 0x68,
+	0x80, 0x1f, 0xca, 0x22, 0xf9, 0x73, 0x6b, 0x58, 0x39, 0xc0, 0xd6, 0xde, 0x2a, 0xad, 0xfe, 0xcc,
+	0x4e, 0xf1, 0x9f, 0x73, 0xd8, 0xc9, 0xe0, 0xf2, 0x4e, 0x02, 0xea, 0xa0, 0x05, 0x9f, 0x8f, 0x7c,
+	0xd2, 0x14, 0x3d, 0xe9, 0xf7, 0x58, 0x09, 0x7f, 0xa9, 0x5a, 0x62, 0x08, 0xe2, 0x49, 0x80, 0xba,
+	0x43, 0xb9, 0x74, 0x57, 0xee, 0x7b, 0x6c, 0x63, 0x10, 0x4c, 0x26, 0xfd, 0x29, 0xd6, 0xf6, 0xdb,
+	0x4b, 0x22, 0xbc, 0x98, 0xdf, 0x23, 0x42, 0x5b, 0x8c, 0xd0, 0x1f, 0xb0, 0xcd, 0xd1, 0x70, 0xec,
+	0x7b, 0xf1, 0x68, 0xe2, 0x07, 0x27, 0x31, 0xf5, 0x3f, 0x4a, 0x00, 0x73, 0x11, 0x04, 0x24, 0xc7,
+	0xfd, 0x70, 0x28, 0x49, 0xb0, 0xc9, 0x56, 0x02, 0x98, 0x20, 0xb9, 0xcd, 0x0a, 0xb3, 0x70, 0x14,
+	0x84, 0xa3, 0xf8, 0x0d, 0x75, 0xda, 0xe4, 0xb3, 0xbe, 0xc3, 0x8a, 0xd8, 0xbe, 0x02, 0xd1, 0xb1,
+	0xcf, 0x56, 0x40, 0x40, 0x8b, 0x37, 0x1b, 0x83, 0x93, 0x18, 0xab, 0x6e, 0x6c, 0xb5, 0x6d, 0x04,
+	0x27, 0x31, 0x2f, 0xb7, 0x77, 0x58, 0x11, 0x50, 0x78, 0x5c, 0x62, 0xb3, 0x0d, 0x68, 0x77, 0x79,
+	0x44, 0x95, 0xfd, 0xce, 0x92, 0xda, 0xef, 0xfc, 0x05, 0xb6, 0xc6, 0x3b, 0x30, 0xbc, 0x9e, 0x2d,
+	0x3d, 0xbc, 0xb1, 0xbc, 0x3f, 0x63, 0x23, 0x91, 0xfe, 0x84, 0x6d, 0x2a, 0x1b, 0x1e, 0x95, 0xb7,
+	0xb8, 0x81, 0xdd, 0x39, 0xcf, 0xd7, 0xec, 0xd4, 0x88, 0xca, 0x8f, 0x32, 0x98, 0xfa, 0x1c, 0x9e,
+	0x0c, 0x3e, 0xf7, 0x63, 0xd8, 0xdc, 0xd7, 0xfe, 0xe8, 0xe8, 0x58, 0x9c, 0x60, 0xf4, 0x04, 0x49,
+	0xd6, 0x6b, 0xde, 0x18, 0xe2, 0xcb, 0xc4, 0x63, 0xac, 0xc8, 0x21, 0x7c, 0xa1, 0xf7, 0x58, 0x09,
+	0xd1, 0xb8, 0x54, 0xdc, 0x5d, 0x1c, 0x81, 0x8b, 0xfd, 0x44, 0x0d, 0x49, 0x17, 0x73, 0x82, 0x7f,
+	0x47, 0xcd, 0x23, 0x3c, 0x76, 0xc0, 0xf2, 0x7e, 0x39, 0xb1, 0x12, 0x4c, 0xcd, 0x16, 0xe3, 0x92,
+	0x24, 0x5e, 0x34, 0x93, 0x8f, 0x52, 0x6d, 0xfe, 0x9d, 0x15, 0x43, 0x95, 0xa4, 0x4e, 0x3d, 0xf2,
+	0x72, 0xa9, 0x23, 0x0f, 0x96, 0x83, 0x0a, 0x5b, 0xbd, 0x1c, 0xc4, 0xdb, 0x82, 0xae, 0xf2, 0xdb,
+	0x19, 0xb6, 0xcd, 0x3b, 0x82, 0x7d, 0x78, 0x86, 0x7c, 0x21, 0x6d, 0x56, 0x99, 0x39, 0xb3, 0xba,
+	0xc9, 0x36, 0x46, 0x53, 0x55, 0xdd, 0xeb, 0xa3, 0x29, 0xd7, 0xb5, 0xa2, 0xca, 0xdc, 0xc5, 0x54,
+	0x29, 0xfd, 0x3a, 0xaf, 0xfa, 0x35, 0xa9, 0x97, 0xe4, 0x19, 0x4d, 0xcf, 0x17, 0xe7, 0x97, 0x64,
+	0xc7, 0x34, 0xbb, 0xc2, 0x41, 0x25, 0xa3, 0xf9, 0xb6, 0xe9, 0x39, 0x7e, 0x9f, 0xc4, 0x92, 0x7c,
+	0x2a, 0x96, 0x48, 0x2f, 0x58, 0xbb, 0x88, 0x17, 0x88, 0xe5, 0xad, 0x2b, 0xcb, 0xfb, 0xfb, 0x39,
+	0x4c, 0x62, 0xf8, 0xa0, 0xd0, 0x9f, 0x04, 0xa7, 0xfe, 0xea, 0xd0, 0xa5, 0xfa, 0x7e, 0x76, 0xce,
+	0xf7, 0x7f, 0x59, 0x2e, 0x3c, 0xc7, 0x17, 0xfe, 0xfe, 0xf2, 0xc8, 0x44, 0x53, 0x9c, 0xb7, 0xf6,
+	0x7c, 0x7a, 0xed, 0x0f, 0xd8, 0xe6, 0xf0, 0x24, 0xec, 0x53, 0x22, 0x34, 0x10, 0x61, 0x4b, 0xc0,
+	0x1c, 0x7f, 0x00, 0x47, 0x8f, 0x24, 0x99, 0x02, 0x0d, 0xc6, 0x2d, 0x39, 0xae, 0x1b, 0xf9, 0x83,
+	0x85, 0xf0, 0xb7, 0xf1, 0xc5, 0xe1, 0xaf, 0xb0, 0x18, 0xfe, 0x1e, 0xb0, 0x4d, 0xda, 0xc0, 0x41,
+	0x70, 0x32, 0xc5, 0x48, 0x96, 0xb7, 0x4b, 0x08, 0xab, 0x03, 0x08, 0x62, 0xc0, 0xe1, 0x9b, 0xd8,
+	0x27, 0x02, 0xc6, 0x09, 0x8a, 0x00, 0x41, 0xb4, 0xdc, 0xb3, 0x37, 0x17, 0xd8, 0xb3, 0xca, 0x7f,
+	0xcb, 0xe2, 0x19, 0x87, 0xc7, 0xd9, 0x61, 0x7f, 0x3a, 0xbc, 0xe8, 0x7b, 0x33, 0x65, 0x44, 0xfa,
+	0xcd, 0x5c, 0x92, 0x60, 0xc3, 0x4f, 0xb0, 0x8a, 0xb0, 0x1f, 0xfb, 0x64, 0x72, 0xfc, 0x37, 0x5f,
+	0xc2, 0x49, 0x18, 0xc5, 0x5e, 0x34, 0xfa, 0x75, 0x9f, 0x36, 0xa4, 0xc8, 0x21, 0xce, 0xe8, 0xd7,
+	0x7d, 0xfd, 0x31, 0xcb, 0x0f, 0xc3, 0x60, 0xb6, 0xb2, 0x2a, 0x52, 0xa6, 0x06, 0x3a, 0xa8, 0xa8,
+	0xe0, 0x5f, 0xfd, 0x33, 0x56, 0x1a, 0x46, 0x83, 0x19, 0x18, 0x41, 0x3f, 0xfc, 0x9c, 0x32, 0x9e,
+	0x0f, 0xce, 0x1d, 0x9e, 0x90, 0xef, 0x5d, 0xb2, 0x19, 0x3c, 0xda, 0xfc, 0x49, 0xef, 0xce, 0x9d,
+	0xd3, 0x58, 0x2d, 0x7d, 0x78, 0x1e, 0xb3, 0x0b, 0x65, 0x4f, 0xd7, 0xb1, 0x12, 0x98, 0x5b, 0x42,
+	0xe5, 0x7b, 0x98, 0x54, 0x2d, 0x17, 0x0d, 0xf4, 0x35, 0x0b, 0xfd, 0x81, 0x37, 0xf6, 0x4f, 0x7d,
+	0x91, 0xc9, 0x17, 0x01, 0xd2, 0x06, 0x40, 0xc5, 0x60, 0x3b, 0xe7, 0x88, 0x72, 0x91, 0x94, 0xa3,
+	0xf2, 0x2f, 0x28, 0x0c, 0x21, 0x8f, 0x0b, 0x46, 0x79, 0x49, 0xbc, 0x18, 0xe5, 0xe5, 0xa9, 0x9a,
+	0x55, 0x4f, 0x55, 0x35, 0x6f, 0xca, 0xa5, 0xf2, 0x26, 0xfd, 0x3b, 0x6c, 0x0d, 0x24, 0x17, 0x81,
+	0xbc, 0x72, 0x9e, 0xa2, 0xe9, 0x45, 0x26, 0x0e, 0xa8, 0x3c, 0x45, 0xc9, 0xfd, 0x30, 0x0c, 0x42,
+	0x6f, 0x12, 0x1d, 0x2d, 0xad, 0x15, 0x74, 0x96, 0xe7, 0x8d, 0xc3, 0x2c, 0xbd, 0xd6, 0x0b, 0x86,
+	0xbe, 0x8c, 0x57, 0x39, 0x25, 0x5e, 0xfd, 0x56, 0x06, 0x37, 0x02, 0xb9, 0xa5, 0xda, 0x1c, 0xab,
+	0x58, 0xdf, 0x62, 0x05, 0xff, 0x0c, 0x4f, 0x2c, 0x62, 0xbf, 0xe1, 0x9f, 0xcd, 0x78, 0xd7, 0x72,
+	0x5e, 0xf3, 0xb9, 0x73, 0x92, 0x3d, 0xf5, 0x50, 0x38, 0x25, 0xa7, 0x3c, 0x19, 0xc7, 0xa3, 0x59,
+	0x9f, 0xbf, 0x01, 0xfb, 0xe1, 0x89, 0x1f, 0xc5, 0xfa, 0xa7, 0x29, 0xa7, 0xbc, 0xb7, 0xa8, 0x24,
+	0x39, 0x42, 0xf1, 0xc9, 0xe5, 0x7b, 0xa1, 0xb3, 0xfc, 0x61, 0x30, 0x7c, 0x23, 0x56, 0x0f, 0xbf,
+	0x2b, 0x31, 0x19, 0xa7, 0x32, 0xef, 0x6c, 0xfc, 0xe6, 0xe7, 0x3d, 0xeb, 0xef, 0x66, 0xf0, 0x9d,
+	0xef, 0xd0, 0x8f, 0x06, 0xdc, 0x44, 0x5e, 0x85, 0xfc, 0x37, 0x9f, 0xaf, 0x68, 0x6f, 0x4c, 0x5e,
+	0x85, 0x0d, 0x40, 0xe1, 0x2b, 0x3a, 0xf9, 0xea, 0xaf, 0x68, 0xaf, 0x1f, 0xbf, 0x16, 0x88, 0x88,
+	0x10, 0xf8, 0xe2, 0x77, 0x3d, 0x42, 0xc4, 0x5d, 0xc6, 0x22, 0x3f, 0x1c, 0xf5, 0xc7, 0xde, 0xf4,
+	0x64, 0xc2, 0x35, 0x5c, 0xb4, 0x8b, 0x08, 0xe9, 0x9e, 0x4c, 0x60, 0xdc, 0x10, 0xa7, 0xe5, 0xa1,
+	0xa6, 0x68, 0xaf, 0x0f, 0x67, 0x30, 0xae, 0xf2, 0x47, 0x19, 0x76, 0x43, 0x1e, 0x29, 0x51, 0xdc,
+	0x8f, 0x23, 0xb9, 0x03, 0xe7, 0xbc, 0xd3, 0x56, 0x33, 0xd0, 0xec, 0x39, 0x19, 0x68, 0x6e, 0x2e,
+	0x03, 0x5d, 0x75, 0xfa, 0xce, 0x65, 0xf2, 0x6b, 0x0b, 0x99, 0xbc, 0x0c, 0xf5, 0xeb, 0x17, 0x09,
+	0xf5, 0xff, 0x3a, 0x87, 0x99, 0x4f, 0xb2, 0x28, 0x7d, 0x9b, 0x65, 0x47, 0x43, 0xfe, 0xea, 0x25,
+	0x6f, 0x67, 0x47, 0xe7, 0xbe, 0xb0, 0x9f, 0x3f, 0x26, 0xb3, 0x17, 0x38, 0x26, 0x73, 0x4b, 0x8e,
+	0x49, 0xf5, 0x8c, 0xcf, 0xcf, 0x9d, 0xf1, 0x5f, 0x4e, 0x05, 0x21, 0x0d, 0x6f, 0x43, 0x35, 0xbc,
+	0x44, 0xc9, 0x85, 0x94, 0x92, 0xbf, 0xc4, 0x03, 0xf7, 0xff, 0x51, 0xa9, 0xf0, 0xc7, 0x19, 0x0c,
+	0xf7, 0xfd, 0xa3, 0xa3, 0xd0, 0x3f, 0xea, 0xc7, 0xfe, 0xff, 0x37, 0x16, 0xfa, 0x57, 0xd8, 0xad,
+	0xe5, 0x0b, 0x83, 0x20, 0x34, 0xbf, 0x51, 0x99, 0x2f, 0xda, 0xa8, 0xec, 0xfc, 0x46, 0xdd, 0x65,
+	0x8c, 0x4f, 0x8d, 0x68, 0x5c, 0x63, 0x11, 0x20, 0x1c, 0x5d, 0xf9, 0xb3, 0x1c, 0x86, 0x7e, 0x54,
+	0x1e, 0x5d, 0xab, 0xf0, 0x66, 0x61, 0x30, 0xf3, 0x43, 0x9e, 0x80, 0xaa, 0x41, 0x70, 0x31, 0x11,
+	0x58, 0x1c, 0xa6, 0x46, 0xc3, 0x83, 0xb9, 0x6d, 0xc7, 0x6e, 0xd5, 0xc7, 0x17, 0xe1, 0xa2, 0x8e,
+	0xe3, 0x2f, 0xb3, 0x94, 0x67, 0xdd, 0x66, 0xa5, 0xa9, 0x7f, 0x16, 0xab, 0x37, 0x37, 0x4a, 0x0f,
+	0x3f, 0xba, 0x08, 0x5b, 0x65, 0x18, 0xa4, 0x3e, 0xf0, 0x48, 0xf7, 0x3d, 0x76, 0xe7, 0xfb, 0x56,
+	0xdf, 0xb8, 0x08, 0xbf, 0x25, 0xed, 0xab, 0xef, 0xb1, 0x5c, 0x70, 0x36, 0x59, 0xf9, 0x7a, 0x7f,
+	0x09, 0x93, 0xe0, 0x6c, 0xb2, 0x77, 0xc9, 0x86, 0x51, 0xa0, 0xb1, 0x25, 0xfd, 0xab, 0x0b, 0x69,
+	0xec, 0xdc, 0x44, 0x4c, 0xbc, 0xd6, 0xa8, 0x1c, 0xb1, 0xaf, 0x5c, 0x40, 0xe3, 0x0b, 0x0e, 0x9b,
+	0xf9, 0xa9, 0x1d, 0xf6, 0x33, 0x56, 0xf9, 0xe2, 0x3d, 0xd0, 0xdf, 0x67, 0xdb, 0xc9, 0xa3, 0x37,
+	0x1a, 0xe2, 0x4c, 0x5b, 0xf6, 0xa6, 0xdc, 0x99, 0xd6, 0x30, 0xaa, 0x38, 0xd8, 0x43, 0x5b, 0xad,
+	0xff, 0x9f, 0xa5, 0xcf, 0xf5, 0xad, 0x55, 0x86, 0x0f, 0xfb, 0x01, 0xa7, 0x64, 0x70, 0x36, 0xe1,
+	0x12, 0xe5, 0xf0, 0x66, 0x4c, 0x70, 0x36, 0x01, 0x59, 0xfe, 0x6e, 0x66, 0xa5, 0x06, 0xcf, 0xcd,
+	0x3f, 0x97, 0xbc, 0xfa, 0x49, 0x25, 0x51, 0xb9, 0x74, 0x12, 0xf5, 0x0d, 0x96, 0xba, 0xee, 0xe1,
+	0x51, 0xb6, 0x04, 0x92, 0x68, 0x2a, 0xa2, 0x01, 0x99, 0xd3, 0xef, 0x65, 0x99, 0xbe, 0x20, 0x53,
+	0x74, 0x5e, 0x4c, 0x14, 0x57, 0xc6, 0xb2, 0xca, 0x95, 0xb1, 0xaf, 0xb2, 0x6d, 0xa5, 0xd7, 0x08,
+	0xf1, 0x2b, 0xc7, 0x83, 0xc9, 0x56, 0xd2, 0x6c, 0x84, 0x58, 0xae, 0x92, 0xf1, 0x4e, 0x26, 0x85,
+	0x47, 0x49, 0xf6, 0x1c, 0x80, 0xca, 0x0d, 0xa2, 0xb5, 0xd4, 0x0d, 0xa2, 0x7b, 0xac, 0x34, 0xe9,
+	0x9f, 0x79, 0xfe, 0x34, 0x0e, 0x47, 0x7e, 0x44, 0x47, 0x19, 0x9b, 0xf4, 0xcf, 0x4c, 0x84, 0xe8,
+	0xbb, 0x90, 0xf6, 0xf3, 0xf0, 0x03, 0xf8, 0x0d, 0xbe, 0x9b, 0x17, 0x71, 0x23, 0x88, 0x57, 0xb6,
+	0x32, 0xb4, 0xf2, 0xa3, 0x0c, 0x76, 0xd4, 0x91, 0x14, 0xcf, 0xfe, 0xf3, 0xcf, 0x7a, 0x30, 0x8d,
+	0x53, 0x35, 0x92, 0x6e, 0xd9, 0x25, 0x84, 0x61, 0x2c, 0x7d, 0xc0, 0x36, 0xc7, 0x41, 0xf0, 0xf9,
+	0xc9, 0x4c, 0x89, 0xa6, 0x79, 0xbb, 0x84, 0x30, 0x24, 0xf9, 0x0a, 0xdb, 0xe2, 0xba, 0xf3, 0x87,
+	0x44, 0x93, 0xa7, 0x86, 0x2d, 0x02, 0x31, 0xe8, 0x7e, 0x82, 0x89, 0x96, 0xbc, 0x14, 0x96, 0x1c,
+	0x63, 0xab, 0x6e, 0x6a, 0x55, 0xfe, 0x84, 0xf2, 0x98, 0x64, 0xcc, 0xea, 0x5b, 0x5d, 0x77, 0x19,
+	0x0b, 0xcf, 0xa8, 0x25, 0x12, 0x89, 0x13, 0x21, 0x3c, 0xb3, 0x10, 0x00, 0xe8, 0x38, 0x41, 0xe3,
+	0x1a, 0x8a, 0xb1, 0x44, 0xdf, 0x62, 0x85, 0xf0, 0xcc, 0x83, 0x03, 0x24, 0x22, 0xe1, 0x37, 0xc2,
+	0xb3, 0x1a, 0x3c, 0x72, 0xed, 0x09, 0x14, 0x1e, 0x7b, 0x1b, 0x31, 0xa1, 0x70, 0x4e, 0xa8, 0xea,
+	0x66, 0xfe, 0x90, 0xef, 0x2a, 0x9f, 0xb3, 0x81, 0x00, 0x9a, 0x53, 0xa0, 0x37, 0xc4, 0x9c, 0x02,
+	0xbd, 0xc3, 0x8a, 0xe1, 0x19, 0x96, 0x1f, 0x11, 0xa5, 0x2a, 0x85, 0xf0, 0xcc, 0xe4, 0xcf, 0x80,
+	0x8c, 0x25, 0x12, 0x33, 0x95, 0x42, 0x2c, 0x90, 0xf7, 0xd9, 0x66, 0x78, 0xe6, 0xbd, 0x0a, 0xfb,
+	0x13, 0x1f, 0x48, 0x28, 0x51, 0x61, 0xe1, 0x59, 0x13, 0x40, 0x26, 0xbf, 0xc7, 0x58, 0x0a, 0xcf,
+	0xbc, 0xe0, 0xd4, 0x0f, 0x39, 0x41, 0x49, 0x88, 0xd6, 0x3b, 0xf5, 0x43, 0xc0, 0xdf, 0xe1, 0x92,
+	0x0f, 0xc2, 0x01, 0x47, 0x6f, 0x8a, 0xc9, 0xeb, 0xe1, 0x00, 0x47, 0xb3, 0x41, 0x30, 0x1e, 0x8f,
+	0x22, 0xca, 0x5b, 0xe8, 0xac, 0x17, 0x90, 0x85, 0x0c, 0x71, 0xfb, 0x02, 0x19, 0xe2, 0xe5, 0xc5,
+	0x0c, 0xb1, 0xf2, 0x08, 0x7b, 0xf8, 0xd8, 0xf3, 0x5b, 0x48, 0x6d, 0x56, 0xbd, 0xfd, 0x3a, 0x40,
+	0xbf, 0xc7, 0x36, 0x1f, 0x1a, 0x9c, 0x1f, 0xfe, 0xdf, 0x27, 0x0d, 0x95, 0x1f, 0x65, 0xd1, 0x75,
+	0x14, 0x71, 0xce, 0x11, 0x83, 0x6f, 0x9f, 0xff, 0x2a, 0xe5, 0x37, 0x85, 0xd0, 0x7f, 0x25, 0x9d,
+	0x26, 0x25, 0x4d, 0xee, 0x8b, 0xa4, 0xc9, 0xcf, 0xa7, 0x30, 0x5f, 0x56, 0xb3, 0xaa, 0xc6, 0x36,
+	0x49, 0x53, 0x7c, 0x45, 0x14, 0x5b, 0xee, 0xad, 0xe8, 0x9e, 0x0a, 0x75, 0xda, 0x25, 0x7c, 0x76,
+	0x60, 0x0c, 0x94, 0x6d, 0xdb, 0x89, 0x66, 0x78, 0xf1, 0xf6, 0x45, 0x97, 0x1a, 0xcf, 0xed, 0xed,
+	0x66, 0x57, 0xf6, 0x76, 0x73, 0x17, 0xec, 0xed, 0xfe, 0x61, 0x46, 0xdd, 0x2b, 0x88, 0xab, 0x6f,
+	0xf4, 0x5f, 0xa5, 0xcb, 0xa2, 0xf8, 0x42, 0x73, 0x95, 0x48, 0x40, 0x52, 0xfb, 0x85, 0xdf, 0xfc,
+	0xef, 0xff, 0xfe, 0xee, 0x3a, 0xd2, 0xc3, 0xcf, 0x3b, 0xfa, 0x6d, 0x85, 0xfa, 0x17, 0xd3, 0xd4,
+	0x78, 0xc1, 0x54, 0x7f, 0x88, 0x97, 0x88, 0x45, 0x42, 0x77, 0x67, 0x05, 0x7f, 0x4e, 0x83, 0x57,
+	0x8c, 0xa3, 0xca, 0xdf, 0xc8, 0xa0, 0xad, 0x22, 0x4a, 0x9e, 0x51, 0xd7, 0xd8, 0x1a, 0xbf, 0x7b,
+	0x28, 0xde, 0xd4, 0xf2, 0x87, 0x85, 0x9b, 0xb5, 0xd9, 0xc5, 0x9b, 0xb5, 0x60, 0x34, 0x70, 0x90,
+	0x70, 0x7e, 0xe2, 0x90, 0x2e, 0x4e, 0xfa, 0x67, 0x3c, 0x79, 0x8f, 0xf4, 0x72, 0xba, 0xe9, 0xbf,
+	0x95, 0x1c, 0xfc, 0xdf, 0x51, 0x1b, 0x47, 0x8b, 0xdd, 0x86, 0x73, 0x5e, 0x73, 0xfd, 0x1a, 0xbe,
+	0x40, 0x56, 0x9a, 0x32, 0xe8, 0x1a, 0x55, 0x76, 0x85, 0x4c, 0x9c, 0x03, 0x55, 0xaf, 0xbb, 0x8c,
+	0x88, 0x5a, 0x7f, 0x8a, 0xb1, 0x5f, 0xff, 0x1a, 0xbb, 0xcc, 0x6d, 0x5d, 0xa1, 0x44, 0xf7, 0xdb,
+	0x02, 0xb0, 0xa4, 0xab, 0xfc, 0x01, 0xb9, 0x20, 0x4e, 0x26, 0x5d, 0x70, 0x85, 0x68, 0x73, 0x69,
+	0x7e, 0x76, 0x2e, 0xcd, 0x87, 0x59, 0x93, 0x16, 0xb9, 0xea, 0x87, 0x5b, 0x08, 0x6e, 0x4d, 0x91,
+	0xae, 0xc2, 0xb8, 0x18, 0x09, 0x15, 0x3a, 0x63, 0x09, 0x80, 0x82, 0xe6, 0xcb, 0x72, 0xc7, 0x27,
+	0x8c, 0x25, 0x3a, 0x24, 0x67, 0x7c, 0x70, 0x5e, 0x07, 0x0c, 0xed, 0xa9, 0x08, 0xbf, 0xd1, 0x19,
+	0x7f, 0x03, 0xdb, 0xec, 0x48, 0x72, 0xee, 0x4d, 0x7e, 0x55, 0x73, 0xd9, 0x15, 0x3d, 0xb8, 0xdc,
+	0x4f, 0xdb, 0x83, 0xfb, 0xa7, 0x64, 0xd2, 0x48, 0x20, 0x4d, 0x9a, 0xee, 0xb1, 0xe3, 0x3b, 0xec,
+	0x8c, 0xbc, 0xc7, 0xde, 0xe1, 0x2f, 0x51, 0xef, 0xd2, 0xa2, 0xd1, 0xe8, 0x69, 0x9f, 0x00, 0xe2,
+	0x2e, 0x35, 0xfc, 0xdc, 0x12, 0xc3, 0x27, 0xfe, 0xa2, 0x71, 0x28, 0xf8, 0x83, 0xe9, 0x48, 0xe4,
+	0x20, 0x18, 0x07, 0x21, 0xed, 0x0c, 0x20, 0xeb, 0xf0, 0x5c, 0x39, 0x65, 0x0f, 0x78, 0x9b, 0x2f,
+	0xd5, 0xe0, 0x93, 0x0e, 0x70, 0xbc, 0xfc, 0xce, 0x52, 0xe6, 0x0b, 0x12, 0xd7, 0xb9, 0xee, 0xdf,
+	0xb2, 0xfe, 0xe2, 0x18, 0x0f, 0xb7, 0xd4, 0xbc, 0x3f, 0xbf, 0xd9, 0x4c, 0xec, 0x23, 0xfe, 0xf0,
+	0xc4, 0x3f, 0xa1, 0xc4, 0x9c, 0xe6, 0xe2, 0x5d, 0x18, 0x4c, 0x14, 0xc5, 0xbe, 0xc8, 0x42, 0x77,
+	0xa1, 0x85, 0x5f, 0x09, 0x51, 0x68, 0x85, 0xcd, 0x64, 0x34, 0xf5, 0x78, 0x27, 0xbf, 0xce, 0x4a,
+	0x0a, 0x5f, 0x8a, 0xb2, 0x8b, 0x86, 0xb3, 0x20, 0x01, 0xa6, 0xa7, 0x74, 0x37, 0x4c, 0xbc, 0x22,
+	0xc8, 0x26, 0xaf, 0x08, 0x96, 0xcd, 0xd9, 0x3f, 0xfb, 0x39, 0xcf, 0xf9, 0xf7, 0xa8, 0xb3, 0xa2,
+	0x8c, 0x4c, 0x69, 0xff, 0x4b, 0x99, 0xf8, 0x22, 0xd5, 0xd0, 0xb2, 0xbd, 0xfc, 0xeb, 0x19, 0x74,
+	0x71, 0x0a, 0x5e, 0x7c, 0x12, 0xb0, 0x07, 0x9c, 0x2d, 0x09, 0x83, 0xfc, 0x19, 0xeb, 0x1a, 0xa5,
+	0xcf, 0x83, 0x57, 0xa0, 0x6a, 0xa9, 0x82, 0x62, 0x55, 0xa7, 0x7d, 0x85, 0xfc, 0x54, 0x4b, 0x3c,
+	0xc4, 0x0b, 0x0e, 0x48, 0x74, 0xc4, 0x93, 0x03, 0x88, 0x36, 0xf2, 0xd0, 0x58, 0x72, 0xf5, 0xaa,
+	0x72, 0x84, 0x05, 0xe6, 0x92, 0x31, 0xb3, 0xf1, 0x9b, 0xa5, 0x97, 0xb5, 0xbe, 0xc5, 0xd6, 0x39,
+	0xb5, 0xf8, 0xd2, 0xe1, 0xee, 0xaa, 0xf7, 0x9c, 0x9c, 0xca, 0x26, 0xe2, 0x8a, 0xb9, 0x70, 0xaf,
+	0x09, 0xf5, 0xb4, 0xa2, 0x6f, 0x2f, 0x75, 0x97, 0x4b, 0xe9, 0xae, 0xd2, 0x51, 0x8d, 0xef, 0x62,
+	0x65, 0x49, 0x8a, 0x5d, 0x36, 0xcd, 0xee, 0x4f, 0x29, 0x2f, 0x51, 0xf8, 0xfd, 0x2c, 0x7c, 0x52,
+	0x45, 0x47, 0x6e, 0xa1, 0xe8, 0x50, 0x2a, 0x99, 0xfc, 0x7c, 0x25, 0x93, 0x2a, 0x1c, 0xd6, 0xe6,
+	0x0a, 0x87, 0xf9, 0x53, 0x6c, 0xfd, 0x02, 0xa7, 0xd8, 0xc6, 0x92, 0xc4, 0x7d, 0x82, 0x06, 0x1a,
+	0x06, 0x63, 0x5f, 0xaa, 0xeb, 0x11, 0xcb, 0xc3, 0xf3, 0xca, 0xb7, 0x88, 0x83, 0x60, 0x1a, 0x87,
+	0xc1, 0x78, 0xec, 0x87, 0x7c, 0x9c, 0xcd, 0xa9, 0x61, 0xba, 0x23, 0x7f, 0xea, 0xd3, 0x84, 0xa4,
+	0x88, 0xbc, 0xbd, 0x99, 0x00, 0x5b, 0xc3, 0xca, 0xef, 0x90, 0x43, 0xf4, 0xa3, 0x37, 0xd3, 0x81,
+	0x38, 0xf3, 0xde, 0x67, 0xdb, 0xc9, 0xe9, 0xce, 0x9b, 0x92, 0xd4, 0x45, 0x11, 0x87, 0x3b, 0x6f,
+	0x4b, 0x7e, 0xc8, 0x34, 0xe5, 0x33, 0x24, 0x71, 0x51, 0x06, 0xe8, 0xb6, 0x01, 0xee, 0x70, 0x30,
+	0xa7, 0xac, 0xb2, 0x2b, 0xa9, 0xf7, 0xca, 0x9c, 0x14, 0x33, 0xac, 0xcb, 0x80, 0xb0, 0x11, 0xce,
+	0x2f, 0x1f, 0xbd, 0x64, 0xdb, 0xfc, 0x64, 0xeb, 0x04, 0xc3, 0xfd, 0xd9, 0x10, 0x22, 0x15, 0xf6,
+	0xd7, 0xf1, 0x35, 0x46, 0x76, 0xc4, 0x3f, 0xbb, 0x91, 0xef, 0xcc, 0x28, 0x63, 0xbc, 0xbd, 0xfa,
+	0xad, 0x9a, 0x8d, 0x07, 0x75, 0x27, 0x18, 0x56, 0x2c, 0x76, 0x99, 0xb3, 0xe6, 0x87, 0xbd, 0xcd,
+	0xbd, 0xe6, 0xfb, 0xac, 0xa4, 0x24, 0x44, 0x2b, 0xdb, 0x52, 0x0a, 0x8d, 0xcd, 0x26, 0x92, 0x47,
+	0xe5, 0x39, 0xbb, 0xdc, 0x1c, 0x07, 0xaf, 0x79, 0x63, 0x69, 0x85, 0xb4, 0x8f, 0x58, 0x41, 0xdc,
+	0xf6, 0x21, 0x61, 0x6f, 0xad, 0xbc, 0x0e, 0x64, 0x6f, 0xc0, 0x2f, 0x10, 0xd5, 0x63, 0xd7, 0x80,
+	0x31, 0xcf, 0x3d, 0xcf, 0xe3, 0xfe, 0x6d, 0x56, 0x94, 0xb7, 0x44, 0x56, 0xea, 0x42, 0x52, 0xd8,
+	0x58, 0x27, 0xc0, 0x04, 0xdf, 0x65, 0x6b, 0x30, 0x41, 0xa4, 0x7f, 0xc2, 0xd6, 0x46, 0xb1, 0x3f,
+	0x11, 0x6b, 0xdf, 0x59, 0x2e, 0x1c, 0xa5, 0xde, 0x9c, 0xb2, 0xf2, 0x7d, 0xb6, 0xce, 0xf5, 0x18,
+	0xe9, 0x9f, 0xa6, 0x07, 0xdf, 0x5d, 0xa1, 0x38, 0x34, 0x2b, 0x31, 0xfc, 0x09, 0x63, 0x72, 0x6d,
+	0x11, 0xe4, 0xfe, 0x2a, 0x8b, 0x55, 0xb9, 0x3f, 0xaf, 0x43, 0x04, 0x87, 0x11, 0x2b, 0x01, 0x87,
+	0xfa, 0x71, 0x7f, 0x7a, 0xe4, 0x47, 0xfa, 0xd7, 0xd9, 0x7a, 0x1c, 0x78, 0xfd, 0xa1, 0xb8, 0x70,
+	0xa9, 0xa7, 0x78, 0xf0, 0x65, 0xda, 0x6b, 0x71, 0x60, 0x0c, 0x87, 0xfa, 0x47, 0xac, 0x18, 0x07,
+	0x64, 0x87, 0xa4, 0xaf, 0x65, 0xd4, 0x85, 0x38, 0x40, 0x9b, 0x84, 0x9c, 0x4c, 0x93, 0xd2, 0x8a,
+	0x09, 0xbf, 0x39, 0x37, 0xe1, 0xcd, 0x05, 0x16, 0xb8, 0x38, 0x31, 0xeb, 0xa3, 0xc5, 0x59, 0x57,
+	0x0e, 0x91, 0x53, 0xd3, 0xa8, 0x13, 0xbe, 0xf1, 0xd4, 0x93, 0x3e, 0x6f, 0x14, 0x5a, 0x48, 0xc5,
+	0x61, 0x05, 0x8b, 0xbc, 0x74, 0x99, 0xb5, 0x48, 0xbf, 0x5e, 0x69, 0x2d, 0x92, 0xc2, 0x2e, 0x08,
+	0x77, 0xaf, 0x3c, 0x67, 0x45, 0x64, 0xda, 0x3b, 0x89, 0x17, 0xb8, 0x7e, 0x97, 0xb1, 0xe4, 0x1e,
+	0x10, 0xb1, 0xdd, 0x59, 0xc5, 0x36, 0x38, 0x89, 0x6d, 0x12, 0xa2, 0x77, 0x02, 0x67, 0x5a, 0x09,
+	0x95, 0x6a, 0x9e, 0xfa, 0xd3, 0x45, 0xd6, 0x7f, 0x81, 0x95, 0x94, 0x10, 0xb3, 0xb2, 0x3c, 0x54,
+	0x68, 0xf6, 0x2e, 0xd9, 0x2c, 0x89, 0x3e, 0xb5, 0x0d, 0xb6, 0xe6, 0x03, 0xe7, 0xea, 0x7f, 0xca,
+	0xb0, 0x92, 0x24, 0x9d, 0x06, 0xba, 0xc6, 0x36, 0x7b, 0x4d, 0xcb, 0xf2, 0x5a, 0xdd, 0x03, 0xa3,
+	0xdd, 0x6a, 0x68, 0x97, 0x74, 0x8d, 0x15, 0x38, 0xa4, 0x63, 0xbc, 0xd0, 0xde, 0xfe, 0xe4, 0xdd,
+	0xbb, 0x0d, 0xfd, 0x9a, 0xa4, 0xf1, 0xac, 0x9e, 0xed, 0x6a, 0xff, 0xe3, 0x1d, 0x40, 0x75, 0xc6,
+	0x38, 0xd4, 0x35, 0x6a, 0x6d, 0x53, 0xfb, 0x9f, 0x1c, 0x76, 0x95, 0x95, 0x38, 0xac, 0xdb, 0xb3,
+	0x3b, 0x46, 0x5b, 0xfb, 0xf3, 0x14, 0x61, 0xb3, 0xdd, 0xeb, 0x35, 0xb4, 0xff, 0xc5, 0x61, 0x62,
+	0x12, 0xa3, 0xdd, 0xd6, 0x7e, 0xcc, 0x21, 0x37, 0xd9, 0x65, 0x0e, 0xa9, 0xf7, 0xba, 0xae, 0xdd,
+	0x6b, 0xb7, 0x4d, 0x5b, 0xfb, 0xdf, 0xa9, 0xe1, 0xed, 0x5e, 0xdd, 0x68, 0x6b, 0x3f, 0x49, 0x0f,
+	0xef, 0xbe, 0xd4, 0xde, 0x01, 0xa4, 0xfa, 0x6f, 0xd6, 0xf0, 0xb5, 0x2f, 0x3f, 0x8c, 0xb7, 0xf9,
+	0x10, 0xd7, 0xdb, 0x33, 0xdb, 0xed, 0x9e, 0x76, 0x49, 0x3e, 0x9b, 0xb6, 0xdd, 0xb3, 0xb5, 0x8c,
+	0x7e, 0x9d, 0x5d, 0xc1, 0xe7, 0xfa, 0x5e, 0xcf, 0xb3, 0xcd, 0x67, 0xfb, 0xa6, 0xe3, 0x6a, 0x59,
+	0xfd, 0x2a, 0x17, 0x41, 0x82, 0xad, 0xf6, 0x4b, 0x2d, 0x97, 0xd0, 0xbe, 0xb0, 0x4c, 0xbb, 0xd5,
+	0x31, 0xbb, 0xae, 0x69, 0x6b, 0x79, 0xfd, 0x16, 0xbb, 0xce, 0xc1, 0x4d, 0xd3, 0x70, 0xf7, 0x6d,
+	0xd3, 0x91, 0x6c, 0xd6, 0xf4, 0x9b, 0xec, 0xea, 0x3c, 0x0a, 0x58, 0xad, 0xeb, 0x3b, 0xec, 0x26,
+	0x47, 0xec, 0x9a, 0x2e, 0x2c, 0xb3, 0xd9, 0xda, 0x95, 0xa3, 0x36, 0x24, 0xc3, 0x14, 0x12, 0xc6,
+	0x15, 0xa4, 0x5c, 0x8e, 0x44, 0x69, 0x45, 0x5d, 0x67, 0xdb, 0x1c, 0x68, 0x19, 0xf5, 0xa7, 0xa6,
+	0xeb, 0xb5, 0xba, 0x1a, 0x93, 0xb2, 0x36, 0xdb, 0xbd, 0xe7, 0x9e, 0x6d, 0x76, 0x7a, 0x07, 0x66,
+	0x43, 0x2b, 0xe9, 0xd7, 0x98, 0x86, 0xa4, 0x3d, 0xdb, 0xf5, 0x1c, 0xd7, 0x70, 0xf7, 0x1d, 0x6d,
+	0x53, 0x72, 0x25, 0x06, 0xbd, 0x7d, 0x57, 0xdb, 0xd2, 0xaf, 0xb0, 0xad, 0x84, 0x43, 0xa7, 0xd7,
+	0xd0, 0xb6, 0xe5, 0x44, 0xbb, 0x76, 0x6f, 0xdf, 0xe2, 0xb0, 0xcb, 0x92, 0x8c, 0x73, 0x04, 0x90,
+	0x26, 0xc9, 0xb8, 0x39, 0x70, 0xd8, 0x15, 0xfd, 0x36, 0xbb, 0xc1, 0x61, 0x9d, 0xfd, 0xb6, 0xdb,
+	0xb2, 0x0c, 0xdb, 0x95, 0xeb, 0xd5, 0xf5, 0x32, 0xbb, 0xb6, 0x80, 0x83, 0xe5, 0x5e, 0x95, 0x98,
+	0x9a, 0x61, 0xdb, 0x2d, 0xd3, 0x96, 0x63, 0xae, 0xe9, 0x37, 0x98, 0x3e, 0x87, 0x81, 0x11, 0xd7,
+	0xf5, 0x07, 0xec, 0x2e, 0x87, 0x3f, 0xdb, 0x37, 0xf7, 0xcd, 0x65, 0xea, 0xbd, 0xa1, 0xdf, 0x63,
+	0x3b, 0xab, 0x48, 0x80, 0xc7, 0x4d, 0xa9, 0x3b, 0xbb, 0xd7, 0x36, 0xe5, 0xb8, 0xb2, 0xd4, 0x12,
+	0x81, 0x81, 0xf6, 0x96, 0x5c, 0x17, 0xb0, 0x31, 0x9c, 0x97, 0xdd, 0xba, 0x1c, 0x70, 0x5b, 0x4a,
+	0xaf, 0xe2, 0x60, 0xd4, 0x8e, 0xd4, 0x90, 0x23, 0x30, 0xda, 0x1d, 0x09, 0xeb, 0x98, 0xae, 0x69,
+	0x73, 0xad, 0xdd, 0xad, 0xd6, 0xf1, 0xde, 0xc4, 0xdc, 0x9f, 0x12, 0x20, 0xd2, 0x3d, 0xbe, 0xd7,
+	0xc2, 0x57, 0x71, 0x32, 0x80, 0x1d, 0x98, 0xb6, 0xd3, 0xea, 0x75, 0x6b, 0x2d, 0xb7, 0x63, 0x58,
+	0x5a, 0xa6, 0xea, 0x63, 0x3a, 0x43, 0xa9, 0x31, 0x16, 0xeb, 0x68, 0x07, 0x75, 0xaf, 0x69, 0x1b,
+	0xbb, 0xc2, 0x45, 0x2f, 0x11, 0x5f, 0x82, 0x36, 0xec, 0x9e, 0xa5, 0x65, 0x68, 0xd5, 0x04, 0xb3,
+	0x4d, 0xc3, 0xe9, 0x68, 0xd9, 0x34, 0x61, 0xc7, 0x70, 0x9e, 0x6a, 0xb9, 0xea, 0x13, 0x9c, 0x06,
+	0x7b, 0xff, 0x94, 0x35, 0x91, 0x71, 0xd4, 0x15, 0x39, 0xc9, 0xb8, 0xeb, 0x5e, 0xc3, 0xb4, 0x6c,
+	0xb3, 0x6e, 0xb8, 0x66, 0x43, 0x70, 0xf8, 0x15, 0xfc, 0x8e, 0x19, 0xef, 0x7b, 0xd3, 0x50, 0x75,
+	0x89, 0xdb, 0xac, 0x88, 0x20, 0x88, 0x47, 0x3f, 0xc9, 0x24, 0xcf, 0x10, 0x3a, 0xde, 0x65, 0xaa,
+	0xff, 0x92, 0x12, 0xb7, 0x54, 0x29, 0x8f, 0x51, 0x4d, 0x95, 0x40, 0xae, 0x08, 0x0c, 0x1b, 0x7c,
+	0xc0, 0xd1, 0x32, 0x52, 0x21, 0x68, 0xb3, 0x08, 0xcd, 0x4a, 0x52, 0xe9, 0x2e, 0x8e, 0x96, 0x97,
+	0xa4, 0xe8, 0x05, 0x08, 0x2d, 0x90, 0xbc, 0x75, 0xaf, 0x65, 0x91, 0x96, 0xee, 0x4b, 0x42, 0x34,
+	0x34, 0x24, 0x7c, 0xa2, 0xdf, 0xe0, 0xd6, 0x45, 0x3c, 0x6b, 0xed, 0x5e, 0xfd, 0xa9, 0xd9, 0xd0,
+	0xde, 0x66, 0xab, 0xa7, 0xca, 0x67, 0xec, 0x29, 0xf5, 0x2d, 0x11, 0x5e, 0x0c, 0x6f, 0xf4, 0x9e,
+	0x77, 0xb5, 0x4c, 0x42, 0xd7, 0x85, 0x60, 0x55, 0x3f, 0xd0, 0xf2, 0x22, 0x98, 0x73, 0x50, 0xf3,
+	0x79, 0x43, 0xbb, 0x4f, 0x1e, 0x83, 0x90, 0x24, 0x52, 0x3c, 0xa9, 0xfe, 0xc5, 0xb9, 0xb7, 0x1e,
+	0x42, 0xf5, 0x96, 0xb3, 0x38, 0xad, 0xe3, 0xb5, 0x5b, 0xdd, 0xa7, 0x73, 0xd3, 0x3a, 0x72, 0x15,
+	0x59, 0x0a, 0xaf, 0x9c, 0xee, 0xc0, 0xd4, 0xf2, 0xd5, 0x3f, 0xc9, 0xe2, 0xc7, 0x23, 0x9c, 0xbb,
+	0x6c, 0xdf, 0xd0, 0xc0, 0xa6, 0x32, 0x81, 0x04, 0x7d, 0xf2, 0x71, 0xa7, 0xe6, 0xed, 0x35, 0x12,
+	0xf6, 0x04, 0x6a, 0x36, 0xa4, 0xdd, 0x71, 0x10, 0x91, 0xe5, 0xe7, 0x61, 0xcd, 0x86, 0x56, 0x10,
+	0xab, 0x6f, 0x7a, 0x9f, 0xec, 0x72, 0x2a, 0x2d, 0x0d, 0x69, 0x82, 0x3e, 0x14, 0xf6, 0x08, 0x7a,
+	0xa2, 0xeb, 0x02, 0xf4, 0x88, 0x40, 0x6f, 0xc1, 0xfe, 0x13, 0xf6, 0x04, 0xcc, 0xea, 0x57, 0x24,
+	0x37, 0x17, 0x41, 0xa0, 0xf0, 0x12, 0x82, 0x7a, 0xee, 0x9e, 0x69, 0x6b, 0x6f, 0x0b, 0x09, 0x51,
+	0xbd, 0x67, 0x59, 0x00, 0xd2, 0x12, 0xa2, 0x66, 0xab, 0x06, 0x90, 0xfb, 0xc9, 0x94, 0xc6, 0xbe,
+	0xdb, 0xeb, 0x9a, 0xbb, 0xda, 0xdb, 0x27, 0xfa, 0x15, 0x41, 0x65, 0x19, 0xfb, 0x8e, 0xa9, 0xbd,
+	0x7d, 0x9b, 0xd1, 0x6f, 0x70, 0x53, 0x12, 0x20, 0x88, 0x19, 0x1d, 0xed, 0xed, 0xdb, 0x6c, 0xb5,
+	0xa1, 0x18, 0x0d, 0x5d, 0x49, 0xdd, 0xe2, 0x5e, 0x61, 0xd9, 0x9e, 0xd1, 0xc0, 0x33, 0x7c, 0x13,
+	0x1f, 0x1b, 0x66, 0xdb, 0x74, 0x4d, 0x2d, 0x93, 0x40, 0x3a, 0xbd, 0x46, 0xab, 0xf9, 0x52, 0xcb,
+	0x56, 0x3f, 0x45, 0x13, 0x48, 0xfe, 0x34, 0x00, 0x29, 0xb5, 0xc3, 0x8d, 0xbe, 0xdb, 0x30, 0x6c,
+	0xe0, 0x84, 0x8c, 0x3b, 0xae, 0xd7, 0x7b, 0xd1, 0xd1, 0x32, 0xd5, 0xcf, 0x93, 0x6f, 0xff, 0xf9,
+	0xc7, 0xfc, 0xc4, 0xf7, 0x45, 0xa7, 0xee, 0x75, 0x5f, 0x74, 0xbc, 0x8f, 0xe5, 0xdc, 0x02, 0xf2,
+	0x89, 0x96, 0xd1, 0x77, 0xb8, 0xf7, 0x03, 0xa4, 0x67, 0x99, 0x5d, 0xee, 0x81, 0x35, 0xc3, 0x69,
+	0xd5, 0x61, 0x31, 0xfa, 0x2d, 0x7e, 0x5a, 0x02, 0x32, 0x75, 0xc2, 0xbe, 0x7b, 0x97, 0xab, 0xfe,
+	0x9d, 0x02, 0xbb, 0xba, 0xe4, 0x73, 0x7a, 0x32, 0xea, 0x17, 0x20, 0x54, 0xb3, 0x26, 0xb3, 0x92,
+	0x4b, 0x14, 0x96, 0x55, 0xf8, 0xde, 0x4b, 0xc4, 0x65, 0xe8, 0x50, 0x16, 0xb8, 0x8e, 0xe9, 0x1a,
+	0x0d, 0xc3, 0x35, 0xb4, 0xec, 0x1c, 0x33, 0xd3, 0xdd, 0xf3, 0x1a, 0x8e, 0xab, 0xe5, 0x96, 0xc0,
+	0x1d, 0xbb, 0xae, 0xe5, 0xe7, 0x18, 0x01, 0xdc, 0x7d, 0x69, 0x99, 0xf2, 0xd8, 0x17, 0x88, 0x83,
+	0xb6, 0xd1, 0xf5, 0x0e, 0x5a, 0x0d, 0x6d, 0x7d, 0x19, 0xc2, 0xaa, 0x5b, 0xda, 0xc6, 0xfc, 0x3a,
+	0x2c, 0xaf, 0xe1, 0xd4, 0x2d, 0xad, 0x40, 0x47, 0x91, 0x02, 0x37, 0xeb, 0x5d, 0xad, 0x38, 0xc7,
+	0xa7, 0x65, 0x79, 0x96, 0xdd, 0x73, 0x7b, 0x1a, 0x5b, 0x40, 0x1c, 0x3c, 0xe2, 0xb2, 0x96, 0x96,
+	0x21, 0x60, 0x71, 0x9b, 0x73, 0x33, 0xbb, 0x75, 0x8b, 0x0f, 0xd8, 0x5a, 0x02, 0x07, 0xfa, 0xed,
+	0x39, 0xf8, 0x7e, 0x03, 0xe9, 0x2f, 0x2f, 0x81, 0x03, 0xbd, 0x36, 0x37, 0xb1, 0x53, 0x77, 0x71,
+	0xc0, 0x95, 0x65, 0x88, 0x06, 0x4f, 0x07, 0xe6, 0xf6, 0xae, 0xde, 0x01, 0x61, 0xb9, 0x66, 0xaf,
+	0x2e, 0xc7, 0xd5, 0x7b, 0x0d, 0x53, 0xbb, 0x36, 0xa7, 0x2b, 0xc3, 0xb6, 0xbc, 0x9e, 0xa5, 0x5d,
+	0x9f, 0x13, 0x0c, 0xc0, 0x8e, 0x65, 0x68, 0x37, 0x96, 0xc0, 0x5d, 0xcb, 0xd0, 0x6e, 0x2e, 0xa3,
+	0xdf, 0x33, 0xb4, 0xf2, 0x32, 0xfa, 0x3d, 0x43, 0xbb, 0xb5, 0xa8, 0xd9, 0xc7, 0x7c, 0x81, 0xb7,
+	0x97, 0x21, 0x60, 0x81, 0x3b, 0xf3, 0x8b, 0x00, 0x44, 0xb3, 0x6d, 0xd4, 0xcc, 0xb6, 0x76, 0x67,
+	0xd9, 0x02, 0x1f, 0xe3, 0xe2, 0xef, 0x2e, 0xc7, 0xf1, 0xc5, 0xbf, 0xa7, 0xdf, 0x65, 0xb7, 0xe6,
+	0x79, 0x76, 0x1b, 0x9e, 0x6b, 0xd8, 0xbb, 0xa6, 0xab, 0xdd, 0x5b, 0x36, 0x65, 0xb7, 0xe1, 0x39,
+	0xed, 0xb6, 0x76, 0x7f, 0x05, 0xce, 0x6d, 0xb7, 0xb5, 0x07, 0x74, 0x5a, 0x4b, 0x5f, 0xb1, 0xda,
+	0x8e, 0x87, 0x92, 0x56, 0xe6, 0xf4, 0xc1, 0x51, 0x6e, 0x5d, 0xfb, 0xca, 0xbc, 0x7b, 0x01, 0xbc,
+	0xd6, 0x73, 0xb4, 0xf7, 0xe7, 0x10, 0x56, 0xad, 0xe6, 0xb5, 0x9c, 0x56, 0x43, 0xfb, 0x2a, 0xa5,
+	0x2e, 0xd2, 0xd4, 0xf6, 0xbb, 0x5d, 0xb3, 0xed, 0xb5, 0x1a, 0xda, 0xd7, 0x96, 0x89, 0x66, 0xbe,
+	0x70, 0xf7, 0x1a, 0xb6, 0xf6, 0x41, 0xf5, 0x53, 0xac, 0x5e, 0xf8, 0xc7, 0xdf, 0xa3, 0xa1, 0x7e,
+	0x99, 0x07, 0xcd, 0x83, 0x56, 0xc3, 0xeb, 0xf6, 0xba, 0x26, 0x3f, 0xb2, 0xb6, 0x09, 0x60, 0xd9,
+	0xa6, 0x63, 0x76, 0x5d, 0xed, 0xed, 0xfd, 0xea, 0xbf, 0xcd, 0x60, 0x23, 0x6f, 0x34, 0x3b, 0x7d,
+	0x4c, 0x1f, 0x2b, 0x8b, 0xfb, 0xa3, 0x40, 0xdd, 0x32, 0xf7, 0x16, 0xce, 0x24, 0x80, 0x01, 0xcb,
+	0x17, 0x10, 0x3b, 0xf0, 0x7c, 0x03, 0x90, 0xe9, 0x58, 0x5a, 0x96, 0x66, 0x85, 0x67, 0x63, 0xdf,
+	0xdd, 0xd3, 0xf2, 0x0a, 0xa0, 0x01, 0x49, 0x60, 0x41, 0x01, 0x40, 0xb2, 0xa4, 0x69, 0x0a, 0x57,
+	0xbb, 0xb7, 0x0f, 0xf1, 0xed, 0xbe, 0xc2, 0x75, 0xaf, 0x67, 0x69, 0x4f, 0xe8, 0xe4, 0x80, 0xe7,
+	0xfd, 0xae, 0x6d, 0x5a, 0x70, 0x0c, 0xa9, 0x20, 0xc7, 0x7c, 0x06, 0x09, 0xc3, 0x8f, 0xb3, 0xa9,
+	0xaf, 0x45, 0xe9, 0x9a, 0x3c, 0x90, 0x19, 0x3c, 0x87, 0xb7, 0xf6, 0x21, 0x12, 0xe2, 0x36, 0x19,
+	0x90, 0xe4, 0x5a, 0x2f, 0x3d, 0xd7, 0x6d, 0xf3, 0xf4, 0xbe, 0x44, 0xde, 0xa2, 0xc2, 0x5b, 0x5d,
+	0x19, 0x0e, 0x0c, 0x4c, 0x4d, 0x71, 0x53, 0xdd, 0xb6, 0x74, 0x6f, 0xc3, 0xf5, 0x1a, 0x66, 0x3d,
+	0x81, 0x6b, 0x94, 0x18, 0x18, 0xae, 0x67, 0xed, 0x3b, 0x7b, 0x3c, 0xa2, 0x69, 0x57, 0x48, 0x99,
+	0x00, 0xec, 0x59, 0x08, 0xd3, 0xe7, 0x08, 0x81, 0x83, 0x76, 0x35, 0x4d, 0xc8, 0x61, 0xd7, 0x12,
+	0x42, 0x90, 0x80, 0xa7, 0x4e, 0xda, 0x75, 0xd2, 0xa2, 0x41, 0xa5, 0x87, 0x76, 0x83, 0x72, 0x2b,
+	0xa2, 0xea, 0x3e, 0xe7, 0xd2, 0xdc, 0x4c, 0xa0, 0x20, 0x25, 0x41, 0xcb, 0x69, 0x8e, 0xcd, 0x96,
+	0xd9, 0x6e, 0x68, 0xb7, 0x94, 0xa9, 0x41, 0x1e, 0xab, 0x56, 0xd3, 0x6e, 0xd3, 0xd6, 0x90, 0x38,
+	0x00, 0xda, 0xd1, 0xcb, 0x62, 0xdd, 0x0b, 0x47, 0xd2, 0x01, 0xde, 0x30, 0x51, 0x1a, 0x8d, 0xf4,
+	0x15, 0xb0, 0xc8, 0x8e, 0x3b, 0xed, 0x54, 0x29, 0xcd, 0x08, 0x06, 0xc9, 0xeb, 0x7f, 0x79, 0x97,
+	0xa3, 0x23, 0x1d, 0x20, 0xdd, 0x9e, 0x57, 0xdb, 0x6f, 0x36, 0x89, 0xef, 0x7f, 0x14, 0x26, 0xaa,
+	0x7c, 0xe9, 0xc7, 0xf7, 0x96, 0x0c, 0x47, 0xcd, 0x88, 0x71, 0xbd, 0x2d, 0xd7, 0xdb, 0xed, 0xb9,
+	0x3d, 0x2a, 0xbf, 0x33, 0xe4, 0x4f, 0x2d, 0xd7, 0x7b, 0x6e, 0xb7, 0x5c, 0x53, 0x3d, 0xe1, 0xd0,
+	0x05, 0x25, 0xc6, 0xa8, 0xbb, 0xad, 0x5e, 0xd7, 0xd1, 0x72, 0x09, 0xc2, 0xb0, 0xac, 0xf6, 0x4b,
+	0x89, 0xc8, 0x27, 0x88, 0x7a, 0xdb, 0x34, 0x6c, 0x89, 0x58, 0x13, 0x76, 0x4d, 0xf5, 0x8a, 0xb6,
+	0x4e, 0x9a, 0x6a, 0x2d, 0xd1, 0xd4, 0x5f, 0xc6, 0x05, 0xcd, 0x7f, 0xe1, 0x47, 0x09, 0x45, 0xb3,
+	0x9e, 0xca, 0x54, 0x9a, 0x75, 0x91, 0x97, 0x88, 0x93, 0x5a, 0x42, 0x3c, 0xc7, 0xb5, 0x5b, 0x75,
+	0x28, 0xcf, 0x25, 0x29, 0x25, 0x35, 0xb9, 0x84, 0x14, 0x21, 0x82, 0x34, 0x5f, 0xfd, 0x87, 0xf4,
+	0x06, 0x51, 0xce, 0x8e, 0xfe, 0x8e, 0xca, 0x6c, 0xaa, 0x29, 0x28, 0xb1, 0x68, 0x7a, 0x8e, 0xd9,
+	0x6d, 0xc8, 0xc2, 0x39, 0x11, 0xa3, 0xe9, 0xd5, 0xf7, 0xcc, 0xfa, 0x53, 0xaf, 0x77, 0x60, 0xda,
+	0x6d, 0xc3, 0x92, 0x09, 0x43, 0xb3, 0xe9, 0x41, 0x80, 0x01, 0x4f, 0xda, 0xef, 0xba, 0x89, 0xd2,
+	0x9a, 0x4d, 0x9e, 0x6a, 0x3f, 0x95, 0x88, 0x42, 0x0a, 0x51, 0x7b, 0x29, 0x11, 0x5a, 0xd5, 0xc1,
+	0xd2, 0x07, 0xbf, 0xc5, 0xc6, 0xd5, 0xed, 0x2e, 0x34, 0x62, 0x76, 0x95, 0x46, 0x8c, 0x80, 0x24,
+	0x5d, 0x13, 0x09, 0x91, 0x8d, 0x90, 0xcf, 0xf0, 0x2d, 0xdd, 0xc2, 0x37, 0x73, 0xa4, 0xf8, 0xdd,
+	0xb4, 0xe2, 0x77, 0x15, 0xc5, 0x4b, 0x08, 0xe9, 0x37, 0x5b, 0x75, 0xd4, 0x3b, 0x19, 0xdc, 0x1c,
+	0x89, 0x09, 0x56, 0x5f, 0x92, 0x09, 0x38, 0x59, 0xdb, 0xac, 0x43, 0xac, 0x44, 0x37, 0xd8, 0x05,
+	0x7b, 0x6d, 0xb4, 0x6c, 0x93, 0x6f, 0xdc, 0x26, 0x0a, 0xe9, 0x7a, 0xcd, 0xa6, 0x96, 0xab, 0x5a,
+	0x68, 0x18, 0xf3, 0x5f, 0x96, 0xd1, 0xe6, 0xd8, 0xa0, 0xa5, 0x8e, 0xe1, 0xd6, 0xf7, 0xb4, 0x4b,
+	0x64, 0x6e, 0xc2, 0x00, 0x65, 0xc1, 0x66, 0x0b, 0x25, 0x71, 0x57, 0xcf, 0x56, 0xff, 0x56, 0x06,
+	0xdf, 0xb0, 0x2c, 0xf9, 0x66, 0x8b, 0x76, 0xcb, 0xb6, 0xbd, 0x56, 0xa3, 0x6d, 0x7a, 0x6e, 0xab,
+	0x63, 0xf6, 0x94, 0x08, 0x69, 0xdb, 0xde, 0x9e, 0x61, 0x37, 0x24, 0x5c, 0x28, 0xc1, 0x96, 0x99,
+	0x73, 0x36, 0xa1, 0xc4, 0xd2, 0x4f, 0x1a, 0x9f, 0x84, 0x63, 0xed, 0x4e, 0xf0, 0x7c, 0x75, 0x4a,
+	0x7f, 0x98, 0x8b, 0xbf, 0x96, 0xa6, 0xf4, 0xd9, 0xfb, 0x81, 0x69, 0xf7, 0xe4, 0x96, 0x76, 0x70,
+	0x4b, 0xdf, 0xfe, 0xf8, 0xdd, 0x86, 0x7e, 0x9d, 0xaf, 0xba, 0xe3, 0x39, 0xed, 0xde, 0x73, 0xcb,
+	0x70, 0xf7, 0xa8, 0xe9, 0x85, 0xdd, 0xb0, 0x8e, 0xda, 0x0d, 0x53, 0x3b, 0x5f, 0x1d, 0xac, 0x7e,
+	0xf9, 0x86, 0x4f, 0x16, 0xbe, 0x01, 0x52, 0x93, 0xf9, 0x9a, 0x1a, 0x39, 0x50, 0x9f, 0x00, 0xa3,
+	0x3a, 0x1f, 0xd7, 0xc0, 0x01, 0x4e, 0x1d, 0x6a, 0xd8, 0x8e, 0x61, 0x3f, 0xd5, 0x44, 0x52, 0x0e,
+	0xf0, 0x05, 0xbf, 0xfe, 0x4c, 0xfd, 0xc4, 0x6b, 0xd1, 0xbe, 0x3a, 0x69, 0xfb, 0xea, 0x2c, 0xd8,
+	0x57, 0x47, 0xb1, 0xaf, 0x23, 0xf5, 0x2a, 0x86, 0xea, 0xa2, 0x9d, 0x66, 0xaa, 0x03, 0xc0, 0x10,
+	0xf4, 0xb4, 0x66, 0x41, 0xd5, 0x4e, 0xab, 0x68, 0x82, 0x97, 0x59, 0x8e, 0x3c, 0x8f, 0x3b, 0x4d,
+	0xaf, 0xb6, 0x6f, 0x3b, 0xae, 0x3c, 0x8f, 0x3b, 0x4d, 0x51, 0xa7, 0x57, 0xff, 0x90, 0x6e, 0xf9,
+	0xe1, 0x87, 0x38, 0x5c, 0x3f, 0xb8, 0x74, 0x93, 0x9a, 0x84, 0x5e, 0xd3, 0x68, 0xb5, 0x4d, 0x98,
+	0x0d, 0x8f, 0x48, 0xd3, 0xf5, 0x6a, 0x46, 0x43, 0xb6, 0x75, 0x84, 0xe5, 0x11, 0x98, 0xec, 0x31,
+	0x4b, 0x99, 0x12, 0x41, 0x5b, 0x5d, 0xc7, 0xb5, 0xf7, 0x11, 0x95, 0xa3, 0xf3, 0x87, 0x50, 0x68,
+	0xd0, 0xf9, 0x84, 0x5e, 0xf4, 0xd7, 0xc4, 0xbc, 0x6b, 0x94, 0xf5, 0x98, 0x4a, 0x9f, 0x4d, 0xe0,
+	0xd6, 0x93, 0x61, 0xa2, 0xdf, 0x26, 0x50, 0x1b, 0xc9, 0x30, 0xd9, 0x77, 0x13, 0xb8, 0x42, 0x32,
+	0x0c, 0x7b, 0x11, 0x3d, 0x4b, 0xa0, 0x8a, 0xfa, 0x7b, 0xec, 0x36, 0xa2, 0x9c, 0xe7, 0x2d, 0xb7,
+	0xbe, 0x27, 0x9a, 0x61, 0x84, 0x67, 0x94, 0x59, 0x9a, 0xe9, 0x76, 0x98, 0x40, 0x97, 0x92, 0x59,
+	0x65, 0xdf, 0x4a, 0xe0, 0x36, 0xa9, 0xd3, 0x26, 0x25, 0x92, 0x5d, 0x50, 0x22, 0xd8, 0xa2, 0x33,
+	0xc3, 0x5c, 0x62, 0x5b, 0x35, 0xf5, 0xcf, 0x6e, 0xbe, 0xea, 0x8f, 0xc6, 0xfc, 0xb6, 0x27, 0xff,
+	0xab, 0x55, 0x60, 0x8f, 0x7b, 0xcd, 0xba, 0xd7, 0xea, 0xd6, 0x7b, 0x1d, 0xcb, 0x70, 0x5b, 0x70,
+	0xea, 0x09, 0x2b, 0x03, 0x84, 0x69, 0x99, 0x36, 0x54, 0xa8, 0x7f, 0x96, 0xc5, 0xf8, 0x72, 0xd8,
+	0x1f, 0x8a, 0xf7, 0x86, 0xc8, 0x03, 0x37, 0xbc, 0x66, 0xd7, 0xf9, 0x8e, 0x50, 0xbf, 0x4c, 0x76,
+	0x39, 0x04, 0x9c, 0x67, 0xdd, 0xe2, 0x34, 0x15, 0x40, 0xd9, 0xa3, 0xd4, 0xb2, 0xd4, 0xc4, 0x15,
+	0x98, 0xd4, 0x12, 0xc4, 0x81, 0xa4, 0x20, 0x91, 0x9f, 0xe8, 0xcc, 0x00, 0x02, 0xe5, 0x5c, 0x23,
+	0xff, 0x14, 0xa4, 0x6d, 0xb3, 0x2b, 0x2b, 0x45, 0x0e, 0xe3, 0xa9, 0x81, 0x67, 0x76, 0x2c, 0xf7,
+	0xa5, 0x6c, 0x0e, 0x2b, 0x88, 0xfd, 0xee, 0xd3, 0x6e, 0xef, 0x79, 0x57, 0x9e, 0x2e, 0x52, 0x7c,
+	0xae, 0xf3, 0x16, 0x6c, 0x71, 0xb2, 0xae, 0x96, 0xe3, 0x39, 0x6d, 0xe3, 0xc0, 0xd4, 0xd8, 0xdc,
+	0x62, 0x79, 0x6d, 0x2c, 0xb2, 0x42, 0x09, 0xe4, 0x6d, 0x22, 0x6d, 0x53, 0x7f, 0x9f, 0xdd, 0x27,
+	0x70, 0xd2, 0xa3, 0xa5, 0xe9, 0xe1, 0x34, 0x04, 0x13, 0xd6, 0xb6, 0xaa, 0xbf, 0x9f, 0xc3, 0xf8,
+	0x03, 0xfa, 0xa6, 0xa4, 0x94, 0xab, 0x9b, 0x66, 0x32, 0x14, 0xb5, 0x8a, 0x5e, 0xa3, 0x00, 0xc2,
+	0xa2, 0x33, 0x42, 0xa1, 0xc6, 0x12, 0x85, 0x8a, 0xdc, 0x45, 0x41, 0x22, 0xa7, 0xdc, 0x1c, 0xa2,
+	0xb7, 0x8f, 0xbe, 0x21, 0x8f, 0x61, 0x81, 0x30, 0xec, 0xdd, 0x7d, 0x60, 0xa6, 0xad, 0x89, 0x2d,
+	0x30, 0xc4, 0x16, 0xac, 0x2b, 0x22, 0xba, 0x3d, 0x38, 0x74, 0xba, 0xa0, 0x6a, 0x74, 0x74, 0x31,
+	0x1e, 0x53, 0xd1, 0x82, 0xb0, 0x07, 0x65, 0x3a, 0xcc, 0x49, 0x8b, 0xe4, 0x29, 0x80, 0xe1, 0x4e,
+	0xce, 0x0d, 0xb4, 0xeb, 0xb4, 0x1c, 0x17, 0x66, 0x65, 0xfa, 0x1d, 0x56, 0x26, 0xf4, 0x7e, 0xd7,
+	0xd9, 0xb7, 0x40, 0x48, 0xb3, 0xe1, 0xf5, 0xec, 0x86, 0x69, 0x6b, 0xa5, 0x39, 0x7d, 0xb8, 0xc6,
+	0xae, 0xb6, 0x39, 0xb7, 0x00, 0x48, 0x31, 0xf8, 0x92, 0x45, 0x71, 0xae, 0x22, 0x40, 0x81, 0xdb,
+	0x73, 0x0a, 0xe4, 0xdd, 0x65, 0xb1, 0xea, 0xcb, 0xd5, 0x3f, 0xcf, 0xb0, 0xb2, 0xd8, 0x1e, 0x35,
+	0xb9, 0x54, 0xdc, 0xaa, 0xd6, 0xaa, 0x0b, 0x7b, 0xe2, 0x31, 0x4c, 0x06, 0x41, 0x44, 0x38, 0xfb,
+	0x16, 0x82, 0x33, 0x0a, 0x7d, 0xca, 0xd6, 0x44, 0x1c, 0x4c, 0xe8, 0x65, 0xf6, 0x99, 0xa3, 0x48,
+	0xb3, 0x88, 0xc2, 0xfe, 0x6f, 0x5e, 0x48, 0xdf, 0x5a, 0xb2, 0xfd, 0x6b, 0x73, 0x13, 0xca, 0xed,
+	0x5f, 0x17, 0x8a, 0x6b, 0x25, 0x86, 0xb4, 0x21, 0x36, 0xb8, 0x25, 0x36, 0xb8, 0x50, 0xfd, 0x47,
+	0x74, 0x7f, 0x1f, 0x16, 0x8f, 0x7d, 0x2e, 0xd5, 0x34, 0x3b, 0xcb, 0x4c, 0xb3, 0xa3, 0x9a, 0x66,
+	0x1a, 0x06, 0xdb, 0x23, 0xfd, 0x9f, 0x60, 0x8d, 0x36, 0x1c, 0x77, 0x36, 0x35, 0xb3, 0xe7, 0x90,
+	0xdd, 0xe7, 0x0a, 0x32, 0x2f, 0x6c, 0x88, 0x90, 0xcf, 0x5b, 0xed, 0x46, 0xdd, 0xb0, 0x1b, 0x90,
+	0x56, 0x93, 0xcd, 0x11, 0x06, 0x8b, 0x95, 0xf5, 0x39, 0xe8, 0x81, 0xd1, 0xde, 0x37, 0xb5, 0x8d,
+	0x39, 0xe1, 0x39, 0x6b, 0xd1, 0x31, 0x12, 0x40, 0xcb, 0x36, 0x6d, 0xf3, 0x99, 0x56, 0x54, 0x38,
+	0x34, 0xf6, 0x2d, 0xe2, 0xcb, 0x84, 0x9e, 0x3a, 0x42, 0x4f, 0xa5, 0xea, 0x1f, 0x91, 0x91, 0x24,
+	0xe9, 0xb2, 0x12, 0x7b, 0x71, 0xc2, 0x66, 0xa7, 0x29, 0xad, 0x44, 0xa6, 0x4f, 0x1c, 0x48, 0x61,
+	0x7e, 0xbf, 0xdd, 0x96, 0x71, 0x93, 0xc3, 0xe7, 0x4c, 0x44, 0x61, 0x23, 0x72, 0xe9, 0x9c, 0x48,
+	0xc8, 0x3b, 0x32, 0x7e, 0xcb, 0x34, 0x5a, 0x72, 0xa0, 0xcc, 0x6c, 0x6d, 0x1e, 0x51, 0xef, 0x75,
+	0x3a, 0x46, 0x17, 0xf4, 0x84, 0x8b, 0x97, 0x88, 0x66, 0xdb, 0xd8, 0x75, 0xb4, 0x8d, 0xea, 0x1f,
+	0xe4, 0xf0, 0x03, 0xb0, 0x24, 0x13, 0x56, 0x57, 0x85, 0x82, 0xee, 0xc2, 0x20, 0x3c, 0x70, 0xcd,
+	0x17, 0x2d, 0xc7, 0x75, 0xe4, 0xbb, 0x0a, 0x8e, 0x11, 0x69, 0x26, 0xfa, 0x7a, 0x86, 0x6c, 0x99,
+	0xa3, 0x9e, 0x9b, 0xad, 0xdd, 0x3d, 0x57, 0x75, 0x6a, 0xe9, 0x06, 0x1c, 0x0f, 0x21, 0xa2, 0xd7,
+	0xc4, 0x91, 0x50, 0x6b, 0xe1, 0x89, 0xa9, 0xa2, 0x6a, 0xfb, 0x10, 0x67, 0xa1, 0x72, 0xb8, 0xcf,
+	0xee, 0x08, 0x5c, 0x7d, 0xcf, 0x68, 0x75, 0x5b, 0xdd, 0xdd, 0x14, 0xe3, 0x35, 0x0a, 0x32, 0x38,
+	0x31, 0x8f, 0x32, 0x2a, 0x7a, 0x5d, 0xa4, 0xe1, 0x80, 0x6e, 0xf7, 0x7a, 0x96, 0x3c, 0x30, 0x76,
+	0x95, 0x4d, 0xa3, 0x45, 0x14, 0x54, 0x14, 0x9f, 0xcd, 0x6c, 0xc8, 0x58, 0x86, 0xf6, 0xb2, 0x2b,
+	0x75, 0x0f, 0x9e, 0x21, 0xda, 0x8b, 0xbb, 0xf3, 0x8a, 0x2f, 0x91, 0x11, 0x48, 0x04, 0x2e, 0x48,
+	0xdb, 0xa4, 0x0d, 0x91, 0x70, 0x2e, 0xb1, 0x7c, 0xb7, 0xb8, 0x9b, 0x6c, 0xf6, 0x76, 0xf5, 0x77,
+	0xc9, 0xf0, 0xc4, 0x5f, 0xd4, 0x4d, 0x6d, 0x11, 0x4a, 0x63, 0x09, 0x36, 0xd4, 0xe4, 0x45, 0x69,
+	0x24, 0x74, 0x0f, 0x7d, 0x4c, 0xe6, 0xb2, 0x56, 0x22, 0x26, 0x7f, 0x51, 0x2a, 0x36, 0x45, 0xc2,
+	0x8d, 0xc6, 0x81, 0x69, 0xbb, 0x2d, 0xc7, 0x94, 0xe6, 0x67, 0x29, 0xe6, 0x57, 0xfd, 0x55, 0x34,
+	0x1a, 0xf9, 0x67, 0xa7, 0x53, 0x12, 0xd1, 0x3b, 0xc2, 0x94, 0x75, 0x4b, 0x67, 0x70, 0xe7, 0x66,
+	0x16, 0xef, 0x32, 0xdc, 0x84, 0x7d, 0xb6, 0xfa, 0x03, 0x5c, 0x2f, 0xde, 0xc9, 0x0a, 0x66, 0x4b,
+	0xd6, 0xfb, 0xac, 0x97, 0x5e, 0x2f, 0xce, 0x29, 0xa1, 0x78, 0x20, 0x09, 0xde, 0x1c, 0x2c, 0x78,
+	0xff, 0x25, 0x76, 0x77, 0xe1, 0x0f, 0x70, 0x2f, 0x11, 0xdf, 0xa9, 0xa7, 0x1c, 0x45, 0x24, 0x40,
+	0x12, 0x8c, 0xa1, 0x0f, 0xf9, 0x73, 0x60, 0x22, 0xfb, 0x9d, 0xf9, 0x1b, 0x59, 0x29, 0xf6, 0x54,
+	0xc0, 0xd9, 0xcd, 0x3a, 0xe4, 0xdd, 0x5c, 0x33, 0x0a, 0x88, 0x5b, 0x6c, 0x52, 0xc2, 0xd9, 0x34,
+	0x1b, 0xe4, 0x97, 0x5a, 0xb6, 0xfa, 0xaf, 0xb2, 0xa8, 0xf7, 0xa4, 0xac, 0x58, 0x0c, 0x41, 0x9d,
+	0x74, 0x08, 0x42, 0x0f, 0xe6, 0x40, 0xcc, 0x42, 0xc9, 0x83, 0x33, 0xb4, 0xe3, 0x1d, 0xd5, 0x83,
+	0xb1, 0x5f, 0x91, 0x55, 0x51, 0xc2, 0x2f, 0x10, 0x25, 0x32, 0x8a, 0xce, 0xbc, 0x99, 0xe7, 0x49,
+	0x6d, 0x9d, 0x74, 0x7c, 0x11, 0x41, 0x5b, 0x82, 0x6d, 0xc3, 0x35, 0x65, 0x30, 0xea, 0x24, 0x3e,
+	0x61, 0xf3, 0xb7, 0xfb, 0x73, 0xc4, 0x35, 0xe0, 0x5c, 0xa0, 0xa0, 0x90, 0x82, 0x52, 0x9c, 0x2f,
+	0xaa, 0x92, 0x52, 0xc0, 0xe0, 0x82, 0x3a, 0x1a, 0x53, 0x57, 0x2e, 0x62, 0x89, 0xd1, 0x6d, 0x38,
+	0x5a, 0xa9, 0xfa, 0x8f, 0x33, 0x4b, 0xbe, 0xe8, 0x8b, 0x96, 0xd9, 0x70, 0x73, 0xce, 0x86, 0xe9,
+	0xb5, 0xb5, 0x00, 0xcb, 0x03, 0x5c, 0x6c, 0x58, 0x32, 0x00, 0x82, 0x82, 0xbc, 0x2b, 0xd1, 0x54,
+	0x8c, 0x26, 0x37, 0xcf, 0x44, 0xa6, 0x21, 0x79, 0xe1, 0x0a, 0x4d, 0x69, 0x4e, 0x6b, 0xd5, 0xff,
+	0x40, 0x87, 0x73, 0xfa, 0x7b, 0x7f, 0x51, 0xed, 0x41, 0xa1, 0xed, 0xd4, 0x93, 0xea, 0x8f, 0x5f,
+	0x1f, 0x79, 0x2e, 0x5f, 0x4d, 0x77, 0x2c, 0xcf, 0xd8, 0xdd, 0xb5, 0xcd, 0x5d, 0x83, 0xd7, 0xe8,
+	0x54, 0xf0, 0x89, 0xcb, 0x28, 0x39, 0xa1, 0x6f, 0x2b, 0xfd, 0x12, 0x57, 0x92, 0xa1, 0x17, 0xad,
+	0x25, 0x00, 0x8c, 0x80, 0xeb, 0xc9, 0x38, 0x51, 0xec, 0x3b, 0x75, 0x6d, 0x43, 0x28, 0x5c, 0x40,
+	0x45, 0x49, 0x23, 0x1b, 0xbd, 0x1d, 0x8b, 0xac, 0xa8, 0x28, 0x2a, 0x6a, 0x02, 0x88, 0x58, 0xc0,
+	0x12, 0x16, 0x08, 0x97, 0x2c, 0x4a, 0x09, 0x26, 0x5d, 0x2f, 0xc9, 0x1b, 0x1a, 0x62, 0x11, 0x5c,
+	0x16, 0x51, 0x3d, 0x75, 0xac, 0x65, 0x95, 0xf9, 0xce, 0xd2, 0xbf, 0xf3, 0xe0, 0x89, 0x6f, 0xd6,
+	0x71, 0x60, 0x13, 0xca, 0xb9, 0x85, 0xb7, 0xbc, 0x02, 0xde, 0xe9, 0xd9, 0xa6, 0x96, 0xa9, 0xb6,
+	0xc9, 0x1d, 0xd3, 0x7f, 0xbb, 0x81, 0x38, 0x09, 0x89, 0x9b, 0x78, 0xb5, 0x41, 0xe1, 0x45, 0xd6,
+	0x2f, 0x31, 0xc4, 0xed, 0x4f, 0x73, 0x28, 0xda, 0x8a, 0xaf, 0x9a, 0xa5, 0xdd, 0x58, 0xae, 0x5a,
+	0x44, 0x43, 0x6c, 0xc2, 0x83, 0x6f, 0x01, 0xe3, 0x75, 0x5a, 0x8e, 0x23, 0x13, 0x52, 0x8e, 0xee,
+	0x9a, 0x2f, 0xa8, 0xe4, 0x74, 0xb4, 0x2c, 0xa5, 0xdd, 0xf3, 0x08, 0x1c, 0x96, 0x13, 0xd7, 0x11,
+	0x00, 0x9b, 0xee, 0x89, 0xe6, 0xe9, 0x88, 0x5f, 0x44, 0xe1, 0xd0, 0x35, 0x75, 0x68, 0xba, 0x6b,
+	0xba, 0xae, 0x0e, 0x4d, 0xa1, 0x70, 0xe8, 0x86, 0xf4, 0x01, 0xcb, 0xa5, 0x7e, 0x40, 0x41, 0x3a,
+	0x23, 0xcc, 0x26, 0xf3, 0x41, 0x26, 0xee, 0x97, 0x24, 0x42, 0x38, 0xa6, 0x8b, 0xd9, 0x9b, 0x28,
+	0xaf, 0x97, 0xe0, 0x70, 0x9a, 0x2d, 0x75, 0x30, 0x8a, 0x21, 0x07, 0x6f, 0xab, 0x83, 0xd3, 0x38,
+	0x1c, 0x7c, 0x59, 0xbf, 0x9d, 0xec, 0x44, 0xca, 0xbe, 0x7e, 0xf2, 0x2e, 0xa7, 0xdf, 0x4b, 0xf6,
+	0x42, 0xc5, 0xe1, 0x50, 0x30, 0xc0, 0xdf, 0xa3, 0x3f, 0x74, 0x81, 0x19, 0x57, 0xea, 0x42, 0x06,
+	0xb5, 0x05, 0x9b, 0xf5, 0x85, 0xcb, 0x2b, 0x00, 0xc3, 0xee, 0x21, 0xe5, 0x54, 0x5a, 0x46, 0x24,
+	0x4b, 0x09, 0xa6, 0xdd, 0x3a, 0x30, 0xbb, 0xa6, 0x93, 0xdc, 0xce, 0xd8, 0x55, 0x72, 0x25, 0x2d,
+	0xaf, 0x0c, 0x90, 0x09, 0x14, 0x6f, 0xdb, 0x3a, 0x5a, 0xa1, 0xfa, 0x39, 0xf6, 0x03, 0x92, 0x7b,
+	0xe8, 0x78, 0xf5, 0x5c, 0x9c, 0xa0, 0x6a, 0x7f, 0x0c, 0xa5, 0x7c, 0xe6, 0x7a, 0x9d, 0x56, 0x17,
+	0x03, 0x7a, 0x46, 0x81, 0x19, 0x2f, 0x10, 0x96, 0x25, 0x1f, 0x7c, 0xb6, 0xa4, 0x83, 0xf1, 0x43,
+	0x2c, 0x86, 0xe7, 0x2e, 0x22, 0x93, 0x9d, 0xd6, 0x6d, 0x6c, 0xa7, 0x74, 0x7b, 0xf5, 0x3d, 0xa3,
+	0xbb, 0x6b, 0xca, 0x5e, 0xbe, 0x40, 0x98, 0xcf, 0xf6, 0x8d, 0xb6, 0xbc, 0x9f, 0x26, 0xa0, 0x1d,
+	0xc3, 0xc1, 0xc3, 0x2b, 0x4d, 0x8c, 0x25, 0x7d, 0xae, 0xf6, 0xf0, 0x07, 0x1f, 0x1f, 0x8d, 0xe2,
+	0xe3, 0x93, 0xc3, 0x6f, 0x0e, 0x82, 0x09, 0xff, 0xef, 0x57, 0x06, 0x41, 0x38, 0xfc, 0x08, 0xff,
+	0x27, 0x95, 0x5f, 0xa4, 0xff, 0x49, 0xe5, 0x28, 0x50, 0xff, 0x63, 0x16, 0x2b, 0x73, 0xb8, 0xce,
+	0x11, 0x9f, 0xfe, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc5, 0x58, 0x4a, 0x1d, 0xbe, 0x65, 0x00,
+	0x00,
+}
diff --git a/go/openflow_13/openflow_13.proto b/go/openflow_13/openflow_13.proto
deleted file mode 100644
index 61df736..0000000
--- a/go/openflow_13/openflow_13.proto
+++ /dev/null
@@ -1,2303 +0,0 @@
-/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford
- * Junior University
- * Copyright (c) 2011, 2012 Open Networking Foundation
- *
- * We are making the OpenFlow specification and associated documentation
- * (Software) available for public use and benefit with the expectation
- * that others will use, modify and enhance the Software and contribute
- * those enhancements back to the community. However, since we would
- * like to make the Software available for broadest use, with as few
- * restrictions as possible permission is hereby granted, free of
- * charge, to any person obtaining a copy of this Software to deal in
- * the Software under the copyrights without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * The name and trademarks of copyright holder(s) may NOT be used in
- * advertising or publicity pertaining to the Software or any
- * derivatives without specific, written prior permission.
- */
-
-/* OpenFlow: protocol between controller and datapath. */
-
-/*
- * This is a relatively straightforward rendering of OpenFlow message
- * definitions into protocol buffer messages. We preserved the snake
- * case syntax, and made the following changes:
- * - all pad fields dropped
- * - for each enum value above 0x7fffffff the MSB is dropped. For example,
- *   0xffffffff is now 0x7fffffff.
- * - '<type> thing[...]' is replaced with 'repeated <type> thing'
- * - 'char thing[...]' is replaced with 'string thing'
- * - 'uint8_t data[...]' is replaced with 'bytes data'
- * - the following systematic changes are done to various integer types:
- *   uint8_t  -> uint32
- *   uint16_t -> uint32
- *   uint32_t -> uint32
- *   uint64_t -> uint64
- * - removed most length, len, size fields where these values can be determined
- *   from the explicitly encoded length of "repeated" protobuf fields.
- * - explicit use of enum types whereever it is unambigous (and not used as
- *   bitmask/flags value.
- *
- */
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/openflow_13";
-
-package openflow_13;
-
-import "google/api/annotations.proto";
-import public "voltha_protos/yang_options.proto";
-
-
-/* Version number:
- * OpenFlow versions released: 0x01 = 1.0 ; 0x02 = 1.1 ; 0x03 = 1.2
- *     0x04 = 1.3
- */
-/* The most significant bit in the version field is reserved and must
- * be set to zero.
- */
-//#define OFP_VERSION   0x04
-//#define PIPELINE_TABLES 64
-//#define OFP_MAX_TABLE_NAME_LEN 32
-//#define OFP_MAX_PORT_NAME_LEN  16
-/* Official IANA registered port for OpenFlow. */
-//#define OFP_TCP_PORT  6653
-//#define OFP_SSL_PORT  6653
-
-//#define OFP_ETH_ALEN 6          /* Bytes in an Ethernet address. */
-
-/* Port numbering. Ports are numbered starting from 1. */
-enum ofp_port_no {
-    OFPP_INVALID    = 0;
-
-    /* Maximum number of physical and logical switch ports. */
-    OFPP_MAX        = 0x7fffff00;
-
-    /* Reserved OpenFlow Port (fake output "ports"). */
-    OFPP_IN_PORT    = 0x7ffffff8;  /* Send the packet out the input port.  This
-                                      reserved port must be explicitly used
-                                      in order to send back out of the input
-                                      port. */
-    OFPP_TABLE      = 0x7ffffff9;  /* Submit the packet to the first flow table
-                                      NB: This destination port can only be
-                                      used in packet-out messages. */
-    OFPP_NORMAL     = 0x7ffffffa;  /* Forward using non-OpenFlow pipeline. */
-    OFPP_FLOOD      = 0x7ffffffb;  /* Flood using non-OpenFlow pipeline. */
-    OFPP_ALL        = 0x7ffffffc;  /* All standard ports except input port. */
-    OFPP_CONTROLLER = 0x7ffffffd;  /* Send to controller. */
-    OFPP_LOCAL      = 0x7ffffffe;  /* Local openflow "port". */
-    OFPP_ANY        = 0x7fffffff;  /* Special value used in some requests when
-                                      no port is specified (i.e. wildcarded).*/
-};
-
-enum ofp_type {
-
-    /* Immutable messages. */
-    OFPT_HELLO                      = 0;  /* Symmetric message */
-    OFPT_ERROR                      = 1;  /* Symmetric message */
-    OFPT_ECHO_REQUEST               = 2;  /* Symmetric message */
-    OFPT_ECHO_REPLY                 = 3;  /* Symmetric message */
-    OFPT_EXPERIMENTER               = 4;  /* Symmetric message */
-
-    /* Switch configuration messages. */
-    OFPT_FEATURES_REQUEST           = 5;  /* Controller/switch message */
-    OFPT_FEATURES_REPLY             = 6;  /* Controller/switch message */
-    OFPT_GET_CONFIG_REQUEST         = 7;  /* Controller/switch message */
-    OFPT_GET_CONFIG_REPLY           = 8;  /* Controller/switch message */
-    OFPT_SET_CONFIG                 = 9;  /* Controller/switch message */
-
-    /* Asynchronous messages. */
-    OFPT_PACKET_IN                  = 10; /* Async message */
-    OFPT_FLOW_REMOVED               = 11; /* Async message */
-    OFPT_PORT_STATUS                = 12; /* Async message */
-
-    /* Controller command messages. */
-    OFPT_PACKET_OUT                 = 13; /* Controller/switch message */
-    OFPT_FLOW_MOD                   = 14; /* Controller/switch message */
-    OFPT_GROUP_MOD                  = 15; /* Controller/switch message */
-    OFPT_PORT_MOD                   = 16; /* Controller/switch message */
-    OFPT_TABLE_MOD                  = 17; /* Controller/switch message */
-
-    /* Multipart messages. */
-    OFPT_MULTIPART_REQUEST          = 18; /* Controller/switch message */
-    OFPT_MULTIPART_REPLY            = 19; /* Controller/switch message */
-
-    /* Barrier messages. */
-    OFPT_BARRIER_REQUEST            = 20; /* Controller/switch message */
-    OFPT_BARRIER_REPLY              = 21; /* Controller/switch message */
-
-    /* Queue Configuration messages. */
-    OFPT_QUEUE_GET_CONFIG_REQUEST   = 22;  /* Controller/switch message */
-    OFPT_QUEUE_GET_CONFIG_REPLY     = 23;  /* Controller/switch message */
-
-    /* Controller role change request messages. */
-    OFPT_ROLE_REQUEST               = 24; /* Controller/switch message */
-    OFPT_ROLE_REPLY                 = 25; /* Controller/switch message */
-
-    /* Asynchronous message configuration. */
-    OFPT_GET_ASYNC_REQUEST          = 26; /* Controller/switch message */
-    OFPT_GET_ASYNC_REPLY            = 27; /* Controller/switch message */
-    OFPT_SET_ASYNC                  = 28; /* Controller/switch message */
-
-    /* Meters and rate limiters configuration messages. */
-    OFPT_METER_MOD                  = 29; /* Controller/switch message */
-};
-
-/* Header on all OpenFlow packets. */
-message ofp_header {
-    uint32 version = 1;    /* OFP_VERSION. */
-    ofp_type type = 2;     /* One of the OFPT_ constants. */
-    uint32 xid = 3;        /* Transaction id associated with this packet.
-                              Replies use the same id as was in the request
-                              to facilitate pairing. */
-};
-
-/* Hello elements types.
- */
-enum ofp_hello_elem_type {
-    OFPHET_INVALID                = 0;
-    OFPHET_VERSIONBITMAP          = 1;  /* Bitmap of version supported. */
-};
-
-/* Common header for all Hello Elements */
-message ofp_hello_elem_header {
-    ofp_hello_elem_type type = 1;       /* One of OFPHET_*. */
-    oneof element {
-        ofp_hello_elem_versionbitmap versionbitmap = 2;
-    }
-};
-
-/* Version bitmap Hello Element */
-message ofp_hello_elem_versionbitmap {
-    repeated uint32 bitmaps = 2;   /* List of bitmaps - supported versions */
-};
-
-/* 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. */
-message ofp_hello {
-    //ofp_header header;
-    /* Hello element list */
-    repeated ofp_hello_elem_header elements = 1; /* 0 or more */
-};
-
-//#define OFP_DEFAULT_MISS_SEND_LEN   128
-
-enum ofp_config_flags {
-    /* Handling of IP fragments. */
-    OFPC_FRAG_NORMAL   = 0;       /* No special handling for fragments. */
-    OFPC_FRAG_DROP     = 1;       /* Drop fragments. */
-    OFPC_FRAG_REASM    = 2;       /* Reassemble (only if OFPC_IP_REASM set). */
-    OFPC_FRAG_MASK     = 3;       /* Bitmask of flags dealing with frag. */
-};
-
-/* Switch configuration. */
-message ofp_switch_config {
-    //ofp_header header;
-    uint32 flags = 1;             /* Bitmap of OFPC_* flags. */
-    uint32 miss_send_len = 2;     /* Max bytes of packet that datapath
-                                     should send to the controller. See
-                                     ofp_controller_max_len for valid values.
-                                   */
-};
-
-/* Flags to configure the table. Reserved for future use. */
-enum ofp_table_config {
-    OFPTC_INVALID = 0;
-    OFPTC_DEPRECATED_MASK = 3;     /* Deprecated bits */
-};
-
-/* Table numbering. Tables can use any number up to OFPT_MAX. */
-enum ofp_table {
-
-    OFPTT_INVALID = 0;
-
-    /* Last usable table number. */
-    OFPTT_MAX        = 0xfe;
-
-    /* Fake tables. */
-    OFPTT_ALL        = 0xff;   /* Wildcard table used for table config,
-                                  flow stats and flow deletes. */
-};
-
-
-/* Configure/Modify behavior of a flow table */
-message ofp_table_mod {
-    //ofp_header header;
-    uint32 table_id = 1;  /* ID of the table, OFPTT_ALL indicates all tables */
-    uint32 config = 2;    /* Bitmap of OFPTC_* flags */
-};
-
-/* Capabilities supported by the datapath. */
-enum ofp_capabilities {
-    OFPC_INVALID        = 0;
-    OFPC_FLOW_STATS     = 1;    /* Flow statistics. */
-    OFPC_TABLE_STATS    = 2;    /* Table statistics. */
-    OFPC_PORT_STATS     = 4;    /* Port statistics. */
-    OFPC_GROUP_STATS    = 8;    /* Group statistics. */
-    OFPC_IP_REASM       = 32;   /* Can reassemble IP fragments. */
-    OFPC_QUEUE_STATS    = 64;   /* Queue statistics. */
-    OFPC_PORT_BLOCKED   = 256;  /* Switch will block looping ports. */
-};
-
-/* Flags to indicate behavior of the physical port.  These flags are
- * used in ofp_port to describe the current configuration.  They are
- * used in the ofp_port_mod message to configure the port's behavior.
- */
-enum ofp_port_config {
-    OFPPC_INVALID      = 0;
-    OFPPC_PORT_DOWN    = 1;   /* Port is administratively down. */
-
-    OFPPC_NO_RECV      = 4;   /* Drop all packets received by port. */
-    OFPPC_NO_FWD       = 32;  /* Drop packets forwarded to port. */
-    OFPPC_NO_PACKET_IN = 64;  /* Do not send packet-in msgs for port. */
-};
-
-/* Current state of the physical port.  These are not configurable from
- * the controller.
- */
-enum ofp_port_state {
-    OFPPS_INVALID      = 0;
-    OFPPS_LINK_DOWN    = 1;  /* No physical link present. */
-    OFPPS_BLOCKED      = 2;  /* Port is blocked */
-    OFPPS_LIVE         = 4;  /* Live for Fast Failover Group. */
-};
-
-/* Features of ports available in a datapath. */
-enum ofp_port_features {
-    OFPPF_INVALID    = 0;
-    OFPPF_10MB_HD    = 1;      /* 10 Mb half-duplex rate support. */
-    OFPPF_10MB_FD    = 2;      /* 10 Mb full-duplex rate support. */
-    OFPPF_100MB_HD   = 4;      /* 100 Mb half-duplex rate support. */
-    OFPPF_100MB_FD   = 8;      /* 100 Mb full-duplex rate support. */
-    OFPPF_1GB_HD     = 16;     /* 1 Gb half-duplex rate support. */
-    OFPPF_1GB_FD     = 32;     /* 1 Gb full-duplex rate support. */
-    OFPPF_10GB_FD    = 64;     /* 10 Gb full-duplex rate support. */
-    OFPPF_40GB_FD    = 128;    /* 40 Gb full-duplex rate support. */
-    OFPPF_100GB_FD   = 256;    /* 100 Gb full-duplex rate support. */
-    OFPPF_1TB_FD     = 512;    /* 1 Tb full-duplex rate support. */
-    OFPPF_OTHER      = 1024;   /* Other rate, not in the list. */
-    OFPPF_COPPER     = 2048;   /* Copper medium. */
-    OFPPF_FIBER      = 4096;   /* Fiber medium. */
-    OFPPF_AUTONEG    = 8192;   /* Auto-negotiation. */
-    OFPPF_PAUSE      = 16384;  /* Pause. */
-    OFPPF_PAUSE_ASYM = 32768;  /* Asymmetric pause. */
-};
-
-/* Description of a port */
-message ofp_port {
-    uint32 port_no = 1;
-    repeated uint32 hw_addr = 2; // [OFP_ETH_ALEN];
-    string name = 3;             /* Null-terminated */
-
-    uint32 config = 4;           /* Bitmap of OFPPC_* flags. */
-    uint32 state = 5;            /* Bitmap of OFPPS_* flags. */
-
-    /* Bitmaps of OFPPF_* that describe features.  All bits zeroed if
-     * unsupported or unavailable. */
-    uint32 curr = 6;           /* Current features. */
-    uint32 advertised = 7;     /* Features being advertised by the port. */
-    uint32 supported = 8;      /* Features supported by the port. */
-    uint32 peer = 9;           /* Features advertised by peer. */
-    uint32 curr_speed = 10;    /* Current port bitrate in kbps. */
-    uint32 max_speed = 11;     /* Max port bitrate in kbps */
-};
-
-/* Switch features. */
-message ofp_switch_features {
-    //ofp_header header;
-    uint64 datapath_id = 1;   /* Datapath unique ID.  The lower 48-bits are for
-                                 a MAC address, while the upper 16-bits are
-                                 implementer-defined. */
-
-    uint32 n_buffers = 2;     /* Max packets buffered at once. */
-
-    uint32 n_tables = 3;      /* Number of tables supported by datapath. */
-    uint32 auxiliary_id = 4;  /* Identify auxiliary connections */
-
-    /* Features. */
-    uint32 capabilities = 5;  /* Bitmap of support "ofp_capabilities". */
-};
-
-/* What changed about the physical port */
-enum ofp_port_reason {
-    OFPPR_ADD     = 0;         /* The port was added. */
-    OFPPR_DELETE  = 1;         /* The port was removed. */
-    OFPPR_MODIFY  = 2;         /* Some attribute of the port has changed. */
-};
-
-/* A physical port has changed in the datapath */
-message ofp_port_status {
-    //ofp_header header;
-    ofp_port_reason reason = 1; /* One of OFPPR_*. */
-    ofp_port desc = 2;
-};
-
-/* Modify behavior of the physical port */
-message ofp_port_mod {
-    //ofp_header header;
-    uint32 port_no = 1;
-    repeated uint32 hw_addr = 2; //[OFP_ETH_ALEN];
-                                      /* The hardware address is not
-                                         configurable.  This is used to
-                                         sanity-check the request, so it must
-                                         be the same as returned in an
-                                         ofp_port struct. */
-    uint32 config = 3;        /* Bitmap of OFPPC_* flags. */
-    uint32 mask = 4;          /* Bitmap of OFPPC_* flags to be changed. */
-
-    uint32 advertise = 5;     /* Bitmap of OFPPF_*.  Zero all bits to prevent
-                                 any action taking place. */
-};
-
-/* ## -------------------------- ## */
-/* ## OpenFlow Extensible Match. ## */
-/* ## -------------------------- ## */
-
-/* The match type indicates the match structure (set of fields that compose the
- * match) in use. The match type is placed in the type field at the beginning
- * of all match structures. The "OpenFlow Extensible Match" type corresponds
- * to OXM TLV format described below and must be supported by all OpenFlow
- * switches. Extensions that define other match types may be published on the
- * ONF wiki. Support for extensions is optional.
- */
-enum ofp_match_type {
-    OFPMT_STANDARD = 0;       /* Deprecated. */
-    OFPMT_OXM      = 1;       /* OpenFlow Extensible Match */
-};
-
-/* Fields to match against flows */
-message ofp_match {
-    ofp_match_type type = 1;         /* One of OFPMT_* */
-    repeated ofp_oxm_field oxm_fields = 2;  /* 0 or more */
-};
-
-/* Components of a OXM TLV header.
- * Those macros are not valid for the experimenter class, macros for the
- * experimenter class will depend on the experimenter header used. */
-//#define OXM_HEADER__(CLASS, FIELD, HASMASK, LENGTH) \
-//    (((CLASS) << 16) | ((FIELD) << 9) | ((HASMASK) << 8) | (LENGTH))
-//#define OXM_HEADER(CLASS, FIELD, LENGTH) \
-//    OXM_HEADER__(CLASS, FIELD, 0, LENGTH)
-//#define OXM_HEADER_W(CLASS, FIELD, LENGTH) \
-//    OXM_HEADER__(CLASS, FIELD, 1, (LENGTH) * 2)
-//#define OXM_CLASS(HEADER) ((HEADER) >> 16)
-//#define OXM_FIELD(HEADER) (((HEADER) >> 9) & 0x7f)
-//#define OXM_TYPE(HEADER) (((HEADER) >> 9) & 0x7fffff)
-//#define OXM_HASMASK(HEADER) (((HEADER) >> 8) & 1)
-//#define OXM_LENGTH(HEADER) ((HEADER) & 0xff)
-//
-//#define OXM_MAKE_WILD_HEADER(HEADER) \
-//    OXM_HEADER_W(OXM_CLASS(HEADER), OXM_FIELD(HEADER), OXM_LENGTH(HEADER))
-
-/* OXM Class IDs.
- * The high order bit differentiate reserved classes from member classes.
- * Classes 0x0000 to 0x7FFF are member classes, allocated by ONF.
- * Classes 0x8000 to 0xFFFE are reserved classes, reserved for standardisation.
- */
-enum ofp_oxm_class {
-    OFPXMC_NXM_0          = 0x0000;    /* Backward compatibility with NXM */
-    OFPXMC_NXM_1          = 0x0001;    /* Backward compatibility with NXM */
-    OFPXMC_OPENFLOW_BASIC = 0x8000;    /* Basic class for OpenFlow */
-    OFPXMC_EXPERIMENTER   = 0xFFFF;    /* Experimenter class */
-};
-
-/* OXM Flow field types for OpenFlow basic class. */
-enum oxm_ofb_field_types {
-    OFPXMT_OFB_IN_PORT        = 0;  /* Switch input port. */
-    OFPXMT_OFB_IN_PHY_PORT    = 1;  /* Switch physical input port. */
-    OFPXMT_OFB_METADATA       = 2;  /* Metadata passed between tables. */
-    OFPXMT_OFB_ETH_DST        = 3;  /* Ethernet destination address. */
-    OFPXMT_OFB_ETH_SRC        = 4;  /* Ethernet source address. */
-    OFPXMT_OFB_ETH_TYPE       = 5;  /* Ethernet frame type. */
-    OFPXMT_OFB_VLAN_VID       = 6;  /* VLAN id. */
-    OFPXMT_OFB_VLAN_PCP       = 7;  /* VLAN priority. */
-    OFPXMT_OFB_IP_DSCP        = 8;  /* IP DSCP (6 bits in ToS field). */
-    OFPXMT_OFB_IP_ECN         = 9;  /* IP ECN (2 bits in ToS field). */
-    OFPXMT_OFB_IP_PROTO       = 10; /* IP protocol. */
-    OFPXMT_OFB_IPV4_SRC       = 11; /* IPv4 source address. */
-    OFPXMT_OFB_IPV4_DST       = 12; /* IPv4 destination address. */
-    OFPXMT_OFB_TCP_SRC        = 13; /* TCP source port. */
-    OFPXMT_OFB_TCP_DST        = 14; /* TCP destination port. */
-    OFPXMT_OFB_UDP_SRC        = 15; /* UDP source port. */
-    OFPXMT_OFB_UDP_DST        = 16; /* UDP destination port. */
-    OFPXMT_OFB_SCTP_SRC       = 17; /* SCTP source port. */
-    OFPXMT_OFB_SCTP_DST       = 18; /* SCTP destination port. */
-    OFPXMT_OFB_ICMPV4_TYPE    = 19; /* ICMP type. */
-    OFPXMT_OFB_ICMPV4_CODE    = 20; /* ICMP code. */
-    OFPXMT_OFB_ARP_OP         = 21; /* ARP opcode. */
-    OFPXMT_OFB_ARP_SPA        = 22; /* ARP source IPv4 address. */
-    OFPXMT_OFB_ARP_TPA        = 23; /* ARP target IPv4 address. */
-    OFPXMT_OFB_ARP_SHA        = 24; /* ARP source hardware address. */
-    OFPXMT_OFB_ARP_THA        = 25; /* ARP target hardware address. */
-    OFPXMT_OFB_IPV6_SRC       = 26; /* IPv6 source address. */
-    OFPXMT_OFB_IPV6_DST       = 27; /* IPv6 destination address. */
-    OFPXMT_OFB_IPV6_FLABEL    = 28; /* IPv6 Flow Label */
-    OFPXMT_OFB_ICMPV6_TYPE    = 29; /* ICMPv6 type. */
-    OFPXMT_OFB_ICMPV6_CODE    = 30; /* ICMPv6 code. */
-    OFPXMT_OFB_IPV6_ND_TARGET = 31; /* Target address for ND. */
-    OFPXMT_OFB_IPV6_ND_SLL    = 32; /* Source link-layer for ND. */
-    OFPXMT_OFB_IPV6_ND_TLL    = 33; /* Target link-layer for ND. */
-    OFPXMT_OFB_MPLS_LABEL     = 34; /* MPLS label. */
-    OFPXMT_OFB_MPLS_TC        = 35; /* MPLS TC. */
-    OFPXMT_OFB_MPLS_BOS       = 36; /* MPLS BoS bit. */
-    OFPXMT_OFB_PBB_ISID       = 37; /* PBB I-SID. */
-    OFPXMT_OFB_TUNNEL_ID      = 38; /* Logical Port Metadata. */
-    OFPXMT_OFB_IPV6_EXTHDR    = 39; /* IPv6 Extension Header pseudo-field */
-};
-
-/* OXM Flow match fields */
-message ofp_oxm_field {
-    ofp_oxm_class oxm_class = 1;
-    oneof field {
-        /* 2 and 3 reserved for NXM_0 and NXM-1 OXM classes */
-        ofp_oxm_ofb_field ofb_field = 4;
-        ofp_oxm_experimenter_field experimenter_field = 5;
-    }
-}
-
-/* OXM OpenFlow Basic Match Field */
-message ofp_oxm_ofb_field {
-    oxm_ofb_field_types type = 1;
-    bool has_mask = 2;
-    oneof value {
-
-        /* OpenFlow port on which the packet was received.
-         * May be a physical port, a logical port, or the reserved port OFPP_LOCAL
-         *
-         * Prereqs: None.
-         *
-         * Format: 32-bit integer in network byte order.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_IN_PORT    OXM_HEADER  (0x8000, OFPXMT_OFB_IN_PORT, 4)
-        uint32 port = 3; /* Used for OFPXMT_OFB_IN_PORT */
-
-        /* Physical port on which the packet was received.
-         *
-         * Consider a packet received on a tunnel interface defined over a link
-         * aggregation group (LAG) with two physical port members.  If the tunnel
-         * interface is the logical port bound to OpenFlow.  In this case,
-         * OFPXMT_OF_IN_PORT is the tunnel's port number and OFPXMT_OF_IN_PHY_PORT is
-         * the physical port number of the LAG on which the tunnel is configured.
-         *
-         * When a packet is received directly on a physical port and not processed by a
-         * logical port, OFPXMT_OF_IN_PORT and OFPXMT_OF_IN_PHY_PORT have the same
-         * value.
-         *
-         * This field is usually not available in a regular match and only available
-         * in ofp_packet_in messages when it's different from OXM_OF_IN_PORT.
-         *
-         * Prereqs: OXM_OF_IN_PORT must be present.
-         *
-         * Format: 32-bit integer in network byte order.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_IN_PHY_PORT OXM_HEADER  (0x8000, OFPXMT_OFB_IN_PHY_PORT, 4)
-        uint32 physical_port = 4; /* Used for OFPXMT_OF_IN_PHY_PORT */
-
-        /* Table metadata.
-         *
-         * Prereqs: None.
-         *
-         * Format: 64-bit integer in network byte order.
-         *
-         * Masking: Arbitrary masks.
-         */
-        //#define OXM_OF_METADATA   OXM_HEADER  (0x8000, OFPXMT_OFB_METADATA, 8)
-        //#define OXM_OF_METADATA_W OXM_HEADER_W(0x8000, OFPXMT_OFB_METADATA, 8)
-        uint64 table_metadata = 5; /* Used for OFPXMT_OFB_METADATA */
-
-        /* Source or destination address in Ethernet header.
-         *
-         * Prereqs: None.
-         *
-         * Format: 48-bit Ethernet MAC address.
-         *
-         * Masking: Arbitrary masks. */
-        //#define OXM_OF_ETH_DST    OXM_HEADER  (0x8000, OFPXMT_OFB_ETH_DST, 6)
-        //#define OXM_OF_ETH_DST_W  OXM_HEADER_W(0x8000, OFPXMT_OFB_ETH_DST, 6)
-        //#define OXM_OF_ETH_SRC    OXM_HEADER  (0x8000, OFPXMT_OFB_ETH_SRC, 6)
-        //#define OXM_OF_ETH_SRC_W  OXM_HEADER_W(0x8000, OFPXMT_OFB_ETH_SRC, 6)
-        bytes eth_dst = 6; /* Used for OFPXMT_OFB_ETH_DST (exactly 6 bytes) */
-        bytes eth_src = 7; /* Used for OFPXMT_OFB_ETH_SRC (exactly 6 bytes) */
-
-        /* Packet's Ethernet type.
-         *
-         * Prereqs: None.
-         *
-         * Format: 16-bit integer in network byte order.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_ETH_TYPE   OXM_HEADER  (0x8000, OFPXMT_OFB_ETH_TYPE,2)
-        uint32 eth_type = 8; /* Used for OFPXMT_OFB_ETH_TYPE */
-
-        /* 802.1Q VID.
-         *
-         * For a packet with an 802.1Q header, this is the VLAN-ID (VID) from the
-         * outermost tag, with the CFI bit forced to 1. For a packet with no 802.1Q
-         * header, this has value OFPVID_NONE.
-         *
-         * Prereqs: None.
-         *
-         * Format: 16-bit integer in network byte order with bit 13 indicating
-         * presence of VLAN header and 3 most-significant bits forced to 0.
-         * Only the lower 13 bits have meaning.
-         *
-         * Masking: Arbitrary masks.
-         *
-         * This field can be used in various ways:
-         *
-         *   - If it is not constrained at all, the nx_match matches packets without
-         *     an 802.1Q header or with an 802.1Q header that has any VID value.
-         *
-         *   - Testing for an exact match with 0x0 matches only packets without
-         *     an 802.1Q header.
-         *
-         *   - Testing for an exact match with a VID value with CFI=1 matches packets
-         *     that have an 802.1Q header with a specified VID.
-         *
-         *   - Testing for an exact match with a nonzero VID value with CFI=0 does
-         *     not make sense.  The switch may reject this combination.
-         *
-         *   - Testing with nxm_value=0, nxm_mask=0x0fff matches packets with no 802.1Q
-         *     header or with an 802.1Q header with a VID of 0.
-         *
-         *   - Testing with nxm_value=0x1000, nxm_mask=0x1000 matches packets with
-         *     an 802.1Q header that has any VID value.
-         */
-        //#define OXM_OF_VLAN_VID   OXM_HEADER  (0x8000, OFPXMT_OFB_VLAN_VID, 2)
-        //#define OXM_OF_VLAN_VID_W OXM_HEADER_W(0x8000, OFPXMT_OFB_VLAN_VID, 2)
-        uint32 vlan_vid = 9; /* Used for OFPXMT_OFB_VLAN_VID */
-
-        /* 802.1Q PCP.
-         *
-         * For a packet with an 802.1Q header, this is the VLAN-PCP from the
-         * outermost tag.  For a packet with no 802.1Q header, this has value
-         * 0.
-         *
-         * Prereqs: OXM_OF_VLAN_VID must be different from OFPVID_NONE.
-         *
-         * Format: 8-bit integer with 5 most-significant bits forced to 0.
-         * Only the lower 3 bits have meaning.
-         *
-         * Masking: Not maskable.
-         */
-        //#define OXM_OF_VLAN_PCP   OXM_HEADER  (0x8000, OFPXMT_OFB_VLAN_PCP, 1)
-        uint32 vlan_pcp = 10; /* Used for OFPXMT_OFB_VLAN_PCP */
-
-        /* The Diff Serv Code Point (DSCP) bits of the IP header.
-         * Part of the IPv4 ToS field or the IPv6 Traffic Class field.
-         *
-         * Prereqs: OXM_OF_ETH_TYPE must be either 0x0800 or 0x86dd.
-         *
-         * Format: 8-bit integer with 2 most-significant bits forced to 0.
-         * Only the lower 6 bits have meaning.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_IP_DSCP     OXM_HEADER  (0x8000, OFPXMT_OFB_IP_DSCP, 1)
-        uint32 ip_dscp = 11; /* Used for OFPXMT_OFB_IP_DSCP */
-
-        /* The ECN bits of the IP header.
-         * Part of the IPv4 ToS field or the IPv6 Traffic Class field.
-         *
-         * Prereqs: OXM_OF_ETH_TYPE must be either 0x0800 or 0x86dd.
-         *
-         * Format: 8-bit integer with 6 most-significant bits forced to 0.
-         * Only the lower 2 bits have meaning.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_IP_ECN     OXM_HEADER  (0x8000, OFPXMT_OFB_IP_ECN, 1)
-        uint32 ip_ecn = 12; /* Used for OFPXMT_OFB_IP_ECN */
-
-        /* The "protocol" byte in the IP header.
-         *
-         * Prereqs: OXM_OF_ETH_TYPE must be either 0x0800 or 0x86dd.
-         *
-         * Format: 8-bit integer.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_IP_PROTO   OXM_HEADER  (0x8000, OFPXMT_OFB_IP_PROTO, 1)
-        uint32 ip_proto = 13; /* Used for OFPXMT_OFB_IP_PROTO */
-
-        /* The source or destination address in the IP header.
-         *
-         * Prereqs: OXM_OF_ETH_TYPE must match 0x0800 exactly.
-         *
-         * Format: 32-bit integer in network byte order.
-         *
-         * Masking: Arbitrary masks.
-         */
-        //#define OXM_OF_IPV4_SRC     OXM_HEADER  (0x8000, OFPXMT_OFB_IPV4_SRC, 4)
-        //#define OXM_OF_IPV4_SRC_W   OXM_HEADER_W(0x8000, OFPXMT_OFB_IPV4_SRC, 4)
-        //#define OXM_OF_IPV4_DST     OXM_HEADER  (0x8000, OFPXMT_OFB_IPV4_DST, 4)
-        //#define OXM_OF_IPV4_DST_W   OXM_HEADER_W(0x8000, OFPXMT_OFB_IPV4_DST, 4)
-        uint32 ipv4_src = 14; /* Used for OFPXMT_OFB_IPV4_SRC */
-        uint32 ipv4_dst = 15; /* Used for OFPXMT_OFB_IPV4_DST */
-
-        /* The source or destination port in the TCP header.
-         *
-         * Prereqs:
-         *   OXM_OF_ETH_TYPE must be either 0x0800 or 0x86dd.
-         *   OXM_OF_IP_PROTO must match 6 exactly.
-         *
-         * Format: 16-bit integer in network byte order.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_TCP_SRC    OXM_HEADER  (0x8000, OFPXMT_OFB_TCP_SRC, 2)
-        //#define OXM_OF_TCP_DST    OXM_HEADER  (0x8000, OFPXMT_OFB_TCP_DST, 2)
-        uint32 tcp_src = 16; /* Used for OFPXMT_OFB_TCP_SRC */
-        uint32 tcp_dst = 17; /* Used for OFPXMT_OFB_TCP_DST */
-
-        /* The source or destination port in the UDP header.
-         *
-         * Prereqs:
-         *   OXM_OF_ETH_TYPE must match either 0x0800 or 0x86dd.
-         *   OXM_OF_IP_PROTO must match 17 exactly.
-         *
-         * Format: 16-bit integer in network byte order.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_UDP_SRC    OXM_HEADER  (0x8000, OFPXMT_OFB_UDP_SRC, 2)
-        //#define OXM_OF_UDP_DST    OXM_HEADER  (0x8000, OFPXMT_OFB_UDP_DST, 2)
-        uint32 udp_src = 18; /* Used for OFPXMT_OFB_UDP_SRC */
-        uint32 udp_dst = 19; /* Used for OFPXMT_OFB_UDP_DST */
-
-        /* The source or destination port in the SCTP header.
-         *
-         * Prereqs:
-         *   OXM_OF_ETH_TYPE must match either 0x0800 or 0x86dd.
-         *   OXM_OF_IP_PROTO must match 132 exactly.
-         *
-         * Format: 16-bit integer in network byte order.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_SCTP_SRC   OXM_HEADER  (0x8000, OFPXMT_OFB_SCTP_SRC, 2)
-        //#define OXM_OF_SCTP_DST   OXM_HEADER  (0x8000, OFPXMT_OFB_SCTP_DST, 2)
-        uint32 sctp_src = 20; /* Used for OFPXMT_OFB_SCTP_SRC */
-        uint32 sctp_dst = 21; /* Used for OFPXMT_OFB_SCTP_DST */
-
-        /* The type or code in the ICMP header.
-         *
-         * Prereqs:
-         *   OXM_OF_ETH_TYPE must match 0x0800 exactly.
-         *   OXM_OF_IP_PROTO must match 1 exactly.
-         *
-         * Format: 8-bit integer.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_ICMPV4_TYPE  OXM_HEADER  (0x8000, OFPXMT_OFB_ICMPV4_TYPE, 1)
-        //#define OXM_OF_ICMPV4_CODE  OXM_HEADER  (0x8000, OFPXMT_OFB_ICMPV4_CODE, 1)
-        uint32 icmpv4_type = 22; /* Used for OFPXMT_OFB_ICMPV4_TYPE */
-        uint32 icmpv4_code = 23; /* Used for OFPXMT_OFB_ICMPV4_CODE */
-
-        /* ARP opcode.
-         *
-         * For an Ethernet+IP ARP packet, the opcode in the ARP header.  Always 0
-         * otherwise.
-         *
-         * Prereqs: OXM_OF_ETH_TYPE must match 0x0806 exactly.
-         *
-         * Format: 16-bit integer in network byte order.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_ARP_OP     OXM_HEADER  (0x8000, OFPXMT_OFB_ARP_OP, 2)
-        uint32 arp_op = 24; /* Used for OFPXMT_OFB_ARP_OP */
-
-        /* For an Ethernet+IP ARP packet, the source or target protocol address
-         * in the ARP header.  Always 0 otherwise.
-         *
-         * Prereqs: OXM_OF_ETH_TYPE must match 0x0806 exactly.
-         *
-         * Format: 32-bit integer in network byte order.
-         *
-         * Masking: Arbitrary masks.
-         */
-        //#define OXM_OF_ARP_SPA    OXM_HEADER  (0x8000, OFPXMT_OFB_ARP_SPA, 4)
-        //#define OXM_OF_ARP_SPA_W  OXM_HEADER_W(0x8000, OFPXMT_OFB_ARP_SPA, 4)
-        //#define OXM_OF_ARP_TPA    OXM_HEADER  (0x8000, OFPXMT_OFB_ARP_TPA, 4)
-        //#define OXM_OF_ARP_TPA_W  OXM_HEADER_W(0x8000, OFPXMT_OFB_ARP_TPA, 4)
-        uint32 arp_spa = 25; /* For OFPXMT_OFB_ARP_SPA */
-        uint32 arp_tpa = 26; /* For OFPXMT_OFB_ARP_TPA */
-
-        /* For an Ethernet+IP ARP packet, the source or target hardware address
-         * in the ARP header.  Always 0 otherwise.
-         *
-         * Prereqs: OXM_OF_ETH_TYPE must match 0x0806 exactly.
-         *
-         * Format: 48-bit Ethernet MAC address.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_ARP_SHA    OXM_HEADER   (0x8000, OFPXMT_OFB_ARP_SHA, 6)
-        //#define OXM_OF_ARP_SHA_W  OXM_HEADER_W (0x8000, OFPXMT_OFB_ARP_SHA, 6)
-        //#define OXM_OF_ARP_THA    OXM_HEADER   (0x8000, OFPXMT_OFB_ARP_THA, 6)
-        //#define OXM_OF_ARP_THA_W  OXM_HEADER_W (0x8000, OFPXMT_OFB_ARP_THA, 6)
-        bytes arp_sha = 27; /* For OFPXMT_OFB_ARP_SHA (6 bytes) */
-        bytes arp_tha = 28; /* For OFPXMT_OFB_ARP_THA (6 bytes) */
-
-        /* The source or destination address in the IPv6 header.
-         *
-         * Prereqs: OXM_OF_ETH_TYPE must match 0x86dd exactly.
-         *
-         * Format: 128-bit IPv6 address.
-         *
-         * Masking: Arbitrary masks.
-         */
-        //#define OXM_OF_IPV6_SRC    OXM_HEADER  (0x8000, OFPXMT_OFB_IPV6_SRC, 16)
-        //#define OXM_OF_IPV6_SRC_W  OXM_HEADER_W(0x8000, OFPXMT_OFB_IPV6_SRC, 16)
-        //#define OXM_OF_IPV6_DST    OXM_HEADER  (0x8000, OFPXMT_OFB_IPV6_DST, 16)
-        //#define OXM_OF_IPV6_DST_W  OXM_HEADER_W(0x8000, OFPXMT_OFB_IPV6_DST, 16)
-        bytes ipv6_src = 29; /* For OFPXMT_OFB_IPV6_SRC */
-        bytes ipv6_dst = 30; /* For OFPXMT_OFB_IPV6_DST */
-
-        /* The IPv6 Flow Label
-         *
-         * Prereqs:
-         *   OXM_OF_ETH_TYPE must match 0x86dd exactly
-         *
-         * Format: 32-bit integer with 12 most-significant bits forced to 0.
-         * Only the lower 20 bits have meaning.
-         *
-         * Masking: Arbitrary masks.
-         */
-        //#define OXM_OF_IPV6_FLABEL   OXM_HEADER  (0x8000, OFPXMT_OFB_IPV6_FLABEL, 4)
-        //#define OXM_OF_IPV6_FLABEL_W OXM_HEADER_W(0x8000, OFPXMT_OFB_IPV6_FLABEL, 4)
-        uint32 ipv6_flabel = 31; /* For OFPXMT_OFB_IPV6_FLABEL */
-
-        /* The type or code in the ICMPv6 header.
-         *
-         * Prereqs:
-         *   OXM_OF_ETH_TYPE must match 0x86dd exactly.
-         *   OXM_OF_IP_PROTO must match 58 exactly.
-         *
-         * Format: 8-bit integer.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_ICMPV6_TYPE OXM_HEADER  (0x8000, OFPXMT_OFB_ICMPV6_TYPE, 1)
-        //#define OXM_OF_ICMPV6_CODE OXM_HEADER  (0x8000, OFPXMT_OFB_ICMPV6_CODE, 1)
-        uint32 icmpv6_type = 32; /* For OFPXMT_OFB_ICMPV6_TYPE */
-        uint32 icmpv6_code = 33; /* For OFPXMT_OFB_ICMPV6_CODE */
-
-        /* The target address in an IPv6 Neighbor Discovery message.
-         *
-         * Prereqs:
-         *   OXM_OF_ETH_TYPE must match 0x86dd exactly.
-         *   OXM_OF_IP_PROTO must match 58 exactly.
-         *   OXM_OF_ICMPV6_TYPE must be either 135 or 136.
-         *
-         * Format: 128-bit IPv6 address.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_IPV6_ND_TARGET OXM_HEADER \
-        //    (0x8000, OFPXMT_OFB_IPV6_ND_TARGET, 16)
-        bytes ipv6_nd_target = 34; /* For OFPXMT_OFB_IPV6_ND_TARGET */
-
-        /* The source link-layer address option in an IPv6 Neighbor Discovery
-         * message.
-         *
-         * Prereqs:
-         *   OXM_OF_ETH_TYPE must match 0x86dd exactly.
-         *   OXM_OF_IP_PROTO must match 58 exactly.
-         *   OXM_OF_ICMPV6_TYPE must be exactly 135.
-         *
-         * Format: 48-bit Ethernet MAC address.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_IPV6_ND_SLL  OXM_HEADER  (0x8000, OFPXMT_OFB_IPV6_ND_SLL, 6)
-        bytes ipv6_nd_ssl = 35; /* For OFPXMT_OFB_IPV6_ND_SLL */
-
-        /* The target link-layer address option in an IPv6 Neighbor Discovery
-         * message.
-         *
-         * Prereqs:
-         *   OXM_OF_ETH_TYPE must match 0x86dd exactly.
-         *   OXM_OF_IP_PROTO must match 58 exactly.
-         *   OXM_OF_ICMPV6_TYPE must be exactly 136.
-         *
-         * Format: 48-bit Ethernet MAC address.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_IPV6_ND_TLL  OXM_HEADER  (0x8000, OFPXMT_OFB_IPV6_ND_TLL, 6)
-        bytes ipv6_nd_tll = 36; /* For OFPXMT_OFB_IPV6_ND_TLL */
-
-        /* The LABEL in the first MPLS shim header.
-         *
-         * Prereqs:
-         *   OXM_OF_ETH_TYPE must match 0x8847 or 0x8848 exactly.
-         *
-         * Format: 32-bit integer in network byte order with 12 most-significant
-         * bits forced to 0. Only the lower 20 bits have meaning.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_MPLS_LABEL  OXM_HEADER  (0x8000, OFPXMT_OFB_MPLS_LABEL, 4)
-        uint32 mpls_label = 37; /* For OFPXMT_OFB_MPLS_LABEL */
-
-        /* The TC in the first MPLS shim header.
-         *
-         * Prereqs:
-         *   OXM_OF_ETH_TYPE must match 0x8847 or 0x8848 exactly.
-         *
-         * Format: 8-bit integer with 5 most-significant bits forced to 0.
-         * Only the lower 3 bits have meaning.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_MPLS_TC     OXM_HEADER  (0x8000, OFPXMT_OFB_MPLS_TC, 1)
-        uint32 mpls_tc = 38; /* For OFPXMT_OFB_MPLS_TC */
-
-        /* The BoS bit in the first MPLS shim header.
-         *
-         * Prereqs:
-         *   OXM_OF_ETH_TYPE must match 0x8847 or 0x8848 exactly.
-         *
-         * Format: 8-bit integer with 7 most-significant bits forced to 0.
-         * Only the lowest bit have a meaning.
-         *
-         * Masking: Not maskable. */
-        //#define OXM_OF_MPLS_BOS     OXM_HEADER  (0x8000, OFPXMT_OFB_MPLS_BOS, 1)
-        uint32 mpls_bos = 39; /* For OFPXMT_OFB_MPLS_BOS */
-
-        /* IEEE 802.1ah I-SID.
-         *
-         * For a packet with a PBB header, this is the I-SID from the
-         * outermost service tag.
-         *
-         * Prereqs:
-         *   OXM_OF_ETH_TYPE must match 0x88E7 exactly.
-         *
-         * Format: 24-bit integer in network byte order.
-         *
-         * Masking: Arbitrary masks. */
-        //#define OXM_OF_PBB_ISID   OXM_HEADER  (0x8000, OFPXMT_OFB_PBB_ISID, 3)
-        //#define OXM_OF_PBB_ISID_W OXM_HEADER_W(0x8000, OFPXMT_OFB_PBB_ISID, 3)
-        uint32 pbb_isid = 40; /* For OFPXMT_OFB_PBB_ISID */
-
-        /* Logical Port Metadata.
-         *
-         * Metadata associated with a logical port.
-         * If the logical port performs encapsulation and decapsulation, this
-         * is the demultiplexing field from the encapsulation header.
-         * For example, for a packet received via GRE tunnel including a (32-bit) key,
-         * the key is stored in the low 32-bits and the high bits are zeroed.
-         * For a MPLS logical port, the low 20 bits represent the MPLS Label.
-         * For a VxLAN logical port, the low 24 bits represent the VNI.
-         * If the packet is not received through a logical port, the value is 0.
-         *
-         * Prereqs: None.
-         *
-         * Format: 64-bit integer in network byte order.
-         *
-         * Masking: Arbitrary masks. */
-        //#define OXM_OF_TUNNEL_ID    OXM_HEADER  (0x8000, OFPXMT_OFB_TUNNEL_ID, 8)
-        //#define OXM_OF_TUNNEL_ID_W  OXM_HEADER_W(0x8000, OFPXMT_OFB_TUNNEL_ID, 8)
-        uint64 tunnel_id = 41; /* For OFPXMT_OFB_TUNNEL_ID */
-
-        /* The IPv6 Extension Header pseudo-field.
-         *
-         * Prereqs:
-         *   OXM_OF_ETH_TYPE must match 0x86dd exactly
-         *
-         * Format: 16-bit integer with 7 most-significant bits forced to 0.
-         * Only the lower 9 bits have meaning.
-         *
-         * Masking: Maskable. */
-        //#define OXM_OF_IPV6_EXTHDR   OXM_HEADER  (0x8000, OFPXMT_OFB_IPV6_EXTHDR, 2)
-        //#define OXM_OF_IPV6_EXTHDR_W OXM_HEADER_W(0x8000, OFPXMT_OFB_IPV6_EXTHDR, 2)
-        uint32 ipv6_exthdr = 42; /* For OFPXMT_OFB_IPV6_EXTHDR */
-
-    }
-
-    /* Optional mask values (must be present when has_mask is true */
-    oneof mask {
-        uint64 table_metadata_mask = 105; /* For OFPXMT_OFB_METADATA */
-
-        bytes eth_dst_mask = 106; /* For OFPXMT_OFB_ETH_DST (exactly 6 bytes)*/
-        bytes eth_src_mask = 107; /* For OFPXMT_OFB_ETH_SRC (exactly 6 bytes)*/
-
-        uint32 vlan_vid_mask = 109; /* For OFPXMT_OFB_VLAN_VID */
-
-        uint32 ipv4_src_mask = 114; /* For OFPXMT_OFB_IPV4_SRC */
-        uint32 ipv4_dst_mask = 115; /* For OFPXMT_OFB_IPV4_DST */
-
-        uint32 arp_spa_mask = 125; /* For OFPXMT_OFB_ARP_SPA */
-        uint32 arp_tpa_mask = 126; /* For OFPXMT_OFB_ARP_TPA */
-
-        bytes ipv6_src_mask = 129; /* For OFPXMT_OFB_IPV6_SRC */
-        bytes ipv6_dst_mask = 130; /* For OFPXMT_OFB_IPV6_DST */
-
-        uint32 ipv6_flabel_mask = 131; /* For OFPXMT_OFB_IPV6_FLABEL */
-
-        uint32 pbb_isid_mask = 140; /* For OFPXMT_OFB_PBB_ISID */
-
-        uint64 tunnel_id_mask = 141; /* For OFPXMT_OFB_TUNNEL_ID */
-
-        uint32 ipv6_exthdr_mask = 142; /* For OFPXMT_OFB_IPV6_EXTHDR */
-    }
-
-}
-//#define OFPXMT_OFB_ALL    ((UINT64_C(1) << 40) - 1)
-
-
-/* The VLAN id is 12-bits, so we can use the entire 16 bits to indicate
- * special conditions.
- */
-enum ofp_vlan_id {
-    OFPVID_NONE    = 0x0000; /* No VLAN id was set. */
-    OFPVID_PRESENT = 0x1000; /* Bit that indicate that a VLAN id is set */
-};
-/* Define for compatibility */
-//#define OFP_VLAN_NONE      OFPVID_NONE
-
-/* Bit definitions for IPv6 Extension Header pseudo-field. */
-enum ofp_ipv6exthdr_flags {
-    OFPIEH_INVALID = 0;
-    OFPIEH_NONEXT  = 1;     /* "No next header" encountered. */
-    OFPIEH_ESP     = 2;     /* Encrypted Sec Payload header present. */
-    OFPIEH_AUTH    = 4;     /* Authentication header present. */
-    OFPIEH_DEST    = 8;     /* 1 or 2 dest headers present. */
-    OFPIEH_FRAG    = 16;    /* Fragment header present. */
-    OFPIEH_ROUTER  = 32;    /* Router header present. */
-    OFPIEH_HOP     = 64;    /* Hop-by-hop header present. */
-    OFPIEH_UNREP   = 128;   /* Unexpected repeats encountered. */
-    OFPIEH_UNSEQ   = 256;   /* Unexpected sequencing encountered. */
-};
-
-/* Header for OXM experimenter match fields.
- * The experimenter class should not use OXM_HEADER() macros for defining
- * fields due to this extra header. */
-message ofp_oxm_experimenter_field {
-    uint32 oxm_header = 1;    /* oxm_class = OFPXMC_EXPERIMENTER */
-    uint32 experimenter = 2;  /* Experimenter ID which takes the same
-                                 form as in struct ofp_experimenter_header. */
-};
-
-/* ## ----------------- ## */
-/* ## OpenFlow Actions. ## */
-/* ## ----------------- ## */
-
-enum ofp_action_type {
-    OFPAT_OUTPUT       = 0;  /* Output to switch port. */
-    OFPAT_COPY_TTL_OUT = 11; /* Copy TTL "outwards" -- from next-to-outermost
-                                to outermost */
-    OFPAT_COPY_TTL_IN  = 12; /* Copy TTL "inwards" -- from outermost to
-                               next-to-outermost */
-    OFPAT_SET_MPLS_TTL = 15; /* MPLS TTL */
-    OFPAT_DEC_MPLS_TTL = 16; /* Decrement MPLS TTL */
-
-    OFPAT_PUSH_VLAN    = 17; /* Push a new VLAN tag */
-    OFPAT_POP_VLAN     = 18; /* Pop the outer VLAN tag */
-    OFPAT_PUSH_MPLS    = 19; /* Push a new MPLS tag */
-    OFPAT_POP_MPLS     = 20; /* Pop the outer MPLS tag */
-    OFPAT_SET_QUEUE    = 21; /* Set queue id when outputting to a port */
-    OFPAT_GROUP        = 22; /* Apply group. */
-    OFPAT_SET_NW_TTL   = 23; /* IP TTL. */
-    OFPAT_DEC_NW_TTL   = 24; /* Decrement IP TTL. */
-    OFPAT_SET_FIELD    = 25; /* Set a header field using OXM TLV format. */
-    OFPAT_PUSH_PBB     = 26; /* Push a new PBB service tag (I-TAG) */
-    OFPAT_POP_PBB      = 27; /* Pop the outer PBB service tag (I-TAG) */
-    OFPAT_EXPERIMENTER = 0xffff;
-};
-
-/* Action header that is common to all actions.  The length includes the
- * header and any padding used to make the action 64-bit aligned.
- * NB: The length of an action *must* always be a multiple of eight. */
-message ofp_action {
-    ofp_action_type type = 1;       /* One of OFPAT_*. */
-    oneof action {
-        ofp_action_output output = 2;
-        ofp_action_mpls_ttl mpls_ttl = 3;
-        ofp_action_push push = 4;
-        ofp_action_pop_mpls pop_mpls = 5;
-        ofp_action_group group = 6;
-        ofp_action_nw_ttl nw_ttl = 7;
-        ofp_action_set_field set_field = 8;
-        ofp_action_experimenter experimenter = 9;
-    }
-};
-
-enum ofp_controller_max_len {
-    OFPCML_INVALID   = 0;
-    OFPCML_MAX       = 0xffe5; /* maximum max_len value which can be used
-                                  to request a specific byte length. */
-    OFPCML_NO_BUFFER = 0xffff; /* indicates that no buffering should be
-                                  applied and the whole packet is to be
-                                  sent to the controller. */
-};
-
-/* Action structure for OFPAT_OUTPUT, which sends packets out 'port'.
- * When the 'port' is the OFPP_CONTROLLER, 'max_len' indicates the max
- * number of bytes to send.  A 'max_len' of zero means no bytes of the
- * packet should be sent. A 'max_len' of OFPCML_NO_BUFFER means that
- * the packet is not buffered and the complete packet is to be sent to
- * the controller. */
-message ofp_action_output {
-    uint32 port = 1;                 /* Output port. */
-    uint32 max_len = 2;              /* Max length to send to controller. */
-};
-
-/* Action structure for OFPAT_SET_MPLS_TTL. */
-message ofp_action_mpls_ttl {
-    uint32 mpls_ttl = 1;             /* MPLS TTL */
-};
-
-/* Action structure for OFPAT_PUSH_VLAN/MPLS/PBB. */
-message ofp_action_push {
-    uint32 ethertype = 1;            /* Ethertype */
-};
-
-/* Action structure for OFPAT_POP_MPLS. */
-message ofp_action_pop_mpls {
-    uint32 ethertype = 1;            /* Ethertype */
-};
-
-/* Action structure for OFPAT_GROUP. */
-message ofp_action_group {
-    uint32 group_id = 1;             /* Group identifier. */
-};
-
-/* Action structure for OFPAT_SET_NW_TTL. */
-message ofp_action_nw_ttl {
-    uint32 nw_ttl = 1;               /* IP TTL */
-};
-
-/* Action structure for OFPAT_SET_FIELD. */
-message ofp_action_set_field {
-    ofp_oxm_field field = 1;
-};
-
-/* Action header for OFPAT_EXPERIMENTER.
- * The rest of the body is experimenter-defined. */
-message ofp_action_experimenter {
-    uint32 experimenter = 1;         /* Experimenter ID which takes the same
-                                        form as in struct
-                                        ofp_experimenter_header. */
-    bytes data = 2;
-};
-
-/* ## ---------------------- ## */
-/* ## OpenFlow Instructions. ## */
-/* ## ---------------------- ## */
-
-enum ofp_instruction_type {
-    OFPIT_INVALID    = 0;
-    OFPIT_GOTO_TABLE = 1;       /* Setup the next table in the lookup
-                                   pipeline */
-    OFPIT_WRITE_METADATA = 2;   /* Setup the metadata field for use later in
-                                   pipeline */
-    OFPIT_WRITE_ACTIONS = 3;    /* Write the action(s) onto the datapath action
-                                   set */
-    OFPIT_APPLY_ACTIONS = 4;    /* Applies the action(s) immediately */
-    OFPIT_CLEAR_ACTIONS = 5;    /* Clears all actions from the datapath
-                                   action set */
-    OFPIT_METER = 6;            /* Apply meter (rate limiter) */
-
-    OFPIT_EXPERIMENTER = 0xFFFF; /* Experimenter instruction */
-};
-
-/* Instruction header that is common to all instructions.  The length includes
- * the header and any padding used to make the instruction 64-bit aligned.
- * NB: The length of an instruction *must* always be a multiple of eight. */
-message ofp_instruction {
-    uint32 type = 1;               /* Instruction type */
-    oneof data {
-        ofp_instruction_goto_table goto_table = 2;
-        ofp_instruction_write_metadata write_metadata = 3;
-        ofp_instruction_actions actions = 4;
-        ofp_instruction_meter meter = 5;
-        ofp_instruction_experimenter experimenter = 6;
-    }
-};
-
-/* Instruction structure for OFPIT_GOTO_TABLE */
-message ofp_instruction_goto_table {
-    uint32 table_id = 1;           /* Set next table in the lookup pipeline */
-};
-
-/* Instruction structure for OFPIT_WRITE_METADATA */
-message ofp_instruction_write_metadata {
-    uint64 metadata = 1;           /* Metadata value to write */
-    uint64 metadata_mask = 2;      /* Metadata write bitmask */
-};
-
-/* Instruction structure for OFPIT_WRITE/APPLY/CLEAR_ACTIONS */
-message ofp_instruction_actions {
-    repeated ofp_action actions = 1; /* 0 or more actions associated
-                                        with OFPIT_WRITE_ACTIONS and
-                                        OFPIT_APPLY_ACTIONS */
-};
-
-/* Instruction structure for OFPIT_METER */
-message ofp_instruction_meter {
-    uint32 meter_id = 1;           /* Meter instance. */
-};
-
-/* Instruction structure for experimental instructions */
-message ofp_instruction_experimenter {
-    uint32 experimenter = 1;     /* Experimenter ID which takes the same form
-                                   as in struct ofp_experimenter_header. */
-    /* Experimenter-defined arbitrary additional data. */
-    bytes data = 2;
-};
-
-/* ## --------------------------- ## */
-/* ## OpenFlow Flow Modification. ## */
-/* ## --------------------------- ## */
-
-enum ofp_flow_mod_command {
-    OFPFC_ADD           = 0; /* New flow. */
-    OFPFC_MODIFY        = 1; /* Modify all matching flows. */
-    OFPFC_MODIFY_STRICT = 2; /* Modify entry strictly matching wildcards and
-                                priority. */
-    OFPFC_DELETE        = 3; /* Delete all matching flows. */
-    OFPFC_DELETE_STRICT = 4; /* Delete entry strictly matching wildcards and
-                                priority. */
-};
-
-/* Value used in "idle_timeout" and "hard_timeout" to indicate that the entry
- * is permanent. */
-//#define OFP_FLOW_PERMANENT 0
-
-/* By default, choose a priority in the middle. */
-//#define OFP_DEFAULT_PRIORITY 0x8000
-
-enum ofp_flow_mod_flags {
-    OFPFF_INVALID       = 0;
-    OFPFF_SEND_FLOW_REM = 1;  /* Send flow removed message when flow
-                               * expires or is deleted. */
-    OFPFF_CHECK_OVERLAP = 2;  /* Check for overlapping entries first. */
-    OFPFF_RESET_COUNTS  = 4;  /* Reset flow packet and byte counts. */
-    OFPFF_NO_PKT_COUNTS = 8;  /* Don't keep track of packet count. */
-    OFPFF_NO_BYT_COUNTS = 16; /* Don't keep track of byte count. */
-};
-
-/* Flow setup and teardown (controller -> datapath). */
-message ofp_flow_mod {
-    //ofp_header header;
-    uint64 cookie = 1;             /* Opaque controller-issued identifier. */
-    uint64 cookie_mask = 2;        /* Mask used to restrict the cookie bits
-                                      that must match when the command is
-                                      OFPFC_MODIFY* or OFPFC_DELETE*. A value
-                                      of 0 indicates no restriction. */
-    uint32 table_id = 3;           /* ID of the table to put the flow in.
-                                      For OFPFC_DELETE_* commands, OFPTT_ALL
-                                      can also be used to delete matching
-                                      flows from all tables. */
-    ofp_flow_mod_command command = 4; /* One of OFPFC_*. */
-    uint32 idle_timeout = 5;       /* Idle time before discarding (seconds). */
-    uint32 hard_timeout = 6;       /* Max time before discarding (seconds). */
-    uint32 priority = 7;           /* Priority level of flow entry. */
-    uint32 buffer_id = 8;          /* Buffered packet to apply to, or
-                                      OFP_NO_BUFFER.
-                                      Not meaningful for OFPFC_DELETE*. */
-    uint32 out_port = 9;          /* For OFPFC_DELETE* commands, require
-                                      matching entries to include this as an
-                                      output port.  A value of OFPP_ANY
-                                      indicates no restriction. */
-    uint32 out_group = 10;         /* For OFPFC_DELETE* commands, require
-                                      matching entries to include this as an
-                                      output group.  A value of OFPG_ANY
-                                      indicates no restriction. */
-    uint32 flags = 11;             /* Bitmap of OFPFF_* flags. */
-    ofp_match match = 12;          /* Fields to match. Variable size. */
-    repeated ofp_instruction instructions = 13; /* 0 or more. */
-};
-
-/* Group numbering. Groups can use any number up to OFPG_MAX. */
-enum ofp_group {
-
-    OFPG_INVALID = 0;
-
-    /* Last usable group number. */
-    OFPG_MAX        = 0x7fffff00;
-
-    /* Fake groups. */
-    OFPG_ALL        = 0x7ffffffc;  /* Represents all groups for group delete
-                                      commands. */
-    OFPG_ANY        = 0x7fffffff;  /* Special wildcard: no group specified. */
-};
-
-/* Group commands */
-enum ofp_group_mod_command {
-    OFPGC_ADD    = 0;       /* New group. */
-    OFPGC_MODIFY = 1;       /* Modify all matching groups. */
-    OFPGC_DELETE = 2;       /* Delete all matching groups. */
-};
-
-/* Bucket for use in groups. */
-message ofp_bucket {
-    uint32 weight = 1;              /* Relative weight of bucket.  Only
-                                       defined for select groups. */
-    uint32 watch_port = 2;          /* Port whose state affects whether this
-                                       bucket is live.  Only required for fast
-                                       failover groups. */
-    uint32 watch_group = 3;         /* Group whose state affects whether this
-                                       bucket is live.  Only required for fast
-                                       failover groups. */
-    repeated ofp_action actions = 4;
-};
-
-/* Group setup and teardown (controller -> datapath). */
-message ofp_group_mod {
-    //ofp_header header;
-    ofp_group_mod_command command = 1; /* One of OFPGC_*. */
-    ofp_group_type type = 2;           /* One of OFPGT_*. */
-    uint32 group_id = 3;               /* Group identifier. */
-    repeated ofp_bucket buckets = 4;
-};
-
-/* Group types.  Values in the range [128; 255] are reserved for experimental
- * use. */
-enum ofp_group_type {
-    OFPGT_ALL      = 0; /* All (multicast/broadcast) group.  */
-    OFPGT_SELECT   = 1; /* Select group. */
-    OFPGT_INDIRECT = 2; /* Indirect group. */
-    OFPGT_FF       = 3; /* Fast failover group. */
-};
-
-/* Special buffer-id to indicate 'no buffer' */
-//#define OFP_NO_BUFFER 0xffffffff
-
-/* Send packet (controller -> datapath). */
-message ofp_packet_out {
-    //ofp_header header;
-    uint32 buffer_id = 1;          /* ID assigned by datapath (OFP_NO_BUFFER
-                                      if none). */
-    uint32 in_port = 2;            /* Packet's input port or OFPP_CONTROLLER.*/
-    repeated ofp_action actions = 3; /* Action list - 0 or more. */
-    /* The variable size action list is optionally followed by packet data.
-     * This data is only present and meaningful if buffer_id == -1. */
-    bytes data = 4;                /* Packet data. */
-};
-
-/* Why is this packet being sent to the controller? */
-enum ofp_packet_in_reason {
-    OFPR_NO_MATCH    = 0;   /* No matching flow (table-miss flow entry). */
-    OFPR_ACTION      = 1;   /* Action explicitly output to controller. */
-    OFPR_INVALID_TTL = 2;   /* Packet has invalid TTL */
-};
-
-/* Packet received on port (datapath -> controller). */
-message ofp_packet_in {
-    //ofp_header header;
-    uint32 buffer_id = 1;     /* ID assigned by datapath. */
-    ofp_packet_in_reason reason = 2; /* Reason packet is being sent */
-    uint32 table_id = 3;      /* ID of the table that was looked up */
-    uint64 cookie = 4;        /* Cookie of the flow entry that was looked up. */
-    ofp_match match = 5;      /* Packet metadata. Variable size. */
-    bytes data = 6;           /* Ethernet frame */
-};
-
-/* Why was this flow removed? */
-enum ofp_flow_removed_reason {
-    OFPRR_IDLE_TIMEOUT = 0;     /* Flow idle time exceeded idle_timeout. */
-    OFPRR_HARD_TIMEOUT = 1;     /* Time exceeded hard_timeout. */
-    OFPRR_DELETE       = 2;     /* Evicted by a DELETE flow mod. */
-    OFPRR_GROUP_DELETE = 3;     /* Group was removed. */
-    OFPRR_METER_DELETE = 4;     /* Meter was removed */
-};
-
-/* Flow removed (datapath -> controller). */
-message ofp_flow_removed {
-    //ofp_header header;
-    uint64 cookie = 1;         /* Opaque controller-issued identifier. */
-
-    uint32 priority = 2;       /* Priority level of flow entry. */
-    ofp_flow_removed_reason reason = 3; /* One of OFPRR_*. */
-    uint32 table_id = 4;        /* ID of the table */
-
-    uint32 duration_sec = 5;   /* Time flow was alive in seconds. */
-    uint32 duration_nsec = 6;  /* Time flow was alive in nanoseconds beyond
-                                 duration_sec. */
-    uint32 idle_timeout = 7;   /* Idle timeout from original flow mod. */
-    uint32 hard_timeout = 8;   /* Hard timeout from original flow mod. */
-    uint64 packet_count = 9;
-    uint64 byte_count = 10;
-    ofp_match match = 121;  /* Description of fields. Variable size. */
-};
-
-/* Meter numbering. Flow meters can use any number up to OFPM_MAX. */
-enum ofp_meter {
-    OFPM_ZERO       = 0;
-    /* Last usable meter. */
-    OFPM_MAX        = 0x7fff0000;
-
-    /* Virtual meters. */
-    OFPM_SLOWPATH   = 0x7ffffffd;  /* Meter for slow datapath. */
-    OFPM_CONTROLLER = 0x7ffffffe;  /* Meter for controller connection. */
-    OFPM_ALL        = 0x7fffffff;  /* Represents all meters for stat requests
-                                      commands. */
-};
-
-/* Meter band types */
-enum ofp_meter_band_type {
-    OFPMBT_INVALID         = 0;
-    OFPMBT_DROP            = 1;      /* Drop packet. */
-    OFPMBT_DSCP_REMARK     = 2;      /* Remark DSCP in the IP header. */
-    OFPMBT_EXPERIMENTER    = 0xFFFF; /* Experimenter meter band. */
-};
-
-/* Common header for all meter bands */
-message ofp_meter_band_header {
-    ofp_meter_band_type type = 1;   /* One of OFPMBT_*. */
-    uint32              rate = 2;   /* Rate for this band. */
-    uint32              burst_size = 3;/* Size of bursts. */
-    oneof data {
-        ofp_meter_band_drop drop = 4;
-        ofp_meter_band_dscp_remark dscp_remark = 5;
-        ofp_meter_band_experimenter experimenter = 6;
-    }
-};
-
-/* OFPMBT_DROP band - drop packets */
-message ofp_meter_band_drop {
-    //Empty payload
-};
-
-/* OFPMBT_DSCP_REMARK band - Remark DSCP in the IP header */
-message ofp_meter_band_dscp_remark {
-    uint32        prec_level = 1; /* Number of drop precedence level to add. */
-};
-
-/* OFPMBT_EXPERIMENTER band - Experimenter type.
- * The rest of the band is experimenter-defined. */
-message ofp_meter_band_experimenter {
-    uint32              experimenter = 1;/* Experimenter ID which takes the
-                                            same form as in struct
-                                            ofp_experimenter_header. */
-};
-
-/* Meter commands */
-enum ofp_meter_mod_command {
-    OFPMC_ADD = 0;              /* New meter. */
-    OFPMC_MODIFY = 1;           /* Modify specified meter. */
-    OFPMC_DELETE = 2;           /* Delete specified meter. */
-};
-
-/* Meter configuration flags */
-enum ofp_meter_flags {
-    OFPMF_INVALID = 0;
-    OFPMF_KBPS    = 1;     /* Rate value in kb/s (kilo-bit per second). */
-    OFPMF_PKTPS   = 2;     /* Rate value in packet/sec. */
-    OFPMF_BURST   = 4;     /* Do burst size. */
-    OFPMF_STATS   = 8;     /* Collect statistics. */
-};
-
-/* Meter configuration. OFPT_METER_MOD. */
-message ofp_meter_mod {
-    ofp_meter_mod_command command = 1;       /* One of OFPMC_*. */
-    uint32                flags = 2;         /* Bitmap of OFPMF_* flags. */
-    uint32                meter_id = 3;      /* Meter instance. */
-    repeated ofp_meter_band_header bands = 4; /* The band list length is
-                                                 inferred from the length field
-                                                 in the header. */
-};
-
-/* Values for 'type' in ofp_error_message.  These values are immutable: they
- * will not change in future versions of the protocol (although new values may
- * be added). */
-enum ofp_error_type {
-    OFPET_HELLO_FAILED         = 0;  /* Hello protocol failed. */
-    OFPET_BAD_REQUEST          = 1;  /* Request was not understood. */
-    OFPET_BAD_ACTION           = 2;  /* Error in action description. */
-    OFPET_BAD_INSTRUCTION      = 3;  /* Error in instruction list. */
-    OFPET_BAD_MATCH            = 4;  /* Error in match. */
-    OFPET_FLOW_MOD_FAILED      = 5;  /* Problem modifying flow entry. */
-    OFPET_GROUP_MOD_FAILED     = 6;  /* Problem modifying group entry. */
-    OFPET_PORT_MOD_FAILED      = 7;  /* Port mod request failed. */
-    OFPET_TABLE_MOD_FAILED     = 8;  /* Table mod request failed. */
-    OFPET_QUEUE_OP_FAILED      = 9;  /* Queue operation failed. */
-    OFPET_SWITCH_CONFIG_FAILED = 10; /* Switch config request failed. */
-    OFPET_ROLE_REQUEST_FAILED  = 11; /* Controller Role request failed. */
-    OFPET_METER_MOD_FAILED     = 12; /* Error in meter. */
-    OFPET_TABLE_FEATURES_FAILED = 13; /* Setting table features failed. */
-    OFPET_EXPERIMENTER = 0xffff;      /* Experimenter error messages. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_HELLO_FAILED.  'data' contains an
- * ASCII text string that may give failure details. */
-enum ofp_hello_failed_code {
-    OFPHFC_INCOMPATIBLE = 0;    /* No compatible version. */
-    OFPHFC_EPERM        = 1;    /* Permissions error. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_BAD_REQUEST.  'data' contains at least
- * the first 64 bytes of the failed request. */
-enum ofp_bad_request_code {
-    OFPBRC_BAD_VERSION      = 0;  /* ofp_header.version not supported. */
-    OFPBRC_BAD_TYPE         = 1;  /* ofp_header.type not supported. */
-    OFPBRC_BAD_MULTIPART    = 2;  /* ofp_multipart_request.type not supported.
-                                   */
-    OFPBRC_BAD_EXPERIMENTER = 3;  /* Experimenter id not supported
-                                   * (in ofp_experimenter_header or
-                                   * ofp_multipart_request or
-                                   * ofp_multipart_reply). */
-    OFPBRC_BAD_EXP_TYPE     = 4;  /* Experimenter type not supported. */
-    OFPBRC_EPERM            = 5;  /* Permissions error. */
-    OFPBRC_BAD_LEN          = 6;  /* Wrong request length for type. */
-    OFPBRC_BUFFER_EMPTY     = 7;  /* Specified buffer has already been used. */
-    OFPBRC_BUFFER_UNKNOWN   = 8;  /* Specified buffer does not exist. */
-    OFPBRC_BAD_TABLE_ID     = 9;  /* Specified table-id invalid or does not
-                                   * exist. */
-    OFPBRC_IS_SLAVE         = 10; /* Denied because controller is slave. */
-    OFPBRC_BAD_PORT         = 11; /* Invalid port. */
-    OFPBRC_BAD_PACKET       = 12; /* Invalid packet in packet-out. */
-    OFPBRC_MULTIPART_BUFFER_OVERFLOW    = 13; /* ofp_multipart_request
-                                     overflowed the assigned buffer. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_BAD_ACTION.  'data' contains at least
- * the first 64 bytes of the failed request. */
-enum ofp_bad_action_code {
-    OFPBAC_BAD_TYPE           = 0;  /* Unknown or unsupported action type. */
-    OFPBAC_BAD_LEN            = 1;  /* Length problem in actions. */
-    OFPBAC_BAD_EXPERIMENTER   = 2;  /* Unknown experimenter id specified. */
-    OFPBAC_BAD_EXP_TYPE       = 3;  /* Unknown action for experimenter id. */
-    OFPBAC_BAD_OUT_PORT       = 4;  /* Problem validating output port. */
-    OFPBAC_BAD_ARGUMENT       = 5;  /* Bad action argument. */
-    OFPBAC_EPERM              = 6;  /* Permissions error. */
-    OFPBAC_TOO_MANY           = 7;  /* Can't handle this many actions. */
-    OFPBAC_BAD_QUEUE          = 8;  /* Problem validating output queue. */
-    OFPBAC_BAD_OUT_GROUP      = 9;  /* Invalid group id in forward action. */
-    OFPBAC_MATCH_INCONSISTENT = 10; /* Action can't apply for this match,
-                                       or Set-Field missing prerequisite. */
-    OFPBAC_UNSUPPORTED_ORDER  = 11; /* Action order is unsupported for the
-                                 action list in an Apply-Actions instruction */
-    OFPBAC_BAD_TAG            = 12; /* Actions uses an unsupported
-                                       tag/encap. */
-    OFPBAC_BAD_SET_TYPE       = 13; /* Unsupported type in SET_FIELD action. */
-    OFPBAC_BAD_SET_LEN        = 14; /* Length problem in SET_FIELD action. */
-    OFPBAC_BAD_SET_ARGUMENT   = 15; /* Bad argument in SET_FIELD action. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_BAD_INSTRUCTION.  'data' contains at
- * least the first 64 bytes of the failed request. */
-enum ofp_bad_instruction_code {
-    OFPBIC_UNKNOWN_INST     = 0; /* Unknown instruction. */
-    OFPBIC_UNSUP_INST       = 1; /* Switch or table does not support the
-                                    instruction. */
-    OFPBIC_BAD_TABLE_ID     = 2; /* Invalid Table-ID specified. */
-    OFPBIC_UNSUP_METADATA   = 3; /* Metadata value unsupported by datapath. */
-    OFPBIC_UNSUP_METADATA_MASK = 4; /* Metadata mask value unsupported by
-                                       datapath. */
-    OFPBIC_BAD_EXPERIMENTER = 5; /* Unknown experimenter id specified. */
-    OFPBIC_BAD_EXP_TYPE     = 6; /* Unknown instruction for experimenter id. */
-    OFPBIC_BAD_LEN          = 7; /* Length problem in instructions. */
-    OFPBIC_EPERM            = 8; /* Permissions error. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_BAD_MATCH.  'data' contains at least
- * the first 64 bytes of the failed request. */
-enum ofp_bad_match_code {
-    OFPBMC_BAD_TYPE         = 0;  /* Unsupported match type specified by the
-                                     match */
-    OFPBMC_BAD_LEN          = 1;  /* Length problem in match. */
-    OFPBMC_BAD_TAG          = 2;  /* Match uses an unsupported tag/encap. */
-    OFPBMC_BAD_DL_ADDR_MASK = 3;  /* Unsupported datalink addr mask - switch
-                                     does not support arbitrary datalink
-                                     address mask. */
-    OFPBMC_BAD_NW_ADDR_MASK = 4;  /* Unsupported network addr mask - switch
-                                     does not support arbitrary network
-                                     address mask. */
-    OFPBMC_BAD_WILDCARDS    = 5;  /* Unsupported combination of fields masked
-                                     or omitted in the match. */
-    OFPBMC_BAD_FIELD        = 6;  /* Unsupported field type in the match. */
-    OFPBMC_BAD_VALUE        = 7;  /* Unsupported value in a match field. */
-    OFPBMC_BAD_MASK         = 8;  /* Unsupported mask specified in the match,
-                                     field is not dl-address or nw-address. */
-    OFPBMC_BAD_PREREQ       = 9;  /* A prerequisite was not met. */
-    OFPBMC_DUP_FIELD        = 10; /* A field type was duplicated. */
-    OFPBMC_EPERM            = 11; /* Permissions error. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_FLOW_MOD_FAILED.  'data' contains
- * at least the first 64 bytes of the failed request. */
-enum ofp_flow_mod_failed_code {
-    OFPFMFC_UNKNOWN      = 0;   /* Unspecified error. */
-    OFPFMFC_TABLE_FULL   = 1;   /* Flow not added because table was full. */
-    OFPFMFC_BAD_TABLE_ID = 2;   /* Table does not exist */
-    OFPFMFC_OVERLAP      = 3;   /* Attempted to add overlapping flow with
-                                   CHECK_OVERLAP flag set. */
-    OFPFMFC_EPERM        = 4;   /* Permissions error. */
-    OFPFMFC_BAD_TIMEOUT  = 5;   /* Flow not added because of unsupported
-                                   idle/hard timeout. */
-    OFPFMFC_BAD_COMMAND  = 6;   /* Unsupported or unknown command. */
-    OFPFMFC_BAD_FLAGS    = 7;   /* Unsupported or unknown flags. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_GROUP_MOD_FAILED.  'data' contains
- * at least the first 64 bytes of the failed request. */
-enum ofp_group_mod_failed_code {
-    OFPGMFC_GROUP_EXISTS         = 0;  /* Group not added because a group ADD
-                                          attempted to replace an
-                                          already-present group. */
-    OFPGMFC_INVALID_GROUP        = 1;  /* Group not added because Group
-                                          specified is invalid. */
-    OFPGMFC_WEIGHT_UNSUPPORTED   = 2;  /* Switch does not support unequal load
-                                          sharing with select groups. */
-    OFPGMFC_OUT_OF_GROUPS        = 3;  /* The group table is full. */
-    OFPGMFC_OUT_OF_BUCKETS       = 4;  /* The maximum number of action buckets
-                                          for a group has been exceeded. */
-    OFPGMFC_CHAINING_UNSUPPORTED = 5;  /* Switch does not support groups that
-                                          forward to groups. */
-    OFPGMFC_WATCH_UNSUPPORTED    = 6;  /* This group cannot watch the
-                                          watch_port or watch_group specified.
-                                        */
-    OFPGMFC_LOOP                 = 7;  /* Group entry would cause a loop. */
-    OFPGMFC_UNKNOWN_GROUP        = 8;  /* Group not modified because a group
-                                          MODIFY attempted to modify a
-                                          non-existent group. */
-    OFPGMFC_CHAINED_GROUP        = 9;  /* Group not deleted because another
-                                          group is forwarding to it. */
-    OFPGMFC_BAD_TYPE             = 10; /* Unsupported or unknown group type. */
-    OFPGMFC_BAD_COMMAND          = 11; /* Unsupported or unknown command. */
-    OFPGMFC_BAD_BUCKET           = 12; /* Error in bucket. */
-    OFPGMFC_BAD_WATCH            = 13; /* Error in watch port/group. */
-    OFPGMFC_EPERM                = 14; /* Permissions error. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_PORT_MOD_FAILED.  'data' contains
- * at least the first 64 bytes of the failed request. */
-enum ofp_port_mod_failed_code {
-    OFPPMFC_BAD_PORT      = 0;   /* Specified port number does not exist. */
-    OFPPMFC_BAD_HW_ADDR   = 1;   /* Specified hardware address does not
-                                  * match the port number. */
-    OFPPMFC_BAD_CONFIG    = 2;   /* Specified config is invalid. */
-    OFPPMFC_BAD_ADVERTISE = 3;   /* Specified advertise is invalid. */
-    OFPPMFC_EPERM         = 4;   /* Permissions error. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_TABLE_MOD_FAILED.  'data' contains
- * at least the first 64 bytes of the failed request. */
-enum ofp_table_mod_failed_code {
-    OFPTMFC_BAD_TABLE  = 0;      /* Specified table does not exist. */
-    OFPTMFC_BAD_CONFIG = 1;      /* Specified config is invalid. */
-    OFPTMFC_EPERM      = 2;      /* Permissions error. */
-};
-
-/* ofp_error msg 'code' values for OFPET_QUEUE_OP_FAILED. 'data' contains
- * at least the first 64 bytes of the failed request */
-enum ofp_queue_op_failed_code {
-    OFPQOFC_BAD_PORT   = 0;     /* Invalid port (or port does not exist). */
-    OFPQOFC_BAD_QUEUE  = 1;     /* Queue does not exist. */
-    OFPQOFC_EPERM      = 2;     /* Permissions error. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_SWITCH_CONFIG_FAILED. 'data' contains
- * at least the first 64 bytes of the failed request. */
-enum ofp_switch_config_failed_code {
-    OFPSCFC_BAD_FLAGS  = 0;      /* Specified flags is invalid. */
-    OFPSCFC_BAD_LEN    = 1;      /* Specified len is invalid. */
-    OFPSCFC_EPERM      = 2;      /* Permissions error. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_ROLE_REQUEST_FAILED. 'data' contains
- * at least the first 64 bytes of the failed request. */
-enum ofp_role_request_failed_code {
-    OFPRRFC_STALE      = 0;      /* Stale Message: old generation_id. */
-    OFPRRFC_UNSUP      = 1;      /* Controller role change unsupported. */
-    OFPRRFC_BAD_ROLE   = 2;      /* Invalid role. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_METER_MOD_FAILED.  'data' contains
- * at least the first 64 bytes of the failed request. */
-enum ofp_meter_mod_failed_code {
-    OFPMMFC_UNKNOWN       = 0;  /* Unspecified error. */
-    OFPMMFC_METER_EXISTS  = 1;  /* Meter not added because a Meter ADD
-                                 * attempted to replace an existing Meter. */
-    OFPMMFC_INVALID_METER = 2;  /* Meter not added because Meter specified
-                                 * is invalid,
-                                 * or invalid meter in meter action. */
-    OFPMMFC_UNKNOWN_METER = 3;  /* Meter not modified because a Meter MODIFY
-                                 * attempted to modify a non-existent Meter,
-                                 * or bad meter in meter action. */
-    OFPMMFC_BAD_COMMAND   = 4;  /* Unsupported or unknown command. */
-    OFPMMFC_BAD_FLAGS     = 5;  /* Flag configuration unsupported. */
-    OFPMMFC_BAD_RATE      = 6;  /* Rate unsupported. */
-    OFPMMFC_BAD_BURST     = 7;  /* Burst size unsupported. */
-    OFPMMFC_BAD_BAND      = 8;  /* Band unsupported. */
-    OFPMMFC_BAD_BAND_VALUE = 9; /* Band value unsupported. */
-    OFPMMFC_OUT_OF_METERS = 10; /* No more meters available. */
-    OFPMMFC_OUT_OF_BANDS  = 11; /* The maximum number of properties
-                                 * for a meter has been exceeded. */
-};
-
-/* ofp_error_msg 'code' values for OFPET_TABLE_FEATURES_FAILED. 'data' contains
- * at least the first 64 bytes of the failed request. */
-enum ofp_table_features_failed_code {
-    OFPTFFC_BAD_TABLE    = 0;      /* Specified table does not exist. */
-    OFPTFFC_BAD_METADATA = 1;      /* Invalid metadata mask. */
-    OFPTFFC_BAD_TYPE     = 2;      /* Unknown property type. */
-    OFPTFFC_BAD_LEN      = 3;      /* Length problem in properties. */
-    OFPTFFC_BAD_ARGUMENT = 4;      /* Unsupported property value. */
-    OFPTFFC_EPERM        = 5;      /* Permissions error. */
-};
-
-/* OFPT_ERROR: Error message (datapath -> controller). */
-message ofp_error_msg {
-    //ofp_header header;
-    uint32 type = 1;
-    uint32 code = 2;
-    bytes data = 3;          /* Variable-length data.  Interpreted based
-                                 on the type and code.  No padding. */
-};
-
-/* OFPET_EXPERIMENTER: Error message (datapath -> controller). */
-message ofp_error_experimenter_msg {
-    //ofp_header header;
-
-    uint32 type = 1;           /* OFPET_EXPERIMENTER. */
-    uint32 exp_type = 2;       /* Experimenter defined. */
-    uint32 experimenter = 3;   /* Experimenter ID which takes the same form
-                                    as in struct ofp_experimenter_header. */
-    bytes data = 4;              /* Variable-length data.  Interpreted based
-                                    on the type and code.  No padding. */
-};
-
-enum ofp_multipart_type {
-    /* Description of this OpenFlow switch.
-     * The request body is empty.
-     * The reply body is struct ofp_desc. */
-    OFPMP_DESC = 0;
-
-    /* Individual flow statistics.
-     * The request body is struct ofp_flow_stats_request.
-     * The reply body is an array of struct ofp_flow_stats. */
-    OFPMP_FLOW = 1;
-
-    /* Aggregate flow statistics.
-     * The request body is struct ofp_aggregate_stats_request.
-     * The reply body is struct ofp_aggregate_stats_reply. */
-    OFPMP_AGGREGATE = 2;
-
-    /* Flow table statistics.
-     * The request body is empty.
-     * The reply body is an array of struct ofp_table_stats. */
-    OFPMP_TABLE = 3;
-
-    /* Port statistics.
-     * The request body is struct ofp_port_stats_request.
-     * The reply body is an array of struct ofp_port_stats. */
-    OFPMP_PORT_STATS = 4;
-
-    /* Queue statistics for a port
-     * The request body is struct ofp_queue_stats_request.
-     * The reply body is an array of struct ofp_queue_stats */
-    OFPMP_QUEUE = 5;
-
-    /* Group counter statistics.
-     * The request body is struct ofp_group_stats_request.
-     * The reply is an array of struct ofp_group_stats. */
-    OFPMP_GROUP = 6;
-
-    /* Group description.
-     * The request body is empty.
-     * The reply body is an array of struct ofp_group_desc. */
-    OFPMP_GROUP_DESC = 7;
-
-    /* Group features.
-     * The request body is empty.
-     * The reply body is struct ofp_group_features. */
-    OFPMP_GROUP_FEATURES = 8;
-
-    /* Meter statistics.
-     * The request body is struct ofp_meter_multipart_requests.
-     * The reply body is an array of struct ofp_meter_stats. */
-    OFPMP_METER = 9;
-
-    /* Meter configuration.
-     * The request body is struct ofp_meter_multipart_requests.
-     * The reply body is an array of struct ofp_meter_config. */
-    OFPMP_METER_CONFIG = 10;
-
-    /* Meter features.
-     * The request body is empty.
-     * The reply body is struct ofp_meter_features. */
-    OFPMP_METER_FEATURES = 11;
-
-    /* Table features.
-     * The request body is either empty or contains an array of
-     * struct ofp_table_features containing the controller's
-     * desired view of the switch. If the switch is unable to
-     * set the specified view an error is returned.
-     * The reply body is an array of struct ofp_table_features. */
-    OFPMP_TABLE_FEATURES = 12;
-
-    /* Port description.
-     * The request body is empty.
-     * The reply body is an array of struct ofp_port. */
-    OFPMP_PORT_DESC = 13;
-
-    /* Experimenter extension.
-     * The request and reply bodies begin with
-     * struct ofp_experimenter_multipart_header.
-     * The request and reply bodies are otherwise experimenter-defined. */
-    OFPMP_EXPERIMENTER = 0xffff;
-};
-
-/* Backward compatibility with 1.3.1 - avoid breaking the API. */
-//#define ofp_multipart_types ofp_multipart_type
-
-enum ofp_multipart_request_flags {
-    OFPMPF_REQ_INVALID = 0;
-    OFPMPF_REQ_MORE  = 1;  /* More requests to follow. */
-};
-
-message ofp_multipart_request {
-    //ofp_header header;
-    ofp_multipart_type type = 1; /* One of the OFPMP_* constants. */
-    uint32 flags = 2;            /* OFPMPF_REQ_* flags. */
-    bytes body = 3;              /* Body of the request. 0 or more bytes. */
-};
-
-enum ofp_multipart_reply_flags {
-    OFPMPF_REPLY_INVALID = 0;
-    OFPMPF_REPLY_MORE  = 1;  /* More replies to follow. */
-};
-
-message ofp_multipart_reply {
-    //ofp_header header;
-    ofp_multipart_type type = 1; /* One of the OFPMP_* constants. */
-    uint32 flags = 2;            /* OFPMPF_REPLY_* flags. */
-    bytes body = 3;              /* Body of the reply. 0 or more bytes. */
-};
-
-//#define DESC_STR_LEN   256
-//#define SERIAL_NUM_LEN 32
-/* Body of reply to OFPMP_DESC request.  Each entry is a NULL-terminated
- * ASCII string. */
-message ofp_desc {
-    string mfr_desc = 1;       /* Manufacturer description. */
-    string hw_desc = 2;        /* Hardware description. */
-    string sw_desc = 3;        /* Software description. */
-    string serial_num = 4;     /* Serial number. */
-    string dp_desc = 5;        /* Human readable description of datapath. */
-};
-
-/* Body for ofp_multipart_request of type OFPMP_FLOW. */
-message ofp_flow_stats_request {
-    uint32 table_id = 1;       /* ID of table to read (from ofp_table_stats),
-                                    OFPTT_ALL for all tables. */
-    uint32 out_port = 2;       /* Require matching entries to include this
-                                    as an output port.  A value of OFPP_ANY
-                                    indicates no restriction. */
-    uint32 out_group = 3;      /* Require matching entries to include this
-                                    as an output group.  A value of OFPG_ANY
-                                    indicates no restriction. */
-    uint64 cookie = 4;         /* Require matching entries to contain this
-                                    cookie value */
-    uint64 cookie_mask = 5;    /* Mask used to restrict the cookie bits that
-                                    must match. A value of 0 indicates
-                                    no restriction. */
-    ofp_match match = 6;         /* Fields to match. Variable size. */
-};
-
-/* Body of reply to OFPMP_FLOW request. */
-message ofp_flow_stats {
-    uint64 id = 14;            /* Unique ID of flow within device. */
-    uint32 table_id = 1;       /* ID of table flow came from. */
-    uint32 duration_sec = 2;   /* Time flow has been alive in seconds. */
-    uint32 duration_nsec = 3;  /* Time flow has been alive in nanoseconds
-                                  beyond duration_sec. */
-    uint32 priority = 4;       /* Priority of the entry. */
-    uint32 idle_timeout = 5;   /* Number of seconds idle before expiration. */
-    uint32 hard_timeout = 6;   /* Number of seconds before expiration. */
-    uint32 flags = 7;          /* Bitmap of OFPFF_* flags. */
-    uint64 cookie = 8;         /* Opaque controller-issued identifier. */
-    uint64 packet_count = 9;   /* Number of packets in flow. */
-    uint64 byte_count = 10;    /* Number of bytes in flow. */
-    ofp_match match = 12;      /* Description of fields. Variable size. */
-    repeated ofp_instruction instructions = 13; /* Instruction set
-                                                   (0 or more) */
-};
-
-/* Body for ofp_multipart_request of type OFPMP_AGGREGATE. */
-message ofp_aggregate_stats_request {
-    uint32 table_id = 1;      /* ID of table to read (from ofp_table_stats)
-                                 OFPTT_ALL for all tables. */
-    uint32 out_port = 2;      /* Require matching entries to include this
-                                 as an output port.  A value of OFPP_ANY
-                                 indicates no restriction. */
-    uint32 out_group = 3;     /* Require matching entries to include this
-                                 as an output group.  A value of OFPG_ANY
-                                 indicates no restriction. */
-    uint64 cookie = 4;        /* Require matching entries to contain this
-                                 cookie value */
-    uint64 cookie_mask = 5;   /* Mask used to restrict the cookie bits that
-                                 must match. A value of 0 indicates
-                                 no restriction. */
-    ofp_match match = 6;      /* Fields to match. Variable size. */
-};
-
-/* Body of reply to OFPMP_AGGREGATE request. */
-message ofp_aggregate_stats_reply {
-    uint64 packet_count = 1;   /* Number of packets in flows. */
-    uint64 byte_count = 2;     /* Number of bytes in flows. */
-    uint32 flow_count = 3;     /* Number of flows. */
-};
-
-/* Table Feature property types.
- * Low order bit cleared indicates a property for a regular Flow Entry.
- * Low order bit set indicates a property for the Table-Miss Flow Entry.
- */
-enum ofp_table_feature_prop_type {
-    OFPTFPT_INSTRUCTIONS           = 0;  /* Instructions property. */
-    OFPTFPT_INSTRUCTIONS_MISS      = 1;  /* Instructions for table-miss. */
-    OFPTFPT_NEXT_TABLES            = 2;  /* Next Table property. */
-    OFPTFPT_NEXT_TABLES_MISS       = 3;  /* Next Table for table-miss. */
-    OFPTFPT_WRITE_ACTIONS          = 4;  /* Write Actions property. */
-    OFPTFPT_WRITE_ACTIONS_MISS     = 5;  /* Write Actions for table-miss. */
-    OFPTFPT_APPLY_ACTIONS          = 6;  /* Apply Actions property. */
-    OFPTFPT_APPLY_ACTIONS_MISS     = 7;  /* Apply Actions for table-miss. */
-    OFPTFPT_MATCH                  = 8;  /* Match property. */
-    OFPTFPT_WILDCARDS              = 10; /* Wildcards property. */
-    OFPTFPT_WRITE_SETFIELD         = 12; /* Write Set-Field property. */
-    OFPTFPT_WRITE_SETFIELD_MISS    = 13; /* Write Set-Field for table-miss. */
-    OFPTFPT_APPLY_SETFIELD         = 14; /* Apply Set-Field property. */
-    OFPTFPT_APPLY_SETFIELD_MISS    = 15; /* Apply Set-Field for table-miss. */
-    OFPTFPT_EXPERIMENTER           = 0xFFFE; /* Experimenter property. */
-    OFPTFPT_EXPERIMENTER_MISS      = 0xFFFF; /* Experimenter for table-miss. */
-};
-
-/* Common header for all Table Feature Properties */
-message ofp_table_feature_property {
-    ofp_table_feature_prop_type type = 1;   /* One of OFPTFPT_*. */
-    oneof value {
-        ofp_table_feature_prop_instructions instructions = 2;
-        ofp_table_feature_prop_next_tables next_tables = 3;
-        ofp_table_feature_prop_actions actions = 4;
-        ofp_table_feature_prop_oxm oxm = 5;
-        ofp_table_feature_prop_experimenter experimenter = 6;
-    }
-};
-
-/* Instructions property */
-message ofp_table_feature_prop_instructions {
-    /* One of OFPTFPT_INSTRUCTIONS,
-       OFPTFPT_INSTRUCTIONS_MISS. */
-    repeated ofp_instruction instructions = 1;   /* List of instructions */
-};
-
-/* Next Tables property */
-message ofp_table_feature_prop_next_tables {
-    /* One of OFPTFPT_NEXT_TABLES,
-       OFPTFPT_NEXT_TABLES_MISS. */
-    repeated uint32 next_table_ids = 1;     /* List of table ids. */
-};
-
-/* Actions property */
-message ofp_table_feature_prop_actions {
-    /* One of OFPTFPT_WRITE_ACTIONS,
-       OFPTFPT_WRITE_ACTIONS_MISS,
-       OFPTFPT_APPLY_ACTIONS,
-       OFPTFPT_APPLY_ACTIONS_MISS. */
-    repeated ofp_action actions = 1; /* List of actions */
-};
-
-/* Match, Wildcard or Set-Field property */
-message ofp_table_feature_prop_oxm {
-    /* One of OFPTFPT_MATCH,
-       OFPTFPT_WILDCARDS,
-       OFPTFPT_WRITE_SETFIELD,
-       OFPTFPT_WRITE_SETFIELD_MISS,
-       OFPTFPT_APPLY_SETFIELD,
-       OFPTFPT_APPLY_SETFIELD_MISS. */
-    /* TODO is this a uint32??? */
-    repeated uint32 oxm_ids = 3;    /* Array of OXM headers */
-};
-
-/* Experimenter table feature property */
-message ofp_table_feature_prop_experimenter {
-    /* One of OFPTFPT_EXPERIMENTER,
-       OFPTFPT_EXPERIMENTER_MISS. */
-    uint32         experimenter = 2; /* Experimenter ID which takes the same
-                                        form as in struct
-                                        ofp_experimenter_header. */
-    uint32         exp_type = 3;      /* Experimenter defined. */
-    repeated uint32 experimenter_data = 4;
-};
-
-/* Body for ofp_multipart_request of type OFPMP_TABLE_FEATURES./
- * Body of reply to OFPMP_TABLE_FEATURES request. */
-message ofp_table_features {
-    uint32 table_id = 1;       /* Identifier of table.  Lower numbered tables
-                                are consulted first. */
-    string name = 2;
-    uint64 metadata_match = 3; /* Bits of metadata table can match. */
-    uint64 metadata_write = 4; /* Bits of metadata table can write. */
-    uint32 config = 5;         /* Bitmap of OFPTC_* values */
-    uint32 max_entries = 6;    /* Max number of entries supported. */
-
-    /* Table Feature Property list */
-    repeated ofp_table_feature_property properties = 7;
-};
-
-/* Body of reply to OFPMP_TABLE request. */
-message ofp_table_stats {
-    uint32 table_id = 1;      /* Identifier of table.  Lower numbered tables
-                                 are consulted first. */
-    uint32 active_count = 2;  /* Number of active entries. */
-    uint64 lookup_count = 3;  /* Number of packets looked up in table. */
-    uint64 matched_count = 4; /* Number of packets that hit table. */
-};
-
-/* Body for ofp_multipart_request of type OFPMP_PORT. */
-message ofp_port_stats_request {
-    uint32 port_no = 1;       /* OFPMP_PORT message must request statistics
-                               * either for a single port (specified in
-                               * port_no) or for all ports (if port_no ==
-                               * OFPP_ANY). */
-};
-
-/* Body of reply to OFPMP_PORT request. If a counter is unsupported, set
- * the field to all ones. */
-message ofp_port_stats {
-    uint32 port_no = 1;
-    uint64 rx_packets = 2;   /* Number of received packets. */
-    uint64 tx_packets = 3;   /* Number of transmitted packets. */
-    uint64 rx_bytes = 4;     /* Number of received bytes. */
-    uint64 tx_bytes = 5;     /* Number of transmitted bytes. */
-    uint64 rx_dropped = 6;   /* Number of packets dropped by RX. */
-    uint64 tx_dropped = 7;   /* Number of packets dropped by TX. */
-    uint64 rx_errors = 8;    /* Number of receive errors.  This is a super-set
-                                of more specific receive errors and should be
-                                greater than or equal to the sum of all
-                                rx_*_err values. */
-    uint64 tx_errors = 9;    /* Number of transmit errors.  This is a super-set
-                                of more specific transmit errors and should be
-                                greater than or equal to the sum of all
-                                tx_*_err values (none currently defined.) */
-    uint64 rx_frame_err = 10;  /* Number of frame alignment errors. */
-    uint64 rx_over_err = 11;   /* Number of packets with RX overrun. */
-    uint64 rx_crc_err = 12;    /* Number of CRC errors. */
-    uint64 collisions = 13;    /* Number of collisions. */
-    uint32 duration_sec = 14;  /* Time port has been alive in seconds. */
-    uint32 duration_nsec = 15; /* Time port has been alive in nanoseconds
-                                  beyond duration_sec. */
-};
-
-/* Body of OFPMP_GROUP request. */
-message ofp_group_stats_request {
-    uint32 group_id = 1;      /* All groups if OFPG_ALL. */
-};
-
-/* Used in group stats replies. */
-message ofp_bucket_counter {
-    uint64 packet_count = 1;  /* Number of packets processed by bucket. */
-    uint64 byte_count = 2;    /* Number of bytes processed by bucket. */
-};
-
-/* Body of reply to OFPMP_GROUP request. */
-message ofp_group_stats {
-    uint32 group_id = 1;      /* Group identifier. */
-    uint32 ref_count = 2;     /* Number of flows or groups that directly
-                                 forward to this group. */
-    uint64 packet_count = 3;  /* Number of packets processed by group. */
-    uint64 byte_count = 4;    /* Number of bytes processed by group. */
-    uint32 duration_sec = 5;  /* Time group has been alive in seconds. */
-    uint32 duration_nsec = 6; /* Time group has been alive in nanoseconds
-                                 beyond duration_sec. */
-    repeated ofp_bucket_counter bucket_stats = 7; /* One counter set per
-                                                     bucket. */
-};
-
-/* Body of reply to OFPMP_GROUP_DESC request. */
-message ofp_group_desc {
-    ofp_group_type type = 1;       /* One of OFPGT_*. */
-    uint32 group_id = 2;           /* Group identifier. */
-    repeated ofp_bucket buckets = 3;   /* List of buckets - 0 or more. */
-};
-
-message ofp_group_entry {
-    ofp_group_desc desc = 1 [(voltha.yang_inline_node).id = 'desc',
-                            (voltha.yang_inline_node).type = 'openflow_13-ofp_group_desc'];
-    ofp_group_stats stats = 2;
-};
-
-/* Backward compatibility with 1.3.1 - avoid breaking the API. */
-//#define ofp_group_desc_stats ofp_group_desc
-
-/* Group configuration flags */
-enum ofp_group_capabilities {
-    OFPGFC_INVALID         = 0;
-    OFPGFC_SELECT_WEIGHT   = 1;  /* Support weight for select groups */
-    OFPGFC_SELECT_LIVENESS = 2;  /* Support liveness for select groups */
-    OFPGFC_CHAINING        = 4;  /* Support chaining groups */
-    OFPGFC_CHAINING_CHECKS = 8;  /* Check chaining for loops and delete */
-};
-
-/* Body of reply to OFPMP_GROUP_FEATURES request. Group features. */
-message ofp_group_features {
-    uint32  types = 1;         /* Bitmap of (1 << OFPGT_*) values supported. */
-    uint32  capabilities = 2;  /* Bitmap of OFPGFC_* capability supported. */
-    repeated uint32 max_groups = 3; /* Maximum number of groups for each type.
-                                     */
-    repeated uint32 actions = 4;    /* Bitmaps of (1 << OFPAT_*) values
-                                       supported. */
-};
-
-/* Body of OFPMP_METER and OFPMP_METER_CONFIG requests. */
-message ofp_meter_multipart_request {
-    uint32 meter_id = 1;      /* Meter instance, or OFPM_ALL. */
-};
-
-/* Statistics for each meter band */
-message ofp_meter_band_stats {
-    uint64        packet_band_count = 1;  /* Number of packets in band. */
-    uint64        byte_band_count = 2;    /* Number of bytes in band. */
-};
-
-/* Body of reply to OFPMP_METER request. Meter statistics. */
-message ofp_meter_stats {
-    uint32        meter_id = 1;        /* Meter instance. */
-    uint32        flow_count = 2;      /* Number of flows bound to meter. */
-    uint64        packet_in_count = 3; /* Number of packets in input. */
-    uint64        byte_in_count = 4;   /* Number of bytes in input. */
-    uint32        duration_sec = 5; /* Time meter has been alive in seconds. */
-    uint32        duration_nsec = 6;/* Time meter has been alive in nanoseconds
-                                       beyond duration_sec. */
-    repeated ofp_meter_band_stats band_stats = 7; /* The band_stats length is
-                                         inferred from the length field. */
-};
-
-/* Body of reply to OFPMP_METER_CONFIG request. Meter configuration. */
-message ofp_meter_config {
-    uint32        flags = 1;           /* All OFPMF_* that apply. */
-    uint32        meter_id = 2;        /* Meter instance. */
-    repeated ofp_meter_band_header bands = 3; /* The bands length is
-                                             inferred from the length field. */
-};
-
-/* Body of reply to OFPMP_METER_FEATURES request. Meter features. */
-message ofp_meter_features {
-    uint32    max_meter = 1;    /* Maximum number of meters. */
-    uint32    band_types = 2;   /* Bitmaps of (1 << OFPMBT_*) values supported.
-                                 */
-    uint32    capabilities = 3; /* Bitmaps of "ofp_meter_flags". */
-    uint32    max_bands = 4;    /* Maximum bands per meters */
-    uint32    max_color = 5;    /* Maximum color value */
-};
-
-/* Body for ofp_multipart_request/reply of type OFPMP_EXPERIMENTER. */
-message ofp_experimenter_multipart_header {
-    uint32 experimenter = 1;   /* Experimenter ID which takes the same form
-                                  as in struct ofp_experimenter_header. */
-    uint32 exp_type = 2;       /* Experimenter defined. */
-    bytes data = 3; /* Experimenter-defined arbitrary additional data. */
-};
-
-/* Experimenter extension. */
-message ofp_experimenter_header {
-    //ofp_header header;  /* Type OFPT_EXPERIMENTER. */
-    uint32 experimenter = 1;     /* Experimenter ID:
-                                 * - MSB 0: low-order bytes are IEEE OUI.
-                                 * - MSB != 0: defined by ONF. */
-    uint32 exp_type = 2;         /* Experimenter defined. */
-    bytes data = 3; /* Experimenter-defined arbitrary additional data. */
-};
-
-/* All ones is used to indicate all queues in a port (for stats retrieval). */
-//#define OFPQ_ALL      0xffffffff
-
-/* Min rate > 1000 means not configured. */
-//#define OFPQ_MIN_RATE_UNCFG      0xffff
-
-/* Max rate > 1000 means not configured. */
-//#define OFPQ_MAX_RATE_UNCFG      0xffff
-
-enum ofp_queue_properties {
-    OFPQT_INVALID       = 0;
-    OFPQT_MIN_RATE      = 1;      /* Minimum datarate guaranteed. */
-    OFPQT_MAX_RATE      = 2;      /* Maximum datarate. */
-    OFPQT_EXPERIMENTER  = 0xffff; /* Experimenter defined property. */
-};
-
-/* Common description for a queue. */
-message ofp_queue_prop_header {
-    uint32 property = 1;   /* One of OFPQT_. */
-    uint32 len = 2;        /* Length of property, including this header. */
-};
-
-/* Min-Rate queue property description. */
-message ofp_queue_prop_min_rate {
-    ofp_queue_prop_header prop_header = 1;/* prop: OFPQT_MIN, len: 16. */
-    uint32 rate = 2;       /* In 1/10 of a percent = 0;>1000 -> disabled. */
-};
-
-/* Max-Rate queue property description. */
-message ofp_queue_prop_max_rate {
-    ofp_queue_prop_header prop_header = 1;/* prop: OFPQT_MAX, len: 16. */
-    uint32 rate = 2;       /* In 1/10 of a percent = 0;>1000 -> disabled. */
-};
-
-/* Experimenter queue property description. */
-message ofp_queue_prop_experimenter {
-    ofp_queue_prop_header prop_header = 1;/* prop: OFPQT_EXPERIMENTER */
-    uint32 experimenter = 2;         /* Experimenter ID which takes the same
-                                          form as in struct
-                                          ofp_experimenter_header. */
-    bytes data = 3;                    /* Experimenter defined data. */
-};
-
-/* Full description for a queue. */
-message ofp_packet_queue {
-    uint32 queue_id = 1;    /* id for the specific queue. */
-    uint32 port = 2;        /* Port this queue is attached to. */
-    repeated ofp_queue_prop_header properties = 4; /* List of properties. */
-};
-
-/* Query for port queue configuration. */
-message ofp_queue_get_config_request {
-    //ofp_header header;
-    uint32 port = 1;        /* Port to be queried. Should refer
-                              to a valid physical port (i.e. <= OFPP_MAX),
-                              or OFPP_ANY to request all configured
-                              queues.*/
-};
-
-/* Queue configuration for a given port. */
-message ofp_queue_get_config_reply {
-    //ofp_header header;
-    uint32 port = 1;
-    repeated ofp_packet_queue queues = 2; /* List of configured queues. */
-};
-
-/* OFPAT_SET_QUEUE action struct: send packets to given queue on port. */
-message ofp_action_set_queue {
-    uint32 type = 1;           /* OFPAT_SET_QUEUE. */
-    uint32 queue_id = 3;       /* Queue id for the packets. */
-};
-
-message ofp_queue_stats_request {
-    uint32 port_no = 1;       /* All ports if OFPP_ANY. */
-    uint32 queue_id = 2;      /* All queues if OFPQ_ALL. */
-};
-
-message ofp_queue_stats {
-    uint32 port_no = 1;
-    uint32 queue_id = 2;      /* Queue i.d */
-    uint64 tx_bytes = 3;      /* Number of transmitted bytes. */
-    uint64 tx_packets = 4;    /* Number of transmitted packets. */
-    uint64 tx_errors = 5;     /* Number of packets dropped due to overrun. */
-    uint32 duration_sec = 6;  /* Time queue has been alive in seconds. */
-    uint32 duration_nsec = 7; /* Time queue has been alive in nanoseconds
-                                 beyond duration_sec. */
-};
-
-/* Configures the "role" of the sending controller.  The default role is:
- *
- *    - Equal (OFPCR_ROLE_EQUAL), which allows the controller access to all
- *      OpenFlow features. All controllers have equal responsibility.
- *
- * The other possible roles are a related pair:
- *
- *    - Master (OFPCR_ROLE_MASTER) is equivalent to Equal, except that there
- *      may be at most one Master controller at a time: when a controller
- *      configures itself as Master, any existing Master is demoted to the
- *      Slave role.
- *
- *    - Slave (OFPCR_ROLE_SLAVE) allows the controller read-only access to
- *      OpenFlow features.  In particular attempts to modify the flow table
- *      will be rejected with an OFPBRC_EPERM error.
- *
- *      Slave controllers do not receive OFPT_PACKET_IN or OFPT_FLOW_REMOVED
- *      messages, but they do receive OFPT_PORT_STATUS messages.
- */
-
-/* Controller roles. */
-enum ofp_controller_role {
-    OFPCR_ROLE_NOCHANGE = 0;    /* Don't change current role. */
-    OFPCR_ROLE_EQUAL    = 1;    /* Default role, full access. */
-    OFPCR_ROLE_MASTER   = 2;    /* Full access, at most one master. */
-    OFPCR_ROLE_SLAVE    = 3;    /* Read-only access. */
-};
-
-/* Role request and reply message. */
-message ofp_role_request {
-    //ofp_header header;        /* Type OFPT_ROLE_REQUEST/OFPT_ROLE_REPLY. */
-    ofp_controller_role role = 1; /* One of OFPCR_ROLE_*. */
-    uint64 generation_id = 2;     /* Master Election Generation Id */
-};
-
-/* Asynchronous message configuration. */
-message ofp_async_config {
-    //ofp_header header;    /* OFPT_GET_ASYNC_REPLY or OFPT_SET_ASYNC. */
-    repeated uint32 packet_in_mask = 1;   /* Bitmasks of OFPR_* values. */
-    repeated uint32 port_status_mask = 2; /* Bitmasks of OFPPR_* values. */
-    repeated uint32 flow_removed_mask = 3;/* Bitmasks of OFPRR_* values. */
-};
-
-
-/* ADDITIONAL VOLTHA SPECIFIC MESSAGE TYPES, AIDING RPC CALLS */
-
-message MeterModUpdate {
-    string id = 1;      // Device.id or LogicalDevice.id
-    ofp_meter_mod meter_mod = 2;
-}
-
-message MeterStatsReply {
-    repeated ofp_meter_stats meter_stats = 1;
-}
-
-message FlowTableUpdate {
-    string id = 1;  // Device.id or LogicalDevice.id
-    ofp_flow_mod flow_mod = 2;
-}
-
-message FlowGroupTableUpdate {
-    string id = 1;  // Device.id or LogicalDevice.id
-    ofp_group_mod group_mod = 2;
-}
-
-message Flows {
-    repeated ofp_flow_stats items = 1;
-}
-
-message Meters {
-    repeated ofp_meter_config items = 1;
-}
-
-message FlowGroups {
-    repeated ofp_group_entry items = 1;
-}
-
-message FlowChanges {
-    Flows to_add = 1;
-    Flows to_remove = 2;
-}
-
-message FlowGroupChanges {
-    FlowGroups to_add = 1;
-    FlowGroups to_remove = 2;
-}
-
-message PacketIn {
-    string id = 1;  // LogicalDevice.id
-    ofp_packet_in packet_in = 2;
-}
-
-message PacketOut {
-    string id = 1;  // LogicalDevice.id
-    ofp_packet_out packet_out = 2;
-}
-
-message ChangeEvent {
-    string id = 1; // LogicalDevice.id
-    oneof event {
-        ofp_port_status port_status = 2;
-    }
-}
diff --git a/go/schema/schema.pb.go b/go/schema/schema.pb.go
new file mode 100644
index 0000000..82707d4
--- /dev/null
+++ b/go/schema/schema.pb.go
@@ -0,0 +1,244 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/schema.proto
+
+package schema // import "github.com/opencord/voltha-protos/go/schema"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import empty "github.com/golang/protobuf/ptypes/empty"
+import _ "google.golang.org/genproto/googleapis/api/annotations"
+
+import (
+	context "golang.org/x/net/context"
+	grpc "google.golang.org/grpc"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+// Contains the name and content of a *.proto file
+type ProtoFile struct {
+	FileName             string   `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
+	Proto                string   `protobuf:"bytes,2,opt,name=proto,proto3" json:"proto,omitempty"`
+	Descriptor_          []byte   `protobuf:"bytes,3,opt,name=descriptor,proto3" json:"descriptor,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *ProtoFile) Reset()         { *m = ProtoFile{} }
+func (m *ProtoFile) String() string { return proto.CompactTextString(m) }
+func (*ProtoFile) ProtoMessage()    {}
+func (*ProtoFile) Descriptor() ([]byte, []int) {
+	return fileDescriptor_schema_70c0f2adee8a5771, []int{0}
+}
+func (m *ProtoFile) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_ProtoFile.Unmarshal(m, b)
+}
+func (m *ProtoFile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_ProtoFile.Marshal(b, m, deterministic)
+}
+func (dst *ProtoFile) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ProtoFile.Merge(dst, src)
+}
+func (m *ProtoFile) XXX_Size() int {
+	return xxx_messageInfo_ProtoFile.Size(m)
+}
+func (m *ProtoFile) XXX_DiscardUnknown() {
+	xxx_messageInfo_ProtoFile.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ProtoFile proto.InternalMessageInfo
+
+func (m *ProtoFile) GetFileName() string {
+	if m != nil {
+		return m.FileName
+	}
+	return ""
+}
+
+func (m *ProtoFile) GetProto() string {
+	if m != nil {
+		return m.Proto
+	}
+	return ""
+}
+
+func (m *ProtoFile) GetDescriptor_() []byte {
+	if m != nil {
+		return m.Descriptor_
+	}
+	return nil
+}
+
+// Proto files and compiled descriptors for this interface
+type Schemas struct {
+	// Proto files
+	Protos []*ProtoFile `protobuf:"bytes,1,rep,name=protos,proto3" json:"protos,omitempty"`
+	// Proto file name from which swagger.json shall be generated
+	SwaggerFrom string `protobuf:"bytes,2,opt,name=swagger_from,json=swaggerFrom,proto3" json:"swagger_from,omitempty"`
+	// Proto file name from which yang schemas shall be generated
+	YangFrom             string   `protobuf:"bytes,3,opt,name=yang_from,json=yangFrom,proto3" json:"yang_from,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Schemas) Reset()         { *m = Schemas{} }
+func (m *Schemas) String() string { return proto.CompactTextString(m) }
+func (*Schemas) ProtoMessage()    {}
+func (*Schemas) Descriptor() ([]byte, []int) {
+	return fileDescriptor_schema_70c0f2adee8a5771, []int{1}
+}
+func (m *Schemas) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Schemas.Unmarshal(m, b)
+}
+func (m *Schemas) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Schemas.Marshal(b, m, deterministic)
+}
+func (dst *Schemas) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Schemas.Merge(dst, src)
+}
+func (m *Schemas) XXX_Size() int {
+	return xxx_messageInfo_Schemas.Size(m)
+}
+func (m *Schemas) XXX_DiscardUnknown() {
+	xxx_messageInfo_Schemas.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Schemas proto.InternalMessageInfo
+
+func (m *Schemas) GetProtos() []*ProtoFile {
+	if m != nil {
+		return m.Protos
+	}
+	return nil
+}
+
+func (m *Schemas) GetSwaggerFrom() string {
+	if m != nil {
+		return m.SwaggerFrom
+	}
+	return ""
+}
+
+func (m *Schemas) GetYangFrom() string {
+	if m != nil {
+		return m.YangFrom
+	}
+	return ""
+}
+
+func init() {
+	proto.RegisterType((*ProtoFile)(nil), "schema.ProtoFile")
+	proto.RegisterType((*Schemas)(nil), "schema.Schemas")
+}
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ context.Context
+var _ grpc.ClientConn
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+const _ = grpc.SupportPackageIsVersion4
+
+// SchemaServiceClient is the client API for SchemaService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type SchemaServiceClient interface {
+	// Return active grpc schemas
+	GetSchema(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Schemas, error)
+}
+
+type schemaServiceClient struct {
+	cc *grpc.ClientConn
+}
+
+func NewSchemaServiceClient(cc *grpc.ClientConn) SchemaServiceClient {
+	return &schemaServiceClient{cc}
+}
+
+func (c *schemaServiceClient) GetSchema(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Schemas, error) {
+	out := new(Schemas)
+	err := c.cc.Invoke(ctx, "/schema.SchemaService/GetSchema", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// SchemaServiceServer is the server API for SchemaService service.
+type SchemaServiceServer interface {
+	// Return active grpc schemas
+	GetSchema(context.Context, *empty.Empty) (*Schemas, error)
+}
+
+func RegisterSchemaServiceServer(s *grpc.Server, srv SchemaServiceServer) {
+	s.RegisterService(&_SchemaService_serviceDesc, srv)
+}
+
+func _SchemaService_GetSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(empty.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(SchemaServiceServer).GetSchema(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/schema.SchemaService/GetSchema",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(SchemaServiceServer).GetSchema(ctx, req.(*empty.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+var _SchemaService_serviceDesc = grpc.ServiceDesc{
+	ServiceName: "schema.SchemaService",
+	HandlerType: (*SchemaServiceServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "GetSchema",
+			Handler:    _SchemaService_GetSchema_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "voltha_protos/schema.proto",
+}
+
+func init() { proto.RegisterFile("voltha_protos/schema.proto", fileDescriptor_schema_70c0f2adee8a5771) }
+
+var fileDescriptor_schema_70c0f2adee8a5771 = []byte{
+	// 316 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x51, 0xc1, 0x4a, 0xeb, 0x40,
+	0x14, 0x25, 0x2d, 0xaf, 0x7d, 0x99, 0x56, 0x8a, 0x83, 0x48, 0x48, 0x45, 0x6a, 0x57, 0x15, 0x69,
+	0x02, 0xf5, 0x0f, 0x84, 0xd6, 0x9d, 0x48, 0x0b, 0x2e, 0x5c, 0x58, 0xa6, 0xe9, 0xed, 0x64, 0x20,
+	0x93, 0x1b, 0x26, 0xd3, 0x4a, 0xb7, 0xfe, 0x82, 0x9f, 0xe6, 0x2f, 0xf8, 0x21, 0x32, 0xb9, 0x53,
+	0x71, 0x37, 0xe7, 0x9c, 0x3b, 0xdc, 0x73, 0xce, 0x65, 0xf1, 0x01, 0x0b, 0x9b, 0x8b, 0x75, 0x65,
+	0xd0, 0x62, 0x9d, 0xd6, 0x59, 0x0e, 0x5a, 0x24, 0x0d, 0xe2, 0x1d, 0x42, 0xf1, 0x95, 0x44, 0x94,
+	0x05, 0xa4, 0xa2, 0x52, 0xa9, 0x28, 0x4b, 0xb4, 0xc2, 0x2a, 0x2c, 0x6b, 0x9a, 0x8a, 0x87, 0x5e,
+	0x6d, 0xd0, 0x66, 0xbf, 0x4b, 0x41, 0x57, 0xf6, 0x48, 0xe2, 0xf8, 0x8d, 0x85, 0xcf, 0xee, 0xb1,
+	0x50, 0x05, 0xf0, 0x21, 0x0b, 0x77, 0xaa, 0x80, 0x75, 0x29, 0x34, 0x44, 0xc1, 0x28, 0x98, 0x84,
+	0xcb, 0xff, 0x8e, 0x78, 0x12, 0x1a, 0xf8, 0x05, 0xfb, 0xd7, 0x7c, 0x89, 0x5a, 0x8d, 0x40, 0x80,
+	0x5f, 0x33, 0xb6, 0x85, 0x3a, 0x33, 0xaa, 0xb2, 0x68, 0xa2, 0xf6, 0x28, 0x98, 0xf4, 0x97, 0x7f,
+	0x98, 0xb1, 0x65, 0xdd, 0x55, 0x63, 0xb2, 0xe6, 0xb7, 0xac, 0x43, 0x21, 0xa2, 0x60, 0xd4, 0x9e,
+	0xf4, 0x66, 0xe7, 0x89, 0x0f, 0xf3, 0x6b, 0x60, 0xe9, 0x07, 0xf8, 0x0d, 0xeb, 0xd7, 0xef, 0x42,
+	0x4a, 0x30, 0xeb, 0x9d, 0x41, 0xed, 0x57, 0xf6, 0x3c, 0xb7, 0x30, 0xa8, 0x9d, 0xd7, 0xa3, 0x28,
+	0x25, 0xe9, 0x6d, 0xf2, 0xea, 0x08, 0x27, 0xce, 0x5e, 0xd8, 0x19, 0x6d, 0x5d, 0x81, 0x39, 0xa8,
+	0x0c, 0xf8, 0x9c, 0x85, 0x8f, 0x60, 0x89, 0xe3, 0x97, 0x09, 0x35, 0x92, 0x9c, 0x1a, 0x49, 0xe6,
+	0xae, 0x91, 0x78, 0x70, 0x32, 0xe4, 0x1d, 0x8f, 0x07, 0x1f, 0x5f, 0xdf, 0x9f, 0xad, 0x90, 0x77,
+	0x7d, 0xed, 0x0f, 0xd3, 0xd7, 0x3b, 0xa9, 0x6c, 0xbe, 0xdf, 0x24, 0x19, 0xea, 0x14, 0x2b, 0x28,
+	0x33, 0x34, 0xdb, 0x94, 0x4e, 0x34, 0xf5, 0x27, 0x92, 0xe8, 0xc7, 0x37, 0x14, 0xe7, 0xfe, 0x27,
+	0x00, 0x00, 0xff, 0xff, 0xdc, 0x3c, 0x6a, 0x7d, 0xc4, 0x01, 0x00, 0x00,
+}
diff --git a/go/schema/schema.proto b/go/schema/schema.proto
deleted file mode 100644
index 2edd85a..0000000
--- a/go/schema/schema.proto
+++ /dev/null
@@ -1,40 +0,0 @@
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/schema";
-
-package schema;
-
-import "google/api/annotations.proto";
-import "google/protobuf/empty.proto";
-
-// Contains the name and content of a *.proto file
-message ProtoFile {
-    string file_name = 1;  // name of proto file
-    string proto = 2;  // content of proto file
-    bytes descriptor = 3;  // compiled descriptor for proto (zlib compressed)
-}
-
-// Proto files and compiled descriptors for this interface
-message Schemas {
-
-    // Proto files
-    repeated ProtoFile protos = 1;
-
-    // Proto file name from which swagger.json shall be generated
-    string swagger_from = 2;
-
-    // Proto file name from which yang schemas shall be generated
-    string yang_from = 3;
-}
-
-// Schema services
-service SchemaService {
-
-    // Return active grpc schemas
-    rpc GetSchema(google.protobuf.Empty) returns (Schemas) {
-        option (google.api.http) = {
-            get: "/schema"
-        };
-    }
-
-}
diff --git a/go/voltha/adapter.pb.go b/go/voltha/adapter.pb.go
new file mode 100644
index 0000000..680fc4b
--- /dev/null
+++ b/go/voltha/adapter.pb.go
@@ -0,0 +1,228 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/adapter.proto
+
+package voltha // import "github.com/opencord/voltha-protos/go/voltha"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import any "github.com/golang/protobuf/ptypes/any"
+import common "github.com/opencord/voltha-protos/go/common"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type AdapterConfig struct {
+	// Common adapter config attributes here
+	LogLevel common.LogLevel_LogLevel `protobuf:"varint,1,opt,name=log_level,json=logLevel,proto3,enum=voltha.LogLevel_LogLevel" json:"log_level,omitempty"`
+	// Custom (vendor-specific) configuration attributes
+	AdditionalConfig     *any.Any `protobuf:"bytes,64,opt,name=additional_config,json=additionalConfig,proto3" json:"additional_config,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *AdapterConfig) Reset()         { *m = AdapterConfig{} }
+func (m *AdapterConfig) String() string { return proto.CompactTextString(m) }
+func (*AdapterConfig) ProtoMessage()    {}
+func (*AdapterConfig) Descriptor() ([]byte, []int) {
+	return fileDescriptor_adapter_afe3683afb102200, []int{0}
+}
+func (m *AdapterConfig) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AdapterConfig.Unmarshal(m, b)
+}
+func (m *AdapterConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AdapterConfig.Marshal(b, m, deterministic)
+}
+func (dst *AdapterConfig) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AdapterConfig.Merge(dst, src)
+}
+func (m *AdapterConfig) XXX_Size() int {
+	return xxx_messageInfo_AdapterConfig.Size(m)
+}
+func (m *AdapterConfig) XXX_DiscardUnknown() {
+	xxx_messageInfo_AdapterConfig.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AdapterConfig proto.InternalMessageInfo
+
+func (m *AdapterConfig) GetLogLevel() common.LogLevel_LogLevel {
+	if m != nil {
+		return m.LogLevel
+	}
+	return common.LogLevel_DEBUG
+}
+
+func (m *AdapterConfig) GetAdditionalConfig() *any.Any {
+	if m != nil {
+		return m.AdditionalConfig
+	}
+	return nil
+}
+
+// Adapter (software plugin)
+type Adapter struct {
+	// Unique name of adapter, matching the python package name under
+	// voltha/adapters.
+	Id      string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	Vendor  string `protobuf:"bytes,2,opt,name=vendor,proto3" json:"vendor,omitempty"`
+	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+	// Adapter configuration
+	Config *AdapterConfig `protobuf:"bytes,16,opt,name=config,proto3" json:"config,omitempty"`
+	// Custom descriptors and custom configuration
+	AdditionalDescription *any.Any `protobuf:"bytes,64,opt,name=additional_description,json=additionalDescription,proto3" json:"additional_description,omitempty"`
+	LogicalDeviceIds      []string `protobuf:"bytes,4,rep,name=logical_device_ids,json=logicalDeviceIds,proto3" json:"logical_device_ids,omitempty"`
+	XXX_NoUnkeyedLiteral  struct{} `json:"-"`
+	XXX_unrecognized      []byte   `json:"-"`
+	XXX_sizecache         int32    `json:"-"`
+}
+
+func (m *Adapter) Reset()         { *m = Adapter{} }
+func (m *Adapter) String() string { return proto.CompactTextString(m) }
+func (*Adapter) ProtoMessage()    {}
+func (*Adapter) Descriptor() ([]byte, []int) {
+	return fileDescriptor_adapter_afe3683afb102200, []int{1}
+}
+func (m *Adapter) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Adapter.Unmarshal(m, b)
+}
+func (m *Adapter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Adapter.Marshal(b, m, deterministic)
+}
+func (dst *Adapter) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Adapter.Merge(dst, src)
+}
+func (m *Adapter) XXX_Size() int {
+	return xxx_messageInfo_Adapter.Size(m)
+}
+func (m *Adapter) XXX_DiscardUnknown() {
+	xxx_messageInfo_Adapter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Adapter proto.InternalMessageInfo
+
+func (m *Adapter) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *Adapter) GetVendor() string {
+	if m != nil {
+		return m.Vendor
+	}
+	return ""
+}
+
+func (m *Adapter) GetVersion() string {
+	if m != nil {
+		return m.Version
+	}
+	return ""
+}
+
+func (m *Adapter) GetConfig() *AdapterConfig {
+	if m != nil {
+		return m.Config
+	}
+	return nil
+}
+
+func (m *Adapter) GetAdditionalDescription() *any.Any {
+	if m != nil {
+		return m.AdditionalDescription
+	}
+	return nil
+}
+
+func (m *Adapter) GetLogicalDeviceIds() []string {
+	if m != nil {
+		return m.LogicalDeviceIds
+	}
+	return nil
+}
+
+type Adapters struct {
+	Items                []*Adapter `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
+	XXX_unrecognized     []byte     `json:"-"`
+	XXX_sizecache        int32      `json:"-"`
+}
+
+func (m *Adapters) Reset()         { *m = Adapters{} }
+func (m *Adapters) String() string { return proto.CompactTextString(m) }
+func (*Adapters) ProtoMessage()    {}
+func (*Adapters) Descriptor() ([]byte, []int) {
+	return fileDescriptor_adapter_afe3683afb102200, []int{2}
+}
+func (m *Adapters) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Adapters.Unmarshal(m, b)
+}
+func (m *Adapters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Adapters.Marshal(b, m, deterministic)
+}
+func (dst *Adapters) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Adapters.Merge(dst, src)
+}
+func (m *Adapters) XXX_Size() int {
+	return xxx_messageInfo_Adapters.Size(m)
+}
+func (m *Adapters) XXX_DiscardUnknown() {
+	xxx_messageInfo_Adapters.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Adapters proto.InternalMessageInfo
+
+func (m *Adapters) GetItems() []*Adapter {
+	if m != nil {
+		return m.Items
+	}
+	return nil
+}
+
+func init() {
+	proto.RegisterType((*AdapterConfig)(nil), "voltha.AdapterConfig")
+	proto.RegisterType((*Adapter)(nil), "voltha.Adapter")
+	proto.RegisterType((*Adapters)(nil), "voltha.Adapters")
+}
+
+func init() {
+	proto.RegisterFile("voltha_protos/adapter.proto", fileDescriptor_adapter_afe3683afb102200)
+}
+
+var fileDescriptor_adapter_afe3683afb102200 = []byte{
+	// 378 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xc1, 0x6a, 0xe2, 0x40,
+	0x1c, 0xc6, 0x49, 0x5c, 0xa3, 0x8e, 0xec, 0xae, 0x3b, 0xac, 0x4b, 0x74, 0x91, 0x0d, 0xc2, 0x42,
+	0x60, 0xd7, 0x84, 0x5a, 0xe8, 0xb9, 0x5a, 0x2f, 0x05, 0x4f, 0x39, 0xf6, 0x12, 0x62, 0x66, 0x1c,
+	0x07, 0x26, 0xf3, 0x0f, 0x49, 0x0c, 0xf8, 0x0a, 0xbd, 0xf5, 0xc1, 0xfa, 0x1e, 0x7d, 0x82, 0x9e,
+	0x8b, 0x33, 0x93, 0xaa, 0x3d, 0xf4, 0x36, 0xf3, 0xfd, 0xfe, 0xdf, 0x7c, 0xdf, 0x3f, 0x04, 0xfd,
+	0xae, 0x41, 0x54, 0xbb, 0x24, 0xce, 0x0b, 0xa8, 0xa0, 0x0c, 0x13, 0x92, 0xe4, 0x15, 0x2d, 0x02,
+	0x75, 0xc5, 0x8e, 0x86, 0xe3, 0x11, 0x03, 0x60, 0x82, 0x86, 0x4a, 0xdd, 0xec, 0xb7, 0x61, 0x22,
+	0x0f, 0x7a, 0x64, 0x3c, 0xbe, 0xf4, 0xa7, 0x90, 0x65, 0x20, 0x0d, 0x73, 0x2f, 0x59, 0x46, 0xab,
+	0x44, 0x93, 0xe9, 0xa3, 0x85, 0xbe, 0x2e, 0x74, 0xd4, 0x1d, 0xc8, 0x2d, 0x67, 0xf8, 0x06, 0xf5,
+	0x04, 0xb0, 0x58, 0xd0, 0x9a, 0x0a, 0xd7, 0xf2, 0x2c, 0xff, 0xdb, 0x7c, 0x14, 0x68, 0x7f, 0xb0,
+	0x06, 0xb6, 0x3e, 0xea, 0xef, 0x87, 0xa8, 0x2b, 0xcc, 0x09, 0x2f, 0xd0, 0x8f, 0x84, 0x10, 0x5e,
+	0x71, 0x90, 0x89, 0x88, 0x53, 0xf5, 0x98, 0x7b, 0xeb, 0x59, 0x7e, 0x7f, 0xfe, 0x33, 0xd0, 0xb5,
+	0x83, 0xa6, 0x76, 0xb0, 0x90, 0x87, 0x68, 0x70, 0x1a, 0xd7, 0xd1, 0xd3, 0x27, 0x1b, 0x75, 0x4c,
+	0x19, 0x3c, 0x44, 0x36, 0x27, 0x2a, 0xbf, 0xb7, 0x6c, 0xbf, 0xbc, 0x3e, 0x4f, 0xac, 0xc8, 0xe6,
+	0x04, 0x4f, 0x90, 0x53, 0x53, 0x49, 0xa0, 0x70, 0xed, 0x73, 0x64, 0x44, 0xfc, 0x07, 0x75, 0x6a,
+	0x5a, 0x94, 0x1c, 0xa4, 0xdb, 0x3a, 0xe7, 0x8d, 0x8a, 0x67, 0xc8, 0x31, 0xd5, 0x06, 0xaa, 0xda,
+	0xb0, 0x59, 0xed, 0xe2, 0x23, 0x44, 0x66, 0x08, 0x47, 0xe8, 0xd7, 0xd9, 0x52, 0x84, 0x96, 0x69,
+	0xc1, 0xf3, 0xe3, 0xed, 0xb3, 0xcd, 0x9a, 0xd0, 0xe1, 0xc9, 0xba, 0x3a, 0x39, 0xf1, 0x7f, 0x84,
+	0x05, 0x30, 0x9e, 0xaa, 0x07, 0x6b, 0x9e, 0xd2, 0x98, 0x93, 0xd2, 0xfd, 0xe2, 0xb5, 0xfc, 0x5e,
+	0x34, 0x30, 0x64, 0xa5, 0xc0, 0x3d, 0x29, 0xa7, 0x57, 0xa8, 0x6b, 0xaa, 0x95, 0xf8, 0x2f, 0x6a,
+	0xf3, 0x8a, 0x66, 0xa5, 0x6b, 0x79, 0x2d, 0xbf, 0x3f, 0xff, 0xfe, 0xa1, 0x7b, 0xa4, 0xe9, 0x72,
+	0xf6, 0xf0, 0x8f, 0xf1, 0x6a, 0xb7, 0xdf, 0x04, 0x29, 0x64, 0x21, 0xe4, 0x54, 0xa6, 0x50, 0x90,
+	0x50, 0x0f, 0xcf, 0xcc, 0x3f, 0xc0, 0xc0, 0x08, 0x1b, 0x47, 0x29, 0xd7, 0x6f, 0x01, 0x00, 0x00,
+	0xff, 0xff, 0xe1, 0x62, 0xad, 0x46, 0x81, 0x02, 0x00, 0x00,
+}
diff --git a/go/voltha/adapter.proto b/go/voltha/adapter.proto
deleted file mode 100644
index e8889c5..0000000
--- a/go/voltha/adapter.proto
+++ /dev/null
@@ -1,43 +0,0 @@
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/voltha";
-
-package voltha;
-
-import "google/protobuf/any.proto";
-import "voltha_protos/common.proto";
-import "voltha_protos/meta.proto";
-
-
-message AdapterConfig {
-
-    // Common adapter config attributes here
-    LogLevel.LogLevel log_level = 1;
-
-    // Custom (vendor-specific) configuration attributes
-    google.protobuf.Any additional_config = 64;
-
-}
-
-// Adapter (software plugin)
-message Adapter {
-
-    // Unique name of adapter, matching the python package name under
-    // voltha/adapters.
-    string id = 1 [(access) = READ_ONLY];
-    string vendor = 2 [(access) = READ_ONLY];
-    string version = 3 [(access) = READ_ONLY];
-
-    // Adapter configuration
-    AdapterConfig config = 16;
-
-    // Custom descriptors and custom configuration
-    google.protobuf.Any additional_description = 64 [(access) = READ_ONLY];
-
-    repeated string logical_device_ids = 4;  // Logical devices "owned"
-
-}
-
-message Adapters {
-    repeated Adapter items = 1;
-}
diff --git a/go/voltha/device.pb.go b/go/voltha/device.pb.go
new file mode 100644
index 0000000..413ae22
--- /dev/null
+++ b/go/voltha/device.pb.go
@@ -0,0 +1,1908 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/device.proto
+
+package voltha // import "github.com/opencord/voltha-protos/go/voltha"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import any "github.com/golang/protobuf/ptypes/any"
+import common "github.com/opencord/voltha-protos/go/common"
+import openflow_13 "github.com/opencord/voltha-protos/go/openflow_13"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type PmConfig_PmType int32
+
+const (
+	PmConfig_COUNTER PmConfig_PmType = 0
+	PmConfig_GAUGE   PmConfig_PmType = 1
+	PmConfig_STATE   PmConfig_PmType = 2
+	PmConfig_CONTEXT PmConfig_PmType = 3
+)
+
+var PmConfig_PmType_name = map[int32]string{
+	0: "COUNTER",
+	1: "GAUGE",
+	2: "STATE",
+	3: "CONTEXT",
+}
+var PmConfig_PmType_value = map[string]int32{
+	"COUNTER": 0,
+	"GAUGE":   1,
+	"STATE":   2,
+	"CONTEXT": 3,
+}
+
+func (x PmConfig_PmType) String() string {
+	return proto.EnumName(PmConfig_PmType_name, int32(x))
+}
+func (PmConfig_PmType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{2, 0}
+}
+
+type ImageDownload_ImageDownloadState int32
+
+const (
+	ImageDownload_DOWNLOAD_UNKNOWN     ImageDownload_ImageDownloadState = 0
+	ImageDownload_DOWNLOAD_SUCCEEDED   ImageDownload_ImageDownloadState = 1
+	ImageDownload_DOWNLOAD_REQUESTED   ImageDownload_ImageDownloadState = 2
+	ImageDownload_DOWNLOAD_STARTED     ImageDownload_ImageDownloadState = 3
+	ImageDownload_DOWNLOAD_FAILED      ImageDownload_ImageDownloadState = 4
+	ImageDownload_DOWNLOAD_UNSUPPORTED ImageDownload_ImageDownloadState = 5
+	ImageDownload_DOWNLOAD_CANCELLED   ImageDownload_ImageDownloadState = 6
+)
+
+var ImageDownload_ImageDownloadState_name = map[int32]string{
+	0: "DOWNLOAD_UNKNOWN",
+	1: "DOWNLOAD_SUCCEEDED",
+	2: "DOWNLOAD_REQUESTED",
+	3: "DOWNLOAD_STARTED",
+	4: "DOWNLOAD_FAILED",
+	5: "DOWNLOAD_UNSUPPORTED",
+	6: "DOWNLOAD_CANCELLED",
+}
+var ImageDownload_ImageDownloadState_value = map[string]int32{
+	"DOWNLOAD_UNKNOWN":     0,
+	"DOWNLOAD_SUCCEEDED":   1,
+	"DOWNLOAD_REQUESTED":   2,
+	"DOWNLOAD_STARTED":     3,
+	"DOWNLOAD_FAILED":      4,
+	"DOWNLOAD_UNSUPPORTED": 5,
+	"DOWNLOAD_CANCELLED":   6,
+}
+
+func (x ImageDownload_ImageDownloadState) String() string {
+	return proto.EnumName(ImageDownload_ImageDownloadState_name, int32(x))
+}
+func (ImageDownload_ImageDownloadState) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{7, 0}
+}
+
+type ImageDownload_ImageDownloadFailureReason int32
+
+const (
+	ImageDownload_NO_ERROR           ImageDownload_ImageDownloadFailureReason = 0
+	ImageDownload_INVALID_URL        ImageDownload_ImageDownloadFailureReason = 1
+	ImageDownload_DEVICE_BUSY        ImageDownload_ImageDownloadFailureReason = 2
+	ImageDownload_INSUFFICIENT_SPACE ImageDownload_ImageDownloadFailureReason = 3
+	ImageDownload_UNKNOWN_ERROR      ImageDownload_ImageDownloadFailureReason = 4
+	ImageDownload_CANCELLED          ImageDownload_ImageDownloadFailureReason = 5
+)
+
+var ImageDownload_ImageDownloadFailureReason_name = map[int32]string{
+	0: "NO_ERROR",
+	1: "INVALID_URL",
+	2: "DEVICE_BUSY",
+	3: "INSUFFICIENT_SPACE",
+	4: "UNKNOWN_ERROR",
+	5: "CANCELLED",
+}
+var ImageDownload_ImageDownloadFailureReason_value = map[string]int32{
+	"NO_ERROR":           0,
+	"INVALID_URL":        1,
+	"DEVICE_BUSY":        2,
+	"INSUFFICIENT_SPACE": 3,
+	"UNKNOWN_ERROR":      4,
+	"CANCELLED":          5,
+}
+
+func (x ImageDownload_ImageDownloadFailureReason) String() string {
+	return proto.EnumName(ImageDownload_ImageDownloadFailureReason_name, int32(x))
+}
+func (ImageDownload_ImageDownloadFailureReason) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{7, 1}
+}
+
+type ImageDownload_ImageActivateState int32
+
+const (
+	ImageDownload_IMAGE_UNKNOWN    ImageDownload_ImageActivateState = 0
+	ImageDownload_IMAGE_INACTIVE   ImageDownload_ImageActivateState = 1
+	ImageDownload_IMAGE_ACTIVATING ImageDownload_ImageActivateState = 2
+	ImageDownload_IMAGE_ACTIVE     ImageDownload_ImageActivateState = 3
+	ImageDownload_IMAGE_REVERTING  ImageDownload_ImageActivateState = 4
+	ImageDownload_IMAGE_REVERTED   ImageDownload_ImageActivateState = 5
+)
+
+var ImageDownload_ImageActivateState_name = map[int32]string{
+	0: "IMAGE_UNKNOWN",
+	1: "IMAGE_INACTIVE",
+	2: "IMAGE_ACTIVATING",
+	3: "IMAGE_ACTIVE",
+	4: "IMAGE_REVERTING",
+	5: "IMAGE_REVERTED",
+}
+var ImageDownload_ImageActivateState_value = map[string]int32{
+	"IMAGE_UNKNOWN":    0,
+	"IMAGE_INACTIVE":   1,
+	"IMAGE_ACTIVATING": 2,
+	"IMAGE_ACTIVE":     3,
+	"IMAGE_REVERTING":  4,
+	"IMAGE_REVERTED":   5,
+}
+
+func (x ImageDownload_ImageActivateState) String() string {
+	return proto.EnumName(ImageDownload_ImageActivateState_name, int32(x))
+}
+func (ImageDownload_ImageActivateState) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{7, 2}
+}
+
+type Port_PortType int32
+
+const (
+	Port_UNKNOWN      Port_PortType = 0
+	Port_ETHERNET_NNI Port_PortType = 1
+	Port_ETHERNET_UNI Port_PortType = 2
+	Port_PON_OLT      Port_PortType = 3
+	Port_PON_ONU      Port_PortType = 4
+	Port_VENET_OLT    Port_PortType = 5
+	Port_VENET_ONU    Port_PortType = 6
+)
+
+var Port_PortType_name = map[int32]string{
+	0: "UNKNOWN",
+	1: "ETHERNET_NNI",
+	2: "ETHERNET_UNI",
+	3: "PON_OLT",
+	4: "PON_ONU",
+	5: "VENET_OLT",
+	6: "VENET_ONU",
+}
+var Port_PortType_value = map[string]int32{
+	"UNKNOWN":      0,
+	"ETHERNET_NNI": 1,
+	"ETHERNET_UNI": 2,
+	"PON_OLT":      3,
+	"PON_ONU":      4,
+	"VENET_OLT":    5,
+	"VENET_ONU":    6,
+}
+
+func (x Port_PortType) String() string {
+	return proto.EnumName(Port_PortType_name, int32(x))
+}
+func (Port_PortType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{9, 0}
+}
+
+type SimulateAlarmRequest_OperationType int32
+
+const (
+	SimulateAlarmRequest_RAISE SimulateAlarmRequest_OperationType = 0
+	SimulateAlarmRequest_CLEAR SimulateAlarmRequest_OperationType = 1
+)
+
+var SimulateAlarmRequest_OperationType_name = map[int32]string{
+	0: "RAISE",
+	1: "CLEAR",
+}
+var SimulateAlarmRequest_OperationType_value = map[string]int32{
+	"RAISE": 0,
+	"CLEAR": 1,
+}
+
+func (x SimulateAlarmRequest_OperationType) String() string {
+	return proto.EnumName(SimulateAlarmRequest_OperationType_name, int32(x))
+}
+func (SimulateAlarmRequest_OperationType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{13, 0}
+}
+
+// A Device Type
+type DeviceType struct {
+	// Unique name for the device type
+	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	// Unique vendor id for the device type applicable to ONU
+	// 4 bytes of vendor id from ONU serial number
+	VendorId  string   `protobuf:"bytes,5,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id,omitempty"`
+	VendorIds []string `protobuf:"bytes,6,rep,name=vendor_ids,json=vendorIds,proto3" json:"vendor_ids,omitempty"`
+	// Name of the adapter that handles device type
+	Adapter string `protobuf:"bytes,2,opt,name=adapter,proto3" json:"adapter,omitempty"`
+	// Capabilities
+	AcceptsBulkFlowUpdate           bool     `protobuf:"varint,3,opt,name=accepts_bulk_flow_update,json=acceptsBulkFlowUpdate,proto3" json:"accepts_bulk_flow_update,omitempty"`
+	AcceptsAddRemoveFlowUpdates     bool     `protobuf:"varint,4,opt,name=accepts_add_remove_flow_updates,json=acceptsAddRemoveFlowUpdates,proto3" json:"accepts_add_remove_flow_updates,omitempty"`
+	AcceptsDirectLogicalFlowsUpdate bool     `protobuf:"varint,7,opt,name=accepts_direct_logical_flows_update,json=acceptsDirectLogicalFlowsUpdate,proto3" json:"accepts_direct_logical_flows_update,omitempty"`
+	XXX_NoUnkeyedLiteral            struct{} `json:"-"`
+	XXX_unrecognized                []byte   `json:"-"`
+	XXX_sizecache                   int32    `json:"-"`
+}
+
+func (m *DeviceType) Reset()         { *m = DeviceType{} }
+func (m *DeviceType) String() string { return proto.CompactTextString(m) }
+func (*DeviceType) ProtoMessage()    {}
+func (*DeviceType) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{0}
+}
+func (m *DeviceType) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_DeviceType.Unmarshal(m, b)
+}
+func (m *DeviceType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_DeviceType.Marshal(b, m, deterministic)
+}
+func (dst *DeviceType) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_DeviceType.Merge(dst, src)
+}
+func (m *DeviceType) XXX_Size() int {
+	return xxx_messageInfo_DeviceType.Size(m)
+}
+func (m *DeviceType) XXX_DiscardUnknown() {
+	xxx_messageInfo_DeviceType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceType proto.InternalMessageInfo
+
+func (m *DeviceType) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *DeviceType) GetVendorId() string {
+	if m != nil {
+		return m.VendorId
+	}
+	return ""
+}
+
+func (m *DeviceType) GetVendorIds() []string {
+	if m != nil {
+		return m.VendorIds
+	}
+	return nil
+}
+
+func (m *DeviceType) GetAdapter() string {
+	if m != nil {
+		return m.Adapter
+	}
+	return ""
+}
+
+func (m *DeviceType) GetAcceptsBulkFlowUpdate() bool {
+	if m != nil {
+		return m.AcceptsBulkFlowUpdate
+	}
+	return false
+}
+
+func (m *DeviceType) GetAcceptsAddRemoveFlowUpdates() bool {
+	if m != nil {
+		return m.AcceptsAddRemoveFlowUpdates
+	}
+	return false
+}
+
+func (m *DeviceType) GetAcceptsDirectLogicalFlowsUpdate() bool {
+	if m != nil {
+		return m.AcceptsDirectLogicalFlowsUpdate
+	}
+	return false
+}
+
+// A plurality of device types
+type DeviceTypes struct {
+	Items                []*DeviceType `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
+	XXX_unrecognized     []byte        `json:"-"`
+	XXX_sizecache        int32         `json:"-"`
+}
+
+func (m *DeviceTypes) Reset()         { *m = DeviceTypes{} }
+func (m *DeviceTypes) String() string { return proto.CompactTextString(m) }
+func (*DeviceTypes) ProtoMessage()    {}
+func (*DeviceTypes) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{1}
+}
+func (m *DeviceTypes) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_DeviceTypes.Unmarshal(m, b)
+}
+func (m *DeviceTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_DeviceTypes.Marshal(b, m, deterministic)
+}
+func (dst *DeviceTypes) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_DeviceTypes.Merge(dst, src)
+}
+func (m *DeviceTypes) XXX_Size() int {
+	return xxx_messageInfo_DeviceTypes.Size(m)
+}
+func (m *DeviceTypes) XXX_DiscardUnknown() {
+	xxx_messageInfo_DeviceTypes.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceTypes proto.InternalMessageInfo
+
+func (m *DeviceTypes) GetItems() []*DeviceType {
+	if m != nil {
+		return m.Items
+	}
+	return nil
+}
+
+type PmConfig struct {
+	Name                 string          `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+	Type                 PmConfig_PmType `protobuf:"varint,2,opt,name=type,proto3,enum=voltha.PmConfig_PmType" json:"type,omitempty"`
+	Enabled              bool            `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"`
+	SampleFreq           uint32          `protobuf:"varint,4,opt,name=sample_freq,json=sampleFreq,proto3" json:"sample_freq,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
+	XXX_unrecognized     []byte          `json:"-"`
+	XXX_sizecache        int32           `json:"-"`
+}
+
+func (m *PmConfig) Reset()         { *m = PmConfig{} }
+func (m *PmConfig) String() string { return proto.CompactTextString(m) }
+func (*PmConfig) ProtoMessage()    {}
+func (*PmConfig) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{2}
+}
+func (m *PmConfig) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PmConfig.Unmarshal(m, b)
+}
+func (m *PmConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PmConfig.Marshal(b, m, deterministic)
+}
+func (dst *PmConfig) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PmConfig.Merge(dst, src)
+}
+func (m *PmConfig) XXX_Size() int {
+	return xxx_messageInfo_PmConfig.Size(m)
+}
+func (m *PmConfig) XXX_DiscardUnknown() {
+	xxx_messageInfo_PmConfig.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PmConfig proto.InternalMessageInfo
+
+func (m *PmConfig) GetName() string {
+	if m != nil {
+		return m.Name
+	}
+	return ""
+}
+
+func (m *PmConfig) GetType() PmConfig_PmType {
+	if m != nil {
+		return m.Type
+	}
+	return PmConfig_COUNTER
+}
+
+func (m *PmConfig) GetEnabled() bool {
+	if m != nil {
+		return m.Enabled
+	}
+	return false
+}
+
+func (m *PmConfig) GetSampleFreq() uint32 {
+	if m != nil {
+		return m.SampleFreq
+	}
+	return 0
+}
+
+type PmGroupConfig struct {
+	GroupName            string      `protobuf:"bytes,1,opt,name=group_name,json=groupName,proto3" json:"group_name,omitempty"`
+	GroupFreq            uint32      `protobuf:"varint,2,opt,name=group_freq,json=groupFreq,proto3" json:"group_freq,omitempty"`
+	Enabled              bool        `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"`
+	Metrics              []*PmConfig `protobuf:"bytes,4,rep,name=metrics,proto3" json:"metrics,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
+	XXX_unrecognized     []byte      `json:"-"`
+	XXX_sizecache        int32       `json:"-"`
+}
+
+func (m *PmGroupConfig) Reset()         { *m = PmGroupConfig{} }
+func (m *PmGroupConfig) String() string { return proto.CompactTextString(m) }
+func (*PmGroupConfig) ProtoMessage()    {}
+func (*PmGroupConfig) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{3}
+}
+func (m *PmGroupConfig) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PmGroupConfig.Unmarshal(m, b)
+}
+func (m *PmGroupConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PmGroupConfig.Marshal(b, m, deterministic)
+}
+func (dst *PmGroupConfig) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PmGroupConfig.Merge(dst, src)
+}
+func (m *PmGroupConfig) XXX_Size() int {
+	return xxx_messageInfo_PmGroupConfig.Size(m)
+}
+func (m *PmGroupConfig) XXX_DiscardUnknown() {
+	xxx_messageInfo_PmGroupConfig.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PmGroupConfig proto.InternalMessageInfo
+
+func (m *PmGroupConfig) GetGroupName() string {
+	if m != nil {
+		return m.GroupName
+	}
+	return ""
+}
+
+func (m *PmGroupConfig) GetGroupFreq() uint32 {
+	if m != nil {
+		return m.GroupFreq
+	}
+	return 0
+}
+
+func (m *PmGroupConfig) GetEnabled() bool {
+	if m != nil {
+		return m.Enabled
+	}
+	return false
+}
+
+func (m *PmGroupConfig) GetMetrics() []*PmConfig {
+	if m != nil {
+		return m.Metrics
+	}
+	return nil
+}
+
+type PmConfigs struct {
+	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	DefaultFreq uint32 `protobuf:"varint,2,opt,name=default_freq,json=defaultFreq,proto3" json:"default_freq,omitempty"`
+	// Forces group names and group semantics
+	Grouped bool `protobuf:"varint,3,opt,name=grouped,proto3" json:"grouped,omitempty"`
+	// Allows Pm to set an individual sample frequency
+	FreqOverride         bool             `protobuf:"varint,4,opt,name=freq_override,json=freqOverride,proto3" json:"freq_override,omitempty"`
+	Groups               []*PmGroupConfig `protobuf:"bytes,5,rep,name=groups,proto3" json:"groups,omitempty"`
+	Metrics              []*PmConfig      `protobuf:"bytes,6,rep,name=metrics,proto3" json:"metrics,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
+}
+
+func (m *PmConfigs) Reset()         { *m = PmConfigs{} }
+func (m *PmConfigs) String() string { return proto.CompactTextString(m) }
+func (*PmConfigs) ProtoMessage()    {}
+func (*PmConfigs) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{4}
+}
+func (m *PmConfigs) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PmConfigs.Unmarshal(m, b)
+}
+func (m *PmConfigs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PmConfigs.Marshal(b, m, deterministic)
+}
+func (dst *PmConfigs) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PmConfigs.Merge(dst, src)
+}
+func (m *PmConfigs) XXX_Size() int {
+	return xxx_messageInfo_PmConfigs.Size(m)
+}
+func (m *PmConfigs) XXX_DiscardUnknown() {
+	xxx_messageInfo_PmConfigs.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PmConfigs proto.InternalMessageInfo
+
+func (m *PmConfigs) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *PmConfigs) GetDefaultFreq() uint32 {
+	if m != nil {
+		return m.DefaultFreq
+	}
+	return 0
+}
+
+func (m *PmConfigs) GetGrouped() bool {
+	if m != nil {
+		return m.Grouped
+	}
+	return false
+}
+
+func (m *PmConfigs) GetFreqOverride() bool {
+	if m != nil {
+		return m.FreqOverride
+	}
+	return false
+}
+
+func (m *PmConfigs) GetGroups() []*PmGroupConfig {
+	if m != nil {
+		return m.Groups
+	}
+	return nil
+}
+
+func (m *PmConfigs) GetMetrics() []*PmConfig {
+	if m != nil {
+		return m.Metrics
+	}
+	return nil
+}
+
+// Describes instance of software image on the device
+type Image struct {
+	Name            string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+	Version         string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
+	Hash            string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
+	InstallDatetime string `protobuf:"bytes,4,opt,name=install_datetime,json=installDatetime,proto3" json:"install_datetime,omitempty"`
+	// The active software image is one that is currently loaded and executing
+	// in the ONU or circuit pack. Under normal operation, one software image
+	// is always active while the other is inactive. Under no circumstances are
+	// both software images allowed to be active at the same time
+	IsActive bool `protobuf:"varint,5,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"`
+	// The committed software image is loaded and executed upon reboot of the
+	// ONU and/or circuit pack. During normal operation, one software image is
+	// always committed, while the other is uncommitted.
+	IsCommitted bool `protobuf:"varint,6,opt,name=is_committed,json=isCommitted,proto3" json:"is_committed,omitempty"`
+	// A software image is valid if it has been verified to be an executable
+	// code image. The verification mechanism is not subject to standardization;
+	// however, it should include at least a data integrity (e.g., CRC) check of
+	// the entire code image.
+	IsValid              bool     `protobuf:"varint,7,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Image) Reset()         { *m = Image{} }
+func (m *Image) String() string { return proto.CompactTextString(m) }
+func (*Image) ProtoMessage()    {}
+func (*Image) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{5}
+}
+func (m *Image) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Image.Unmarshal(m, b)
+}
+func (m *Image) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Image.Marshal(b, m, deterministic)
+}
+func (dst *Image) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Image.Merge(dst, src)
+}
+func (m *Image) XXX_Size() int {
+	return xxx_messageInfo_Image.Size(m)
+}
+func (m *Image) XXX_DiscardUnknown() {
+	xxx_messageInfo_Image.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Image proto.InternalMessageInfo
+
+func (m *Image) GetName() string {
+	if m != nil {
+		return m.Name
+	}
+	return ""
+}
+
+func (m *Image) GetVersion() string {
+	if m != nil {
+		return m.Version
+	}
+	return ""
+}
+
+func (m *Image) GetHash() string {
+	if m != nil {
+		return m.Hash
+	}
+	return ""
+}
+
+func (m *Image) GetInstallDatetime() string {
+	if m != nil {
+		return m.InstallDatetime
+	}
+	return ""
+}
+
+func (m *Image) GetIsActive() bool {
+	if m != nil {
+		return m.IsActive
+	}
+	return false
+}
+
+func (m *Image) GetIsCommitted() bool {
+	if m != nil {
+		return m.IsCommitted
+	}
+	return false
+}
+
+func (m *Image) GetIsValid() bool {
+	if m != nil {
+		return m.IsValid
+	}
+	return false
+}
+
+// List of software on the device
+type Images struct {
+	Image                []*Image `protobuf:"bytes,1,rep,name=image,proto3" json:"image,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Images) Reset()         { *m = Images{} }
+func (m *Images) String() string { return proto.CompactTextString(m) }
+func (*Images) ProtoMessage()    {}
+func (*Images) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{6}
+}
+func (m *Images) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Images.Unmarshal(m, b)
+}
+func (m *Images) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Images.Marshal(b, m, deterministic)
+}
+func (dst *Images) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Images.Merge(dst, src)
+}
+func (m *Images) XXX_Size() int {
+	return xxx_messageInfo_Images.Size(m)
+}
+func (m *Images) XXX_DiscardUnknown() {
+	xxx_messageInfo_Images.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Images proto.InternalMessageInfo
+
+func (m *Images) GetImage() []*Image {
+	if m != nil {
+		return m.Image
+	}
+	return nil
+}
+
+type ImageDownload struct {
+	// Device Identifier
+	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	// Image unique identifier
+	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+	// URL where the image is available
+	// should include username password
+	Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
+	// CRC of the image to be verified aginst
+	Crc uint32 `protobuf:"varint,4,opt,name=crc,proto3" json:"crc,omitempty"`
+	// Download state
+	DownloadState ImageDownload_ImageDownloadState `protobuf:"varint,5,opt,name=download_state,json=downloadState,proto3,enum=voltha.ImageDownload_ImageDownloadState" json:"download_state,omitempty"`
+	// Downloaded version
+	ImageVersion string `protobuf:"bytes,6,opt,name=image_version,json=imageVersion,proto3" json:"image_version,omitempty"`
+	// Bytes downloaded
+	DownloadedBytes uint32 `protobuf:"varint,7,opt,name=downloaded_bytes,json=downloadedBytes,proto3" json:"downloaded_bytes,omitempty"`
+	// Download failure reason
+	Reason ImageDownload_ImageDownloadFailureReason `protobuf:"varint,8,opt,name=reason,proto3,enum=voltha.ImageDownload_ImageDownloadFailureReason" json:"reason,omitempty"`
+	// Additional info
+	AdditionalInfo string `protobuf:"bytes,9,opt,name=additional_info,json=additionalInfo,proto3" json:"additional_info,omitempty"`
+	// Save current configuration
+	SaveConfig bool `protobuf:"varint,10,opt,name=save_config,json=saveConfig,proto3" json:"save_config,omitempty"`
+	// Image local location
+	LocalDir string `protobuf:"bytes,11,opt,name=local_dir,json=localDir,proto3" json:"local_dir,omitempty"`
+	// Image activation state
+	ImageState ImageDownload_ImageActivateState `protobuf:"varint,12,opt,name=image_state,json=imageState,proto3,enum=voltha.ImageDownload_ImageActivateState" json:"image_state,omitempty"`
+	// Image file size
+	FileSize             uint32   `protobuf:"varint,13,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *ImageDownload) Reset()         { *m = ImageDownload{} }
+func (m *ImageDownload) String() string { return proto.CompactTextString(m) }
+func (*ImageDownload) ProtoMessage()    {}
+func (*ImageDownload) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{7}
+}
+func (m *ImageDownload) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_ImageDownload.Unmarshal(m, b)
+}
+func (m *ImageDownload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_ImageDownload.Marshal(b, m, deterministic)
+}
+func (dst *ImageDownload) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ImageDownload.Merge(dst, src)
+}
+func (m *ImageDownload) XXX_Size() int {
+	return xxx_messageInfo_ImageDownload.Size(m)
+}
+func (m *ImageDownload) XXX_DiscardUnknown() {
+	xxx_messageInfo_ImageDownload.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ImageDownload proto.InternalMessageInfo
+
+func (m *ImageDownload) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *ImageDownload) GetName() string {
+	if m != nil {
+		return m.Name
+	}
+	return ""
+}
+
+func (m *ImageDownload) GetUrl() string {
+	if m != nil {
+		return m.Url
+	}
+	return ""
+}
+
+func (m *ImageDownload) GetCrc() uint32 {
+	if m != nil {
+		return m.Crc
+	}
+	return 0
+}
+
+func (m *ImageDownload) GetDownloadState() ImageDownload_ImageDownloadState {
+	if m != nil {
+		return m.DownloadState
+	}
+	return ImageDownload_DOWNLOAD_UNKNOWN
+}
+
+func (m *ImageDownload) GetImageVersion() string {
+	if m != nil {
+		return m.ImageVersion
+	}
+	return ""
+}
+
+func (m *ImageDownload) GetDownloadedBytes() uint32 {
+	if m != nil {
+		return m.DownloadedBytes
+	}
+	return 0
+}
+
+func (m *ImageDownload) GetReason() ImageDownload_ImageDownloadFailureReason {
+	if m != nil {
+		return m.Reason
+	}
+	return ImageDownload_NO_ERROR
+}
+
+func (m *ImageDownload) GetAdditionalInfo() string {
+	if m != nil {
+		return m.AdditionalInfo
+	}
+	return ""
+}
+
+func (m *ImageDownload) GetSaveConfig() bool {
+	if m != nil {
+		return m.SaveConfig
+	}
+	return false
+}
+
+func (m *ImageDownload) GetLocalDir() string {
+	if m != nil {
+		return m.LocalDir
+	}
+	return ""
+}
+
+func (m *ImageDownload) GetImageState() ImageDownload_ImageActivateState {
+	if m != nil {
+		return m.ImageState
+	}
+	return ImageDownload_IMAGE_UNKNOWN
+}
+
+func (m *ImageDownload) GetFileSize() uint32 {
+	if m != nil {
+		return m.FileSize
+	}
+	return 0
+}
+
+type ImageDownloads struct {
+	Items                []*ImageDownload `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
+}
+
+func (m *ImageDownloads) Reset()         { *m = ImageDownloads{} }
+func (m *ImageDownloads) String() string { return proto.CompactTextString(m) }
+func (*ImageDownloads) ProtoMessage()    {}
+func (*ImageDownloads) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{8}
+}
+func (m *ImageDownloads) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_ImageDownloads.Unmarshal(m, b)
+}
+func (m *ImageDownloads) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_ImageDownloads.Marshal(b, m, deterministic)
+}
+func (dst *ImageDownloads) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ImageDownloads.Merge(dst, src)
+}
+func (m *ImageDownloads) XXX_Size() int {
+	return xxx_messageInfo_ImageDownloads.Size(m)
+}
+func (m *ImageDownloads) XXX_DiscardUnknown() {
+	xxx_messageInfo_ImageDownloads.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ImageDownloads proto.InternalMessageInfo
+
+func (m *ImageDownloads) GetItems() []*ImageDownload {
+	if m != nil {
+		return m.Items
+	}
+	return nil
+}
+
+type Port struct {
+	PortNo               uint32                       `protobuf:"varint,1,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"`
+	Label                string                       `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
+	Type                 Port_PortType                `protobuf:"varint,3,opt,name=type,proto3,enum=voltha.Port_PortType" json:"type,omitempty"`
+	AdminState           common.AdminState_AdminState `protobuf:"varint,5,opt,name=admin_state,json=adminState,proto3,enum=voltha.AdminState_AdminState" json:"admin_state,omitempty"`
+	OperStatus           common.OperStatus_OperStatus `protobuf:"varint,6,opt,name=oper_status,json=operStatus,proto3,enum=voltha.OperStatus_OperStatus" json:"oper_status,omitempty"`
+	DeviceId             string                       `protobuf:"bytes,7,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
+	Peers                []*Port_PeerPort             `protobuf:"bytes,8,rep,name=peers,proto3" json:"peers,omitempty"`
+	RxPackets            uint64                       `protobuf:"fixed64,9,opt,name=rx_packets,json=rxPackets,proto3" json:"rx_packets,omitempty"`
+	RxBytes              uint64                       `protobuf:"fixed64,10,opt,name=rx_bytes,json=rxBytes,proto3" json:"rx_bytes,omitempty"`
+	RxErrors             uint64                       `protobuf:"fixed64,11,opt,name=rx_errors,json=rxErrors,proto3" json:"rx_errors,omitempty"`
+	TxPackets            uint64                       `protobuf:"fixed64,12,opt,name=tx_packets,json=txPackets,proto3" json:"tx_packets,omitempty"`
+	TxBytes              uint64                       `protobuf:"fixed64,13,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"`
+	TxErrors             uint64                       `protobuf:"fixed64,14,opt,name=tx_errors,json=txErrors,proto3" json:"tx_errors,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
+	XXX_unrecognized     []byte                       `json:"-"`
+	XXX_sizecache        int32                        `json:"-"`
+}
+
+func (m *Port) Reset()         { *m = Port{} }
+func (m *Port) String() string { return proto.CompactTextString(m) }
+func (*Port) ProtoMessage()    {}
+func (*Port) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{9}
+}
+func (m *Port) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Port.Unmarshal(m, b)
+}
+func (m *Port) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Port.Marshal(b, m, deterministic)
+}
+func (dst *Port) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Port.Merge(dst, src)
+}
+func (m *Port) XXX_Size() int {
+	return xxx_messageInfo_Port.Size(m)
+}
+func (m *Port) XXX_DiscardUnknown() {
+	xxx_messageInfo_Port.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Port proto.InternalMessageInfo
+
+func (m *Port) GetPortNo() uint32 {
+	if m != nil {
+		return m.PortNo
+	}
+	return 0
+}
+
+func (m *Port) GetLabel() string {
+	if m != nil {
+		return m.Label
+	}
+	return ""
+}
+
+func (m *Port) GetType() Port_PortType {
+	if m != nil {
+		return m.Type
+	}
+	return Port_UNKNOWN
+}
+
+func (m *Port) GetAdminState() common.AdminState_AdminState {
+	if m != nil {
+		return m.AdminState
+	}
+	return common.AdminState_UNKNOWN
+}
+
+func (m *Port) GetOperStatus() common.OperStatus_OperStatus {
+	if m != nil {
+		return m.OperStatus
+	}
+	return common.OperStatus_UNKNOWN
+}
+
+func (m *Port) GetDeviceId() string {
+	if m != nil {
+		return m.DeviceId
+	}
+	return ""
+}
+
+func (m *Port) GetPeers() []*Port_PeerPort {
+	if m != nil {
+		return m.Peers
+	}
+	return nil
+}
+
+func (m *Port) GetRxPackets() uint64 {
+	if m != nil {
+		return m.RxPackets
+	}
+	return 0
+}
+
+func (m *Port) GetRxBytes() uint64 {
+	if m != nil {
+		return m.RxBytes
+	}
+	return 0
+}
+
+func (m *Port) GetRxErrors() uint64 {
+	if m != nil {
+		return m.RxErrors
+	}
+	return 0
+}
+
+func (m *Port) GetTxPackets() uint64 {
+	if m != nil {
+		return m.TxPackets
+	}
+	return 0
+}
+
+func (m *Port) GetTxBytes() uint64 {
+	if m != nil {
+		return m.TxBytes
+	}
+	return 0
+}
+
+func (m *Port) GetTxErrors() uint64 {
+	if m != nil {
+		return m.TxErrors
+	}
+	return 0
+}
+
+type Port_PeerPort struct {
+	DeviceId             string   `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
+	PortNo               uint32   `protobuf:"varint,2,opt,name=port_no,json=portNo,proto3" json:"port_no,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Port_PeerPort) Reset()         { *m = Port_PeerPort{} }
+func (m *Port_PeerPort) String() string { return proto.CompactTextString(m) }
+func (*Port_PeerPort) ProtoMessage()    {}
+func (*Port_PeerPort) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{9, 0}
+}
+func (m *Port_PeerPort) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Port_PeerPort.Unmarshal(m, b)
+}
+func (m *Port_PeerPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Port_PeerPort.Marshal(b, m, deterministic)
+}
+func (dst *Port_PeerPort) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Port_PeerPort.Merge(dst, src)
+}
+func (m *Port_PeerPort) XXX_Size() int {
+	return xxx_messageInfo_Port_PeerPort.Size(m)
+}
+func (m *Port_PeerPort) XXX_DiscardUnknown() {
+	xxx_messageInfo_Port_PeerPort.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Port_PeerPort proto.InternalMessageInfo
+
+func (m *Port_PeerPort) GetDeviceId() string {
+	if m != nil {
+		return m.DeviceId
+	}
+	return ""
+}
+
+func (m *Port_PeerPort) GetPortNo() uint32 {
+	if m != nil {
+		return m.PortNo
+	}
+	return 0
+}
+
+type Ports struct {
+	Items                []*Port  `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Ports) Reset()         { *m = Ports{} }
+func (m *Ports) String() string { return proto.CompactTextString(m) }
+func (*Ports) ProtoMessage()    {}
+func (*Ports) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{10}
+}
+func (m *Ports) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Ports.Unmarshal(m, b)
+}
+func (m *Ports) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Ports.Marshal(b, m, deterministic)
+}
+func (dst *Ports) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Ports.Merge(dst, src)
+}
+func (m *Ports) XXX_Size() int {
+	return xxx_messageInfo_Ports.Size(m)
+}
+func (m *Ports) XXX_DiscardUnknown() {
+	xxx_messageInfo_Ports.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Ports proto.InternalMessageInfo
+
+func (m *Ports) GetItems() []*Port {
+	if m != nil {
+		return m.Items
+	}
+	return nil
+}
+
+// A Physical Device instance
+type Device struct {
+	// Voltha's device identifier
+	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	// Device type, refers to one of the registered device types
+	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
+	// Is this device a root device. Each logical switch has one root
+	// device that is associated with the logical flow switch.
+	Root bool `protobuf:"varint,3,opt,name=root,proto3" json:"root,omitempty"`
+	// Parent device id, in the device tree (for a root device, the parent_id
+	// is the logical_device.id)
+	ParentId     string `protobuf:"bytes,4,opt,name=parent_id,json=parentId,proto3" json:"parent_id,omitempty"`
+	ParentPortNo uint32 `protobuf:"varint,20,opt,name=parent_port_no,json=parentPortNo,proto3" json:"parent_port_no,omitempty"`
+	// Vendor, version, serial number, etc.
+	Vendor          string `protobuf:"bytes,5,opt,name=vendor,proto3" json:"vendor,omitempty"`
+	Model           string `protobuf:"bytes,6,opt,name=model,proto3" json:"model,omitempty"`
+	HardwareVersion string `protobuf:"bytes,7,opt,name=hardware_version,json=hardwareVersion,proto3" json:"hardware_version,omitempty"`
+	FirmwareVersion string `protobuf:"bytes,8,opt,name=firmware_version,json=firmwareVersion,proto3" json:"firmware_version,omitempty"`
+	// List of software on the device
+	Images       *Images `protobuf:"bytes,9,opt,name=images,proto3" json:"images,omitempty"`
+	SerialNumber string  `protobuf:"bytes,10,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"`
+	VendorId     string  `protobuf:"bytes,24,opt,name=vendor_id,json=vendorId,proto3" json:"vendor_id,omitempty"`
+	// Addapter that takes care of device
+	Adapter string `protobuf:"bytes,11,opt,name=adapter,proto3" json:"adapter,omitempty"`
+	// Device contact on vlan (if 0, no vlan)
+	Vlan uint32 `protobuf:"varint,12,opt,name=vlan,proto3" json:"vlan,omitempty"`
+	// Device contact MAC address (format: "xx:xx:xx:xx:xx:xx")
+	MacAddress string `protobuf:"bytes,13,opt,name=mac_address,json=macAddress,proto3" json:"mac_address,omitempty"`
+	// Types that are valid to be assigned to Address:
+	//	*Device_Ipv4Address
+	//	*Device_Ipv6Address
+	//	*Device_HostAndPort
+	Address       isDevice_Address                   `protobuf_oneof:"address"`
+	ExtraArgs     string                             `protobuf:"bytes,23,opt,name=extra_args,json=extraArgs,proto3" json:"extra_args,omitempty"`
+	ProxyAddress  *Device_ProxyAddress               `protobuf:"bytes,19,opt,name=proxy_address,json=proxyAddress,proto3" json:"proxy_address,omitempty"`
+	AdminState    common.AdminState_AdminState       `protobuf:"varint,16,opt,name=admin_state,json=adminState,proto3,enum=voltha.AdminState_AdminState" json:"admin_state,omitempty"`
+	OperStatus    common.OperStatus_OperStatus       `protobuf:"varint,17,opt,name=oper_status,json=operStatus,proto3,enum=voltha.OperStatus_OperStatus" json:"oper_status,omitempty"`
+	Reason        string                             `protobuf:"bytes,22,opt,name=reason,proto3" json:"reason,omitempty"`
+	ConnectStatus common.ConnectStatus_ConnectStatus `protobuf:"varint,18,opt,name=connect_status,json=connectStatus,proto3,enum=voltha.ConnectStatus_ConnectStatus" json:"connect_status,omitempty"`
+	// Device type specific attributes
+	Custom     *any.Any                `protobuf:"bytes,64,opt,name=custom,proto3" json:"custom,omitempty"`
+	Ports      []*Port                 `protobuf:"bytes,128,rep,name=ports,proto3" json:"ports,omitempty"`
+	Flows      *openflow_13.Flows      `protobuf:"bytes,129,opt,name=flows,proto3" json:"flows,omitempty"`
+	FlowGroups *openflow_13.FlowGroups `protobuf:"bytes,130,opt,name=flow_groups,json=flowGroups,proto3" json:"flow_groups,omitempty"`
+	// PmConfigs will eventually converted to a child node of the
+	// device to falicitata callbacks and to simplify manipulation.
+	PmConfigs            *PmConfigs       `protobuf:"bytes,131,opt,name=pm_configs,json=pmConfigs,proto3" json:"pm_configs,omitempty"`
+	ImageDownloads       []*ImageDownload `protobuf:"bytes,133,rep,name=image_downloads,json=imageDownloads,proto3" json:"image_downloads,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
+}
+
+func (m *Device) Reset()         { *m = Device{} }
+func (m *Device) String() string { return proto.CompactTextString(m) }
+func (*Device) ProtoMessage()    {}
+func (*Device) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{11}
+}
+func (m *Device) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Device.Unmarshal(m, b)
+}
+func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Device.Marshal(b, m, deterministic)
+}
+func (dst *Device) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Device.Merge(dst, src)
+}
+func (m *Device) XXX_Size() int {
+	return xxx_messageInfo_Device.Size(m)
+}
+func (m *Device) XXX_DiscardUnknown() {
+	xxx_messageInfo_Device.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Device proto.InternalMessageInfo
+
+func (m *Device) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *Device) GetType() string {
+	if m != nil {
+		return m.Type
+	}
+	return ""
+}
+
+func (m *Device) GetRoot() bool {
+	if m != nil {
+		return m.Root
+	}
+	return false
+}
+
+func (m *Device) GetParentId() string {
+	if m != nil {
+		return m.ParentId
+	}
+	return ""
+}
+
+func (m *Device) GetParentPortNo() uint32 {
+	if m != nil {
+		return m.ParentPortNo
+	}
+	return 0
+}
+
+func (m *Device) GetVendor() string {
+	if m != nil {
+		return m.Vendor
+	}
+	return ""
+}
+
+func (m *Device) GetModel() string {
+	if m != nil {
+		return m.Model
+	}
+	return ""
+}
+
+func (m *Device) GetHardwareVersion() string {
+	if m != nil {
+		return m.HardwareVersion
+	}
+	return ""
+}
+
+func (m *Device) GetFirmwareVersion() string {
+	if m != nil {
+		return m.FirmwareVersion
+	}
+	return ""
+}
+
+func (m *Device) GetImages() *Images {
+	if m != nil {
+		return m.Images
+	}
+	return nil
+}
+
+func (m *Device) GetSerialNumber() string {
+	if m != nil {
+		return m.SerialNumber
+	}
+	return ""
+}
+
+func (m *Device) GetVendorId() string {
+	if m != nil {
+		return m.VendorId
+	}
+	return ""
+}
+
+func (m *Device) GetAdapter() string {
+	if m != nil {
+		return m.Adapter
+	}
+	return ""
+}
+
+func (m *Device) GetVlan() uint32 {
+	if m != nil {
+		return m.Vlan
+	}
+	return 0
+}
+
+func (m *Device) GetMacAddress() string {
+	if m != nil {
+		return m.MacAddress
+	}
+	return ""
+}
+
+type isDevice_Address interface {
+	isDevice_Address()
+}
+
+type Device_Ipv4Address struct {
+	Ipv4Address string `protobuf:"bytes,14,opt,name=ipv4_address,json=ipv4Address,proto3,oneof"`
+}
+
+type Device_Ipv6Address struct {
+	Ipv6Address string `protobuf:"bytes,15,opt,name=ipv6_address,json=ipv6Address,proto3,oneof"`
+}
+
+type Device_HostAndPort struct {
+	HostAndPort string `protobuf:"bytes,21,opt,name=host_and_port,json=hostAndPort,proto3,oneof"`
+}
+
+func (*Device_Ipv4Address) isDevice_Address() {}
+
+func (*Device_Ipv6Address) isDevice_Address() {}
+
+func (*Device_HostAndPort) isDevice_Address() {}
+
+func (m *Device) GetAddress() isDevice_Address {
+	if m != nil {
+		return m.Address
+	}
+	return nil
+}
+
+func (m *Device) GetIpv4Address() string {
+	if x, ok := m.GetAddress().(*Device_Ipv4Address); ok {
+		return x.Ipv4Address
+	}
+	return ""
+}
+
+func (m *Device) GetIpv6Address() string {
+	if x, ok := m.GetAddress().(*Device_Ipv6Address); ok {
+		return x.Ipv6Address
+	}
+	return ""
+}
+
+func (m *Device) GetHostAndPort() string {
+	if x, ok := m.GetAddress().(*Device_HostAndPort); ok {
+		return x.HostAndPort
+	}
+	return ""
+}
+
+func (m *Device) GetExtraArgs() string {
+	if m != nil {
+		return m.ExtraArgs
+	}
+	return ""
+}
+
+func (m *Device) GetProxyAddress() *Device_ProxyAddress {
+	if m != nil {
+		return m.ProxyAddress
+	}
+	return nil
+}
+
+func (m *Device) GetAdminState() common.AdminState_AdminState {
+	if m != nil {
+		return m.AdminState
+	}
+	return common.AdminState_UNKNOWN
+}
+
+func (m *Device) GetOperStatus() common.OperStatus_OperStatus {
+	if m != nil {
+		return m.OperStatus
+	}
+	return common.OperStatus_UNKNOWN
+}
+
+func (m *Device) GetReason() string {
+	if m != nil {
+		return m.Reason
+	}
+	return ""
+}
+
+func (m *Device) GetConnectStatus() common.ConnectStatus_ConnectStatus {
+	if m != nil {
+		return m.ConnectStatus
+	}
+	return common.ConnectStatus_UNKNOWN
+}
+
+func (m *Device) GetCustom() *any.Any {
+	if m != nil {
+		return m.Custom
+	}
+	return nil
+}
+
+func (m *Device) GetPorts() []*Port {
+	if m != nil {
+		return m.Ports
+	}
+	return nil
+}
+
+func (m *Device) GetFlows() *openflow_13.Flows {
+	if m != nil {
+		return m.Flows
+	}
+	return nil
+}
+
+func (m *Device) GetFlowGroups() *openflow_13.FlowGroups {
+	if m != nil {
+		return m.FlowGroups
+	}
+	return nil
+}
+
+func (m *Device) GetPmConfigs() *PmConfigs {
+	if m != nil {
+		return m.PmConfigs
+	}
+	return nil
+}
+
+func (m *Device) GetImageDownloads() []*ImageDownload {
+	if m != nil {
+		return m.ImageDownloads
+	}
+	return nil
+}
+
+// XXX_OneofFuncs is for the internal use of the proto package.
+func (*Device) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
+	return _Device_OneofMarshaler, _Device_OneofUnmarshaler, _Device_OneofSizer, []interface{}{
+		(*Device_Ipv4Address)(nil),
+		(*Device_Ipv6Address)(nil),
+		(*Device_HostAndPort)(nil),
+	}
+}
+
+func _Device_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
+	m := msg.(*Device)
+	// address
+	switch x := m.Address.(type) {
+	case *Device_Ipv4Address:
+		b.EncodeVarint(14<<3 | proto.WireBytes)
+		b.EncodeStringBytes(x.Ipv4Address)
+	case *Device_Ipv6Address:
+		b.EncodeVarint(15<<3 | proto.WireBytes)
+		b.EncodeStringBytes(x.Ipv6Address)
+	case *Device_HostAndPort:
+		b.EncodeVarint(21<<3 | proto.WireBytes)
+		b.EncodeStringBytes(x.HostAndPort)
+	case nil:
+	default:
+		return fmt.Errorf("Device.Address has unexpected type %T", x)
+	}
+	return nil
+}
+
+func _Device_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
+	m := msg.(*Device)
+	switch tag {
+	case 14: // address.ipv4_address
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeStringBytes()
+		m.Address = &Device_Ipv4Address{x}
+		return true, err
+	case 15: // address.ipv6_address
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeStringBytes()
+		m.Address = &Device_Ipv6Address{x}
+		return true, err
+	case 21: // address.host_and_port
+		if wire != proto.WireBytes {
+			return true, proto.ErrInternalBadWireType
+		}
+		x, err := b.DecodeStringBytes()
+		m.Address = &Device_HostAndPort{x}
+		return true, err
+	default:
+		return false, nil
+	}
+}
+
+func _Device_OneofSizer(msg proto.Message) (n int) {
+	m := msg.(*Device)
+	// address
+	switch x := m.Address.(type) {
+	case *Device_Ipv4Address:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.Ipv4Address)))
+		n += len(x.Ipv4Address)
+	case *Device_Ipv6Address:
+		n += 1 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.Ipv6Address)))
+		n += len(x.Ipv6Address)
+	case *Device_HostAndPort:
+		n += 2 // tag and wire
+		n += proto.SizeVarint(uint64(len(x.HostAndPort)))
+		n += len(x.HostAndPort)
+	case nil:
+	default:
+		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
+	}
+	return n
+}
+
+type Device_ProxyAddress struct {
+	DeviceId             string   `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
+	DeviceType           string   `protobuf:"bytes,2,opt,name=device_type,json=deviceType,proto3" json:"device_type,omitempty"`
+	ChannelId            uint32   `protobuf:"varint,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
+	ChannelGroupId       uint32   `protobuf:"varint,4,opt,name=channel_group_id,json=channelGroupId,proto3" json:"channel_group_id,omitempty"`
+	ChannelTermination   string   `protobuf:"bytes,5,opt,name=channel_termination,json=channelTermination,proto3" json:"channel_termination,omitempty"`
+	OnuId                uint32   `protobuf:"varint,6,opt,name=onu_id,json=onuId,proto3" json:"onu_id,omitempty"`
+	OnuSessionId         uint32   `protobuf:"varint,7,opt,name=onu_session_id,json=onuSessionId,proto3" json:"onu_session_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Device_ProxyAddress) Reset()         { *m = Device_ProxyAddress{} }
+func (m *Device_ProxyAddress) String() string { return proto.CompactTextString(m) }
+func (*Device_ProxyAddress) ProtoMessage()    {}
+func (*Device_ProxyAddress) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{11, 0}
+}
+func (m *Device_ProxyAddress) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Device_ProxyAddress.Unmarshal(m, b)
+}
+func (m *Device_ProxyAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Device_ProxyAddress.Marshal(b, m, deterministic)
+}
+func (dst *Device_ProxyAddress) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Device_ProxyAddress.Merge(dst, src)
+}
+func (m *Device_ProxyAddress) XXX_Size() int {
+	return xxx_messageInfo_Device_ProxyAddress.Size(m)
+}
+func (m *Device_ProxyAddress) XXX_DiscardUnknown() {
+	xxx_messageInfo_Device_ProxyAddress.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Device_ProxyAddress proto.InternalMessageInfo
+
+func (m *Device_ProxyAddress) GetDeviceId() string {
+	if m != nil {
+		return m.DeviceId
+	}
+	return ""
+}
+
+func (m *Device_ProxyAddress) GetDeviceType() string {
+	if m != nil {
+		return m.DeviceType
+	}
+	return ""
+}
+
+func (m *Device_ProxyAddress) GetChannelId() uint32 {
+	if m != nil {
+		return m.ChannelId
+	}
+	return 0
+}
+
+func (m *Device_ProxyAddress) GetChannelGroupId() uint32 {
+	if m != nil {
+		return m.ChannelGroupId
+	}
+	return 0
+}
+
+func (m *Device_ProxyAddress) GetChannelTermination() string {
+	if m != nil {
+		return m.ChannelTermination
+	}
+	return ""
+}
+
+func (m *Device_ProxyAddress) GetOnuId() uint32 {
+	if m != nil {
+		return m.OnuId
+	}
+	return 0
+}
+
+func (m *Device_ProxyAddress) GetOnuSessionId() uint32 {
+	if m != nil {
+		return m.OnuSessionId
+	}
+	return 0
+}
+
+type Devices struct {
+	Items                []*Device `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
+	XXX_unrecognized     []byte    `json:"-"`
+	XXX_sizecache        int32     `json:"-"`
+}
+
+func (m *Devices) Reset()         { *m = Devices{} }
+func (m *Devices) String() string { return proto.CompactTextString(m) }
+func (*Devices) ProtoMessage()    {}
+func (*Devices) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{12}
+}
+func (m *Devices) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Devices.Unmarshal(m, b)
+}
+func (m *Devices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Devices.Marshal(b, m, deterministic)
+}
+func (dst *Devices) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Devices.Merge(dst, src)
+}
+func (m *Devices) XXX_Size() int {
+	return xxx_messageInfo_Devices.Size(m)
+}
+func (m *Devices) XXX_DiscardUnknown() {
+	xxx_messageInfo_Devices.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Devices proto.InternalMessageInfo
+
+func (m *Devices) GetItems() []*Device {
+	if m != nil {
+		return m.Items
+	}
+	return nil
+}
+
+type SimulateAlarmRequest struct {
+	// Device Identifier
+	Id                   string                             `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	Indicator            string                             `protobuf:"bytes,2,opt,name=indicator,proto3" json:"indicator,omitempty"`
+	IntfId               string                             `protobuf:"bytes,3,opt,name=intf_id,json=intfId,proto3" json:"intf_id,omitempty"`
+	PortTypeName         string                             `protobuf:"bytes,4,opt,name=port_type_name,json=portTypeName,proto3" json:"port_type_name,omitempty"`
+	OnuDeviceId          string                             `protobuf:"bytes,5,opt,name=onu_device_id,json=onuDeviceId,proto3" json:"onu_device_id,omitempty"`
+	InverseBitErrorRate  int32                              `protobuf:"varint,6,opt,name=inverse_bit_error_rate,json=inverseBitErrorRate,proto3" json:"inverse_bit_error_rate,omitempty"`
+	Drift                int32                              `protobuf:"varint,7,opt,name=drift,proto3" json:"drift,omitempty"`
+	NewEqd               int32                              `protobuf:"varint,8,opt,name=new_eqd,json=newEqd,proto3" json:"new_eqd,omitempty"`
+	OnuSerialNumber      string                             `protobuf:"bytes,9,opt,name=onu_serial_number,json=onuSerialNumber,proto3" json:"onu_serial_number,omitempty"`
+	Operation            SimulateAlarmRequest_OperationType `protobuf:"varint,10,opt,name=operation,proto3,enum=voltha.SimulateAlarmRequest_OperationType" json:"operation,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                           `json:"-"`
+	XXX_unrecognized     []byte                             `json:"-"`
+	XXX_sizecache        int32                              `json:"-"`
+}
+
+func (m *SimulateAlarmRequest) Reset()         { *m = SimulateAlarmRequest{} }
+func (m *SimulateAlarmRequest) String() string { return proto.CompactTextString(m) }
+func (*SimulateAlarmRequest) ProtoMessage()    {}
+func (*SimulateAlarmRequest) Descriptor() ([]byte, []int) {
+	return fileDescriptor_device_8624dad2b773c06a, []int{13}
+}
+func (m *SimulateAlarmRequest) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_SimulateAlarmRequest.Unmarshal(m, b)
+}
+func (m *SimulateAlarmRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_SimulateAlarmRequest.Marshal(b, m, deterministic)
+}
+func (dst *SimulateAlarmRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SimulateAlarmRequest.Merge(dst, src)
+}
+func (m *SimulateAlarmRequest) XXX_Size() int {
+	return xxx_messageInfo_SimulateAlarmRequest.Size(m)
+}
+func (m *SimulateAlarmRequest) XXX_DiscardUnknown() {
+	xxx_messageInfo_SimulateAlarmRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SimulateAlarmRequest proto.InternalMessageInfo
+
+func (m *SimulateAlarmRequest) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *SimulateAlarmRequest) GetIndicator() string {
+	if m != nil {
+		return m.Indicator
+	}
+	return ""
+}
+
+func (m *SimulateAlarmRequest) GetIntfId() string {
+	if m != nil {
+		return m.IntfId
+	}
+	return ""
+}
+
+func (m *SimulateAlarmRequest) GetPortTypeName() string {
+	if m != nil {
+		return m.PortTypeName
+	}
+	return ""
+}
+
+func (m *SimulateAlarmRequest) GetOnuDeviceId() string {
+	if m != nil {
+		return m.OnuDeviceId
+	}
+	return ""
+}
+
+func (m *SimulateAlarmRequest) GetInverseBitErrorRate() int32 {
+	if m != nil {
+		return m.InverseBitErrorRate
+	}
+	return 0
+}
+
+func (m *SimulateAlarmRequest) GetDrift() int32 {
+	if m != nil {
+		return m.Drift
+	}
+	return 0
+}
+
+func (m *SimulateAlarmRequest) GetNewEqd() int32 {
+	if m != nil {
+		return m.NewEqd
+	}
+	return 0
+}
+
+func (m *SimulateAlarmRequest) GetOnuSerialNumber() string {
+	if m != nil {
+		return m.OnuSerialNumber
+	}
+	return ""
+}
+
+func (m *SimulateAlarmRequest) GetOperation() SimulateAlarmRequest_OperationType {
+	if m != nil {
+		return m.Operation
+	}
+	return SimulateAlarmRequest_RAISE
+}
+
+func init() {
+	proto.RegisterType((*DeviceType)(nil), "voltha.DeviceType")
+	proto.RegisterType((*DeviceTypes)(nil), "voltha.DeviceTypes")
+	proto.RegisterType((*PmConfig)(nil), "voltha.PmConfig")
+	proto.RegisterType((*PmGroupConfig)(nil), "voltha.PmGroupConfig")
+	proto.RegisterType((*PmConfigs)(nil), "voltha.PmConfigs")
+	proto.RegisterType((*Image)(nil), "voltha.Image")
+	proto.RegisterType((*Images)(nil), "voltha.Images")
+	proto.RegisterType((*ImageDownload)(nil), "voltha.ImageDownload")
+	proto.RegisterType((*ImageDownloads)(nil), "voltha.ImageDownloads")
+	proto.RegisterType((*Port)(nil), "voltha.Port")
+	proto.RegisterType((*Port_PeerPort)(nil), "voltha.Port.PeerPort")
+	proto.RegisterType((*Ports)(nil), "voltha.Ports")
+	proto.RegisterType((*Device)(nil), "voltha.Device")
+	proto.RegisterType((*Device_ProxyAddress)(nil), "voltha.Device.ProxyAddress")
+	proto.RegisterType((*Devices)(nil), "voltha.Devices")
+	proto.RegisterType((*SimulateAlarmRequest)(nil), "voltha.SimulateAlarmRequest")
+	proto.RegisterEnum("voltha.PmConfig_PmType", PmConfig_PmType_name, PmConfig_PmType_value)
+	proto.RegisterEnum("voltha.ImageDownload_ImageDownloadState", ImageDownload_ImageDownloadState_name, ImageDownload_ImageDownloadState_value)
+	proto.RegisterEnum("voltha.ImageDownload_ImageDownloadFailureReason", ImageDownload_ImageDownloadFailureReason_name, ImageDownload_ImageDownloadFailureReason_value)
+	proto.RegisterEnum("voltha.ImageDownload_ImageActivateState", ImageDownload_ImageActivateState_name, ImageDownload_ImageActivateState_value)
+	proto.RegisterEnum("voltha.Port_PortType", Port_PortType_name, Port_PortType_value)
+	proto.RegisterEnum("voltha.SimulateAlarmRequest_OperationType", SimulateAlarmRequest_OperationType_name, SimulateAlarmRequest_OperationType_value)
+}
+
+func init() { proto.RegisterFile("voltha_protos/device.proto", fileDescriptor_device_8624dad2b773c06a) }
+
+var fileDescriptor_device_8624dad2b773c06a = []byte{
+	// 2378 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x58, 0x4d, 0x6f, 0xdb, 0xc8,
+	0xf9, 0x8f, 0x64, 0x93, 0x12, 0x1f, 0xbd, 0x98, 0x99, 0x38, 0x09, 0x63, 0xff, 0x0d, 0xe7, 0xaf,
+	0x6c, 0x51, 0x27, 0x69, 0xec, 0x34, 0x29, 0x76, 0x17, 0x05, 0x5a, 0x44, 0x96, 0xe8, 0x44, 0xa8,
+	0x2b, 0x79, 0x47, 0x92, 0xb7, 0xed, 0x85, 0xa0, 0xc5, 0x91, 0x4d, 0x84, 0xe4, 0x28, 0x43, 0xca,
+	0x2f, 0x7b, 0x6a, 0xbb, 0x68, 0x4f, 0xbd, 0x15, 0xe8, 0x67, 0xe8, 0x37, 0xe8, 0xb1, 0xfd, 0x02,
+	0x41, 0xbf, 0x40, 0x4f, 0x3d, 0x14, 0x45, 0x4f, 0x3d, 0xe5, 0x5c, 0xcc, 0x9b, 0x44, 0x3a, 0x69,
+	0x76, 0x7b, 0x21, 0x66, 0x7e, 0xcf, 0xcb, 0xcc, 0xfc, 0x66, 0xe6, 0x79, 0x9e, 0x21, 0x6c, 0x9c,
+	0xd3, 0x28, 0x3b, 0xf3, 0xbd, 0x19, 0xa3, 0x19, 0x4d, 0xf7, 0x02, 0x72, 0x1e, 0x4e, 0xc8, 0xae,
+	0xe8, 0x21, 0x53, 0xca, 0x36, 0xee, 0x9d, 0x52, 0x7a, 0x1a, 0x91, 0x3d, 0x81, 0x9e, 0xcc, 0xa7,
+	0x7b, 0x7e, 0x72, 0x25, 0x55, 0x36, 0xae, 0x99, 0x4f, 0x68, 0x1c, 0xd3, 0x44, 0xc9, 0x9c, 0xa2,
+	0x2c, 0x26, 0x99, 0xaf, 0x24, 0xdb, 0x45, 0x09, 0x9d, 0x91, 0x64, 0x1a, 0xd1, 0x0b, 0xef, 0xfb,
+	0xcf, 0x95, 0xc2, 0xfd, 0xa2, 0xc2, 0x95, 0x9f, 0x9c, 0x7a, 0x74, 0x96, 0x85, 0x34, 0x49, 0xa5,
+	0x46, 0xeb, 0xcf, 0x65, 0x80, 0xae, 0x98, 0xec, 0xe8, 0x6a, 0x46, 0x50, 0x13, 0xca, 0x61, 0xe0,
+	0x94, 0xee, 0x97, 0x76, 0x2c, 0x5c, 0x0e, 0x03, 0xb4, 0x09, 0xd6, 0x39, 0x49, 0x02, 0xca, 0xbc,
+	0x30, 0x70, 0x0c, 0x01, 0x57, 0x25, 0xd0, 0x0b, 0xd0, 0x16, 0xc0, 0x42, 0x98, 0x3a, 0xe6, 0xfd,
+	0x95, 0x1d, 0x0b, 0x5b, 0x5a, 0x9a, 0x22, 0x07, 0x2a, 0x7e, 0xe0, 0xcf, 0x32, 0xc2, 0x9c, 0xb2,
+	0xb0, 0xd4, 0x5d, 0xf4, 0x19, 0x38, 0xfe, 0x64, 0x42, 0x66, 0x59, 0xea, 0x9d, 0xcc, 0xa3, 0xd7,
+	0x9e, 0x98, 0xf4, 0x7c, 0x16, 0xf8, 0x19, 0x71, 0x56, 0xee, 0x97, 0x76, 0xaa, 0xf8, 0xb6, 0x92,
+	0xef, 0xcf, 0xa3, 0xd7, 0x07, 0x11, 0xbd, 0x18, 0x0b, 0x21, 0xea, 0xc2, 0xb6, 0x36, 0xf4, 0x83,
+	0xc0, 0x63, 0x24, 0xa6, 0xe7, 0x24, 0x6f, 0x9e, 0x3a, 0xab, 0xc2, 0x7e, 0x53, 0xa9, 0xb5, 0x83,
+	0x00, 0x0b, 0xa5, 0xa5, 0x93, 0x14, 0x1d, 0xc2, 0x03, 0xed, 0x25, 0x08, 0x19, 0x99, 0x64, 0x5e,
+	0x44, 0x4f, 0xc3, 0x89, 0x1f, 0x09, 0x4f, 0xa9, 0x9e, 0x49, 0x45, 0x78, 0xd2, 0x03, 0x76, 0x85,
+	0xe6, 0xa1, 0x54, 0xe4, 0xde, 0x52, 0xe9, 0xae, 0xf5, 0x19, 0xd4, 0x96, 0x04, 0xa6, 0x68, 0x07,
+	0x8c, 0x30, 0x23, 0x71, 0xea, 0x94, 0xee, 0xaf, 0xec, 0xd4, 0x9e, 0xa1, 0x5d, 0xb9, 0x05, 0xbb,
+	0x4b, 0x1d, 0x2c, 0x15, 0x5a, 0x7f, 0x29, 0x41, 0xf5, 0x28, 0xee, 0xd0, 0x64, 0x1a, 0x9e, 0x22,
+	0x04, 0xab, 0x89, 0x1f, 0x13, 0x45, 0xbd, 0x68, 0xa3, 0xc7, 0xb0, 0x9a, 0x5d, 0xcd, 0x88, 0x60,
+	0xaf, 0xf9, 0xec, 0xae, 0xf6, 0xa4, 0x6d, 0x76, 0x8f, 0x62, 0xe1, 0x4e, 0x28, 0x71, 0xb6, 0x49,
+	0xe2, 0x9f, 0x44, 0x24, 0x50, 0x14, 0xea, 0x2e, 0xda, 0x86, 0x5a, 0xea, 0xc7, 0xb3, 0x88, 0x78,
+	0x53, 0x46, 0xde, 0x08, 0x82, 0x1a, 0x18, 0x24, 0x74, 0xc0, 0xc8, 0x9b, 0xd6, 0xe7, 0x60, 0x4a,
+	0x57, 0xa8, 0x06, 0x95, 0xce, 0x60, 0xdc, 0x1f, 0xb9, 0xd8, 0xbe, 0x81, 0x2c, 0x30, 0x5e, 0xb6,
+	0xc7, 0x2f, 0x5d, 0xbb, 0xc4, 0x9b, 0xc3, 0x51, 0x7b, 0xe4, 0xda, 0x65, 0xa9, 0xd2, 0x1f, 0xb9,
+	0x3f, 0x1b, 0xd9, 0x2b, 0xad, 0xdf, 0x97, 0xa0, 0x71, 0x14, 0xbf, 0x64, 0x74, 0x3e, 0x53, 0xeb,
+	0xd8, 0x02, 0x38, 0xe5, 0x5d, 0x2f, 0xb7, 0x1a, 0x4b, 0x20, 0x7d, 0xbe, 0xa4, 0x85, 0x58, 0x4c,
+	0xa5, 0x2c, 0xa6, 0x22, 0xc5, 0x7c, 0x26, 0x1f, 0x59, 0xc4, 0x23, 0xa8, 0xc4, 0x24, 0x63, 0xe1,
+	0x84, 0xef, 0x30, 0x27, 0xd6, 0xbe, 0x4e, 0x07, 0xd6, 0x0a, 0xad, 0x7f, 0x94, 0xc0, 0xd2, 0x68,
+	0xfa, 0xde, 0x91, 0xfe, 0x7f, 0xa8, 0x07, 0x64, 0xea, 0xcf, 0xa3, 0x2c, 0x3f, 0x89, 0x9a, 0xc2,
+	0xc4, 0x34, 0xb6, 0xa1, 0x22, 0xe6, 0xa4, 0xa7, 0xb1, 0x6f, 0xfc, 0xf3, 0xdd, 0xdb, 0xad, 0x12,
+	0xd6, 0x28, 0x7a, 0x04, 0x0d, 0x6e, 0xeb, 0xd1, 0x73, 0xc2, 0x58, 0x18, 0x10, 0x79, 0xea, 0xb4,
+	0x5a, 0x9d, 0xcb, 0x06, 0x4a, 0x84, 0x9e, 0x80, 0x29, 0xcc, 0x52, 0xc7, 0x10, 0x13, 0xbf, 0xbd,
+	0x9c, 0x78, 0x8e, 0x38, 0xac, 0x94, 0xf2, 0x0b, 0x35, 0xbf, 0x69, 0xa1, 0x7f, 0x2d, 0x81, 0xd1,
+	0x8b, 0xfd, 0x53, 0xf2, 0xc1, 0xe3, 0xe3, 0x40, 0xe5, 0x9c, 0xb0, 0x34, 0xa4, 0x89, 0xbe, 0x7f,
+	0xaa, 0xcb, 0xb5, 0xcf, 0xfc, 0xf4, 0x4c, 0x2c, 0xce, 0xc2, 0xa2, 0x8d, 0x1e, 0x82, 0x1d, 0x26,
+	0x69, 0xe6, 0x47, 0x91, 0xc7, 0x8f, 0x75, 0x16, 0xc6, 0x72, 0x55, 0x16, 0x5e, 0x53, 0x78, 0x57,
+	0xc1, 0x3c, 0x28, 0x84, 0xa9, 0xe7, 0x4f, 0xb2, 0xf0, 0x9c, 0x88, 0xa0, 0x50, 0xc5, 0xd5, 0x30,
+	0x6d, 0x8b, 0x3e, 0xa7, 0x37, 0x4c, 0x3d, 0x1e, 0xc0, 0xc2, 0x2c, 0x23, 0x81, 0x63, 0x0a, 0x79,
+	0x2d, 0x4c, 0x3b, 0x1a, 0x42, 0xf7, 0xa0, 0x1a, 0xa6, 0xde, 0xb9, 0x1f, 0x85, 0x81, 0xba, 0x64,
+	0x95, 0x30, 0x3d, 0xe6, 0xdd, 0xd6, 0x13, 0x30, 0xc5, 0x82, 0x52, 0xf4, 0x00, 0x8c, 0x90, 0xb7,
+	0xd4, 0x3d, 0x6a, 0x68, 0x16, 0x84, 0x18, 0x4b, 0x59, 0xeb, 0x5f, 0x15, 0x68, 0x08, 0xa0, 0x4b,
+	0x2f, 0x92, 0x88, 0xfa, 0xc1, 0x7b, 0xbb, 0xad, 0x89, 0x29, 0xe7, 0x88, 0xb1, 0x61, 0x65, 0xce,
+	0x22, 0xb5, 0x7a, 0xde, 0xe4, 0xc8, 0x84, 0x4d, 0xd4, 0xd5, 0xe0, 0x4d, 0x34, 0x80, 0x66, 0xa0,
+	0x7c, 0x7a, 0x69, 0xc6, 0xc3, 0x81, 0x21, 0x6e, 0xe1, 0x4e, 0x61, 0x1e, 0x7a, 0xd8, 0x62, 0x6f,
+	0xc8, 0xf5, 0x71, 0x23, 0xc8, 0x77, 0xd1, 0x03, 0x68, 0x88, 0x39, 0x7b, 0x7a, 0x4f, 0x4c, 0x31,
+	0x7c, 0x5d, 0x80, 0xc7, 0x6a, 0x63, 0x1e, 0x82, 0xad, 0xad, 0x48, 0xe0, 0x9d, 0x5c, 0xf1, 0x80,
+	0x56, 0x11, 0x93, 0x5a, 0x5b, 0xe2, 0xfb, 0x1c, 0x46, 0xaf, 0xc0, 0x64, 0xc4, 0x4f, 0x69, 0xe2,
+	0x54, 0xc5, 0xc4, 0x9e, 0x7e, 0x8b, 0x89, 0x1d, 0xf8, 0x61, 0x34, 0x67, 0x04, 0x0b, 0x3b, 0xac,
+	0xec, 0xd1, 0x77, 0x61, 0xcd, 0x0f, 0x82, 0x90, 0x67, 0x05, 0x3f, 0xf2, 0xc2, 0x64, 0x4a, 0x1d,
+	0x4b, 0xcc, 0xad, 0xb9, 0x84, 0x7b, 0xc9, 0x94, 0xca, 0x40, 0x72, 0x4e, 0xbc, 0x89, 0x38, 0x86,
+	0x0e, 0x88, 0xad, 0x03, 0x0e, 0xa9, 0xcb, 0xbf, 0x09, 0x56, 0x44, 0x79, 0x1c, 0x0d, 0x42, 0xe6,
+	0xd4, 0x64, 0xb6, 0x10, 0x40, 0x37, 0x64, 0xa8, 0x07, 0x35, 0x49, 0x80, 0xa4, 0xb3, 0xfe, 0x8d,
+	0x74, 0x8a, 0x03, 0xe5, 0x67, 0x44, 0xd2, 0x09, 0xc2, 0x58, 0x72, 0xb9, 0x09, 0xd6, 0x34, 0x8c,
+	0x88, 0x97, 0x86, 0x5f, 0x11, 0xa7, 0x21, 0xf8, 0xa9, 0x72, 0x60, 0x18, 0x7e, 0x45, 0x5a, 0x7f,
+	0x2a, 0x01, 0x7a, 0x7f, 0x3b, 0xd0, 0x3a, 0xd8, 0xdd, 0xc1, 0x97, 0xfd, 0xc3, 0x41, 0xbb, 0xeb,
+	0x8d, 0xfb, 0x3f, 0xe9, 0x0f, 0xbe, 0xec, 0xdb, 0x37, 0xd0, 0x1d, 0x40, 0x0b, 0x74, 0x38, 0xee,
+	0x74, 0x5c, 0xb7, 0xeb, 0x76, 0xed, 0x52, 0x01, 0xc7, 0xee, 0x17, 0x63, 0x77, 0x38, 0x72, 0xbb,
+	0x76, 0xb9, 0xe0, 0x65, 0x38, 0x6a, 0x63, 0x8e, 0xae, 0xa0, 0x5b, 0xb0, 0xb6, 0x40, 0x0f, 0xda,
+	0xbd, 0x43, 0xb7, 0x6b, 0xaf, 0x22, 0x07, 0xd6, 0x73, 0x03, 0x0e, 0xc7, 0x47, 0x47, 0x03, 0xa1,
+	0x6e, 0x14, 0x9c, 0x77, 0xda, 0xfd, 0x8e, 0x7b, 0xc8, 0x2d, 0xcc, 0xd6, 0x6f, 0x4b, 0xb0, 0xf1,
+	0xdf, 0xf7, 0x0b, 0xd5, 0xa1, 0xda, 0x1f, 0x78, 0x2e, 0xc6, 0x03, 0x1e, 0x9d, 0xd7, 0xa0, 0xd6,
+	0xeb, 0x1f, 0xb7, 0x0f, 0x7b, 0x5d, 0x6f, 0x8c, 0x0f, 0xed, 0x12, 0x07, 0xba, 0xee, 0x71, 0xaf,
+	0xe3, 0x7a, 0xfb, 0xe3, 0xe1, 0xcf, 0xed, 0x32, 0x1f, 0xa6, 0xd7, 0x1f, 0x8e, 0x0f, 0x0e, 0x7a,
+	0x9d, 0x9e, 0xdb, 0x1f, 0x79, 0xc3, 0xa3, 0x76, 0xc7, 0xb5, 0x57, 0xd0, 0x4d, 0x68, 0x28, 0x02,
+	0x94, 0xb3, 0x55, 0xd4, 0x00, 0x6b, 0x39, 0x11, 0xa3, 0xf5, 0x3b, 0x4d, 0x61, 0x61, 0x0b, 0xb8,
+	0x61, 0xef, 0xa7, 0xed, 0x97, 0x6e, 0x8e, 0x3f, 0x04, 0x4d, 0x09, 0xf5, 0xfa, 0xed, 0xce, 0xa8,
+	0x77, 0xcc, 0x93, 0xc5, 0x3a, 0xd8, 0x12, 0x13, 0x48, 0x7b, 0xd4, 0xeb, 0xbf, 0xb4, 0xcb, 0xc8,
+	0x86, 0x7a, 0x0e, 0x75, 0x25, 0x6b, 0x12, 0xc1, 0xee, 0xb1, 0x8b, 0x85, 0xda, 0xea, 0xd2, 0xa1,
+	0x04, 0xf9, 0x74, 0x7e, 0x68, 0xfc, 0xfb, 0xdd, 0xdb, 0xad, 0x1b, 0xad, 0x1f, 0x41, 0xb3, 0xc0,
+	0x4e, 0x8a, 0x1e, 0xeb, 0x5c, 0x5b, 0x2e, 0x46, 0xd6, 0x82, 0x9a, 0x4e, 0xb7, 0x7f, 0x30, 0x60,
+	0xf5, 0x88, 0xb2, 0x0c, 0xdd, 0x85, 0xca, 0x8c, 0xb2, 0xcc, 0x4b, 0xa8, 0x88, 0x13, 0x0d, 0x6c,
+	0xf2, 0x6e, 0x9f, 0xa2, 0x75, 0x30, 0x22, 0xff, 0x84, 0x44, 0x2a, 0x58, 0xc8, 0x0e, 0x7a, 0xa8,
+	0xb2, 0xf0, 0x8a, 0x38, 0xb0, 0xcb, 0xe8, 0x4d, 0x59, 0x26, 0x3e, 0xb9, 0x1c, 0xfc, 0x63, 0xa8,
+	0xf9, 0x41, 0x1c, 0x26, 0x85, 0x88, 0xb1, 0xa5, 0x2d, 0xda, 0x5c, 0x24, 0x98, 0xcc, 0x35, 0x31,
+	0xf8, 0x8b, 0x36, 0xb7, 0xa7, 0x33, 0xc2, 0x84, 0xf9, 0x3c, 0x15, 0x11, 0x22, 0x67, 0x3f, 0x98,
+	0x11, 0x36, 0x14, 0x92, 0x5c, 0x13, 0x03, 0x5d, 0xb4, 0xf9, 0xbd, 0x90, 0x85, 0xa7, 0xa7, 0x22,
+	0xab, 0x85, 0xab, 0x12, 0xe8, 0x05, 0x9c, 0xac, 0x19, 0x21, 0x2c, 0x75, 0xaa, 0xd7, 0xd2, 0x90,
+	0x58, 0x08, 0x21, 0x8c, 0x37, 0xb0, 0xd4, 0xe1, 0x79, 0x9a, 0x5d, 0x7a, 0x33, 0x7f, 0xf2, 0x9a,
+	0x64, 0xa9, 0x08, 0x07, 0x26, 0xb6, 0xd8, 0xe5, 0x91, 0x04, 0x78, 0x04, 0x67, 0x97, 0x2a, 0x3e,
+	0x81, 0x10, 0x56, 0xd8, 0xa5, 0x8c, 0x4b, 0x9b, 0x60, 0xb1, 0x4b, 0x8f, 0x30, 0x46, 0x59, 0x2a,
+	0x62, 0x80, 0x89, 0xab, 0xec, 0xd2, 0x15, 0x7d, 0xee, 0x36, 0x5b, 0xba, 0xad, 0x4b, 0xb7, 0x59,
+	0xde, 0x6d, 0xa6, 0xdd, 0x36, 0xa4, 0xdb, 0x6c, 0xe9, 0x36, 0x5b, 0xb8, 0x6d, 0x4a, 0xb7, 0x99,
+	0x72, 0xbb, 0xf1, 0x02, 0xaa, 0x7a, 0x01, 0x45, 0x0e, 0x4a, 0xd7, 0x38, 0xc8, 0x6d, 0x7d, 0x39,
+	0xbf, 0xf5, 0xad, 0x14, 0xaa, 0x7a, 0x2f, 0x79, 0x85, 0xb3, 0x3c, 0xe0, 0x36, 0xd4, 0xdd, 0xd1,
+	0x2b, 0x17, 0xf7, 0xdd, 0x91, 0xd7, 0xef, 0xf7, 0xec, 0x52, 0x01, 0x19, 0xf7, 0x7b, 0xb2, 0x24,
+	0x3a, 0x1a, 0xf4, 0xbd, 0xc1, 0xe1, 0xc8, 0x5e, 0x59, 0x74, 0xfa, 0x63, 0x79, 0xaf, 0x8e, 0x5d,
+	0xae, 0xc8, 0x65, 0x46, 0xae, 0xdb, 0x1f, 0xdb, 0xa6, 0x3e, 0xd7, 0x8f, 0xc1, 0xe0, 0x63, 0xa7,
+	0xa8, 0x55, 0x2c, 0x1d, 0xeb, 0xf9, 0x1d, 0xd2, 0xa7, 0xf8, 0x6f, 0x75, 0x30, 0x65, 0x29, 0x89,
+	0x6e, 0x2f, 0x53, 0x9d, 0xae, 0x3c, 0x78, 0xc6, 0xbb, 0x97, 0xab, 0x1a, 0x17, 0x02, 0x79, 0x3e,
+	0xef, 0xc1, 0x2a, 0xa3, 0x34, 0x2b, 0x16, 0x35, 0x02, 0x42, 0x2d, 0xb0, 0x66, 0x3e, 0x23, 0x49,
+	0xc6, 0x69, 0x5b, 0xcd, 0x9b, 0x56, 0x25, 0x2e, 0x4e, 0x50, 0x53, 0xe9, 0x68, 0x12, 0xd7, 0x39,
+	0x89, 0x8b, 0xb2, 0x47, 0x0a, 0x8f, 0xe4, 0x65, 0xda, 0x02, 0x53, 0x3e, 0x05, 0xe4, 0xb3, 0x41,
+	0x2b, 0x29, 0x10, 0x6d, 0x82, 0x11, 0xd3, 0x80, 0x44, 0x32, 0x0d, 0x6a, 0xa9, 0xc4, 0xd0, 0x53,
+	0xb0, 0xcf, 0x7c, 0x16, 0x5c, 0xf8, 0x6c, 0x99, 0x2e, 0x2b, 0x79, 0xbd, 0x35, 0x2d, 0xd6, 0x89,
+	0xf3, 0x29, 0xd8, 0xd3, 0x90, 0xc5, 0x05, 0x8b, 0x6a, 0xc1, 0x42, 0x8b, 0xb5, 0xc5, 0x13, 0x30,
+	0x45, 0x46, 0x91, 0xa7, 0xbb, 0xf6, 0xac, 0x59, 0x08, 0x1e, 0xe9, 0x62, 0xbe, 0x52, 0x89, 0x57,
+	0x7c, 0x29, 0x61, 0xa1, 0x1f, 0x79, 0xc9, 0x3c, 0x3e, 0x21, 0x4c, 0x1c, 0xfb, 0x85, 0xf7, 0xba,
+	0x94, 0xf5, 0x85, 0x88, 0x73, 0xb9, 0x7c, 0x34, 0x39, 0x05, 0x2e, 0x17, 0x6f, 0xa7, 0xed, 0xe5,
+	0xe3, 0xa8, 0x96, 0xd7, 0x58, 0xbc, 0x91, 0x10, 0xac, 0x9e, 0x47, 0x7e, 0x22, 0x2e, 0x49, 0x03,
+	0x8b, 0x36, 0x4f, 0xc0, 0xb1, 0x3f, 0xe1, 0x4f, 0x1f, 0x46, 0x52, 0x79, 0x45, 0x2c, 0x0c, 0xb1,
+	0x3f, 0x69, 0x4b, 0x04, 0x3d, 0x80, 0x7a, 0x38, 0x3b, 0xff, 0xc1, 0x42, 0x83, 0x5f, 0x14, 0xeb,
+	0xd5, 0x0d, 0x5c, 0xe3, 0x68, 0x51, 0xe9, 0xd3, 0x85, 0xd2, 0x5a, 0x4e, 0xe9, 0x53, 0xad, 0xf4,
+	0x09, 0x34, 0xce, 0x68, 0x9a, 0x79, 0x7e, 0x12, 0x88, 0xdd, 0x76, 0x6e, 0x6b, 0x2d, 0x0e, 0xb7,
+	0x93, 0x40, 0x5c, 0xb6, 0x2d, 0x00, 0x72, 0x99, 0x31, 0xdf, 0xf3, 0xd9, 0x69, 0xea, 0xdc, 0x95,
+	0xd5, 0xbe, 0x40, 0xda, 0xec, 0x34, 0x45, 0x2f, 0xa0, 0x31, 0x63, 0xf4, 0xf2, 0x6a, 0x31, 0xd4,
+	0x2d, 0x41, 0xf5, 0x66, 0xf1, 0x4d, 0xb4, 0x7b, 0xc4, 0x75, 0xd4, 0xc0, 0xb8, 0x3e, 0xcb, 0xf5,
+	0xae, 0x47, 0x54, 0xfb, 0x7f, 0x8d, 0xa8, 0x6e, 0x31, 0xa2, 0xde, 0xfc, 0x16, 0x11, 0x55, 0xef,
+	0x44, 0x3e, 0xb0, 0x6e, 0x2d, 0x8a, 0xad, 0x3b, 0x85, 0xc3, 0xac, 0x2a, 0xa8, 0x2f, 0xa0, 0x39,
+	0xa1, 0x49, 0xc2, 0x5f, 0x92, 0x6a, 0x20, 0x24, 0x06, 0x7a, 0xa0, 0x07, 0xea, 0x48, 0xa9, 0x1a,
+	0xab, 0xd0, 0xd3, 0xbe, 0x1a, 0x93, 0x3c, 0x8a, 0xbe, 0x07, 0xe6, 0x64, 0x9e, 0x66, 0x34, 0x76,
+	0x5e, 0x08, 0xce, 0xd6, 0x77, 0xe5, 0xcf, 0x83, 0x5d, 0xfd, 0xf3, 0x60, 0xb7, 0x9d, 0x5c, 0x61,
+	0xa5, 0x83, 0x9e, 0x83, 0xc1, 0x37, 0x29, 0x75, 0x7e, 0xf9, 0x81, 0xd0, 0xb1, 0xdf, 0xfc, 0xfb,
+	0xbb, 0xb7, 0x5b, 0xd6, 0x22, 0xf4, 0x61, 0xa9, 0x8b, 0x9e, 0x82, 0x21, 0xde, 0xbb, 0xce, 0xaf,
+	0x4a, 0x62, 0x08, 0xb4, 0x9b, 0xff, 0x81, 0x20, 0x9e, 0xb8, 0xfb, 0x06, 0x37, 0xbd, 0x81, 0xa5,
+	0x22, 0x7a, 0x01, 0x35, 0x21, 0x56, 0xef, 0x99, 0x5f, 0x4b, 0xbb, 0xbb, 0xef, 0xd9, 0x89, 0x77,
+	0xcd, 0xc2, 0x18, 0xa6, 0x0b, 0x08, 0x7d, 0x0e, 0x30, 0x8b, 0x55, 0x01, 0x99, 0x3a, 0x5f, 0x4b,
+	0x07, 0x37, 0xaf, 0xbf, 0x70, 0x16, 0xa6, 0xd6, 0x6c, 0xf1, 0x8c, 0x3b, 0x84, 0x35, 0x59, 0x3e,
+	0xea, 0x42, 0x38, 0x75, 0x7e, 0x53, 0xfa, 0x48, 0xda, 0xdf, 0xaf, 0x71, 0x17, 0xa6, 0x2c, 0xff,
+	0x71, 0x33, 0x2c, 0x54, 0x0e, 0x1b, 0x5f, 0x97, 0xa1, 0x9e, 0x3f, 0x76, 0x1f, 0x4f, 0x1b, 0xdb,
+	0x50, 0x53, 0xc2, 0x65, 0x64, 0xc5, 0x10, 0x2c, 0x7f, 0x9b, 0x6c, 0x01, 0x4c, 0xce, 0xfc, 0x24,
+	0x21, 0x11, 0x37, 0x5f, 0x91, 0xcf, 0x5a, 0x85, 0xf4, 0x02, 0xb4, 0x03, 0xb6, 0x16, 0xcb, 0xd7,
+	0xaf, 0x8a, 0xb1, 0x0d, 0xdc, 0x54, 0xb8, 0xa0, 0xa7, 0x17, 0xa0, 0x3d, 0xb8, 0xa5, 0x35, 0x33,
+	0xc2, 0xe2, 0x30, 0xf1, 0x79, 0xfd, 0xad, 0xfe, 0xbc, 0x20, 0x25, 0x1a, 0x2d, 0x25, 0xe8, 0x36,
+	0x98, 0x34, 0x99, 0x73, 0x87, 0xa6, 0x70, 0x68, 0xd0, 0x64, 0xde, 0x0b, 0xd0, 0x27, 0xd0, 0xe4,
+	0x70, 0x4a, 0x52, 0x1e, 0xec, 0x74, 0x39, 0xd0, 0xc0, 0x75, 0x9a, 0xcc, 0x87, 0x12, 0xec, 0x05,
+	0x2a, 0x01, 0xed, 0x5b, 0x3c, 0x16, 0x09, 0x1a, 0x5a, 0x7b, 0x50, 0x91, 0x97, 0x92, 0x47, 0x80,
+	0x42, 0x36, 0x6a, 0x16, 0x2f, 0xad, 0xce, 0x47, 0x7f, 0x5c, 0x81, 0xf5, 0x61, 0x18, 0xcf, 0x23,
+	0x3f, 0x23, 0xed, 0xc8, 0x67, 0x31, 0x26, 0x6f, 0xe6, 0x24, 0xcd, 0xde, 0x7b, 0x88, 0xfd, 0x1f,
+	0x58, 0x61, 0x12, 0x84, 0x13, 0x3f, 0xa3, 0xfa, 0x7f, 0xd0, 0x12, 0xe0, 0x89, 0x39, 0x4c, 0xb2,
+	0xa9, 0x66, 0xcf, 0xc2, 0x26, 0xef, 0xca, 0x85, 0x88, 0x63, 0xcb, 0x89, 0x97, 0xff, 0x14, 0xe4,
+	0xa3, 0xb4, 0x3e, 0x53, 0xe9, 0x5a, 0xfc, 0x56, 0x68, 0x41, 0x83, 0x2f, 0x77, 0xb9, 0x83, 0x92,
+	0xb0, 0x1a, 0x4d, 0xe6, 0x5d, 0xbd, 0x89, 0xcf, 0xe1, 0x4e, 0x98, 0xf0, 0xdc, 0x40, 0xbc, 0x93,
+	0x30, 0x93, 0xa5, 0x84, 0xc7, 0x78, 0x54, 0xe1, 0xcc, 0x19, 0xf8, 0x96, 0x92, 0xee, 0x87, 0x99,
+	0x28, 0x2b, 0xb0, 0x7c, 0x35, 0x18, 0x01, 0x0b, 0xa7, 0x99, 0xa0, 0xcf, 0xc0, 0xb2, 0xc3, 0x67,
+	0x9b, 0x90, 0x0b, 0x8f, 0xbc, 0x09, 0x44, 0x92, 0x31, 0xb0, 0x99, 0x90, 0x0b, 0xf7, 0x4d, 0x80,
+	0x1e, 0xc1, 0x4d, 0x49, 0x7b, 0x3e, 0x53, 0xc8, 0xc7, 0xd4, 0x9a, 0x60, 0x3e, 0x97, 0x25, 0x5e,
+	0x81, 0xc5, 0x23, 0x8c, 0xdc, 0x60, 0x10, 0xf1, 0xe2, 0x91, 0xe6, 0xf8, 0x43, 0x8c, 0x8a, 0x10,
+	0x25, 0xb4, 0x45, 0xc5, 0xb9, 0x34, 0x6e, 0x7d, 0x07, 0x1a, 0x05, 0x19, 0xb2, 0xc0, 0xc0, 0xed,
+	0xde, 0xd0, 0x95, 0x3f, 0x71, 0x3a, 0x87, 0x6e, 0x1b, 0xdb, 0xa5, 0xfd, 0x27, 0xbf, 0x78, 0x7c,
+	0x1a, 0x66, 0x67, 0xf3, 0x93, 0xdd, 0x09, 0x8d, 0xc5, 0xcf, 0xc2, 0x09, 0x65, 0xc1, 0x9e, 0x1c,
+	0xf2, 0x89, 0xfa, 0x45, 0x78, 0x4a, 0x15, 0x70, 0x62, 0x0a, 0xe4, 0xf9, 0x7f, 0x02, 0x00, 0x00,
+	0xff, 0xff, 0x64, 0xd9, 0xf9, 0x5b, 0xda, 0x14, 0x00, 0x00,
+}
diff --git a/go/voltha/device.proto b/go/voltha/device.proto
deleted file mode 100644
index bbe8894..0000000
--- a/go/voltha/device.proto
+++ /dev/null
@@ -1,329 +0,0 @@
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/voltha";
-
-package voltha;
-
-import "google/protobuf/any.proto";
-import "voltha_protos/common.proto";
-import "voltha_protos/meta.proto";
-import "voltha_protos/openflow_13.proto";
-import "voltha_protos/yang_options.proto";
-
-// A Device Type
-message DeviceType {
-
-    // Unique name for the device type
-    string id = 1;
-
-    // Unique vendor id for the device type applicable to ONU
-    // 4 bytes of vendor id from ONU serial number
-    string vendor_id = 5;
-
-    repeated string vendor_ids = 6;
-
-    // Name of the adapter that handles device type
-    string adapter = 2;
-
-    // Capabilities
-    bool accepts_bulk_flow_update = 3;
-    bool accepts_add_remove_flow_updates = 4;
-    bool accepts_direct_logical_flows_update = 7;
-
-}
-
-// A plurality of device types
-message DeviceTypes {
-    repeated DeviceType items = 1;
-}
-
-message PmConfig {
-    enum PmType {
-        COUNTER = 0;
-        GAUGE = 1;
-        STATE = 2;
-        CONTEXT = 3;
-    }
-    string name = 1;
-    PmType type = 2;
-    bool enabled = 3; // Whether or not this metric makes it to Kafka
-    uint32 sample_freq = 4; // Sample rate in 10ths of a second
-}
-
-message PmGroupConfig {
-    string group_name = 1;
-    uint32 group_freq = 2; // Frequency applicable to the grop
-    bool enabled = 3; // Enable/disable group level only
-    repeated PmConfig metrics = 4;
-}
-
-message PmConfigs {
-    string id = 1; // To work around a chameleon POST bug
-    uint32 default_freq = 2; // Default sample rate
-    // Forces group names and group semantics
-    bool grouped = 3 [(access) = READ_ONLY];
-    // Allows Pm to set an individual sample frequency
-    bool freq_override = 4 [(access) = READ_ONLY];
-    repeated PmGroupConfig groups = 5; // The groups if grouped is true
-    repeated PmConfig metrics = 6; // The metrics themselves if grouped is false.
-}
-
-// Describes instance of software image on the device
-message Image {
-    string name = 1;                // software patch name
-    string version = 2;             // version of software
-    string hash = 3;                // md5 hash
-    string install_datetime = 4;    // combined date and time expressed in UTC.
-                                    // use ISO 8601 format for date and time
-
-    // The active software image is one that is currently loaded and executing
-    // in the ONU or circuit pack. Under normal operation, one software image
-    // is always active while the other is inactive. Under no circumstances are
-    // both software images allowed to be active at the same time
-    bool is_active = 5;             // True if the image is active
-
-    // The committed software image is loaded and executed upon reboot of the
-    // ONU and/or circuit pack. During normal operation, one software image is
-    // always committed, while the other is uncommitted.
-    bool is_committed = 6;          // True if the image is committed
-
-    // A software image is valid if it has been verified to be an executable
-    // code image. The verification mechanism is not subject to standardization;
-    // however, it should include at least a data integrity (e.g., CRC) check of
-    // the entire code image.
-    bool is_valid = 7;              // True if the image is valid
-}
-
-// List of software on the device
-message Images {
-    repeated Image image = 1;
-}
-
-message ImageDownload {
-    option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
-
-    enum ImageDownloadState {
-        DOWNLOAD_UNKNOWN = 0;
-        DOWNLOAD_SUCCEEDED = 1;
-        DOWNLOAD_REQUESTED = 2;
-        DOWNLOAD_STARTED = 3;
-        DOWNLOAD_FAILED = 4;
-        DOWNLOAD_UNSUPPORTED = 5;
-        DOWNLOAD_CANCELLED = 6;
-    }
-
-    enum ImageDownloadFailureReason {
-        NO_ERROR = 0;
-        INVALID_URL = 1;
-        DEVICE_BUSY = 2;
-        INSUFFICIENT_SPACE = 3;
-        UNKNOWN_ERROR = 4;
-        CANCELLED = 5;
-    }
-
-    enum ImageActivateState {
-        IMAGE_UNKNOWN = 0;
-        IMAGE_INACTIVE = 1;
-        IMAGE_ACTIVATING = 2;
-        IMAGE_ACTIVE = 3;
-        IMAGE_REVERTING = 4;
-        IMAGE_REVERTED = 5;
-    }
-
-    // Device Identifier
-    string id = 1;
-
-    // Image unique identifier
-    string name = 2;
-
-    // URL where the image is available
-    // should include username password
-    string url = 3;
-
-    // CRC of the image to be verified aginst
-    uint32 crc = 4;
-
-    // Download state
-    ImageDownloadState download_state = 5;
-
-    // Downloaded version
-    string image_version = 6;
-
-    // Bytes downloaded
-    uint32 downloaded_bytes = 7;
-
-    // Download failure reason
-    ImageDownloadFailureReason reason= 8;
-
-    // Additional info
-    string additional_info = 9;
-
-    // Save current configuration
-    bool save_config = 10;
-
-    // Image local location
-    string local_dir = 11;
-
-    // Image activation state
-    ImageActivateState image_state = 12;
-    
-    // Image file size
-    uint32 file_size = 13;
-}
-
-message ImageDownloads {
-    repeated ImageDownload items = 2;
-}
-
-message Port {
-    option (voltha.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
-
-    enum PortType {
-        UNKNOWN = 0;
-        ETHERNET_NNI = 1;
-        ETHERNET_UNI = 2;
-        PON_OLT = 3;
-        PON_ONU = 4;
-        VENET_OLT = 5;
-        VENET_ONU = 6;
-    }
-
-    uint32 port_no = 1;  // Device-unique port number
-
-    string label = 2;  // Arbitrary port label
-
-    PortType type = 3;  //  Type of port
-
-    AdminState.AdminState admin_state = 5;
-
-    OperStatus.OperStatus oper_status = 6;
-
-    string device_id = 7;  // Unique .id of device that owns this port
-
-    message PeerPort {
-        string device_id = 1;
-        uint32 port_no = 2;
-    }
-    repeated PeerPort peers = 8;
-
-    fixed64 rx_packets = 9;
-    fixed64 rx_bytes = 10;
-    fixed64 rx_errors = 11;
-    fixed64 tx_packets = 12;
-    fixed64 tx_bytes = 13;
-    fixed64 tx_errors = 14;
-
-}
-
-message Ports {
-    repeated Port items = 1;
-}
-
-// A Physical Device instance
-message Device {
-    option (voltha.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
-
-    // Voltha's device identifier
-    string id = 1 [(access) = READ_ONLY];
-
-    // Device type, refers to one of the registered device types
-    string type = 2 [(access) = READ_ONLY];
-
-    // Is this device a root device. Each logical switch has one root
-    // device that is associated with the logical flow switch.
-    bool root = 3 [(access) = READ_ONLY];
-
-    // Parent device id, in the device tree (for a root device, the parent_id
-    // is the logical_device.id)
-    string parent_id = 4 [(access) = READ_ONLY];
-    uint32 parent_port_no = 20 [(access) = READ_ONLY];
-
-    // Vendor, version, serial number, etc.
-    string vendor = 5 [(access) = READ_ONLY];
-    string model = 6 [(access) = READ_ONLY];
-    string hardware_version = 7 [(access) = READ_ONLY];
-    string firmware_version = 8 [(access) = READ_ONLY];
-    // List of software on the device
-    Images images = 9 [(access) = READ_ONLY];
-    string serial_number = 10 [(access) = READ_ONLY];
-    string vendor_id = 24 [(access) = READ_ONLY];
-
-    // Addapter that takes care of device
-    string adapter = 11 [(access) = READ_ONLY];
-
-    // Device contact on vlan (if 0, no vlan)
-    uint32 vlan = 12;
-
-    message ProxyAddress {
-        string device_id = 1;  // Which device to use as proxy to this device
-        string device_type = 2; // The device type of the proxy device to use as the adapter name
-        uint32 channel_id = 3;  // Sub-address within proxy
-        uint32 channel_group_id = 4; // Channel Group index
-        string channel_termination = 5; // Channel Termination name
-        uint32 onu_id = 6; // onu identifier; optional
-        uint32 onu_session_id = 7; // session identifier for the ONU; optional
-    };
-
-    // Device contact MAC address (format: "xx:xx:xx:xx:xx:xx")
-    string mac_address = 13;
-
-    oneof address {
-
-        // Device contact IPv4 address (format: "a.b.c.d" or can use hostname too)
-        string ipv4_address = 14;
-
-        // Device contact IPv6 address using the canonical string form
-        // ("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx")
-        string ipv6_address = 15;
-
-        string host_and_port = 21;
-
-    };
-    string extra_args = 23;  // Used to pass additional device specific arguments
-
-    ProxyAddress proxy_address = 19;
-
-    AdminState.AdminState admin_state = 16;
-
-    OperStatus.OperStatus oper_status = 17 [(access) = READ_ONLY];
-
-    string reason = 22 [(access) = READ_ONLY];  //  Used in FAILED state
-
-    ConnectStatus.ConnectStatus connect_status = 18 [(access) = READ_ONLY];
-
-    // TODO additional common attribute here
-
-    // Device type specific attributes
-    google.protobuf.Any custom = 64;
-
-    repeated Port ports = 128  [(child_node) = {key: "port_no"}];
-    openflow_13.Flows flows = 129 [(child_node) = {}];
-    openflow_13.FlowGroups flow_groups = 130 [(child_node) = {}];
-    // PmConfigs will eventually converted to a child node of the
-    // device to falicitata callbacks and to simplify manipulation.
-    PmConfigs pm_configs = 131 [(child_node) = {}];
-
-    repeated ImageDownload image_downloads = 133 [(child_node) = {key: "name"}];
-}
-
-message Devices {
-    repeated Device items = 1;
-}
-
-message SimulateAlarmRequest {
-    enum OperationType {
-        RAISE = 0;
-        CLEAR = 1;
-    }
-    // Device Identifier
-    string id = 1;
-    string indicator = 2;
-    string intf_id = 3;
-    string port_type_name = 4;
-    string onu_device_id = 5;
-    int32 inverse_bit_error_rate = 6;
-    int32 drift = 7;
-    int32 new_eqd = 8;
-    string onu_serial_number = 9;
-    OperationType operation = 10;
-}
diff --git a/go/voltha/events.pb.go b/go/voltha/events.pb.go
new file mode 100644
index 0000000..cb08d90
--- /dev/null
+++ b/go/voltha/events.pb.go
@@ -0,0 +1,969 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/events.proto
+
+package voltha // import "github.com/opencord/voltha-protos/go/voltha"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import _ "github.com/opencord/voltha-protos/go/common"
+import _ "google.golang.org/genproto/googleapis/api/annotations"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type ConfigEventType_ConfigEventType int32
+
+const (
+	ConfigEventType_add    ConfigEventType_ConfigEventType = 0
+	ConfigEventType_remove ConfigEventType_ConfigEventType = 1
+	ConfigEventType_update ConfigEventType_ConfigEventType = 2
+)
+
+var ConfigEventType_ConfigEventType_name = map[int32]string{
+	0: "add",
+	1: "remove",
+	2: "update",
+}
+var ConfigEventType_ConfigEventType_value = map[string]int32{
+	"add":    0,
+	"remove": 1,
+	"update": 2,
+}
+
+func (x ConfigEventType_ConfigEventType) String() string {
+	return proto.EnumName(ConfigEventType_ConfigEventType_name, int32(x))
+}
+func (ConfigEventType_ConfigEventType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{0, 0}
+}
+
+type KpiEventType_KpiEventType int32
+
+const (
+	KpiEventType_slice KpiEventType_KpiEventType = 0
+	KpiEventType_ts    KpiEventType_KpiEventType = 1
+)
+
+var KpiEventType_KpiEventType_name = map[int32]string{
+	0: "slice",
+	1: "ts",
+}
+var KpiEventType_KpiEventType_value = map[string]int32{
+	"slice": 0,
+	"ts":    1,
+}
+
+func (x KpiEventType_KpiEventType) String() string {
+	return proto.EnumName(KpiEventType_KpiEventType_name, int32(x))
+}
+func (KpiEventType_KpiEventType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{2, 0}
+}
+
+type AlarmEventType_AlarmEventType int32
+
+const (
+	AlarmEventType_COMMUNICATION AlarmEventType_AlarmEventType = 0
+	AlarmEventType_ENVIRONMENT   AlarmEventType_AlarmEventType = 1
+	AlarmEventType_EQUIPMENT     AlarmEventType_AlarmEventType = 2
+	AlarmEventType_SERVICE       AlarmEventType_AlarmEventType = 3
+	AlarmEventType_PROCESSING    AlarmEventType_AlarmEventType = 4
+	AlarmEventType_SECURITY      AlarmEventType_AlarmEventType = 5
+)
+
+var AlarmEventType_AlarmEventType_name = map[int32]string{
+	0: "COMMUNICATION",
+	1: "ENVIRONMENT",
+	2: "EQUIPMENT",
+	3: "SERVICE",
+	4: "PROCESSING",
+	5: "SECURITY",
+}
+var AlarmEventType_AlarmEventType_value = map[string]int32{
+	"COMMUNICATION": 0,
+	"ENVIRONMENT":   1,
+	"EQUIPMENT":     2,
+	"SERVICE":       3,
+	"PROCESSING":    4,
+	"SECURITY":      5,
+}
+
+func (x AlarmEventType_AlarmEventType) String() string {
+	return proto.EnumName(AlarmEventType_AlarmEventType_name, int32(x))
+}
+func (AlarmEventType_AlarmEventType) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{8, 0}
+}
+
+type AlarmEventCategory_AlarmEventCategory int32
+
+const (
+	AlarmEventCategory_PON AlarmEventCategory_AlarmEventCategory = 0
+	AlarmEventCategory_OLT AlarmEventCategory_AlarmEventCategory = 1
+	AlarmEventCategory_ONT AlarmEventCategory_AlarmEventCategory = 2
+	AlarmEventCategory_ONU AlarmEventCategory_AlarmEventCategory = 3
+	AlarmEventCategory_NNI AlarmEventCategory_AlarmEventCategory = 4
+)
+
+var AlarmEventCategory_AlarmEventCategory_name = map[int32]string{
+	0: "PON",
+	1: "OLT",
+	2: "ONT",
+	3: "ONU",
+	4: "NNI",
+}
+var AlarmEventCategory_AlarmEventCategory_value = map[string]int32{
+	"PON": 0,
+	"OLT": 1,
+	"ONT": 2,
+	"ONU": 3,
+	"NNI": 4,
+}
+
+func (x AlarmEventCategory_AlarmEventCategory) String() string {
+	return proto.EnumName(AlarmEventCategory_AlarmEventCategory_name, int32(x))
+}
+func (AlarmEventCategory_AlarmEventCategory) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{9, 0}
+}
+
+type AlarmEventState_AlarmEventState int32
+
+const (
+	AlarmEventState_RAISED  AlarmEventState_AlarmEventState = 0
+	AlarmEventState_CLEARED AlarmEventState_AlarmEventState = 1
+)
+
+var AlarmEventState_AlarmEventState_name = map[int32]string{
+	0: "RAISED",
+	1: "CLEARED",
+}
+var AlarmEventState_AlarmEventState_value = map[string]int32{
+	"RAISED":  0,
+	"CLEARED": 1,
+}
+
+func (x AlarmEventState_AlarmEventState) String() string {
+	return proto.EnumName(AlarmEventState_AlarmEventState_name, int32(x))
+}
+func (AlarmEventState_AlarmEventState) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{10, 0}
+}
+
+type AlarmEventSeverity_AlarmEventSeverity int32
+
+const (
+	AlarmEventSeverity_INDETERMINATE AlarmEventSeverity_AlarmEventSeverity = 0
+	AlarmEventSeverity_WARNING       AlarmEventSeverity_AlarmEventSeverity = 1
+	AlarmEventSeverity_MINOR         AlarmEventSeverity_AlarmEventSeverity = 2
+	AlarmEventSeverity_MAJOR         AlarmEventSeverity_AlarmEventSeverity = 3
+	AlarmEventSeverity_CRITICAL      AlarmEventSeverity_AlarmEventSeverity = 4
+)
+
+var AlarmEventSeverity_AlarmEventSeverity_name = map[int32]string{
+	0: "INDETERMINATE",
+	1: "WARNING",
+	2: "MINOR",
+	3: "MAJOR",
+	4: "CRITICAL",
+}
+var AlarmEventSeverity_AlarmEventSeverity_value = map[string]int32{
+	"INDETERMINATE": 0,
+	"WARNING":       1,
+	"MINOR":         2,
+	"MAJOR":         3,
+	"CRITICAL":      4,
+}
+
+func (x AlarmEventSeverity_AlarmEventSeverity) String() string {
+	return proto.EnumName(AlarmEventSeverity_AlarmEventSeverity_name, int32(x))
+}
+func (AlarmEventSeverity_AlarmEventSeverity) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{11, 0}
+}
+
+type ConfigEventType struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *ConfigEventType) Reset()         { *m = ConfigEventType{} }
+func (m *ConfigEventType) String() string { return proto.CompactTextString(m) }
+func (*ConfigEventType) ProtoMessage()    {}
+func (*ConfigEventType) Descriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{0}
+}
+func (m *ConfigEventType) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_ConfigEventType.Unmarshal(m, b)
+}
+func (m *ConfigEventType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_ConfigEventType.Marshal(b, m, deterministic)
+}
+func (dst *ConfigEventType) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ConfigEventType.Merge(dst, src)
+}
+func (m *ConfigEventType) XXX_Size() int {
+	return xxx_messageInfo_ConfigEventType.Size(m)
+}
+func (m *ConfigEventType) XXX_DiscardUnknown() {
+	xxx_messageInfo_ConfigEventType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ConfigEventType proto.InternalMessageInfo
+
+type ConfigEvent struct {
+	Type                 ConfigEventType_ConfigEventType `protobuf:"varint,1,opt,name=type,proto3,enum=voltha.ConfigEventType_ConfigEventType" json:"type,omitempty"`
+	Hash                 string                          `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
+	Data                 string                          `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                        `json:"-"`
+	XXX_unrecognized     []byte                          `json:"-"`
+	XXX_sizecache        int32                           `json:"-"`
+}
+
+func (m *ConfigEvent) Reset()         { *m = ConfigEvent{} }
+func (m *ConfigEvent) String() string { return proto.CompactTextString(m) }
+func (*ConfigEvent) ProtoMessage()    {}
+func (*ConfigEvent) Descriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{1}
+}
+func (m *ConfigEvent) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_ConfigEvent.Unmarshal(m, b)
+}
+func (m *ConfigEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_ConfigEvent.Marshal(b, m, deterministic)
+}
+func (dst *ConfigEvent) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_ConfigEvent.Merge(dst, src)
+}
+func (m *ConfigEvent) XXX_Size() int {
+	return xxx_messageInfo_ConfigEvent.Size(m)
+}
+func (m *ConfigEvent) XXX_DiscardUnknown() {
+	xxx_messageInfo_ConfigEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ConfigEvent proto.InternalMessageInfo
+
+func (m *ConfigEvent) GetType() ConfigEventType_ConfigEventType {
+	if m != nil {
+		return m.Type
+	}
+	return ConfigEventType_add
+}
+
+func (m *ConfigEvent) GetHash() string {
+	if m != nil {
+		return m.Hash
+	}
+	return ""
+}
+
+func (m *ConfigEvent) GetData() string {
+	if m != nil {
+		return m.Data
+	}
+	return ""
+}
+
+type KpiEventType struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *KpiEventType) Reset()         { *m = KpiEventType{} }
+func (m *KpiEventType) String() string { return proto.CompactTextString(m) }
+func (*KpiEventType) ProtoMessage()    {}
+func (*KpiEventType) Descriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{2}
+}
+func (m *KpiEventType) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_KpiEventType.Unmarshal(m, b)
+}
+func (m *KpiEventType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_KpiEventType.Marshal(b, m, deterministic)
+}
+func (dst *KpiEventType) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_KpiEventType.Merge(dst, src)
+}
+func (m *KpiEventType) XXX_Size() int {
+	return xxx_messageInfo_KpiEventType.Size(m)
+}
+func (m *KpiEventType) XXX_DiscardUnknown() {
+	xxx_messageInfo_KpiEventType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_KpiEventType proto.InternalMessageInfo
+
+//
+// Struct to convey a dictionary of metric metadata.
+type MetricMetaData struct {
+	Title           string  `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
+	Ts              float64 `protobuf:"fixed64,2,opt,name=ts,proto3" json:"ts,omitempty"`
+	LogicalDeviceId string  `protobuf:"bytes,3,opt,name=logical_device_id,json=logicalDeviceId,proto3" json:"logical_device_id,omitempty"`
+	// (equivalent to the DPID that ONOS has
+	// for the VOLTHA device without the
+	//  'of:' prefix
+	SerialNo             string            `protobuf:"bytes,4,opt,name=serial_no,json=serialNo,proto3" json:"serial_no,omitempty"`
+	DeviceId             string            `protobuf:"bytes,5,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
+	Context              map[string]string `protobuf:"bytes,6,rep,name=context,proto3" json:"context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
+	XXX_unrecognized     []byte            `json:"-"`
+	XXX_sizecache        int32             `json:"-"`
+}
+
+func (m *MetricMetaData) Reset()         { *m = MetricMetaData{} }
+func (m *MetricMetaData) String() string { return proto.CompactTextString(m) }
+func (*MetricMetaData) ProtoMessage()    {}
+func (*MetricMetaData) Descriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{3}
+}
+func (m *MetricMetaData) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_MetricMetaData.Unmarshal(m, b)
+}
+func (m *MetricMetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_MetricMetaData.Marshal(b, m, deterministic)
+}
+func (dst *MetricMetaData) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MetricMetaData.Merge(dst, src)
+}
+func (m *MetricMetaData) XXX_Size() int {
+	return xxx_messageInfo_MetricMetaData.Size(m)
+}
+func (m *MetricMetaData) XXX_DiscardUnknown() {
+	xxx_messageInfo_MetricMetaData.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MetricMetaData proto.InternalMessageInfo
+
+func (m *MetricMetaData) GetTitle() string {
+	if m != nil {
+		return m.Title
+	}
+	return ""
+}
+
+func (m *MetricMetaData) GetTs() float64 {
+	if m != nil {
+		return m.Ts
+	}
+	return 0
+}
+
+func (m *MetricMetaData) GetLogicalDeviceId() string {
+	if m != nil {
+		return m.LogicalDeviceId
+	}
+	return ""
+}
+
+func (m *MetricMetaData) GetSerialNo() string {
+	if m != nil {
+		return m.SerialNo
+	}
+	return ""
+}
+
+func (m *MetricMetaData) GetDeviceId() string {
+	if m != nil {
+		return m.DeviceId
+	}
+	return ""
+}
+
+func (m *MetricMetaData) GetContext() map[string]string {
+	if m != nil {
+		return m.Context
+	}
+	return nil
+}
+
+//
+// Struct to convey a dictionary of metric->value pairs. Typically used in
+// pure shared-timestamp or shared-timestamp + shared object prefix situations.
+type MetricValuePairs struct {
+	// Metric / value pairs.
+	Metrics              map[string]float32 `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"`
+	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
+	XXX_unrecognized     []byte             `json:"-"`
+	XXX_sizecache        int32              `json:"-"`
+}
+
+func (m *MetricValuePairs) Reset()         { *m = MetricValuePairs{} }
+func (m *MetricValuePairs) String() string { return proto.CompactTextString(m) }
+func (*MetricValuePairs) ProtoMessage()    {}
+func (*MetricValuePairs) Descriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{4}
+}
+func (m *MetricValuePairs) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_MetricValuePairs.Unmarshal(m, b)
+}
+func (m *MetricValuePairs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_MetricValuePairs.Marshal(b, m, deterministic)
+}
+func (dst *MetricValuePairs) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MetricValuePairs.Merge(dst, src)
+}
+func (m *MetricValuePairs) XXX_Size() int {
+	return xxx_messageInfo_MetricValuePairs.Size(m)
+}
+func (m *MetricValuePairs) XXX_DiscardUnknown() {
+	xxx_messageInfo_MetricValuePairs.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MetricValuePairs proto.InternalMessageInfo
+
+func (m *MetricValuePairs) GetMetrics() map[string]float32 {
+	if m != nil {
+		return m.Metrics
+	}
+	return nil
+}
+
+//
+// Struct to group metadata for a metric (or group of metrics) with the key-value
+// pairs of collected metrics
+type MetricInformation struct {
+	Metadata             *MetricMetaData    `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
+	Metrics              map[string]float32 `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"`
+	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
+	XXX_unrecognized     []byte             `json:"-"`
+	XXX_sizecache        int32              `json:"-"`
+}
+
+func (m *MetricInformation) Reset()         { *m = MetricInformation{} }
+func (m *MetricInformation) String() string { return proto.CompactTextString(m) }
+func (*MetricInformation) ProtoMessage()    {}
+func (*MetricInformation) Descriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{5}
+}
+func (m *MetricInformation) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_MetricInformation.Unmarshal(m, b)
+}
+func (m *MetricInformation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_MetricInformation.Marshal(b, m, deterministic)
+}
+func (dst *MetricInformation) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_MetricInformation.Merge(dst, src)
+}
+func (m *MetricInformation) XXX_Size() int {
+	return xxx_messageInfo_MetricInformation.Size(m)
+}
+func (m *MetricInformation) XXX_DiscardUnknown() {
+	xxx_messageInfo_MetricInformation.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MetricInformation proto.InternalMessageInfo
+
+func (m *MetricInformation) GetMetadata() *MetricMetaData {
+	if m != nil {
+		return m.Metadata
+	}
+	return nil
+}
+
+func (m *MetricInformation) GetMetrics() map[string]float32 {
+	if m != nil {
+		return m.Metrics
+	}
+	return nil
+}
+
+//
+// Legacy KPI Event structured.  In mid-August, the KPI event format was updated
+//                               to a more easily parsable format. See VOL-1140
+//                               for more information.
+type KpiEvent struct {
+	Type                 KpiEventType_KpiEventType    `protobuf:"varint,1,opt,name=type,proto3,enum=voltha.KpiEventType_KpiEventType" json:"type,omitempty"`
+	Ts                   float32                      `protobuf:"fixed32,2,opt,name=ts,proto3" json:"ts,omitempty"`
+	Prefixes             map[string]*MetricValuePairs `protobuf:"bytes,3,rep,name=prefixes,proto3" json:"prefixes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
+	XXX_unrecognized     []byte                       `json:"-"`
+	XXX_sizecache        int32                        `json:"-"`
+}
+
+func (m *KpiEvent) Reset()         { *m = KpiEvent{} }
+func (m *KpiEvent) String() string { return proto.CompactTextString(m) }
+func (*KpiEvent) ProtoMessage()    {}
+func (*KpiEvent) Descriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{6}
+}
+func (m *KpiEvent) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_KpiEvent.Unmarshal(m, b)
+}
+func (m *KpiEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_KpiEvent.Marshal(b, m, deterministic)
+}
+func (dst *KpiEvent) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_KpiEvent.Merge(dst, src)
+}
+func (m *KpiEvent) XXX_Size() int {
+	return xxx_messageInfo_KpiEvent.Size(m)
+}
+func (m *KpiEvent) XXX_DiscardUnknown() {
+	xxx_messageInfo_KpiEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_KpiEvent proto.InternalMessageInfo
+
+func (m *KpiEvent) GetType() KpiEventType_KpiEventType {
+	if m != nil {
+		return m.Type
+	}
+	return KpiEventType_slice
+}
+
+func (m *KpiEvent) GetTs() float32 {
+	if m != nil {
+		return m.Ts
+	}
+	return 0
+}
+
+func (m *KpiEvent) GetPrefixes() map[string]*MetricValuePairs {
+	if m != nil {
+		return m.Prefixes
+	}
+	return nil
+}
+
+type KpiEvent2 struct {
+	// Type of KPI Event
+	Type KpiEventType_KpiEventType `protobuf:"varint,1,opt,name=type,proto3,enum=voltha.KpiEventType_KpiEventType" json:"type,omitempty"`
+	// Fields used when for slice:
+	Ts                   float64              `protobuf:"fixed64,2,opt,name=ts,proto3" json:"ts,omitempty"`
+	SliceData            []*MetricInformation `protobuf:"bytes,3,rep,name=slice_data,json=sliceData,proto3" json:"slice_data,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
+	XXX_unrecognized     []byte               `json:"-"`
+	XXX_sizecache        int32                `json:"-"`
+}
+
+func (m *KpiEvent2) Reset()         { *m = KpiEvent2{} }
+func (m *KpiEvent2) String() string { return proto.CompactTextString(m) }
+func (*KpiEvent2) ProtoMessage()    {}
+func (*KpiEvent2) Descriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{7}
+}
+func (m *KpiEvent2) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_KpiEvent2.Unmarshal(m, b)
+}
+func (m *KpiEvent2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_KpiEvent2.Marshal(b, m, deterministic)
+}
+func (dst *KpiEvent2) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_KpiEvent2.Merge(dst, src)
+}
+func (m *KpiEvent2) XXX_Size() int {
+	return xxx_messageInfo_KpiEvent2.Size(m)
+}
+func (m *KpiEvent2) XXX_DiscardUnknown() {
+	xxx_messageInfo_KpiEvent2.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_KpiEvent2 proto.InternalMessageInfo
+
+func (m *KpiEvent2) GetType() KpiEventType_KpiEventType {
+	if m != nil {
+		return m.Type
+	}
+	return KpiEventType_slice
+}
+
+func (m *KpiEvent2) GetTs() float64 {
+	if m != nil {
+		return m.Ts
+	}
+	return 0
+}
+
+func (m *KpiEvent2) GetSliceData() []*MetricInformation {
+	if m != nil {
+		return m.SliceData
+	}
+	return nil
+}
+
+//
+// Identify to the area of the system impacted by the alarm
+type AlarmEventType struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *AlarmEventType) Reset()         { *m = AlarmEventType{} }
+func (m *AlarmEventType) String() string { return proto.CompactTextString(m) }
+func (*AlarmEventType) ProtoMessage()    {}
+func (*AlarmEventType) Descriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{8}
+}
+func (m *AlarmEventType) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmEventType.Unmarshal(m, b)
+}
+func (m *AlarmEventType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmEventType.Marshal(b, m, deterministic)
+}
+func (dst *AlarmEventType) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmEventType.Merge(dst, src)
+}
+func (m *AlarmEventType) XXX_Size() int {
+	return xxx_messageInfo_AlarmEventType.Size(m)
+}
+func (m *AlarmEventType) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmEventType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmEventType proto.InternalMessageInfo
+
+//
+// Identify to the functional category originating the alarm
+type AlarmEventCategory struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *AlarmEventCategory) Reset()         { *m = AlarmEventCategory{} }
+func (m *AlarmEventCategory) String() string { return proto.CompactTextString(m) }
+func (*AlarmEventCategory) ProtoMessage()    {}
+func (*AlarmEventCategory) Descriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{9}
+}
+func (m *AlarmEventCategory) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmEventCategory.Unmarshal(m, b)
+}
+func (m *AlarmEventCategory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmEventCategory.Marshal(b, m, deterministic)
+}
+func (dst *AlarmEventCategory) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmEventCategory.Merge(dst, src)
+}
+func (m *AlarmEventCategory) XXX_Size() int {
+	return xxx_messageInfo_AlarmEventCategory.Size(m)
+}
+func (m *AlarmEventCategory) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmEventCategory.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmEventCategory proto.InternalMessageInfo
+
+//
+// Active state of the alarm
+type AlarmEventState struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *AlarmEventState) Reset()         { *m = AlarmEventState{} }
+func (m *AlarmEventState) String() string { return proto.CompactTextString(m) }
+func (*AlarmEventState) ProtoMessage()    {}
+func (*AlarmEventState) Descriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{10}
+}
+func (m *AlarmEventState) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmEventState.Unmarshal(m, b)
+}
+func (m *AlarmEventState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmEventState.Marshal(b, m, deterministic)
+}
+func (dst *AlarmEventState) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmEventState.Merge(dst, src)
+}
+func (m *AlarmEventState) XXX_Size() int {
+	return xxx_messageInfo_AlarmEventState.Size(m)
+}
+func (m *AlarmEventState) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmEventState.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmEventState proto.InternalMessageInfo
+
+//
+// Identify the overall impact of the alarm on the system
+type AlarmEventSeverity struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *AlarmEventSeverity) Reset()         { *m = AlarmEventSeverity{} }
+func (m *AlarmEventSeverity) String() string { return proto.CompactTextString(m) }
+func (*AlarmEventSeverity) ProtoMessage()    {}
+func (*AlarmEventSeverity) Descriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{11}
+}
+func (m *AlarmEventSeverity) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmEventSeverity.Unmarshal(m, b)
+}
+func (m *AlarmEventSeverity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmEventSeverity.Marshal(b, m, deterministic)
+}
+func (dst *AlarmEventSeverity) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmEventSeverity.Merge(dst, src)
+}
+func (m *AlarmEventSeverity) XXX_Size() int {
+	return xxx_messageInfo_AlarmEventSeverity.Size(m)
+}
+func (m *AlarmEventSeverity) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmEventSeverity.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmEventSeverity proto.InternalMessageInfo
+
+//
+//
+type AlarmEvent struct {
+	// Unique ID for this alarm.  e.g. voltha.some_olt.1234
+	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	// Refers to the area of the system impacted by the alarm
+	Type AlarmEventType_AlarmEventType `protobuf:"varint,2,opt,name=type,proto3,enum=voltha.AlarmEventType_AlarmEventType" json:"type,omitempty"`
+	// Refers to functional category of the alarm
+	Category AlarmEventCategory_AlarmEventCategory `protobuf:"varint,3,opt,name=category,proto3,enum=voltha.AlarmEventCategory_AlarmEventCategory" json:"category,omitempty"`
+	// Current active state of the alarm
+	State AlarmEventState_AlarmEventState `protobuf:"varint,4,opt,name=state,proto3,enum=voltha.AlarmEventState_AlarmEventState" json:"state,omitempty"`
+	// Overall impact of the alarm on the system
+	Severity AlarmEventSeverity_AlarmEventSeverity `protobuf:"varint,5,opt,name=severity,proto3,enum=voltha.AlarmEventSeverity_AlarmEventSeverity" json:"severity,omitempty"`
+	// Timestamp at which the alarm was first raised
+	RaisedTs float32 `protobuf:"fixed32,6,opt,name=raised_ts,json=raisedTs,proto3" json:"raised_ts,omitempty"`
+	// Timestamp at which the alarm was reported
+	ReportedTs float32 `protobuf:"fixed32,7,opt,name=reported_ts,json=reportedTs,proto3" json:"reported_ts,omitempty"`
+	// Timestamp at which the alarm has changed since it was raised
+	ChangedTs float32 `protobuf:"fixed32,8,opt,name=changed_ts,json=changedTs,proto3" json:"changed_ts,omitempty"`
+	// Identifier of the originating resource of the alarm
+	ResourceId string `protobuf:"bytes,9,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
+	// Textual explanation of the alarm
+	Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty"`
+	// Key/Value storage for extra information that may give context to the alarm
+	Context map[string]string `protobuf:"bytes,11,rep,name=context,proto3" json:"context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+	// logical device id
+	LogicalDeviceId string `protobuf:"bytes,12,opt,name=logical_device_id,json=logicalDeviceId,proto3" json:"logical_device_id,omitempty"`
+	// alarm_type  name indicates clearly the name of the alarm
+	AlarmTypeName        string   `protobuf:"bytes,13,opt,name=alarm_type_name,json=alarmTypeName,proto3" json:"alarm_type_name,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *AlarmEvent) Reset()         { *m = AlarmEvent{} }
+func (m *AlarmEvent) String() string { return proto.CompactTextString(m) }
+func (*AlarmEvent) ProtoMessage()    {}
+func (*AlarmEvent) Descriptor() ([]byte, []int) {
+	return fileDescriptor_events_26477559e5dbfb38, []int{12}
+}
+func (m *AlarmEvent) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmEvent.Unmarshal(m, b)
+}
+func (m *AlarmEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmEvent.Marshal(b, m, deterministic)
+}
+func (dst *AlarmEvent) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmEvent.Merge(dst, src)
+}
+func (m *AlarmEvent) XXX_Size() int {
+	return xxx_messageInfo_AlarmEvent.Size(m)
+}
+func (m *AlarmEvent) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmEvent proto.InternalMessageInfo
+
+func (m *AlarmEvent) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *AlarmEvent) GetType() AlarmEventType_AlarmEventType {
+	if m != nil {
+		return m.Type
+	}
+	return AlarmEventType_COMMUNICATION
+}
+
+func (m *AlarmEvent) GetCategory() AlarmEventCategory_AlarmEventCategory {
+	if m != nil {
+		return m.Category
+	}
+	return AlarmEventCategory_PON
+}
+
+func (m *AlarmEvent) GetState() AlarmEventState_AlarmEventState {
+	if m != nil {
+		return m.State
+	}
+	return AlarmEventState_RAISED
+}
+
+func (m *AlarmEvent) GetSeverity() AlarmEventSeverity_AlarmEventSeverity {
+	if m != nil {
+		return m.Severity
+	}
+	return AlarmEventSeverity_INDETERMINATE
+}
+
+func (m *AlarmEvent) GetRaisedTs() float32 {
+	if m != nil {
+		return m.RaisedTs
+	}
+	return 0
+}
+
+func (m *AlarmEvent) GetReportedTs() float32 {
+	if m != nil {
+		return m.ReportedTs
+	}
+	return 0
+}
+
+func (m *AlarmEvent) GetChangedTs() float32 {
+	if m != nil {
+		return m.ChangedTs
+	}
+	return 0
+}
+
+func (m *AlarmEvent) GetResourceId() string {
+	if m != nil {
+		return m.ResourceId
+	}
+	return ""
+}
+
+func (m *AlarmEvent) GetDescription() string {
+	if m != nil {
+		return m.Description
+	}
+	return ""
+}
+
+func (m *AlarmEvent) GetContext() map[string]string {
+	if m != nil {
+		return m.Context
+	}
+	return nil
+}
+
+func (m *AlarmEvent) GetLogicalDeviceId() string {
+	if m != nil {
+		return m.LogicalDeviceId
+	}
+	return ""
+}
+
+func (m *AlarmEvent) GetAlarmTypeName() string {
+	if m != nil {
+		return m.AlarmTypeName
+	}
+	return ""
+}
+
+func init() {
+	proto.RegisterType((*ConfigEventType)(nil), "voltha.ConfigEventType")
+	proto.RegisterType((*ConfigEvent)(nil), "voltha.ConfigEvent")
+	proto.RegisterType((*KpiEventType)(nil), "voltha.KpiEventType")
+	proto.RegisterType((*MetricMetaData)(nil), "voltha.MetricMetaData")
+	proto.RegisterMapType((map[string]string)(nil), "voltha.MetricMetaData.ContextEntry")
+	proto.RegisterType((*MetricValuePairs)(nil), "voltha.MetricValuePairs")
+	proto.RegisterMapType((map[string]float32)(nil), "voltha.MetricValuePairs.MetricsEntry")
+	proto.RegisterType((*MetricInformation)(nil), "voltha.MetricInformation")
+	proto.RegisterMapType((map[string]float32)(nil), "voltha.MetricInformation.MetricsEntry")
+	proto.RegisterType((*KpiEvent)(nil), "voltha.KpiEvent")
+	proto.RegisterMapType((map[string]*MetricValuePairs)(nil), "voltha.KpiEvent.PrefixesEntry")
+	proto.RegisterType((*KpiEvent2)(nil), "voltha.KpiEvent2")
+	proto.RegisterType((*AlarmEventType)(nil), "voltha.AlarmEventType")
+	proto.RegisterType((*AlarmEventCategory)(nil), "voltha.AlarmEventCategory")
+	proto.RegisterType((*AlarmEventState)(nil), "voltha.AlarmEventState")
+	proto.RegisterType((*AlarmEventSeverity)(nil), "voltha.AlarmEventSeverity")
+	proto.RegisterType((*AlarmEvent)(nil), "voltha.AlarmEvent")
+	proto.RegisterMapType((map[string]string)(nil), "voltha.AlarmEvent.ContextEntry")
+	proto.RegisterEnum("voltha.ConfigEventType_ConfigEventType", ConfigEventType_ConfigEventType_name, ConfigEventType_ConfigEventType_value)
+	proto.RegisterEnum("voltha.KpiEventType_KpiEventType", KpiEventType_KpiEventType_name, KpiEventType_KpiEventType_value)
+	proto.RegisterEnum("voltha.AlarmEventType_AlarmEventType", AlarmEventType_AlarmEventType_name, AlarmEventType_AlarmEventType_value)
+	proto.RegisterEnum("voltha.AlarmEventCategory_AlarmEventCategory", AlarmEventCategory_AlarmEventCategory_name, AlarmEventCategory_AlarmEventCategory_value)
+	proto.RegisterEnum("voltha.AlarmEventState_AlarmEventState", AlarmEventState_AlarmEventState_name, AlarmEventState_AlarmEventState_value)
+	proto.RegisterEnum("voltha.AlarmEventSeverity_AlarmEventSeverity", AlarmEventSeverity_AlarmEventSeverity_name, AlarmEventSeverity_AlarmEventSeverity_value)
+}
+
+func init() { proto.RegisterFile("voltha_protos/events.proto", fileDescriptor_events_26477559e5dbfb38) }
+
+var fileDescriptor_events_26477559e5dbfb38 = []byte{
+	// 1033 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0xe3, 0x44,
+	0x14, 0xae, 0x9d, 0xff, 0x93, 0x36, 0xf5, 0x8e, 0x10, 0x32, 0xe5, 0x67, 0xbb, 0x46, 0x2c, 0xd5,
+	0xa2, 0xa6, 0x22, 0x08, 0x69, 0xb7, 0xa8, 0x82, 0xe0, 0x5a, 0xc8, 0xd0, 0x38, 0x65, 0x92, 0x76,
+	0x81, 0x9b, 0x68, 0xd6, 0x9e, 0xa6, 0x16, 0x89, 0xc7, 0xb2, 0xa7, 0xd1, 0xe6, 0x8e, 0x07, 0x40,
+	0xe2, 0x72, 0x9f, 0x88, 0x37, 0xe1, 0x41, 0xd0, 0xcc, 0xd8, 0xb5, 0x93, 0x7a, 0xc5, 0xc5, 0x8a,
+	0xbb, 0x39, 0xdf, 0xf9, 0xf1, 0x77, 0xce, 0x9c, 0x39, 0xc7, 0x70, 0xb0, 0x62, 0x0b, 0x7e, 0x4b,
+	0x66, 0x71, 0xc2, 0x38, 0x4b, 0x4f, 0xe8, 0x8a, 0x46, 0x3c, 0xed, 0x4b, 0x09, 0x35, 0x95, 0xee,
+	0xc0, 0xdc, 0xb4, 0x59, 0x52, 0x4e, 0x94, 0xc5, 0xc1, 0x47, 0x73, 0xc6, 0xe6, 0x0b, 0x7a, 0x42,
+	0xe2, 0xf0, 0x84, 0x44, 0x11, 0xe3, 0x84, 0x87, 0x2c, 0xca, 0xfc, 0x2d, 0x07, 0xf6, 0x6d, 0x16,
+	0xdd, 0x84, 0x73, 0x47, 0x44, 0x9d, 0xae, 0x63, 0x6a, 0x0d, 0x1e, 0x40, 0xa8, 0x05, 0x35, 0x12,
+	0x04, 0xc6, 0x0e, 0x02, 0x68, 0x26, 0x74, 0xc9, 0x56, 0xd4, 0xd0, 0xc4, 0xf9, 0x2e, 0x0e, 0x08,
+	0xa7, 0x86, 0x6e, 0x25, 0xd0, 0x2d, 0xf9, 0xa0, 0x6f, 0xa0, 0xce, 0xd7, 0x31, 0x35, 0xb5, 0x43,
+	0xed, 0xa8, 0x37, 0xf8, 0xbc, 0xaf, 0xc8, 0xf5, 0xb7, 0xc2, 0x6e, 0xcb, 0x58, 0x3a, 0x21, 0x04,
+	0xf5, 0x5b, 0x92, 0xde, 0x9a, 0xfa, 0xa1, 0x76, 0xd4, 0xc1, 0xf2, 0x2c, 0xb0, 0x80, 0x70, 0x62,
+	0xd6, 0x14, 0x26, 0xce, 0xd6, 0x97, 0xb0, 0xfb, 0x53, 0x1c, 0x16, 0xbc, 0x9f, 0x6c, 0xca, 0xa8,
+	0x03, 0x8d, 0x74, 0x11, 0xfa, 0xd4, 0xd8, 0x41, 0x4d, 0xd0, 0x79, 0x6a, 0x68, 0xd6, 0x1b, 0x1d,
+	0x7a, 0x23, 0xca, 0x93, 0xd0, 0x1f, 0x51, 0x4e, 0xce, 0x09, 0x27, 0xe8, 0x3d, 0x68, 0xf0, 0x90,
+	0x2f, 0x14, 0xd7, 0x0e, 0x56, 0x02, 0xea, 0x09, 0x07, 0xc9, 0x40, 0xc3, 0x3a, 0x4f, 0xd1, 0x33,
+	0x78, 0xb4, 0x60, 0xf3, 0xd0, 0x27, 0x8b, 0x59, 0x40, 0x57, 0xa1, 0x4f, 0x67, 0x61, 0x90, 0x91,
+	0xd9, 0xcf, 0x14, 0xe7, 0x12, 0x77, 0x03, 0xf4, 0x21, 0x74, 0x52, 0x9a, 0x84, 0x64, 0x31, 0x8b,
+	0x98, 0x59, 0x97, 0x36, 0x6d, 0x05, 0x78, 0x4c, 0x28, 0x8b, 0x00, 0x0d, 0xa5, 0x0c, 0x72, 0xcf,
+	0x33, 0x68, 0xf9, 0x2c, 0xe2, 0xf4, 0x35, 0x37, 0x9b, 0x87, 0xb5, 0xa3, 0xee, 0xe0, 0xd3, 0xbc,
+	0x72, 0x9b, 0xa4, 0x45, 0xe1, 0x84, 0x95, 0x13, 0xf1, 0x64, 0x8d, 0x73, 0x9f, 0x83, 0x53, 0xd8,
+	0x2d, 0x2b, 0x90, 0x01, 0xb5, 0xdf, 0xe9, 0x3a, 0x4b, 0x4c, 0x1c, 0x45, 0xb2, 0x2b, 0xb2, 0xb8,
+	0xa3, 0x59, 0x6d, 0x95, 0x70, 0xaa, 0x3f, 0xd7, 0xac, 0xbf, 0x34, 0x30, 0xd4, 0x47, 0xae, 0x05,
+	0x76, 0x49, 0xc2, 0x24, 0x45, 0xdf, 0x42, 0x6b, 0x29, 0xb1, 0xd4, 0xd4, 0x24, 0x9f, 0xcf, 0x36,
+	0xf9, 0x14, 0xa6, 0x19, 0x90, 0x66, 0x8c, 0x32, 0x2f, 0xc1, 0xa8, 0xac, 0xf8, 0x2f, 0x46, 0x7a,
+	0x99, 0xd1, 0xdf, 0x1a, 0x3c, 0x52, 0xce, 0x6e, 0x74, 0xc3, 0x92, 0xa5, 0x6c, 0x5b, 0x34, 0x80,
+	0xb6, 0xe8, 0x6d, 0xd9, 0x0c, 0x22, 0x4c, 0x77, 0xf0, 0x7e, 0x75, 0x8d, 0xf0, 0xbd, 0x1d, 0xfa,
+	0xae, 0x48, 0x43, 0x97, 0x69, 0x3c, 0xdd, 0x74, 0x29, 0xc5, 0xff, 0x1f, 0xf2, 0xf8, 0x47, 0x83,
+	0x76, 0xde, 0x97, 0xe8, 0xeb, 0x8d, 0x87, 0xf1, 0x24, 0xe7, 0x51, 0xee, 0xdb, 0x0d, 0x21, 0x7b,
+	0x12, 0x45, 0x3b, 0xea, 0xb2, 0x1d, 0x4f, 0xa1, 0x1d, 0x27, 0xf4, 0x26, 0x7c, 0x4d, 0x53, 0xb3,
+	0x26, 0x53, 0xfa, 0x64, 0x3b, 0x54, 0xff, 0x32, 0x33, 0x50, 0xa9, 0xdc, 0xdb, 0x1f, 0x5c, 0xc1,
+	0xde, 0x86, 0xaa, 0x22, 0x99, 0x7e, 0x39, 0x99, 0xee, 0xc0, 0x7c, 0xdb, 0xad, 0x97, 0xd3, 0xfc,
+	0x53, 0x83, 0x4e, 0xfe, 0xed, 0xc1, 0xbb, 0xe7, 0xa9, 0x9e, 0xdd, 0x73, 0x00, 0xf9, 0x84, 0x67,
+	0xd9, 0xe3, 0x17, 0x99, 0x7e, 0xf0, 0xd6, 0xcb, 0xc3, 0x1d, 0x69, 0x2c, 0x6e, 0xdf, 0xfa, 0x43,
+	0x83, 0xde, 0x70, 0x41, 0x92, 0x65, 0x31, 0x1f, 0xa2, 0x6d, 0x04, 0x3d, 0x82, 0x3d, 0x7b, 0x3c,
+	0x1a, 0x5d, 0x79, 0xae, 0x3d, 0x9c, 0xba, 0x63, 0xcf, 0xd8, 0x41, 0xfb, 0xd0, 0x75, 0xbc, 0x6b,
+	0x17, 0x8f, 0xbd, 0x91, 0xe3, 0x4d, 0x0d, 0x0d, 0xed, 0x41, 0xc7, 0xf9, 0xf9, 0xca, 0xbd, 0x94,
+	0xa2, 0x8e, 0xba, 0xd0, 0x9a, 0x38, 0xf8, 0xda, 0xb5, 0x1d, 0xa3, 0x86, 0x7a, 0x00, 0x97, 0x78,
+	0x6c, 0x3b, 0x93, 0x89, 0xeb, 0xfd, 0x60, 0xd4, 0xd1, 0x2e, 0xb4, 0x27, 0x8e, 0x7d, 0x85, 0xdd,
+	0xe9, 0xaf, 0x46, 0xc3, 0x7a, 0x09, 0xa8, 0xf8, 0x9e, 0x4d, 0x38, 0x9d, 0xb3, 0x64, 0x6d, 0x0d,
+	0xab, 0x50, 0x31, 0x60, 0x2f, 0xe5, 0xf7, 0x5b, 0x50, 0x1b, 0x5f, 0x88, 0xef, 0x8a, 0x83, 0xfc,
+	0xa2, 0x3c, 0x5c, 0x19, 0x35, 0x71, 0xf0, 0x3c, 0xd7, 0xa8, 0x5b, 0x67, 0xb0, 0x5f, 0x84, 0x98,
+	0x70, 0xc2, 0xa9, 0xf5, 0xec, 0x01, 0x24, 0xc6, 0x33, 0x1e, 0xba, 0x13, 0xe7, 0xdc, 0xd8, 0x11,
+	0xac, 0xed, 0x0b, 0x67, 0x88, 0x9d, 0x73, 0x43, 0xb3, 0xa2, 0x32, 0x83, 0x09, 0x5d, 0xd1, 0x24,
+	0xe4, 0x6b, 0xeb, 0x97, 0x2a, 0x54, 0x54, 0xc8, 0xf5, 0xce, 0x9d, 0xa9, 0x83, 0x47, 0xae, 0x37,
+	0x9c, 0x3a, 0x2a, 0xd6, 0xcb, 0x21, 0xf6, 0x44, 0xc6, 0x9a, 0x98, 0xb1, 0x23, 0xd7, 0x1b, 0x63,
+	0x43, 0x97, 0xc7, 0xe1, 0x8f, 0x63, 0x6c, 0xd4, 0x44, 0x1d, 0x6c, 0xec, 0x4e, 0x5d, 0x7b, 0x78,
+	0x61, 0xd4, 0xad, 0x37, 0x0d, 0x80, 0x22, 0xb4, 0xb8, 0xe3, 0x30, 0xc8, 0xba, 0x4d, 0x0f, 0x03,
+	0xf4, 0x22, 0x6b, 0x15, 0x5d, 0xb6, 0xca, 0xfd, 0x84, 0xd9, 0xbc, 0xaa, 0x2d, 0x31, 0x6b, 0x17,
+	0x17, 0xda, 0x7e, 0x56, 0x41, 0x39, 0x8c, 0x7b, 0x83, 0xe3, 0x87, 0xee, 0x79, 0x8d, 0x2b, 0x20,
+	0x7c, 0xef, 0x8e, 0xce, 0xa0, 0x91, 0x8a, 0xb2, 0xc9, 0x81, 0x5d, 0x5a, 0x59, 0x5b, 0x55, 0xdd,
+	0x96, 0xb1, 0xf2, 0x12, 0x4c, 0xd2, 0xac, 0x66, 0x72, 0xaa, 0x57, 0x32, 0xc9, 0xab, 0x5a, 0x01,
+	0xe1, 0x7b, 0x77, 0xb1, 0x21, 0x12, 0x12, 0xa6, 0x34, 0x98, 0xf1, 0xd4, 0x6c, 0xca, 0x27, 0xdf,
+	0x56, 0xc0, 0x34, 0x45, 0x8f, 0xa1, 0x9b, 0xd0, 0x98, 0x25, 0x5c, 0xa9, 0x5b, 0x52, 0x0d, 0x39,
+	0x34, 0x4d, 0xd1, 0xc7, 0x00, 0xfe, 0x2d, 0x89, 0xe6, 0x4a, 0xdf, 0x96, 0xfa, 0x4e, 0x86, 0xe4,
+	0xfe, 0x29, 0xbb, 0x4b, 0xd4, 0x02, 0xea, 0xc8, 0x5b, 0x80, 0x1c, 0x72, 0x03, 0x74, 0x08, 0xdd,
+	0x80, 0xa6, 0x7e, 0x12, 0xc6, 0xe2, 0x45, 0x99, 0x20, 0x0d, 0xca, 0x10, 0x7a, 0x51, 0x2c, 0xa9,
+	0xae, 0x7c, 0x90, 0x8f, 0x1f, 0x66, 0x5a, 0xbd, 0xa0, 0xaa, 0xb7, 0xe8, 0x6e, 0xf5, 0x16, 0x7d,
+	0x0a, 0xfb, 0x44, 0xc4, 0x9b, 0x89, 0x9b, 0x9e, 0x45, 0x64, 0x49, 0xcd, 0x3d, 0x69, 0xb9, 0x27,
+	0x61, 0xd1, 0x05, 0x1e, 0x59, 0xd2, 0x77, 0x59, 0x7a, 0xdf, 0x1f, 0xff, 0xf6, 0xc5, 0x3c, 0xe4,
+	0xb7, 0x77, 0xaf, 0xfa, 0x3e, 0x5b, 0x9e, 0xb0, 0x98, 0x46, 0x3e, 0x4b, 0x82, 0x13, 0x95, 0xce,
+	0x71, 0xf6, 0x2b, 0x35, 0x67, 0x19, 0xf0, 0xaa, 0x29, 0x91, 0xaf, 0xfe, 0x0d, 0x00, 0x00, 0xff,
+	0xff, 0xba, 0xd4, 0xc8, 0xc8, 0x90, 0x09, 0x00, 0x00,
+}
diff --git a/go/voltha/events.proto b/go/voltha/events.proto
deleted file mode 100644
index 0a2c0e4..0000000
--- a/go/voltha/events.proto
+++ /dev/null
@@ -1,195 +0,0 @@
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/voltha";
-
-package voltha;
-
-import "voltha_protos/meta.proto";
-import "google/api/annotations.proto";
-
-message ConfigEventType {
-    enum ConfigEventType {
-        add = 0; // A new config has been added
-        remove = 1; // A config has been removed
-        update = 2; // A config has been updated
-    }
-}
-
-message ConfigEvent {
-    ConfigEventType.ConfigEventType type = 1;
-
-    string hash = 2; // hash for this change, can be used for quick lookup
-    string data = 3; // the actual new data, in json format
-}
-
-message KpiEventType {
-    enum KpiEventType {
-        slice = 0; // slice: a set of path/metric data for same time-stamp
-        ts = 1; // time-series: array of data for same metric
-    }
-}
-
-/*
- * Struct to convey a dictionary of metric metadata.
- */
-message MetricMetaData {
-    string title = 1;   // Metric group or individual metric name
-    double ts = 2;      // UTC time-stamp of data (seconds since epoch) of
-                        // when the metric or metric group was collected.
-                        // If this is a 15-min historical group, it is the
-                        // time of the collection and reporting, not the
-                        // start or end of the 15-min group interval.
-
-    string logical_device_id = 3; // The logical device ID of the VOLTHA
-                                  // (equivalent to the DPID that ONOS has
-                                  // for the VOLTHA device without the
-                                  //  'of:' prefix
-    string serial_no = 4;         // The OLT, ONU, ... device serial number
-    string device_id = 5;         // The OLT, ONU, ... physical device ID
-
-    map<string, string> context = 6; // Name value pairs that provide additional
-                                     // context information on the metrics being
-                                     // reported.
-}
-
-/*
- * Struct to convey a dictionary of metric->value pairs. Typically used in
- * pure shared-timestamp or shared-timestamp + shared object prefix situations.
- */
-message MetricValuePairs {
-
-    // Metric / value pairs.
-    map<string, float> metrics = 1;
-
-}
-
-/*
- * Struct to group metadata for a metric (or group of metrics) with the key-value
- * pairs of collected metrics
- */
-message MetricInformation {
-    MetricMetaData metadata = 1;
-    map<string, float> metrics = 2;
-}
-
-/*
- * Legacy KPI Event structured.  In mid-August, the KPI event format was updated
- *                               to a more easily parsable format. See VOL-1140
- *                               for more information.
- */
-message KpiEvent {
-
-    KpiEventType.KpiEventType type = 1;
-
-    // Fields used when for slice:
-
-    float ts = 2; // UTC time-stamp of data in slice mode (seconds since epoc)
-
-    map<string, MetricValuePairs> prefixes = 3;
-
-}
-
-message KpiEvent2 {
-    // Type of KPI Event
-    KpiEventType.KpiEventType type = 1;
-
-    // Fields used when for slice:
-    double ts = 2;  // UTC time-stamp of data in slice mode (seconds since epoch)
-                    // of the time this entire KpiEvent was published to the kafka bus
-
-    repeated MetricInformation slice_data = 3;
-}
-
-/*
- * Identify to the area of the system impacted by the alarm
- */
-message AlarmEventType {
-    enum AlarmEventType {
-        COMMUNICATION = 0;
-        ENVIRONMENT = 1;
-        EQUIPMENT = 2;
-        SERVICE = 3;
-        PROCESSING = 4;
-        SECURITY = 5;
-    }
-}
-
-/*
- * Identify to the functional category originating the alarm
- */
-message AlarmEventCategory {
-    enum AlarmEventCategory {
-        PON = 0;
-        OLT = 1;
-        ONT = 2;
-        ONU = 3;
-        NNI = 4;
-    }
-}
-
-/*
- * Active state of the alarm
- */
-message AlarmEventState {
-    enum AlarmEventState {
-        RAISED = 0;
-        CLEARED = 1;
-    }
-}
-
-/*
- * Identify the overall impact of the alarm on the system
- */
-message AlarmEventSeverity {
-    enum AlarmEventSeverity {
-        INDETERMINATE = 0;
-        WARNING = 1;
-        MINOR = 2;
-        MAJOR = 3;
-        CRITICAL = 4;
-    }
-}
-
-/*
- *
- */
-message AlarmEvent {
-    // Unique ID for this alarm.  e.g. voltha.some_olt.1234
-    string id = 1;
-
-    // Refers to the area of the system impacted by the alarm
-    AlarmEventType.AlarmEventType type = 2;
-
-    // Refers to functional category of the alarm
-    AlarmEventCategory.AlarmEventCategory category = 3;
-
-    // Current active state of the alarm
-    AlarmEventState.AlarmEventState state = 4;
-
-    // Overall impact of the alarm on the system
-    AlarmEventSeverity.AlarmEventSeverity severity = 5;
-
-    // Timestamp at which the alarm was first raised
-    float raised_ts = 6;
-
-    // Timestamp at which the alarm was reported
-    float reported_ts = 7;
-
-    // Timestamp at which the alarm has changed since it was raised
-    float changed_ts = 8;
-
-    // Identifier of the originating resource of the alarm
-    string resource_id = 9;
-
-    // Textual explanation of the alarm
-    string description = 10;
-
-    // Key/Value storage for extra information that may give context to the alarm
-    map<string, string> context = 11;
-
-    // logical device id
-    string logical_device_id = 12;
-
-    // alarm_type  name indicates clearly the name of the alarm
-    string alarm_type_name = 13;
-}
diff --git a/go/voltha/health.pb.go b/go/voltha/health.pb.go
new file mode 100644
index 0000000..aa7d788
--- /dev/null
+++ b/go/voltha/health.pb.go
@@ -0,0 +1,198 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/health.proto
+
+package voltha // import "github.com/opencord/voltha-protos/go/voltha"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import empty "github.com/golang/protobuf/ptypes/empty"
+import _ "github.com/opencord/voltha-protos/go/common"
+import _ "google.golang.org/genproto/googleapis/api/annotations"
+
+import (
+	context "golang.org/x/net/context"
+	grpc "google.golang.org/grpc"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+// Health states
+type HealthStatus_HealthState int32
+
+const (
+	HealthStatus_HEALTHY    HealthStatus_HealthState = 0
+	HealthStatus_OVERLOADED HealthStatus_HealthState = 1
+	HealthStatus_DYING      HealthStatus_HealthState = 2
+)
+
+var HealthStatus_HealthState_name = map[int32]string{
+	0: "HEALTHY",
+	1: "OVERLOADED",
+	2: "DYING",
+}
+var HealthStatus_HealthState_value = map[string]int32{
+	"HEALTHY":    0,
+	"OVERLOADED": 1,
+	"DYING":      2,
+}
+
+func (x HealthStatus_HealthState) String() string {
+	return proto.EnumName(HealthStatus_HealthState_name, int32(x))
+}
+func (HealthStatus_HealthState) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_health_6b50bf63b9bb04db, []int{0, 0}
+}
+
+// Encode health status of a Voltha instance
+type HealthStatus struct {
+	// Current state of health of this Voltha instance
+	State                HealthStatus_HealthState `protobuf:"varint,1,opt,name=state,proto3,enum=voltha.HealthStatus_HealthState" json:"state,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
+	XXX_unrecognized     []byte                   `json:"-"`
+	XXX_sizecache        int32                    `json:"-"`
+}
+
+func (m *HealthStatus) Reset()         { *m = HealthStatus{} }
+func (m *HealthStatus) String() string { return proto.CompactTextString(m) }
+func (*HealthStatus) ProtoMessage()    {}
+func (*HealthStatus) Descriptor() ([]byte, []int) {
+	return fileDescriptor_health_6b50bf63b9bb04db, []int{0}
+}
+func (m *HealthStatus) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_HealthStatus.Unmarshal(m, b)
+}
+func (m *HealthStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_HealthStatus.Marshal(b, m, deterministic)
+}
+func (dst *HealthStatus) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_HealthStatus.Merge(dst, src)
+}
+func (m *HealthStatus) XXX_Size() int {
+	return xxx_messageInfo_HealthStatus.Size(m)
+}
+func (m *HealthStatus) XXX_DiscardUnknown() {
+	xxx_messageInfo_HealthStatus.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_HealthStatus proto.InternalMessageInfo
+
+func (m *HealthStatus) GetState() HealthStatus_HealthState {
+	if m != nil {
+		return m.State
+	}
+	return HealthStatus_HEALTHY
+}
+
+func init() {
+	proto.RegisterType((*HealthStatus)(nil), "voltha.HealthStatus")
+	proto.RegisterEnum("voltha.HealthStatus_HealthState", HealthStatus_HealthState_name, HealthStatus_HealthState_value)
+}
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ context.Context
+var _ grpc.ClientConn
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+const _ = grpc.SupportPackageIsVersion4
+
+// HealthServiceClient is the client API for HealthService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type HealthServiceClient interface {
+	// Return current health status of a Voltha instance
+	GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*HealthStatus, error)
+}
+
+type healthServiceClient struct {
+	cc *grpc.ClientConn
+}
+
+func NewHealthServiceClient(cc *grpc.ClientConn) HealthServiceClient {
+	return &healthServiceClient{cc}
+}
+
+func (c *healthServiceClient) GetHealthStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*HealthStatus, error) {
+	out := new(HealthStatus)
+	err := c.cc.Invoke(ctx, "/voltha.HealthService/GetHealthStatus", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// HealthServiceServer is the server API for HealthService service.
+type HealthServiceServer interface {
+	// Return current health status of a Voltha instance
+	GetHealthStatus(context.Context, *empty.Empty) (*HealthStatus, error)
+}
+
+func RegisterHealthServiceServer(s *grpc.Server, srv HealthServiceServer) {
+	s.RegisterService(&_HealthService_serviceDesc, srv)
+}
+
+func _HealthService_GetHealthStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(empty.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(HealthServiceServer).GetHealthStatus(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.HealthService/GetHealthStatus",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(HealthServiceServer).GetHealthStatus(ctx, req.(*empty.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+var _HealthService_serviceDesc = grpc.ServiceDesc{
+	ServiceName: "voltha.HealthService",
+	HandlerType: (*HealthServiceServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "GetHealthStatus",
+			Handler:    _HealthService_GetHealthStatus_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "voltha_protos/health.proto",
+}
+
+func init() { proto.RegisterFile("voltha_protos/health.proto", fileDescriptor_health_6b50bf63b9bb04db) }
+
+var fileDescriptor_health_6b50bf63b9bb04db = []byte{
+	// 289 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0xcb, 0xcf, 0x29,
+	0xc9, 0x48, 0x8c, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x2f, 0xd6, 0xcf, 0x48, 0x4d, 0xcc, 0x29, 0xc9,
+	0xd0, 0x03, 0xf3, 0x84, 0xd8, 0x20, 0x72, 0x52, 0x32, 0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9, 0xfa,
+	0x89, 0x05, 0x99, 0xfa, 0x89, 0x79, 0x79, 0xf9, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0xc5, 0x10,
+	0x55, 0x52, 0xd2, 0x50, 0x59, 0x30, 0x2f, 0xa9, 0x34, 0x4d, 0x3f, 0x35, 0xb7, 0xa0, 0xa4, 0x12,
+	0x2a, 0x29, 0x81, 0x6a, 0x7c, 0x6e, 0x6a, 0x49, 0x22, 0x44, 0x46, 0xa9, 0x85, 0x91, 0x8b, 0xc7,
+	0x03, 0x6c, 0x5b, 0x70, 0x49, 0x62, 0x49, 0x69, 0xb1, 0x90, 0x2d, 0x17, 0x6b, 0x71, 0x49, 0x62,
+	0x49, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x9f, 0x91, 0x82, 0x1e, 0x44, 0xab, 0x1e, 0xb2, 0x22,
+	0x24, 0x4e, 0xaa, 0x13, 0xeb, 0x8b, 0x6f, 0x67, 0x65, 0x19, 0x83, 0x20, 0xba, 0x94, 0x4c, 0xb9,
+	0xb8, 0x91, 0x24, 0x85, 0xb8, 0xb9, 0xd8, 0x3d, 0x5c, 0x1d, 0x7d, 0x42, 0x3c, 0x22, 0x05, 0x18,
+	0x84, 0xf8, 0xb8, 0xb8, 0xfc, 0xc3, 0x5c, 0x83, 0x7c, 0xfc, 0x1d, 0x5d, 0x5c, 0x5d, 0x04, 0x18,
+	0x85, 0x38, 0xb9, 0x58, 0x5d, 0x22, 0x3d, 0xfd, 0xdc, 0x05, 0x98, 0x8c, 0x12, 0xb9, 0x78, 0xa1,
+	0xda, 0x52, 0x8b, 0xca, 0x32, 0x93, 0x53, 0x85, 0x02, 0xb8, 0xf8, 0xdd, 0x53, 0x4b, 0x50, 0x5c,
+	0x26, 0xa6, 0x07, 0xf1, 0xa2, 0x1e, 0xcc, 0x8b, 0x7a, 0xae, 0x20, 0x2f, 0x4a, 0x89, 0x60, 0x73,
+	0xa2, 0x12, 0x7f, 0xd3, 0xe5, 0x27, 0x93, 0x99, 0x38, 0x85, 0xd8, 0xa1, 0x81, 0xe9, 0xa4, 0x1b,
+	0xa5, 0x9d, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x5f, 0x90, 0x9a,
+	0x97, 0x9c, 0x5f, 0x94, 0xa2, 0x0f, 0xd1, 0xab, 0x0b, 0x0d, 0x99, 0xf4, 0x7c, 0xa8, 0x40, 0x12,
+	0x1b, 0x58, 0xc4, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x06, 0x8f, 0xa7, 0x7d, 0x9a, 0x01, 0x00,
+	0x00,
+}
diff --git a/go/voltha/health.proto b/go/voltha/health.proto
deleted file mode 100644
index 7721825..0000000
--- a/go/voltha/health.proto
+++ /dev/null
@@ -1,36 +0,0 @@
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/voltha";
-
-package voltha;
-
-import "google/api/annotations.proto";
-import "google/protobuf/empty.proto";
-import "voltha_protos/meta.proto";
-
-// Encode health status of a Voltha instance
-message HealthStatus {
-
-    // Health states
-    enum HealthState {
-        HEALTHY = 0;  // The instance is healthy
-        OVERLOADED = 1;  // The instance is overloaded, decrease query rate
-        DYING = 2;  // The instance is in a critical condition, do not use it
-    }
-
-    // Current state of health of this Voltha instance
-    HealthState state = 1 [(access) = READ_ONLY];
-}
-
-// Health related services
-service HealthService {
-
-    // Return current health status of a Voltha instance
-    rpc GetHealthStatus(google.protobuf.Empty) returns (HealthStatus) {
-        option (google.api.http) = {
-            get: "/health"
-        };
-    }
-
-}
-
diff --git a/go/voltha/logical_device.pb.go b/go/voltha/logical_device.pb.go
new file mode 100644
index 0000000..0008876
--- /dev/null
+++ b/go/voltha/logical_device.pb.go
@@ -0,0 +1,365 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/logical_device.proto
+
+package voltha // import "github.com/opencord/voltha-protos/go/voltha"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import _ "github.com/opencord/voltha-protos/go/common"
+import openflow_13 "github.com/opencord/voltha-protos/go/openflow_13"
+import _ "google.golang.org/genproto/googleapis/api/annotations"
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type LogicalPortId struct {
+	// unique id of logical device
+	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	// id of the port on the logical device
+	PortId               string   `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *LogicalPortId) Reset()         { *m = LogicalPortId{} }
+func (m *LogicalPortId) String() string { return proto.CompactTextString(m) }
+func (*LogicalPortId) ProtoMessage()    {}
+func (*LogicalPortId) Descriptor() ([]byte, []int) {
+	return fileDescriptor_logical_device_33972ea6b3a0b7e8, []int{0}
+}
+func (m *LogicalPortId) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_LogicalPortId.Unmarshal(m, b)
+}
+func (m *LogicalPortId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_LogicalPortId.Marshal(b, m, deterministic)
+}
+func (dst *LogicalPortId) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_LogicalPortId.Merge(dst, src)
+}
+func (m *LogicalPortId) XXX_Size() int {
+	return xxx_messageInfo_LogicalPortId.Size(m)
+}
+func (m *LogicalPortId) XXX_DiscardUnknown() {
+	xxx_messageInfo_LogicalPortId.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogicalPortId proto.InternalMessageInfo
+
+func (m *LogicalPortId) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *LogicalPortId) GetPortId() string {
+	if m != nil {
+		return m.PortId
+	}
+	return ""
+}
+
+type LogicalPort struct {
+	Id                   string               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	OfpPort              *openflow_13.OfpPort `protobuf:"bytes,2,opt,name=ofp_port,json=ofpPort,proto3" json:"ofp_port,omitempty"`
+	DeviceId             string               `protobuf:"bytes,3,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
+	DevicePortNo         uint32               `protobuf:"varint,4,opt,name=device_port_no,json=devicePortNo,proto3" json:"device_port_no,omitempty"`
+	RootPort             bool                 `protobuf:"varint,5,opt,name=root_port,json=rootPort,proto3" json:"root_port,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
+	XXX_unrecognized     []byte               `json:"-"`
+	XXX_sizecache        int32                `json:"-"`
+}
+
+func (m *LogicalPort) Reset()         { *m = LogicalPort{} }
+func (m *LogicalPort) String() string { return proto.CompactTextString(m) }
+func (*LogicalPort) ProtoMessage()    {}
+func (*LogicalPort) Descriptor() ([]byte, []int) {
+	return fileDescriptor_logical_device_33972ea6b3a0b7e8, []int{1}
+}
+func (m *LogicalPort) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_LogicalPort.Unmarshal(m, b)
+}
+func (m *LogicalPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_LogicalPort.Marshal(b, m, deterministic)
+}
+func (dst *LogicalPort) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_LogicalPort.Merge(dst, src)
+}
+func (m *LogicalPort) XXX_Size() int {
+	return xxx_messageInfo_LogicalPort.Size(m)
+}
+func (m *LogicalPort) XXX_DiscardUnknown() {
+	xxx_messageInfo_LogicalPort.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogicalPort proto.InternalMessageInfo
+
+func (m *LogicalPort) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *LogicalPort) GetOfpPort() *openflow_13.OfpPort {
+	if m != nil {
+		return m.OfpPort
+	}
+	return nil
+}
+
+func (m *LogicalPort) GetDeviceId() string {
+	if m != nil {
+		return m.DeviceId
+	}
+	return ""
+}
+
+func (m *LogicalPort) GetDevicePortNo() uint32 {
+	if m != nil {
+		return m.DevicePortNo
+	}
+	return 0
+}
+
+func (m *LogicalPort) GetRootPort() bool {
+	if m != nil {
+		return m.RootPort
+	}
+	return false
+}
+
+type LogicalPorts struct {
+	Items                []*LogicalPort `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
+	XXX_unrecognized     []byte         `json:"-"`
+	XXX_sizecache        int32          `json:"-"`
+}
+
+func (m *LogicalPorts) Reset()         { *m = LogicalPorts{} }
+func (m *LogicalPorts) String() string { return proto.CompactTextString(m) }
+func (*LogicalPorts) ProtoMessage()    {}
+func (*LogicalPorts) Descriptor() ([]byte, []int) {
+	return fileDescriptor_logical_device_33972ea6b3a0b7e8, []int{2}
+}
+func (m *LogicalPorts) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_LogicalPorts.Unmarshal(m, b)
+}
+func (m *LogicalPorts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_LogicalPorts.Marshal(b, m, deterministic)
+}
+func (dst *LogicalPorts) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_LogicalPorts.Merge(dst, src)
+}
+func (m *LogicalPorts) XXX_Size() int {
+	return xxx_messageInfo_LogicalPorts.Size(m)
+}
+func (m *LogicalPorts) XXX_DiscardUnknown() {
+	xxx_messageInfo_LogicalPorts.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogicalPorts proto.InternalMessageInfo
+
+func (m *LogicalPorts) GetItems() []*LogicalPort {
+	if m != nil {
+		return m.Items
+	}
+	return nil
+}
+
+type LogicalDevice struct {
+	// unique id of logical device
+	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	// unique datapath id for the logical device (used by the SDN controller)
+	DatapathId uint64 `protobuf:"varint,2,opt,name=datapath_id,json=datapathId,proto3" json:"datapath_id,omitempty"`
+	// device description
+	Desc *openflow_13.OfpDesc `protobuf:"bytes,3,opt,name=desc,proto3" json:"desc,omitempty"`
+	// device features
+	SwitchFeatures *openflow_13.OfpSwitchFeatures `protobuf:"bytes,4,opt,name=switch_features,json=switchFeatures,proto3" json:"switch_features,omitempty"`
+	// name of the root device anchoring logical device
+	RootDeviceId string `protobuf:"bytes,5,opt,name=root_device_id,json=rootDeviceId,proto3" json:"root_device_id,omitempty"`
+	// logical device ports
+	Ports []*LogicalPort `protobuf:"bytes,128,rep,name=ports,proto3" json:"ports,omitempty"`
+	// flows configured on the logical device
+	Flows *openflow_13.Flows `protobuf:"bytes,129,opt,name=flows,proto3" json:"flows,omitempty"`
+	// flow groups configured on the logical device
+	FlowGroups           *openflow_13.FlowGroups `protobuf:"bytes,130,opt,name=flow_groups,json=flowGroups,proto3" json:"flow_groups,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
+	XXX_unrecognized     []byte                  `json:"-"`
+	XXX_sizecache        int32                   `json:"-"`
+}
+
+func (m *LogicalDevice) Reset()         { *m = LogicalDevice{} }
+func (m *LogicalDevice) String() string { return proto.CompactTextString(m) }
+func (*LogicalDevice) ProtoMessage()    {}
+func (*LogicalDevice) Descriptor() ([]byte, []int) {
+	return fileDescriptor_logical_device_33972ea6b3a0b7e8, []int{3}
+}
+func (m *LogicalDevice) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_LogicalDevice.Unmarshal(m, b)
+}
+func (m *LogicalDevice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_LogicalDevice.Marshal(b, m, deterministic)
+}
+func (dst *LogicalDevice) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_LogicalDevice.Merge(dst, src)
+}
+func (m *LogicalDevice) XXX_Size() int {
+	return xxx_messageInfo_LogicalDevice.Size(m)
+}
+func (m *LogicalDevice) XXX_DiscardUnknown() {
+	xxx_messageInfo_LogicalDevice.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogicalDevice proto.InternalMessageInfo
+
+func (m *LogicalDevice) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *LogicalDevice) GetDatapathId() uint64 {
+	if m != nil {
+		return m.DatapathId
+	}
+	return 0
+}
+
+func (m *LogicalDevice) GetDesc() *openflow_13.OfpDesc {
+	if m != nil {
+		return m.Desc
+	}
+	return nil
+}
+
+func (m *LogicalDevice) GetSwitchFeatures() *openflow_13.OfpSwitchFeatures {
+	if m != nil {
+		return m.SwitchFeatures
+	}
+	return nil
+}
+
+func (m *LogicalDevice) GetRootDeviceId() string {
+	if m != nil {
+		return m.RootDeviceId
+	}
+	return ""
+}
+
+func (m *LogicalDevice) GetPorts() []*LogicalPort {
+	if m != nil {
+		return m.Ports
+	}
+	return nil
+}
+
+func (m *LogicalDevice) GetFlows() *openflow_13.Flows {
+	if m != nil {
+		return m.Flows
+	}
+	return nil
+}
+
+func (m *LogicalDevice) GetFlowGroups() *openflow_13.FlowGroups {
+	if m != nil {
+		return m.FlowGroups
+	}
+	return nil
+}
+
+type LogicalDevices struct {
+	Items                []*LogicalDevice `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
+}
+
+func (m *LogicalDevices) Reset()         { *m = LogicalDevices{} }
+func (m *LogicalDevices) String() string { return proto.CompactTextString(m) }
+func (*LogicalDevices) ProtoMessage()    {}
+func (*LogicalDevices) Descriptor() ([]byte, []int) {
+	return fileDescriptor_logical_device_33972ea6b3a0b7e8, []int{4}
+}
+func (m *LogicalDevices) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_LogicalDevices.Unmarshal(m, b)
+}
+func (m *LogicalDevices) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_LogicalDevices.Marshal(b, m, deterministic)
+}
+func (dst *LogicalDevices) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_LogicalDevices.Merge(dst, src)
+}
+func (m *LogicalDevices) XXX_Size() int {
+	return xxx_messageInfo_LogicalDevices.Size(m)
+}
+func (m *LogicalDevices) XXX_DiscardUnknown() {
+	xxx_messageInfo_LogicalDevices.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_LogicalDevices proto.InternalMessageInfo
+
+func (m *LogicalDevices) GetItems() []*LogicalDevice {
+	if m != nil {
+		return m.Items
+	}
+	return nil
+}
+
+func init() {
+	proto.RegisterType((*LogicalPortId)(nil), "voltha.LogicalPortId")
+	proto.RegisterType((*LogicalPort)(nil), "voltha.LogicalPort")
+	proto.RegisterType((*LogicalPorts)(nil), "voltha.LogicalPorts")
+	proto.RegisterType((*LogicalDevice)(nil), "voltha.LogicalDevice")
+	proto.RegisterType((*LogicalDevices)(nil), "voltha.LogicalDevices")
+}
+
+func init() {
+	proto.RegisterFile("voltha_protos/logical_device.proto", fileDescriptor_logical_device_33972ea6b3a0b7e8)
+}
+
+var fileDescriptor_logical_device_33972ea6b3a0b7e8 = []byte{
+	// 488 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0x4f, 0x6b, 0xd4, 0x40,
+	0x14, 0x37, 0xdd, 0xcd, 0x76, 0xf7, 0x65, 0xbb, 0xc2, 0x48, 0x69, 0xa8, 0x4a, 0x43, 0xf0, 0xb0,
+	0xa5, 0x34, 0x5b, 0xb7, 0x08, 0x7a, 0x10, 0x64, 0x29, 0x95, 0x05, 0x11, 0x99, 0xa3, 0x97, 0x30,
+	0xcd, 0x24, 0xd9, 0x81, 0x6c, 0x5e, 0xc8, 0xcc, 0xb6, 0x57, 0xf5, 0xe2, 0xc7, 0xf1, 0x93, 0xf8,
+	0x25, 0xfc, 0x10, 0x9e, 0x65, 0x66, 0x92, 0xba, 0xe9, 0xea, 0x31, 0xbf, 0x3f, 0xef, 0xfd, 0xde,
+	0x6f, 0x08, 0x84, 0xb7, 0x58, 0xa8, 0x15, 0x8b, 0xab, 0x1a, 0x15, 0xca, 0x59, 0x81, 0xb9, 0x48,
+	0x58, 0x11, 0xf3, 0xf4, 0x56, 0x24, 0x69, 0x64, 0x50, 0x32, 0xb0, 0x9a, 0xe3, 0x67, 0x39, 0x62,
+	0x5e, 0xa4, 0x33, 0x56, 0x89, 0x19, 0x2b, 0x4b, 0x54, 0x4c, 0x09, 0x2c, 0xa5, 0x55, 0x1d, 0xfb,
+	0xdd, 0x49, 0xeb, 0x54, 0xb1, 0x86, 0x39, 0xe9, 0x32, 0x58, 0xa5, 0x65, 0x56, 0xe0, 0x5d, 0xfc,
+	0xf2, 0xd2, 0x0a, 0xc2, 0xd7, 0x70, 0xf0, 0xc1, 0x2e, 0xfe, 0x84, 0xb5, 0x5a, 0x72, 0x32, 0x81,
+	0x3d, 0xc1, 0x7d, 0x27, 0x70, 0xa6, 0x23, 0xba, 0x27, 0x38, 0x39, 0x82, 0xfd, 0x0a, 0x6b, 0x15,
+	0x0b, 0xee, 0xef, 0x19, 0x70, 0x50, 0x19, 0x61, 0xf8, 0xc3, 0x01, 0x6f, 0xcb, 0xba, 0x63, 0xbc,
+	0x80, 0x21, 0x66, 0x55, 0xac, 0xd5, 0xc6, 0xe9, 0xcd, 0x0f, 0xa3, 0xed, 0xfd, 0x2d, 0x49, 0xf7,
+	0x31, 0xab, 0xcc, 0x84, 0xa7, 0x30, 0xb2, 0xc7, 0xeb, 0x65, 0x3d, 0x33, 0x68, 0x68, 0x81, 0x25,
+	0x27, 0x2f, 0x60, 0xd2, 0x90, 0x26, 0x4e, 0x89, 0x7e, 0x3f, 0x70, 0xa6, 0x07, 0x74, 0x6c, 0x51,
+	0x3d, 0xe0, 0x23, 0xea, 0x11, 0x35, 0xa2, 0xb2, 0x5b, 0xdd, 0xc0, 0x99, 0x0e, 0xe9, 0x50, 0x03,
+	0x9a, 0x0e, 0xdf, 0xc0, 0x78, 0x2b, 0xb0, 0x24, 0xa7, 0xe0, 0x0a, 0x95, 0xae, 0xa5, 0xef, 0x04,
+	0xbd, 0xa9, 0x37, 0x7f, 0x12, 0xd9, 0xb2, 0xa2, 0x2d, 0x11, 0xb5, 0x8a, 0xf0, 0x7b, 0xef, 0xbe,
+	0xa7, 0x2b, 0xb3, 0x6f, 0xe7, 0xdc, 0x13, 0xf0, 0x38, 0x53, 0xac, 0x62, 0x6a, 0xd5, 0x76, 0xd5,
+	0xa7, 0xd0, 0x42, 0x4b, 0x4e, 0x4e, 0xa1, 0xcf, 0x53, 0x99, 0x98, 0xc3, 0xfe, 0xd5, 0x85, 0x26,
+	0xa9, 0x91, 0x90, 0x25, 0x3c, 0x96, 0x77, 0x42, 0x25, 0xab, 0x38, 0x4b, 0x99, 0xda, 0xd4, 0xa9,
+	0x34, 0xc7, 0x7a, 0xf3, 0x60, 0xc7, 0xf5, 0x40, 0x47, 0x27, 0x16, 0xb8, 0x6e, 0xbe, 0x75, 0x6d,
+	0xa6, 0x90, 0xbf, 0xc5, 0xba, 0x26, 0xf2, 0x58, 0xa3, 0x57, 0x6d, 0xb9, 0xaf, 0xc0, 0xd5, 0x8d,
+	0x49, 0xff, 0xcb, 0xff, 0xab, 0x58, 0x8c, 0x7e, 0xfd, 0xfe, 0xf9, 0xbc, 0xaf, 0xcf, 0xa6, 0x56,
+	0x4d, 0x2e, 0xc0, 0xd5, 0x59, 0xa4, 0xff, 0xd5, 0x31, 0xf1, 0x48, 0x27, 0xde, 0xb5, 0xa6, 0x16,
+	0xae, 0x76, 0x3d, 0xa2, 0x56, 0x48, 0xde, 0x81, 0x67, 0xe8, 0xbc, 0xc6, 0x4d, 0x25, 0xfd, 0x6f,
+	0xd6, 0x77, 0xb4, 0xe3, 0x7b, 0x6f, 0xf8, 0xd6, 0x0c, 0xd9, 0x3d, 0x14, 0xbe, 0x85, 0x49, 0xe7,
+	0x21, 0x24, 0x39, 0xeb, 0x3e, 0xe3, 0xe1, 0x83, 0xec, 0x56, 0xd6, 0x3c, 0xe4, 0xe2, 0xfc, 0xf3,
+	0x59, 0x2e, 0xd4, 0x6a, 0x73, 0x13, 0x25, 0xb8, 0x36, 0xff, 0x43, 0x82, 0x35, 0x9f, 0x59, 0xcb,
+	0x79, 0xf3, 0x9b, 0xe4, 0xd8, 0x00, 0x37, 0x03, 0x83, 0x5c, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff,
+	0xe6, 0x88, 0x38, 0xe0, 0xac, 0x03, 0x00, 0x00,
+}
diff --git a/go/voltha/logical_device.proto b/go/voltha/logical_device.proto
deleted file mode 100644
index 6e3a233..0000000
--- a/go/voltha/logical_device.proto
+++ /dev/null
@@ -1,61 +0,0 @@
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/voltha";
-
-package voltha;
-
-import "google/api/annotations.proto";
-import "voltha_protos/meta.proto";
-import "voltha_protos/openflow_13.proto";
-
-message LogicalPortId {
-    // unique id of logical device
-    string id = 1;
-
-    // id of the port on the logical device
-    string port_id = 2;
-}
-
-message LogicalPort {
-    string id = 1;
-    openflow_13.ofp_port ofp_port = 2;
-    string device_id = 3;
-    uint32 device_port_no = 4;
-    bool root_port = 5;
-}
-
-message LogicalPorts {
-    repeated LogicalPort items = 1;
-}
-
-message LogicalDevice {
-
-    // unique id of logical device
-    string id = 1;
-
-    // unique datapath id for the logical device (used by the SDN controller)
-    uint64 datapath_id = 2;
-
-    // device description
-    openflow_13.ofp_desc desc = 3;
-
-    // device features
-    openflow_13.ofp_switch_features switch_features = 4;
-
-    // name of the root device anchoring logical device
-    string root_device_id = 5;
-
-    // logical device ports
-    repeated LogicalPort ports = 128 [(child_node) = {key: "id"}];
-
-    // flows configured on the logical device
-    openflow_13.Flows flows = 129 [(child_node) = {}];
-
-    // flow groups configured on the logical device
-    openflow_13.FlowGroups flow_groups = 130 [(child_node) = {}];
-
-}
-
-message LogicalDevices {
-    repeated LogicalDevice items = 1;
-}
diff --git a/go/voltha/ponsim.pb.go b/go/voltha/ponsim.pb.go
new file mode 100644
index 0000000..2fac739
--- /dev/null
+++ b/go/voltha/ponsim.pb.go
@@ -0,0 +1,678 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/ponsim.proto
+
+package voltha // import "github.com/opencord/voltha-protos/go/voltha"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import empty "github.com/golang/protobuf/ptypes/empty"
+import openflow_13 "github.com/opencord/voltha-protos/go/openflow_13"
+
+import (
+	context "golang.org/x/net/context"
+	grpc "google.golang.org/grpc"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+type PonSimOnuDeviceInfo struct {
+	UniPort              int32    `protobuf:"varint,1,opt,name=uni_port,json=uniPort,proto3" json:"uni_port,omitempty"`
+	SerialNumber         string   `protobuf:"bytes,2,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PonSimOnuDeviceInfo) Reset()         { *m = PonSimOnuDeviceInfo{} }
+func (m *PonSimOnuDeviceInfo) String() string { return proto.CompactTextString(m) }
+func (*PonSimOnuDeviceInfo) ProtoMessage()    {}
+func (*PonSimOnuDeviceInfo) Descriptor() ([]byte, []int) {
+	return fileDescriptor_ponsim_bb56e7457209b09b, []int{0}
+}
+func (m *PonSimOnuDeviceInfo) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PonSimOnuDeviceInfo.Unmarshal(m, b)
+}
+func (m *PonSimOnuDeviceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PonSimOnuDeviceInfo.Marshal(b, m, deterministic)
+}
+func (dst *PonSimOnuDeviceInfo) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PonSimOnuDeviceInfo.Merge(dst, src)
+}
+func (m *PonSimOnuDeviceInfo) XXX_Size() int {
+	return xxx_messageInfo_PonSimOnuDeviceInfo.Size(m)
+}
+func (m *PonSimOnuDeviceInfo) XXX_DiscardUnknown() {
+	xxx_messageInfo_PonSimOnuDeviceInfo.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PonSimOnuDeviceInfo proto.InternalMessageInfo
+
+func (m *PonSimOnuDeviceInfo) GetUniPort() int32 {
+	if m != nil {
+		return m.UniPort
+	}
+	return 0
+}
+
+func (m *PonSimOnuDeviceInfo) GetSerialNumber() string {
+	if m != nil {
+		return m.SerialNumber
+	}
+	return ""
+}
+
+type PonSimDeviceInfo struct {
+	NniPort              int32                  `protobuf:"varint,1,opt,name=nni_port,json=nniPort,proto3" json:"nni_port,omitempty"`
+	Onus                 []*PonSimOnuDeviceInfo `protobuf:"bytes,2,rep,name=onus,proto3" json:"onus,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
+	XXX_unrecognized     []byte                 `json:"-"`
+	XXX_sizecache        int32                  `json:"-"`
+}
+
+func (m *PonSimDeviceInfo) Reset()         { *m = PonSimDeviceInfo{} }
+func (m *PonSimDeviceInfo) String() string { return proto.CompactTextString(m) }
+func (*PonSimDeviceInfo) ProtoMessage()    {}
+func (*PonSimDeviceInfo) Descriptor() ([]byte, []int) {
+	return fileDescriptor_ponsim_bb56e7457209b09b, []int{1}
+}
+func (m *PonSimDeviceInfo) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PonSimDeviceInfo.Unmarshal(m, b)
+}
+func (m *PonSimDeviceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PonSimDeviceInfo.Marshal(b, m, deterministic)
+}
+func (dst *PonSimDeviceInfo) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PonSimDeviceInfo.Merge(dst, src)
+}
+func (m *PonSimDeviceInfo) XXX_Size() int {
+	return xxx_messageInfo_PonSimDeviceInfo.Size(m)
+}
+func (m *PonSimDeviceInfo) XXX_DiscardUnknown() {
+	xxx_messageInfo_PonSimDeviceInfo.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PonSimDeviceInfo proto.InternalMessageInfo
+
+func (m *PonSimDeviceInfo) GetNniPort() int32 {
+	if m != nil {
+		return m.NniPort
+	}
+	return 0
+}
+
+func (m *PonSimDeviceInfo) GetOnus() []*PonSimOnuDeviceInfo {
+	if m != nil {
+		return m.Onus
+	}
+	return nil
+}
+
+type FlowTable struct {
+	Port                 int32                       `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
+	Flows                []*openflow_13.OfpFlowStats `protobuf:"bytes,2,rep,name=flows,proto3" json:"flows,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
+	XXX_unrecognized     []byte                      `json:"-"`
+	XXX_sizecache        int32                       `json:"-"`
+}
+
+func (m *FlowTable) Reset()         { *m = FlowTable{} }
+func (m *FlowTable) String() string { return proto.CompactTextString(m) }
+func (*FlowTable) ProtoMessage()    {}
+func (*FlowTable) Descriptor() ([]byte, []int) {
+	return fileDescriptor_ponsim_bb56e7457209b09b, []int{2}
+}
+func (m *FlowTable) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_FlowTable.Unmarshal(m, b)
+}
+func (m *FlowTable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_FlowTable.Marshal(b, m, deterministic)
+}
+func (dst *FlowTable) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FlowTable.Merge(dst, src)
+}
+func (m *FlowTable) XXX_Size() int {
+	return xxx_messageInfo_FlowTable.Size(m)
+}
+func (m *FlowTable) XXX_DiscardUnknown() {
+	xxx_messageInfo_FlowTable.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FlowTable proto.InternalMessageInfo
+
+func (m *FlowTable) GetPort() int32 {
+	if m != nil {
+		return m.Port
+	}
+	return 0
+}
+
+func (m *FlowTable) GetFlows() []*openflow_13.OfpFlowStats {
+	if m != nil {
+		return m.Flows
+	}
+	return nil
+}
+
+type PonSimFrame struct {
+	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	Payload              []byte   `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
+	OutPort              int32    `protobuf:"varint,3,opt,name=out_port,json=outPort,proto3" json:"out_port,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PonSimFrame) Reset()         { *m = PonSimFrame{} }
+func (m *PonSimFrame) String() string { return proto.CompactTextString(m) }
+func (*PonSimFrame) ProtoMessage()    {}
+func (*PonSimFrame) Descriptor() ([]byte, []int) {
+	return fileDescriptor_ponsim_bb56e7457209b09b, []int{3}
+}
+func (m *PonSimFrame) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PonSimFrame.Unmarshal(m, b)
+}
+func (m *PonSimFrame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PonSimFrame.Marshal(b, m, deterministic)
+}
+func (dst *PonSimFrame) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PonSimFrame.Merge(dst, src)
+}
+func (m *PonSimFrame) XXX_Size() int {
+	return xxx_messageInfo_PonSimFrame.Size(m)
+}
+func (m *PonSimFrame) XXX_DiscardUnknown() {
+	xxx_messageInfo_PonSimFrame.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PonSimFrame proto.InternalMessageInfo
+
+func (m *PonSimFrame) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *PonSimFrame) GetPayload() []byte {
+	if m != nil {
+		return m.Payload
+	}
+	return nil
+}
+
+func (m *PonSimFrame) GetOutPort() int32 {
+	if m != nil {
+		return m.OutPort
+	}
+	return 0
+}
+
+type PonSimPacketCounter struct {
+	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+	Value                int64    `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PonSimPacketCounter) Reset()         { *m = PonSimPacketCounter{} }
+func (m *PonSimPacketCounter) String() string { return proto.CompactTextString(m) }
+func (*PonSimPacketCounter) ProtoMessage()    {}
+func (*PonSimPacketCounter) Descriptor() ([]byte, []int) {
+	return fileDescriptor_ponsim_bb56e7457209b09b, []int{4}
+}
+func (m *PonSimPacketCounter) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PonSimPacketCounter.Unmarshal(m, b)
+}
+func (m *PonSimPacketCounter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PonSimPacketCounter.Marshal(b, m, deterministic)
+}
+func (dst *PonSimPacketCounter) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PonSimPacketCounter.Merge(dst, src)
+}
+func (m *PonSimPacketCounter) XXX_Size() int {
+	return xxx_messageInfo_PonSimPacketCounter.Size(m)
+}
+func (m *PonSimPacketCounter) XXX_DiscardUnknown() {
+	xxx_messageInfo_PonSimPacketCounter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PonSimPacketCounter proto.InternalMessageInfo
+
+func (m *PonSimPacketCounter) GetName() string {
+	if m != nil {
+		return m.Name
+	}
+	return ""
+}
+
+func (m *PonSimPacketCounter) GetValue() int64 {
+	if m != nil {
+		return m.Value
+	}
+	return 0
+}
+
+type PonSimPortMetrics struct {
+	PortName             string                 `protobuf:"bytes,1,opt,name=port_name,json=portName,proto3" json:"port_name,omitempty"`
+	Packets              []*PonSimPacketCounter `protobuf:"bytes,2,rep,name=packets,proto3" json:"packets,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
+	XXX_unrecognized     []byte                 `json:"-"`
+	XXX_sizecache        int32                  `json:"-"`
+}
+
+func (m *PonSimPortMetrics) Reset()         { *m = PonSimPortMetrics{} }
+func (m *PonSimPortMetrics) String() string { return proto.CompactTextString(m) }
+func (*PonSimPortMetrics) ProtoMessage()    {}
+func (*PonSimPortMetrics) Descriptor() ([]byte, []int) {
+	return fileDescriptor_ponsim_bb56e7457209b09b, []int{5}
+}
+func (m *PonSimPortMetrics) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PonSimPortMetrics.Unmarshal(m, b)
+}
+func (m *PonSimPortMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PonSimPortMetrics.Marshal(b, m, deterministic)
+}
+func (dst *PonSimPortMetrics) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PonSimPortMetrics.Merge(dst, src)
+}
+func (m *PonSimPortMetrics) XXX_Size() int {
+	return xxx_messageInfo_PonSimPortMetrics.Size(m)
+}
+func (m *PonSimPortMetrics) XXX_DiscardUnknown() {
+	xxx_messageInfo_PonSimPortMetrics.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PonSimPortMetrics proto.InternalMessageInfo
+
+func (m *PonSimPortMetrics) GetPortName() string {
+	if m != nil {
+		return m.PortName
+	}
+	return ""
+}
+
+func (m *PonSimPortMetrics) GetPackets() []*PonSimPacketCounter {
+	if m != nil {
+		return m.Packets
+	}
+	return nil
+}
+
+type PonSimMetrics struct {
+	Device               string               `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
+	Metrics              []*PonSimPortMetrics `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
+	XXX_unrecognized     []byte               `json:"-"`
+	XXX_sizecache        int32                `json:"-"`
+}
+
+func (m *PonSimMetrics) Reset()         { *m = PonSimMetrics{} }
+func (m *PonSimMetrics) String() string { return proto.CompactTextString(m) }
+func (*PonSimMetrics) ProtoMessage()    {}
+func (*PonSimMetrics) Descriptor() ([]byte, []int) {
+	return fileDescriptor_ponsim_bb56e7457209b09b, []int{6}
+}
+func (m *PonSimMetrics) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PonSimMetrics.Unmarshal(m, b)
+}
+func (m *PonSimMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PonSimMetrics.Marshal(b, m, deterministic)
+}
+func (dst *PonSimMetrics) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PonSimMetrics.Merge(dst, src)
+}
+func (m *PonSimMetrics) XXX_Size() int {
+	return xxx_messageInfo_PonSimMetrics.Size(m)
+}
+func (m *PonSimMetrics) XXX_DiscardUnknown() {
+	xxx_messageInfo_PonSimMetrics.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PonSimMetrics proto.InternalMessageInfo
+
+func (m *PonSimMetrics) GetDevice() string {
+	if m != nil {
+		return m.Device
+	}
+	return ""
+}
+
+func (m *PonSimMetrics) GetMetrics() []*PonSimPortMetrics {
+	if m != nil {
+		return m.Metrics
+	}
+	return nil
+}
+
+type PonSimMetricsRequest struct {
+	Port                 int32    `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *PonSimMetricsRequest) Reset()         { *m = PonSimMetricsRequest{} }
+func (m *PonSimMetricsRequest) String() string { return proto.CompactTextString(m) }
+func (*PonSimMetricsRequest) ProtoMessage()    {}
+func (*PonSimMetricsRequest) Descriptor() ([]byte, []int) {
+	return fileDescriptor_ponsim_bb56e7457209b09b, []int{7}
+}
+func (m *PonSimMetricsRequest) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_PonSimMetricsRequest.Unmarshal(m, b)
+}
+func (m *PonSimMetricsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_PonSimMetricsRequest.Marshal(b, m, deterministic)
+}
+func (dst *PonSimMetricsRequest) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_PonSimMetricsRequest.Merge(dst, src)
+}
+func (m *PonSimMetricsRequest) XXX_Size() int {
+	return xxx_messageInfo_PonSimMetricsRequest.Size(m)
+}
+func (m *PonSimMetricsRequest) XXX_DiscardUnknown() {
+	xxx_messageInfo_PonSimMetricsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PonSimMetricsRequest proto.InternalMessageInfo
+
+func (m *PonSimMetricsRequest) GetPort() int32 {
+	if m != nil {
+		return m.Port
+	}
+	return 0
+}
+
+func init() {
+	proto.RegisterType((*PonSimOnuDeviceInfo)(nil), "voltha.PonSimOnuDeviceInfo")
+	proto.RegisterType((*PonSimDeviceInfo)(nil), "voltha.PonSimDeviceInfo")
+	proto.RegisterType((*FlowTable)(nil), "voltha.FlowTable")
+	proto.RegisterType((*PonSimFrame)(nil), "voltha.PonSimFrame")
+	proto.RegisterType((*PonSimPacketCounter)(nil), "voltha.PonSimPacketCounter")
+	proto.RegisterType((*PonSimPortMetrics)(nil), "voltha.PonSimPortMetrics")
+	proto.RegisterType((*PonSimMetrics)(nil), "voltha.PonSimMetrics")
+	proto.RegisterType((*PonSimMetricsRequest)(nil), "voltha.PonSimMetricsRequest")
+}
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ context.Context
+var _ grpc.ClientConn
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+const _ = grpc.SupportPackageIsVersion4
+
+// PonSimClient is the client API for PonSim service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type PonSimClient interface {
+	SendFrame(ctx context.Context, in *PonSimFrame, opts ...grpc.CallOption) (*empty.Empty, error)
+	ReceiveFrames(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (PonSim_ReceiveFramesClient, error)
+	GetDeviceInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PonSimDeviceInfo, error)
+	UpdateFlowTable(ctx context.Context, in *FlowTable, opts ...grpc.CallOption) (*empty.Empty, error)
+	GetStats(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PonSimMetrics, error)
+}
+
+type ponSimClient struct {
+	cc *grpc.ClientConn
+}
+
+func NewPonSimClient(cc *grpc.ClientConn) PonSimClient {
+	return &ponSimClient{cc}
+}
+
+func (c *ponSimClient) SendFrame(ctx context.Context, in *PonSimFrame, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.PonSim/SendFrame", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *ponSimClient) ReceiveFrames(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (PonSim_ReceiveFramesClient, error) {
+	stream, err := c.cc.NewStream(ctx, &_PonSim_serviceDesc.Streams[0], "/voltha.PonSim/ReceiveFrames", opts...)
+	if err != nil {
+		return nil, err
+	}
+	x := &ponSimReceiveFramesClient{stream}
+	if err := x.ClientStream.SendMsg(in); err != nil {
+		return nil, err
+	}
+	if err := x.ClientStream.CloseSend(); err != nil {
+		return nil, err
+	}
+	return x, nil
+}
+
+type PonSim_ReceiveFramesClient interface {
+	Recv() (*PonSimFrame, error)
+	grpc.ClientStream
+}
+
+type ponSimReceiveFramesClient struct {
+	grpc.ClientStream
+}
+
+func (x *ponSimReceiveFramesClient) Recv() (*PonSimFrame, error) {
+	m := new(PonSimFrame)
+	if err := x.ClientStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+func (c *ponSimClient) GetDeviceInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PonSimDeviceInfo, error) {
+	out := new(PonSimDeviceInfo)
+	err := c.cc.Invoke(ctx, "/voltha.PonSim/GetDeviceInfo", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *ponSimClient) UpdateFlowTable(ctx context.Context, in *FlowTable, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.PonSim/UpdateFlowTable", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *ponSimClient) GetStats(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PonSimMetrics, error) {
+	out := new(PonSimMetrics)
+	err := c.cc.Invoke(ctx, "/voltha.PonSim/GetStats", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// PonSimServer is the server API for PonSim service.
+type PonSimServer interface {
+	SendFrame(context.Context, *PonSimFrame) (*empty.Empty, error)
+	ReceiveFrames(*empty.Empty, PonSim_ReceiveFramesServer) error
+	GetDeviceInfo(context.Context, *empty.Empty) (*PonSimDeviceInfo, error)
+	UpdateFlowTable(context.Context, *FlowTable) (*empty.Empty, error)
+	GetStats(context.Context, *empty.Empty) (*PonSimMetrics, error)
+}
+
+func RegisterPonSimServer(s *grpc.Server, srv PonSimServer) {
+	s.RegisterService(&_PonSim_serviceDesc, srv)
+}
+
+func _PonSim_SendFrame_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(PonSimFrame)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(PonSimServer).SendFrame(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.PonSim/SendFrame",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(PonSimServer).SendFrame(ctx, req.(*PonSimFrame))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _PonSim_ReceiveFrames_Handler(srv interface{}, stream grpc.ServerStream) error {
+	m := new(empty.Empty)
+	if err := stream.RecvMsg(m); err != nil {
+		return err
+	}
+	return srv.(PonSimServer).ReceiveFrames(m, &ponSimReceiveFramesServer{stream})
+}
+
+type PonSim_ReceiveFramesServer interface {
+	Send(*PonSimFrame) error
+	grpc.ServerStream
+}
+
+type ponSimReceiveFramesServer struct {
+	grpc.ServerStream
+}
+
+func (x *ponSimReceiveFramesServer) Send(m *PonSimFrame) error {
+	return x.ServerStream.SendMsg(m)
+}
+
+func _PonSim_GetDeviceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(empty.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(PonSimServer).GetDeviceInfo(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.PonSim/GetDeviceInfo",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(PonSimServer).GetDeviceInfo(ctx, req.(*empty.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _PonSim_UpdateFlowTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(FlowTable)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(PonSimServer).UpdateFlowTable(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.PonSim/UpdateFlowTable",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(PonSimServer).UpdateFlowTable(ctx, req.(*FlowTable))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _PonSim_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(empty.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(PonSimServer).GetStats(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.PonSim/GetStats",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(PonSimServer).GetStats(ctx, req.(*empty.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+var _PonSim_serviceDesc = grpc.ServiceDesc{
+	ServiceName: "voltha.PonSim",
+	HandlerType: (*PonSimServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "SendFrame",
+			Handler:    _PonSim_SendFrame_Handler,
+		},
+		{
+			MethodName: "GetDeviceInfo",
+			Handler:    _PonSim_GetDeviceInfo_Handler,
+		},
+		{
+			MethodName: "UpdateFlowTable",
+			Handler:    _PonSim_UpdateFlowTable_Handler,
+		},
+		{
+			MethodName: "GetStats",
+			Handler:    _PonSim_GetStats_Handler,
+		},
+	},
+	Streams: []grpc.StreamDesc{
+		{
+			StreamName:    "ReceiveFrames",
+			Handler:       _PonSim_ReceiveFrames_Handler,
+			ServerStreams: true,
+		},
+	},
+	Metadata: "voltha_protos/ponsim.proto",
+}
+
+func init() { proto.RegisterFile("voltha_protos/ponsim.proto", fileDescriptor_ponsim_bb56e7457209b09b) }
+
+var fileDescriptor_ponsim_bb56e7457209b09b = []byte{
+	// 555 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0x41, 0x6f, 0xd3, 0x4e,
+	0x10, 0xc5, 0x93, 0xb4, 0x4d, 0x9b, 0x69, 0xf3, 0xff, 0xd3, 0x6d, 0xa9, 0xd2, 0xf4, 0x40, 0xb4,
+	0x5c, 0x22, 0x50, 0x1d, 0xda, 0x88, 0x0b, 0x48, 0x80, 0x28, 0xb4, 0xe2, 0x40, 0x89, 0x36, 0xf4,
+	0x82, 0x10, 0x96, 0x63, 0x4f, 0x52, 0x0b, 0x7b, 0xc7, 0xd8, 0xbb, 0xa9, 0xfa, 0x0d, 0xf9, 0x58,
+	0xc8, 0xbb, 0x36, 0x89, 0xab, 0x84, 0xdb, 0xee, 0xf8, 0xe5, 0xf7, 0xe6, 0x8d, 0x27, 0x86, 0xee,
+	0x9c, 0x22, 0x75, 0xeb, 0xb9, 0x49, 0x4a, 0x8a, 0xb2, 0x41, 0x42, 0x32, 0x0b, 0x63, 0xc7, 0xdc,
+	0x58, 0xd3, 0x3e, 0xeb, 0x9e, 0xcc, 0x88, 0x66, 0x11, 0x0e, 0x4c, 0x75, 0xa2, 0xa7, 0x03, 0x8c,
+	0x13, 0x75, 0x6f, 0x45, 0xdd, 0x27, 0x55, 0x00, 0x25, 0x28, 0xa7, 0x11, 0xdd, 0xb9, 0x67, 0x43,
+	0x2b, 0xe0, 0x37, 0x70, 0x30, 0x22, 0x39, 0x0e, 0xe3, 0x2f, 0x52, 0x7f, 0xc0, 0x79, 0xe8, 0xe3,
+	0x27, 0x39, 0x25, 0x76, 0x0c, 0x3b, 0x5a, 0x86, 0x6e, 0x42, 0xa9, 0xea, 0xd4, 0x7b, 0xf5, 0xfe,
+	0x96, 0xd8, 0xd6, 0x32, 0x1c, 0x51, 0xaa, 0xd8, 0x53, 0x68, 0x67, 0x98, 0x86, 0x5e, 0xe4, 0x4a,
+	0x1d, 0x4f, 0x30, 0xed, 0x34, 0x7a, 0xf5, 0x7e, 0x4b, 0xec, 0xd9, 0xe2, 0xb5, 0xa9, 0xf1, 0x1f,
+	0xf0, 0xc8, 0x62, 0xab, 0x4c, 0xf9, 0x80, 0x29, 0x0b, 0xe6, 0x00, 0x36, 0x49, 0xea, 0xac, 0xd3,
+	0xe8, 0x6d, 0xf4, 0x77, 0xcf, 0x4f, 0x1c, 0xdb, 0xb5, 0xb3, 0xa2, 0x33, 0x61, 0x84, 0x5c, 0x40,
+	0xeb, 0x32, 0xa2, 0xbb, 0xaf, 0xde, 0x24, 0x42, 0xc6, 0x60, 0x73, 0x09, 0x6a, 0xce, 0xec, 0x0c,
+	0xb6, 0xf2, 0xa0, 0x0b, 0xe4, 0x72, 0x74, 0x9a, 0x26, 0xae, 0x39, 0x67, 0xca, 0x53, 0x99, 0xb0,
+	0x4a, 0x2e, 0x60, 0xd7, 0x1a, 0x5e, 0xa6, 0x5e, 0x8c, 0xec, 0x3f, 0x68, 0x84, 0x81, 0x61, 0xb6,
+	0x44, 0x23, 0x0c, 0x58, 0x07, 0xb6, 0x13, 0xef, 0x3e, 0x22, 0x2f, 0x30, 0x89, 0xf7, 0x44, 0x79,
+	0xcd, 0x83, 0x91, 0x56, 0x36, 0xd8, 0x86, 0x0d, 0x46, 0x5a, 0xe5, 0xc1, 0xf8, 0xdb, 0x72, 0xbc,
+	0x23, 0xcf, 0xff, 0x89, 0xea, 0x82, 0xb4, 0x54, 0x98, 0xe6, 0x1d, 0x4b, 0x2f, 0xc6, 0x82, 0x6e,
+	0xce, 0xec, 0x10, 0xb6, 0xe6, 0x5e, 0xa4, 0xd1, 0xd0, 0x37, 0x84, 0xbd, 0xf0, 0x19, 0xec, 0x17,
+	0x00, 0x4a, 0xd5, 0x67, 0x54, 0x69, 0xe8, 0x67, 0xec, 0x04, 0x5a, 0xb9, 0x99, 0xbb, 0xc4, 0xd8,
+	0xc9, 0x0b, 0xd7, 0x39, 0xe7, 0x65, 0xde, 0x67, 0x6e, 0xb6, 0x66, 0x9c, 0x95, 0x4e, 0x44, 0xa9,
+	0xe5, 0xdf, 0xa1, 0x6d, 0x9f, 0x97, 0x26, 0x47, 0xd0, 0x0c, 0xcc, 0xd8, 0x0b, 0x87, 0xe2, 0xc6,
+	0x86, 0xb0, 0x1d, 0x5b, 0x49, 0xc1, 0x3f, 0x7e, 0xc0, 0x5f, 0x34, 0x2a, 0x4a, 0x25, 0x7f, 0x06,
+	0x87, 0x15, 0xba, 0xc0, 0x5f, 0x1a, 0x33, 0xb5, 0xea, 0xd5, 0x9d, 0xff, 0x6e, 0x40, 0xd3, 0x8a,
+	0xd9, 0x2b, 0x68, 0x8d, 0x51, 0x06, 0xf6, 0x85, 0x1c, 0x54, 0x7d, 0x4c, 0xb1, 0x7b, 0xe4, 0xd8,
+	0xf5, 0x77, 0xca, 0xf5, 0x77, 0x3e, 0xe6, 0xeb, 0xcf, 0x6b, 0xec, 0x1d, 0xb4, 0x05, 0xfa, 0x18,
+	0xce, 0xd1, 0x28, 0x33, 0xb6, 0x46, 0xda, 0x5d, 0xc5, 0xe5, 0xb5, 0x17, 0x75, 0x76, 0x01, 0xed,
+	0x2b, 0x54, 0x4b, 0x1b, 0xbc, 0x8e, 0xd0, 0xa9, 0x12, 0x16, 0xbf, 0xe0, 0x35, 0xf6, 0x06, 0xfe,
+	0xbf, 0x49, 0x02, 0x4f, 0xe1, 0x62, 0x5f, 0xf7, 0x4b, 0xf9, 0xdf, 0xd2, 0x3f, 0x62, 0xbc, 0x86,
+	0x9d, 0x2b, 0x54, 0xe3, 0x7c, 0x51, 0xd7, 0xfa, 0x3f, 0xae, 0xfa, 0x17, 0x33, 0xe6, 0xb5, 0xf7,
+	0xa7, 0xdf, 0x9e, 0xcf, 0x42, 0x75, 0xab, 0x27, 0x8e, 0x4f, 0xb1, 0xf9, 0xf7, 0xfb, 0x94, 0x06,
+	0x03, 0xab, 0x3e, 0x2d, 0x3e, 0x0a, 0x33, 0x2a, 0x0a, 0x93, 0xa6, 0xa9, 0x0c, 0xff, 0x04, 0x00,
+	0x00, 0xff, 0xff, 0x62, 0xcb, 0x74, 0xbe, 0x77, 0x04, 0x00, 0x00,
+}
diff --git a/go/voltha/ponsim.proto b/go/voltha/ponsim.proto
deleted file mode 100644
index d4cbaa2..0000000
--- a/go/voltha/ponsim.proto
+++ /dev/null
@@ -1,67 +0,0 @@
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/voltha";
-
-package voltha;
-
-import "google/protobuf/empty.proto";
-import "voltha_protos/openflow_13.proto";
-
-
-message PonSimOnuDeviceInfo {
-    int32 uni_port = 1;
-    string serial_number = 2;
-}
-
-message PonSimDeviceInfo {
-    int32 nni_port = 1;
-    repeated PonSimOnuDeviceInfo onus = 2;
-}
-
-message FlowTable {
-    int32 port = 1;  // Used to address right device
-    repeated openflow_13.ofp_flow_stats flows = 2;
-}
-
-message PonSimFrame {
-    string id = 1;
-    bytes payload = 2;
-    int32 out_port = 3;
-}
-
-message PonSimPacketCounter {
-    string name = 1;
-    int64 value = 2;
-}
-
-message PonSimPortMetrics {
-    string port_name = 1;
-    repeated PonSimPacketCounter packets = 2;
-}
-
-message PonSimMetrics {
-    string device = 1;
-    repeated PonSimPortMetrics metrics = 2;
-}
-
-message PonSimMetricsRequest {
-    int32 port = 1;
-}
-
-service PonSim {
-    rpc SendFrame(PonSimFrame)
-        returns (google.protobuf.Empty) {}
-
-    rpc ReceiveFrames(google.protobuf.Empty)
-        returns (stream PonSimFrame) {}
-
-    rpc GetDeviceInfo(google.protobuf.Empty)
-        returns(PonSimDeviceInfo) {}
-
-    rpc UpdateFlowTable(FlowTable)
-        returns(google.protobuf.Empty) {}
-
-    rpc GetStats(google.protobuf.Empty)
-        returns(PonSimMetrics) {}
-
-}
diff --git a/go/voltha/voltha.pb.go b/go/voltha/voltha.pb.go
new file mode 100644
index 0000000..b0c42b0
--- /dev/null
+++ b/go/voltha/voltha.pb.go
@@ -0,0 +1,4368 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: voltha_protos/voltha.proto
+
+package voltha // import "github.com/opencord/voltha-protos/go/voltha"
+
+import proto "github.com/golang/protobuf/proto"
+import fmt "fmt"
+import math "math"
+import empty "github.com/golang/protobuf/ptypes/empty"
+import common "github.com/opencord/voltha-protos/go/common"
+import omci "github.com/opencord/voltha-protos/go/omci"
+import openflow_13 "github.com/opencord/voltha-protos/go/openflow_13"
+import _ "google.golang.org/genproto/googleapis/api/annotations"
+
+import (
+	context "golang.org/x/net/context"
+	grpc "google.golang.org/grpc"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
+
+// ChildNode from public import voltha_protos/meta.proto
+type ChildNode = common.ChildNode
+
+// Access from public import voltha_protos/meta.proto
+type Access = common.Access
+
+var Access_name = common.Access_name
+var Access_value = common.Access_value
+
+const Access_CONFIG = Access(common.Access_CONFIG)
+const Access_READ_ONLY = Access(common.Access_READ_ONLY)
+const Access_REAL_TIME = Access(common.Access_REAL_TIME)
+
+// child_node from public import voltha_protos/meta.proto
+var E_ChildNode = common.E_ChildNode
+
+// access from public import voltha_protos/meta.proto
+var E_Access = common.E_Access
+
+// ID from public import voltha_protos/common.proto
+type ID = common.ID
+
+// IDs from public import voltha_protos/common.proto
+type IDs = common.IDs
+
+// LogLevel from public import voltha_protos/common.proto
+type LogLevel = common.LogLevel
+
+// AdminState from public import voltha_protos/common.proto
+type AdminState = common.AdminState
+
+// OperStatus from public import voltha_protos/common.proto
+type OperStatus = common.OperStatus
+
+// ConnectStatus from public import voltha_protos/common.proto
+type ConnectStatus = common.ConnectStatus
+
+// OperationResp from public import voltha_protos/common.proto
+type OperationResp = common.OperationResp
+
+// TestModeKeys from public import voltha_protos/common.proto
+type TestModeKeys = common.TestModeKeys
+
+var TestModeKeys_name = common.TestModeKeys_name
+var TestModeKeys_value = common.TestModeKeys_value
+
+const TestModeKeys_api_test = TestModeKeys(common.TestModeKeys_api_test)
+
+// LogLevel from public import voltha_protos/common.proto
+type LogLevel_LogLevel = common.LogLevel_LogLevel
+
+var LogLevel_LogLevel_name = common.LogLevel_LogLevel_name
+var LogLevel_LogLevel_value = common.LogLevel_LogLevel_value
+
+const LogLevel_DEBUG = LogLevel_LogLevel(common.LogLevel_DEBUG)
+const LogLevel_INFO = LogLevel_LogLevel(common.LogLevel_INFO)
+const LogLevel_WARNING = LogLevel_LogLevel(common.LogLevel_WARNING)
+const LogLevel_ERROR = LogLevel_LogLevel(common.LogLevel_ERROR)
+const LogLevel_CRITICAL = LogLevel_LogLevel(common.LogLevel_CRITICAL)
+const LogLevel_FATAL = LogLevel_LogLevel(common.LogLevel_FATAL)
+
+// AdminState from public import voltha_protos/common.proto
+type AdminState_AdminState = common.AdminState_AdminState
+
+var AdminState_AdminState_name = common.AdminState_AdminState_name
+var AdminState_AdminState_value = common.AdminState_AdminState_value
+
+const AdminState_UNKNOWN = AdminState_AdminState(common.AdminState_UNKNOWN)
+const AdminState_PREPROVISIONED = AdminState_AdminState(common.AdminState_PREPROVISIONED)
+const AdminState_ENABLED = AdminState_AdminState(common.AdminState_ENABLED)
+const AdminState_DISABLED = AdminState_AdminState(common.AdminState_DISABLED)
+const AdminState_DOWNLOADING_IMAGE = AdminState_AdminState(common.AdminState_DOWNLOADING_IMAGE)
+const AdminState_DELETED = AdminState_AdminState(common.AdminState_DELETED)
+
+// OperStatus from public import voltha_protos/common.proto
+type OperStatus_OperStatus = common.OperStatus_OperStatus
+
+var OperStatus_OperStatus_name = common.OperStatus_OperStatus_name
+var OperStatus_OperStatus_value = common.OperStatus_OperStatus_value
+
+const OperStatus_UNKNOWN = OperStatus_OperStatus(common.OperStatus_UNKNOWN)
+const OperStatus_DISCOVERED = OperStatus_OperStatus(common.OperStatus_DISCOVERED)
+const OperStatus_ACTIVATING = OperStatus_OperStatus(common.OperStatus_ACTIVATING)
+const OperStatus_TESTING = OperStatus_OperStatus(common.OperStatus_TESTING)
+const OperStatus_ACTIVE = OperStatus_OperStatus(common.OperStatus_ACTIVE)
+const OperStatus_FAILED = OperStatus_OperStatus(common.OperStatus_FAILED)
+
+// ConnectStatus from public import voltha_protos/common.proto
+type ConnectStatus_ConnectStatus = common.ConnectStatus_ConnectStatus
+
+var ConnectStatus_ConnectStatus_name = common.ConnectStatus_ConnectStatus_name
+var ConnectStatus_ConnectStatus_value = common.ConnectStatus_ConnectStatus_value
+
+const ConnectStatus_UNKNOWN = ConnectStatus_ConnectStatus(common.ConnectStatus_UNKNOWN)
+const ConnectStatus_UNREACHABLE = ConnectStatus_ConnectStatus(common.ConnectStatus_UNREACHABLE)
+const ConnectStatus_REACHABLE = ConnectStatus_ConnectStatus(common.ConnectStatus_REACHABLE)
+
+// OperationReturnCode from public import voltha_protos/common.proto
+type OperationResp_OperationReturnCode = common.OperationResp_OperationReturnCode
+
+var OperationResp_OperationReturnCode_name = common.OperationResp_OperationReturnCode_name
+var OperationResp_OperationReturnCode_value = common.OperationResp_OperationReturnCode_value
+
+const OperationResp_OPERATION_SUCCESS = OperationResp_OperationReturnCode(common.OperationResp_OPERATION_SUCCESS)
+const OperationResp_OPERATION_FAILURE = OperationResp_OperationReturnCode(common.OperationResp_OPERATION_FAILURE)
+const OperationResp_OPERATION_UNSUPPORTED = OperationResp_OperationReturnCode(common.OperationResp_OPERATION_UNSUPPORTED)
+
+// Ignoring public import of HealthStatus from voltha_protos/health.proto
+
+// Ignoring public import of HealthState from voltha_protos/health.proto
+
+// Ignoring public import of LogicalPortId from voltha_protos/logical_device.proto
+
+// Ignoring public import of LogicalPort from voltha_protos/logical_device.proto
+
+// Ignoring public import of LogicalPorts from voltha_protos/logical_device.proto
+
+// Ignoring public import of LogicalDevice from voltha_protos/logical_device.proto
+
+// Ignoring public import of LogicalDevices from voltha_protos/logical_device.proto
+
+// Ignoring public import of DeviceType from voltha_protos/device.proto
+
+// Ignoring public import of DeviceTypes from voltha_protos/device.proto
+
+// Ignoring public import of PmConfig from voltha_protos/device.proto
+
+// Ignoring public import of PmGroupConfig from voltha_protos/device.proto
+
+// Ignoring public import of PmConfigs from voltha_protos/device.proto
+
+// Ignoring public import of Image from voltha_protos/device.proto
+
+// Ignoring public import of Images from voltha_protos/device.proto
+
+// Ignoring public import of ImageDownload from voltha_protos/device.proto
+
+// Ignoring public import of ImageDownloads from voltha_protos/device.proto
+
+// Ignoring public import of Port from voltha_protos/device.proto
+
+// Ignoring public import of PeerPort from voltha_protos/device.proto
+
+// Ignoring public import of Ports from voltha_protos/device.proto
+
+// Ignoring public import of Device from voltha_protos/device.proto
+
+// Ignoring public import of ProxyAddress from voltha_protos/device.proto
+
+// Ignoring public import of Devices from voltha_protos/device.proto
+
+// Ignoring public import of SimulateAlarmRequest from voltha_protos/device.proto
+
+// Ignoring public import of PmType from voltha_protos/device.proto
+
+// Ignoring public import of ImageDownloadState from voltha_protos/device.proto
+
+// Ignoring public import of ImageDownloadFailureReason from voltha_protos/device.proto
+
+// Ignoring public import of ImageActivateState from voltha_protos/device.proto
+
+// Ignoring public import of PortType from voltha_protos/device.proto
+
+// Ignoring public import of OperationType from voltha_protos/device.proto
+
+// Ignoring public import of AdapterConfig from voltha_protos/adapter.proto
+
+// Ignoring public import of Adapter from voltha_protos/adapter.proto
+
+// Ignoring public import of Adapters from voltha_protos/adapter.proto
+
+// ofp_header from public import voltha_protos/openflow_13.proto
+type OfpHeader = openflow_13.OfpHeader
+
+// ofp_hello_elem_header from public import voltha_protos/openflow_13.proto
+type OfpHelloElemHeader = openflow_13.OfpHelloElemHeader
+type OfpHelloElemHeader_Versionbitmap = openflow_13.OfpHelloElemHeader_Versionbitmap
+
+// ofp_hello_elem_versionbitmap from public import voltha_protos/openflow_13.proto
+type OfpHelloElemVersionbitmap = openflow_13.OfpHelloElemVersionbitmap
+
+// ofp_hello from public import voltha_protos/openflow_13.proto
+type OfpHello = openflow_13.OfpHello
+
+// ofp_switch_config from public import voltha_protos/openflow_13.proto
+type OfpSwitchConfig = openflow_13.OfpSwitchConfig
+
+// ofp_table_mod from public import voltha_protos/openflow_13.proto
+type OfpTableMod = openflow_13.OfpTableMod
+
+// ofp_port from public import voltha_protos/openflow_13.proto
+type OfpPort = openflow_13.OfpPort
+
+// ofp_switch_features from public import voltha_protos/openflow_13.proto
+type OfpSwitchFeatures = openflow_13.OfpSwitchFeatures
+
+// ofp_port_status from public import voltha_protos/openflow_13.proto
+type OfpPortStatus = openflow_13.OfpPortStatus
+
+// ofp_port_mod from public import voltha_protos/openflow_13.proto
+type OfpPortMod = openflow_13.OfpPortMod
+
+// ofp_match from public import voltha_protos/openflow_13.proto
+type OfpMatch = openflow_13.OfpMatch
+
+// ofp_oxm_field from public import voltha_protos/openflow_13.proto
+type OfpOxmField = openflow_13.OfpOxmField
+type OfpOxmField_OfbField = openflow_13.OfpOxmField_OfbField
+type OfpOxmField_ExperimenterField = openflow_13.OfpOxmField_ExperimenterField
+
+// ofp_oxm_ofb_field from public import voltha_protos/openflow_13.proto
+type OfpOxmOfbField = openflow_13.OfpOxmOfbField
+type OfpOxmOfbField_Port = openflow_13.OfpOxmOfbField_Port
+type OfpOxmOfbField_PhysicalPort = openflow_13.OfpOxmOfbField_PhysicalPort
+type OfpOxmOfbField_TableMetadata = openflow_13.OfpOxmOfbField_TableMetadata
+type OfpOxmOfbField_EthDst = openflow_13.OfpOxmOfbField_EthDst
+type OfpOxmOfbField_EthSrc = openflow_13.OfpOxmOfbField_EthSrc
+type OfpOxmOfbField_EthType = openflow_13.OfpOxmOfbField_EthType
+type OfpOxmOfbField_VlanVid = openflow_13.OfpOxmOfbField_VlanVid
+type OfpOxmOfbField_VlanPcp = openflow_13.OfpOxmOfbField_VlanPcp
+type OfpOxmOfbField_IpDscp = openflow_13.OfpOxmOfbField_IpDscp
+type OfpOxmOfbField_IpEcn = openflow_13.OfpOxmOfbField_IpEcn
+type OfpOxmOfbField_IpProto = openflow_13.OfpOxmOfbField_IpProto
+type OfpOxmOfbField_Ipv4Src = openflow_13.OfpOxmOfbField_Ipv4Src
+type OfpOxmOfbField_Ipv4Dst = openflow_13.OfpOxmOfbField_Ipv4Dst
+type OfpOxmOfbField_TcpSrc = openflow_13.OfpOxmOfbField_TcpSrc
+type OfpOxmOfbField_TcpDst = openflow_13.OfpOxmOfbField_TcpDst
+type OfpOxmOfbField_UdpSrc = openflow_13.OfpOxmOfbField_UdpSrc
+type OfpOxmOfbField_UdpDst = openflow_13.OfpOxmOfbField_UdpDst
+type OfpOxmOfbField_SctpSrc = openflow_13.OfpOxmOfbField_SctpSrc
+type OfpOxmOfbField_SctpDst = openflow_13.OfpOxmOfbField_SctpDst
+type OfpOxmOfbField_Icmpv4Type = openflow_13.OfpOxmOfbField_Icmpv4Type
+type OfpOxmOfbField_Icmpv4Code = openflow_13.OfpOxmOfbField_Icmpv4Code
+type OfpOxmOfbField_ArpOp = openflow_13.OfpOxmOfbField_ArpOp
+type OfpOxmOfbField_ArpSpa = openflow_13.OfpOxmOfbField_ArpSpa
+type OfpOxmOfbField_ArpTpa = openflow_13.OfpOxmOfbField_ArpTpa
+type OfpOxmOfbField_ArpSha = openflow_13.OfpOxmOfbField_ArpSha
+type OfpOxmOfbField_ArpTha = openflow_13.OfpOxmOfbField_ArpTha
+type OfpOxmOfbField_Ipv6Src = openflow_13.OfpOxmOfbField_Ipv6Src
+type OfpOxmOfbField_Ipv6Dst = openflow_13.OfpOxmOfbField_Ipv6Dst
+type OfpOxmOfbField_Ipv6Flabel = openflow_13.OfpOxmOfbField_Ipv6Flabel
+type OfpOxmOfbField_Icmpv6Type = openflow_13.OfpOxmOfbField_Icmpv6Type
+type OfpOxmOfbField_Icmpv6Code = openflow_13.OfpOxmOfbField_Icmpv6Code
+type OfpOxmOfbField_Ipv6NdTarget = openflow_13.OfpOxmOfbField_Ipv6NdTarget
+type OfpOxmOfbField_Ipv6NdSsl = openflow_13.OfpOxmOfbField_Ipv6NdSsl
+type OfpOxmOfbField_Ipv6NdTll = openflow_13.OfpOxmOfbField_Ipv6NdTll
+type OfpOxmOfbField_MplsLabel = openflow_13.OfpOxmOfbField_MplsLabel
+type OfpOxmOfbField_MplsTc = openflow_13.OfpOxmOfbField_MplsTc
+type OfpOxmOfbField_MplsBos = openflow_13.OfpOxmOfbField_MplsBos
+type OfpOxmOfbField_PbbIsid = openflow_13.OfpOxmOfbField_PbbIsid
+type OfpOxmOfbField_TunnelId = openflow_13.OfpOxmOfbField_TunnelId
+type OfpOxmOfbField_Ipv6Exthdr = openflow_13.OfpOxmOfbField_Ipv6Exthdr
+type OfpOxmOfbField_TableMetadataMask = openflow_13.OfpOxmOfbField_TableMetadataMask
+type OfpOxmOfbField_EthDstMask = openflow_13.OfpOxmOfbField_EthDstMask
+type OfpOxmOfbField_EthSrcMask = openflow_13.OfpOxmOfbField_EthSrcMask
+type OfpOxmOfbField_VlanVidMask = openflow_13.OfpOxmOfbField_VlanVidMask
+type OfpOxmOfbField_Ipv4SrcMask = openflow_13.OfpOxmOfbField_Ipv4SrcMask
+type OfpOxmOfbField_Ipv4DstMask = openflow_13.OfpOxmOfbField_Ipv4DstMask
+type OfpOxmOfbField_ArpSpaMask = openflow_13.OfpOxmOfbField_ArpSpaMask
+type OfpOxmOfbField_ArpTpaMask = openflow_13.OfpOxmOfbField_ArpTpaMask
+type OfpOxmOfbField_Ipv6SrcMask = openflow_13.OfpOxmOfbField_Ipv6SrcMask
+type OfpOxmOfbField_Ipv6DstMask = openflow_13.OfpOxmOfbField_Ipv6DstMask
+type OfpOxmOfbField_Ipv6FlabelMask = openflow_13.OfpOxmOfbField_Ipv6FlabelMask
+type OfpOxmOfbField_PbbIsidMask = openflow_13.OfpOxmOfbField_PbbIsidMask
+type OfpOxmOfbField_TunnelIdMask = openflow_13.OfpOxmOfbField_TunnelIdMask
+type OfpOxmOfbField_Ipv6ExthdrMask = openflow_13.OfpOxmOfbField_Ipv6ExthdrMask
+
+// ofp_oxm_experimenter_field from public import voltha_protos/openflow_13.proto
+type OfpOxmExperimenterField = openflow_13.OfpOxmExperimenterField
+
+// ofp_action from public import voltha_protos/openflow_13.proto
+type OfpAction = openflow_13.OfpAction
+type OfpAction_Output = openflow_13.OfpAction_Output
+type OfpAction_MplsTtl = openflow_13.OfpAction_MplsTtl
+type OfpAction_Push = openflow_13.OfpAction_Push
+type OfpAction_PopMpls = openflow_13.OfpAction_PopMpls
+type OfpAction_Group = openflow_13.OfpAction_Group
+type OfpAction_NwTtl = openflow_13.OfpAction_NwTtl
+type OfpAction_SetField = openflow_13.OfpAction_SetField
+type OfpAction_Experimenter = openflow_13.OfpAction_Experimenter
+
+// ofp_action_output from public import voltha_protos/openflow_13.proto
+type OfpActionOutput = openflow_13.OfpActionOutput
+
+// ofp_action_mpls_ttl from public import voltha_protos/openflow_13.proto
+type OfpActionMplsTtl = openflow_13.OfpActionMplsTtl
+
+// ofp_action_push from public import voltha_protos/openflow_13.proto
+type OfpActionPush = openflow_13.OfpActionPush
+
+// ofp_action_pop_mpls from public import voltha_protos/openflow_13.proto
+type OfpActionPopMpls = openflow_13.OfpActionPopMpls
+
+// ofp_action_group from public import voltha_protos/openflow_13.proto
+type OfpActionGroup = openflow_13.OfpActionGroup
+
+// ofp_action_nw_ttl from public import voltha_protos/openflow_13.proto
+type OfpActionNwTtl = openflow_13.OfpActionNwTtl
+
+// ofp_action_set_field from public import voltha_protos/openflow_13.proto
+type OfpActionSetField = openflow_13.OfpActionSetField
+
+// ofp_action_experimenter from public import voltha_protos/openflow_13.proto
+type OfpActionExperimenter = openflow_13.OfpActionExperimenter
+
+// ofp_instruction from public import voltha_protos/openflow_13.proto
+type OfpInstruction = openflow_13.OfpInstruction
+type OfpInstruction_GotoTable = openflow_13.OfpInstruction_GotoTable
+type OfpInstruction_WriteMetadata = openflow_13.OfpInstruction_WriteMetadata
+type OfpInstruction_Actions = openflow_13.OfpInstruction_Actions
+type OfpInstruction_Meter = openflow_13.OfpInstruction_Meter
+type OfpInstruction_Experimenter = openflow_13.OfpInstruction_Experimenter
+
+// ofp_instruction_goto_table from public import voltha_protos/openflow_13.proto
+type OfpInstructionGotoTable = openflow_13.OfpInstructionGotoTable
+
+// ofp_instruction_write_metadata from public import voltha_protos/openflow_13.proto
+type OfpInstructionWriteMetadata = openflow_13.OfpInstructionWriteMetadata
+
+// ofp_instruction_actions from public import voltha_protos/openflow_13.proto
+type OfpInstructionActions = openflow_13.OfpInstructionActions
+
+// ofp_instruction_meter from public import voltha_protos/openflow_13.proto
+type OfpInstructionMeter = openflow_13.OfpInstructionMeter
+
+// ofp_instruction_experimenter from public import voltha_protos/openflow_13.proto
+type OfpInstructionExperimenter = openflow_13.OfpInstructionExperimenter
+
+// ofp_flow_mod from public import voltha_protos/openflow_13.proto
+type OfpFlowMod = openflow_13.OfpFlowMod
+
+// ofp_bucket from public import voltha_protos/openflow_13.proto
+type OfpBucket = openflow_13.OfpBucket
+
+// ofp_group_mod from public import voltha_protos/openflow_13.proto
+type OfpGroupMod = openflow_13.OfpGroupMod
+
+// ofp_packet_out from public import voltha_protos/openflow_13.proto
+type OfpPacketOut = openflow_13.OfpPacketOut
+
+// ofp_packet_in from public import voltha_protos/openflow_13.proto
+type OfpPacketIn = openflow_13.OfpPacketIn
+
+// ofp_flow_removed from public import voltha_protos/openflow_13.proto
+type OfpFlowRemoved = openflow_13.OfpFlowRemoved
+
+// ofp_meter_band_header from public import voltha_protos/openflow_13.proto
+type OfpMeterBandHeader = openflow_13.OfpMeterBandHeader
+type OfpMeterBandHeader_Drop = openflow_13.OfpMeterBandHeader_Drop
+type OfpMeterBandHeader_DscpRemark = openflow_13.OfpMeterBandHeader_DscpRemark
+type OfpMeterBandHeader_Experimenter = openflow_13.OfpMeterBandHeader_Experimenter
+
+// ofp_meter_band_drop from public import voltha_protos/openflow_13.proto
+type OfpMeterBandDrop = openflow_13.OfpMeterBandDrop
+
+// ofp_meter_band_dscp_remark from public import voltha_protos/openflow_13.proto
+type OfpMeterBandDscpRemark = openflow_13.OfpMeterBandDscpRemark
+
+// ofp_meter_band_experimenter from public import voltha_protos/openflow_13.proto
+type OfpMeterBandExperimenter = openflow_13.OfpMeterBandExperimenter
+
+// ofp_meter_mod from public import voltha_protos/openflow_13.proto
+type OfpMeterMod = openflow_13.OfpMeterMod
+
+// ofp_error_msg from public import voltha_protos/openflow_13.proto
+type OfpErrorMsg = openflow_13.OfpErrorMsg
+
+// ofp_error_experimenter_msg from public import voltha_protos/openflow_13.proto
+type OfpErrorExperimenterMsg = openflow_13.OfpErrorExperimenterMsg
+
+// ofp_multipart_request from public import voltha_protos/openflow_13.proto
+type OfpMultipartRequest = openflow_13.OfpMultipartRequest
+
+// ofp_multipart_reply from public import voltha_protos/openflow_13.proto
+type OfpMultipartReply = openflow_13.OfpMultipartReply
+
+// ofp_desc from public import voltha_protos/openflow_13.proto
+type OfpDesc = openflow_13.OfpDesc
+
+// ofp_flow_stats_request from public import voltha_protos/openflow_13.proto
+type OfpFlowStatsRequest = openflow_13.OfpFlowStatsRequest
+
+// ofp_flow_stats from public import voltha_protos/openflow_13.proto
+type OfpFlowStats = openflow_13.OfpFlowStats
+
+// ofp_aggregate_stats_request from public import voltha_protos/openflow_13.proto
+type OfpAggregateStatsRequest = openflow_13.OfpAggregateStatsRequest
+
+// ofp_aggregate_stats_reply from public import voltha_protos/openflow_13.proto
+type OfpAggregateStatsReply = openflow_13.OfpAggregateStatsReply
+
+// ofp_table_feature_property from public import voltha_protos/openflow_13.proto
+type OfpTableFeatureProperty = openflow_13.OfpTableFeatureProperty
+type OfpTableFeatureProperty_Instructions = openflow_13.OfpTableFeatureProperty_Instructions
+type OfpTableFeatureProperty_NextTables = openflow_13.OfpTableFeatureProperty_NextTables
+type OfpTableFeatureProperty_Actions = openflow_13.OfpTableFeatureProperty_Actions
+type OfpTableFeatureProperty_Oxm = openflow_13.OfpTableFeatureProperty_Oxm
+type OfpTableFeatureProperty_Experimenter = openflow_13.OfpTableFeatureProperty_Experimenter
+
+// ofp_table_feature_prop_instructions from public import voltha_protos/openflow_13.proto
+type OfpTableFeaturePropInstructions = openflow_13.OfpTableFeaturePropInstructions
+
+// ofp_table_feature_prop_next_tables from public import voltha_protos/openflow_13.proto
+type OfpTableFeaturePropNextTables = openflow_13.OfpTableFeaturePropNextTables
+
+// ofp_table_feature_prop_actions from public import voltha_protos/openflow_13.proto
+type OfpTableFeaturePropActions = openflow_13.OfpTableFeaturePropActions
+
+// ofp_table_feature_prop_oxm from public import voltha_protos/openflow_13.proto
+type OfpTableFeaturePropOxm = openflow_13.OfpTableFeaturePropOxm
+
+// ofp_table_feature_prop_experimenter from public import voltha_protos/openflow_13.proto
+type OfpTableFeaturePropExperimenter = openflow_13.OfpTableFeaturePropExperimenter
+
+// ofp_table_features from public import voltha_protos/openflow_13.proto
+type OfpTableFeatures = openflow_13.OfpTableFeatures
+
+// ofp_table_stats from public import voltha_protos/openflow_13.proto
+type OfpTableStats = openflow_13.OfpTableStats
+
+// ofp_port_stats_request from public import voltha_protos/openflow_13.proto
+type OfpPortStatsRequest = openflow_13.OfpPortStatsRequest
+
+// ofp_port_stats from public import voltha_protos/openflow_13.proto
+type OfpPortStats = openflow_13.OfpPortStats
+
+// ofp_group_stats_request from public import voltha_protos/openflow_13.proto
+type OfpGroupStatsRequest = openflow_13.OfpGroupStatsRequest
+
+// ofp_bucket_counter from public import voltha_protos/openflow_13.proto
+type OfpBucketCounter = openflow_13.OfpBucketCounter
+
+// ofp_group_stats from public import voltha_protos/openflow_13.proto
+type OfpGroupStats = openflow_13.OfpGroupStats
+
+// ofp_group_desc from public import voltha_protos/openflow_13.proto
+type OfpGroupDesc = openflow_13.OfpGroupDesc
+
+// ofp_group_entry from public import voltha_protos/openflow_13.proto
+type OfpGroupEntry = openflow_13.OfpGroupEntry
+
+// ofp_group_features from public import voltha_protos/openflow_13.proto
+type OfpGroupFeatures = openflow_13.OfpGroupFeatures
+
+// ofp_meter_multipart_request from public import voltha_protos/openflow_13.proto
+type OfpMeterMultipartRequest = openflow_13.OfpMeterMultipartRequest
+
+// ofp_meter_band_stats from public import voltha_protos/openflow_13.proto
+type OfpMeterBandStats = openflow_13.OfpMeterBandStats
+
+// ofp_meter_stats from public import voltha_protos/openflow_13.proto
+type OfpMeterStats = openflow_13.OfpMeterStats
+
+// ofp_meter_config from public import voltha_protos/openflow_13.proto
+type OfpMeterConfig = openflow_13.OfpMeterConfig
+
+// ofp_meter_features from public import voltha_protos/openflow_13.proto
+type OfpMeterFeatures = openflow_13.OfpMeterFeatures
+
+// ofp_experimenter_multipart_header from public import voltha_protos/openflow_13.proto
+type OfpExperimenterMultipartHeader = openflow_13.OfpExperimenterMultipartHeader
+
+// ofp_experimenter_header from public import voltha_protos/openflow_13.proto
+type OfpExperimenterHeader = openflow_13.OfpExperimenterHeader
+
+// ofp_queue_prop_header from public import voltha_protos/openflow_13.proto
+type OfpQueuePropHeader = openflow_13.OfpQueuePropHeader
+
+// ofp_queue_prop_min_rate from public import voltha_protos/openflow_13.proto
+type OfpQueuePropMinRate = openflow_13.OfpQueuePropMinRate
+
+// ofp_queue_prop_max_rate from public import voltha_protos/openflow_13.proto
+type OfpQueuePropMaxRate = openflow_13.OfpQueuePropMaxRate
+
+// ofp_queue_prop_experimenter from public import voltha_protos/openflow_13.proto
+type OfpQueuePropExperimenter = openflow_13.OfpQueuePropExperimenter
+
+// ofp_packet_queue from public import voltha_protos/openflow_13.proto
+type OfpPacketQueue = openflow_13.OfpPacketQueue
+
+// ofp_queue_get_config_request from public import voltha_protos/openflow_13.proto
+type OfpQueueGetConfigRequest = openflow_13.OfpQueueGetConfigRequest
+
+// ofp_queue_get_config_reply from public import voltha_protos/openflow_13.proto
+type OfpQueueGetConfigReply = openflow_13.OfpQueueGetConfigReply
+
+// ofp_action_set_queue from public import voltha_protos/openflow_13.proto
+type OfpActionSetQueue = openflow_13.OfpActionSetQueue
+
+// ofp_queue_stats_request from public import voltha_protos/openflow_13.proto
+type OfpQueueStatsRequest = openflow_13.OfpQueueStatsRequest
+
+// ofp_queue_stats from public import voltha_protos/openflow_13.proto
+type OfpQueueStats = openflow_13.OfpQueueStats
+
+// ofp_role_request from public import voltha_protos/openflow_13.proto
+type OfpRoleRequest = openflow_13.OfpRoleRequest
+
+// ofp_async_config from public import voltha_protos/openflow_13.proto
+type OfpAsyncConfig = openflow_13.OfpAsyncConfig
+
+// MeterModUpdate from public import voltha_protos/openflow_13.proto
+type MeterModUpdate = openflow_13.MeterModUpdate
+
+// MeterStatsReply from public import voltha_protos/openflow_13.proto
+type MeterStatsReply = openflow_13.MeterStatsReply
+
+// FlowTableUpdate from public import voltha_protos/openflow_13.proto
+type FlowTableUpdate = openflow_13.FlowTableUpdate
+
+// FlowGroupTableUpdate from public import voltha_protos/openflow_13.proto
+type FlowGroupTableUpdate = openflow_13.FlowGroupTableUpdate
+
+// Flows from public import voltha_protos/openflow_13.proto
+type Flows = openflow_13.Flows
+
+// Meters from public import voltha_protos/openflow_13.proto
+type Meters = openflow_13.Meters
+
+// FlowGroups from public import voltha_protos/openflow_13.proto
+type FlowGroups = openflow_13.FlowGroups
+
+// FlowChanges from public import voltha_protos/openflow_13.proto
+type FlowChanges = openflow_13.FlowChanges
+
+// FlowGroupChanges from public import voltha_protos/openflow_13.proto
+type FlowGroupChanges = openflow_13.FlowGroupChanges
+
+// PacketIn from public import voltha_protos/openflow_13.proto
+type PacketIn = openflow_13.PacketIn
+
+// PacketOut from public import voltha_protos/openflow_13.proto
+type PacketOut = openflow_13.PacketOut
+
+// ChangeEvent from public import voltha_protos/openflow_13.proto
+type ChangeEvent = openflow_13.ChangeEvent
+type ChangeEvent_PortStatus = openflow_13.ChangeEvent_PortStatus
+
+// ofp_port_no from public import voltha_protos/openflow_13.proto
+type OfpPortNo = openflow_13.OfpPortNo
+
+var OfpPortNo_name = openflow_13.OfpPortNo_name
+var OfpPortNo_value = openflow_13.OfpPortNo_value
+
+const OfpPortNo_OFPP_INVALID = OfpPortNo(openflow_13.OfpPortNo_OFPP_INVALID)
+const OfpPortNo_OFPP_MAX = OfpPortNo(openflow_13.OfpPortNo_OFPP_MAX)
+const OfpPortNo_OFPP_IN_PORT = OfpPortNo(openflow_13.OfpPortNo_OFPP_IN_PORT)
+const OfpPortNo_OFPP_TABLE = OfpPortNo(openflow_13.OfpPortNo_OFPP_TABLE)
+const OfpPortNo_OFPP_NORMAL = OfpPortNo(openflow_13.OfpPortNo_OFPP_NORMAL)
+const OfpPortNo_OFPP_FLOOD = OfpPortNo(openflow_13.OfpPortNo_OFPP_FLOOD)
+const OfpPortNo_OFPP_ALL = OfpPortNo(openflow_13.OfpPortNo_OFPP_ALL)
+const OfpPortNo_OFPP_CONTROLLER = OfpPortNo(openflow_13.OfpPortNo_OFPP_CONTROLLER)
+const OfpPortNo_OFPP_LOCAL = OfpPortNo(openflow_13.OfpPortNo_OFPP_LOCAL)
+const OfpPortNo_OFPP_ANY = OfpPortNo(openflow_13.OfpPortNo_OFPP_ANY)
+
+// ofp_type from public import voltha_protos/openflow_13.proto
+type OfpType = openflow_13.OfpType
+
+var OfpType_name = openflow_13.OfpType_name
+var OfpType_value = openflow_13.OfpType_value
+
+const OfpType_OFPT_HELLO = OfpType(openflow_13.OfpType_OFPT_HELLO)
+const OfpType_OFPT_ERROR = OfpType(openflow_13.OfpType_OFPT_ERROR)
+const OfpType_OFPT_ECHO_REQUEST = OfpType(openflow_13.OfpType_OFPT_ECHO_REQUEST)
+const OfpType_OFPT_ECHO_REPLY = OfpType(openflow_13.OfpType_OFPT_ECHO_REPLY)
+const OfpType_OFPT_EXPERIMENTER = OfpType(openflow_13.OfpType_OFPT_EXPERIMENTER)
+const OfpType_OFPT_FEATURES_REQUEST = OfpType(openflow_13.OfpType_OFPT_FEATURES_REQUEST)
+const OfpType_OFPT_FEATURES_REPLY = OfpType(openflow_13.OfpType_OFPT_FEATURES_REPLY)
+const OfpType_OFPT_GET_CONFIG_REQUEST = OfpType(openflow_13.OfpType_OFPT_GET_CONFIG_REQUEST)
+const OfpType_OFPT_GET_CONFIG_REPLY = OfpType(openflow_13.OfpType_OFPT_GET_CONFIG_REPLY)
+const OfpType_OFPT_SET_CONFIG = OfpType(openflow_13.OfpType_OFPT_SET_CONFIG)
+const OfpType_OFPT_PACKET_IN = OfpType(openflow_13.OfpType_OFPT_PACKET_IN)
+const OfpType_OFPT_FLOW_REMOVED = OfpType(openflow_13.OfpType_OFPT_FLOW_REMOVED)
+const OfpType_OFPT_PORT_STATUS = OfpType(openflow_13.OfpType_OFPT_PORT_STATUS)
+const OfpType_OFPT_PACKET_OUT = OfpType(openflow_13.OfpType_OFPT_PACKET_OUT)
+const OfpType_OFPT_FLOW_MOD = OfpType(openflow_13.OfpType_OFPT_FLOW_MOD)
+const OfpType_OFPT_GROUP_MOD = OfpType(openflow_13.OfpType_OFPT_GROUP_MOD)
+const OfpType_OFPT_PORT_MOD = OfpType(openflow_13.OfpType_OFPT_PORT_MOD)
+const OfpType_OFPT_TABLE_MOD = OfpType(openflow_13.OfpType_OFPT_TABLE_MOD)
+const OfpType_OFPT_MULTIPART_REQUEST = OfpType(openflow_13.OfpType_OFPT_MULTIPART_REQUEST)
+const OfpType_OFPT_MULTIPART_REPLY = OfpType(openflow_13.OfpType_OFPT_MULTIPART_REPLY)
+const OfpType_OFPT_BARRIER_REQUEST = OfpType(openflow_13.OfpType_OFPT_BARRIER_REQUEST)
+const OfpType_OFPT_BARRIER_REPLY = OfpType(openflow_13.OfpType_OFPT_BARRIER_REPLY)
+const OfpType_OFPT_QUEUE_GET_CONFIG_REQUEST = OfpType(openflow_13.OfpType_OFPT_QUEUE_GET_CONFIG_REQUEST)
+const OfpType_OFPT_QUEUE_GET_CONFIG_REPLY = OfpType(openflow_13.OfpType_OFPT_QUEUE_GET_CONFIG_REPLY)
+const OfpType_OFPT_ROLE_REQUEST = OfpType(openflow_13.OfpType_OFPT_ROLE_REQUEST)
+const OfpType_OFPT_ROLE_REPLY = OfpType(openflow_13.OfpType_OFPT_ROLE_REPLY)
+const OfpType_OFPT_GET_ASYNC_REQUEST = OfpType(openflow_13.OfpType_OFPT_GET_ASYNC_REQUEST)
+const OfpType_OFPT_GET_ASYNC_REPLY = OfpType(openflow_13.OfpType_OFPT_GET_ASYNC_REPLY)
+const OfpType_OFPT_SET_ASYNC = OfpType(openflow_13.OfpType_OFPT_SET_ASYNC)
+const OfpType_OFPT_METER_MOD = OfpType(openflow_13.OfpType_OFPT_METER_MOD)
+
+// ofp_hello_elem_type from public import voltha_protos/openflow_13.proto
+type OfpHelloElemType = openflow_13.OfpHelloElemType
+
+var OfpHelloElemType_name = openflow_13.OfpHelloElemType_name
+var OfpHelloElemType_value = openflow_13.OfpHelloElemType_value
+
+const OfpHelloElemType_OFPHET_INVALID = OfpHelloElemType(openflow_13.OfpHelloElemType_OFPHET_INVALID)
+const OfpHelloElemType_OFPHET_VERSIONBITMAP = OfpHelloElemType(openflow_13.OfpHelloElemType_OFPHET_VERSIONBITMAP)
+
+// ofp_config_flags from public import voltha_protos/openflow_13.proto
+type OfpConfigFlags = openflow_13.OfpConfigFlags
+
+var OfpConfigFlags_name = openflow_13.OfpConfigFlags_name
+var OfpConfigFlags_value = openflow_13.OfpConfigFlags_value
+
+const OfpConfigFlags_OFPC_FRAG_NORMAL = OfpConfigFlags(openflow_13.OfpConfigFlags_OFPC_FRAG_NORMAL)
+const OfpConfigFlags_OFPC_FRAG_DROP = OfpConfigFlags(openflow_13.OfpConfigFlags_OFPC_FRAG_DROP)
+const OfpConfigFlags_OFPC_FRAG_REASM = OfpConfigFlags(openflow_13.OfpConfigFlags_OFPC_FRAG_REASM)
+const OfpConfigFlags_OFPC_FRAG_MASK = OfpConfigFlags(openflow_13.OfpConfigFlags_OFPC_FRAG_MASK)
+
+// ofp_table_config from public import voltha_protos/openflow_13.proto
+type OfpTableConfig = openflow_13.OfpTableConfig
+
+var OfpTableConfig_name = openflow_13.OfpTableConfig_name
+var OfpTableConfig_value = openflow_13.OfpTableConfig_value
+
+const OfpTableConfig_OFPTC_INVALID = OfpTableConfig(openflow_13.OfpTableConfig_OFPTC_INVALID)
+const OfpTableConfig_OFPTC_DEPRECATED_MASK = OfpTableConfig(openflow_13.OfpTableConfig_OFPTC_DEPRECATED_MASK)
+
+// ofp_table from public import voltha_protos/openflow_13.proto
+type OfpTable = openflow_13.OfpTable
+
+var OfpTable_name = openflow_13.OfpTable_name
+var OfpTable_value = openflow_13.OfpTable_value
+
+const OfpTable_OFPTT_INVALID = OfpTable(openflow_13.OfpTable_OFPTT_INVALID)
+const OfpTable_OFPTT_MAX = OfpTable(openflow_13.OfpTable_OFPTT_MAX)
+const OfpTable_OFPTT_ALL = OfpTable(openflow_13.OfpTable_OFPTT_ALL)
+
+// ofp_capabilities from public import voltha_protos/openflow_13.proto
+type OfpCapabilities = openflow_13.OfpCapabilities
+
+var OfpCapabilities_name = openflow_13.OfpCapabilities_name
+var OfpCapabilities_value = openflow_13.OfpCapabilities_value
+
+const OfpCapabilities_OFPC_INVALID = OfpCapabilities(openflow_13.OfpCapabilities_OFPC_INVALID)
+const OfpCapabilities_OFPC_FLOW_STATS = OfpCapabilities(openflow_13.OfpCapabilities_OFPC_FLOW_STATS)
+const OfpCapabilities_OFPC_TABLE_STATS = OfpCapabilities(openflow_13.OfpCapabilities_OFPC_TABLE_STATS)
+const OfpCapabilities_OFPC_PORT_STATS = OfpCapabilities(openflow_13.OfpCapabilities_OFPC_PORT_STATS)
+const OfpCapabilities_OFPC_GROUP_STATS = OfpCapabilities(openflow_13.OfpCapabilities_OFPC_GROUP_STATS)
+const OfpCapabilities_OFPC_IP_REASM = OfpCapabilities(openflow_13.OfpCapabilities_OFPC_IP_REASM)
+const OfpCapabilities_OFPC_QUEUE_STATS = OfpCapabilities(openflow_13.OfpCapabilities_OFPC_QUEUE_STATS)
+const OfpCapabilities_OFPC_PORT_BLOCKED = OfpCapabilities(openflow_13.OfpCapabilities_OFPC_PORT_BLOCKED)
+
+// ofp_port_config from public import voltha_protos/openflow_13.proto
+type OfpPortConfig = openflow_13.OfpPortConfig
+
+var OfpPortConfig_name = openflow_13.OfpPortConfig_name
+var OfpPortConfig_value = openflow_13.OfpPortConfig_value
+
+const OfpPortConfig_OFPPC_INVALID = OfpPortConfig(openflow_13.OfpPortConfig_OFPPC_INVALID)
+const OfpPortConfig_OFPPC_PORT_DOWN = OfpPortConfig(openflow_13.OfpPortConfig_OFPPC_PORT_DOWN)
+const OfpPortConfig_OFPPC_NO_RECV = OfpPortConfig(openflow_13.OfpPortConfig_OFPPC_NO_RECV)
+const OfpPortConfig_OFPPC_NO_FWD = OfpPortConfig(openflow_13.OfpPortConfig_OFPPC_NO_FWD)
+const OfpPortConfig_OFPPC_NO_PACKET_IN = OfpPortConfig(openflow_13.OfpPortConfig_OFPPC_NO_PACKET_IN)
+
+// ofp_port_state from public import voltha_protos/openflow_13.proto
+type OfpPortState = openflow_13.OfpPortState
+
+var OfpPortState_name = openflow_13.OfpPortState_name
+var OfpPortState_value = openflow_13.OfpPortState_value
+
+const OfpPortState_OFPPS_INVALID = OfpPortState(openflow_13.OfpPortState_OFPPS_INVALID)
+const OfpPortState_OFPPS_LINK_DOWN = OfpPortState(openflow_13.OfpPortState_OFPPS_LINK_DOWN)
+const OfpPortState_OFPPS_BLOCKED = OfpPortState(openflow_13.OfpPortState_OFPPS_BLOCKED)
+const OfpPortState_OFPPS_LIVE = OfpPortState(openflow_13.OfpPortState_OFPPS_LIVE)
+
+// ofp_port_features from public import voltha_protos/openflow_13.proto
+type OfpPortFeatures = openflow_13.OfpPortFeatures
+
+var OfpPortFeatures_name = openflow_13.OfpPortFeatures_name
+var OfpPortFeatures_value = openflow_13.OfpPortFeatures_value
+
+const OfpPortFeatures_OFPPF_INVALID = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_INVALID)
+const OfpPortFeatures_OFPPF_10MB_HD = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_10MB_HD)
+const OfpPortFeatures_OFPPF_10MB_FD = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_10MB_FD)
+const OfpPortFeatures_OFPPF_100MB_HD = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_100MB_HD)
+const OfpPortFeatures_OFPPF_100MB_FD = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_100MB_FD)
+const OfpPortFeatures_OFPPF_1GB_HD = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_1GB_HD)
+const OfpPortFeatures_OFPPF_1GB_FD = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_1GB_FD)
+const OfpPortFeatures_OFPPF_10GB_FD = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_10GB_FD)
+const OfpPortFeatures_OFPPF_40GB_FD = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_40GB_FD)
+const OfpPortFeatures_OFPPF_100GB_FD = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_100GB_FD)
+const OfpPortFeatures_OFPPF_1TB_FD = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_1TB_FD)
+const OfpPortFeatures_OFPPF_OTHER = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_OTHER)
+const OfpPortFeatures_OFPPF_COPPER = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_COPPER)
+const OfpPortFeatures_OFPPF_FIBER = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_FIBER)
+const OfpPortFeatures_OFPPF_AUTONEG = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_AUTONEG)
+const OfpPortFeatures_OFPPF_PAUSE = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_PAUSE)
+const OfpPortFeatures_OFPPF_PAUSE_ASYM = OfpPortFeatures(openflow_13.OfpPortFeatures_OFPPF_PAUSE_ASYM)
+
+// ofp_port_reason from public import voltha_protos/openflow_13.proto
+type OfpPortReason = openflow_13.OfpPortReason
+
+var OfpPortReason_name = openflow_13.OfpPortReason_name
+var OfpPortReason_value = openflow_13.OfpPortReason_value
+
+const OfpPortReason_OFPPR_ADD = OfpPortReason(openflow_13.OfpPortReason_OFPPR_ADD)
+const OfpPortReason_OFPPR_DELETE = OfpPortReason(openflow_13.OfpPortReason_OFPPR_DELETE)
+const OfpPortReason_OFPPR_MODIFY = OfpPortReason(openflow_13.OfpPortReason_OFPPR_MODIFY)
+
+// ofp_match_type from public import voltha_protos/openflow_13.proto
+type OfpMatchType = openflow_13.OfpMatchType
+
+var OfpMatchType_name = openflow_13.OfpMatchType_name
+var OfpMatchType_value = openflow_13.OfpMatchType_value
+
+const OfpMatchType_OFPMT_STANDARD = OfpMatchType(openflow_13.OfpMatchType_OFPMT_STANDARD)
+const OfpMatchType_OFPMT_OXM = OfpMatchType(openflow_13.OfpMatchType_OFPMT_OXM)
+
+// ofp_oxm_class from public import voltha_protos/openflow_13.proto
+type OfpOxmClass = openflow_13.OfpOxmClass
+
+var OfpOxmClass_name = openflow_13.OfpOxmClass_name
+var OfpOxmClass_value = openflow_13.OfpOxmClass_value
+
+const OfpOxmClass_OFPXMC_NXM_0 = OfpOxmClass(openflow_13.OfpOxmClass_OFPXMC_NXM_0)
+const OfpOxmClass_OFPXMC_NXM_1 = OfpOxmClass(openflow_13.OfpOxmClass_OFPXMC_NXM_1)
+const OfpOxmClass_OFPXMC_OPENFLOW_BASIC = OfpOxmClass(openflow_13.OfpOxmClass_OFPXMC_OPENFLOW_BASIC)
+const OfpOxmClass_OFPXMC_EXPERIMENTER = OfpOxmClass(openflow_13.OfpOxmClass_OFPXMC_EXPERIMENTER)
+
+// oxm_ofb_field_types from public import voltha_protos/openflow_13.proto
+type OxmOfbFieldTypes = openflow_13.OxmOfbFieldTypes
+
+var OxmOfbFieldTypes_name = openflow_13.OxmOfbFieldTypes_name
+var OxmOfbFieldTypes_value = openflow_13.OxmOfbFieldTypes_value
+
+const OxmOfbFieldTypes_OFPXMT_OFB_IN_PORT = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_IN_PORT)
+const OxmOfbFieldTypes_OFPXMT_OFB_IN_PHY_PORT = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_IN_PHY_PORT)
+const OxmOfbFieldTypes_OFPXMT_OFB_METADATA = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_METADATA)
+const OxmOfbFieldTypes_OFPXMT_OFB_ETH_DST = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_ETH_DST)
+const OxmOfbFieldTypes_OFPXMT_OFB_ETH_SRC = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_ETH_SRC)
+const OxmOfbFieldTypes_OFPXMT_OFB_ETH_TYPE = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_ETH_TYPE)
+const OxmOfbFieldTypes_OFPXMT_OFB_VLAN_VID = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_VLAN_VID)
+const OxmOfbFieldTypes_OFPXMT_OFB_VLAN_PCP = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_VLAN_PCP)
+const OxmOfbFieldTypes_OFPXMT_OFB_IP_DSCP = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_IP_DSCP)
+const OxmOfbFieldTypes_OFPXMT_OFB_IP_ECN = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_IP_ECN)
+const OxmOfbFieldTypes_OFPXMT_OFB_IP_PROTO = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_IP_PROTO)
+const OxmOfbFieldTypes_OFPXMT_OFB_IPV4_SRC = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_IPV4_SRC)
+const OxmOfbFieldTypes_OFPXMT_OFB_IPV4_DST = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_IPV4_DST)
+const OxmOfbFieldTypes_OFPXMT_OFB_TCP_SRC = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_TCP_SRC)
+const OxmOfbFieldTypes_OFPXMT_OFB_TCP_DST = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_TCP_DST)
+const OxmOfbFieldTypes_OFPXMT_OFB_UDP_SRC = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_UDP_SRC)
+const OxmOfbFieldTypes_OFPXMT_OFB_UDP_DST = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_UDP_DST)
+const OxmOfbFieldTypes_OFPXMT_OFB_SCTP_SRC = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_SCTP_SRC)
+const OxmOfbFieldTypes_OFPXMT_OFB_SCTP_DST = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_SCTP_DST)
+const OxmOfbFieldTypes_OFPXMT_OFB_ICMPV4_TYPE = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_ICMPV4_TYPE)
+const OxmOfbFieldTypes_OFPXMT_OFB_ICMPV4_CODE = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_ICMPV4_CODE)
+const OxmOfbFieldTypes_OFPXMT_OFB_ARP_OP = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_ARP_OP)
+const OxmOfbFieldTypes_OFPXMT_OFB_ARP_SPA = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_ARP_SPA)
+const OxmOfbFieldTypes_OFPXMT_OFB_ARP_TPA = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_ARP_TPA)
+const OxmOfbFieldTypes_OFPXMT_OFB_ARP_SHA = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_ARP_SHA)
+const OxmOfbFieldTypes_OFPXMT_OFB_ARP_THA = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_ARP_THA)
+const OxmOfbFieldTypes_OFPXMT_OFB_IPV6_SRC = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_IPV6_SRC)
+const OxmOfbFieldTypes_OFPXMT_OFB_IPV6_DST = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_IPV6_DST)
+const OxmOfbFieldTypes_OFPXMT_OFB_IPV6_FLABEL = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_IPV6_FLABEL)
+const OxmOfbFieldTypes_OFPXMT_OFB_ICMPV6_TYPE = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_ICMPV6_TYPE)
+const OxmOfbFieldTypes_OFPXMT_OFB_ICMPV6_CODE = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_ICMPV6_CODE)
+const OxmOfbFieldTypes_OFPXMT_OFB_IPV6_ND_TARGET = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_IPV6_ND_TARGET)
+const OxmOfbFieldTypes_OFPXMT_OFB_IPV6_ND_SLL = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_IPV6_ND_SLL)
+const OxmOfbFieldTypes_OFPXMT_OFB_IPV6_ND_TLL = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_IPV6_ND_TLL)
+const OxmOfbFieldTypes_OFPXMT_OFB_MPLS_LABEL = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_MPLS_LABEL)
+const OxmOfbFieldTypes_OFPXMT_OFB_MPLS_TC = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_MPLS_TC)
+const OxmOfbFieldTypes_OFPXMT_OFB_MPLS_BOS = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_MPLS_BOS)
+const OxmOfbFieldTypes_OFPXMT_OFB_PBB_ISID = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_PBB_ISID)
+const OxmOfbFieldTypes_OFPXMT_OFB_TUNNEL_ID = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_TUNNEL_ID)
+const OxmOfbFieldTypes_OFPXMT_OFB_IPV6_EXTHDR = OxmOfbFieldTypes(openflow_13.OxmOfbFieldTypes_OFPXMT_OFB_IPV6_EXTHDR)
+
+// ofp_vlan_id from public import voltha_protos/openflow_13.proto
+type OfpVlanId = openflow_13.OfpVlanId
+
+var OfpVlanId_name = openflow_13.OfpVlanId_name
+var OfpVlanId_value = openflow_13.OfpVlanId_value
+
+const OfpVlanId_OFPVID_NONE = OfpVlanId(openflow_13.OfpVlanId_OFPVID_NONE)
+const OfpVlanId_OFPVID_PRESENT = OfpVlanId(openflow_13.OfpVlanId_OFPVID_PRESENT)
+
+// ofp_ipv6exthdr_flags from public import voltha_protos/openflow_13.proto
+type OfpIpv6ExthdrFlags = openflow_13.OfpIpv6ExthdrFlags
+
+var OfpIpv6ExthdrFlags_name = openflow_13.OfpIpv6ExthdrFlags_name
+var OfpIpv6ExthdrFlags_value = openflow_13.OfpIpv6ExthdrFlags_value
+
+const OfpIpv6ExthdrFlags_OFPIEH_INVALID = OfpIpv6ExthdrFlags(openflow_13.OfpIpv6ExthdrFlags_OFPIEH_INVALID)
+const OfpIpv6ExthdrFlags_OFPIEH_NONEXT = OfpIpv6ExthdrFlags(openflow_13.OfpIpv6ExthdrFlags_OFPIEH_NONEXT)
+const OfpIpv6ExthdrFlags_OFPIEH_ESP = OfpIpv6ExthdrFlags(openflow_13.OfpIpv6ExthdrFlags_OFPIEH_ESP)
+const OfpIpv6ExthdrFlags_OFPIEH_AUTH = OfpIpv6ExthdrFlags(openflow_13.OfpIpv6ExthdrFlags_OFPIEH_AUTH)
+const OfpIpv6ExthdrFlags_OFPIEH_DEST = OfpIpv6ExthdrFlags(openflow_13.OfpIpv6ExthdrFlags_OFPIEH_DEST)
+const OfpIpv6ExthdrFlags_OFPIEH_FRAG = OfpIpv6ExthdrFlags(openflow_13.OfpIpv6ExthdrFlags_OFPIEH_FRAG)
+const OfpIpv6ExthdrFlags_OFPIEH_ROUTER = OfpIpv6ExthdrFlags(openflow_13.OfpIpv6ExthdrFlags_OFPIEH_ROUTER)
+const OfpIpv6ExthdrFlags_OFPIEH_HOP = OfpIpv6ExthdrFlags(openflow_13.OfpIpv6ExthdrFlags_OFPIEH_HOP)
+const OfpIpv6ExthdrFlags_OFPIEH_UNREP = OfpIpv6ExthdrFlags(openflow_13.OfpIpv6ExthdrFlags_OFPIEH_UNREP)
+const OfpIpv6ExthdrFlags_OFPIEH_UNSEQ = OfpIpv6ExthdrFlags(openflow_13.OfpIpv6ExthdrFlags_OFPIEH_UNSEQ)
+
+// ofp_action_type from public import voltha_protos/openflow_13.proto
+type OfpActionType = openflow_13.OfpActionType
+
+var OfpActionType_name = openflow_13.OfpActionType_name
+var OfpActionType_value = openflow_13.OfpActionType_value
+
+const OfpActionType_OFPAT_OUTPUT = OfpActionType(openflow_13.OfpActionType_OFPAT_OUTPUT)
+const OfpActionType_OFPAT_COPY_TTL_OUT = OfpActionType(openflow_13.OfpActionType_OFPAT_COPY_TTL_OUT)
+const OfpActionType_OFPAT_COPY_TTL_IN = OfpActionType(openflow_13.OfpActionType_OFPAT_COPY_TTL_IN)
+const OfpActionType_OFPAT_SET_MPLS_TTL = OfpActionType(openflow_13.OfpActionType_OFPAT_SET_MPLS_TTL)
+const OfpActionType_OFPAT_DEC_MPLS_TTL = OfpActionType(openflow_13.OfpActionType_OFPAT_DEC_MPLS_TTL)
+const OfpActionType_OFPAT_PUSH_VLAN = OfpActionType(openflow_13.OfpActionType_OFPAT_PUSH_VLAN)
+const OfpActionType_OFPAT_POP_VLAN = OfpActionType(openflow_13.OfpActionType_OFPAT_POP_VLAN)
+const OfpActionType_OFPAT_PUSH_MPLS = OfpActionType(openflow_13.OfpActionType_OFPAT_PUSH_MPLS)
+const OfpActionType_OFPAT_POP_MPLS = OfpActionType(openflow_13.OfpActionType_OFPAT_POP_MPLS)
+const OfpActionType_OFPAT_SET_QUEUE = OfpActionType(openflow_13.OfpActionType_OFPAT_SET_QUEUE)
+const OfpActionType_OFPAT_GROUP = OfpActionType(openflow_13.OfpActionType_OFPAT_GROUP)
+const OfpActionType_OFPAT_SET_NW_TTL = OfpActionType(openflow_13.OfpActionType_OFPAT_SET_NW_TTL)
+const OfpActionType_OFPAT_DEC_NW_TTL = OfpActionType(openflow_13.OfpActionType_OFPAT_DEC_NW_TTL)
+const OfpActionType_OFPAT_SET_FIELD = OfpActionType(openflow_13.OfpActionType_OFPAT_SET_FIELD)
+const OfpActionType_OFPAT_PUSH_PBB = OfpActionType(openflow_13.OfpActionType_OFPAT_PUSH_PBB)
+const OfpActionType_OFPAT_POP_PBB = OfpActionType(openflow_13.OfpActionType_OFPAT_POP_PBB)
+const OfpActionType_OFPAT_EXPERIMENTER = OfpActionType(openflow_13.OfpActionType_OFPAT_EXPERIMENTER)
+
+// ofp_controller_max_len from public import voltha_protos/openflow_13.proto
+type OfpControllerMaxLen = openflow_13.OfpControllerMaxLen
+
+var OfpControllerMaxLen_name = openflow_13.OfpControllerMaxLen_name
+var OfpControllerMaxLen_value = openflow_13.OfpControllerMaxLen_value
+
+const OfpControllerMaxLen_OFPCML_INVALID = OfpControllerMaxLen(openflow_13.OfpControllerMaxLen_OFPCML_INVALID)
+const OfpControllerMaxLen_OFPCML_MAX = OfpControllerMaxLen(openflow_13.OfpControllerMaxLen_OFPCML_MAX)
+const OfpControllerMaxLen_OFPCML_NO_BUFFER = OfpControllerMaxLen(openflow_13.OfpControllerMaxLen_OFPCML_NO_BUFFER)
+
+// ofp_instruction_type from public import voltha_protos/openflow_13.proto
+type OfpInstructionType = openflow_13.OfpInstructionType
+
+var OfpInstructionType_name = openflow_13.OfpInstructionType_name
+var OfpInstructionType_value = openflow_13.OfpInstructionType_value
+
+const OfpInstructionType_OFPIT_INVALID = OfpInstructionType(openflow_13.OfpInstructionType_OFPIT_INVALID)
+const OfpInstructionType_OFPIT_GOTO_TABLE = OfpInstructionType(openflow_13.OfpInstructionType_OFPIT_GOTO_TABLE)
+const OfpInstructionType_OFPIT_WRITE_METADATA = OfpInstructionType(openflow_13.OfpInstructionType_OFPIT_WRITE_METADATA)
+const OfpInstructionType_OFPIT_WRITE_ACTIONS = OfpInstructionType(openflow_13.OfpInstructionType_OFPIT_WRITE_ACTIONS)
+const OfpInstructionType_OFPIT_APPLY_ACTIONS = OfpInstructionType(openflow_13.OfpInstructionType_OFPIT_APPLY_ACTIONS)
+const OfpInstructionType_OFPIT_CLEAR_ACTIONS = OfpInstructionType(openflow_13.OfpInstructionType_OFPIT_CLEAR_ACTIONS)
+const OfpInstructionType_OFPIT_METER = OfpInstructionType(openflow_13.OfpInstructionType_OFPIT_METER)
+const OfpInstructionType_OFPIT_EXPERIMENTER = OfpInstructionType(openflow_13.OfpInstructionType_OFPIT_EXPERIMENTER)
+
+// ofp_flow_mod_command from public import voltha_protos/openflow_13.proto
+type OfpFlowModCommand = openflow_13.OfpFlowModCommand
+
+var OfpFlowModCommand_name = openflow_13.OfpFlowModCommand_name
+var OfpFlowModCommand_value = openflow_13.OfpFlowModCommand_value
+
+const OfpFlowModCommand_OFPFC_ADD = OfpFlowModCommand(openflow_13.OfpFlowModCommand_OFPFC_ADD)
+const OfpFlowModCommand_OFPFC_MODIFY = OfpFlowModCommand(openflow_13.OfpFlowModCommand_OFPFC_MODIFY)
+const OfpFlowModCommand_OFPFC_MODIFY_STRICT = OfpFlowModCommand(openflow_13.OfpFlowModCommand_OFPFC_MODIFY_STRICT)
+const OfpFlowModCommand_OFPFC_DELETE = OfpFlowModCommand(openflow_13.OfpFlowModCommand_OFPFC_DELETE)
+const OfpFlowModCommand_OFPFC_DELETE_STRICT = OfpFlowModCommand(openflow_13.OfpFlowModCommand_OFPFC_DELETE_STRICT)
+
+// ofp_flow_mod_flags from public import voltha_protos/openflow_13.proto
+type OfpFlowModFlags = openflow_13.OfpFlowModFlags
+
+var OfpFlowModFlags_name = openflow_13.OfpFlowModFlags_name
+var OfpFlowModFlags_value = openflow_13.OfpFlowModFlags_value
+
+const OfpFlowModFlags_OFPFF_INVALID = OfpFlowModFlags(openflow_13.OfpFlowModFlags_OFPFF_INVALID)
+const OfpFlowModFlags_OFPFF_SEND_FLOW_REM = OfpFlowModFlags(openflow_13.OfpFlowModFlags_OFPFF_SEND_FLOW_REM)
+const OfpFlowModFlags_OFPFF_CHECK_OVERLAP = OfpFlowModFlags(openflow_13.OfpFlowModFlags_OFPFF_CHECK_OVERLAP)
+const OfpFlowModFlags_OFPFF_RESET_COUNTS = OfpFlowModFlags(openflow_13.OfpFlowModFlags_OFPFF_RESET_COUNTS)
+const OfpFlowModFlags_OFPFF_NO_PKT_COUNTS = OfpFlowModFlags(openflow_13.OfpFlowModFlags_OFPFF_NO_PKT_COUNTS)
+const OfpFlowModFlags_OFPFF_NO_BYT_COUNTS = OfpFlowModFlags(openflow_13.OfpFlowModFlags_OFPFF_NO_BYT_COUNTS)
+
+// ofp_group from public import voltha_protos/openflow_13.proto
+type OfpGroup = openflow_13.OfpGroup
+
+var OfpGroup_name = openflow_13.OfpGroup_name
+var OfpGroup_value = openflow_13.OfpGroup_value
+
+const OfpGroup_OFPG_INVALID = OfpGroup(openflow_13.OfpGroup_OFPG_INVALID)
+const OfpGroup_OFPG_MAX = OfpGroup(openflow_13.OfpGroup_OFPG_MAX)
+const OfpGroup_OFPG_ALL = OfpGroup(openflow_13.OfpGroup_OFPG_ALL)
+const OfpGroup_OFPG_ANY = OfpGroup(openflow_13.OfpGroup_OFPG_ANY)
+
+// ofp_group_mod_command from public import voltha_protos/openflow_13.proto
+type OfpGroupModCommand = openflow_13.OfpGroupModCommand
+
+var OfpGroupModCommand_name = openflow_13.OfpGroupModCommand_name
+var OfpGroupModCommand_value = openflow_13.OfpGroupModCommand_value
+
+const OfpGroupModCommand_OFPGC_ADD = OfpGroupModCommand(openflow_13.OfpGroupModCommand_OFPGC_ADD)
+const OfpGroupModCommand_OFPGC_MODIFY = OfpGroupModCommand(openflow_13.OfpGroupModCommand_OFPGC_MODIFY)
+const OfpGroupModCommand_OFPGC_DELETE = OfpGroupModCommand(openflow_13.OfpGroupModCommand_OFPGC_DELETE)
+
+// ofp_group_type from public import voltha_protos/openflow_13.proto
+type OfpGroupType = openflow_13.OfpGroupType
+
+var OfpGroupType_name = openflow_13.OfpGroupType_name
+var OfpGroupType_value = openflow_13.OfpGroupType_value
+
+const OfpGroupType_OFPGT_ALL = OfpGroupType(openflow_13.OfpGroupType_OFPGT_ALL)
+const OfpGroupType_OFPGT_SELECT = OfpGroupType(openflow_13.OfpGroupType_OFPGT_SELECT)
+const OfpGroupType_OFPGT_INDIRECT = OfpGroupType(openflow_13.OfpGroupType_OFPGT_INDIRECT)
+const OfpGroupType_OFPGT_FF = OfpGroupType(openflow_13.OfpGroupType_OFPGT_FF)
+
+// ofp_packet_in_reason from public import voltha_protos/openflow_13.proto
+type OfpPacketInReason = openflow_13.OfpPacketInReason
+
+var OfpPacketInReason_name = openflow_13.OfpPacketInReason_name
+var OfpPacketInReason_value = openflow_13.OfpPacketInReason_value
+
+const OfpPacketInReason_OFPR_NO_MATCH = OfpPacketInReason(openflow_13.OfpPacketInReason_OFPR_NO_MATCH)
+const OfpPacketInReason_OFPR_ACTION = OfpPacketInReason(openflow_13.OfpPacketInReason_OFPR_ACTION)
+const OfpPacketInReason_OFPR_INVALID_TTL = OfpPacketInReason(openflow_13.OfpPacketInReason_OFPR_INVALID_TTL)
+
+// ofp_flow_removed_reason from public import voltha_protos/openflow_13.proto
+type OfpFlowRemovedReason = openflow_13.OfpFlowRemovedReason
+
+var OfpFlowRemovedReason_name = openflow_13.OfpFlowRemovedReason_name
+var OfpFlowRemovedReason_value = openflow_13.OfpFlowRemovedReason_value
+
+const OfpFlowRemovedReason_OFPRR_IDLE_TIMEOUT = OfpFlowRemovedReason(openflow_13.OfpFlowRemovedReason_OFPRR_IDLE_TIMEOUT)
+const OfpFlowRemovedReason_OFPRR_HARD_TIMEOUT = OfpFlowRemovedReason(openflow_13.OfpFlowRemovedReason_OFPRR_HARD_TIMEOUT)
+const OfpFlowRemovedReason_OFPRR_DELETE = OfpFlowRemovedReason(openflow_13.OfpFlowRemovedReason_OFPRR_DELETE)
+const OfpFlowRemovedReason_OFPRR_GROUP_DELETE = OfpFlowRemovedReason(openflow_13.OfpFlowRemovedReason_OFPRR_GROUP_DELETE)
+const OfpFlowRemovedReason_OFPRR_METER_DELETE = OfpFlowRemovedReason(openflow_13.OfpFlowRemovedReason_OFPRR_METER_DELETE)
+
+// ofp_meter from public import voltha_protos/openflow_13.proto
+type OfpMeter = openflow_13.OfpMeter
+
+var OfpMeter_name = openflow_13.OfpMeter_name
+var OfpMeter_value = openflow_13.OfpMeter_value
+
+const OfpMeter_OFPM_ZERO = OfpMeter(openflow_13.OfpMeter_OFPM_ZERO)
+const OfpMeter_OFPM_MAX = OfpMeter(openflow_13.OfpMeter_OFPM_MAX)
+const OfpMeter_OFPM_SLOWPATH = OfpMeter(openflow_13.OfpMeter_OFPM_SLOWPATH)
+const OfpMeter_OFPM_CONTROLLER = OfpMeter(openflow_13.OfpMeter_OFPM_CONTROLLER)
+const OfpMeter_OFPM_ALL = OfpMeter(openflow_13.OfpMeter_OFPM_ALL)
+
+// ofp_meter_band_type from public import voltha_protos/openflow_13.proto
+type OfpMeterBandType = openflow_13.OfpMeterBandType
+
+var OfpMeterBandType_name = openflow_13.OfpMeterBandType_name
+var OfpMeterBandType_value = openflow_13.OfpMeterBandType_value
+
+const OfpMeterBandType_OFPMBT_INVALID = OfpMeterBandType(openflow_13.OfpMeterBandType_OFPMBT_INVALID)
+const OfpMeterBandType_OFPMBT_DROP = OfpMeterBandType(openflow_13.OfpMeterBandType_OFPMBT_DROP)
+const OfpMeterBandType_OFPMBT_DSCP_REMARK = OfpMeterBandType(openflow_13.OfpMeterBandType_OFPMBT_DSCP_REMARK)
+const OfpMeterBandType_OFPMBT_EXPERIMENTER = OfpMeterBandType(openflow_13.OfpMeterBandType_OFPMBT_EXPERIMENTER)
+
+// ofp_meter_mod_command from public import voltha_protos/openflow_13.proto
+type OfpMeterModCommand = openflow_13.OfpMeterModCommand
+
+var OfpMeterModCommand_name = openflow_13.OfpMeterModCommand_name
+var OfpMeterModCommand_value = openflow_13.OfpMeterModCommand_value
+
+const OfpMeterModCommand_OFPMC_ADD = OfpMeterModCommand(openflow_13.OfpMeterModCommand_OFPMC_ADD)
+const OfpMeterModCommand_OFPMC_MODIFY = OfpMeterModCommand(openflow_13.OfpMeterModCommand_OFPMC_MODIFY)
+const OfpMeterModCommand_OFPMC_DELETE = OfpMeterModCommand(openflow_13.OfpMeterModCommand_OFPMC_DELETE)
+
+// ofp_meter_flags from public import voltha_protos/openflow_13.proto
+type OfpMeterFlags = openflow_13.OfpMeterFlags
+
+var OfpMeterFlags_name = openflow_13.OfpMeterFlags_name
+var OfpMeterFlags_value = openflow_13.OfpMeterFlags_value
+
+const OfpMeterFlags_OFPMF_INVALID = OfpMeterFlags(openflow_13.OfpMeterFlags_OFPMF_INVALID)
+const OfpMeterFlags_OFPMF_KBPS = OfpMeterFlags(openflow_13.OfpMeterFlags_OFPMF_KBPS)
+const OfpMeterFlags_OFPMF_PKTPS = OfpMeterFlags(openflow_13.OfpMeterFlags_OFPMF_PKTPS)
+const OfpMeterFlags_OFPMF_BURST = OfpMeterFlags(openflow_13.OfpMeterFlags_OFPMF_BURST)
+const OfpMeterFlags_OFPMF_STATS = OfpMeterFlags(openflow_13.OfpMeterFlags_OFPMF_STATS)
+
+// ofp_error_type from public import voltha_protos/openflow_13.proto
+type OfpErrorType = openflow_13.OfpErrorType
+
+var OfpErrorType_name = openflow_13.OfpErrorType_name
+var OfpErrorType_value = openflow_13.OfpErrorType_value
+
+const OfpErrorType_OFPET_HELLO_FAILED = OfpErrorType(openflow_13.OfpErrorType_OFPET_HELLO_FAILED)
+const OfpErrorType_OFPET_BAD_REQUEST = OfpErrorType(openflow_13.OfpErrorType_OFPET_BAD_REQUEST)
+const OfpErrorType_OFPET_BAD_ACTION = OfpErrorType(openflow_13.OfpErrorType_OFPET_BAD_ACTION)
+const OfpErrorType_OFPET_BAD_INSTRUCTION = OfpErrorType(openflow_13.OfpErrorType_OFPET_BAD_INSTRUCTION)
+const OfpErrorType_OFPET_BAD_MATCH = OfpErrorType(openflow_13.OfpErrorType_OFPET_BAD_MATCH)
+const OfpErrorType_OFPET_FLOW_MOD_FAILED = OfpErrorType(openflow_13.OfpErrorType_OFPET_FLOW_MOD_FAILED)
+const OfpErrorType_OFPET_GROUP_MOD_FAILED = OfpErrorType(openflow_13.OfpErrorType_OFPET_GROUP_MOD_FAILED)
+const OfpErrorType_OFPET_PORT_MOD_FAILED = OfpErrorType(openflow_13.OfpErrorType_OFPET_PORT_MOD_FAILED)
+const OfpErrorType_OFPET_TABLE_MOD_FAILED = OfpErrorType(openflow_13.OfpErrorType_OFPET_TABLE_MOD_FAILED)
+const OfpErrorType_OFPET_QUEUE_OP_FAILED = OfpErrorType(openflow_13.OfpErrorType_OFPET_QUEUE_OP_FAILED)
+const OfpErrorType_OFPET_SWITCH_CONFIG_FAILED = OfpErrorType(openflow_13.OfpErrorType_OFPET_SWITCH_CONFIG_FAILED)
+const OfpErrorType_OFPET_ROLE_REQUEST_FAILED = OfpErrorType(openflow_13.OfpErrorType_OFPET_ROLE_REQUEST_FAILED)
+const OfpErrorType_OFPET_METER_MOD_FAILED = OfpErrorType(openflow_13.OfpErrorType_OFPET_METER_MOD_FAILED)
+const OfpErrorType_OFPET_TABLE_FEATURES_FAILED = OfpErrorType(openflow_13.OfpErrorType_OFPET_TABLE_FEATURES_FAILED)
+const OfpErrorType_OFPET_EXPERIMENTER = OfpErrorType(openflow_13.OfpErrorType_OFPET_EXPERIMENTER)
+
+// ofp_hello_failed_code from public import voltha_protos/openflow_13.proto
+type OfpHelloFailedCode = openflow_13.OfpHelloFailedCode
+
+var OfpHelloFailedCode_name = openflow_13.OfpHelloFailedCode_name
+var OfpHelloFailedCode_value = openflow_13.OfpHelloFailedCode_value
+
+const OfpHelloFailedCode_OFPHFC_INCOMPATIBLE = OfpHelloFailedCode(openflow_13.OfpHelloFailedCode_OFPHFC_INCOMPATIBLE)
+const OfpHelloFailedCode_OFPHFC_EPERM = OfpHelloFailedCode(openflow_13.OfpHelloFailedCode_OFPHFC_EPERM)
+
+// ofp_bad_request_code from public import voltha_protos/openflow_13.proto
+type OfpBadRequestCode = openflow_13.OfpBadRequestCode
+
+var OfpBadRequestCode_name = openflow_13.OfpBadRequestCode_name
+var OfpBadRequestCode_value = openflow_13.OfpBadRequestCode_value
+
+const OfpBadRequestCode_OFPBRC_BAD_VERSION = OfpBadRequestCode(openflow_13.OfpBadRequestCode_OFPBRC_BAD_VERSION)
+const OfpBadRequestCode_OFPBRC_BAD_TYPE = OfpBadRequestCode(openflow_13.OfpBadRequestCode_OFPBRC_BAD_TYPE)
+const OfpBadRequestCode_OFPBRC_BAD_MULTIPART = OfpBadRequestCode(openflow_13.OfpBadRequestCode_OFPBRC_BAD_MULTIPART)
+const OfpBadRequestCode_OFPBRC_BAD_EXPERIMENTER = OfpBadRequestCode(openflow_13.OfpBadRequestCode_OFPBRC_BAD_EXPERIMENTER)
+const OfpBadRequestCode_OFPBRC_BAD_EXP_TYPE = OfpBadRequestCode(openflow_13.OfpBadRequestCode_OFPBRC_BAD_EXP_TYPE)
+const OfpBadRequestCode_OFPBRC_EPERM = OfpBadRequestCode(openflow_13.OfpBadRequestCode_OFPBRC_EPERM)
+const OfpBadRequestCode_OFPBRC_BAD_LEN = OfpBadRequestCode(openflow_13.OfpBadRequestCode_OFPBRC_BAD_LEN)
+const OfpBadRequestCode_OFPBRC_BUFFER_EMPTY = OfpBadRequestCode(openflow_13.OfpBadRequestCode_OFPBRC_BUFFER_EMPTY)
+const OfpBadRequestCode_OFPBRC_BUFFER_UNKNOWN = OfpBadRequestCode(openflow_13.OfpBadRequestCode_OFPBRC_BUFFER_UNKNOWN)
+const OfpBadRequestCode_OFPBRC_BAD_TABLE_ID = OfpBadRequestCode(openflow_13.OfpBadRequestCode_OFPBRC_BAD_TABLE_ID)
+const OfpBadRequestCode_OFPBRC_IS_SLAVE = OfpBadRequestCode(openflow_13.OfpBadRequestCode_OFPBRC_IS_SLAVE)
+const OfpBadRequestCode_OFPBRC_BAD_PORT = OfpBadRequestCode(openflow_13.OfpBadRequestCode_OFPBRC_BAD_PORT)
+const OfpBadRequestCode_OFPBRC_BAD_PACKET = OfpBadRequestCode(openflow_13.OfpBadRequestCode_OFPBRC_BAD_PACKET)
+const OfpBadRequestCode_OFPBRC_MULTIPART_BUFFER_OVERFLOW = OfpBadRequestCode(openflow_13.OfpBadRequestCode_OFPBRC_MULTIPART_BUFFER_OVERFLOW)
+
+// ofp_bad_action_code from public import voltha_protos/openflow_13.proto
+type OfpBadActionCode = openflow_13.OfpBadActionCode
+
+var OfpBadActionCode_name = openflow_13.OfpBadActionCode_name
+var OfpBadActionCode_value = openflow_13.OfpBadActionCode_value
+
+const OfpBadActionCode_OFPBAC_BAD_TYPE = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_BAD_TYPE)
+const OfpBadActionCode_OFPBAC_BAD_LEN = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_BAD_LEN)
+const OfpBadActionCode_OFPBAC_BAD_EXPERIMENTER = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_BAD_EXPERIMENTER)
+const OfpBadActionCode_OFPBAC_BAD_EXP_TYPE = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_BAD_EXP_TYPE)
+const OfpBadActionCode_OFPBAC_BAD_OUT_PORT = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_BAD_OUT_PORT)
+const OfpBadActionCode_OFPBAC_BAD_ARGUMENT = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_BAD_ARGUMENT)
+const OfpBadActionCode_OFPBAC_EPERM = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_EPERM)
+const OfpBadActionCode_OFPBAC_TOO_MANY = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_TOO_MANY)
+const OfpBadActionCode_OFPBAC_BAD_QUEUE = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_BAD_QUEUE)
+const OfpBadActionCode_OFPBAC_BAD_OUT_GROUP = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_BAD_OUT_GROUP)
+const OfpBadActionCode_OFPBAC_MATCH_INCONSISTENT = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_MATCH_INCONSISTENT)
+const OfpBadActionCode_OFPBAC_UNSUPPORTED_ORDER = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_UNSUPPORTED_ORDER)
+const OfpBadActionCode_OFPBAC_BAD_TAG = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_BAD_TAG)
+const OfpBadActionCode_OFPBAC_BAD_SET_TYPE = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_BAD_SET_TYPE)
+const OfpBadActionCode_OFPBAC_BAD_SET_LEN = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_BAD_SET_LEN)
+const OfpBadActionCode_OFPBAC_BAD_SET_ARGUMENT = OfpBadActionCode(openflow_13.OfpBadActionCode_OFPBAC_BAD_SET_ARGUMENT)
+
+// ofp_bad_instruction_code from public import voltha_protos/openflow_13.proto
+type OfpBadInstructionCode = openflow_13.OfpBadInstructionCode
+
+var OfpBadInstructionCode_name = openflow_13.OfpBadInstructionCode_name
+var OfpBadInstructionCode_value = openflow_13.OfpBadInstructionCode_value
+
+const OfpBadInstructionCode_OFPBIC_UNKNOWN_INST = OfpBadInstructionCode(openflow_13.OfpBadInstructionCode_OFPBIC_UNKNOWN_INST)
+const OfpBadInstructionCode_OFPBIC_UNSUP_INST = OfpBadInstructionCode(openflow_13.OfpBadInstructionCode_OFPBIC_UNSUP_INST)
+const OfpBadInstructionCode_OFPBIC_BAD_TABLE_ID = OfpBadInstructionCode(openflow_13.OfpBadInstructionCode_OFPBIC_BAD_TABLE_ID)
+const OfpBadInstructionCode_OFPBIC_UNSUP_METADATA = OfpBadInstructionCode(openflow_13.OfpBadInstructionCode_OFPBIC_UNSUP_METADATA)
+const OfpBadInstructionCode_OFPBIC_UNSUP_METADATA_MASK = OfpBadInstructionCode(openflow_13.OfpBadInstructionCode_OFPBIC_UNSUP_METADATA_MASK)
+const OfpBadInstructionCode_OFPBIC_BAD_EXPERIMENTER = OfpBadInstructionCode(openflow_13.OfpBadInstructionCode_OFPBIC_BAD_EXPERIMENTER)
+const OfpBadInstructionCode_OFPBIC_BAD_EXP_TYPE = OfpBadInstructionCode(openflow_13.OfpBadInstructionCode_OFPBIC_BAD_EXP_TYPE)
+const OfpBadInstructionCode_OFPBIC_BAD_LEN = OfpBadInstructionCode(openflow_13.OfpBadInstructionCode_OFPBIC_BAD_LEN)
+const OfpBadInstructionCode_OFPBIC_EPERM = OfpBadInstructionCode(openflow_13.OfpBadInstructionCode_OFPBIC_EPERM)
+
+// ofp_bad_match_code from public import voltha_protos/openflow_13.proto
+type OfpBadMatchCode = openflow_13.OfpBadMatchCode
+
+var OfpBadMatchCode_name = openflow_13.OfpBadMatchCode_name
+var OfpBadMatchCode_value = openflow_13.OfpBadMatchCode_value
+
+const OfpBadMatchCode_OFPBMC_BAD_TYPE = OfpBadMatchCode(openflow_13.OfpBadMatchCode_OFPBMC_BAD_TYPE)
+const OfpBadMatchCode_OFPBMC_BAD_LEN = OfpBadMatchCode(openflow_13.OfpBadMatchCode_OFPBMC_BAD_LEN)
+const OfpBadMatchCode_OFPBMC_BAD_TAG = OfpBadMatchCode(openflow_13.OfpBadMatchCode_OFPBMC_BAD_TAG)
+const OfpBadMatchCode_OFPBMC_BAD_DL_ADDR_MASK = OfpBadMatchCode(openflow_13.OfpBadMatchCode_OFPBMC_BAD_DL_ADDR_MASK)
+const OfpBadMatchCode_OFPBMC_BAD_NW_ADDR_MASK = OfpBadMatchCode(openflow_13.OfpBadMatchCode_OFPBMC_BAD_NW_ADDR_MASK)
+const OfpBadMatchCode_OFPBMC_BAD_WILDCARDS = OfpBadMatchCode(openflow_13.OfpBadMatchCode_OFPBMC_BAD_WILDCARDS)
+const OfpBadMatchCode_OFPBMC_BAD_FIELD = OfpBadMatchCode(openflow_13.OfpBadMatchCode_OFPBMC_BAD_FIELD)
+const OfpBadMatchCode_OFPBMC_BAD_VALUE = OfpBadMatchCode(openflow_13.OfpBadMatchCode_OFPBMC_BAD_VALUE)
+const OfpBadMatchCode_OFPBMC_BAD_MASK = OfpBadMatchCode(openflow_13.OfpBadMatchCode_OFPBMC_BAD_MASK)
+const OfpBadMatchCode_OFPBMC_BAD_PREREQ = OfpBadMatchCode(openflow_13.OfpBadMatchCode_OFPBMC_BAD_PREREQ)
+const OfpBadMatchCode_OFPBMC_DUP_FIELD = OfpBadMatchCode(openflow_13.OfpBadMatchCode_OFPBMC_DUP_FIELD)
+const OfpBadMatchCode_OFPBMC_EPERM = OfpBadMatchCode(openflow_13.OfpBadMatchCode_OFPBMC_EPERM)
+
+// ofp_flow_mod_failed_code from public import voltha_protos/openflow_13.proto
+type OfpFlowModFailedCode = openflow_13.OfpFlowModFailedCode
+
+var OfpFlowModFailedCode_name = openflow_13.OfpFlowModFailedCode_name
+var OfpFlowModFailedCode_value = openflow_13.OfpFlowModFailedCode_value
+
+const OfpFlowModFailedCode_OFPFMFC_UNKNOWN = OfpFlowModFailedCode(openflow_13.OfpFlowModFailedCode_OFPFMFC_UNKNOWN)
+const OfpFlowModFailedCode_OFPFMFC_TABLE_FULL = OfpFlowModFailedCode(openflow_13.OfpFlowModFailedCode_OFPFMFC_TABLE_FULL)
+const OfpFlowModFailedCode_OFPFMFC_BAD_TABLE_ID = OfpFlowModFailedCode(openflow_13.OfpFlowModFailedCode_OFPFMFC_BAD_TABLE_ID)
+const OfpFlowModFailedCode_OFPFMFC_OVERLAP = OfpFlowModFailedCode(openflow_13.OfpFlowModFailedCode_OFPFMFC_OVERLAP)
+const OfpFlowModFailedCode_OFPFMFC_EPERM = OfpFlowModFailedCode(openflow_13.OfpFlowModFailedCode_OFPFMFC_EPERM)
+const OfpFlowModFailedCode_OFPFMFC_BAD_TIMEOUT = OfpFlowModFailedCode(openflow_13.OfpFlowModFailedCode_OFPFMFC_BAD_TIMEOUT)
+const OfpFlowModFailedCode_OFPFMFC_BAD_COMMAND = OfpFlowModFailedCode(openflow_13.OfpFlowModFailedCode_OFPFMFC_BAD_COMMAND)
+const OfpFlowModFailedCode_OFPFMFC_BAD_FLAGS = OfpFlowModFailedCode(openflow_13.OfpFlowModFailedCode_OFPFMFC_BAD_FLAGS)
+
+// ofp_group_mod_failed_code from public import voltha_protos/openflow_13.proto
+type OfpGroupModFailedCode = openflow_13.OfpGroupModFailedCode
+
+var OfpGroupModFailedCode_name = openflow_13.OfpGroupModFailedCode_name
+var OfpGroupModFailedCode_value = openflow_13.OfpGroupModFailedCode_value
+
+const OfpGroupModFailedCode_OFPGMFC_GROUP_EXISTS = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_GROUP_EXISTS)
+const OfpGroupModFailedCode_OFPGMFC_INVALID_GROUP = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_INVALID_GROUP)
+const OfpGroupModFailedCode_OFPGMFC_WEIGHT_UNSUPPORTED = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_WEIGHT_UNSUPPORTED)
+const OfpGroupModFailedCode_OFPGMFC_OUT_OF_GROUPS = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_OUT_OF_GROUPS)
+const OfpGroupModFailedCode_OFPGMFC_OUT_OF_BUCKETS = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_OUT_OF_BUCKETS)
+const OfpGroupModFailedCode_OFPGMFC_CHAINING_UNSUPPORTED = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_CHAINING_UNSUPPORTED)
+const OfpGroupModFailedCode_OFPGMFC_WATCH_UNSUPPORTED = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_WATCH_UNSUPPORTED)
+const OfpGroupModFailedCode_OFPGMFC_LOOP = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_LOOP)
+const OfpGroupModFailedCode_OFPGMFC_UNKNOWN_GROUP = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_UNKNOWN_GROUP)
+const OfpGroupModFailedCode_OFPGMFC_CHAINED_GROUP = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_CHAINED_GROUP)
+const OfpGroupModFailedCode_OFPGMFC_BAD_TYPE = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_BAD_TYPE)
+const OfpGroupModFailedCode_OFPGMFC_BAD_COMMAND = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_BAD_COMMAND)
+const OfpGroupModFailedCode_OFPGMFC_BAD_BUCKET = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_BAD_BUCKET)
+const OfpGroupModFailedCode_OFPGMFC_BAD_WATCH = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_BAD_WATCH)
+const OfpGroupModFailedCode_OFPGMFC_EPERM = OfpGroupModFailedCode(openflow_13.OfpGroupModFailedCode_OFPGMFC_EPERM)
+
+// ofp_port_mod_failed_code from public import voltha_protos/openflow_13.proto
+type OfpPortModFailedCode = openflow_13.OfpPortModFailedCode
+
+var OfpPortModFailedCode_name = openflow_13.OfpPortModFailedCode_name
+var OfpPortModFailedCode_value = openflow_13.OfpPortModFailedCode_value
+
+const OfpPortModFailedCode_OFPPMFC_BAD_PORT = OfpPortModFailedCode(openflow_13.OfpPortModFailedCode_OFPPMFC_BAD_PORT)
+const OfpPortModFailedCode_OFPPMFC_BAD_HW_ADDR = OfpPortModFailedCode(openflow_13.OfpPortModFailedCode_OFPPMFC_BAD_HW_ADDR)
+const OfpPortModFailedCode_OFPPMFC_BAD_CONFIG = OfpPortModFailedCode(openflow_13.OfpPortModFailedCode_OFPPMFC_BAD_CONFIG)
+const OfpPortModFailedCode_OFPPMFC_BAD_ADVERTISE = OfpPortModFailedCode(openflow_13.OfpPortModFailedCode_OFPPMFC_BAD_ADVERTISE)
+const OfpPortModFailedCode_OFPPMFC_EPERM = OfpPortModFailedCode(openflow_13.OfpPortModFailedCode_OFPPMFC_EPERM)
+
+// ofp_table_mod_failed_code from public import voltha_protos/openflow_13.proto
+type OfpTableModFailedCode = openflow_13.OfpTableModFailedCode
+
+var OfpTableModFailedCode_name = openflow_13.OfpTableModFailedCode_name
+var OfpTableModFailedCode_value = openflow_13.OfpTableModFailedCode_value
+
+const OfpTableModFailedCode_OFPTMFC_BAD_TABLE = OfpTableModFailedCode(openflow_13.OfpTableModFailedCode_OFPTMFC_BAD_TABLE)
+const OfpTableModFailedCode_OFPTMFC_BAD_CONFIG = OfpTableModFailedCode(openflow_13.OfpTableModFailedCode_OFPTMFC_BAD_CONFIG)
+const OfpTableModFailedCode_OFPTMFC_EPERM = OfpTableModFailedCode(openflow_13.OfpTableModFailedCode_OFPTMFC_EPERM)
+
+// ofp_queue_op_failed_code from public import voltha_protos/openflow_13.proto
+type OfpQueueOpFailedCode = openflow_13.OfpQueueOpFailedCode
+
+var OfpQueueOpFailedCode_name = openflow_13.OfpQueueOpFailedCode_name
+var OfpQueueOpFailedCode_value = openflow_13.OfpQueueOpFailedCode_value
+
+const OfpQueueOpFailedCode_OFPQOFC_BAD_PORT = OfpQueueOpFailedCode(openflow_13.OfpQueueOpFailedCode_OFPQOFC_BAD_PORT)
+const OfpQueueOpFailedCode_OFPQOFC_BAD_QUEUE = OfpQueueOpFailedCode(openflow_13.OfpQueueOpFailedCode_OFPQOFC_BAD_QUEUE)
+const OfpQueueOpFailedCode_OFPQOFC_EPERM = OfpQueueOpFailedCode(openflow_13.OfpQueueOpFailedCode_OFPQOFC_EPERM)
+
+// ofp_switch_config_failed_code from public import voltha_protos/openflow_13.proto
+type OfpSwitchConfigFailedCode = openflow_13.OfpSwitchConfigFailedCode
+
+var OfpSwitchConfigFailedCode_name = openflow_13.OfpSwitchConfigFailedCode_name
+var OfpSwitchConfigFailedCode_value = openflow_13.OfpSwitchConfigFailedCode_value
+
+const OfpSwitchConfigFailedCode_OFPSCFC_BAD_FLAGS = OfpSwitchConfigFailedCode(openflow_13.OfpSwitchConfigFailedCode_OFPSCFC_BAD_FLAGS)
+const OfpSwitchConfigFailedCode_OFPSCFC_BAD_LEN = OfpSwitchConfigFailedCode(openflow_13.OfpSwitchConfigFailedCode_OFPSCFC_BAD_LEN)
+const OfpSwitchConfigFailedCode_OFPSCFC_EPERM = OfpSwitchConfigFailedCode(openflow_13.OfpSwitchConfigFailedCode_OFPSCFC_EPERM)
+
+// ofp_role_request_failed_code from public import voltha_protos/openflow_13.proto
+type OfpRoleRequestFailedCode = openflow_13.OfpRoleRequestFailedCode
+
+var OfpRoleRequestFailedCode_name = openflow_13.OfpRoleRequestFailedCode_name
+var OfpRoleRequestFailedCode_value = openflow_13.OfpRoleRequestFailedCode_value
+
+const OfpRoleRequestFailedCode_OFPRRFC_STALE = OfpRoleRequestFailedCode(openflow_13.OfpRoleRequestFailedCode_OFPRRFC_STALE)
+const OfpRoleRequestFailedCode_OFPRRFC_UNSUP = OfpRoleRequestFailedCode(openflow_13.OfpRoleRequestFailedCode_OFPRRFC_UNSUP)
+const OfpRoleRequestFailedCode_OFPRRFC_BAD_ROLE = OfpRoleRequestFailedCode(openflow_13.OfpRoleRequestFailedCode_OFPRRFC_BAD_ROLE)
+
+// ofp_meter_mod_failed_code from public import voltha_protos/openflow_13.proto
+type OfpMeterModFailedCode = openflow_13.OfpMeterModFailedCode
+
+var OfpMeterModFailedCode_name = openflow_13.OfpMeterModFailedCode_name
+var OfpMeterModFailedCode_value = openflow_13.OfpMeterModFailedCode_value
+
+const OfpMeterModFailedCode_OFPMMFC_UNKNOWN = OfpMeterModFailedCode(openflow_13.OfpMeterModFailedCode_OFPMMFC_UNKNOWN)
+const OfpMeterModFailedCode_OFPMMFC_METER_EXISTS = OfpMeterModFailedCode(openflow_13.OfpMeterModFailedCode_OFPMMFC_METER_EXISTS)
+const OfpMeterModFailedCode_OFPMMFC_INVALID_METER = OfpMeterModFailedCode(openflow_13.OfpMeterModFailedCode_OFPMMFC_INVALID_METER)
+const OfpMeterModFailedCode_OFPMMFC_UNKNOWN_METER = OfpMeterModFailedCode(openflow_13.OfpMeterModFailedCode_OFPMMFC_UNKNOWN_METER)
+const OfpMeterModFailedCode_OFPMMFC_BAD_COMMAND = OfpMeterModFailedCode(openflow_13.OfpMeterModFailedCode_OFPMMFC_BAD_COMMAND)
+const OfpMeterModFailedCode_OFPMMFC_BAD_FLAGS = OfpMeterModFailedCode(openflow_13.OfpMeterModFailedCode_OFPMMFC_BAD_FLAGS)
+const OfpMeterModFailedCode_OFPMMFC_BAD_RATE = OfpMeterModFailedCode(openflow_13.OfpMeterModFailedCode_OFPMMFC_BAD_RATE)
+const OfpMeterModFailedCode_OFPMMFC_BAD_BURST = OfpMeterModFailedCode(openflow_13.OfpMeterModFailedCode_OFPMMFC_BAD_BURST)
+const OfpMeterModFailedCode_OFPMMFC_BAD_BAND = OfpMeterModFailedCode(openflow_13.OfpMeterModFailedCode_OFPMMFC_BAD_BAND)
+const OfpMeterModFailedCode_OFPMMFC_BAD_BAND_VALUE = OfpMeterModFailedCode(openflow_13.OfpMeterModFailedCode_OFPMMFC_BAD_BAND_VALUE)
+const OfpMeterModFailedCode_OFPMMFC_OUT_OF_METERS = OfpMeterModFailedCode(openflow_13.OfpMeterModFailedCode_OFPMMFC_OUT_OF_METERS)
+const OfpMeterModFailedCode_OFPMMFC_OUT_OF_BANDS = OfpMeterModFailedCode(openflow_13.OfpMeterModFailedCode_OFPMMFC_OUT_OF_BANDS)
+
+// ofp_table_features_failed_code from public import voltha_protos/openflow_13.proto
+type OfpTableFeaturesFailedCode = openflow_13.OfpTableFeaturesFailedCode
+
+var OfpTableFeaturesFailedCode_name = openflow_13.OfpTableFeaturesFailedCode_name
+var OfpTableFeaturesFailedCode_value = openflow_13.OfpTableFeaturesFailedCode_value
+
+const OfpTableFeaturesFailedCode_OFPTFFC_BAD_TABLE = OfpTableFeaturesFailedCode(openflow_13.OfpTableFeaturesFailedCode_OFPTFFC_BAD_TABLE)
+const OfpTableFeaturesFailedCode_OFPTFFC_BAD_METADATA = OfpTableFeaturesFailedCode(openflow_13.OfpTableFeaturesFailedCode_OFPTFFC_BAD_METADATA)
+const OfpTableFeaturesFailedCode_OFPTFFC_BAD_TYPE = OfpTableFeaturesFailedCode(openflow_13.OfpTableFeaturesFailedCode_OFPTFFC_BAD_TYPE)
+const OfpTableFeaturesFailedCode_OFPTFFC_BAD_LEN = OfpTableFeaturesFailedCode(openflow_13.OfpTableFeaturesFailedCode_OFPTFFC_BAD_LEN)
+const OfpTableFeaturesFailedCode_OFPTFFC_BAD_ARGUMENT = OfpTableFeaturesFailedCode(openflow_13.OfpTableFeaturesFailedCode_OFPTFFC_BAD_ARGUMENT)
+const OfpTableFeaturesFailedCode_OFPTFFC_EPERM = OfpTableFeaturesFailedCode(openflow_13.OfpTableFeaturesFailedCode_OFPTFFC_EPERM)
+
+// ofp_multipart_type from public import voltha_protos/openflow_13.proto
+type OfpMultipartType = openflow_13.OfpMultipartType
+
+var OfpMultipartType_name = openflow_13.OfpMultipartType_name
+var OfpMultipartType_value = openflow_13.OfpMultipartType_value
+
+const OfpMultipartType_OFPMP_DESC = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_DESC)
+const OfpMultipartType_OFPMP_FLOW = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_FLOW)
+const OfpMultipartType_OFPMP_AGGREGATE = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_AGGREGATE)
+const OfpMultipartType_OFPMP_TABLE = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_TABLE)
+const OfpMultipartType_OFPMP_PORT_STATS = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_PORT_STATS)
+const OfpMultipartType_OFPMP_QUEUE = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_QUEUE)
+const OfpMultipartType_OFPMP_GROUP = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_GROUP)
+const OfpMultipartType_OFPMP_GROUP_DESC = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_GROUP_DESC)
+const OfpMultipartType_OFPMP_GROUP_FEATURES = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_GROUP_FEATURES)
+const OfpMultipartType_OFPMP_METER = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_METER)
+const OfpMultipartType_OFPMP_METER_CONFIG = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_METER_CONFIG)
+const OfpMultipartType_OFPMP_METER_FEATURES = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_METER_FEATURES)
+const OfpMultipartType_OFPMP_TABLE_FEATURES = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_TABLE_FEATURES)
+const OfpMultipartType_OFPMP_PORT_DESC = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_PORT_DESC)
+const OfpMultipartType_OFPMP_EXPERIMENTER = OfpMultipartType(openflow_13.OfpMultipartType_OFPMP_EXPERIMENTER)
+
+// ofp_multipart_request_flags from public import voltha_protos/openflow_13.proto
+type OfpMultipartRequestFlags = openflow_13.OfpMultipartRequestFlags
+
+var OfpMultipartRequestFlags_name = openflow_13.OfpMultipartRequestFlags_name
+var OfpMultipartRequestFlags_value = openflow_13.OfpMultipartRequestFlags_value
+
+const OfpMultipartRequestFlags_OFPMPF_REQ_INVALID = OfpMultipartRequestFlags(openflow_13.OfpMultipartRequestFlags_OFPMPF_REQ_INVALID)
+const OfpMultipartRequestFlags_OFPMPF_REQ_MORE = OfpMultipartRequestFlags(openflow_13.OfpMultipartRequestFlags_OFPMPF_REQ_MORE)
+
+// ofp_multipart_reply_flags from public import voltha_protos/openflow_13.proto
+type OfpMultipartReplyFlags = openflow_13.OfpMultipartReplyFlags
+
+var OfpMultipartReplyFlags_name = openflow_13.OfpMultipartReplyFlags_name
+var OfpMultipartReplyFlags_value = openflow_13.OfpMultipartReplyFlags_value
+
+const OfpMultipartReplyFlags_OFPMPF_REPLY_INVALID = OfpMultipartReplyFlags(openflow_13.OfpMultipartReplyFlags_OFPMPF_REPLY_INVALID)
+const OfpMultipartReplyFlags_OFPMPF_REPLY_MORE = OfpMultipartReplyFlags(openflow_13.OfpMultipartReplyFlags_OFPMPF_REPLY_MORE)
+
+// ofp_table_feature_prop_type from public import voltha_protos/openflow_13.proto
+type OfpTableFeaturePropType = openflow_13.OfpTableFeaturePropType
+
+var OfpTableFeaturePropType_name = openflow_13.OfpTableFeaturePropType_name
+var OfpTableFeaturePropType_value = openflow_13.OfpTableFeaturePropType_value
+
+const OfpTableFeaturePropType_OFPTFPT_INSTRUCTIONS = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_INSTRUCTIONS)
+const OfpTableFeaturePropType_OFPTFPT_INSTRUCTIONS_MISS = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_INSTRUCTIONS_MISS)
+const OfpTableFeaturePropType_OFPTFPT_NEXT_TABLES = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_NEXT_TABLES)
+const OfpTableFeaturePropType_OFPTFPT_NEXT_TABLES_MISS = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_NEXT_TABLES_MISS)
+const OfpTableFeaturePropType_OFPTFPT_WRITE_ACTIONS = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_WRITE_ACTIONS)
+const OfpTableFeaturePropType_OFPTFPT_WRITE_ACTIONS_MISS = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_WRITE_ACTIONS_MISS)
+const OfpTableFeaturePropType_OFPTFPT_APPLY_ACTIONS = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_APPLY_ACTIONS)
+const OfpTableFeaturePropType_OFPTFPT_APPLY_ACTIONS_MISS = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_APPLY_ACTIONS_MISS)
+const OfpTableFeaturePropType_OFPTFPT_MATCH = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_MATCH)
+const OfpTableFeaturePropType_OFPTFPT_WILDCARDS = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_WILDCARDS)
+const OfpTableFeaturePropType_OFPTFPT_WRITE_SETFIELD = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_WRITE_SETFIELD)
+const OfpTableFeaturePropType_OFPTFPT_WRITE_SETFIELD_MISS = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_WRITE_SETFIELD_MISS)
+const OfpTableFeaturePropType_OFPTFPT_APPLY_SETFIELD = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_APPLY_SETFIELD)
+const OfpTableFeaturePropType_OFPTFPT_APPLY_SETFIELD_MISS = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_APPLY_SETFIELD_MISS)
+const OfpTableFeaturePropType_OFPTFPT_EXPERIMENTER = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_EXPERIMENTER)
+const OfpTableFeaturePropType_OFPTFPT_EXPERIMENTER_MISS = OfpTableFeaturePropType(openflow_13.OfpTableFeaturePropType_OFPTFPT_EXPERIMENTER_MISS)
+
+// ofp_group_capabilities from public import voltha_protos/openflow_13.proto
+type OfpGroupCapabilities = openflow_13.OfpGroupCapabilities
+
+var OfpGroupCapabilities_name = openflow_13.OfpGroupCapabilities_name
+var OfpGroupCapabilities_value = openflow_13.OfpGroupCapabilities_value
+
+const OfpGroupCapabilities_OFPGFC_INVALID = OfpGroupCapabilities(openflow_13.OfpGroupCapabilities_OFPGFC_INVALID)
+const OfpGroupCapabilities_OFPGFC_SELECT_WEIGHT = OfpGroupCapabilities(openflow_13.OfpGroupCapabilities_OFPGFC_SELECT_WEIGHT)
+const OfpGroupCapabilities_OFPGFC_SELECT_LIVENESS = OfpGroupCapabilities(openflow_13.OfpGroupCapabilities_OFPGFC_SELECT_LIVENESS)
+const OfpGroupCapabilities_OFPGFC_CHAINING = OfpGroupCapabilities(openflow_13.OfpGroupCapabilities_OFPGFC_CHAINING)
+const OfpGroupCapabilities_OFPGFC_CHAINING_CHECKS = OfpGroupCapabilities(openflow_13.OfpGroupCapabilities_OFPGFC_CHAINING_CHECKS)
+
+// ofp_queue_properties from public import voltha_protos/openflow_13.proto
+type OfpQueueProperties = openflow_13.OfpQueueProperties
+
+var OfpQueueProperties_name = openflow_13.OfpQueueProperties_name
+var OfpQueueProperties_value = openflow_13.OfpQueueProperties_value
+
+const OfpQueueProperties_OFPQT_INVALID = OfpQueueProperties(openflow_13.OfpQueueProperties_OFPQT_INVALID)
+const OfpQueueProperties_OFPQT_MIN_RATE = OfpQueueProperties(openflow_13.OfpQueueProperties_OFPQT_MIN_RATE)
+const OfpQueueProperties_OFPQT_MAX_RATE = OfpQueueProperties(openflow_13.OfpQueueProperties_OFPQT_MAX_RATE)
+const OfpQueueProperties_OFPQT_EXPERIMENTER = OfpQueueProperties(openflow_13.OfpQueueProperties_OFPQT_EXPERIMENTER)
+
+// ofp_controller_role from public import voltha_protos/openflow_13.proto
+type OfpControllerRole = openflow_13.OfpControllerRole
+
+var OfpControllerRole_name = openflow_13.OfpControllerRole_name
+var OfpControllerRole_value = openflow_13.OfpControllerRole_value
+
+const OfpControllerRole_OFPCR_ROLE_NOCHANGE = OfpControllerRole(openflow_13.OfpControllerRole_OFPCR_ROLE_NOCHANGE)
+const OfpControllerRole_OFPCR_ROLE_EQUAL = OfpControllerRole(openflow_13.OfpControllerRole_OFPCR_ROLE_EQUAL)
+const OfpControllerRole_OFPCR_ROLE_MASTER = OfpControllerRole(openflow_13.OfpControllerRole_OFPCR_ROLE_MASTER)
+const OfpControllerRole_OFPCR_ROLE_SLAVE = OfpControllerRole(openflow_13.OfpControllerRole_OFPCR_ROLE_SLAVE)
+
+type AlarmFilterRuleKey_AlarmFilterRuleKey int32
+
+const (
+	AlarmFilterRuleKey_id          AlarmFilterRuleKey_AlarmFilterRuleKey = 0
+	AlarmFilterRuleKey_type        AlarmFilterRuleKey_AlarmFilterRuleKey = 1
+	AlarmFilterRuleKey_severity    AlarmFilterRuleKey_AlarmFilterRuleKey = 2
+	AlarmFilterRuleKey_resource_id AlarmFilterRuleKey_AlarmFilterRuleKey = 3
+	AlarmFilterRuleKey_category    AlarmFilterRuleKey_AlarmFilterRuleKey = 4
+	AlarmFilterRuleKey_device_id   AlarmFilterRuleKey_AlarmFilterRuleKey = 5
+)
+
+var AlarmFilterRuleKey_AlarmFilterRuleKey_name = map[int32]string{
+	0: "id",
+	1: "type",
+	2: "severity",
+	3: "resource_id",
+	4: "category",
+	5: "device_id",
+}
+var AlarmFilterRuleKey_AlarmFilterRuleKey_value = map[string]int32{
+	"id":          0,
+	"type":        1,
+	"severity":    2,
+	"resource_id": 3,
+	"category":    4,
+	"device_id":   5,
+}
+
+func (x AlarmFilterRuleKey_AlarmFilterRuleKey) String() string {
+	return proto.EnumName(AlarmFilterRuleKey_AlarmFilterRuleKey_name, int32(x))
+}
+func (AlarmFilterRuleKey_AlarmFilterRuleKey) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{2, 0}
+}
+
+type SelfTestResponse_SelfTestResult int32
+
+const (
+	SelfTestResponse_SUCCESS       SelfTestResponse_SelfTestResult = 0
+	SelfTestResponse_FAILURE       SelfTestResponse_SelfTestResult = 1
+	SelfTestResponse_NOT_SUPPORTED SelfTestResponse_SelfTestResult = 2
+	SelfTestResponse_UNKNOWN_ERROR SelfTestResponse_SelfTestResult = 3
+)
+
+var SelfTestResponse_SelfTestResult_name = map[int32]string{
+	0: "SUCCESS",
+	1: "FAILURE",
+	2: "NOT_SUPPORTED",
+	3: "UNKNOWN_ERROR",
+}
+var SelfTestResponse_SelfTestResult_value = map[string]int32{
+	"SUCCESS":       0,
+	"FAILURE":       1,
+	"NOT_SUPPORTED": 2,
+	"UNKNOWN_ERROR": 3,
+}
+
+func (x SelfTestResponse_SelfTestResult) String() string {
+	return proto.EnumName(SelfTestResponse_SelfTestResult_name, int32(x))
+}
+func (SelfTestResponse_SelfTestResult) EnumDescriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{10, 0}
+}
+
+type DeviceGroup struct {
+	Id                   string           `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	LogicalDevices       []*LogicalDevice `protobuf:"bytes,2,rep,name=logical_devices,json=logicalDevices,proto3" json:"logical_devices,omitempty"`
+	Devices              []*Device        `protobuf:"bytes,3,rep,name=devices,proto3" json:"devices,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
+}
+
+func (m *DeviceGroup) Reset()         { *m = DeviceGroup{} }
+func (m *DeviceGroup) String() string { return proto.CompactTextString(m) }
+func (*DeviceGroup) ProtoMessage()    {}
+func (*DeviceGroup) Descriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{0}
+}
+func (m *DeviceGroup) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_DeviceGroup.Unmarshal(m, b)
+}
+func (m *DeviceGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_DeviceGroup.Marshal(b, m, deterministic)
+}
+func (dst *DeviceGroup) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_DeviceGroup.Merge(dst, src)
+}
+func (m *DeviceGroup) XXX_Size() int {
+	return xxx_messageInfo_DeviceGroup.Size(m)
+}
+func (m *DeviceGroup) XXX_DiscardUnknown() {
+	xxx_messageInfo_DeviceGroup.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceGroup proto.InternalMessageInfo
+
+func (m *DeviceGroup) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *DeviceGroup) GetLogicalDevices() []*LogicalDevice {
+	if m != nil {
+		return m.LogicalDevices
+	}
+	return nil
+}
+
+func (m *DeviceGroup) GetDevices() []*Device {
+	if m != nil {
+		return m.Devices
+	}
+	return nil
+}
+
+type DeviceGroups struct {
+	Items                []*DeviceGroup `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
+	XXX_unrecognized     []byte         `json:"-"`
+	XXX_sizecache        int32          `json:"-"`
+}
+
+func (m *DeviceGroups) Reset()         { *m = DeviceGroups{} }
+func (m *DeviceGroups) String() string { return proto.CompactTextString(m) }
+func (*DeviceGroups) ProtoMessage()    {}
+func (*DeviceGroups) Descriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{1}
+}
+func (m *DeviceGroups) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_DeviceGroups.Unmarshal(m, b)
+}
+func (m *DeviceGroups) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_DeviceGroups.Marshal(b, m, deterministic)
+}
+func (dst *DeviceGroups) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_DeviceGroups.Merge(dst, src)
+}
+func (m *DeviceGroups) XXX_Size() int {
+	return xxx_messageInfo_DeviceGroups.Size(m)
+}
+func (m *DeviceGroups) XXX_DiscardUnknown() {
+	xxx_messageInfo_DeviceGroups.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceGroups proto.InternalMessageInfo
+
+func (m *DeviceGroups) GetItems() []*DeviceGroup {
+	if m != nil {
+		return m.Items
+	}
+	return nil
+}
+
+type AlarmFilterRuleKey struct {
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *AlarmFilterRuleKey) Reset()         { *m = AlarmFilterRuleKey{} }
+func (m *AlarmFilterRuleKey) String() string { return proto.CompactTextString(m) }
+func (*AlarmFilterRuleKey) ProtoMessage()    {}
+func (*AlarmFilterRuleKey) Descriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{2}
+}
+func (m *AlarmFilterRuleKey) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmFilterRuleKey.Unmarshal(m, b)
+}
+func (m *AlarmFilterRuleKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmFilterRuleKey.Marshal(b, m, deterministic)
+}
+func (dst *AlarmFilterRuleKey) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmFilterRuleKey.Merge(dst, src)
+}
+func (m *AlarmFilterRuleKey) XXX_Size() int {
+	return xxx_messageInfo_AlarmFilterRuleKey.Size(m)
+}
+func (m *AlarmFilterRuleKey) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmFilterRuleKey.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmFilterRuleKey proto.InternalMessageInfo
+
+type AlarmFilterRule struct {
+	Key                  AlarmFilterRuleKey_AlarmFilterRuleKey `protobuf:"varint,1,opt,name=key,proto3,enum=voltha.AlarmFilterRuleKey_AlarmFilterRuleKey" json:"key,omitempty"`
+	Value                string                                `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                              `json:"-"`
+	XXX_unrecognized     []byte                                `json:"-"`
+	XXX_sizecache        int32                                 `json:"-"`
+}
+
+func (m *AlarmFilterRule) Reset()         { *m = AlarmFilterRule{} }
+func (m *AlarmFilterRule) String() string { return proto.CompactTextString(m) }
+func (*AlarmFilterRule) ProtoMessage()    {}
+func (*AlarmFilterRule) Descriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{3}
+}
+func (m *AlarmFilterRule) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmFilterRule.Unmarshal(m, b)
+}
+func (m *AlarmFilterRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmFilterRule.Marshal(b, m, deterministic)
+}
+func (dst *AlarmFilterRule) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmFilterRule.Merge(dst, src)
+}
+func (m *AlarmFilterRule) XXX_Size() int {
+	return xxx_messageInfo_AlarmFilterRule.Size(m)
+}
+func (m *AlarmFilterRule) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmFilterRule.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmFilterRule proto.InternalMessageInfo
+
+func (m *AlarmFilterRule) GetKey() AlarmFilterRuleKey_AlarmFilterRuleKey {
+	if m != nil {
+		return m.Key
+	}
+	return AlarmFilterRuleKey_id
+}
+
+func (m *AlarmFilterRule) GetValue() string {
+	if m != nil {
+		return m.Value
+	}
+	return ""
+}
+
+type AlarmFilter struct {
+	Id                   string             `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+	Rules                []*AlarmFilterRule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
+	XXX_unrecognized     []byte             `json:"-"`
+	XXX_sizecache        int32              `json:"-"`
+}
+
+func (m *AlarmFilter) Reset()         { *m = AlarmFilter{} }
+func (m *AlarmFilter) String() string { return proto.CompactTextString(m) }
+func (*AlarmFilter) ProtoMessage()    {}
+func (*AlarmFilter) Descriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{4}
+}
+func (m *AlarmFilter) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmFilter.Unmarshal(m, b)
+}
+func (m *AlarmFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmFilter.Marshal(b, m, deterministic)
+}
+func (dst *AlarmFilter) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmFilter.Merge(dst, src)
+}
+func (m *AlarmFilter) XXX_Size() int {
+	return xxx_messageInfo_AlarmFilter.Size(m)
+}
+func (m *AlarmFilter) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmFilter.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmFilter proto.InternalMessageInfo
+
+func (m *AlarmFilter) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func (m *AlarmFilter) GetRules() []*AlarmFilterRule {
+	if m != nil {
+		return m.Rules
+	}
+	return nil
+}
+
+type AlarmFilters struct {
+	Filters              []*AlarmFilter `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
+	XXX_unrecognized     []byte         `json:"-"`
+	XXX_sizecache        int32          `json:"-"`
+}
+
+func (m *AlarmFilters) Reset()         { *m = AlarmFilters{} }
+func (m *AlarmFilters) String() string { return proto.CompactTextString(m) }
+func (*AlarmFilters) ProtoMessage()    {}
+func (*AlarmFilters) Descriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{5}
+}
+func (m *AlarmFilters) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_AlarmFilters.Unmarshal(m, b)
+}
+func (m *AlarmFilters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_AlarmFilters.Marshal(b, m, deterministic)
+}
+func (dst *AlarmFilters) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_AlarmFilters.Merge(dst, src)
+}
+func (m *AlarmFilters) XXX_Size() int {
+	return xxx_messageInfo_AlarmFilters.Size(m)
+}
+func (m *AlarmFilters) XXX_DiscardUnknown() {
+	xxx_messageInfo_AlarmFilters.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AlarmFilters proto.InternalMessageInfo
+
+func (m *AlarmFilters) GetFilters() []*AlarmFilter {
+	if m != nil {
+		return m.Filters
+	}
+	return nil
+}
+
+type Logging struct {
+	Level                common.LogLevel_LogLevel `protobuf:"varint,1,opt,name=level,proto3,enum=voltha.LogLevel_LogLevel" json:"level,omitempty"`
+	PackageName          string                   `protobuf:"bytes,2,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
+	XXX_unrecognized     []byte                   `json:"-"`
+	XXX_sizecache        int32                    `json:"-"`
+}
+
+func (m *Logging) Reset()         { *m = Logging{} }
+func (m *Logging) String() string { return proto.CompactTextString(m) }
+func (*Logging) ProtoMessage()    {}
+func (*Logging) Descriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{6}
+}
+func (m *Logging) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Logging.Unmarshal(m, b)
+}
+func (m *Logging) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Logging.Marshal(b, m, deterministic)
+}
+func (dst *Logging) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Logging.Merge(dst, src)
+}
+func (m *Logging) XXX_Size() int {
+	return xxx_messageInfo_Logging.Size(m)
+}
+func (m *Logging) XXX_DiscardUnknown() {
+	xxx_messageInfo_Logging.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Logging proto.InternalMessageInfo
+
+func (m *Logging) GetLevel() common.LogLevel_LogLevel {
+	if m != nil {
+		return m.Level
+	}
+	return common.LogLevel_DEBUG
+}
+
+func (m *Logging) GetPackageName() string {
+	if m != nil {
+		return m.PackageName
+	}
+	return ""
+}
+
+// CoreInstance represents a core instance.  It is data held in memory when a core
+// is running.  This data is not persistent.
+type CoreInstance struct {
+	InstanceId           string        `protobuf:"bytes,1,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"`
+	Health               *HealthStatus `protobuf:"bytes,2,opt,name=health,proto3" json:"health,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
+	XXX_unrecognized     []byte        `json:"-"`
+	XXX_sizecache        int32         `json:"-"`
+}
+
+func (m *CoreInstance) Reset()         { *m = CoreInstance{} }
+func (m *CoreInstance) String() string { return proto.CompactTextString(m) }
+func (*CoreInstance) ProtoMessage()    {}
+func (*CoreInstance) Descriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{7}
+}
+func (m *CoreInstance) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_CoreInstance.Unmarshal(m, b)
+}
+func (m *CoreInstance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_CoreInstance.Marshal(b, m, deterministic)
+}
+func (dst *CoreInstance) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_CoreInstance.Merge(dst, src)
+}
+func (m *CoreInstance) XXX_Size() int {
+	return xxx_messageInfo_CoreInstance.Size(m)
+}
+func (m *CoreInstance) XXX_DiscardUnknown() {
+	xxx_messageInfo_CoreInstance.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CoreInstance proto.InternalMessageInfo
+
+func (m *CoreInstance) GetInstanceId() string {
+	if m != nil {
+		return m.InstanceId
+	}
+	return ""
+}
+
+func (m *CoreInstance) GetHealth() *HealthStatus {
+	if m != nil {
+		return m.Health
+	}
+	return nil
+}
+
+type CoreInstances struct {
+	Items                []*CoreInstance `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
+	XXX_unrecognized     []byte          `json:"-"`
+	XXX_sizecache        int32           `json:"-"`
+}
+
+func (m *CoreInstances) Reset()         { *m = CoreInstances{} }
+func (m *CoreInstances) String() string { return proto.CompactTextString(m) }
+func (*CoreInstances) ProtoMessage()    {}
+func (*CoreInstances) Descriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{8}
+}
+func (m *CoreInstances) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_CoreInstances.Unmarshal(m, b)
+}
+func (m *CoreInstances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_CoreInstances.Marshal(b, m, deterministic)
+}
+func (dst *CoreInstances) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_CoreInstances.Merge(dst, src)
+}
+func (m *CoreInstances) XXX_Size() int {
+	return xxx_messageInfo_CoreInstances.Size(m)
+}
+func (m *CoreInstances) XXX_DiscardUnknown() {
+	xxx_messageInfo_CoreInstances.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CoreInstances proto.InternalMessageInfo
+
+func (m *CoreInstances) GetItems() []*CoreInstance {
+	if m != nil {
+		return m.Items
+	}
+	return nil
+}
+
+// Voltha represents the Voltha cluster data.  Each Core instance will hold a subset of
+// the entire cluster. However, some items (e.g. adapters) will be held by all cores
+// for better performance
+type Voltha struct {
+	Version              string                  `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
+	Adapters             []*Adapter              `protobuf:"bytes,2,rep,name=adapters,proto3" json:"adapters,omitempty"`
+	LogicalDevices       []*LogicalDevice        `protobuf:"bytes,3,rep,name=logical_devices,json=logicalDevices,proto3" json:"logical_devices,omitempty"`
+	Devices              []*Device               `protobuf:"bytes,4,rep,name=devices,proto3" json:"devices,omitempty"`
+	DeviceTypes          []*DeviceType           `protobuf:"bytes,5,rep,name=device_types,json=deviceTypes,proto3" json:"device_types,omitempty"`
+	DeviceGroups         []*DeviceGroup          `protobuf:"bytes,6,rep,name=device_groups,json=deviceGroups,proto3" json:"device_groups,omitempty"`
+	AlarmFilters         []*AlarmFilter          `protobuf:"bytes,7,rep,name=alarm_filters,json=alarmFilters,proto3" json:"alarm_filters,omitempty"`
+	OmciMibDatabase      []*omci.MibDeviceData   `protobuf:"bytes,28,rep,name=omci_mib_database,json=omciMibDatabase,proto3" json:"omci_mib_database,omitempty"`
+	OmciAlarmDatabase    []*omci.AlarmDeviceData `protobuf:"bytes,29,rep,name=omci_alarm_database,json=omciAlarmDatabase,proto3" json:"omci_alarm_database,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
+	XXX_unrecognized     []byte                  `json:"-"`
+	XXX_sizecache        int32                   `json:"-"`
+}
+
+func (m *Voltha) Reset()         { *m = Voltha{} }
+func (m *Voltha) String() string { return proto.CompactTextString(m) }
+func (*Voltha) ProtoMessage()    {}
+func (*Voltha) Descriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{9}
+}
+func (m *Voltha) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Voltha.Unmarshal(m, b)
+}
+func (m *Voltha) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Voltha.Marshal(b, m, deterministic)
+}
+func (dst *Voltha) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Voltha.Merge(dst, src)
+}
+func (m *Voltha) XXX_Size() int {
+	return xxx_messageInfo_Voltha.Size(m)
+}
+func (m *Voltha) XXX_DiscardUnknown() {
+	xxx_messageInfo_Voltha.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Voltha proto.InternalMessageInfo
+
+func (m *Voltha) GetVersion() string {
+	if m != nil {
+		return m.Version
+	}
+	return ""
+}
+
+func (m *Voltha) GetAdapters() []*Adapter {
+	if m != nil {
+		return m.Adapters
+	}
+	return nil
+}
+
+func (m *Voltha) GetLogicalDevices() []*LogicalDevice {
+	if m != nil {
+		return m.LogicalDevices
+	}
+	return nil
+}
+
+func (m *Voltha) GetDevices() []*Device {
+	if m != nil {
+		return m.Devices
+	}
+	return nil
+}
+
+func (m *Voltha) GetDeviceTypes() []*DeviceType {
+	if m != nil {
+		return m.DeviceTypes
+	}
+	return nil
+}
+
+func (m *Voltha) GetDeviceGroups() []*DeviceGroup {
+	if m != nil {
+		return m.DeviceGroups
+	}
+	return nil
+}
+
+func (m *Voltha) GetAlarmFilters() []*AlarmFilter {
+	if m != nil {
+		return m.AlarmFilters
+	}
+	return nil
+}
+
+func (m *Voltha) GetOmciMibDatabase() []*omci.MibDeviceData {
+	if m != nil {
+		return m.OmciMibDatabase
+	}
+	return nil
+}
+
+func (m *Voltha) GetOmciAlarmDatabase() []*omci.AlarmDeviceData {
+	if m != nil {
+		return m.OmciAlarmDatabase
+	}
+	return nil
+}
+
+// Device Self Test Response
+type SelfTestResponse struct {
+	Result               SelfTestResponse_SelfTestResult `protobuf:"varint,1,opt,name=result,proto3,enum=voltha.SelfTestResponse_SelfTestResult" json:"result,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}                        `json:"-"`
+	XXX_unrecognized     []byte                          `json:"-"`
+	XXX_sizecache        int32                           `json:"-"`
+}
+
+func (m *SelfTestResponse) Reset()         { *m = SelfTestResponse{} }
+func (m *SelfTestResponse) String() string { return proto.CompactTextString(m) }
+func (*SelfTestResponse) ProtoMessage()    {}
+func (*SelfTestResponse) Descriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{10}
+}
+func (m *SelfTestResponse) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_SelfTestResponse.Unmarshal(m, b)
+}
+func (m *SelfTestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_SelfTestResponse.Marshal(b, m, deterministic)
+}
+func (dst *SelfTestResponse) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_SelfTestResponse.Merge(dst, src)
+}
+func (m *SelfTestResponse) XXX_Size() int {
+	return xxx_messageInfo_SelfTestResponse.Size(m)
+}
+func (m *SelfTestResponse) XXX_DiscardUnknown() {
+	xxx_messageInfo_SelfTestResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SelfTestResponse proto.InternalMessageInfo
+
+func (m *SelfTestResponse) GetResult() SelfTestResponse_SelfTestResult {
+	if m != nil {
+		return m.Result
+	}
+	return SelfTestResponse_SUCCESS
+}
+
+type OfAgentSubscriber struct {
+	// ID of ofagent instance
+	OfagentId string `protobuf:"bytes,1,opt,name=ofagent_id,json=ofagentId,proto3" json:"ofagent_id,omitempty"`
+	// ID of voltha instance to which the ofagent is subscribed
+	VolthaId             string   `protobuf:"bytes,2,opt,name=voltha_id,json=volthaId,proto3" json:"voltha_id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *OfAgentSubscriber) Reset()         { *m = OfAgentSubscriber{} }
+func (m *OfAgentSubscriber) String() string { return proto.CompactTextString(m) }
+func (*OfAgentSubscriber) ProtoMessage()    {}
+func (*OfAgentSubscriber) Descriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{11}
+}
+func (m *OfAgentSubscriber) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_OfAgentSubscriber.Unmarshal(m, b)
+}
+func (m *OfAgentSubscriber) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_OfAgentSubscriber.Marshal(b, m, deterministic)
+}
+func (dst *OfAgentSubscriber) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_OfAgentSubscriber.Merge(dst, src)
+}
+func (m *OfAgentSubscriber) XXX_Size() int {
+	return xxx_messageInfo_OfAgentSubscriber.Size(m)
+}
+func (m *OfAgentSubscriber) XXX_DiscardUnknown() {
+	xxx_messageInfo_OfAgentSubscriber.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OfAgentSubscriber proto.InternalMessageInfo
+
+func (m *OfAgentSubscriber) GetOfagentId() string {
+	if m != nil {
+		return m.OfagentId
+	}
+	return ""
+}
+
+func (m *OfAgentSubscriber) GetVolthaId() string {
+	if m != nil {
+		return m.VolthaId
+	}
+	return ""
+}
+
+// Identifies a membership group a Core belongs to
+type Membership struct {
+	//  Group name
+	GroupName string `protobuf:"bytes,1,opt,name=group_name,json=groupName,proto3" json:"group_name,omitempty"`
+	// Unique ID of a container within that group
+	Id                   string   `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Membership) Reset()         { *m = Membership{} }
+func (m *Membership) String() string { return proto.CompactTextString(m) }
+func (*Membership) ProtoMessage()    {}
+func (*Membership) Descriptor() ([]byte, []int) {
+	return fileDescriptor_voltha_1f7600b5a75eb6d1, []int{12}
+}
+func (m *Membership) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Membership.Unmarshal(m, b)
+}
+func (m *Membership) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Membership.Marshal(b, m, deterministic)
+}
+func (dst *Membership) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Membership.Merge(dst, src)
+}
+func (m *Membership) XXX_Size() int {
+	return xxx_messageInfo_Membership.Size(m)
+}
+func (m *Membership) XXX_DiscardUnknown() {
+	xxx_messageInfo_Membership.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Membership proto.InternalMessageInfo
+
+func (m *Membership) GetGroupName() string {
+	if m != nil {
+		return m.GroupName
+	}
+	return ""
+}
+
+func (m *Membership) GetId() string {
+	if m != nil {
+		return m.Id
+	}
+	return ""
+}
+
+func init() {
+	proto.RegisterType((*DeviceGroup)(nil), "voltha.DeviceGroup")
+	proto.RegisterType((*DeviceGroups)(nil), "voltha.DeviceGroups")
+	proto.RegisterType((*AlarmFilterRuleKey)(nil), "voltha.AlarmFilterRuleKey")
+	proto.RegisterType((*AlarmFilterRule)(nil), "voltha.AlarmFilterRule")
+	proto.RegisterType((*AlarmFilter)(nil), "voltha.AlarmFilter")
+	proto.RegisterType((*AlarmFilters)(nil), "voltha.AlarmFilters")
+	proto.RegisterType((*Logging)(nil), "voltha.Logging")
+	proto.RegisterType((*CoreInstance)(nil), "voltha.CoreInstance")
+	proto.RegisterType((*CoreInstances)(nil), "voltha.CoreInstances")
+	proto.RegisterType((*Voltha)(nil), "voltha.Voltha")
+	proto.RegisterType((*SelfTestResponse)(nil), "voltha.SelfTestResponse")
+	proto.RegisterType((*OfAgentSubscriber)(nil), "voltha.OfAgentSubscriber")
+	proto.RegisterType((*Membership)(nil), "voltha.Membership")
+	proto.RegisterEnum("voltha.AlarmFilterRuleKey_AlarmFilterRuleKey", AlarmFilterRuleKey_AlarmFilterRuleKey_name, AlarmFilterRuleKey_AlarmFilterRuleKey_value)
+	proto.RegisterEnum("voltha.SelfTestResponse_SelfTestResult", SelfTestResponse_SelfTestResult_name, SelfTestResponse_SelfTestResult_value)
+}
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ context.Context
+var _ grpc.ClientConn
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+const _ = grpc.SupportPackageIsVersion4
+
+// VolthaServiceClient is the client API for VolthaService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
+type VolthaServiceClient interface {
+	// Get more information on a given physical device
+	UpdateLogLevel(ctx context.Context, in *Logging, opts ...grpc.CallOption) (*empty.Empty, error)
+	// Get the membership group of a Voltha Core
+	GetMembership(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Membership, error)
+	// Set the membership group of a Voltha Core
+	UpdateMembership(ctx context.Context, in *Membership, opts ...grpc.CallOption) (*empty.Empty, error)
+	// Get high level information on the Voltha cluster
+	GetVoltha(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Voltha, error)
+	// List all Voltha cluster core instances
+	ListCoreInstances(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CoreInstances, error)
+	// Get details on a Voltha cluster instance
+	GetCoreInstance(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*CoreInstance, error)
+	// List all active adapters (plugins) in the Voltha cluster
+	ListAdapters(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Adapters, error)
+	// List all logical devices managed by the Voltha cluster
+	ListLogicalDevices(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*LogicalDevices, error)
+	// Get additional information on a given logical device
+	GetLogicalDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*LogicalDevice, error)
+	// List ports of a logical device
+	ListLogicalDevicePorts(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*LogicalPorts, error)
+	// Gets a logical device port
+	GetLogicalDevicePort(ctx context.Context, in *LogicalPortId, opts ...grpc.CallOption) (*LogicalPort, error)
+	// Enables a logical device port
+	EnableLogicalDevicePort(ctx context.Context, in *LogicalPortId, opts ...grpc.CallOption) (*empty.Empty, error)
+	// Disables a logical device port
+	DisableLogicalDevicePort(ctx context.Context, in *LogicalPortId, opts ...grpc.CallOption) (*empty.Empty, error)
+	// List all flows of a logical device
+	ListLogicalDeviceFlows(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.Flows, error)
+	// Update flow table for logical device
+	UpdateLogicalDeviceFlowTable(ctx context.Context, in *openflow_13.FlowTableUpdate, opts ...grpc.CallOption) (*empty.Empty, error)
+	// Update meter table for logical device
+	UpdateLogicalDeviceMeterTable(ctx context.Context, in *openflow_13.MeterModUpdate, opts ...grpc.CallOption) (*empty.Empty, error)
+	// Get all meter stats for logical device
+	GetMeterStatsOfLogicalDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.MeterStatsReply, error)
+	// List all flow groups of a logical device
+	ListLogicalDeviceFlowGroups(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.FlowGroups, error)
+	// Update group table for device
+	UpdateLogicalDeviceFlowGroupTable(ctx context.Context, in *openflow_13.FlowGroupTableUpdate, opts ...grpc.CallOption) (*empty.Empty, error)
+	// List all physical devices controlled by the Voltha cluster
+	ListDevices(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Devices, error)
+	// List all physical devices IDs controlled by the Voltha cluster
+	ListDeviceIds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.IDs, error)
+	// Request to a voltha Core to reconcile a set of devices based on their IDs
+	ReconcileDevices(ctx context.Context, in *common.IDs, opts ...grpc.CallOption) (*empty.Empty, error)
+	// Get more information on a given physical device
+	GetDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Device, error)
+	// Pre-provision a new physical device
+	CreateDevice(ctx context.Context, in *Device, opts ...grpc.CallOption) (*Device, error)
+	// Enable a device.  If the device was in pre-provisioned state then it
+	// will transition to ENABLED state.  If it was is DISABLED state then it
+	// will transition to ENABLED state as well.
+	EnableDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error)
+	// Disable a device
+	DisableDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error)
+	// Reboot a device
+	RebootDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error)
+	// Delete a device
+	DeleteDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error)
+	// Request an image download to the standby partition
+	// of a device.
+	// Note that the call is expected to be non-blocking.
+	DownloadImage(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*common.OperationResp, error)
+	// Get image download status on a device
+	// The request retrieves progress on device and updates db record
+	GetImageDownloadStatus(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*ImageDownload, error)
+	// Get image download db record
+	GetImageDownload(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*ImageDownload, error)
+	// List image download db records for a given device
+	ListImageDownloads(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*ImageDownloads, error)
+	// Cancel an existing image download process on a device
+	CancelImageDownload(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*common.OperationResp, error)
+	// Activate the specified image at a standby partition
+	// to active partition.
+	// Depending on the device implementation, this call
+	// may or may not cause device reboot.
+	// If no reboot, then a reboot is required to make the
+	// activated image running on device
+	// Note that the call is expected to be non-blocking.
+	ActivateImageUpdate(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*common.OperationResp, error)
+	// Revert the specified image at standby partition
+	// to active partition, and revert to previous image
+	// Depending on the device implementation, this call
+	// may or may not cause device reboot.
+	// If no reboot, then a reboot is required to make the
+	// previous image running on device
+	// Note that the call is expected to be non-blocking.
+	RevertImageUpdate(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*common.OperationResp, error)
+	// List ports of a device
+	ListDevicePorts(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Ports, error)
+	// List pm config of a device
+	ListDevicePmConfigs(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*PmConfigs, error)
+	// Update the pm config of a device
+	UpdateDevicePmConfigs(ctx context.Context, in *PmConfigs, opts ...grpc.CallOption) (*empty.Empty, error)
+	// List all flows of a device
+	ListDeviceFlows(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.Flows, error)
+	// List all flow groups of a device
+	ListDeviceFlowGroups(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.FlowGroups, error)
+	// List device types known to Voltha
+	ListDeviceTypes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*DeviceTypes, error)
+	// Get additional information on a device type
+	GetDeviceType(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*DeviceType, error)
+	// List all device sharding groups
+	ListDeviceGroups(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*DeviceGroups, error)
+	// Stream control packets to the dataplane
+	StreamPacketsOut(ctx context.Context, opts ...grpc.CallOption) (VolthaService_StreamPacketsOutClient, error)
+	// Receive control packet stream
+	ReceivePacketsIn(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (VolthaService_ReceivePacketsInClient, error)
+	ReceiveChangeEvents(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (VolthaService_ReceiveChangeEventsClient, error)
+	// Get additional information on a device group
+	GetDeviceGroup(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*DeviceGroup, error)
+	CreateAlarmFilter(ctx context.Context, in *AlarmFilter, opts ...grpc.CallOption) (*AlarmFilter, error)
+	GetAlarmFilter(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*AlarmFilter, error)
+	UpdateAlarmFilter(ctx context.Context, in *AlarmFilter, opts ...grpc.CallOption) (*AlarmFilter, error)
+	DeleteAlarmFilter(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error)
+	ListAlarmFilters(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*AlarmFilters, error)
+	GetImages(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Images, error)
+	SelfTest(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*SelfTestResponse, error)
+	// OpenOMCI MIB information
+	GetMibDeviceData(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*omci.MibDeviceData, error)
+	// OpenOMCI ALARM information
+	GetAlarmDeviceData(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*omci.AlarmDeviceData, error)
+	// Simulate an Alarm
+	SimulateAlarm(ctx context.Context, in *SimulateAlarmRequest, opts ...grpc.CallOption) (*common.OperationResp, error)
+	Subscribe(ctx context.Context, in *OfAgentSubscriber, opts ...grpc.CallOption) (*OfAgentSubscriber, error)
+}
+
+type volthaServiceClient struct {
+	cc *grpc.ClientConn
+}
+
+func NewVolthaServiceClient(cc *grpc.ClientConn) VolthaServiceClient {
+	return &volthaServiceClient{cc}
+}
+
+func (c *volthaServiceClient) UpdateLogLevel(ctx context.Context, in *Logging, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/UpdateLogLevel", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) GetMembership(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Membership, error) {
+	out := new(Membership)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetMembership", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) UpdateMembership(ctx context.Context, in *Membership, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/UpdateMembership", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) GetVoltha(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Voltha, error) {
+	out := new(Voltha)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetVoltha", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListCoreInstances(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CoreInstances, error) {
+	out := new(CoreInstances)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListCoreInstances", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) GetCoreInstance(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*CoreInstance, error) {
+	out := new(CoreInstance)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetCoreInstance", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListAdapters(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Adapters, error) {
+	out := new(Adapters)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListAdapters", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListLogicalDevices(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*LogicalDevices, error) {
+	out := new(LogicalDevices)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListLogicalDevices", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) GetLogicalDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*LogicalDevice, error) {
+	out := new(LogicalDevice)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetLogicalDevice", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListLogicalDevicePorts(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*LogicalPorts, error) {
+	out := new(LogicalPorts)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListLogicalDevicePorts", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) GetLogicalDevicePort(ctx context.Context, in *LogicalPortId, opts ...grpc.CallOption) (*LogicalPort, error) {
+	out := new(LogicalPort)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetLogicalDevicePort", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) EnableLogicalDevicePort(ctx context.Context, in *LogicalPortId, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/EnableLogicalDevicePort", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) DisableLogicalDevicePort(ctx context.Context, in *LogicalPortId, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/DisableLogicalDevicePort", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListLogicalDeviceFlows(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.Flows, error) {
+	out := new(openflow_13.Flows)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListLogicalDeviceFlows", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) UpdateLogicalDeviceFlowTable(ctx context.Context, in *openflow_13.FlowTableUpdate, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/UpdateLogicalDeviceFlowTable", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) UpdateLogicalDeviceMeterTable(ctx context.Context, in *openflow_13.MeterModUpdate, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/UpdateLogicalDeviceMeterTable", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) GetMeterStatsOfLogicalDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.MeterStatsReply, error) {
+	out := new(openflow_13.MeterStatsReply)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetMeterStatsOfLogicalDevice", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListLogicalDeviceFlowGroups(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.FlowGroups, error) {
+	out := new(openflow_13.FlowGroups)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListLogicalDeviceFlowGroups", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) UpdateLogicalDeviceFlowGroupTable(ctx context.Context, in *openflow_13.FlowGroupTableUpdate, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/UpdateLogicalDeviceFlowGroupTable", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListDevices(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Devices, error) {
+	out := new(Devices)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListDevices", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListDeviceIds(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.IDs, error) {
+	out := new(common.IDs)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListDeviceIds", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ReconcileDevices(ctx context.Context, in *common.IDs, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ReconcileDevices", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) GetDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Device, error) {
+	out := new(Device)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetDevice", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) CreateDevice(ctx context.Context, in *Device, opts ...grpc.CallOption) (*Device, error) {
+	out := new(Device)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/CreateDevice", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) EnableDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/EnableDevice", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) DisableDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/DisableDevice", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) RebootDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/RebootDevice", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) DeleteDevice(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/DeleteDevice", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) DownloadImage(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*common.OperationResp, error) {
+	out := new(common.OperationResp)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/DownloadImage", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) GetImageDownloadStatus(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*ImageDownload, error) {
+	out := new(ImageDownload)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetImageDownloadStatus", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) GetImageDownload(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*ImageDownload, error) {
+	out := new(ImageDownload)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetImageDownload", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListImageDownloads(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*ImageDownloads, error) {
+	out := new(ImageDownloads)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListImageDownloads", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) CancelImageDownload(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*common.OperationResp, error) {
+	out := new(common.OperationResp)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/CancelImageDownload", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ActivateImageUpdate(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*common.OperationResp, error) {
+	out := new(common.OperationResp)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ActivateImageUpdate", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) RevertImageUpdate(ctx context.Context, in *ImageDownload, opts ...grpc.CallOption) (*common.OperationResp, error) {
+	out := new(common.OperationResp)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/RevertImageUpdate", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListDevicePorts(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Ports, error) {
+	out := new(Ports)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListDevicePorts", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListDevicePmConfigs(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*PmConfigs, error) {
+	out := new(PmConfigs)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListDevicePmConfigs", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) UpdateDevicePmConfigs(ctx context.Context, in *PmConfigs, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/UpdateDevicePmConfigs", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListDeviceFlows(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.Flows, error) {
+	out := new(openflow_13.Flows)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListDeviceFlows", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListDeviceFlowGroups(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*openflow_13.FlowGroups, error) {
+	out := new(openflow_13.FlowGroups)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListDeviceFlowGroups", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListDeviceTypes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*DeviceTypes, error) {
+	out := new(DeviceTypes)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListDeviceTypes", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) GetDeviceType(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*DeviceType, error) {
+	out := new(DeviceType)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetDeviceType", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListDeviceGroups(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*DeviceGroups, error) {
+	out := new(DeviceGroups)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListDeviceGroups", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) StreamPacketsOut(ctx context.Context, opts ...grpc.CallOption) (VolthaService_StreamPacketsOutClient, error) {
+	stream, err := c.cc.NewStream(ctx, &_VolthaService_serviceDesc.Streams[0], "/voltha.VolthaService/StreamPacketsOut", opts...)
+	if err != nil {
+		return nil, err
+	}
+	x := &volthaServiceStreamPacketsOutClient{stream}
+	return x, nil
+}
+
+type VolthaService_StreamPacketsOutClient interface {
+	Send(*openflow_13.PacketOut) error
+	CloseAndRecv() (*empty.Empty, error)
+	grpc.ClientStream
+}
+
+type volthaServiceStreamPacketsOutClient struct {
+	grpc.ClientStream
+}
+
+func (x *volthaServiceStreamPacketsOutClient) Send(m *openflow_13.PacketOut) error {
+	return x.ClientStream.SendMsg(m)
+}
+
+func (x *volthaServiceStreamPacketsOutClient) CloseAndRecv() (*empty.Empty, error) {
+	if err := x.ClientStream.CloseSend(); err != nil {
+		return nil, err
+	}
+	m := new(empty.Empty)
+	if err := x.ClientStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+func (c *volthaServiceClient) ReceivePacketsIn(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (VolthaService_ReceivePacketsInClient, error) {
+	stream, err := c.cc.NewStream(ctx, &_VolthaService_serviceDesc.Streams[1], "/voltha.VolthaService/ReceivePacketsIn", opts...)
+	if err != nil {
+		return nil, err
+	}
+	x := &volthaServiceReceivePacketsInClient{stream}
+	if err := x.ClientStream.SendMsg(in); err != nil {
+		return nil, err
+	}
+	if err := x.ClientStream.CloseSend(); err != nil {
+		return nil, err
+	}
+	return x, nil
+}
+
+type VolthaService_ReceivePacketsInClient interface {
+	Recv() (*openflow_13.PacketIn, error)
+	grpc.ClientStream
+}
+
+type volthaServiceReceivePacketsInClient struct {
+	grpc.ClientStream
+}
+
+func (x *volthaServiceReceivePacketsInClient) Recv() (*openflow_13.PacketIn, error) {
+	m := new(openflow_13.PacketIn)
+	if err := x.ClientStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+func (c *volthaServiceClient) ReceiveChangeEvents(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (VolthaService_ReceiveChangeEventsClient, error) {
+	stream, err := c.cc.NewStream(ctx, &_VolthaService_serviceDesc.Streams[2], "/voltha.VolthaService/ReceiveChangeEvents", opts...)
+	if err != nil {
+		return nil, err
+	}
+	x := &volthaServiceReceiveChangeEventsClient{stream}
+	if err := x.ClientStream.SendMsg(in); err != nil {
+		return nil, err
+	}
+	if err := x.ClientStream.CloseSend(); err != nil {
+		return nil, err
+	}
+	return x, nil
+}
+
+type VolthaService_ReceiveChangeEventsClient interface {
+	Recv() (*openflow_13.ChangeEvent, error)
+	grpc.ClientStream
+}
+
+type volthaServiceReceiveChangeEventsClient struct {
+	grpc.ClientStream
+}
+
+func (x *volthaServiceReceiveChangeEventsClient) Recv() (*openflow_13.ChangeEvent, error) {
+	m := new(openflow_13.ChangeEvent)
+	if err := x.ClientStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+func (c *volthaServiceClient) GetDeviceGroup(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*DeviceGroup, error) {
+	out := new(DeviceGroup)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetDeviceGroup", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) CreateAlarmFilter(ctx context.Context, in *AlarmFilter, opts ...grpc.CallOption) (*AlarmFilter, error) {
+	out := new(AlarmFilter)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/CreateAlarmFilter", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) GetAlarmFilter(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*AlarmFilter, error) {
+	out := new(AlarmFilter)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetAlarmFilter", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) UpdateAlarmFilter(ctx context.Context, in *AlarmFilter, opts ...grpc.CallOption) (*AlarmFilter, error) {
+	out := new(AlarmFilter)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/UpdateAlarmFilter", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) DeleteAlarmFilter(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*empty.Empty, error) {
+	out := new(empty.Empty)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/DeleteAlarmFilter", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) ListAlarmFilters(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*AlarmFilters, error) {
+	out := new(AlarmFilters)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/ListAlarmFilters", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) GetImages(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*Images, error) {
+	out := new(Images)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetImages", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) SelfTest(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*SelfTestResponse, error) {
+	out := new(SelfTestResponse)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/SelfTest", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) GetMibDeviceData(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*omci.MibDeviceData, error) {
+	out := new(omci.MibDeviceData)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetMibDeviceData", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) GetAlarmDeviceData(ctx context.Context, in *common.ID, opts ...grpc.CallOption) (*omci.AlarmDeviceData, error) {
+	out := new(omci.AlarmDeviceData)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/GetAlarmDeviceData", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) SimulateAlarm(ctx context.Context, in *SimulateAlarmRequest, opts ...grpc.CallOption) (*common.OperationResp, error) {
+	out := new(common.OperationResp)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/SimulateAlarm", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *volthaServiceClient) Subscribe(ctx context.Context, in *OfAgentSubscriber, opts ...grpc.CallOption) (*OfAgentSubscriber, error) {
+	out := new(OfAgentSubscriber)
+	err := c.cc.Invoke(ctx, "/voltha.VolthaService/Subscribe", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// VolthaServiceServer is the server API for VolthaService service.
+type VolthaServiceServer interface {
+	// Get more information on a given physical device
+	UpdateLogLevel(context.Context, *Logging) (*empty.Empty, error)
+	// Get the membership group of a Voltha Core
+	GetMembership(context.Context, *empty.Empty) (*Membership, error)
+	// Set the membership group of a Voltha Core
+	UpdateMembership(context.Context, *Membership) (*empty.Empty, error)
+	// Get high level information on the Voltha cluster
+	GetVoltha(context.Context, *empty.Empty) (*Voltha, error)
+	// List all Voltha cluster core instances
+	ListCoreInstances(context.Context, *empty.Empty) (*CoreInstances, error)
+	// Get details on a Voltha cluster instance
+	GetCoreInstance(context.Context, *common.ID) (*CoreInstance, error)
+	// List all active adapters (plugins) in the Voltha cluster
+	ListAdapters(context.Context, *empty.Empty) (*Adapters, error)
+	// List all logical devices managed by the Voltha cluster
+	ListLogicalDevices(context.Context, *empty.Empty) (*LogicalDevices, error)
+	// Get additional information on a given logical device
+	GetLogicalDevice(context.Context, *common.ID) (*LogicalDevice, error)
+	// List ports of a logical device
+	ListLogicalDevicePorts(context.Context, *common.ID) (*LogicalPorts, error)
+	// Gets a logical device port
+	GetLogicalDevicePort(context.Context, *LogicalPortId) (*LogicalPort, error)
+	// Enables a logical device port
+	EnableLogicalDevicePort(context.Context, *LogicalPortId) (*empty.Empty, error)
+	// Disables a logical device port
+	DisableLogicalDevicePort(context.Context, *LogicalPortId) (*empty.Empty, error)
+	// List all flows of a logical device
+	ListLogicalDeviceFlows(context.Context, *common.ID) (*openflow_13.Flows, error)
+	// Update flow table for logical device
+	UpdateLogicalDeviceFlowTable(context.Context, *openflow_13.FlowTableUpdate) (*empty.Empty, error)
+	// Update meter table for logical device
+	UpdateLogicalDeviceMeterTable(context.Context, *openflow_13.MeterModUpdate) (*empty.Empty, error)
+	// Get all meter stats for logical device
+	GetMeterStatsOfLogicalDevice(context.Context, *common.ID) (*openflow_13.MeterStatsReply, error)
+	// List all flow groups of a logical device
+	ListLogicalDeviceFlowGroups(context.Context, *common.ID) (*openflow_13.FlowGroups, error)
+	// Update group table for device
+	UpdateLogicalDeviceFlowGroupTable(context.Context, *openflow_13.FlowGroupTableUpdate) (*empty.Empty, error)
+	// List all physical devices controlled by the Voltha cluster
+	ListDevices(context.Context, *empty.Empty) (*Devices, error)
+	// List all physical devices IDs controlled by the Voltha cluster
+	ListDeviceIds(context.Context, *empty.Empty) (*common.IDs, error)
+	// Request to a voltha Core to reconcile a set of devices based on their IDs
+	ReconcileDevices(context.Context, *common.IDs) (*empty.Empty, error)
+	// Get more information on a given physical device
+	GetDevice(context.Context, *common.ID) (*Device, error)
+	// Pre-provision a new physical device
+	CreateDevice(context.Context, *Device) (*Device, error)
+	// Enable a device.  If the device was in pre-provisioned state then it
+	// will transition to ENABLED state.  If it was is DISABLED state then it
+	// will transition to ENABLED state as well.
+	EnableDevice(context.Context, *common.ID) (*empty.Empty, error)
+	// Disable a device
+	DisableDevice(context.Context, *common.ID) (*empty.Empty, error)
+	// Reboot a device
+	RebootDevice(context.Context, *common.ID) (*empty.Empty, error)
+	// Delete a device
+	DeleteDevice(context.Context, *common.ID) (*empty.Empty, error)
+	// Request an image download to the standby partition
+	// of a device.
+	// Note that the call is expected to be non-blocking.
+	DownloadImage(context.Context, *ImageDownload) (*common.OperationResp, error)
+	// Get image download status on a device
+	// The request retrieves progress on device and updates db record
+	GetImageDownloadStatus(context.Context, *ImageDownload) (*ImageDownload, error)
+	// Get image download db record
+	GetImageDownload(context.Context, *ImageDownload) (*ImageDownload, error)
+	// List image download db records for a given device
+	ListImageDownloads(context.Context, *common.ID) (*ImageDownloads, error)
+	// Cancel an existing image download process on a device
+	CancelImageDownload(context.Context, *ImageDownload) (*common.OperationResp, error)
+	// Activate the specified image at a standby partition
+	// to active partition.
+	// Depending on the device implementation, this call
+	// may or may not cause device reboot.
+	// If no reboot, then a reboot is required to make the
+	// activated image running on device
+	// Note that the call is expected to be non-blocking.
+	ActivateImageUpdate(context.Context, *ImageDownload) (*common.OperationResp, error)
+	// Revert the specified image at standby partition
+	// to active partition, and revert to previous image
+	// Depending on the device implementation, this call
+	// may or may not cause device reboot.
+	// If no reboot, then a reboot is required to make the
+	// previous image running on device
+	// Note that the call is expected to be non-blocking.
+	RevertImageUpdate(context.Context, *ImageDownload) (*common.OperationResp, error)
+	// List ports of a device
+	ListDevicePorts(context.Context, *common.ID) (*Ports, error)
+	// List pm config of a device
+	ListDevicePmConfigs(context.Context, *common.ID) (*PmConfigs, error)
+	// Update the pm config of a device
+	UpdateDevicePmConfigs(context.Context, *PmConfigs) (*empty.Empty, error)
+	// List all flows of a device
+	ListDeviceFlows(context.Context, *common.ID) (*openflow_13.Flows, error)
+	// List all flow groups of a device
+	ListDeviceFlowGroups(context.Context, *common.ID) (*openflow_13.FlowGroups, error)
+	// List device types known to Voltha
+	ListDeviceTypes(context.Context, *empty.Empty) (*DeviceTypes, error)
+	// Get additional information on a device type
+	GetDeviceType(context.Context, *common.ID) (*DeviceType, error)
+	// List all device sharding groups
+	ListDeviceGroups(context.Context, *empty.Empty) (*DeviceGroups, error)
+	// Stream control packets to the dataplane
+	StreamPacketsOut(VolthaService_StreamPacketsOutServer) error
+	// Receive control packet stream
+	ReceivePacketsIn(*empty.Empty, VolthaService_ReceivePacketsInServer) error
+	ReceiveChangeEvents(*empty.Empty, VolthaService_ReceiveChangeEventsServer) error
+	// Get additional information on a device group
+	GetDeviceGroup(context.Context, *common.ID) (*DeviceGroup, error)
+	CreateAlarmFilter(context.Context, *AlarmFilter) (*AlarmFilter, error)
+	GetAlarmFilter(context.Context, *common.ID) (*AlarmFilter, error)
+	UpdateAlarmFilter(context.Context, *AlarmFilter) (*AlarmFilter, error)
+	DeleteAlarmFilter(context.Context, *common.ID) (*empty.Empty, error)
+	ListAlarmFilters(context.Context, *empty.Empty) (*AlarmFilters, error)
+	GetImages(context.Context, *common.ID) (*Images, error)
+	SelfTest(context.Context, *common.ID) (*SelfTestResponse, error)
+	// OpenOMCI MIB information
+	GetMibDeviceData(context.Context, *common.ID) (*omci.MibDeviceData, error)
+	// OpenOMCI ALARM information
+	GetAlarmDeviceData(context.Context, *common.ID) (*omci.AlarmDeviceData, error)
+	// Simulate an Alarm
+	SimulateAlarm(context.Context, *SimulateAlarmRequest) (*common.OperationResp, error)
+	Subscribe(context.Context, *OfAgentSubscriber) (*OfAgentSubscriber, error)
+}
+
+func RegisterVolthaServiceServer(s *grpc.Server, srv VolthaServiceServer) {
+	s.RegisterService(&_VolthaService_serviceDesc, srv)
+}
+
+func _VolthaService_UpdateLogLevel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(Logging)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).UpdateLogLevel(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/UpdateLogLevel",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).UpdateLogLevel(ctx, req.(*Logging))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_GetMembership_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(empty.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetMembership(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetMembership",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetMembership(ctx, req.(*empty.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_UpdateMembership_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(Membership)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).UpdateMembership(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/UpdateMembership",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).UpdateMembership(ctx, req.(*Membership))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_GetVoltha_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(empty.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetVoltha(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetVoltha",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetVoltha(ctx, req.(*empty.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListCoreInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(empty.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListCoreInstances(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListCoreInstances",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListCoreInstances(ctx, req.(*empty.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_GetCoreInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetCoreInstance(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetCoreInstance",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetCoreInstance(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListAdapters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(empty.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListAdapters(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListAdapters",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListAdapters(ctx, req.(*empty.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListLogicalDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(empty.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListLogicalDevices(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListLogicalDevices",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListLogicalDevices(ctx, req.(*empty.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_GetLogicalDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetLogicalDevice(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetLogicalDevice",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetLogicalDevice(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListLogicalDevicePorts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListLogicalDevicePorts(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListLogicalDevicePorts",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListLogicalDevicePorts(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_GetLogicalDevicePort_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(LogicalPortId)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetLogicalDevicePort(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetLogicalDevicePort",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetLogicalDevicePort(ctx, req.(*LogicalPortId))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_EnableLogicalDevicePort_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(LogicalPortId)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).EnableLogicalDevicePort(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/EnableLogicalDevicePort",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).EnableLogicalDevicePort(ctx, req.(*LogicalPortId))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_DisableLogicalDevicePort_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(LogicalPortId)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).DisableLogicalDevicePort(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/DisableLogicalDevicePort",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).DisableLogicalDevicePort(ctx, req.(*LogicalPortId))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListLogicalDeviceFlows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListLogicalDeviceFlows(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListLogicalDeviceFlows",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListLogicalDeviceFlows(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_UpdateLogicalDeviceFlowTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(openflow_13.FlowTableUpdate)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).UpdateLogicalDeviceFlowTable(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/UpdateLogicalDeviceFlowTable",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).UpdateLogicalDeviceFlowTable(ctx, req.(*openflow_13.FlowTableUpdate))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_UpdateLogicalDeviceMeterTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(openflow_13.MeterModUpdate)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).UpdateLogicalDeviceMeterTable(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/UpdateLogicalDeviceMeterTable",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).UpdateLogicalDeviceMeterTable(ctx, req.(*openflow_13.MeterModUpdate))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_GetMeterStatsOfLogicalDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetMeterStatsOfLogicalDevice(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetMeterStatsOfLogicalDevice",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetMeterStatsOfLogicalDevice(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListLogicalDeviceFlowGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListLogicalDeviceFlowGroups(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListLogicalDeviceFlowGroups",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListLogicalDeviceFlowGroups(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_UpdateLogicalDeviceFlowGroupTable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(openflow_13.FlowGroupTableUpdate)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).UpdateLogicalDeviceFlowGroupTable(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/UpdateLogicalDeviceFlowGroupTable",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).UpdateLogicalDeviceFlowGroupTable(ctx, req.(*openflow_13.FlowGroupTableUpdate))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(empty.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListDevices(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListDevices",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListDevices(ctx, req.(*empty.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListDeviceIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(empty.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListDeviceIds(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListDeviceIds",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListDeviceIds(ctx, req.(*empty.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ReconcileDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.IDs)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ReconcileDevices(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ReconcileDevices",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ReconcileDevices(ctx, req.(*common.IDs))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_GetDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetDevice(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetDevice",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetDevice(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_CreateDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(Device)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).CreateDevice(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/CreateDevice",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).CreateDevice(ctx, req.(*Device))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_EnableDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).EnableDevice(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/EnableDevice",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).EnableDevice(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_DisableDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).DisableDevice(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/DisableDevice",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).DisableDevice(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_RebootDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).RebootDevice(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/RebootDevice",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).RebootDevice(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_DeleteDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).DeleteDevice(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/DeleteDevice",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).DeleteDevice(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_DownloadImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ImageDownload)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).DownloadImage(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/DownloadImage",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).DownloadImage(ctx, req.(*ImageDownload))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_GetImageDownloadStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ImageDownload)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetImageDownloadStatus(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetImageDownloadStatus",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetImageDownloadStatus(ctx, req.(*ImageDownload))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_GetImageDownload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ImageDownload)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetImageDownload(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetImageDownload",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetImageDownload(ctx, req.(*ImageDownload))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListImageDownloads_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListImageDownloads(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListImageDownloads",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListImageDownloads(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_CancelImageDownload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ImageDownload)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).CancelImageDownload(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/CancelImageDownload",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).CancelImageDownload(ctx, req.(*ImageDownload))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ActivateImageUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ImageDownload)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ActivateImageUpdate(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ActivateImageUpdate",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ActivateImageUpdate(ctx, req.(*ImageDownload))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_RevertImageUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(ImageDownload)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).RevertImageUpdate(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/RevertImageUpdate",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).RevertImageUpdate(ctx, req.(*ImageDownload))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListDevicePorts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListDevicePorts(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListDevicePorts",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListDevicePorts(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListDevicePmConfigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListDevicePmConfigs(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListDevicePmConfigs",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListDevicePmConfigs(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_UpdateDevicePmConfigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(PmConfigs)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).UpdateDevicePmConfigs(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/UpdateDevicePmConfigs",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).UpdateDevicePmConfigs(ctx, req.(*PmConfigs))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListDeviceFlows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListDeviceFlows(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListDeviceFlows",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListDeviceFlows(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListDeviceFlowGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListDeviceFlowGroups(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListDeviceFlowGroups",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListDeviceFlowGroups(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListDeviceTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(empty.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListDeviceTypes(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListDeviceTypes",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListDeviceTypes(ctx, req.(*empty.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_GetDeviceType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetDeviceType(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetDeviceType",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetDeviceType(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListDeviceGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(empty.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListDeviceGroups(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListDeviceGroups",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListDeviceGroups(ctx, req.(*empty.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_StreamPacketsOut_Handler(srv interface{}, stream grpc.ServerStream) error {
+	return srv.(VolthaServiceServer).StreamPacketsOut(&volthaServiceStreamPacketsOutServer{stream})
+}
+
+type VolthaService_StreamPacketsOutServer interface {
+	SendAndClose(*empty.Empty) error
+	Recv() (*openflow_13.PacketOut, error)
+	grpc.ServerStream
+}
+
+type volthaServiceStreamPacketsOutServer struct {
+	grpc.ServerStream
+}
+
+func (x *volthaServiceStreamPacketsOutServer) SendAndClose(m *empty.Empty) error {
+	return x.ServerStream.SendMsg(m)
+}
+
+func (x *volthaServiceStreamPacketsOutServer) Recv() (*openflow_13.PacketOut, error) {
+	m := new(openflow_13.PacketOut)
+	if err := x.ServerStream.RecvMsg(m); err != nil {
+		return nil, err
+	}
+	return m, nil
+}
+
+func _VolthaService_ReceivePacketsIn_Handler(srv interface{}, stream grpc.ServerStream) error {
+	m := new(empty.Empty)
+	if err := stream.RecvMsg(m); err != nil {
+		return err
+	}
+	return srv.(VolthaServiceServer).ReceivePacketsIn(m, &volthaServiceReceivePacketsInServer{stream})
+}
+
+type VolthaService_ReceivePacketsInServer interface {
+	Send(*openflow_13.PacketIn) error
+	grpc.ServerStream
+}
+
+type volthaServiceReceivePacketsInServer struct {
+	grpc.ServerStream
+}
+
+func (x *volthaServiceReceivePacketsInServer) Send(m *openflow_13.PacketIn) error {
+	return x.ServerStream.SendMsg(m)
+}
+
+func _VolthaService_ReceiveChangeEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
+	m := new(empty.Empty)
+	if err := stream.RecvMsg(m); err != nil {
+		return err
+	}
+	return srv.(VolthaServiceServer).ReceiveChangeEvents(m, &volthaServiceReceiveChangeEventsServer{stream})
+}
+
+type VolthaService_ReceiveChangeEventsServer interface {
+	Send(*openflow_13.ChangeEvent) error
+	grpc.ServerStream
+}
+
+type volthaServiceReceiveChangeEventsServer struct {
+	grpc.ServerStream
+}
+
+func (x *volthaServiceReceiveChangeEventsServer) Send(m *openflow_13.ChangeEvent) error {
+	return x.ServerStream.SendMsg(m)
+}
+
+func _VolthaService_GetDeviceGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetDeviceGroup(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetDeviceGroup",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetDeviceGroup(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_CreateAlarmFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(AlarmFilter)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).CreateAlarmFilter(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/CreateAlarmFilter",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).CreateAlarmFilter(ctx, req.(*AlarmFilter))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_GetAlarmFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetAlarmFilter(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetAlarmFilter",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetAlarmFilter(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_UpdateAlarmFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(AlarmFilter)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).UpdateAlarmFilter(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/UpdateAlarmFilter",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).UpdateAlarmFilter(ctx, req.(*AlarmFilter))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_DeleteAlarmFilter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).DeleteAlarmFilter(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/DeleteAlarmFilter",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).DeleteAlarmFilter(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_ListAlarmFilters_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(empty.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).ListAlarmFilters(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/ListAlarmFilters",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).ListAlarmFilters(ctx, req.(*empty.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_GetImages_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetImages(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetImages",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetImages(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_SelfTest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).SelfTest(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/SelfTest",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).SelfTest(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_GetMibDeviceData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetMibDeviceData(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetMibDeviceData",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetMibDeviceData(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_GetAlarmDeviceData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.ID)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).GetAlarmDeviceData(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/GetAlarmDeviceData",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).GetAlarmDeviceData(ctx, req.(*common.ID))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_SimulateAlarm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(SimulateAlarmRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).SimulateAlarm(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/SimulateAlarm",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).SimulateAlarm(ctx, req.(*SimulateAlarmRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _VolthaService_Subscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(OfAgentSubscriber)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(VolthaServiceServer).Subscribe(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/voltha.VolthaService/Subscribe",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(VolthaServiceServer).Subscribe(ctx, req.(*OfAgentSubscriber))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+var _VolthaService_serviceDesc = grpc.ServiceDesc{
+	ServiceName: "voltha.VolthaService",
+	HandlerType: (*VolthaServiceServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "UpdateLogLevel",
+			Handler:    _VolthaService_UpdateLogLevel_Handler,
+		},
+		{
+			MethodName: "GetMembership",
+			Handler:    _VolthaService_GetMembership_Handler,
+		},
+		{
+			MethodName: "UpdateMembership",
+			Handler:    _VolthaService_UpdateMembership_Handler,
+		},
+		{
+			MethodName: "GetVoltha",
+			Handler:    _VolthaService_GetVoltha_Handler,
+		},
+		{
+			MethodName: "ListCoreInstances",
+			Handler:    _VolthaService_ListCoreInstances_Handler,
+		},
+		{
+			MethodName: "GetCoreInstance",
+			Handler:    _VolthaService_GetCoreInstance_Handler,
+		},
+		{
+			MethodName: "ListAdapters",
+			Handler:    _VolthaService_ListAdapters_Handler,
+		},
+		{
+			MethodName: "ListLogicalDevices",
+			Handler:    _VolthaService_ListLogicalDevices_Handler,
+		},
+		{
+			MethodName: "GetLogicalDevice",
+			Handler:    _VolthaService_GetLogicalDevice_Handler,
+		},
+		{
+			MethodName: "ListLogicalDevicePorts",
+			Handler:    _VolthaService_ListLogicalDevicePorts_Handler,
+		},
+		{
+			MethodName: "GetLogicalDevicePort",
+			Handler:    _VolthaService_GetLogicalDevicePort_Handler,
+		},
+		{
+			MethodName: "EnableLogicalDevicePort",
+			Handler:    _VolthaService_EnableLogicalDevicePort_Handler,
+		},
+		{
+			MethodName: "DisableLogicalDevicePort",
+			Handler:    _VolthaService_DisableLogicalDevicePort_Handler,
+		},
+		{
+			MethodName: "ListLogicalDeviceFlows",
+			Handler:    _VolthaService_ListLogicalDeviceFlows_Handler,
+		},
+		{
+			MethodName: "UpdateLogicalDeviceFlowTable",
+			Handler:    _VolthaService_UpdateLogicalDeviceFlowTable_Handler,
+		},
+		{
+			MethodName: "UpdateLogicalDeviceMeterTable",
+			Handler:    _VolthaService_UpdateLogicalDeviceMeterTable_Handler,
+		},
+		{
+			MethodName: "GetMeterStatsOfLogicalDevice",
+			Handler:    _VolthaService_GetMeterStatsOfLogicalDevice_Handler,
+		},
+		{
+			MethodName: "ListLogicalDeviceFlowGroups",
+			Handler:    _VolthaService_ListLogicalDeviceFlowGroups_Handler,
+		},
+		{
+			MethodName: "UpdateLogicalDeviceFlowGroupTable",
+			Handler:    _VolthaService_UpdateLogicalDeviceFlowGroupTable_Handler,
+		},
+		{
+			MethodName: "ListDevices",
+			Handler:    _VolthaService_ListDevices_Handler,
+		},
+		{
+			MethodName: "ListDeviceIds",
+			Handler:    _VolthaService_ListDeviceIds_Handler,
+		},
+		{
+			MethodName: "ReconcileDevices",
+			Handler:    _VolthaService_ReconcileDevices_Handler,
+		},
+		{
+			MethodName: "GetDevice",
+			Handler:    _VolthaService_GetDevice_Handler,
+		},
+		{
+			MethodName: "CreateDevice",
+			Handler:    _VolthaService_CreateDevice_Handler,
+		},
+		{
+			MethodName: "EnableDevice",
+			Handler:    _VolthaService_EnableDevice_Handler,
+		},
+		{
+			MethodName: "DisableDevice",
+			Handler:    _VolthaService_DisableDevice_Handler,
+		},
+		{
+			MethodName: "RebootDevice",
+			Handler:    _VolthaService_RebootDevice_Handler,
+		},
+		{
+			MethodName: "DeleteDevice",
+			Handler:    _VolthaService_DeleteDevice_Handler,
+		},
+		{
+			MethodName: "DownloadImage",
+			Handler:    _VolthaService_DownloadImage_Handler,
+		},
+		{
+			MethodName: "GetImageDownloadStatus",
+			Handler:    _VolthaService_GetImageDownloadStatus_Handler,
+		},
+		{
+			MethodName: "GetImageDownload",
+			Handler:    _VolthaService_GetImageDownload_Handler,
+		},
+		{
+			MethodName: "ListImageDownloads",
+			Handler:    _VolthaService_ListImageDownloads_Handler,
+		},
+		{
+			MethodName: "CancelImageDownload",
+			Handler:    _VolthaService_CancelImageDownload_Handler,
+		},
+		{
+			MethodName: "ActivateImageUpdate",
+			Handler:    _VolthaService_ActivateImageUpdate_Handler,
+		},
+		{
+			MethodName: "RevertImageUpdate",
+			Handler:    _VolthaService_RevertImageUpdate_Handler,
+		},
+		{
+			MethodName: "ListDevicePorts",
+			Handler:    _VolthaService_ListDevicePorts_Handler,
+		},
+		{
+			MethodName: "ListDevicePmConfigs",
+			Handler:    _VolthaService_ListDevicePmConfigs_Handler,
+		},
+		{
+			MethodName: "UpdateDevicePmConfigs",
+			Handler:    _VolthaService_UpdateDevicePmConfigs_Handler,
+		},
+		{
+			MethodName: "ListDeviceFlows",
+			Handler:    _VolthaService_ListDeviceFlows_Handler,
+		},
+		{
+			MethodName: "ListDeviceFlowGroups",
+			Handler:    _VolthaService_ListDeviceFlowGroups_Handler,
+		},
+		{
+			MethodName: "ListDeviceTypes",
+			Handler:    _VolthaService_ListDeviceTypes_Handler,
+		},
+		{
+			MethodName: "GetDeviceType",
+			Handler:    _VolthaService_GetDeviceType_Handler,
+		},
+		{
+			MethodName: "ListDeviceGroups",
+			Handler:    _VolthaService_ListDeviceGroups_Handler,
+		},
+		{
+			MethodName: "GetDeviceGroup",
+			Handler:    _VolthaService_GetDeviceGroup_Handler,
+		},
+		{
+			MethodName: "CreateAlarmFilter",
+			Handler:    _VolthaService_CreateAlarmFilter_Handler,
+		},
+		{
+			MethodName: "GetAlarmFilter",
+			Handler:    _VolthaService_GetAlarmFilter_Handler,
+		},
+		{
+			MethodName: "UpdateAlarmFilter",
+			Handler:    _VolthaService_UpdateAlarmFilter_Handler,
+		},
+		{
+			MethodName: "DeleteAlarmFilter",
+			Handler:    _VolthaService_DeleteAlarmFilter_Handler,
+		},
+		{
+			MethodName: "ListAlarmFilters",
+			Handler:    _VolthaService_ListAlarmFilters_Handler,
+		},
+		{
+			MethodName: "GetImages",
+			Handler:    _VolthaService_GetImages_Handler,
+		},
+		{
+			MethodName: "SelfTest",
+			Handler:    _VolthaService_SelfTest_Handler,
+		},
+		{
+			MethodName: "GetMibDeviceData",
+			Handler:    _VolthaService_GetMibDeviceData_Handler,
+		},
+		{
+			MethodName: "GetAlarmDeviceData",
+			Handler:    _VolthaService_GetAlarmDeviceData_Handler,
+		},
+		{
+			MethodName: "SimulateAlarm",
+			Handler:    _VolthaService_SimulateAlarm_Handler,
+		},
+		{
+			MethodName: "Subscribe",
+			Handler:    _VolthaService_Subscribe_Handler,
+		},
+	},
+	Streams: []grpc.StreamDesc{
+		{
+			StreamName:    "StreamPacketsOut",
+			Handler:       _VolthaService_StreamPacketsOut_Handler,
+			ClientStreams: true,
+		},
+		{
+			StreamName:    "ReceivePacketsIn",
+			Handler:       _VolthaService_ReceivePacketsIn_Handler,
+			ServerStreams: true,
+		},
+		{
+			StreamName:    "ReceiveChangeEvents",
+			Handler:       _VolthaService_ReceiveChangeEvents_Handler,
+			ServerStreams: true,
+		},
+	},
+	Metadata: "voltha_protos/voltha.proto",
+}
+
+func init() { proto.RegisterFile("voltha_protos/voltha.proto", fileDescriptor_voltha_1f7600b5a75eb6d1) }
+
+var fileDescriptor_voltha_1f7600b5a75eb6d1 = []byte{
+	// 2475 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5b, 0x73, 0xdb, 0xc6,
+	0x15, 0x16, 0x75, 0xd7, 0x21, 0x29, 0x92, 0x47, 0x17, 0xd3, 0x94, 0x64, 0x4b, 0x1b, 0xc7, 0x76,
+	0xe4, 0x88, 0x8c, 0xad, 0xc4, 0xd3, 0x3a, 0xcd, 0xa4, 0xd6, 0xc5, 0x2a, 0x6b, 0x59, 0x64, 0x41,
+	0xcb, 0x4e, 0x9b, 0x7a, 0x38, 0x20, 0xb1, 0xa2, 0x30, 0x06, 0x09, 0x16, 0x0b, 0xca, 0xd5, 0xb8,
+	0x99, 0xce, 0xa4, 0xd7, 0xe9, 0x63, 0xf3, 0x17, 0xfa, 0xd0, 0xe9, 0xf4, 0xaf, 0xf8, 0xa9, 0xbf,
+	0xa0, 0x9d, 0x3e, 0xf4, 0xb1, 0x4f, 0x6e, 0x1f, 0x3b, 0x7b, 0x01, 0x09, 0x10, 0x80, 0x2e, 0x69,
+	0x66, 0xf2, 0x64, 0x62, 0xcf, 0xd9, 0xef, 0xfb, 0xf6, 0xec, 0xd9, 0x83, 0xa3, 0x85, 0xa1, 0x70,
+	0x62, 0x5b, 0xee, 0xb1, 0x5e, 0xef, 0x3a, 0xb6, 0x6b, 0xb3, 0x92, 0x7c, 0x2a, 0x8a, 0x27, 0x9c,
+	0x94, 0x4f, 0x85, 0xe5, 0x96, 0x6d, 0xb7, 0x2c, 0x5a, 0xd2, 0xbb, 0x66, 0x49, 0xef, 0x74, 0x6c,
+	0x57, 0x77, 0x4d, 0xbb, 0xc3, 0xa4, 0x57, 0x61, 0x49, 0x59, 0xc5, 0x53, 0xa3, 0x77, 0x54, 0xa2,
+	0xed, 0xae, 0x7b, 0xaa, 0x8c, 0xf9, 0x20, 0x7c, 0x9b, 0xba, 0x0a, 0xbc, 0x30, 0x44, 0xdc, 0xb4,
+	0xdb, 0x6d, 0xbb, 0x13, 0x6d, 0x3b, 0xa6, 0xba, 0xe5, 0x1e, 0x2b, 0x1b, 0x09, 0xda, 0x2c, 0xbb,
+	0x65, 0x36, 0x75, 0xab, 0x6e, 0xd0, 0x13, 0xb3, 0x49, 0xa3, 0xe7, 0x07, 0x6c, 0x4b, 0x41, 0x9b,
+	0x6e, 0xe8, 0x5d, 0x97, 0x3a, 0xca, 0x78, 0x3d, 0x68, 0xb4, 0xbb, 0xb4, 0x73, 0x64, 0xd9, 0xaf,
+	0xea, 0x77, 0x37, 0x63, 0x1c, 0xda, 0x4d, 0xb3, 0xde, 0x36, 0x1b, 0x75, 0xa3, 0xa1, 0x1c, 0xd6,
+	0x22, 0x1c, 0x74, 0x4b, 0x77, 0xda, 0x03, 0x97, 0xd5, 0xa0, 0xcb, 0xa9, 0xde, 0x69, 0xd5, 0xed,
+	0xae, 0x2f, 0xa4, 0xe4, 0x4f, 0x09, 0x48, 0xee, 0x08, 0xd1, 0x7b, 0x8e, 0xdd, 0xeb, 0xe2, 0x02,
+	0x8c, 0x9a, 0x46, 0x3e, 0xb1, 0x9a, 0xb8, 0x3d, 0xb3, 0x35, 0xf1, 0xaf, 0xb7, 0x6f, 0x56, 0x12,
+	0xda, 0xa8, 0x69, 0x60, 0x19, 0x32, 0xc1, 0xe5, 0xb3, 0xfc, 0xe8, 0xea, 0xd8, 0xed, 0xe4, 0xbd,
+	0x85, 0xa2, 0xda, 0xc7, 0x7d, 0x69, 0x96, 0x58, 0x5b, 0x33, 0xff, 0x78, 0xfb, 0x66, 0x65, 0x9c,
+	0x63, 0x69, 0xb3, 0x96, 0xdf, 0xc2, 0x70, 0x13, 0xa6, 0x3c, 0x88, 0x31, 0x01, 0x31, 0xeb, 0x41,
+	0x84, 0xe7, 0x7a, 0x9e, 0xe4, 0xbb, 0x90, 0xf2, 0xa9, 0x64, 0xf8, 0x1e, 0x4c, 0x98, 0x2e, 0x6d,
+	0xb3, 0x7c, 0x42, 0x40, 0xcc, 0x05, 0x21, 0x84, 0x93, 0x26, 0x3d, 0xc8, 0x2f, 0x01, 0x1f, 0xf2,
+	0xa8, 0x3c, 0x32, 0x2d, 0x97, 0x3a, 0x5a, 0xcf, 0xa2, 0x8f, 0xe9, 0x29, 0x69, 0x44, 0x8d, 0xe2,
+	0x24, 0x67, 0xcd, 0x8e, 0xe0, 0x34, 0x8c, 0xbb, 0xa7, 0x5d, 0x9a, 0x4d, 0x60, 0x0a, 0xa6, 0x19,
+	0x3d, 0xa1, 0x8e, 0xe9, 0x9e, 0x66, 0x47, 0x31, 0x03, 0x49, 0x87, 0x32, 0xbb, 0xe7, 0x34, 0x69,
+	0xdd, 0x34, 0xb2, 0x63, 0xdc, 0xdc, 0xd4, 0x5d, 0xda, 0xb2, 0x9d, 0xd3, 0xec, 0x38, 0xa6, 0x61,
+	0x46, 0x0a, 0xe6, 0xc6, 0x89, 0x07, 0x13, 0xff, 0x7e, 0xfb, 0x66, 0x65, 0x84, 0x1c, 0x43, 0x66,
+	0x88, 0x0a, 0x3f, 0x85, 0xb1, 0x97, 0xf4, 0x54, 0x84, 0x79, 0xf6, 0xde, 0x86, 0x27, 0x3e, 0x2c,
+	0x28, 0x62, 0x48, 0xe3, 0x33, 0x71, 0x1e, 0x26, 0x4e, 0x74, 0xab, 0x47, 0xf3, 0xa3, 0x7c, 0xa7,
+	0x34, 0xf9, 0x40, 0x6a, 0x90, 0xf4, 0x4d, 0x88, 0xdb, 0xcb, 0x0d, 0x98, 0x70, 0x7a, 0x56, 0x7f,
+	0x07, 0xaf, 0xc4, 0xd0, 0x6b, 0xd2, 0x8b, 0x7c, 0x02, 0x29, 0x9f, 0x85, 0xe1, 0x06, 0x4c, 0x1d,
+	0xc9, 0x9f, 0xc3, 0xc1, 0xf7, 0x03, 0x78, 0x3e, 0xe4, 0x05, 0x4c, 0xed, 0xdb, 0xad, 0x96, 0xd9,
+	0x69, 0x61, 0x09, 0x26, 0x2c, 0x7a, 0x42, 0x2d, 0xb5, 0xee, 0xab, 0xbe, 0xd4, 0xd9, 0xe7, 0xe3,
+	0xfd, 0x1f, 0x9a, 0xf4, 0xc3, 0x35, 0x48, 0x75, 0xf5, 0xe6, 0x4b, 0xbd, 0x45, 0xeb, 0x1d, 0xbd,
+	0xed, 0x2d, 0x36, 0xa9, 0xc6, 0x0e, 0xf4, 0x36, 0x25, 0x0e, 0xa4, 0xb6, 0x6d, 0x87, 0x96, 0x3b,
+	0xcc, 0xd5, 0x3b, 0x4d, 0x8a, 0x37, 0x21, 0x69, 0xaa, 0xdf, 0xf5, 0xe1, 0xc5, 0x83, 0x67, 0x29,
+	0x1b, 0xb8, 0x09, 0x93, 0xf2, 0xac, 0x0b, 0xd0, 0xe4, 0xbd, 0x79, 0x4f, 0xcc, 0x0f, 0xc4, 0x68,
+	0xcd, 0xd5, 0xdd, 0x1e, 0xdb, 0x9a, 0xe0, 0xa9, 0x38, 0xa2, 0x29, 0xd7, 0x07, 0x13, 0xff, 0xe5,
+	0x38, 0x64, 0x0b, 0xd2, 0x7e, 0x4e, 0x86, 0xeb, 0xc1, 0x6c, 0xec, 0x63, 0xf9, 0xbd, 0x54, 0x3a,
+	0x7a, 0x18, 0x7f, 0x1f, 0x87, 0xc9, 0x67, 0xc2, 0x0b, 0xaf, 0xc3, 0xd4, 0x09, 0x75, 0x98, 0x69,
+	0x77, 0x82, 0x72, 0xbd, 0x51, 0xbc, 0x0f, 0xd3, 0xaa, 0x76, 0x78, 0x7b, 0x96, 0xe9, 0x87, 0x5c,
+	0x8e, 0xfb, 0xcf, 0x4c, 0xdf, 0x37, 0xea, 0xd0, 0x8e, 0xfd, 0xff, 0x87, 0x76, 0xfc, 0xa2, 0x87,
+	0x16, 0xbf, 0x0f, 0x29, 0x75, 0x1c, 0xf8, 0x61, 0x62, 0xf9, 0x09, 0x31, 0x13, 0x83, 0x33, 0x9f,
+	0x9e, 0x76, 0x03, 0xb3, 0x93, 0x46, 0x7f, 0x98, 0xe1, 0x36, 0xa4, 0x15, 0x42, 0x4b, 0x9c, 0xfb,
+	0xfc, 0x64, 0xec, 0x71, 0xf7, 0x63, 0x28, 0x5a, 0x55, 0x2b, 0xb6, 0x21, 0x2d, 0xcb, 0xa2, 0x97,
+	0xb6, 0x53, 0xb1, 0x69, 0x1b, 0x00, 0xd1, 0xfd, 0x59, 0xff, 0x23, 0xc8, 0x0d, 0x2a, 0xb0, 0xee,
+	0xea, 0x0d, 0x9d, 0xd1, 0xfc, 0xb2, 0x02, 0xe2, 0x96, 0xe2, 0x13, 0xb3, 0x21, 0xe5, 0xec, 0xe8,
+	0xae, 0xbe, 0x95, 0xe5, 0x40, 0x49, 0x5f, 0x3d, 0xd0, 0x32, 0xdc, 0x8b, 0x3b, 0xa9, 0xd9, 0xf8,
+	0x19, 0xcc, 0xf9, 0x6b, 0xb6, 0x07, 0xba, 0x22, 0x40, 0x17, 0x8b, 0x62, 0x58, 0x8a, 0x3b, 0x13,
+	0x57, 0xe8, 0x92, 0x6e, 0x0a, 0xc2, 0xcb, 0xb1, 0xbf, 0x26, 0x20, 0x5b, 0xa3, 0xd6, 0xd1, 0x53,
+	0xca, 0x5c, 0x8d, 0xb2, 0xae, 0xdd, 0x61, 0xbc, 0xf4, 0x4c, 0x3a, 0x94, 0xf5, 0x2c, 0x57, 0x9d,
+	0xc2, 0x5b, 0x5e, 0x18, 0x86, 0x3d, 0xfd, 0x03, 0x3d, 0xcb, 0xd5, 0xd4, 0x34, 0x52, 0x85, 0xd9,
+	0xa0, 0x05, 0x93, 0x30, 0x55, 0x3b, 0xdc, 0xde, 0xde, 0xad, 0xd5, 0xb2, 0x23, 0xfc, 0xe1, 0xd1,
+	0xc3, 0xf2, 0xfe, 0xa1, 0xb6, 0x9b, 0x4d, 0x60, 0x0e, 0xd2, 0x07, 0x95, 0xa7, 0xf5, 0xda, 0x61,
+	0xb5, 0x5a, 0xd1, 0x9e, 0xee, 0xee, 0x64, 0x47, 0xf9, 0xd0, 0xe1, 0xc1, 0xe3, 0x83, 0xca, 0xf3,
+	0x83, 0xfa, 0xae, 0xa6, 0x55, 0xb4, 0xec, 0x98, 0x57, 0x27, 0x2b, 0x90, 0xab, 0x1c, 0x3d, 0x6c,
+	0xd1, 0x8e, 0x5b, 0xeb, 0x35, 0x58, 0xd3, 0x31, 0x1b, 0xd4, 0xc1, 0x15, 0x00, 0xfb, 0x48, 0xe7,
+	0x83, 0xfd, 0xe3, 0xac, 0xcd, 0xa8, 0x91, 0xb2, 0x81, 0x4b, 0x30, 0xa3, 0x5e, 0x71, 0xa6, 0xa1,
+	0xca, 0xc3, 0xb4, 0x1c, 0x28, 0x1b, 0xe4, 0x63, 0x80, 0x27, 0xb4, 0xdd, 0xa0, 0x0e, 0x3b, 0x36,
+	0xbb, 0x1c, 0x49, 0x24, 0x91, 0x2c, 0x25, 0x0a, 0x49, 0x8c, 0xf0, 0x42, 0x82, 0xb3, 0xa2, 0x58,
+	0x4a, 0x88, 0x51, 0xd3, 0xb8, 0xf7, 0xe7, 0x12, 0xa4, 0xe5, 0x01, 0xad, 0x51, 0x87, 0xc7, 0x1a,
+	0x2b, 0x30, 0x7b, 0xd8, 0x35, 0x74, 0x97, 0x7a, 0x65, 0x0a, 0x33, 0xbe, 0x73, 0xc4, 0x2b, 0x5c,
+	0x61, 0xb1, 0x28, 0x3b, 0x94, 0xa2, 0xd7, 0xa1, 0x14, 0x77, 0x79, 0x87, 0x42, 0xe6, 0xbf, 0xfc,
+	0xdb, 0x3f, 0xbf, 0x1a, 0x9d, 0xc5, 0x94, 0x68, 0x6c, 0x4e, 0xee, 0xf2, 0x5e, 0x82, 0xe1, 0x73,
+	0x48, 0xef, 0x51, 0xd7, 0x27, 0x31, 0x66, 0x7a, 0xa1, 0x7f, 0x64, 0x06, 0xbe, 0xa4, 0x20, 0x20,
+	0xe7, 0x11, 0x3d, 0xc8, 0xf6, 0x00, 0xe7, 0x05, 0x64, 0xa5, 0x52, 0x1f, 0x76, 0x04, 0x46, 0xac,
+	0xdc, 0x15, 0x81, 0x7d, 0x85, 0x44, 0x60, 0x3f, 0x48, 0xac, 0xe3, 0x0e, 0xcc, 0xec, 0x51, 0x57,
+	0x55, 0xaf, 0x38, 0xcd, 0xfd, 0x02, 0x21, 0xfd, 0x48, 0x46, 0x60, 0xce, 0xe0, 0x94, 0xc2, 0xc4,
+	0x1e, 0xe4, 0xf6, 0x4d, 0xe6, 0x06, 0x2b, 0x69, 0x1c, 0xda, 0x42, 0x54, 0x49, 0x65, 0xe4, 0xee,
+	0x1f, 0xfe, 0xf3, 0x66, 0x65, 0x4a, 0x55, 0x5f, 0xf1, 0x1b, 0xe5, 0x6f, 0x41, 0x36, 0x87, 0x39,
+	0x6f, 0x01, 0x66, 0x9f, 0xa1, 0x06, 0x99, 0x3d, 0x1a, 0x60, 0x45, 0xf0, 0xc0, 0xcb, 0x3b, 0x85,
+	0xc8, 0xda, 0x4d, 0xae, 0x09, 0xbc, 0x3c, 0x2e, 0x86, 0xf0, 0x4a, 0xaf, 0x4d, 0xe3, 0x0b, 0xd4,
+	0x21, 0xc5, 0xd7, 0xf2, 0xd0, 0xab, 0xbc, 0x71, 0xcb, 0xc8, 0x0e, 0xd5, 0x6d, 0x46, 0x6e, 0x71,
+	0xd5, 0x30, 0x28, 0xf0, 0x82, 0x08, 0x31, 0xeb, 0x11, 0xf5, 0x8b, 0xf9, 0x6b, 0x40, 0x4e, 0xb1,
+	0x1f, 0xac, 0xcb, 0x71, 0x44, 0x8b, 0x91, 0x15, 0x9e, 0x91, 0x8f, 0x38, 0x5d, 0x2e, 0xf4, 0x5e,
+	0x10, 0xac, 0x57, 0xf1, 0x8a, 0x2f, 0x3d, 0xfd, 0x66, 0xfc, 0x1c, 0xb2, 0x7b, 0x34, 0xc8, 0x1d,
+	0x88, 0x5a, 0xf4, 0x0b, 0x85, 0xdc, 0x10, 0xb8, 0xd7, 0x70, 0x39, 0x06, 0x57, 0x06, 0xcf, 0x81,
+	0xc5, 0xd0, 0xca, 0xaa, 0xb6, 0xe3, 0xb2, 0xe8, 0x8d, 0x51, 0x7e, 0xc2, 0x83, 0xdc, 0x57, 0x09,
+	0xd0, 0xe5, 0x4f, 0x82, 0xed, 0x06, 0x92, 0xb3, 0xd8, 0x4a, 0xc2, 0x13, 0x7f, 0x95, 0x80, 0xf9,
+	0xe1, 0x15, 0x71, 0x44, 0x5c, 0x88, 0xa0, 0x29, 0x1b, 0x85, 0xb9, 0x88, 0x61, 0xf2, 0x29, 0x27,
+	0x9f, 0x84, 0x71, 0x0e, 0x29, 0xb8, 0x8b, 0xf8, 0xfe, 0xf9, 0xdc, 0xa5, 0xd7, 0xfc, 0x9f, 0x3a,
+	0x5f, 0xf9, 0x6f, 0x12, 0x70, 0x65, 0xb7, 0xa3, 0x37, 0x2c, 0x7a, 0x61, 0x21, 0x71, 0x47, 0xf6,
+	0x63, 0x21, 0xe0, 0x23, 0xb2, 0x79, 0x19, 0x01, 0x25, 0x2a, 0xc8, 0xf1, 0x77, 0x09, 0xc8, 0xef,
+	0x98, 0xec, 0x1b, 0x11, 0xf2, 0x3d, 0x21, 0xe4, 0x3e, 0xf9, 0xf0, 0x52, 0x42, 0x0c, 0xc9, 0x8e,
+	0xbf, 0x88, 0xc8, 0x85, 0x47, 0x96, 0xfd, 0x2a, 0x98, 0x0b, 0x58, 0xf4, 0xff, 0xb9, 0x24, 0xec,
+	0x64, 0x4b, 0x65, 0x02, 0x1f, 0x0d, 0x97, 0x82, 0xf3, 0xb2, 0x42, 0xcc, 0xe2, 0x59, 0xb1, 0xdc,
+	0x2f, 0xf1, 0x41, 0x01, 0x4f, 0x85, 0xbc, 0xe5, 0x10, 0xb1, 0x18, 0x97, 0x73, 0x62, 0x43, 0xb2,
+	0x21, 0x24, 0xdc, 0x22, 0x17, 0x90, 0xc0, 0xcb, 0xeb, 0xaf, 0x13, 0xb0, 0x12, 0xa1, 0xe2, 0x09,
+	0x75, 0xa9, 0x23, 0x65, 0x2c, 0x05, 0x64, 0x08, 0xc3, 0x13, 0xdb, 0x38, 0x47, 0x45, 0x51, 0xa8,
+	0xb8, 0x4d, 0xde, 0x39, 0x53, 0x45, 0x9b, 0x83, 0x09, 0x19, 0xaf, 0x61, 0x59, 0xbc, 0x9d, 0x5c,
+	0xea, 0xf0, 0x6e, 0x98, 0x55, 0x8e, 0xe2, 0xcf, 0xff, 0x72, 0x58, 0x90, 0x98, 0xa3, 0xd1, 0xae,
+	0x75, 0x4a, 0xee, 0x0a, 0xe6, 0x3b, 0xf8, 0xde, 0x05, 0x98, 0xeb, 0x8c, 0xcf, 0xc3, 0x3f, 0x26,
+	0x60, 0x29, 0x32, 0x11, 0x54, 0x4f, 0xe7, 0x27, 0xbf, 0x12, 0xda, 0x14, 0xe9, 0x44, 0x0e, 0x78,
+	0x1a, 0xa4, 0x21, 0x29, 0x4c, 0xb2, 0x81, 0x0c, 0x25, 0xc6, 0x3a, 0xde, 0x3e, 0x77, 0x57, 0xd4,
+	0x5c, 0xfc, 0x2a, 0x01, 0x6b, 0x31, 0xe9, 0x21, 0x18, 0xe5, 0xe6, 0xac, 0x45, 0xcb, 0xb9, 0x48,
+	0xa2, 0x6c, 0x0a, 0x49, 0x1b, 0xe4, 0xc2, 0x92, 0xf8, 0x3e, 0xbd, 0x80, 0x24, 0x8f, 0xd4, 0x79,
+	0x6f, 0x84, 0x4c, 0xb0, 0x67, 0x66, 0xe4, 0x5d, 0x1e, 0x8b, 0x99, 0x7e, 0x5f, 0x2f, 0xa8, 0x73,
+	0x98, 0xf1, 0xa8, 0xbd, 0xd2, 0x6f, 0x40, 0x7a, 0x00, 0x5f, 0x36, 0xe2, 0x09, 0x92, 0x83, 0x2d,
+	0x61, 0xa4, 0xc8, 0xc1, 0x45, 0x1f, 0x7d, 0xd6, 0x5b, 0x59, 0x72, 0x98, 0x06, 0xc3, 0x43, 0xc8,
+	0x6a, 0xb4, 0x69, 0x77, 0x9a, 0xa6, 0x45, 0xbd, 0x95, 0xf8, 0x01, 0x63, 0x43, 0xb6, 0x2c, 0x30,
+	0x17, 0x49, 0x18, 0x93, 0xc7, 0x66, 0x57, 0x74, 0x2a, 0x11, 0x09, 0x3b, 0xf4, 0xe7, 0x8b, 0x07,
+	0x83, 0xf3, 0x43, 0xcb, 0x97, 0x6f, 0xa8, 0x1f, 0x42, 0x6a, 0xdb, 0xa1, 0xba, 0xab, 0xa4, 0xe1,
+	0xd0, 0xec, 0x10, 0x9a, 0xea, 0xcd, 0xc8, 0x70, 0x30, 0xb9, 0xa4, 0xe7, 0x90, 0x92, 0x25, 0x3f,
+	0x42, 0x55, 0xdc, 0x22, 0xdf, 0x11, 0x78, 0x2b, 0x64, 0x29, 0x4a, 0x9d, 0x57, 0xc4, 0x7f, 0x0c,
+	0x69, 0x55, 0xc3, 0x2f, 0x81, 0xac, 0xde, 0xd0, 0x64, 0x39, 0x12, 0xd9, 0xab, 0xca, 0xcf, 0x21,
+	0xa5, 0xd1, 0x86, 0x6d, 0xbb, 0xdf, 0x98, 0x66, 0x47, 0xc0, 0x71, 0xe0, 0x1d, 0x6a, 0x51, 0xf7,
+	0x6b, 0x04, 0x63, 0x3d, 0x1a, 0xd8, 0x10, 0x70, 0xd8, 0x83, 0xf4, 0x8e, 0xfd, 0xaa, 0x63, 0xd9,
+	0xba, 0x51, 0x6e, 0xeb, 0x2d, 0x3a, 0x78, 0x8b, 0x89, 0x47, 0xcf, 0x36, 0x68, 0x5c, 0x2a, 0x5d,
+	0xea, 0x88, 0xbb, 0x46, 0xfe, 0xe7, 0x0f, 0xb9, 0x2f, 0x38, 0x3e, 0x20, 0x77, 0x22, 0x39, 0x4c,
+	0x0e, 0x51, 0x37, 0x14, 0x06, 0x2b, 0xbd, 0xe6, 0x7f, 0x51, 0x7c, 0xc1, 0x37, 0xf7, 0xcb, 0x04,
+	0x2c, 0xee, 0x51, 0x37, 0xc0, 0x21, 0xaf, 0x12, 0xce, 0x15, 0x10, 0x18, 0x26, 0x0f, 0x84, 0x80,
+	0x0f, 0xf1, 0xde, 0x25, 0x04, 0x94, 0x98, 0x64, 0xea, 0x89, 0x66, 0x2d, 0x80, 0x77, 0x49, 0x76,
+	0x55, 0x87, 0xf0, 0x32, 0xcb, 0xc7, 0x23, 0xd9, 0xa0, 0x06, 0x90, 0xd8, 0xd0, 0x8e, 0x46, 0xb1,
+	0x31, 0xf2, 0xbe, 0xa0, 0xbb, 0x89, 0x37, 0x2e, 0x42, 0x87, 0x3f, 0x87, 0xb9, 0x6d, 0xde, 0x7a,
+	0x5b, 0x97, 0x5b, 0x61, 0x70, 0x83, 0xd5, 0x0a, 0xd7, 0x2f, 0xb5, 0xc2, 0xdf, 0x27, 0x60, 0xee,
+	0x61, 0xd3, 0x35, 0x4f, 0x74, 0x97, 0x0a, 0x16, 0x59, 0xce, 0x2f, 0x49, 0xbd, 0x2d, 0xa8, 0x3f,
+	0x21, 0xdf, 0xb9, 0xcc, 0xd6, 0xca, 0xe1, 0x9e, 0xe0, 0xe3, 0x89, 0xf6, 0xdb, 0x04, 0xe4, 0x34,
+	0x7a, 0x42, 0x1d, 0xf7, 0x5b, 0x11, 0xe2, 0x08, 0x6a, 0x2e, 0xe4, 0xa7, 0x90, 0x19, 0xbc, 0x1e,
+	0xc2, 0x5d, 0x7b, 0xda, 0xfb, 0x2d, 0xdb, 0xf5, 0x62, 0xa8, 0x5d, 0x5f, 0xc6, 0x42, 0x24, 0xbd,
+	0x6c, 0xd3, 0x5f, 0xc0, 0x9c, 0x0f, 0xbd, 0xbd, 0x6d, 0x77, 0x8e, 0xcc, 0x56, 0x90, 0x21, 0xd7,
+	0x67, 0xf0, 0xcc, 0xe4, 0x96, 0x40, 0x5e, 0xc3, 0xeb, 0xd1, 0xc8, 0xed, 0x7a, 0x53, 0xe1, 0x74,
+	0x60, 0x41, 0x46, 0x6e, 0x98, 0x20, 0x0c, 0x1a, 0x5b, 0x8e, 0xd6, 0x65, 0x7f, 0x49, 0xce, 0x23,
+	0xe3, 0xc1, 0x6a, 0xfb, 0x83, 0x75, 0xb1, 0xb6, 0xf6, 0xc1, 0x99, 0x6d, 0x6d, 0x5c, 0xf4, 0xfa,
+	0xed, 0xec, 0x7c, 0x90, 0xef, 0x32, 0xdd, 0xd3, 0xa3, 0x0b, 0x74, 0x4f, 0x04, 0x57, 0x63, 0xf9,
+	0xbd, 0xae, 0xc9, 0xf6, 0x2f, 0x5a, 0x5e, 0xeb, 0xc5, 0xb5, 0x10, 0x73, 0xe1, 0xab, 0x41, 0x46,
+	0x4a, 0x9c, 0x75, 0x36, 0x78, 0x95, 0x18, 0xfd, 0xb6, 0x96, 0x36, 0xd4, 0xc4, 0xb5, 0xca, 0x00,
+	0x62, 0x28, 0xc6, 0x21, 0x0a, 0xb2, 0x26, 0xe0, 0x96, 0xf0, 0x6a, 0x14, 0x9c, 0xec, 0x00, 0x18,
+	0x64, 0x07, 0x8b, 0x50, 0x51, 0x8c, 0x5b, 0xc5, 0x7c, 0xc4, 0xed, 0xa4, 0xba, 0xaa, 0xc8, 0x0c,
+	0xdd, 0x67, 0xca, 0x7b, 0x16, 0x5c, 0x18, 0x22, 0x56, 0x91, 0x7b, 0x04, 0xd9, 0x9a, 0xeb, 0x50,
+	0xbd, 0x5d, 0xd5, 0x9b, 0x2f, 0xa9, 0xcb, 0x2a, 0x3d, 0x17, 0x17, 0x03, 0xdb, 0x25, 0x0d, 0x95,
+	0x9e, 0x1b, 0x9b, 0x9e, 0x23, 0xb7, 0x13, 0xb8, 0x2b, 0x9a, 0x2b, 0x6a, 0x9e, 0x50, 0x05, 0x54,
+	0xee, 0x9c, 0x71, 0xd1, 0x12, 0xc6, 0x2f, 0x77, 0xc8, 0xc8, 0x07, 0x09, 0x7c, 0x0c, 0x73, 0x0a,
+	0x66, 0xfb, 0x58, 0xef, 0xb4, 0xe8, 0xee, 0x09, 0xed, 0xb8, 0xf1, 0x61, 0xc8, 0x07, 0x90, 0x7c,
+	0x53, 0x04, 0xd8, 0x21, 0xcc, 0xf6, 0x37, 0x49, 0x7e, 0x79, 0xf2, 0xef, 0x52, 0xd4, 0x05, 0x2f,
+	0x21, 0xd1, 0x29, 0xaf, 0xa2, 0x25, 0xf7, 0xa9, 0x0e, 0x39, 0xd9, 0xa9, 0xf9, 0xbf, 0x83, 0x44,
+	0xdd, 0xf4, 0x16, 0xa2, 0x06, 0xc9, 0xaa, 0xa0, 0x28, 0x90, 0xfe, 0x86, 0x04, 0x2e, 0x8e, 0xf9,
+	0x11, 0x96, 0xba, 0xfd, 0xe8, 0x91, 0xba, 0xfd, 0xa0, 0x21, 0xdd, 0x01, 0x50, 0xa9, 0xdb, 0x80,
+	0x9c, 0xac, 0x44, 0x5f, 0x4f, 0xf7, 0xbb, 0x82, 0xe2, 0x7a, 0xe1, 0x0c, 0x0a, 0x2e, 0xfe, 0x73,
+	0xc8, 0xc9, 0x76, 0x2b, 0x4e, 0x7f, 0x5c, 0x16, 0xa9, 0x25, 0xac, 0x9f, 0xb5, 0x84, 0xba, 0x3c,
+	0x22, 0x81, 0x6f, 0x45, 0xe7, 0x1e, 0x11, 0xbf, 0xb7, 0x77, 0xed, 0x88, 0xd1, 0xd1, 0xc7, 0x7d,
+	0xd1, 0xcc, 0x8b, 0x57, 0x1b, 0x8b, 0x6e, 0xe6, 0xa5, 0xcd, 0xeb, 0x10, 0x71, 0x29, 0xfe, 0xc5,
+	0xc6, 0xf0, 0x33, 0x98, 0xf6, 0xae, 0xb1, 0x03, 0x60, 0xf9, 0xb8, 0xfb, 0x70, 0x72, 0x53, 0xc0,
+	0xae, 0x92, 0x6b, 0x91, 0xb0, 0x8c, 0x5a, 0x47, 0x75, 0x97, 0xa3, 0x3d, 0x13, 0xfd, 0x57, 0xe0,
+	0x73, 0xc0, 0x50, 0x92, 0x84, 0xbf, 0x17, 0x84, 0x6b, 0x10, 0x3f, 0x3c, 0xdc, 0x4f, 0xfd, 0x71,
+	0x6c, 0x36, 0xf0, 0x05, 0xa0, 0x97, 0x7a, 0x31, 0xc8, 0x31, 0x1f, 0x0d, 0xc2, 0x01, 0x09, 0x82,
+	0x8b, 0x49, 0xc8, 0x20, 0x5d, 0x33, 0xdb, 0x3d, 0xcb, 0x4b, 0x42, 0x5c, 0xee, 0x47, 0xc2, 0x3f,
+	0xac, 0xd1, 0x9f, 0xf5, 0x28, 0x73, 0xe3, 0x9a, 0x8a, 0xd0, 0x5d, 0x47, 0x30, 0x48, 0x0a, 0xa9,
+	0xce, 0x91, 0x78, 0x46, 0x6e, 0xc3, 0x4c, 0xff, 0xb2, 0x1f, 0xfb, 0x1f, 0x04, 0x43, 0x9f, 0x01,
+	0x0a, 0xf1, 0x26, 0x32, 0xb2, 0x65, 0xc2, 0x9c, 0xed, 0xb4, 0x44, 0xb9, 0x69, 0xda, 0x8e, 0xa1,
+	0x5c, 0xb7, 0x52, 0xf2, 0xe6, 0xb9, 0x2a, 0xbe, 0x7d, 0xff, 0xe4, 0x4e, 0xcb, 0x74, 0x8f, 0x7b,
+	0x8d, 0x62, 0xd3, 0x6e, 0x97, 0x3c, 0x4f, 0xf5, 0x7f, 0x10, 0x36, 0xd4, 0xe7, 0xf1, 0x96, 0xad,
+	0x06, 0xfe, 0x32, 0xba, 0x58, 0xf1, 0xc0, 0x9e, 0xf9, 0x6f, 0xb1, 0xab, 0xa3, 0xd5, 0xb1, 0xea,
+	0x78, 0x75, 0xa2, 0x3a, 0x59, 0x9d, 0xaa, 0x4e, 0x37, 0x26, 0xc5, 0xc4, 0xcd, 0xff, 0x05, 0x00,
+	0x00, 0xff, 0xff, 0xe4, 0xcb, 0x00, 0x47, 0xda, 0x20, 0x00, 0x00,
+}
diff --git a/go/voltha/voltha.proto b/go/voltha/voltha.proto
deleted file mode 100644
index c9e7347..0000000
--- a/go/voltha/voltha.proto
+++ /dev/null
@@ -1,604 +0,0 @@
-/*
- * Top-level Voltha API definition
- *
- * For details, see individual definition files.
- */
-
-syntax = "proto3";
-
-option go_package = "github.com/opencord/voltha-protos/go/voltha";
-
-package voltha;
-
-import "google/api/annotations.proto";
-import "google/protobuf/empty.proto";
-
-import public "voltha_protos/meta.proto";
-import public "voltha_protos/common.proto";
-import public "voltha_protos/health.proto";
-import public "voltha_protos/logical_device.proto";
-import public "voltha_protos/device.proto";
-import public "voltha_protos/adapter.proto";
-import public "voltha_protos/openflow_13.proto";
-
-import "voltha_protos/omci_mib_db.proto";
-import "voltha_protos/omci_alarm_db.proto";
-import "voltha_protos/yang_options.proto";
-
-option java_package = "org.opencord.voltha";
-option java_outer_classname = "VolthaProtos";
-option csharp_namespace = "Opencord.Voltha.Voltha";
-
-message DeviceGroup {
-
-    string id = 1 [(access) = READ_ONLY];
-
-    repeated LogicalDevice logical_devices = 2 [(child_node) = {key: "id"}];
-
-    repeated Device devices = 3 [(child_node) = {key: "id"}];
-}
-
-message DeviceGroups {
-    repeated DeviceGroup items = 1;
-}
-
-
-message AlarmFilterRuleKey {
-    option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
-
-    enum AlarmFilterRuleKey {
-        id = 0;
-        type = 1;
-        severity = 2;
-        resource_id = 3;
-        category = 4;
-        device_id = 5;
-    }
-}
-
-message AlarmFilterRule {
-    AlarmFilterRuleKey.AlarmFilterRuleKey key = 1;
-    string value = 2;
-}
-message AlarmFilter {
-    string id = 1 [(access) = READ_ONLY];
-
-    repeated AlarmFilterRule rules = 2;
-}
-
-message AlarmFilters {
-    repeated AlarmFilter filters = 1;
-}
-
-message Logging {
-    LogLevel.LogLevel level = 1;
-    string package_name = 2;
-}
-
-// CoreInstance represents a core instance.  It is data held in memory when a core
-// is running.  This data is not persistent.
-message CoreInstance {
-    option (yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
-
-    string instance_id = 1  [(access) = READ_ONLY];
-
-    HealthStatus health = 2 [(child_node) = {}];
-
-}
-
-message CoreInstances {
-    option (yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
-    repeated CoreInstance items = 1;
-}
-
-// Voltha represents the Voltha cluster data.  Each Core instance will hold a subset of
-// the entire cluster. However, some items (e.g. adapters) will be held by all cores
-// for better performance
-message Voltha {
-    option (yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
-
-    string version = 1 [(access) = READ_ONLY];
-
-    repeated Adapter adapters = 2 [(child_node) = {key: "id"}];
-
-    repeated LogicalDevice logical_devices = 3 [(child_node) = {key: "id"}];
-
-    repeated Device devices = 4 [(child_node) = {key: "id"}];
-
-    repeated DeviceType device_types = 5 [(child_node) = {key: "id"}];
-
-    repeated DeviceGroup device_groups = 6 [(child_node) = {key: "id"}];
-
-    repeated AlarmFilter alarm_filters = 7 [(child_node) = {key: "id"}];
-
-    repeated
-        omci.MibDeviceData omci_mib_database = 28
-        [(child_node) = {key: "device_id"}];
-
-    repeated
-        alarm.AlarmDeviceData omci_alarm_database = 29
-        [(child_node) = {key: "device_id"}];
-}
-
-// Device Self Test Response
-message SelfTestResponse {
-    option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
-
-	enum SelfTestResult  {
-	    SUCCESS = 0;
-	    FAILURE = 1;
-	    NOT_SUPPORTED = 2;
-	    UNKNOWN_ERROR = 3;
-    }
-    SelfTestResult result = 1;
-}
-
-message OfAgentSubscriber {
-    // ID of ofagent instance
-    string ofagent_id = 1;
-
-    // ID of voltha instance to which the ofagent is subscribed
-    string voltha_id = 2;
-}
-
-// Identifies a membership group a Core belongs to
-message Membership {
-    //  Group name
-    string group_name = 1;
-
-    // Unique ID of a container within that group
-    string id = 2;
-}
-
-/*
- * Voltha APIs
- *
- */
-service VolthaService {
-
-    // Get more information on a given physical device
-    rpc UpdateLogLevel(Logging) returns(google.protobuf.Empty) {
-        option (google.api.http) = {
-            get: "/api/v1/logs"
-        };
-    }
-
-    // Get the membership group of a Voltha Core
-    rpc GetMembership(google.protobuf.Empty) returns(Membership) {
-        option (google.api.http) = {
-            get: "/api/v1/membership"
-        };
-    }
-
-    // Set the membership group of a Voltha Core
-    rpc UpdateMembership(Membership) returns(google.protobuf.Empty) {
-        option (google.api.http) = {
-            post: "/api/v1/membership"
-            body: "*"
-        };
-    }
-
-    // Get high level information on the Voltha cluster
-    rpc GetVoltha(google.protobuf.Empty) returns(Voltha) {
-        option (google.api.http) = {
-            get: "/api/v1"
-        };
-    }
-
-    // List all Voltha cluster core instances
-    rpc ListCoreInstances(google.protobuf.Empty) returns(CoreInstances) {
-        option (google.api.http) = {
-            get: "/api/v1/instances"
-        };
-        option (voltha.yang_xml_tag).xml_tag = 'items';
-        option (voltha.yang_xml_tag).list_items_name = 'items';
-    }
-
-    // Get details on a Voltha cluster instance
-    rpc GetCoreInstance(ID) returns(CoreInstance) {
-        option (google.api.http) = {
-            get: "/api/v1/instances/{id}"
-        };
-    }
-
-    // List all active adapters (plugins) in the Voltha cluster
-    rpc ListAdapters(google.protobuf.Empty) returns(Adapters) {
-        option (google.api.http) = {
-            get: "/api/v1/adapters"
-        };
-        option (voltha.yang_xml_tag).xml_tag = 'adapters';
-    }
-
-
-    // List all logical devices managed by the Voltha cluster
-    rpc ListLogicalDevices(google.protobuf.Empty) returns(LogicalDevices) {
-        option (google.api.http) = {
-            get: "/api/v1/logical_devices"
-        };
-        option (voltha.yang_xml_tag).xml_tag = 'logical_devices';
-    }
-
-    // Get additional information on a given logical device
-    rpc GetLogicalDevice(ID) returns(LogicalDevice) {
-        option (google.api.http) = {
-            get: "/api/v1/logical_devices/{id}"
-        };
-    }
-
-    // List ports of a logical device
-    rpc ListLogicalDevicePorts(ID) returns(LogicalPorts) {
-        option (google.api.http) = {
-            get: "/api/v1/logical_devices/{id}/ports"
-        };
-        option (voltha.yang_xml_tag).xml_tag = 'ports';
-    }
-
-    // Gets a logical device port
-    rpc GetLogicalDevicePort(LogicalPortId) returns(LogicalPort) {
-        option (google.api.http) = {
-            get: "/api/v1/logical_devices/{id}/ports/{port_id}"
-        };
-        option (voltha.yang_xml_tag).xml_tag = 'port';
-    }
-
-    // Enables a logical device port
-    rpc EnableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
-        option (google.api.http) = {
-            post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable"
-        };
-    }
-
-    // Disables a logical device port
-    rpc DisableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
-        option (google.api.http) = {
-            post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable"
-        };
-    }
-
-    // List all flows of a logical device
-    rpc ListLogicalDeviceFlows(ID) returns(openflow_13.Flows) {
-        option (google.api.http) = {
-            get: "/api/v1/logical_devices/{id}/flows"
-        };
-        option (voltha.yang_xml_tag).xml_tag = 'flows';
-        option (voltha.yang_xml_tag).list_items_name = 'items';
-    }
-
-    // Update flow table for logical device
-    rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate)
-            returns(google.protobuf.Empty) {
-        option (google.api.http) = {
-            post: "/api/v1/logical_devices/{id}/flows"
-            body: "*"
-        };
-    }
-
-    // Update meter table for logical device
-    rpc UpdateLogicalDeviceMeterTable(openflow_13.MeterModUpdate)
-            returns(google.protobuf.Empty) {
-        option (google.api.http) = {
-            post: "/api/v1/logical_devices/{id}/meters"
-            body: "*"
-        };
-    }
-
-    // Get all meter stats for logical device
-    rpc GetMeterStatsOfLogicalDevice(ID)
-            returns(openflow_13.MeterStatsReply) {
-        option (google.api.http) = {
-            get: "/api/v1/logical_devices/{id}/meters_stats"
-        };
-    }
-
-    // List all flow groups of a logical device
-    rpc ListLogicalDeviceFlowGroups(ID) returns(openflow_13.FlowGroups) {
-        option (google.api.http) = {
-            get: "/api/v1/logical_devices/{id}/flow_groups"
-        };
-        option (voltha.yang_xml_tag).xml_tag = 'flow_groups';
-        option (voltha.yang_xml_tag).list_items_name = 'items';
-    }
-
-    // Update group table for device
-    rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate)
-            returns(google.protobuf.Empty) {
-        option (google.api.http) = {
-            post: "/api/v1/logical_devices/{id}/flow_groups"
-            body: "*"
-        };
-    }
-
-    // List all physical devices controlled by the Voltha cluster
-    rpc ListDevices(google.protobuf.Empty) returns(Devices) {
-        option (google.api.http) = {
-            get: "/api/v1/devices"
-        };
-        option (voltha.yang_xml_tag).xml_tag = 'devices';
-    }
-
-    // List all physical devices IDs controlled by the Voltha cluster
-    rpc ListDeviceIds(google.protobuf.Empty) returns(IDs) {
-        option (google.api.http) = {
-            get: "/api/v1/deviceids"
-        };
-        option (voltha.yang_xml_tag).xml_tag = 'id';
-        option (voltha.yang_xml_tag).list_items_name = 'items';
-    }
-
-    // Request to a voltha Core to reconcile a set of devices based on their IDs
-    rpc ReconcileDevices(IDs) returns(google.protobuf.Empty) {
-        option (google.api.http) = {
-            post: "/api/v1/deviceids"
-            body: "*"
-        };
-    }
-
-    // Get more information on a given physical device
-    rpc GetDevice(ID) returns(Device) {
-        option (google.api.http) = {
-            get: "/api/v1/devices/{id}"
-        };
-    }
-
-    // Pre-provision a new physical device
-    rpc CreateDevice(Device) returns(Device) {
-        option (google.api.http) = {
-            post: "/api/v1/devices"
-            body: "*"
-        };
-    }
-
-    // Enable a device.  If the device was in pre-provisioned state then it
-    // will transition to ENABLED state.  If it was is DISABLED state then it
-    // will transition to ENABLED state as well.
-    rpc EnableDevice(ID) returns(google.protobuf.Empty) {
-        option (google.api.http) = {
-            post: "/api/v1/devices/{id}/enable"
-        };
-    }
-
-    // Disable a device
-    rpc DisableDevice(ID) returns(google.protobuf.Empty) {
-        option (google.api.http) = {
-            post: "/api/v1/devices/{id}/disable"
-        };
-    }
-
-    // Reboot a device
-    rpc RebootDevice(ID) returns(google.protobuf.Empty) {
-        option (google.api.http) = {
-            post: "/api/v1/devices/{id}/reboot"
-        };
-    }
-
-    // Delete a device
-    rpc DeleteDevice(ID) returns(google.protobuf.Empty) {
-        option (google.api.http) = {
-            delete: "/api/v1/devices/{id}/delete"
-        };
-    }
-
-    // Request an image download to the standby partition
-    // of a device.
-    // Note that the call is expected to be non-blocking.
-    rpc DownloadImage(ImageDownload) returns(OperationResp) {
-        option (google.api.http) = {
-            post: "/api/v1/devices/{id}/image_downloads/{name}"
-            body: "*"
-        };
-    }
-
-    // Get image download status on a device
-    // The request retrieves progress on device and updates db record
-    rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {
-        option (google.api.http) = {
-            get: "/api/v1/devices/{id}/image_downloads/{name}/status"
-        };
-    }
-
-    // Get image download db record
-    rpc GetImageDownload(ImageDownload) returns(ImageDownload) {
-        option (google.api.http) = {
-            get: "/api/v1/devices/{id}/image_downloads/{name}"
-        };
-    }
-
-    // List image download db records for a given device
-    rpc ListImageDownloads(ID) returns(ImageDownloads) {
-        option (google.api.http) = {
-            get: "/api/v1/devices/{id}/image_downloads"
-        };
-    }
-
-    // Cancel an existing image download process on a device
-    rpc CancelImageDownload(ImageDownload) returns(OperationResp) {
-        option (google.api.http) = {
-            delete: "/api/v1/devices/{id}/image_downloads/{name}"
-        };
-    }
-
-    // Activate the specified image at a standby partition
-    // to active partition.
-    // Depending on the device implementation, this call
-    // may or may not cause device reboot.
-    // If no reboot, then a reboot is required to make the
-    // activated image running on device
-    // Note that the call is expected to be non-blocking.
-    rpc ActivateImageUpdate(ImageDownload) returns(OperationResp) {
-        option (google.api.http) = {
-            post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
-            body: "*"
-        };
-    }
-
-    // Revert the specified image at standby partition
-    // to active partition, and revert to previous image
-    // Depending on the device implementation, this call
-    // may or may not cause device reboot.
-    // If no reboot, then a reboot is required to make the
-    // previous image running on device
-    // Note that the call is expected to be non-blocking.
-    rpc RevertImageUpdate(ImageDownload) returns(OperationResp) {
-        option (google.api.http) = {
-            post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
-            body: "*"
-        };
-    }
-
-    // List ports of a device
-    rpc ListDevicePorts(ID) returns(Ports) {
-        option (google.api.http) = {
-            get: "/api/v1/devices/{id}/ports"
-        };
-        option (voltha.yang_xml_tag).xml_tag = 'ports';
-    }
-
-    // List pm config of a device
-    rpc ListDevicePmConfigs(ID) returns(PmConfigs) {
-        option (google.api.http) = {
-            get: "/api/v1/devices/{id}/pm_configs"
-        };
-    }
-
-    // Update the pm config of a device
-    rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {
-        option (google.api.http) = {
-            post: "/api/v1/devices/{id}/pm_configs"
-            body: "*"
-        };
-    }
-
-    // List all flows of a device
-    rpc ListDeviceFlows(ID) returns(openflow_13.Flows) {
-        option (google.api.http) = {
-            get: "/api/v1/devices/{id}/flows"
-        };
-        option (voltha.yang_xml_tag).xml_tag = 'flows';
-        option (voltha.yang_xml_tag).list_items_name = 'items';
-    }
-
-    // List all flow groups of a device
-    rpc ListDeviceFlowGroups(ID) returns(openflow_13.FlowGroups) {
-        option (google.api.http) = {
-            get: "/api/v1/devices/{id}/flow_groups"
-        };
-        option (voltha.yang_xml_tag).xml_tag = 'flow_groups';
-        option (voltha.yang_xml_tag).list_items_name = 'items';
-    }
-
-    // List device types known to Voltha
-    rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {
-        option (google.api.http) = {
-            get: "/api/v1/device_types"
-        };
-        option (voltha.yang_xml_tag).xml_tag = 'device_types';
-    }
-
-    // Get additional information on a device type
-    rpc GetDeviceType(ID) returns(DeviceType) {
-        option (google.api.http) = {
-            get: "/api/v1/device_types/{id}"
-        };
-    }
-
-    // List all device sharding groups
-    rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {
-        option (google.api.http) = {
-            get: "/api/v1/device_groups"
-        };
-        option (voltha.yang_xml_tag).xml_tag = 'device_groups';
-    }
-
-    // Stream control packets to the dataplane
-    rpc StreamPacketsOut(stream openflow_13.PacketOut)
-        returns(google.protobuf.Empty) {
-        // This does not have an HTTP representation
-    }
-
-    // Receive control packet stream
-    rpc ReceivePacketsIn(google.protobuf.Empty)
-        returns(stream openflow_13.PacketIn) {
-        // This does not have an HTTP representation
-    }
-
-    rpc ReceiveChangeEvents(google.protobuf.Empty)
-        returns(stream openflow_13.ChangeEvent) {
-        // This does not have an HTTP representation
-    }
-
-    // Get additional information on a device group
-    rpc GetDeviceGroup(ID) returns(DeviceGroup) {
-        option (google.api.http) = {
-            get: "/api/v1/device_groups/{id}"
-        };
-    }
-
-    rpc CreateAlarmFilter(AlarmFilter) returns(AlarmFilter) {
-        option (google.api.http) = {
-            post: "/api/v1/alarm_filters"
-            body: "*"
-        };
-    }
-
-    rpc GetAlarmFilter(ID) returns(AlarmFilter) {
-        option (google.api.http) = {
-            get: "/api/v1/alarm_filters/{id}"
-        };
-    }
-
-    rpc UpdateAlarmFilter(AlarmFilter) returns(AlarmFilter) {
-        option (google.api.http) = {
-            put: "/api/v1/alarm_filters/{id}"
-            body: "*"
-        };
-    }
-
-    rpc DeleteAlarmFilter(ID) returns(google.protobuf.Empty) {
-        option (google.api.http) = {
-            delete: "/api/v1/alarm_filters/{id}"
-        };
-    }
-
-    rpc ListAlarmFilters(google.protobuf.Empty) returns(AlarmFilters) {
-        option (google.api.http) = {
-            get: "/api/v1/alarm_filters"
-        };
-    }
-
-    rpc GetImages(ID) returns(Images) {
-        option (google.api.http) = {
-            get: "/api/v1/devices/{id}/images"
-        };
-    }
-
-    rpc SelfTest(ID) returns(SelfTestResponse) {
-        option (google.api.http) = {
-            post: "/api/v1/devices/{id}/self_test"
-        };
-    }
-
-    // OpenOMCI MIB information
-    rpc GetMibDeviceData(ID) returns(omci.MibDeviceData) {
-        option (google.api.http) = {
-            get: "/api/v1/openomci/{id}/mib"
-        };
-    }
-
-    // OpenOMCI ALARM information
-    rpc GetAlarmDeviceData(ID) returns(alarm.AlarmDeviceData) {
-        option (google.api.http) = {
-            get: "/api/v1/openomci/{id}/alarm"
-        };
-    }
-
-    // Simulate an Alarm
-    rpc SimulateAlarm(SimulateAlarmRequest) returns(OperationResp) {
-        option (google.api.http) = {
-            post: "/api/v1/devices/{id}/simulate_larm"
-            body: "*"
-        };
-    }
-    rpc Subscribe (OfAgentSubscriber) returns (OfAgentSubscriber) {
-    }
-}
-
