go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2106/vxlan/vxlan.ba.go (about)

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  
     3  // Package vxlan contains generated bindings for API file vxlan.api.
     4  //
     5  // Contents:
     6  // - 14 messages
     7  package vxlan
     8  
     9  import (
    10  	api "go.fd.io/govpp/api"
    11  	codec "go.fd.io/govpp/codec"
    12  	interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/interface_types"
    13  	ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/ip_types"
    14  )
    15  
    16  // This is a compile-time assertion to ensure that this generated file
    17  // is compatible with the GoVPP api package it is being compiled against.
    18  // A compilation error at this line likely means your copy of the
    19  // GoVPP api package needs to be updated.
    20  const _ = api.GoVppAPIPackageIsVersion2
    21  
    22  const (
    23  	APIFile    = "vxlan"
    24  	APIVersion = "2.1.0"
    25  	VersionCrc = 0x95381587
    26  )
    27  
    28  // SwInterfaceSetVxlanBypass defines message 'sw_interface_set_vxlan_bypass'.
    29  type SwInterfaceSetVxlanBypass struct {
    30  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
    31  	IsIPv6    bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
    32  	Enable    bool                           `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
    33  }
    34  
    35  func (m *SwInterfaceSetVxlanBypass) Reset()               { *m = SwInterfaceSetVxlanBypass{} }
    36  func (*SwInterfaceSetVxlanBypass) GetMessageName() string { return "sw_interface_set_vxlan_bypass" }
    37  func (*SwInterfaceSetVxlanBypass) GetCrcString() string   { return "65247409" }
    38  func (*SwInterfaceSetVxlanBypass) GetMessageType() api.MessageType {
    39  	return api.RequestMessage
    40  }
    41  
    42  func (m *SwInterfaceSetVxlanBypass) Size() (size int) {
    43  	if m == nil {
    44  		return 0
    45  	}
    46  	size += 4 // m.SwIfIndex
    47  	size += 1 // m.IsIPv6
    48  	size += 1 // m.Enable
    49  	return size
    50  }
    51  func (m *SwInterfaceSetVxlanBypass) Marshal(b []byte) ([]byte, error) {
    52  	if b == nil {
    53  		b = make([]byte, m.Size())
    54  	}
    55  	buf := codec.NewBuffer(b)
    56  	buf.EncodeUint32(uint32(m.SwIfIndex))
    57  	buf.EncodeBool(m.IsIPv6)
    58  	buf.EncodeBool(m.Enable)
    59  	return buf.Bytes(), nil
    60  }
    61  func (m *SwInterfaceSetVxlanBypass) Unmarshal(b []byte) error {
    62  	buf := codec.NewBuffer(b)
    63  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
    64  	m.IsIPv6 = buf.DecodeBool()
    65  	m.Enable = buf.DecodeBool()
    66  	return nil
    67  }
    68  
    69  // SwInterfaceSetVxlanBypassReply defines message 'sw_interface_set_vxlan_bypass_reply'.
    70  type SwInterfaceSetVxlanBypassReply struct {
    71  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
    72  }
    73  
    74  func (m *SwInterfaceSetVxlanBypassReply) Reset() { *m = SwInterfaceSetVxlanBypassReply{} }
    75  func (*SwInterfaceSetVxlanBypassReply) GetMessageName() string {
    76  	return "sw_interface_set_vxlan_bypass_reply"
    77  }
    78  func (*SwInterfaceSetVxlanBypassReply) GetCrcString() string { return "e8d4e804" }
    79  func (*SwInterfaceSetVxlanBypassReply) GetMessageType() api.MessageType {
    80  	return api.ReplyMessage
    81  }
    82  
    83  func (m *SwInterfaceSetVxlanBypassReply) Size() (size int) {
    84  	if m == nil {
    85  		return 0
    86  	}
    87  	size += 4 // m.Retval
    88  	return size
    89  }
    90  func (m *SwInterfaceSetVxlanBypassReply) Marshal(b []byte) ([]byte, error) {
    91  	if b == nil {
    92  		b = make([]byte, m.Size())
    93  	}
    94  	buf := codec.NewBuffer(b)
    95  	buf.EncodeInt32(m.Retval)
    96  	return buf.Bytes(), nil
    97  }
    98  func (m *SwInterfaceSetVxlanBypassReply) Unmarshal(b []byte) error {
    99  	buf := codec.NewBuffer(b)
   100  	m.Retval = buf.DecodeInt32()
   101  	return nil
   102  }
   103  
   104  // VxlanAddDelTunnel defines message 'vxlan_add_del_tunnel'.
   105  type VxlanAddDelTunnel struct {
   106  	IsAdd          bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
   107  	Instance       uint32                         `binapi:"u32,name=instance" json:"instance,omitempty"`
   108  	SrcAddress     ip_types.Address               `binapi:"address,name=src_address" json:"src_address,omitempty"`
   109  	DstAddress     ip_types.Address               `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
   110  	McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
   111  	EncapVrfID     uint32                         `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
   112  	DecapNextIndex uint32                         `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
   113  	Vni            uint32                         `binapi:"u32,name=vni" json:"vni,omitempty"`
   114  }
   115  
   116  func (m *VxlanAddDelTunnel) Reset()               { *m = VxlanAddDelTunnel{} }
   117  func (*VxlanAddDelTunnel) GetMessageName() string { return "vxlan_add_del_tunnel" }
   118  func (*VxlanAddDelTunnel) GetCrcString() string   { return "0c09dc80" }
   119  func (*VxlanAddDelTunnel) GetMessageType() api.MessageType {
   120  	return api.RequestMessage
   121  }
   122  
   123  func (m *VxlanAddDelTunnel) Size() (size int) {
   124  	if m == nil {
   125  		return 0
   126  	}
   127  	size += 1      // m.IsAdd
   128  	size += 4      // m.Instance
   129  	size += 1      // m.SrcAddress.Af
   130  	size += 1 * 16 // m.SrcAddress.Un
   131  	size += 1      // m.DstAddress.Af
   132  	size += 1 * 16 // m.DstAddress.Un
   133  	size += 4      // m.McastSwIfIndex
   134  	size += 4      // m.EncapVrfID
   135  	size += 4      // m.DecapNextIndex
   136  	size += 4      // m.Vni
   137  	return size
   138  }
   139  func (m *VxlanAddDelTunnel) Marshal(b []byte) ([]byte, error) {
   140  	if b == nil {
   141  		b = make([]byte, m.Size())
   142  	}
   143  	buf := codec.NewBuffer(b)
   144  	buf.EncodeBool(m.IsAdd)
   145  	buf.EncodeUint32(m.Instance)
   146  	buf.EncodeUint8(uint8(m.SrcAddress.Af))
   147  	buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
   148  	buf.EncodeUint8(uint8(m.DstAddress.Af))
   149  	buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
   150  	buf.EncodeUint32(uint32(m.McastSwIfIndex))
   151  	buf.EncodeUint32(m.EncapVrfID)
   152  	buf.EncodeUint32(m.DecapNextIndex)
   153  	buf.EncodeUint32(m.Vni)
   154  	return buf.Bytes(), nil
   155  }
   156  func (m *VxlanAddDelTunnel) Unmarshal(b []byte) error {
   157  	buf := codec.NewBuffer(b)
   158  	m.IsAdd = buf.DecodeBool()
   159  	m.Instance = buf.DecodeUint32()
   160  	m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   161  	copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   162  	m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   163  	copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   164  	m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   165  	m.EncapVrfID = buf.DecodeUint32()
   166  	m.DecapNextIndex = buf.DecodeUint32()
   167  	m.Vni = buf.DecodeUint32()
   168  	return nil
   169  }
   170  
   171  // VxlanAddDelTunnelReply defines message 'vxlan_add_del_tunnel_reply'.
   172  type VxlanAddDelTunnelReply struct {
   173  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   174  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   175  }
   176  
   177  func (m *VxlanAddDelTunnelReply) Reset()               { *m = VxlanAddDelTunnelReply{} }
   178  func (*VxlanAddDelTunnelReply) GetMessageName() string { return "vxlan_add_del_tunnel_reply" }
   179  func (*VxlanAddDelTunnelReply) GetCrcString() string   { return "5383d31f" }
   180  func (*VxlanAddDelTunnelReply) GetMessageType() api.MessageType {
   181  	return api.ReplyMessage
   182  }
   183  
   184  func (m *VxlanAddDelTunnelReply) Size() (size int) {
   185  	if m == nil {
   186  		return 0
   187  	}
   188  	size += 4 // m.Retval
   189  	size += 4 // m.SwIfIndex
   190  	return size
   191  }
   192  func (m *VxlanAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
   193  	if b == nil {
   194  		b = make([]byte, m.Size())
   195  	}
   196  	buf := codec.NewBuffer(b)
   197  	buf.EncodeInt32(m.Retval)
   198  	buf.EncodeUint32(uint32(m.SwIfIndex))
   199  	return buf.Bytes(), nil
   200  }
   201  func (m *VxlanAddDelTunnelReply) Unmarshal(b []byte) error {
   202  	buf := codec.NewBuffer(b)
   203  	m.Retval = buf.DecodeInt32()
   204  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   205  	return nil
   206  }
   207  
   208  // VxlanAddDelTunnelV2 defines message 'vxlan_add_del_tunnel_v2'.
   209  type VxlanAddDelTunnelV2 struct {
   210  	IsAdd          bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
   211  	Instance       uint32                         `binapi:"u32,name=instance,default=4294967295" json:"instance,omitempty"`
   212  	SrcAddress     ip_types.Address               `binapi:"address,name=src_address" json:"src_address,omitempty"`
   213  	DstAddress     ip_types.Address               `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
   214  	SrcPort        uint16                         `binapi:"u16,name=src_port" json:"src_port,omitempty"`
   215  	DstPort        uint16                         `binapi:"u16,name=dst_port" json:"dst_port,omitempty"`
   216  	McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
   217  	EncapVrfID     uint32                         `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
   218  	DecapNextIndex uint32                         `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
   219  	Vni            uint32                         `binapi:"u32,name=vni" json:"vni,omitempty"`
   220  }
   221  
   222  func (m *VxlanAddDelTunnelV2) Reset()               { *m = VxlanAddDelTunnelV2{} }
   223  func (*VxlanAddDelTunnelV2) GetMessageName() string { return "vxlan_add_del_tunnel_v2" }
   224  func (*VxlanAddDelTunnelV2) GetCrcString() string   { return "4f223f40" }
   225  func (*VxlanAddDelTunnelV2) GetMessageType() api.MessageType {
   226  	return api.RequestMessage
   227  }
   228  
   229  func (m *VxlanAddDelTunnelV2) Size() (size int) {
   230  	if m == nil {
   231  		return 0
   232  	}
   233  	size += 1      // m.IsAdd
   234  	size += 4      // m.Instance
   235  	size += 1      // m.SrcAddress.Af
   236  	size += 1 * 16 // m.SrcAddress.Un
   237  	size += 1      // m.DstAddress.Af
   238  	size += 1 * 16 // m.DstAddress.Un
   239  	size += 2      // m.SrcPort
   240  	size += 2      // m.DstPort
   241  	size += 4      // m.McastSwIfIndex
   242  	size += 4      // m.EncapVrfID
   243  	size += 4      // m.DecapNextIndex
   244  	size += 4      // m.Vni
   245  	return size
   246  }
   247  func (m *VxlanAddDelTunnelV2) Marshal(b []byte) ([]byte, error) {
   248  	if b == nil {
   249  		b = make([]byte, m.Size())
   250  	}
   251  	buf := codec.NewBuffer(b)
   252  	buf.EncodeBool(m.IsAdd)
   253  	buf.EncodeUint32(m.Instance)
   254  	buf.EncodeUint8(uint8(m.SrcAddress.Af))
   255  	buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
   256  	buf.EncodeUint8(uint8(m.DstAddress.Af))
   257  	buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
   258  	buf.EncodeUint16(m.SrcPort)
   259  	buf.EncodeUint16(m.DstPort)
   260  	buf.EncodeUint32(uint32(m.McastSwIfIndex))
   261  	buf.EncodeUint32(m.EncapVrfID)
   262  	buf.EncodeUint32(m.DecapNextIndex)
   263  	buf.EncodeUint32(m.Vni)
   264  	return buf.Bytes(), nil
   265  }
   266  func (m *VxlanAddDelTunnelV2) Unmarshal(b []byte) error {
   267  	buf := codec.NewBuffer(b)
   268  	m.IsAdd = buf.DecodeBool()
   269  	m.Instance = buf.DecodeUint32()
   270  	m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   271  	copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   272  	m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   273  	copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   274  	m.SrcPort = buf.DecodeUint16()
   275  	m.DstPort = buf.DecodeUint16()
   276  	m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   277  	m.EncapVrfID = buf.DecodeUint32()
   278  	m.DecapNextIndex = buf.DecodeUint32()
   279  	m.Vni = buf.DecodeUint32()
   280  	return nil
   281  }
   282  
   283  // VxlanAddDelTunnelV2Reply defines message 'vxlan_add_del_tunnel_v2_reply'.
   284  type VxlanAddDelTunnelV2Reply struct {
   285  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   286  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   287  }
   288  
   289  func (m *VxlanAddDelTunnelV2Reply) Reset()               { *m = VxlanAddDelTunnelV2Reply{} }
   290  func (*VxlanAddDelTunnelV2Reply) GetMessageName() string { return "vxlan_add_del_tunnel_v2_reply" }
   291  func (*VxlanAddDelTunnelV2Reply) GetCrcString() string   { return "5383d31f" }
   292  func (*VxlanAddDelTunnelV2Reply) GetMessageType() api.MessageType {
   293  	return api.ReplyMessage
   294  }
   295  
   296  func (m *VxlanAddDelTunnelV2Reply) Size() (size int) {
   297  	if m == nil {
   298  		return 0
   299  	}
   300  	size += 4 // m.Retval
   301  	size += 4 // m.SwIfIndex
   302  	return size
   303  }
   304  func (m *VxlanAddDelTunnelV2Reply) Marshal(b []byte) ([]byte, error) {
   305  	if b == nil {
   306  		b = make([]byte, m.Size())
   307  	}
   308  	buf := codec.NewBuffer(b)
   309  	buf.EncodeInt32(m.Retval)
   310  	buf.EncodeUint32(uint32(m.SwIfIndex))
   311  	return buf.Bytes(), nil
   312  }
   313  func (m *VxlanAddDelTunnelV2Reply) Unmarshal(b []byte) error {
   314  	buf := codec.NewBuffer(b)
   315  	m.Retval = buf.DecodeInt32()
   316  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   317  	return nil
   318  }
   319  
   320  // VxlanAddDelTunnelV3 defines message 'vxlan_add_del_tunnel_v3'.
   321  type VxlanAddDelTunnelV3 struct {
   322  	IsAdd          bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
   323  	Instance       uint32                         `binapi:"u32,name=instance,default=4294967295" json:"instance,omitempty"`
   324  	SrcAddress     ip_types.Address               `binapi:"address,name=src_address" json:"src_address,omitempty"`
   325  	DstAddress     ip_types.Address               `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
   326  	SrcPort        uint16                         `binapi:"u16,name=src_port" json:"src_port,omitempty"`
   327  	DstPort        uint16                         `binapi:"u16,name=dst_port" json:"dst_port,omitempty"`
   328  	McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
   329  	EncapVrfID     uint32                         `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
   330  	DecapNextIndex uint32                         `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
   331  	Vni            uint32                         `binapi:"u32,name=vni" json:"vni,omitempty"`
   332  	IsL3           bool                           `binapi:"bool,name=is_l3,default=false" json:"is_l3,omitempty"`
   333  }
   334  
   335  func (m *VxlanAddDelTunnelV3) Reset()               { *m = VxlanAddDelTunnelV3{} }
   336  func (*VxlanAddDelTunnelV3) GetMessageName() string { return "vxlan_add_del_tunnel_v3" }
   337  func (*VxlanAddDelTunnelV3) GetCrcString() string   { return "0072b037" }
   338  func (*VxlanAddDelTunnelV3) GetMessageType() api.MessageType {
   339  	return api.RequestMessage
   340  }
   341  
   342  func (m *VxlanAddDelTunnelV3) Size() (size int) {
   343  	if m == nil {
   344  		return 0
   345  	}
   346  	size += 1      // m.IsAdd
   347  	size += 4      // m.Instance
   348  	size += 1      // m.SrcAddress.Af
   349  	size += 1 * 16 // m.SrcAddress.Un
   350  	size += 1      // m.DstAddress.Af
   351  	size += 1 * 16 // m.DstAddress.Un
   352  	size += 2      // m.SrcPort
   353  	size += 2      // m.DstPort
   354  	size += 4      // m.McastSwIfIndex
   355  	size += 4      // m.EncapVrfID
   356  	size += 4      // m.DecapNextIndex
   357  	size += 4      // m.Vni
   358  	size += 1      // m.IsL3
   359  	return size
   360  }
   361  func (m *VxlanAddDelTunnelV3) Marshal(b []byte) ([]byte, error) {
   362  	if b == nil {
   363  		b = make([]byte, m.Size())
   364  	}
   365  	buf := codec.NewBuffer(b)
   366  	buf.EncodeBool(m.IsAdd)
   367  	buf.EncodeUint32(m.Instance)
   368  	buf.EncodeUint8(uint8(m.SrcAddress.Af))
   369  	buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
   370  	buf.EncodeUint8(uint8(m.DstAddress.Af))
   371  	buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
   372  	buf.EncodeUint16(m.SrcPort)
   373  	buf.EncodeUint16(m.DstPort)
   374  	buf.EncodeUint32(uint32(m.McastSwIfIndex))
   375  	buf.EncodeUint32(m.EncapVrfID)
   376  	buf.EncodeUint32(m.DecapNextIndex)
   377  	buf.EncodeUint32(m.Vni)
   378  	buf.EncodeBool(m.IsL3)
   379  	return buf.Bytes(), nil
   380  }
   381  func (m *VxlanAddDelTunnelV3) Unmarshal(b []byte) error {
   382  	buf := codec.NewBuffer(b)
   383  	m.IsAdd = buf.DecodeBool()
   384  	m.Instance = buf.DecodeUint32()
   385  	m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   386  	copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   387  	m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   388  	copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   389  	m.SrcPort = buf.DecodeUint16()
   390  	m.DstPort = buf.DecodeUint16()
   391  	m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   392  	m.EncapVrfID = buf.DecodeUint32()
   393  	m.DecapNextIndex = buf.DecodeUint32()
   394  	m.Vni = buf.DecodeUint32()
   395  	m.IsL3 = buf.DecodeBool()
   396  	return nil
   397  }
   398  
   399  // VxlanAddDelTunnelV3Reply defines message 'vxlan_add_del_tunnel_v3_reply'.
   400  type VxlanAddDelTunnelV3Reply struct {
   401  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   402  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   403  }
   404  
   405  func (m *VxlanAddDelTunnelV3Reply) Reset()               { *m = VxlanAddDelTunnelV3Reply{} }
   406  func (*VxlanAddDelTunnelV3Reply) GetMessageName() string { return "vxlan_add_del_tunnel_v3_reply" }
   407  func (*VxlanAddDelTunnelV3Reply) GetCrcString() string   { return "5383d31f" }
   408  func (*VxlanAddDelTunnelV3Reply) GetMessageType() api.MessageType {
   409  	return api.ReplyMessage
   410  }
   411  
   412  func (m *VxlanAddDelTunnelV3Reply) Size() (size int) {
   413  	if m == nil {
   414  		return 0
   415  	}
   416  	size += 4 // m.Retval
   417  	size += 4 // m.SwIfIndex
   418  	return size
   419  }
   420  func (m *VxlanAddDelTunnelV3Reply) Marshal(b []byte) ([]byte, error) {
   421  	if b == nil {
   422  		b = make([]byte, m.Size())
   423  	}
   424  	buf := codec.NewBuffer(b)
   425  	buf.EncodeInt32(m.Retval)
   426  	buf.EncodeUint32(uint32(m.SwIfIndex))
   427  	return buf.Bytes(), nil
   428  }
   429  func (m *VxlanAddDelTunnelV3Reply) Unmarshal(b []byte) error {
   430  	buf := codec.NewBuffer(b)
   431  	m.Retval = buf.DecodeInt32()
   432  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   433  	return nil
   434  }
   435  
   436  // VxlanOffloadRx defines message 'vxlan_offload_rx'.
   437  type VxlanOffloadRx struct {
   438  	HwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=hw_if_index" json:"hw_if_index,omitempty"`
   439  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   440  	Enable    bool                           `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
   441  }
   442  
   443  func (m *VxlanOffloadRx) Reset()               { *m = VxlanOffloadRx{} }
   444  func (*VxlanOffloadRx) GetMessageName() string { return "vxlan_offload_rx" }
   445  func (*VxlanOffloadRx) GetCrcString() string   { return "9cc95087" }
   446  func (*VxlanOffloadRx) GetMessageType() api.MessageType {
   447  	return api.RequestMessage
   448  }
   449  
   450  func (m *VxlanOffloadRx) Size() (size int) {
   451  	if m == nil {
   452  		return 0
   453  	}
   454  	size += 4 // m.HwIfIndex
   455  	size += 4 // m.SwIfIndex
   456  	size += 1 // m.Enable
   457  	return size
   458  }
   459  func (m *VxlanOffloadRx) Marshal(b []byte) ([]byte, error) {
   460  	if b == nil {
   461  		b = make([]byte, m.Size())
   462  	}
   463  	buf := codec.NewBuffer(b)
   464  	buf.EncodeUint32(uint32(m.HwIfIndex))
   465  	buf.EncodeUint32(uint32(m.SwIfIndex))
   466  	buf.EncodeBool(m.Enable)
   467  	return buf.Bytes(), nil
   468  }
   469  func (m *VxlanOffloadRx) Unmarshal(b []byte) error {
   470  	buf := codec.NewBuffer(b)
   471  	m.HwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   472  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   473  	m.Enable = buf.DecodeBool()
   474  	return nil
   475  }
   476  
   477  // VxlanOffloadRxReply defines message 'vxlan_offload_rx_reply'.
   478  type VxlanOffloadRxReply struct {
   479  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   480  }
   481  
   482  func (m *VxlanOffloadRxReply) Reset()               { *m = VxlanOffloadRxReply{} }
   483  func (*VxlanOffloadRxReply) GetMessageName() string { return "vxlan_offload_rx_reply" }
   484  func (*VxlanOffloadRxReply) GetCrcString() string   { return "e8d4e804" }
   485  func (*VxlanOffloadRxReply) GetMessageType() api.MessageType {
   486  	return api.ReplyMessage
   487  }
   488  
   489  func (m *VxlanOffloadRxReply) Size() (size int) {
   490  	if m == nil {
   491  		return 0
   492  	}
   493  	size += 4 // m.Retval
   494  	return size
   495  }
   496  func (m *VxlanOffloadRxReply) Marshal(b []byte) ([]byte, error) {
   497  	if b == nil {
   498  		b = make([]byte, m.Size())
   499  	}
   500  	buf := codec.NewBuffer(b)
   501  	buf.EncodeInt32(m.Retval)
   502  	return buf.Bytes(), nil
   503  }
   504  func (m *VxlanOffloadRxReply) Unmarshal(b []byte) error {
   505  	buf := codec.NewBuffer(b)
   506  	m.Retval = buf.DecodeInt32()
   507  	return nil
   508  }
   509  
   510  // VxlanTunnelDetails defines message 'vxlan_tunnel_details'.
   511  type VxlanTunnelDetails struct {
   512  	SwIfIndex      interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   513  	Instance       uint32                         `binapi:"u32,name=instance" json:"instance,omitempty"`
   514  	SrcAddress     ip_types.Address               `binapi:"address,name=src_address" json:"src_address,omitempty"`
   515  	DstAddress     ip_types.Address               `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
   516  	McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
   517  	EncapVrfID     uint32                         `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
   518  	DecapNextIndex uint32                         `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
   519  	Vni            uint32                         `binapi:"u32,name=vni" json:"vni,omitempty"`
   520  }
   521  
   522  func (m *VxlanTunnelDetails) Reset()               { *m = VxlanTunnelDetails{} }
   523  func (*VxlanTunnelDetails) GetMessageName() string { return "vxlan_tunnel_details" }
   524  func (*VxlanTunnelDetails) GetCrcString() string   { return "c3916cb1" }
   525  func (*VxlanTunnelDetails) GetMessageType() api.MessageType {
   526  	return api.ReplyMessage
   527  }
   528  
   529  func (m *VxlanTunnelDetails) Size() (size int) {
   530  	if m == nil {
   531  		return 0
   532  	}
   533  	size += 4      // m.SwIfIndex
   534  	size += 4      // m.Instance
   535  	size += 1      // m.SrcAddress.Af
   536  	size += 1 * 16 // m.SrcAddress.Un
   537  	size += 1      // m.DstAddress.Af
   538  	size += 1 * 16 // m.DstAddress.Un
   539  	size += 4      // m.McastSwIfIndex
   540  	size += 4      // m.EncapVrfID
   541  	size += 4      // m.DecapNextIndex
   542  	size += 4      // m.Vni
   543  	return size
   544  }
   545  func (m *VxlanTunnelDetails) Marshal(b []byte) ([]byte, error) {
   546  	if b == nil {
   547  		b = make([]byte, m.Size())
   548  	}
   549  	buf := codec.NewBuffer(b)
   550  	buf.EncodeUint32(uint32(m.SwIfIndex))
   551  	buf.EncodeUint32(m.Instance)
   552  	buf.EncodeUint8(uint8(m.SrcAddress.Af))
   553  	buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
   554  	buf.EncodeUint8(uint8(m.DstAddress.Af))
   555  	buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
   556  	buf.EncodeUint32(uint32(m.McastSwIfIndex))
   557  	buf.EncodeUint32(m.EncapVrfID)
   558  	buf.EncodeUint32(m.DecapNextIndex)
   559  	buf.EncodeUint32(m.Vni)
   560  	return buf.Bytes(), nil
   561  }
   562  func (m *VxlanTunnelDetails) Unmarshal(b []byte) error {
   563  	buf := codec.NewBuffer(b)
   564  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   565  	m.Instance = buf.DecodeUint32()
   566  	m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   567  	copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   568  	m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   569  	copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   570  	m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   571  	m.EncapVrfID = buf.DecodeUint32()
   572  	m.DecapNextIndex = buf.DecodeUint32()
   573  	m.Vni = buf.DecodeUint32()
   574  	return nil
   575  }
   576  
   577  // VxlanTunnelDump defines message 'vxlan_tunnel_dump'.
   578  type VxlanTunnelDump struct {
   579  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   580  }
   581  
   582  func (m *VxlanTunnelDump) Reset()               { *m = VxlanTunnelDump{} }
   583  func (*VxlanTunnelDump) GetMessageName() string { return "vxlan_tunnel_dump" }
   584  func (*VxlanTunnelDump) GetCrcString() string   { return "f9e6675e" }
   585  func (*VxlanTunnelDump) GetMessageType() api.MessageType {
   586  	return api.RequestMessage
   587  }
   588  
   589  func (m *VxlanTunnelDump) Size() (size int) {
   590  	if m == nil {
   591  		return 0
   592  	}
   593  	size += 4 // m.SwIfIndex
   594  	return size
   595  }
   596  func (m *VxlanTunnelDump) Marshal(b []byte) ([]byte, error) {
   597  	if b == nil {
   598  		b = make([]byte, m.Size())
   599  	}
   600  	buf := codec.NewBuffer(b)
   601  	buf.EncodeUint32(uint32(m.SwIfIndex))
   602  	return buf.Bytes(), nil
   603  }
   604  func (m *VxlanTunnelDump) Unmarshal(b []byte) error {
   605  	buf := codec.NewBuffer(b)
   606  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   607  	return nil
   608  }
   609  
   610  // VxlanTunnelV2Details defines message 'vxlan_tunnel_v2_details'.
   611  type VxlanTunnelV2Details struct {
   612  	SwIfIndex      interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   613  	Instance       uint32                         `binapi:"u32,name=instance" json:"instance,omitempty"`
   614  	SrcAddress     ip_types.Address               `binapi:"address,name=src_address" json:"src_address,omitempty"`
   615  	DstAddress     ip_types.Address               `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
   616  	SrcPort        uint16                         `binapi:"u16,name=src_port" json:"src_port,omitempty"`
   617  	DstPort        uint16                         `binapi:"u16,name=dst_port" json:"dst_port,omitempty"`
   618  	McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
   619  	EncapVrfID     uint32                         `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
   620  	DecapNextIndex uint32                         `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
   621  	Vni            uint32                         `binapi:"u32,name=vni" json:"vni,omitempty"`
   622  }
   623  
   624  func (m *VxlanTunnelV2Details) Reset()               { *m = VxlanTunnelV2Details{} }
   625  func (*VxlanTunnelV2Details) GetMessageName() string { return "vxlan_tunnel_v2_details" }
   626  func (*VxlanTunnelV2Details) GetCrcString() string   { return "d3bdd4d9" }
   627  func (*VxlanTunnelV2Details) GetMessageType() api.MessageType {
   628  	return api.ReplyMessage
   629  }
   630  
   631  func (m *VxlanTunnelV2Details) Size() (size int) {
   632  	if m == nil {
   633  		return 0
   634  	}
   635  	size += 4      // m.SwIfIndex
   636  	size += 4      // m.Instance
   637  	size += 1      // m.SrcAddress.Af
   638  	size += 1 * 16 // m.SrcAddress.Un
   639  	size += 1      // m.DstAddress.Af
   640  	size += 1 * 16 // m.DstAddress.Un
   641  	size += 2      // m.SrcPort
   642  	size += 2      // m.DstPort
   643  	size += 4      // m.McastSwIfIndex
   644  	size += 4      // m.EncapVrfID
   645  	size += 4      // m.DecapNextIndex
   646  	size += 4      // m.Vni
   647  	return size
   648  }
   649  func (m *VxlanTunnelV2Details) Marshal(b []byte) ([]byte, error) {
   650  	if b == nil {
   651  		b = make([]byte, m.Size())
   652  	}
   653  	buf := codec.NewBuffer(b)
   654  	buf.EncodeUint32(uint32(m.SwIfIndex))
   655  	buf.EncodeUint32(m.Instance)
   656  	buf.EncodeUint8(uint8(m.SrcAddress.Af))
   657  	buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
   658  	buf.EncodeUint8(uint8(m.DstAddress.Af))
   659  	buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
   660  	buf.EncodeUint16(m.SrcPort)
   661  	buf.EncodeUint16(m.DstPort)
   662  	buf.EncodeUint32(uint32(m.McastSwIfIndex))
   663  	buf.EncodeUint32(m.EncapVrfID)
   664  	buf.EncodeUint32(m.DecapNextIndex)
   665  	buf.EncodeUint32(m.Vni)
   666  	return buf.Bytes(), nil
   667  }
   668  func (m *VxlanTunnelV2Details) Unmarshal(b []byte) error {
   669  	buf := codec.NewBuffer(b)
   670  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   671  	m.Instance = buf.DecodeUint32()
   672  	m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   673  	copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   674  	m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   675  	copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   676  	m.SrcPort = buf.DecodeUint16()
   677  	m.DstPort = buf.DecodeUint16()
   678  	m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   679  	m.EncapVrfID = buf.DecodeUint32()
   680  	m.DecapNextIndex = buf.DecodeUint32()
   681  	m.Vni = buf.DecodeUint32()
   682  	return nil
   683  }
   684  
   685  // VxlanTunnelV2Dump defines message 'vxlan_tunnel_v2_dump'.
   686  type VxlanTunnelV2Dump struct {
   687  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   688  }
   689  
   690  func (m *VxlanTunnelV2Dump) Reset()               { *m = VxlanTunnelV2Dump{} }
   691  func (*VxlanTunnelV2Dump) GetMessageName() string { return "vxlan_tunnel_v2_dump" }
   692  func (*VxlanTunnelV2Dump) GetCrcString() string   { return "f9e6675e" }
   693  func (*VxlanTunnelV2Dump) GetMessageType() api.MessageType {
   694  	return api.RequestMessage
   695  }
   696  
   697  func (m *VxlanTunnelV2Dump) Size() (size int) {
   698  	if m == nil {
   699  		return 0
   700  	}
   701  	size += 4 // m.SwIfIndex
   702  	return size
   703  }
   704  func (m *VxlanTunnelV2Dump) Marshal(b []byte) ([]byte, error) {
   705  	if b == nil {
   706  		b = make([]byte, m.Size())
   707  	}
   708  	buf := codec.NewBuffer(b)
   709  	buf.EncodeUint32(uint32(m.SwIfIndex))
   710  	return buf.Bytes(), nil
   711  }
   712  func (m *VxlanTunnelV2Dump) Unmarshal(b []byte) error {
   713  	buf := codec.NewBuffer(b)
   714  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   715  	return nil
   716  }
   717  
   718  func init() { file_vxlan_binapi_init() }
   719  func file_vxlan_binapi_init() {
   720  	api.RegisterMessage((*SwInterfaceSetVxlanBypass)(nil), "sw_interface_set_vxlan_bypass_65247409")
   721  	api.RegisterMessage((*SwInterfaceSetVxlanBypassReply)(nil), "sw_interface_set_vxlan_bypass_reply_e8d4e804")
   722  	api.RegisterMessage((*VxlanAddDelTunnel)(nil), "vxlan_add_del_tunnel_0c09dc80")
   723  	api.RegisterMessage((*VxlanAddDelTunnelReply)(nil), "vxlan_add_del_tunnel_reply_5383d31f")
   724  	api.RegisterMessage((*VxlanAddDelTunnelV2)(nil), "vxlan_add_del_tunnel_v2_4f223f40")
   725  	api.RegisterMessage((*VxlanAddDelTunnelV2Reply)(nil), "vxlan_add_del_tunnel_v2_reply_5383d31f")
   726  	api.RegisterMessage((*VxlanAddDelTunnelV3)(nil), "vxlan_add_del_tunnel_v3_0072b037")
   727  	api.RegisterMessage((*VxlanAddDelTunnelV3Reply)(nil), "vxlan_add_del_tunnel_v3_reply_5383d31f")
   728  	api.RegisterMessage((*VxlanOffloadRx)(nil), "vxlan_offload_rx_9cc95087")
   729  	api.RegisterMessage((*VxlanOffloadRxReply)(nil), "vxlan_offload_rx_reply_e8d4e804")
   730  	api.RegisterMessage((*VxlanTunnelDetails)(nil), "vxlan_tunnel_details_c3916cb1")
   731  	api.RegisterMessage((*VxlanTunnelDump)(nil), "vxlan_tunnel_dump_f9e6675e")
   732  	api.RegisterMessage((*VxlanTunnelV2Details)(nil), "vxlan_tunnel_v2_details_d3bdd4d9")
   733  	api.RegisterMessage((*VxlanTunnelV2Dump)(nil), "vxlan_tunnel_v2_dump_f9e6675e")
   734  }
   735  
   736  // Messages returns list of all messages in this module.
   737  func AllMessages() []api.Message {
   738  	return []api.Message{
   739  		(*SwInterfaceSetVxlanBypass)(nil),
   740  		(*SwInterfaceSetVxlanBypassReply)(nil),
   741  		(*VxlanAddDelTunnel)(nil),
   742  		(*VxlanAddDelTunnelReply)(nil),
   743  		(*VxlanAddDelTunnelV2)(nil),
   744  		(*VxlanAddDelTunnelV2Reply)(nil),
   745  		(*VxlanAddDelTunnelV3)(nil),
   746  		(*VxlanAddDelTunnelV3Reply)(nil),
   747  		(*VxlanOffloadRx)(nil),
   748  		(*VxlanOffloadRxReply)(nil),
   749  		(*VxlanTunnelDetails)(nil),
   750  		(*VxlanTunnelDump)(nil),
   751  		(*VxlanTunnelV2Details)(nil),
   752  		(*VxlanTunnelV2Dump)(nil),
   753  	}
   754  }