X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Fioam_export%2Fioam_export.ba.go;h=b5176c75b13b3db4882744a1b731dde5ad39651a;hb=c94a962279858fb13eaacc689f47aed358373e44;hp=b95f5068ca39107c46c27c05e5ee7ad645ae24a7;hpb=d1f24d37bd447b64e402298bb8eb2479681facf9;p=govpp.git diff --git a/binapi/ioam_export/ioam_export.ba.go b/binapi/ioam_export/ioam_export.ba.go index b95f506..b5176c7 100644 --- a/binapi/ioam_export/ioam_export.ba.go +++ b/binapi/ioam_export/ioam_export.ba.go @@ -2,7 +2,6 @@ // versions: // binapi-generator: v0.4.0-dev // VPP: 20.05-release -// source: /usr/share/vpp/api/plugins/ioam_export.api.json // Package ioam_export contains generated bindings for API file ioam_export.api. // @@ -43,23 +42,20 @@ func (*IoamExportIP6EnableDisable) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *IoamExportIP6EnableDisable) Size() int { +func (m *IoamExportIP6EnableDisable) 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 *IoamExportIP6EnableDisable) 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) @@ -87,27 +83,24 @@ func (*IoamExportIP6EnableDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *IoamExportIP6EnableDisableReply) Size() int { +func (m *IoamExportIP6EnableDisableReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *IoamExportIP6EnableDisableReply) 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 *IoamExportIP6EnableDisableReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil }