github.com/networkservicemesh/govpp@v0.0.0-20240328101142-8a444680fbba/binapi/vxlan_gpe/vxlan_gpe.ba.go (about)

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  // versions:
     3  //  binapi-generator: v0.10.0-dev
     4  //  VPP:              23.10-rc0~170-g6f1548434
     5  // source: core/vxlan_gpe.api.json
     6  
     7  // Package vxlan_gpe contains generated bindings for API file vxlan_gpe.api.
     8  //
     9  // Contents:
    10  // - 10 messages
    11  package vxlan_gpe
    12  
    13  import (
    14  	interface_types "github.com/networkservicemesh/govpp/binapi/interface_types"
    15  	ip_types "github.com/networkservicemesh/govpp/binapi/ip_types"
    16  	api "go.fd.io/govpp/api"
    17  	codec "go.fd.io/govpp/codec"
    18  )
    19  
    20  // This is a compile-time assertion to ensure that this generated file
    21  // is compatible with the GoVPP api package it is being compiled against.
    22  // A compilation error at this line likely means your copy of the
    23  // GoVPP api package needs to be updated.
    24  const _ = api.GoVppAPIPackageIsVersion2
    25  
    26  const (
    27  	APIFile    = "vxlan_gpe"
    28  	APIVersion = "2.1.0"
    29  	VersionCrc = 0x3bc06278
    30  )
    31  
    32  // Interface set vxlan-gpe-bypass request
    33  //   - sw_if_index - interface used to reach neighbor
    34  //   - is_ipv6 - if non-zero, enable ipv6-vxlan-bypass, else ipv4-vxlan-bypass
    35  //   - enable - if non-zero enable, else disable
    36  //
    37  // SwInterfaceSetVxlanGpeBypass defines message 'sw_interface_set_vxlan_gpe_bypass'.
    38  type SwInterfaceSetVxlanGpeBypass struct {
    39  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
    40  	IsIPv6    bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
    41  	Enable    bool                           `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
    42  }
    43  
    44  func (m *SwInterfaceSetVxlanGpeBypass) Reset() { *m = SwInterfaceSetVxlanGpeBypass{} }
    45  func (*SwInterfaceSetVxlanGpeBypass) GetMessageName() string {
    46  	return "sw_interface_set_vxlan_gpe_bypass"
    47  }
    48  func (*SwInterfaceSetVxlanGpeBypass) GetCrcString() string { return "65247409" }
    49  func (*SwInterfaceSetVxlanGpeBypass) GetMessageType() api.MessageType {
    50  	return api.RequestMessage
    51  }
    52  
    53  func (m *SwInterfaceSetVxlanGpeBypass) Size() (size int) {
    54  	if m == nil {
    55  		return 0
    56  	}
    57  	size += 4 // m.SwIfIndex
    58  	size += 1 // m.IsIPv6
    59  	size += 1 // m.Enable
    60  	return size
    61  }
    62  func (m *SwInterfaceSetVxlanGpeBypass) Marshal(b []byte) ([]byte, error) {
    63  	if b == nil {
    64  		b = make([]byte, m.Size())
    65  	}
    66  	buf := codec.NewBuffer(b)
    67  	buf.EncodeUint32(uint32(m.SwIfIndex))
    68  	buf.EncodeBool(m.IsIPv6)
    69  	buf.EncodeBool(m.Enable)
    70  	return buf.Bytes(), nil
    71  }
    72  func (m *SwInterfaceSetVxlanGpeBypass) Unmarshal(b []byte) error {
    73  	buf := codec.NewBuffer(b)
    74  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
    75  	m.IsIPv6 = buf.DecodeBool()
    76  	m.Enable = buf.DecodeBool()
    77  	return nil
    78  }
    79  
    80  // SwInterfaceSetVxlanGpeBypassReply defines message 'sw_interface_set_vxlan_gpe_bypass_reply'.
    81  type SwInterfaceSetVxlanGpeBypassReply struct {
    82  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
    83  }
    84  
    85  func (m *SwInterfaceSetVxlanGpeBypassReply) Reset() { *m = SwInterfaceSetVxlanGpeBypassReply{} }
    86  func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageName() string {
    87  	return "sw_interface_set_vxlan_gpe_bypass_reply"
    88  }
    89  func (*SwInterfaceSetVxlanGpeBypassReply) GetCrcString() string { return "e8d4e804" }
    90  func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageType() api.MessageType {
    91  	return api.ReplyMessage
    92  }
    93  
    94  func (m *SwInterfaceSetVxlanGpeBypassReply) Size() (size int) {
    95  	if m == nil {
    96  		return 0
    97  	}
    98  	size += 4 // m.Retval
    99  	return size
   100  }
   101  func (m *SwInterfaceSetVxlanGpeBypassReply) Marshal(b []byte) ([]byte, error) {
   102  	if b == nil {
   103  		b = make([]byte, m.Size())
   104  	}
   105  	buf := codec.NewBuffer(b)
   106  	buf.EncodeInt32(m.Retval)
   107  	return buf.Bytes(), nil
   108  }
   109  func (m *SwInterfaceSetVxlanGpeBypassReply) Unmarshal(b []byte) error {
   110  	buf := codec.NewBuffer(b)
   111  	m.Retval = buf.DecodeInt32()
   112  	return nil
   113  }
   114  
   115  // /*
   116  //   - Copyright (c) 2015-2016 Cisco and/or its affiliates.
   117  //   - Licensed under the Apache License, Version 2.0 (the "License");
   118  //   - you may not use this file except in compliance with the License.
   119  //   - You may obtain a copy of the License at:
   120  //     *
   121  //   - http://www.apache.org/licenses/LICENSE-2.0
   122  //     *
   123  //   - Unless required by applicable law or agreed to in writing, software
   124  //   - distributed under the License is distributed on an "AS IS" BASIS,
   125  //   - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   126  //   - See the License for the specific language governing permissions and
   127  //   - limitations under the License.
   128  //
   129  // VxlanGpeAddDelTunnel defines message 'vxlan_gpe_add_del_tunnel'.
   130  type VxlanGpeAddDelTunnel struct {
   131  	Local          ip_types.Address               `binapi:"address,name=local" json:"local,omitempty"`
   132  	Remote         ip_types.Address               `binapi:"address,name=remote" json:"remote,omitempty"`
   133  	McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
   134  	EncapVrfID     uint32                         `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
   135  	DecapVrfID     uint32                         `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
   136  	Protocol       ip_types.IPProto               `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"`
   137  	Vni            uint32                         `binapi:"u32,name=vni" json:"vni,omitempty"`
   138  	IsAdd          bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
   139  }
   140  
   141  func (m *VxlanGpeAddDelTunnel) Reset()               { *m = VxlanGpeAddDelTunnel{} }
   142  func (*VxlanGpeAddDelTunnel) GetMessageName() string { return "vxlan_gpe_add_del_tunnel" }
   143  func (*VxlanGpeAddDelTunnel) GetCrcString() string   { return "a645b2b0" }
   144  func (*VxlanGpeAddDelTunnel) GetMessageType() api.MessageType {
   145  	return api.RequestMessage
   146  }
   147  
   148  func (m *VxlanGpeAddDelTunnel) Size() (size int) {
   149  	if m == nil {
   150  		return 0
   151  	}
   152  	size += 1      // m.Local.Af
   153  	size += 1 * 16 // m.Local.Un
   154  	size += 1      // m.Remote.Af
   155  	size += 1 * 16 // m.Remote.Un
   156  	size += 4      // m.McastSwIfIndex
   157  	size += 4      // m.EncapVrfID
   158  	size += 4      // m.DecapVrfID
   159  	size += 1      // m.Protocol
   160  	size += 4      // m.Vni
   161  	size += 1      // m.IsAdd
   162  	return size
   163  }
   164  func (m *VxlanGpeAddDelTunnel) Marshal(b []byte) ([]byte, error) {
   165  	if b == nil {
   166  		b = make([]byte, m.Size())
   167  	}
   168  	buf := codec.NewBuffer(b)
   169  	buf.EncodeUint8(uint8(m.Local.Af))
   170  	buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16)
   171  	buf.EncodeUint8(uint8(m.Remote.Af))
   172  	buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16)
   173  	buf.EncodeUint32(uint32(m.McastSwIfIndex))
   174  	buf.EncodeUint32(m.EncapVrfID)
   175  	buf.EncodeUint32(m.DecapVrfID)
   176  	buf.EncodeUint8(uint8(m.Protocol))
   177  	buf.EncodeUint32(m.Vni)
   178  	buf.EncodeBool(m.IsAdd)
   179  	return buf.Bytes(), nil
   180  }
   181  func (m *VxlanGpeAddDelTunnel) Unmarshal(b []byte) error {
   182  	buf := codec.NewBuffer(b)
   183  	m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8())
   184  	copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   185  	m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8())
   186  	copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   187  	m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   188  	m.EncapVrfID = buf.DecodeUint32()
   189  	m.DecapVrfID = buf.DecodeUint32()
   190  	m.Protocol = ip_types.IPProto(buf.DecodeUint8())
   191  	m.Vni = buf.DecodeUint32()
   192  	m.IsAdd = buf.DecodeBool()
   193  	return nil
   194  }
   195  
   196  // VxlanGpeAddDelTunnelReply defines message 'vxlan_gpe_add_del_tunnel_reply'.
   197  type VxlanGpeAddDelTunnelReply struct {
   198  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   199  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   200  }
   201  
   202  func (m *VxlanGpeAddDelTunnelReply) Reset()               { *m = VxlanGpeAddDelTunnelReply{} }
   203  func (*VxlanGpeAddDelTunnelReply) GetMessageName() string { return "vxlan_gpe_add_del_tunnel_reply" }
   204  func (*VxlanGpeAddDelTunnelReply) GetCrcString() string   { return "5383d31f" }
   205  func (*VxlanGpeAddDelTunnelReply) GetMessageType() api.MessageType {
   206  	return api.ReplyMessage
   207  }
   208  
   209  func (m *VxlanGpeAddDelTunnelReply) Size() (size int) {
   210  	if m == nil {
   211  		return 0
   212  	}
   213  	size += 4 // m.Retval
   214  	size += 4 // m.SwIfIndex
   215  	return size
   216  }
   217  func (m *VxlanGpeAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
   218  	if b == nil {
   219  		b = make([]byte, m.Size())
   220  	}
   221  	buf := codec.NewBuffer(b)
   222  	buf.EncodeInt32(m.Retval)
   223  	buf.EncodeUint32(uint32(m.SwIfIndex))
   224  	return buf.Bytes(), nil
   225  }
   226  func (m *VxlanGpeAddDelTunnelReply) Unmarshal(b []byte) error {
   227  	buf := codec.NewBuffer(b)
   228  	m.Retval = buf.DecodeInt32()
   229  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   230  	return nil
   231  }
   232  
   233  // Create or delete a VXLAN-GPE tunnel
   234  //   - local - Source IP address
   235  //   - remote - Destination IP address, can be multicast
   236  //   - local_port - Source UDP port. It is not included in sent packets. Used only for port registration
   237  //   - remote_port - Destination UDP port
   238  //   - mcast_sw_if_index - Interface for multicast destination
   239  //   - encap_vrf_id - Encap route table FIB index
   240  //   - decap_vrf_id - Decap route table FIB index
   241  //   - protocol - Encapsulated protocol
   242  //   - vni - The VXLAN Network Identifier, uint24
   243  //   - is_add - Use 1 to create the tunnel, 0 to remove it
   244  //
   245  // VxlanGpeAddDelTunnelV2 defines message 'vxlan_gpe_add_del_tunnel_v2'.
   246  type VxlanGpeAddDelTunnelV2 struct {
   247  	Local          ip_types.Address               `binapi:"address,name=local" json:"local,omitempty"`
   248  	Remote         ip_types.Address               `binapi:"address,name=remote" json:"remote,omitempty"`
   249  	LocalPort      uint16                         `binapi:"u16,name=local_port" json:"local_port,omitempty"`
   250  	RemotePort     uint16                         `binapi:"u16,name=remote_port" json:"remote_port,omitempty"`
   251  	McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
   252  	EncapVrfID     uint32                         `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
   253  	DecapVrfID     uint32                         `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
   254  	Protocol       ip_types.IPProto               `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"`
   255  	Vni            uint32                         `binapi:"u32,name=vni" json:"vni,omitempty"`
   256  	IsAdd          bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
   257  }
   258  
   259  func (m *VxlanGpeAddDelTunnelV2) Reset()               { *m = VxlanGpeAddDelTunnelV2{} }
   260  func (*VxlanGpeAddDelTunnelV2) GetMessageName() string { return "vxlan_gpe_add_del_tunnel_v2" }
   261  func (*VxlanGpeAddDelTunnelV2) GetCrcString() string   { return "d62fdb35" }
   262  func (*VxlanGpeAddDelTunnelV2) GetMessageType() api.MessageType {
   263  	return api.RequestMessage
   264  }
   265  
   266  func (m *VxlanGpeAddDelTunnelV2) Size() (size int) {
   267  	if m == nil {
   268  		return 0
   269  	}
   270  	size += 1      // m.Local.Af
   271  	size += 1 * 16 // m.Local.Un
   272  	size += 1      // m.Remote.Af
   273  	size += 1 * 16 // m.Remote.Un
   274  	size += 2      // m.LocalPort
   275  	size += 2      // m.RemotePort
   276  	size += 4      // m.McastSwIfIndex
   277  	size += 4      // m.EncapVrfID
   278  	size += 4      // m.DecapVrfID
   279  	size += 1      // m.Protocol
   280  	size += 4      // m.Vni
   281  	size += 1      // m.IsAdd
   282  	return size
   283  }
   284  func (m *VxlanGpeAddDelTunnelV2) Marshal(b []byte) ([]byte, error) {
   285  	if b == nil {
   286  		b = make([]byte, m.Size())
   287  	}
   288  	buf := codec.NewBuffer(b)
   289  	buf.EncodeUint8(uint8(m.Local.Af))
   290  	buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16)
   291  	buf.EncodeUint8(uint8(m.Remote.Af))
   292  	buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16)
   293  	buf.EncodeUint16(m.LocalPort)
   294  	buf.EncodeUint16(m.RemotePort)
   295  	buf.EncodeUint32(uint32(m.McastSwIfIndex))
   296  	buf.EncodeUint32(m.EncapVrfID)
   297  	buf.EncodeUint32(m.DecapVrfID)
   298  	buf.EncodeUint8(uint8(m.Protocol))
   299  	buf.EncodeUint32(m.Vni)
   300  	buf.EncodeBool(m.IsAdd)
   301  	return buf.Bytes(), nil
   302  }
   303  func (m *VxlanGpeAddDelTunnelV2) Unmarshal(b []byte) error {
   304  	buf := codec.NewBuffer(b)
   305  	m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8())
   306  	copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   307  	m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8())
   308  	copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   309  	m.LocalPort = buf.DecodeUint16()
   310  	m.RemotePort = buf.DecodeUint16()
   311  	m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   312  	m.EncapVrfID = buf.DecodeUint32()
   313  	m.DecapVrfID = buf.DecodeUint32()
   314  	m.Protocol = ip_types.IPProto(buf.DecodeUint8())
   315  	m.Vni = buf.DecodeUint32()
   316  	m.IsAdd = buf.DecodeBool()
   317  	return nil
   318  }
   319  
   320  // VxlanGpeAddDelTunnelV2Reply defines message 'vxlan_gpe_add_del_tunnel_v2_reply'.
   321  type VxlanGpeAddDelTunnelV2Reply struct {
   322  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   323  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   324  }
   325  
   326  func (m *VxlanGpeAddDelTunnelV2Reply) Reset() { *m = VxlanGpeAddDelTunnelV2Reply{} }
   327  func (*VxlanGpeAddDelTunnelV2Reply) GetMessageName() string {
   328  	return "vxlan_gpe_add_del_tunnel_v2_reply"
   329  }
   330  func (*VxlanGpeAddDelTunnelV2Reply) GetCrcString() string { return "5383d31f" }
   331  func (*VxlanGpeAddDelTunnelV2Reply) GetMessageType() api.MessageType {
   332  	return api.ReplyMessage
   333  }
   334  
   335  func (m *VxlanGpeAddDelTunnelV2Reply) Size() (size int) {
   336  	if m == nil {
   337  		return 0
   338  	}
   339  	size += 4 // m.Retval
   340  	size += 4 // m.SwIfIndex
   341  	return size
   342  }
   343  func (m *VxlanGpeAddDelTunnelV2Reply) Marshal(b []byte) ([]byte, error) {
   344  	if b == nil {
   345  		b = make([]byte, m.Size())
   346  	}
   347  	buf := codec.NewBuffer(b)
   348  	buf.EncodeInt32(m.Retval)
   349  	buf.EncodeUint32(uint32(m.SwIfIndex))
   350  	return buf.Bytes(), nil
   351  }
   352  func (m *VxlanGpeAddDelTunnelV2Reply) Unmarshal(b []byte) error {
   353  	buf := codec.NewBuffer(b)
   354  	m.Retval = buf.DecodeInt32()
   355  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   356  	return nil
   357  }
   358  
   359  // VxlanGpeTunnelDetails defines message 'vxlan_gpe_tunnel_details'.
   360  type VxlanGpeTunnelDetails struct {
   361  	SwIfIndex      interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   362  	Local          ip_types.Address               `binapi:"address,name=local" json:"local,omitempty"`
   363  	Remote         ip_types.Address               `binapi:"address,name=remote" json:"remote,omitempty"`
   364  	Vni            uint32                         `binapi:"u32,name=vni" json:"vni,omitempty"`
   365  	Protocol       ip_types.IPProto               `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"`
   366  	McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
   367  	EncapVrfID     uint32                         `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
   368  	DecapVrfID     uint32                         `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
   369  	IsIPv6         bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
   370  }
   371  
   372  func (m *VxlanGpeTunnelDetails) Reset()               { *m = VxlanGpeTunnelDetails{} }
   373  func (*VxlanGpeTunnelDetails) GetMessageName() string { return "vxlan_gpe_tunnel_details" }
   374  func (*VxlanGpeTunnelDetails) GetCrcString() string   { return "0968fc8b" }
   375  func (*VxlanGpeTunnelDetails) GetMessageType() api.MessageType {
   376  	return api.ReplyMessage
   377  }
   378  
   379  func (m *VxlanGpeTunnelDetails) Size() (size int) {
   380  	if m == nil {
   381  		return 0
   382  	}
   383  	size += 4      // m.SwIfIndex
   384  	size += 1      // m.Local.Af
   385  	size += 1 * 16 // m.Local.Un
   386  	size += 1      // m.Remote.Af
   387  	size += 1 * 16 // m.Remote.Un
   388  	size += 4      // m.Vni
   389  	size += 1      // m.Protocol
   390  	size += 4      // m.McastSwIfIndex
   391  	size += 4      // m.EncapVrfID
   392  	size += 4      // m.DecapVrfID
   393  	size += 1      // m.IsIPv6
   394  	return size
   395  }
   396  func (m *VxlanGpeTunnelDetails) Marshal(b []byte) ([]byte, error) {
   397  	if b == nil {
   398  		b = make([]byte, m.Size())
   399  	}
   400  	buf := codec.NewBuffer(b)
   401  	buf.EncodeUint32(uint32(m.SwIfIndex))
   402  	buf.EncodeUint8(uint8(m.Local.Af))
   403  	buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16)
   404  	buf.EncodeUint8(uint8(m.Remote.Af))
   405  	buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16)
   406  	buf.EncodeUint32(m.Vni)
   407  	buf.EncodeUint8(uint8(m.Protocol))
   408  	buf.EncodeUint32(uint32(m.McastSwIfIndex))
   409  	buf.EncodeUint32(m.EncapVrfID)
   410  	buf.EncodeUint32(m.DecapVrfID)
   411  	buf.EncodeBool(m.IsIPv6)
   412  	return buf.Bytes(), nil
   413  }
   414  func (m *VxlanGpeTunnelDetails) Unmarshal(b []byte) error {
   415  	buf := codec.NewBuffer(b)
   416  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   417  	m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8())
   418  	copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   419  	m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8())
   420  	copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   421  	m.Vni = buf.DecodeUint32()
   422  	m.Protocol = ip_types.IPProto(buf.DecodeUint8())
   423  	m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   424  	m.EncapVrfID = buf.DecodeUint32()
   425  	m.DecapVrfID = buf.DecodeUint32()
   426  	m.IsIPv6 = buf.DecodeBool()
   427  	return nil
   428  }
   429  
   430  // VxlanGpeTunnelDump defines message 'vxlan_gpe_tunnel_dump'.
   431  type VxlanGpeTunnelDump struct {
   432  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   433  }
   434  
   435  func (m *VxlanGpeTunnelDump) Reset()               { *m = VxlanGpeTunnelDump{} }
   436  func (*VxlanGpeTunnelDump) GetMessageName() string { return "vxlan_gpe_tunnel_dump" }
   437  func (*VxlanGpeTunnelDump) GetCrcString() string   { return "f9e6675e" }
   438  func (*VxlanGpeTunnelDump) GetMessageType() api.MessageType {
   439  	return api.RequestMessage
   440  }
   441  
   442  func (m *VxlanGpeTunnelDump) Size() (size int) {
   443  	if m == nil {
   444  		return 0
   445  	}
   446  	size += 4 // m.SwIfIndex
   447  	return size
   448  }
   449  func (m *VxlanGpeTunnelDump) Marshal(b []byte) ([]byte, error) {
   450  	if b == nil {
   451  		b = make([]byte, m.Size())
   452  	}
   453  	buf := codec.NewBuffer(b)
   454  	buf.EncodeUint32(uint32(m.SwIfIndex))
   455  	return buf.Bytes(), nil
   456  }
   457  func (m *VxlanGpeTunnelDump) Unmarshal(b []byte) error {
   458  	buf := codec.NewBuffer(b)
   459  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   460  	return nil
   461  }
   462  
   463  // VxlanGpeTunnelV2Details defines message 'vxlan_gpe_tunnel_v2_details'.
   464  type VxlanGpeTunnelV2Details struct {
   465  	SwIfIndex      interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   466  	Local          ip_types.Address               `binapi:"address,name=local" json:"local,omitempty"`
   467  	Remote         ip_types.Address               `binapi:"address,name=remote" json:"remote,omitempty"`
   468  	LocalPort      uint16                         `binapi:"u16,name=local_port" json:"local_port,omitempty"`
   469  	RemotePort     uint16                         `binapi:"u16,name=remote_port" json:"remote_port,omitempty"`
   470  	Vni            uint32                         `binapi:"u32,name=vni" json:"vni,omitempty"`
   471  	Protocol       ip_types.IPProto               `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"`
   472  	McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
   473  	EncapVrfID     uint32                         `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
   474  	DecapVrfID     uint32                         `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
   475  	IsIPv6         bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
   476  }
   477  
   478  func (m *VxlanGpeTunnelV2Details) Reset()               { *m = VxlanGpeTunnelV2Details{} }
   479  func (*VxlanGpeTunnelV2Details) GetMessageName() string { return "vxlan_gpe_tunnel_v2_details" }
   480  func (*VxlanGpeTunnelV2Details) GetCrcString() string   { return "06be4870" }
   481  func (*VxlanGpeTunnelV2Details) GetMessageType() api.MessageType {
   482  	return api.ReplyMessage
   483  }
   484  
   485  func (m *VxlanGpeTunnelV2Details) Size() (size int) {
   486  	if m == nil {
   487  		return 0
   488  	}
   489  	size += 4      // m.SwIfIndex
   490  	size += 1      // m.Local.Af
   491  	size += 1 * 16 // m.Local.Un
   492  	size += 1      // m.Remote.Af
   493  	size += 1 * 16 // m.Remote.Un
   494  	size += 2      // m.LocalPort
   495  	size += 2      // m.RemotePort
   496  	size += 4      // m.Vni
   497  	size += 1      // m.Protocol
   498  	size += 4      // m.McastSwIfIndex
   499  	size += 4      // m.EncapVrfID
   500  	size += 4      // m.DecapVrfID
   501  	size += 1      // m.IsIPv6
   502  	return size
   503  }
   504  func (m *VxlanGpeTunnelV2Details) Marshal(b []byte) ([]byte, error) {
   505  	if b == nil {
   506  		b = make([]byte, m.Size())
   507  	}
   508  	buf := codec.NewBuffer(b)
   509  	buf.EncodeUint32(uint32(m.SwIfIndex))
   510  	buf.EncodeUint8(uint8(m.Local.Af))
   511  	buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16)
   512  	buf.EncodeUint8(uint8(m.Remote.Af))
   513  	buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16)
   514  	buf.EncodeUint16(m.LocalPort)
   515  	buf.EncodeUint16(m.RemotePort)
   516  	buf.EncodeUint32(m.Vni)
   517  	buf.EncodeUint8(uint8(m.Protocol))
   518  	buf.EncodeUint32(uint32(m.McastSwIfIndex))
   519  	buf.EncodeUint32(m.EncapVrfID)
   520  	buf.EncodeUint32(m.DecapVrfID)
   521  	buf.EncodeBool(m.IsIPv6)
   522  	return buf.Bytes(), nil
   523  }
   524  func (m *VxlanGpeTunnelV2Details) Unmarshal(b []byte) error {
   525  	buf := codec.NewBuffer(b)
   526  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   527  	m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8())
   528  	copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   529  	m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8())
   530  	copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   531  	m.LocalPort = buf.DecodeUint16()
   532  	m.RemotePort = buf.DecodeUint16()
   533  	m.Vni = buf.DecodeUint32()
   534  	m.Protocol = ip_types.IPProto(buf.DecodeUint8())
   535  	m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   536  	m.EncapVrfID = buf.DecodeUint32()
   537  	m.DecapVrfID = buf.DecodeUint32()
   538  	m.IsIPv6 = buf.DecodeBool()
   539  	return nil
   540  }
   541  
   542  // VxlanGpeTunnelV2Dump defines message 'vxlan_gpe_tunnel_v2_dump'.
   543  type VxlanGpeTunnelV2Dump struct {
   544  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   545  }
   546  
   547  func (m *VxlanGpeTunnelV2Dump) Reset()               { *m = VxlanGpeTunnelV2Dump{} }
   548  func (*VxlanGpeTunnelV2Dump) GetMessageName() string { return "vxlan_gpe_tunnel_v2_dump" }
   549  func (*VxlanGpeTunnelV2Dump) GetCrcString() string   { return "f9e6675e" }
   550  func (*VxlanGpeTunnelV2Dump) GetMessageType() api.MessageType {
   551  	return api.RequestMessage
   552  }
   553  
   554  func (m *VxlanGpeTunnelV2Dump) Size() (size int) {
   555  	if m == nil {
   556  		return 0
   557  	}
   558  	size += 4 // m.SwIfIndex
   559  	return size
   560  }
   561  func (m *VxlanGpeTunnelV2Dump) Marshal(b []byte) ([]byte, error) {
   562  	if b == nil {
   563  		b = make([]byte, m.Size())
   564  	}
   565  	buf := codec.NewBuffer(b)
   566  	buf.EncodeUint32(uint32(m.SwIfIndex))
   567  	return buf.Bytes(), nil
   568  }
   569  func (m *VxlanGpeTunnelV2Dump) Unmarshal(b []byte) error {
   570  	buf := codec.NewBuffer(b)
   571  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   572  	return nil
   573  }
   574  
   575  func init() { file_vxlan_gpe_binapi_init() }
   576  func file_vxlan_gpe_binapi_init() {
   577  	api.RegisterMessage((*SwInterfaceSetVxlanGpeBypass)(nil), "sw_interface_set_vxlan_gpe_bypass_65247409")
   578  	api.RegisterMessage((*SwInterfaceSetVxlanGpeBypassReply)(nil), "sw_interface_set_vxlan_gpe_bypass_reply_e8d4e804")
   579  	api.RegisterMessage((*VxlanGpeAddDelTunnel)(nil), "vxlan_gpe_add_del_tunnel_a645b2b0")
   580  	api.RegisterMessage((*VxlanGpeAddDelTunnelReply)(nil), "vxlan_gpe_add_del_tunnel_reply_5383d31f")
   581  	api.RegisterMessage((*VxlanGpeAddDelTunnelV2)(nil), "vxlan_gpe_add_del_tunnel_v2_d62fdb35")
   582  	api.RegisterMessage((*VxlanGpeAddDelTunnelV2Reply)(nil), "vxlan_gpe_add_del_tunnel_v2_reply_5383d31f")
   583  	api.RegisterMessage((*VxlanGpeTunnelDetails)(nil), "vxlan_gpe_tunnel_details_0968fc8b")
   584  	api.RegisterMessage((*VxlanGpeTunnelDump)(nil), "vxlan_gpe_tunnel_dump_f9e6675e")
   585  	api.RegisterMessage((*VxlanGpeTunnelV2Details)(nil), "vxlan_gpe_tunnel_v2_details_06be4870")
   586  	api.RegisterMessage((*VxlanGpeTunnelV2Dump)(nil), "vxlan_gpe_tunnel_v2_dump_f9e6675e")
   587  }
   588  
   589  // Messages returns list of all messages in this module.
   590  func AllMessages() []api.Message {
   591  	return []api.Message{
   592  		(*SwInterfaceSetVxlanGpeBypass)(nil),
   593  		(*SwInterfaceSetVxlanGpeBypassReply)(nil),
   594  		(*VxlanGpeAddDelTunnel)(nil),
   595  		(*VxlanGpeAddDelTunnelReply)(nil),
   596  		(*VxlanGpeAddDelTunnelV2)(nil),
   597  		(*VxlanGpeAddDelTunnelV2Reply)(nil),
   598  		(*VxlanGpeTunnelDetails)(nil),
   599  		(*VxlanGpeTunnelDump)(nil),
   600  		(*VxlanGpeTunnelV2Details)(nil),
   601  		(*VxlanGpeTunnelV2Dump)(nil),
   602  	}
   603  }