X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Frd_cp%2Frd_cp.ba.go;h=ca353244e00475a7065476a88a92ed13166e8230;hb=c94a962279858fb13eaacc689f47aed358373e44;hp=7fefd7958a00635405ebfa5f075295e7a6dd8e36;hpb=d1f24d37bd447b64e402298bb8eb2479681facf9;p=govpp.git diff --git a/binapi/rd_cp/rd_cp.ba.go b/binapi/rd_cp/rd_cp.ba.go index 7fefd79..ca35324 100644 --- a/binapi/rd_cp/rd_cp.ba.go +++ b/binapi/rd_cp/rd_cp.ba.go @@ -2,7 +2,6 @@ // versions: // binapi-generator: v0.4.0-dev // VPP: 20.05-release -// source: /usr/share/vpp/api/core/rd_cp.api.json // Package rd_cp contains generated bindings for API file rd_cp.api. // @@ -43,23 +42,20 @@ func (*IP6NdAddressAutoconfig) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *IP6NdAddressAutoconfig) Size() int { +func (m *IP6NdAddressAutoconfig) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.SwIfIndex size += 1 // m.Enable size += 1 // m.InstallDefaultRoutes return size } func (m *IP6NdAddressAutoconfig) 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.EncodeUint32(uint32(m.SwIfIndex)) buf.EncodeBool(m.Enable) buf.EncodeBool(m.InstallDefaultRoutes) @@ -85,27 +81,24 @@ func (*IP6NdAddressAutoconfigReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *IP6NdAddressAutoconfigReply) Size() int { +func (m *IP6NdAddressAutoconfigReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *IP6NdAddressAutoconfigReply) 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 *IP6NdAddressAutoconfigReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil }