Regenerate binapi from Dockerfile
[govpp.git] / binapi / urpf / urpf.ba.go
index d324bdb..47db00f 100644 (file)
@@ -1,7 +1,7 @@
 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
 // versions:
-//  binapi-generator: v0.4.0-dev
-//  VPP:              20.05-release
+//  binapi-generator: v0.5.0-dev
+//  VPP:              21.06-release
 // source: /usr/share/vpp/api/plugins/urpf.api.json
 
 // Package urpf contains generated bindings for API file urpf.api.
 package urpf
 
 import (
+       "strconv"
+
        api "git.fd.io/govpp.git/api"
        _ "git.fd.io/govpp.git/binapi/fib_types"
        interface_types "git.fd.io/govpp.git/binapi/interface_types"
        ip_types "git.fd.io/govpp.git/binapi/ip_types"
        codec "git.fd.io/govpp.git/codec"
-       "strconv"
 )
 
 // This is a compile-time assertion to ensure that this generated file
@@ -30,7 +31,7 @@ const _ = api.GoVppAPIPackageIsVersion2
 const (
        APIFile    = "urpf"
        APIVersion = "1.0.0"
-       VersionCrc = 0x3e2ebd8a
+       VersionCrc = 0xb2bfd2c4
 )
 
 // UrpfMode defines enum 'urpf_mode'.
@@ -78,11 +79,10 @@ func (*UrpfUpdate) GetMessageType() api.MessageType {
        return api.RequestMessage
 }
 
-func (m *UrpfUpdate) Size() int {
+func (m *UrpfUpdate) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 1 // m.IsInput
        size += 1 // m.Mode
        size += 1 // m.Af
@@ -90,12 +90,10 @@ func (m *UrpfUpdate) Size() int {
        return size
 }
 func (m *UrpfUpdate) 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.IsInput)
        buf.EncodeUint8(uint8(m.Mode))
        buf.EncodeUint8(uint8(m.Af))
@@ -123,27 +121,24 @@ func (*UrpfUpdateReply) GetMessageType() api.MessageType {
        return api.ReplyMessage
 }
 
-func (m *UrpfUpdateReply) Size() int {
+func (m *UrpfUpdateReply) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.Retval
        return size
 }
 func (m *UrpfUpdateReply) 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 *UrpfUpdateReply) Unmarshal(b []byte) error {
        buf := codec.NewBuffer(b)
-       m.Retval = int32(buf.DecodeUint32())
+       m.Retval = buf.DecodeInt32()
        return nil
 }