X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Fvxlan_gpe_ioam_export%2Fvxlan_gpe_ioam_export.ba.go;h=8820fab16a9f0222f9091e1bcc20feac7b806192;hb=58da9ac6e691a8c660eb8ca838a154e11da0db68;hp=5a259056a55fef22269528bd1c8ade1c45100182;hpb=a155cd438c6558da266c1c5931361ea088b35653;p=govpp.git diff --git a/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go b/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go index 5a25905..8820fab 100644 --- a/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go +++ b/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go @@ -45,23 +45,20 @@ func (*VxlanGpeIoamExportEnableDisable) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *VxlanGpeIoamExportEnableDisable) Size() int { +func (m *VxlanGpeIoamExportEnableDisable) Size() (size int) { if m == nil { return 0 } - var size int size += 1 // m.IsDisable size += 1 * 4 // m.CollectorAddress size += 1 * 4 // m.SrcAddress return size } func (m *VxlanGpeIoamExportEnableDisable) 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.IsDisable) buf.EncodeBytes(m.CollectorAddress[:], 4) buf.EncodeBytes(m.SrcAddress[:], 4) @@ -89,27 +86,24 @@ func (*VxlanGpeIoamExportEnableDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *VxlanGpeIoamExportEnableDisableReply) Size() int { +func (m *VxlanGpeIoamExportEnableDisableReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *VxlanGpeIoamExportEnableDisableReply) 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 *VxlanGpeIoamExportEnableDisableReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil }