diff options
Diffstat (limited to 'binapi/vxlan_gpe/vxlan_gpe.ba.go')
-rw-r--r-- | binapi/vxlan_gpe/vxlan_gpe.ba.go | 242 |
1 files changed, 238 insertions, 4 deletions
diff --git a/binapi/vxlan_gpe/vxlan_gpe.ba.go b/binapi/vxlan_gpe/vxlan_gpe.ba.go index aa68eb5..e07ad3a 100644 --- a/binapi/vxlan_gpe/vxlan_gpe.ba.go +++ b/binapi/vxlan_gpe/vxlan_gpe.ba.go @@ -1,13 +1,13 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: // binapi-generator: v0.5.0-dev -// VPP: 21.06-release +// VPP: 22.02-release // source: /usr/share/vpp/api/core/vxlan_gpe.api.json // Package vxlan_gpe contains generated bindings for API file vxlan_gpe.api. // // Contents: -// 6 messages +// 10 messages // package vxlan_gpe @@ -26,8 +26,8 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "vxlan_gpe" - APIVersion = "2.0.0" - VersionCrc = 0x7a970d0b + APIVersion = "2.1.0" + VersionCrc = 0x3bc06278 ) // SwInterfaceSetVxlanGpeBypass defines message 'sw_interface_set_vxlan_gpe_bypass'. @@ -212,6 +212,120 @@ func (m *VxlanGpeAddDelTunnelReply) Unmarshal(b []byte) error { return nil } +// VxlanGpeAddDelTunnelV2 defines message 'vxlan_gpe_add_del_tunnel_v2'. +type VxlanGpeAddDelTunnelV2 struct { + Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"` + Remote ip_types.Address `binapi:"address,name=remote" json:"remote,omitempty"` + LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"` + RemotePort uint16 `binapi:"u16,name=remote_port" json:"remote_port,omitempty"` + McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"` + EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"` + DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"` + Protocol ip_types.IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"` + Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` + IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` +} + +func (m *VxlanGpeAddDelTunnelV2) Reset() { *m = VxlanGpeAddDelTunnelV2{} } +func (*VxlanGpeAddDelTunnelV2) GetMessageName() string { return "vxlan_gpe_add_del_tunnel_v2" } +func (*VxlanGpeAddDelTunnelV2) GetCrcString() string { return "d62fdb35" } +func (*VxlanGpeAddDelTunnelV2) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *VxlanGpeAddDelTunnelV2) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Local.Af + size += 1 * 16 // m.Local.Un + size += 1 // m.Remote.Af + size += 1 * 16 // m.Remote.Un + size += 2 // m.LocalPort + size += 2 // m.RemotePort + size += 4 // m.McastSwIfIndex + size += 4 // m.EncapVrfID + size += 4 // m.DecapVrfID + size += 1 // m.Protocol + size += 4 // m.Vni + size += 1 // m.IsAdd + return size +} +func (m *VxlanGpeAddDelTunnelV2) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint8(uint8(m.Local.Af)) + buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16) + buf.EncodeUint8(uint8(m.Remote.Af)) + buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16) + buf.EncodeUint16(m.LocalPort) + buf.EncodeUint16(m.RemotePort) + buf.EncodeUint32(uint32(m.McastSwIfIndex)) + buf.EncodeUint32(m.EncapVrfID) + buf.EncodeUint32(m.DecapVrfID) + buf.EncodeUint8(uint8(m.Protocol)) + buf.EncodeUint32(m.Vni) + buf.EncodeBool(m.IsAdd) + return buf.Bytes(), nil +} +func (m *VxlanGpeAddDelTunnelV2) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.LocalPort = buf.DecodeUint16() + m.RemotePort = buf.DecodeUint16() + m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.EncapVrfID = buf.DecodeUint32() + m.DecapVrfID = buf.DecodeUint32() + m.Protocol = ip_types.IPProto(buf.DecodeUint8()) + m.Vni = buf.DecodeUint32() + m.IsAdd = buf.DecodeBool() + return nil +} + +// VxlanGpeAddDelTunnelV2Reply defines message 'vxlan_gpe_add_del_tunnel_v2_reply'. +type VxlanGpeAddDelTunnelV2Reply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *VxlanGpeAddDelTunnelV2Reply) Reset() { *m = VxlanGpeAddDelTunnelV2Reply{} } +func (*VxlanGpeAddDelTunnelV2Reply) GetMessageName() string { + return "vxlan_gpe_add_del_tunnel_v2_reply" +} +func (*VxlanGpeAddDelTunnelV2Reply) GetCrcString() string { return "5383d31f" } +func (*VxlanGpeAddDelTunnelV2Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *VxlanGpeAddDelTunnelV2Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.SwIfIndex + return size +} +func (m *VxlanGpeAddDelTunnelV2Reply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *VxlanGpeAddDelTunnelV2Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + return nil +} + // VxlanGpeTunnelDetails defines message 'vxlan_gpe_tunnel_details'. type VxlanGpeTunnelDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -316,14 +430,130 @@ func (m *VxlanGpeTunnelDump) Unmarshal(b []byte) error { return nil } +// VxlanGpeTunnelV2Details defines message 'vxlan_gpe_tunnel_v2_details'. +type VxlanGpeTunnelV2Details struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"` + Remote ip_types.Address `binapi:"address,name=remote" json:"remote,omitempty"` + LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"` + RemotePort uint16 `binapi:"u16,name=remote_port" json:"remote_port,omitempty"` + Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` + Protocol ip_types.IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"` + McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"` + EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"` + DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"` + IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` +} + +func (m *VxlanGpeTunnelV2Details) Reset() { *m = VxlanGpeTunnelV2Details{} } +func (*VxlanGpeTunnelV2Details) GetMessageName() string { return "vxlan_gpe_tunnel_v2_details" } +func (*VxlanGpeTunnelV2Details) GetCrcString() string { return "06be4870" } +func (*VxlanGpeTunnelV2Details) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *VxlanGpeTunnelV2Details) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SwIfIndex + size += 1 // m.Local.Af + size += 1 * 16 // m.Local.Un + size += 1 // m.Remote.Af + size += 1 * 16 // m.Remote.Un + size += 2 // m.LocalPort + size += 2 // m.RemotePort + size += 4 // m.Vni + size += 1 // m.Protocol + size += 4 // m.McastSwIfIndex + size += 4 // m.EncapVrfID + size += 4 // m.DecapVrfID + size += 1 // m.IsIPv6 + return size +} +func (m *VxlanGpeTunnelV2Details) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeUint8(uint8(m.Local.Af)) + buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16) + buf.EncodeUint8(uint8(m.Remote.Af)) + buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16) + buf.EncodeUint16(m.LocalPort) + buf.EncodeUint16(m.RemotePort) + buf.EncodeUint32(m.Vni) + buf.EncodeUint8(uint8(m.Protocol)) + buf.EncodeUint32(uint32(m.McastSwIfIndex)) + buf.EncodeUint32(m.EncapVrfID) + buf.EncodeUint32(m.DecapVrfID) + buf.EncodeBool(m.IsIPv6) + return buf.Bytes(), nil +} +func (m *VxlanGpeTunnelV2Details) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.LocalPort = buf.DecodeUint16() + m.RemotePort = buf.DecodeUint16() + m.Vni = buf.DecodeUint32() + m.Protocol = ip_types.IPProto(buf.DecodeUint8()) + m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.EncapVrfID = buf.DecodeUint32() + m.DecapVrfID = buf.DecodeUint32() + m.IsIPv6 = buf.DecodeBool() + return nil +} + +// VxlanGpeTunnelV2Dump defines message 'vxlan_gpe_tunnel_v2_dump'. +type VxlanGpeTunnelV2Dump struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *VxlanGpeTunnelV2Dump) Reset() { *m = VxlanGpeTunnelV2Dump{} } +func (*VxlanGpeTunnelV2Dump) GetMessageName() string { return "vxlan_gpe_tunnel_v2_dump" } +func (*VxlanGpeTunnelV2Dump) GetCrcString() string { return "f9e6675e" } +func (*VxlanGpeTunnelV2Dump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *VxlanGpeTunnelV2Dump) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SwIfIndex + return size +} +func (m *VxlanGpeTunnelV2Dump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *VxlanGpeTunnelV2Dump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + return nil +} + func init() { file_vxlan_gpe_binapi_init() } func file_vxlan_gpe_binapi_init() { api.RegisterMessage((*SwInterfaceSetVxlanGpeBypass)(nil), "sw_interface_set_vxlan_gpe_bypass_65247409") api.RegisterMessage((*SwInterfaceSetVxlanGpeBypassReply)(nil), "sw_interface_set_vxlan_gpe_bypass_reply_e8d4e804") api.RegisterMessage((*VxlanGpeAddDelTunnel)(nil), "vxlan_gpe_add_del_tunnel_a645b2b0") api.RegisterMessage((*VxlanGpeAddDelTunnelReply)(nil), "vxlan_gpe_add_del_tunnel_reply_5383d31f") + api.RegisterMessage((*VxlanGpeAddDelTunnelV2)(nil), "vxlan_gpe_add_del_tunnel_v2_d62fdb35") + api.RegisterMessage((*VxlanGpeAddDelTunnelV2Reply)(nil), "vxlan_gpe_add_del_tunnel_v2_reply_5383d31f") api.RegisterMessage((*VxlanGpeTunnelDetails)(nil), "vxlan_gpe_tunnel_details_0968fc8b") api.RegisterMessage((*VxlanGpeTunnelDump)(nil), "vxlan_gpe_tunnel_dump_f9e6675e") + api.RegisterMessage((*VxlanGpeTunnelV2Details)(nil), "vxlan_gpe_tunnel_v2_details_06be4870") + api.RegisterMessage((*VxlanGpeTunnelV2Dump)(nil), "vxlan_gpe_tunnel_v2_dump_f9e6675e") } // Messages returns list of all messages in this module. @@ -333,7 +563,11 @@ func AllMessages() []api.Message { (*SwInterfaceSetVxlanGpeBypassReply)(nil), (*VxlanGpeAddDelTunnel)(nil), (*VxlanGpeAddDelTunnelReply)(nil), + (*VxlanGpeAddDelTunnelV2)(nil), + (*VxlanGpeAddDelTunnelV2Reply)(nil), (*VxlanGpeTunnelDetails)(nil), (*VxlanGpeTunnelDump)(nil), + (*VxlanGpeTunnelV2Details)(nil), + (*VxlanGpeTunnelV2Dump)(nil), } } |