// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.6.0-dev
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/udp_ping.api.json
// Package udp_ping contains generated bindings for API file udp_ping.api.
package udp_ping
import (
- api "git.fd.io/govpp.git/api"
- ip_types "git.fd.io/govpp.git/binapi/ip_types"
- codec "git.fd.io/govpp.git/codec"
+ api "go.fd.io/govpp/api"
+ ip_types "go.fd.io/govpp/binapi/ip_types"
+ codec "go.fd.io/govpp/codec"
)
// This is a compile-time assertion to ensure that this generated file
const (
APIFile = "udp_ping"
APIVersion = "3.0.0"
- VersionCrc = 0x3b2c67de
+ VersionCrc = 0x16d961db
)
// UDPPingAddDel defines message 'udp_ping_add_del'.
func (m *UDPPingAddDel) Reset() { *m = UDPPingAddDel{} }
func (*UDPPingAddDel) GetMessageName() string { return "udp_ping_add_del" }
-func (*UDPPingAddDel) GetCrcString() string { return "c692b188" }
+func (*UDPPingAddDel) GetCrcString() string { return "fa2628fc" }
func (*UDPPingAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *UDPPingAddDel) Size() int {
+func (m *UDPPingAddDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.SrcIPAddress.Af
size += 1 * 16 // m.SrcIPAddress.Un
size += 1 // m.DstIPAddress.Af
return size
}
func (m *UDPPingAddDel) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeUint8(uint8(m.SrcIPAddress.Af))
- buf.EncodeBytes(m.SrcIPAddress.Un.XXX_UnionData[:], 0)
+ buf.EncodeBytes(m.SrcIPAddress.Un.XXX_UnionData[:], 16)
buf.EncodeUint8(uint8(m.DstIPAddress.Af))
- buf.EncodeBytes(m.DstIPAddress.Un.XXX_UnionData[:], 0)
- buf.EncodeUint16(uint16(m.StartSrcPort))
- buf.EncodeUint16(uint16(m.EndSrcPort))
- buf.EncodeUint16(uint16(m.StartDstPort))
- buf.EncodeUint16(uint16(m.EndDstPort))
- buf.EncodeUint16(uint16(m.Interval))
- buf.EncodeUint8(uint8(m.Dis))
- buf.EncodeUint8(uint8(m.FaultDet))
- buf.EncodeBytes(m.Reserve[:], 3)
+ buf.EncodeBytes(m.DstIPAddress.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint16(m.StartSrcPort)
+ buf.EncodeUint16(m.EndSrcPort)
+ buf.EncodeUint16(m.StartDstPort)
+ buf.EncodeUint16(m.EndDstPort)
+ buf.EncodeUint16(m.Interval)
+ buf.EncodeUint8(m.Dis)
+ buf.EncodeUint8(m.FaultDet)
+ buf.EncodeBytes(m.Reserve, 3)
return buf.Bytes(), nil
}
func (m *UDPPingAddDel) Unmarshal(b []byte) error {
m.Interval = buf.DecodeUint16()
m.Dis = buf.DecodeUint8()
m.FaultDet = buf.DecodeUint8()
- copy(m.Reserve[:], buf.DecodeBytes(3))
+ m.Reserve = make([]byte, 3)
+ copy(m.Reserve, buf.DecodeBytes(len(m.Reserve)))
return nil
}
return api.ReplyMessage
}
-func (m *UDPPingAddDelReply) Size() int {
+func (m *UDPPingAddDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *UDPPingAddDelReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *UDPPingAddDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *UDPPingExport) Size() int {
+func (m *UDPPingExport) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.Enable
return size
}
func (m *UDPPingExport) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
+ buf := codec.NewBuffer(b)
buf.EncodeBool(m.Enable)
return buf.Bytes(), nil
}
return api.ReplyMessage
}
-func (m *UDPPingExportReply) Size() int {
+func (m *UDPPingExportReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *UDPPingExportReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
+ b = make([]byte, m.Size())
}
- buf.EncodeUint32(uint32(m.Retval))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
return buf.Bytes(), nil
}
func (m *UDPPingExportReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func init() { file_udp_ping_binapi_init() }
func file_udp_ping_binapi_init() {
- api.RegisterMessage((*UDPPingAddDel)(nil), "udp_ping_add_del_c692b188")
+ api.RegisterMessage((*UDPPingAddDel)(nil), "udp_ping_add_del_fa2628fc")
api.RegisterMessage((*UDPPingAddDelReply)(nil), "udp_ping_add_del_reply_e8d4e804")
api.RegisterMessage((*UDPPingExport)(nil), "udp_ping_export_b3e225d2")
api.RegisterMessage((*UDPPingExportReply)(nil), "udp_ping_export_reply_e8d4e804")