Fix binapigen decoding and minor improvements
[govpp.git] / internal / testbinapi / binapi2001 / lisp_gpe / lisp_gpe.ba.go
diff --git a/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe.ba.go b/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe.ba.go
new file mode 100644 (file)
index 0000000..3dd5ab6
--- /dev/null
@@ -0,0 +1,979 @@
+// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
+// versions:
+//  binapi-generator: v0.4.0-dev
+//  VPP:              20.01
+// source: .vppapi/core/lisp_gpe.api.json
+
+// Package lisp_gpe contains generated bindings for API file lisp_gpe.api.
+//
+// Contents:
+//   3 structs
+//  20 messages
+//
+package lisp_gpe
+
+import (
+       api "git.fd.io/govpp.git/api"
+       codec "git.fd.io/govpp.git/codec"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the GoVPP api package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// GoVPP api package needs to be updated.
+const _ = api.GoVppAPIPackageIsVersion2
+
+const (
+       APIFile    = "lisp_gpe"
+       APIVersion = "1.0.0"
+       VersionCrc = 0x9396c80c
+)
+
+// GpeFwdEntry defines type 'gpe_fwd_entry'.
+type GpeFwdEntry struct {
+       FwdEntryIndex uint32 `binapi:"u32,name=fwd_entry_index" json:"fwd_entry_index,omitempty"`
+       DpTable       uint32 `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
+       EidType       uint8  `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
+       LeidPrefixLen uint8  `binapi:"u8,name=leid_prefix_len" json:"leid_prefix_len,omitempty"`
+       ReidPrefixLen uint8  `binapi:"u8,name=reid_prefix_len" json:"reid_prefix_len,omitempty"`
+       Leid          []byte `binapi:"u8[16],name=leid" json:"leid,omitempty"`
+       Reid          []byte `binapi:"u8[16],name=reid" json:"reid,omitempty"`
+       Vni           uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
+       Action        uint8  `binapi:"u8,name=action" json:"action,omitempty"`
+}
+
+// GpeLocator defines type 'gpe_locator'.
+type GpeLocator struct {
+       IsIP4  uint8  `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
+       Weight uint8  `binapi:"u8,name=weight" json:"weight,omitempty"`
+       Addr   []byte `binapi:"u8[16],name=addr" json:"addr,omitempty"`
+}
+
+// GpeNativeFwdRpath defines type 'gpe_native_fwd_rpath'.
+type GpeNativeFwdRpath struct {
+       FibIndex    uint32 `binapi:"u32,name=fib_index" json:"fib_index,omitempty"`
+       NhSwIfIndex uint32 `binapi:"u32,name=nh_sw_if_index" json:"nh_sw_if_index,omitempty"`
+       IsIP4       uint8  `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
+       NhAddr      []byte `binapi:"u8[16],name=nh_addr" json:"nh_addr,omitempty"`
+}
+
+// GpeAddDelFwdEntry defines message 'gpe_add_del_fwd_entry'.
+type GpeAddDelFwdEntry struct {
+       IsAdd   uint8        `binapi:"u8,name=is_add" json:"is_add,omitempty"`
+       EidType uint8        `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
+       RmtEid  []byte       `binapi:"u8[16],name=rmt_eid" json:"rmt_eid,omitempty"`
+       LclEid  []byte       `binapi:"u8[16],name=lcl_eid" json:"lcl_eid,omitempty"`
+       RmtLen  uint8        `binapi:"u8,name=rmt_len" json:"rmt_len,omitempty"`
+       LclLen  uint8        `binapi:"u8,name=lcl_len" json:"lcl_len,omitempty"`
+       Vni     uint32       `binapi:"u32,name=vni" json:"vni,omitempty"`
+       DpTable uint32       `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
+       Action  uint8        `binapi:"u8,name=action" json:"action,omitempty"`
+       LocNum  uint32       `binapi:"u32,name=loc_num" json:"-"`
+       Locs    []GpeLocator `binapi:"gpe_locator[loc_num],name=locs" json:"locs,omitempty"`
+}
+
+func (m *GpeAddDelFwdEntry) Reset()               { *m = GpeAddDelFwdEntry{} }
+func (*GpeAddDelFwdEntry) GetMessageName() string { return "gpe_add_del_fwd_entry" }
+func (*GpeAddDelFwdEntry) GetCrcString() string   { return "afbf857a" }
+func (*GpeAddDelFwdEntry) GetMessageType() api.MessageType {
+       return api.RequestMessage
+}
+
+func (m *GpeAddDelFwdEntry) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 1      // m.IsAdd
+       size += 1      // m.EidType
+       size += 1 * 16 // m.RmtEid
+       size += 1 * 16 // m.LclEid
+       size += 1      // m.RmtLen
+       size += 1      // m.LclLen
+       size += 4      // m.Vni
+       size += 4      // m.DpTable
+       size += 1      // m.Action
+       size += 4      // m.LocNum
+       for j1 := 0; j1 < len(m.Locs); j1++ {
+               var s1 GpeLocator
+               _ = s1
+               if j1 < len(m.Locs) {
+                       s1 = m.Locs[j1]
+               }
+               size += 1      // s1.IsIP4
+               size += 1      // s1.Weight
+               size += 1 * 16 // s1.Addr
+       }
+       return size
+}
+func (m *GpeAddDelFwdEntry) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeUint8(m.IsAdd)
+       buf.EncodeUint8(m.EidType)
+       buf.EncodeBytes(m.RmtEid, 16)
+       buf.EncodeBytes(m.LclEid, 16)
+       buf.EncodeUint8(m.RmtLen)
+       buf.EncodeUint8(m.LclLen)
+       buf.EncodeUint32(m.Vni)
+       buf.EncodeUint32(m.DpTable)
+       buf.EncodeUint8(m.Action)
+       buf.EncodeUint32(uint32(len(m.Locs)))
+       for j0 := 0; j0 < len(m.Locs); j0++ {
+               var v0 GpeLocator // Locs
+               if j0 < len(m.Locs) {
+                       v0 = m.Locs[j0]
+               }
+               buf.EncodeUint8(v0.IsIP4)
+               buf.EncodeUint8(v0.Weight)
+               buf.EncodeBytes(v0.Addr, 16)
+       }
+       return buf.Bytes(), nil
+}
+func (m *GpeAddDelFwdEntry) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.IsAdd = buf.DecodeUint8()
+       m.EidType = buf.DecodeUint8()
+       m.RmtEid = make([]byte, 16)
+       copy(m.RmtEid, buf.DecodeBytes(len(m.RmtEid)))
+       m.LclEid = make([]byte, 16)
+       copy(m.LclEid, buf.DecodeBytes(len(m.LclEid)))
+       m.RmtLen = buf.DecodeUint8()
+       m.LclLen = buf.DecodeUint8()
+       m.Vni = buf.DecodeUint32()
+       m.DpTable = buf.DecodeUint32()
+       m.Action = buf.DecodeUint8()
+       m.LocNum = buf.DecodeUint32()
+       m.Locs = make([]GpeLocator, m.LocNum)
+       for j0 := 0; j0 < len(m.Locs); j0++ {
+               m.Locs[j0].IsIP4 = buf.DecodeUint8()
+               m.Locs[j0].Weight = buf.DecodeUint8()
+               m.Locs[j0].Addr = make([]byte, 16)
+               copy(m.Locs[j0].Addr, buf.DecodeBytes(len(m.Locs[j0].Addr)))
+       }
+       return nil
+}
+
+// GpeAddDelFwdEntryReply defines message 'gpe_add_del_fwd_entry_reply'.
+type GpeAddDelFwdEntryReply struct {
+       Retval        int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
+       FwdEntryIndex uint32 `binapi:"u32,name=fwd_entry_index" json:"fwd_entry_index,omitempty"`
+}
+
+func (m *GpeAddDelFwdEntryReply) Reset()               { *m = GpeAddDelFwdEntryReply{} }
+func (*GpeAddDelFwdEntryReply) GetMessageName() string { return "gpe_add_del_fwd_entry_reply" }
+func (*GpeAddDelFwdEntryReply) GetCrcString() string   { return "efe5f176" }
+func (*GpeAddDelFwdEntryReply) GetMessageType() api.MessageType {
+       return api.ReplyMessage
+}
+
+func (m *GpeAddDelFwdEntryReply) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 4 // m.Retval
+       size += 4 // m.FwdEntryIndex
+       return size
+}
+func (m *GpeAddDelFwdEntryReply) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeInt32(m.Retval)
+       buf.EncodeUint32(m.FwdEntryIndex)
+       return buf.Bytes(), nil
+}
+func (m *GpeAddDelFwdEntryReply) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.Retval = buf.DecodeInt32()
+       m.FwdEntryIndex = buf.DecodeUint32()
+       return nil
+}
+
+// GpeAddDelIface defines message 'gpe_add_del_iface'.
+type GpeAddDelIface struct {
+       IsAdd   uint8  `binapi:"u8,name=is_add" json:"is_add,omitempty"`
+       IsL2    uint8  `binapi:"u8,name=is_l2" json:"is_l2,omitempty"`
+       DpTable uint32 `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
+       Vni     uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
+}
+
+func (m *GpeAddDelIface) Reset()               { *m = GpeAddDelIface{} }
+func (*GpeAddDelIface) GetMessageName() string { return "gpe_add_del_iface" }
+func (*GpeAddDelIface) GetCrcString() string   { return "42d6b533" }
+func (*GpeAddDelIface) GetMessageType() api.MessageType {
+       return api.RequestMessage
+}
+
+func (m *GpeAddDelIface) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 1 // m.IsAdd
+       size += 1 // m.IsL2
+       size += 4 // m.DpTable
+       size += 4 // m.Vni
+       return size
+}
+func (m *GpeAddDelIface) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeUint8(m.IsAdd)
+       buf.EncodeUint8(m.IsL2)
+       buf.EncodeUint32(m.DpTable)
+       buf.EncodeUint32(m.Vni)
+       return buf.Bytes(), nil
+}
+func (m *GpeAddDelIface) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.IsAdd = buf.DecodeUint8()
+       m.IsL2 = buf.DecodeUint8()
+       m.DpTable = buf.DecodeUint32()
+       m.Vni = buf.DecodeUint32()
+       return nil
+}
+
+// GpeAddDelIfaceReply defines message 'gpe_add_del_iface_reply'.
+type GpeAddDelIfaceReply struct {
+       Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *GpeAddDelIfaceReply) Reset()               { *m = GpeAddDelIfaceReply{} }
+func (*GpeAddDelIfaceReply) GetMessageName() string { return "gpe_add_del_iface_reply" }
+func (*GpeAddDelIfaceReply) GetCrcString() string   { return "e8d4e804" }
+func (*GpeAddDelIfaceReply) GetMessageType() api.MessageType {
+       return api.ReplyMessage
+}
+
+func (m *GpeAddDelIfaceReply) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 4 // m.Retval
+       return size
+}
+func (m *GpeAddDelIfaceReply) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeInt32(m.Retval)
+       return buf.Bytes(), nil
+}
+func (m *GpeAddDelIfaceReply) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.Retval = buf.DecodeInt32()
+       return nil
+}
+
+// GpeAddDelNativeFwdRpath defines message 'gpe_add_del_native_fwd_rpath'.
+type GpeAddDelNativeFwdRpath struct {
+       IsAdd       uint8  `binapi:"u8,name=is_add" json:"is_add,omitempty"`
+       TableID     uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
+       NhSwIfIndex uint32 `binapi:"u32,name=nh_sw_if_index" json:"nh_sw_if_index,omitempty"`
+       IsIP4       uint8  `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
+       NhAddr      []byte `binapi:"u8[16],name=nh_addr" json:"nh_addr,omitempty"`
+}
+
+func (m *GpeAddDelNativeFwdRpath) Reset()               { *m = GpeAddDelNativeFwdRpath{} }
+func (*GpeAddDelNativeFwdRpath) GetMessageName() string { return "gpe_add_del_native_fwd_rpath" }
+func (*GpeAddDelNativeFwdRpath) GetCrcString() string   { return "bfc42b8f" }
+func (*GpeAddDelNativeFwdRpath) GetMessageType() api.MessageType {
+       return api.RequestMessage
+}
+
+func (m *GpeAddDelNativeFwdRpath) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 1      // m.IsAdd
+       size += 4      // m.TableID
+       size += 4      // m.NhSwIfIndex
+       size += 1      // m.IsIP4
+       size += 1 * 16 // m.NhAddr
+       return size
+}
+func (m *GpeAddDelNativeFwdRpath) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeUint8(m.IsAdd)
+       buf.EncodeUint32(m.TableID)
+       buf.EncodeUint32(m.NhSwIfIndex)
+       buf.EncodeUint8(m.IsIP4)
+       buf.EncodeBytes(m.NhAddr, 16)
+       return buf.Bytes(), nil
+}
+func (m *GpeAddDelNativeFwdRpath) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.IsAdd = buf.DecodeUint8()
+       m.TableID = buf.DecodeUint32()
+       m.NhSwIfIndex = buf.DecodeUint32()
+       m.IsIP4 = buf.DecodeUint8()
+       m.NhAddr = make([]byte, 16)
+       copy(m.NhAddr, buf.DecodeBytes(len(m.NhAddr)))
+       return nil
+}
+
+// GpeAddDelNativeFwdRpathReply defines message 'gpe_add_del_native_fwd_rpath_reply'.
+type GpeAddDelNativeFwdRpathReply struct {
+       Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *GpeAddDelNativeFwdRpathReply) Reset() { *m = GpeAddDelNativeFwdRpathReply{} }
+func (*GpeAddDelNativeFwdRpathReply) GetMessageName() string {
+       return "gpe_add_del_native_fwd_rpath_reply"
+}
+func (*GpeAddDelNativeFwdRpathReply) GetCrcString() string { return "e8d4e804" }
+func (*GpeAddDelNativeFwdRpathReply) GetMessageType() api.MessageType {
+       return api.ReplyMessage
+}
+
+func (m *GpeAddDelNativeFwdRpathReply) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 4 // m.Retval
+       return size
+}
+func (m *GpeAddDelNativeFwdRpathReply) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeInt32(m.Retval)
+       return buf.Bytes(), nil
+}
+func (m *GpeAddDelNativeFwdRpathReply) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.Retval = buf.DecodeInt32()
+       return nil
+}
+
+// GpeEnableDisable defines message 'gpe_enable_disable'.
+type GpeEnableDisable struct {
+       IsEn uint8 `binapi:"u8,name=is_en" json:"is_en,omitempty"`
+}
+
+func (m *GpeEnableDisable) Reset()               { *m = GpeEnableDisable{} }
+func (*GpeEnableDisable) GetMessageName() string { return "gpe_enable_disable" }
+func (*GpeEnableDisable) GetCrcString() string   { return "eb0e943b" }
+func (*GpeEnableDisable) GetMessageType() api.MessageType {
+       return api.RequestMessage
+}
+
+func (m *GpeEnableDisable) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 1 // m.IsEn
+       return size
+}
+func (m *GpeEnableDisable) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeUint8(m.IsEn)
+       return buf.Bytes(), nil
+}
+func (m *GpeEnableDisable) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.IsEn = buf.DecodeUint8()
+       return nil
+}
+
+// GpeEnableDisableReply defines message 'gpe_enable_disable_reply'.
+type GpeEnableDisableReply struct {
+       Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *GpeEnableDisableReply) Reset()               { *m = GpeEnableDisableReply{} }
+func (*GpeEnableDisableReply) GetMessageName() string { return "gpe_enable_disable_reply" }
+func (*GpeEnableDisableReply) GetCrcString() string   { return "e8d4e804" }
+func (*GpeEnableDisableReply) GetMessageType() api.MessageType {
+       return api.ReplyMessage
+}
+
+func (m *GpeEnableDisableReply) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 4 // m.Retval
+       return size
+}
+func (m *GpeEnableDisableReply) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeInt32(m.Retval)
+       return buf.Bytes(), nil
+}
+func (m *GpeEnableDisableReply) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.Retval = buf.DecodeInt32()
+       return nil
+}
+
+// GpeFwdEntriesGet defines message 'gpe_fwd_entries_get'.
+type GpeFwdEntriesGet struct {
+       Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
+}
+
+func (m *GpeFwdEntriesGet) Reset()               { *m = GpeFwdEntriesGet{} }
+func (*GpeFwdEntriesGet) GetMessageName() string { return "gpe_fwd_entries_get" }
+func (*GpeFwdEntriesGet) GetCrcString() string   { return "8d1f2fe9" }
+func (*GpeFwdEntriesGet) GetMessageType() api.MessageType {
+       return api.RequestMessage
+}
+
+func (m *GpeFwdEntriesGet) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 4 // m.Vni
+       return size
+}
+func (m *GpeFwdEntriesGet) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeUint32(m.Vni)
+       return buf.Bytes(), nil
+}
+func (m *GpeFwdEntriesGet) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.Vni = buf.DecodeUint32()
+       return nil
+}
+
+// GpeFwdEntriesGetReply defines message 'gpe_fwd_entries_get_reply'.
+type GpeFwdEntriesGetReply struct {
+       Retval  int32         `binapi:"i32,name=retval" json:"retval,omitempty"`
+       Count   uint32        `binapi:"u32,name=count" json:"-"`
+       Entries []GpeFwdEntry `binapi:"gpe_fwd_entry[count],name=entries" json:"entries,omitempty"`
+}
+
+func (m *GpeFwdEntriesGetReply) Reset()               { *m = GpeFwdEntriesGetReply{} }
+func (*GpeFwdEntriesGetReply) GetMessageName() string { return "gpe_fwd_entries_get_reply" }
+func (*GpeFwdEntriesGetReply) GetCrcString() string   { return "07b02c34" }
+func (*GpeFwdEntriesGetReply) GetMessageType() api.MessageType {
+       return api.ReplyMessage
+}
+
+func (m *GpeFwdEntriesGetReply) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 4 // m.Retval
+       size += 4 // m.Count
+       for j1 := 0; j1 < len(m.Entries); j1++ {
+               var s1 GpeFwdEntry
+               _ = s1
+               if j1 < len(m.Entries) {
+                       s1 = m.Entries[j1]
+               }
+               size += 4      // s1.FwdEntryIndex
+               size += 4      // s1.DpTable
+               size += 1      // s1.EidType
+               size += 1      // s1.LeidPrefixLen
+               size += 1      // s1.ReidPrefixLen
+               size += 1 * 16 // s1.Leid
+               size += 1 * 16 // s1.Reid
+               size += 4      // s1.Vni
+               size += 1      // s1.Action
+       }
+       return size
+}
+func (m *GpeFwdEntriesGetReply) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeInt32(m.Retval)
+       buf.EncodeUint32(uint32(len(m.Entries)))
+       for j0 := 0; j0 < len(m.Entries); j0++ {
+               var v0 GpeFwdEntry // Entries
+               if j0 < len(m.Entries) {
+                       v0 = m.Entries[j0]
+               }
+               buf.EncodeUint32(v0.FwdEntryIndex)
+               buf.EncodeUint32(v0.DpTable)
+               buf.EncodeUint8(v0.EidType)
+               buf.EncodeUint8(v0.LeidPrefixLen)
+               buf.EncodeUint8(v0.ReidPrefixLen)
+               buf.EncodeBytes(v0.Leid, 16)
+               buf.EncodeBytes(v0.Reid, 16)
+               buf.EncodeUint32(v0.Vni)
+               buf.EncodeUint8(v0.Action)
+       }
+       return buf.Bytes(), nil
+}
+func (m *GpeFwdEntriesGetReply) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.Retval = buf.DecodeInt32()
+       m.Count = buf.DecodeUint32()
+       m.Entries = make([]GpeFwdEntry, m.Count)
+       for j0 := 0; j0 < len(m.Entries); j0++ {
+               m.Entries[j0].FwdEntryIndex = buf.DecodeUint32()
+               m.Entries[j0].DpTable = buf.DecodeUint32()
+               m.Entries[j0].EidType = buf.DecodeUint8()
+               m.Entries[j0].LeidPrefixLen = buf.DecodeUint8()
+               m.Entries[j0].ReidPrefixLen = buf.DecodeUint8()
+               m.Entries[j0].Leid = make([]byte, 16)
+               copy(m.Entries[j0].Leid, buf.DecodeBytes(len(m.Entries[j0].Leid)))
+               m.Entries[j0].Reid = make([]byte, 16)
+               copy(m.Entries[j0].Reid, buf.DecodeBytes(len(m.Entries[j0].Reid)))
+               m.Entries[j0].Vni = buf.DecodeUint32()
+               m.Entries[j0].Action = buf.DecodeUint8()
+       }
+       return nil
+}
+
+// GpeFwdEntryPathDetails defines message 'gpe_fwd_entry_path_details'.
+type GpeFwdEntryPathDetails struct {
+       LclLoc GpeLocator `binapi:"gpe_locator,name=lcl_loc" json:"lcl_loc,omitempty"`
+       RmtLoc GpeLocator `binapi:"gpe_locator,name=rmt_loc" json:"rmt_loc,omitempty"`
+}
+
+func (m *GpeFwdEntryPathDetails) Reset()               { *m = GpeFwdEntryPathDetails{} }
+func (*GpeFwdEntryPathDetails) GetMessageName() string { return "gpe_fwd_entry_path_details" }
+func (*GpeFwdEntryPathDetails) GetCrcString() string   { return "a9bdc1f1" }
+func (*GpeFwdEntryPathDetails) GetMessageType() api.MessageType {
+       return api.ReplyMessage
+}
+
+func (m *GpeFwdEntryPathDetails) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 1      // m.LclLoc.IsIP4
+       size += 1      // m.LclLoc.Weight
+       size += 1 * 16 // m.LclLoc.Addr
+       size += 1      // m.RmtLoc.IsIP4
+       size += 1      // m.RmtLoc.Weight
+       size += 1 * 16 // m.RmtLoc.Addr
+       return size
+}
+func (m *GpeFwdEntryPathDetails) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeUint8(m.LclLoc.IsIP4)
+       buf.EncodeUint8(m.LclLoc.Weight)
+       buf.EncodeBytes(m.LclLoc.Addr, 16)
+       buf.EncodeUint8(m.RmtLoc.IsIP4)
+       buf.EncodeUint8(m.RmtLoc.Weight)
+       buf.EncodeBytes(m.RmtLoc.Addr, 16)
+       return buf.Bytes(), nil
+}
+func (m *GpeFwdEntryPathDetails) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.LclLoc.IsIP4 = buf.DecodeUint8()
+       m.LclLoc.Weight = buf.DecodeUint8()
+       m.LclLoc.Addr = make([]byte, 16)
+       copy(m.LclLoc.Addr, buf.DecodeBytes(len(m.LclLoc.Addr)))
+       m.RmtLoc.IsIP4 = buf.DecodeUint8()
+       m.RmtLoc.Weight = buf.DecodeUint8()
+       m.RmtLoc.Addr = make([]byte, 16)
+       copy(m.RmtLoc.Addr, buf.DecodeBytes(len(m.RmtLoc.Addr)))
+       return nil
+}
+
+// GpeFwdEntryPathDump defines message 'gpe_fwd_entry_path_dump'.
+type GpeFwdEntryPathDump struct {
+       FwdEntryIndex uint32 `binapi:"u32,name=fwd_entry_index" json:"fwd_entry_index,omitempty"`
+}
+
+func (m *GpeFwdEntryPathDump) Reset()               { *m = GpeFwdEntryPathDump{} }
+func (*GpeFwdEntryPathDump) GetMessageName() string { return "gpe_fwd_entry_path_dump" }
+func (*GpeFwdEntryPathDump) GetCrcString() string   { return "39bce980" }
+func (*GpeFwdEntryPathDump) GetMessageType() api.MessageType {
+       return api.RequestMessage
+}
+
+func (m *GpeFwdEntryPathDump) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 4 // m.FwdEntryIndex
+       return size
+}
+func (m *GpeFwdEntryPathDump) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeUint32(m.FwdEntryIndex)
+       return buf.Bytes(), nil
+}
+func (m *GpeFwdEntryPathDump) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.FwdEntryIndex = buf.DecodeUint32()
+       return nil
+}
+
+// GpeFwdEntryVnisGet defines message 'gpe_fwd_entry_vnis_get'.
+type GpeFwdEntryVnisGet struct{}
+
+func (m *GpeFwdEntryVnisGet) Reset()               { *m = GpeFwdEntryVnisGet{} }
+func (*GpeFwdEntryVnisGet) GetMessageName() string { return "gpe_fwd_entry_vnis_get" }
+func (*GpeFwdEntryVnisGet) GetCrcString() string   { return "51077d14" }
+func (*GpeFwdEntryVnisGet) GetMessageType() api.MessageType {
+       return api.RequestMessage
+}
+
+func (m *GpeFwdEntryVnisGet) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       return size
+}
+func (m *GpeFwdEntryVnisGet) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       return buf.Bytes(), nil
+}
+func (m *GpeFwdEntryVnisGet) Unmarshal(b []byte) error {
+       return nil
+}
+
+// GpeFwdEntryVnisGetReply defines message 'gpe_fwd_entry_vnis_get_reply'.
+type GpeFwdEntryVnisGetReply struct {
+       Retval int32    `binapi:"i32,name=retval" json:"retval,omitempty"`
+       Count  uint32   `binapi:"u32,name=count" json:"-"`
+       Vnis   []uint32 `binapi:"u32[count],name=vnis" json:"vnis,omitempty"`
+}
+
+func (m *GpeFwdEntryVnisGetReply) Reset()               { *m = GpeFwdEntryVnisGetReply{} }
+func (*GpeFwdEntryVnisGetReply) GetMessageName() string { return "gpe_fwd_entry_vnis_get_reply" }
+func (*GpeFwdEntryVnisGetReply) GetCrcString() string   { return "aa70da20" }
+func (*GpeFwdEntryVnisGetReply) GetMessageType() api.MessageType {
+       return api.ReplyMessage
+}
+
+func (m *GpeFwdEntryVnisGetReply) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 4               // m.Retval
+       size += 4               // m.Count
+       size += 4 * len(m.Vnis) // m.Vnis
+       return size
+}
+func (m *GpeFwdEntryVnisGetReply) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeInt32(m.Retval)
+       buf.EncodeUint32(uint32(len(m.Vnis)))
+       for i := 0; i < len(m.Vnis); i++ {
+               var x uint32
+               if i < len(m.Vnis) {
+                       x = uint32(m.Vnis[i])
+               }
+               buf.EncodeUint32(x)
+       }
+       return buf.Bytes(), nil
+}
+func (m *GpeFwdEntryVnisGetReply) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.Retval = buf.DecodeInt32()
+       m.Count = buf.DecodeUint32()
+       m.Vnis = make([]uint32, m.Count)
+       for i := 0; i < len(m.Vnis); i++ {
+               m.Vnis[i] = buf.DecodeUint32()
+       }
+       return nil
+}
+
+// GpeGetEncapMode defines message 'gpe_get_encap_mode'.
+type GpeGetEncapMode struct{}
+
+func (m *GpeGetEncapMode) Reset()               { *m = GpeGetEncapMode{} }
+func (*GpeGetEncapMode) GetMessageName() string { return "gpe_get_encap_mode" }
+func (*GpeGetEncapMode) GetCrcString() string   { return "51077d14" }
+func (*GpeGetEncapMode) GetMessageType() api.MessageType {
+       return api.RequestMessage
+}
+
+func (m *GpeGetEncapMode) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       return size
+}
+func (m *GpeGetEncapMode) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       return buf.Bytes(), nil
+}
+func (m *GpeGetEncapMode) Unmarshal(b []byte) error {
+       return nil
+}
+
+// GpeGetEncapModeReply defines message 'gpe_get_encap_mode_reply'.
+type GpeGetEncapModeReply struct {
+       Retval    int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+       EncapMode uint8 `binapi:"u8,name=encap_mode" json:"encap_mode,omitempty"`
+}
+
+func (m *GpeGetEncapModeReply) Reset()               { *m = GpeGetEncapModeReply{} }
+func (*GpeGetEncapModeReply) GetMessageName() string { return "gpe_get_encap_mode_reply" }
+func (*GpeGetEncapModeReply) GetCrcString() string   { return "36e3f7ca" }
+func (*GpeGetEncapModeReply) GetMessageType() api.MessageType {
+       return api.ReplyMessage
+}
+
+func (m *GpeGetEncapModeReply) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 4 // m.Retval
+       size += 1 // m.EncapMode
+       return size
+}
+func (m *GpeGetEncapModeReply) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeInt32(m.Retval)
+       buf.EncodeUint8(m.EncapMode)
+       return buf.Bytes(), nil
+}
+func (m *GpeGetEncapModeReply) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.Retval = buf.DecodeInt32()
+       m.EncapMode = buf.DecodeUint8()
+       return nil
+}
+
+// GpeNativeFwdRpathsGet defines message 'gpe_native_fwd_rpaths_get'.
+type GpeNativeFwdRpathsGet struct {
+       IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
+}
+
+func (m *GpeNativeFwdRpathsGet) Reset()               { *m = GpeNativeFwdRpathsGet{} }
+func (*GpeNativeFwdRpathsGet) GetMessageName() string { return "gpe_native_fwd_rpaths_get" }
+func (*GpeNativeFwdRpathsGet) GetCrcString() string   { return "c5e0d91b" }
+func (*GpeNativeFwdRpathsGet) GetMessageType() api.MessageType {
+       return api.RequestMessage
+}
+
+func (m *GpeNativeFwdRpathsGet) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 1 // m.IsIP4
+       return size
+}
+func (m *GpeNativeFwdRpathsGet) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeUint8(m.IsIP4)
+       return buf.Bytes(), nil
+}
+func (m *GpeNativeFwdRpathsGet) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.IsIP4 = buf.DecodeUint8()
+       return nil
+}
+
+// GpeNativeFwdRpathsGetReply defines message 'gpe_native_fwd_rpaths_get_reply'.
+type GpeNativeFwdRpathsGetReply struct {
+       Retval  int32               `binapi:"i32,name=retval" json:"retval,omitempty"`
+       Count   uint32              `binapi:"u32,name=count" json:"-"`
+       Entries []GpeNativeFwdRpath `binapi:"gpe_native_fwd_rpath[count],name=entries" json:"entries,omitempty"`
+}
+
+func (m *GpeNativeFwdRpathsGetReply) Reset()               { *m = GpeNativeFwdRpathsGetReply{} }
+func (*GpeNativeFwdRpathsGetReply) GetMessageName() string { return "gpe_native_fwd_rpaths_get_reply" }
+func (*GpeNativeFwdRpathsGetReply) GetCrcString() string   { return "1e4536e3" }
+func (*GpeNativeFwdRpathsGetReply) GetMessageType() api.MessageType {
+       return api.ReplyMessage
+}
+
+func (m *GpeNativeFwdRpathsGetReply) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 4 // m.Retval
+       size += 4 // m.Count
+       for j1 := 0; j1 < len(m.Entries); j1++ {
+               var s1 GpeNativeFwdRpath
+               _ = s1
+               if j1 < len(m.Entries) {
+                       s1 = m.Entries[j1]
+               }
+               size += 4      // s1.FibIndex
+               size += 4      // s1.NhSwIfIndex
+               size += 1      // s1.IsIP4
+               size += 1 * 16 // s1.NhAddr
+       }
+       return size
+}
+func (m *GpeNativeFwdRpathsGetReply) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeInt32(m.Retval)
+       buf.EncodeUint32(uint32(len(m.Entries)))
+       for j0 := 0; j0 < len(m.Entries); j0++ {
+               var v0 GpeNativeFwdRpath // Entries
+               if j0 < len(m.Entries) {
+                       v0 = m.Entries[j0]
+               }
+               buf.EncodeUint32(v0.FibIndex)
+               buf.EncodeUint32(v0.NhSwIfIndex)
+               buf.EncodeUint8(v0.IsIP4)
+               buf.EncodeBytes(v0.NhAddr, 16)
+       }
+       return buf.Bytes(), nil
+}
+func (m *GpeNativeFwdRpathsGetReply) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.Retval = buf.DecodeInt32()
+       m.Count = buf.DecodeUint32()
+       m.Entries = make([]GpeNativeFwdRpath, m.Count)
+       for j0 := 0; j0 < len(m.Entries); j0++ {
+               m.Entries[j0].FibIndex = buf.DecodeUint32()
+               m.Entries[j0].NhSwIfIndex = buf.DecodeUint32()
+               m.Entries[j0].IsIP4 = buf.DecodeUint8()
+               m.Entries[j0].NhAddr = make([]byte, 16)
+               copy(m.Entries[j0].NhAddr, buf.DecodeBytes(len(m.Entries[j0].NhAddr)))
+       }
+       return nil
+}
+
+// GpeSetEncapMode defines message 'gpe_set_encap_mode'.
+type GpeSetEncapMode struct {
+       Mode uint8 `binapi:"u8,name=mode" json:"mode,omitempty"`
+}
+
+func (m *GpeSetEncapMode) Reset()               { *m = GpeSetEncapMode{} }
+func (*GpeSetEncapMode) GetMessageName() string { return "gpe_set_encap_mode" }
+func (*GpeSetEncapMode) GetCrcString() string   { return "f3f93ce9" }
+func (*GpeSetEncapMode) GetMessageType() api.MessageType {
+       return api.RequestMessage
+}
+
+func (m *GpeSetEncapMode) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 1 // m.Mode
+       return size
+}
+func (m *GpeSetEncapMode) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeUint8(m.Mode)
+       return buf.Bytes(), nil
+}
+func (m *GpeSetEncapMode) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.Mode = buf.DecodeUint8()
+       return nil
+}
+
+// GpeSetEncapModeReply defines message 'gpe_set_encap_mode_reply'.
+type GpeSetEncapModeReply struct {
+       Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *GpeSetEncapModeReply) Reset()               { *m = GpeSetEncapModeReply{} }
+func (*GpeSetEncapModeReply) GetMessageName() string { return "gpe_set_encap_mode_reply" }
+func (*GpeSetEncapModeReply) GetCrcString() string   { return "e8d4e804" }
+func (*GpeSetEncapModeReply) GetMessageType() api.MessageType {
+       return api.ReplyMessage
+}
+
+func (m *GpeSetEncapModeReply) Size() (size int) {
+       if m == nil {
+               return 0
+       }
+       size += 4 // m.Retval
+       return size
+}
+func (m *GpeSetEncapModeReply) Marshal(b []byte) ([]byte, error) {
+       if b == nil {
+               b = make([]byte, m.Size())
+       }
+       buf := codec.NewBuffer(b)
+       buf.EncodeInt32(m.Retval)
+       return buf.Bytes(), nil
+}
+func (m *GpeSetEncapModeReply) Unmarshal(b []byte) error {
+       buf := codec.NewBuffer(b)
+       m.Retval = buf.DecodeInt32()
+       return nil
+}
+
+func init() { file_lisp_gpe_binapi_init() }
+func file_lisp_gpe_binapi_init() {
+       api.RegisterMessage((*GpeAddDelFwdEntry)(nil), "gpe_add_del_fwd_entry_afbf857a")
+       api.RegisterMessage((*GpeAddDelFwdEntryReply)(nil), "gpe_add_del_fwd_entry_reply_efe5f176")
+       api.RegisterMessage((*GpeAddDelIface)(nil), "gpe_add_del_iface_42d6b533")
+       api.RegisterMessage((*GpeAddDelIfaceReply)(nil), "gpe_add_del_iface_reply_e8d4e804")
+       api.RegisterMessage((*GpeAddDelNativeFwdRpath)(nil), "gpe_add_del_native_fwd_rpath_bfc42b8f")
+       api.RegisterMessage((*GpeAddDelNativeFwdRpathReply)(nil), "gpe_add_del_native_fwd_rpath_reply_e8d4e804")
+       api.RegisterMessage((*GpeEnableDisable)(nil), "gpe_enable_disable_eb0e943b")
+       api.RegisterMessage((*GpeEnableDisableReply)(nil), "gpe_enable_disable_reply_e8d4e804")
+       api.RegisterMessage((*GpeFwdEntriesGet)(nil), "gpe_fwd_entries_get_8d1f2fe9")
+       api.RegisterMessage((*GpeFwdEntriesGetReply)(nil), "gpe_fwd_entries_get_reply_07b02c34")
+       api.RegisterMessage((*GpeFwdEntryPathDetails)(nil), "gpe_fwd_entry_path_details_a9bdc1f1")
+       api.RegisterMessage((*GpeFwdEntryPathDump)(nil), "gpe_fwd_entry_path_dump_39bce980")
+       api.RegisterMessage((*GpeFwdEntryVnisGet)(nil), "gpe_fwd_entry_vnis_get_51077d14")
+       api.RegisterMessage((*GpeFwdEntryVnisGetReply)(nil), "gpe_fwd_entry_vnis_get_reply_aa70da20")
+       api.RegisterMessage((*GpeGetEncapMode)(nil), "gpe_get_encap_mode_51077d14")
+       api.RegisterMessage((*GpeGetEncapModeReply)(nil), "gpe_get_encap_mode_reply_36e3f7ca")
+       api.RegisterMessage((*GpeNativeFwdRpathsGet)(nil), "gpe_native_fwd_rpaths_get_c5e0d91b")
+       api.RegisterMessage((*GpeNativeFwdRpathsGetReply)(nil), "gpe_native_fwd_rpaths_get_reply_1e4536e3")
+       api.RegisterMessage((*GpeSetEncapMode)(nil), "gpe_set_encap_mode_f3f93ce9")
+       api.RegisterMessage((*GpeSetEncapModeReply)(nil), "gpe_set_encap_mode_reply_e8d4e804")
+}
+
+// Messages returns list of all messages in this module.
+func AllMessages() []api.Message {
+       return []api.Message{
+               (*GpeAddDelFwdEntry)(nil),
+               (*GpeAddDelFwdEntryReply)(nil),
+               (*GpeAddDelIface)(nil),
+               (*GpeAddDelIfaceReply)(nil),
+               (*GpeAddDelNativeFwdRpath)(nil),
+               (*GpeAddDelNativeFwdRpathReply)(nil),
+               (*GpeEnableDisable)(nil),
+               (*GpeEnableDisableReply)(nil),
+               (*GpeFwdEntriesGet)(nil),
+               (*GpeFwdEntriesGetReply)(nil),
+               (*GpeFwdEntryPathDetails)(nil),
+               (*GpeFwdEntryPathDump)(nil),
+               (*GpeFwdEntryVnisGet)(nil),
+               (*GpeFwdEntryVnisGetReply)(nil),
+               (*GpeGetEncapMode)(nil),
+               (*GpeGetEncapModeReply)(nil),
+               (*GpeNativeFwdRpathsGet)(nil),
+               (*GpeNativeFwdRpathsGetReply)(nil),
+               (*GpeSetEncapMode)(nil),
+               (*GpeSetEncapModeReply)(nil),
+       }
+}