Refactoring and fixes
[govpp.git] / binapi / igmp / igmp.ba.go
index 5e520cc..289bba8 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
+//  VPP:              21.06-release
 // source: /usr/share/vpp/api/plugins/igmp.api.json
 
 // Package igmp contains generated bindings for API file igmp.api.
 package igmp
 
 import (
+       "strconv"
+
        api "git.fd.io/govpp.git/api"
        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    = "igmp"
        APIVersion = "1.0.0"
-       VersionCrc = 0x290eccf8
+       VersionCrc = 0x95a4ff29
 )
 
 // FilterMode defines enum 'filter_mode'.
@@ -114,21 +115,18 @@ func (*IgmpClearInterface) GetMessageType() api.MessageType {
        return api.RequestMessage
 }
 
-func (m *IgmpClearInterface) Size() int {
+func (m *IgmpClearInterface) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.SwIfIndex
        return size
 }
 func (m *IgmpClearInterface) 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))
        return buf.Bytes(), nil
 }
@@ -150,27 +148,24 @@ func (*IgmpClearInterfaceReply) GetMessageType() api.MessageType {
        return api.ReplyMessage
 }
 
-func (m *IgmpClearInterfaceReply) Size() int {
+func (m *IgmpClearInterfaceReply) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.Retval
        return size
 }
 func (m *IgmpClearInterfaceReply) 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 *IgmpClearInterfaceReply) Unmarshal(b []byte) error {
        buf := codec.NewBuffer(b)
-       m.Retval = int32(buf.DecodeUint32())
+       m.Retval = buf.DecodeInt32()
        return nil
 }
 
@@ -183,28 +178,25 @@ type IgmpDetails struct {
 
 func (m *IgmpDetails) Reset()               { *m = IgmpDetails{} }
 func (*IgmpDetails) GetMessageName() string { return "igmp_details" }
-func (*IgmpDetails) GetCrcString() string   { return "52f12a89" }
+func (*IgmpDetails) GetCrcString() string   { return "38f09929" }
 func (*IgmpDetails) GetMessageType() api.MessageType {
        return api.ReplyMessage
 }
 
-func (m *IgmpDetails) Size() int {
+func (m *IgmpDetails) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4     // m.SwIfIndex
        size += 1 * 4 // m.Saddr
        size += 1 * 4 // m.Gaddr
        return size
 }
 func (m *IgmpDetails) 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.EncodeBytes(m.Saddr[:], 4)
        buf.EncodeBytes(m.Gaddr[:], 4)
@@ -230,21 +222,18 @@ func (*IgmpDump) GetMessageType() api.MessageType {
        return api.RequestMessage
 }
 
-func (m *IgmpDump) Size() int {
+func (m *IgmpDump) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.SwIfIndex
        return size
 }
 func (m *IgmpDump) 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))
        return buf.Bytes(), nil
 }
@@ -268,25 +257,22 @@ func (*IgmpEnableDisable) GetMessageType() api.MessageType {
        return api.RequestMessage
 }
 
-func (m *IgmpEnableDisable) Size() int {
+func (m *IgmpEnableDisable) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 1 // m.Enable
        size += 1 // m.Mode
        size += 4 // m.SwIfIndex
        return size
 }
 func (m *IgmpEnableDisable) 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)
-       buf.EncodeUint8(uint8(m.Mode))
+       buf.EncodeUint8(m.Mode)
        buf.EncodeUint32(uint32(m.SwIfIndex))
        return buf.Bytes(), nil
 }
@@ -310,27 +296,24 @@ func (*IgmpEnableDisableReply) GetMessageType() api.MessageType {
        return api.ReplyMessage
 }
 
-func (m *IgmpEnableDisableReply) Size() int {
+func (m *IgmpEnableDisableReply) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.Retval
        return size
 }
 func (m *IgmpEnableDisableReply) 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 *IgmpEnableDisableReply) Unmarshal(b []byte) error {
        buf := codec.NewBuffer(b)
-       m.Retval = int32(buf.DecodeUint32())
+       m.Retval = buf.DecodeInt32()
        return nil
 }
 
@@ -344,16 +327,15 @@ type IgmpEvent struct {
 
 func (m *IgmpEvent) Reset()               { *m = IgmpEvent{} }
 func (*IgmpEvent) GetMessageName() string { return "igmp_event" }
-func (*IgmpEvent) GetCrcString() string   { return "d7696eaf" }
+func (*IgmpEvent) GetCrcString() string   { return "85fe93ec" }
 func (*IgmpEvent) GetMessageType() api.MessageType {
        return api.OtherMessage
 }
 
-func (m *IgmpEvent) Size() int {
+func (m *IgmpEvent) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4     // m.SwIfIndex
        size += 4     // m.Filter
        size += 1 * 4 // m.Saddr
@@ -361,12 +343,10 @@ func (m *IgmpEvent) Size() int {
        return size
 }
 func (m *IgmpEvent) 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.EncodeUint32(uint32(m.Filter))
        buf.EncodeBytes(m.Saddr[:], 4)
@@ -389,16 +369,15 @@ type IgmpGroupPrefixDetails struct {
 
 func (m *IgmpGroupPrefixDetails) Reset()               { *m = IgmpGroupPrefixDetails{} }
 func (*IgmpGroupPrefixDetails) GetMessageName() string { return "igmp_group_prefix_details" }
-func (*IgmpGroupPrefixDetails) GetCrcString() string   { return "c3b3c526" }
+func (*IgmpGroupPrefixDetails) GetCrcString() string   { return "259ccd81" }
 func (*IgmpGroupPrefixDetails) GetMessageType() api.MessageType {
        return api.ReplyMessage
 }
 
-func (m *IgmpGroupPrefixDetails) Size() int {
+func (m *IgmpGroupPrefixDetails) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4      // m.Gp.Type
        size += 1      // m.Gp.Prefix.Address.Af
        size += 1 * 16 // m.Gp.Prefix.Address.Un
@@ -406,16 +385,14 @@ func (m *IgmpGroupPrefixDetails) Size() int {
        return size
 }
 func (m *IgmpGroupPrefixDetails) 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.Gp.Type))
        buf.EncodeUint8(uint8(m.Gp.Prefix.Address.Af))
-       buf.EncodeBytes(m.Gp.Prefix.Address.Un.XXX_UnionData[:], 0)
-       buf.EncodeUint8(uint8(m.Gp.Prefix.Len))
+       buf.EncodeBytes(m.Gp.Prefix.Address.Un.XXX_UnionData[:], 16)
+       buf.EncodeUint8(m.Gp.Prefix.Len)
        return buf.Bytes(), nil
 }
 func (m *IgmpGroupPrefixDetails) Unmarshal(b []byte) error {
@@ -437,20 +414,17 @@ func (*IgmpGroupPrefixDump) GetMessageType() api.MessageType {
        return api.RequestMessage
 }
 
-func (m *IgmpGroupPrefixDump) Size() int {
+func (m *IgmpGroupPrefixDump) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        return size
 }
 func (m *IgmpGroupPrefixDump) 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)
        return buf.Bytes(), nil
 }
 func (m *IgmpGroupPrefixDump) Unmarshal(b []byte) error {
@@ -464,16 +438,15 @@ type IgmpGroupPrefixSet struct {
 
 func (m *IgmpGroupPrefixSet) Reset()               { *m = IgmpGroupPrefixSet{} }
 func (*IgmpGroupPrefixSet) GetMessageName() string { return "igmp_group_prefix_set" }
-func (*IgmpGroupPrefixSet) GetCrcString() string   { return "d4f20ac5" }
+func (*IgmpGroupPrefixSet) GetCrcString() string   { return "5b14a5ce" }
 func (*IgmpGroupPrefixSet) GetMessageType() api.MessageType {
        return api.RequestMessage
 }
 
-func (m *IgmpGroupPrefixSet) Size() int {
+func (m *IgmpGroupPrefixSet) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4      // m.Gp.Type
        size += 1      // m.Gp.Prefix.Address.Af
        size += 1 * 16 // m.Gp.Prefix.Address.Un
@@ -481,16 +454,14 @@ func (m *IgmpGroupPrefixSet) Size() int {
        return size
 }
 func (m *IgmpGroupPrefixSet) 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.Gp.Type))
        buf.EncodeUint8(uint8(m.Gp.Prefix.Address.Af))
-       buf.EncodeBytes(m.Gp.Prefix.Address.Un.XXX_UnionData[:], 0)
-       buf.EncodeUint8(uint8(m.Gp.Prefix.Len))
+       buf.EncodeBytes(m.Gp.Prefix.Address.Un.XXX_UnionData[:], 16)
+       buf.EncodeUint8(m.Gp.Prefix.Len)
        return buf.Bytes(), nil
 }
 func (m *IgmpGroupPrefixSet) Unmarshal(b []byte) error {
@@ -514,27 +485,24 @@ func (*IgmpGroupPrefixSetReply) GetMessageType() api.MessageType {
        return api.ReplyMessage
 }
 
-func (m *IgmpGroupPrefixSetReply) Size() int {
+func (m *IgmpGroupPrefixSetReply) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.Retval
        return size
 }
 func (m *IgmpGroupPrefixSetReply) 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 *IgmpGroupPrefixSetReply) Unmarshal(b []byte) error {
        buf := codec.NewBuffer(b)
-       m.Retval = int32(buf.DecodeUint32())
+       m.Retval = buf.DecodeInt32()
        return nil
 }
 
@@ -545,16 +513,15 @@ type IgmpListen struct {
 
 func (m *IgmpListen) Reset()               { *m = IgmpListen{} }
 func (*IgmpListen) GetMessageName() string { return "igmp_listen" }
-func (*IgmpListen) GetCrcString() string   { return "3f93a51a" }
+func (*IgmpListen) GetCrcString() string   { return "19a49f1e" }
 func (*IgmpListen) GetMessageType() api.MessageType {
        return api.RequestMessage
 }
 
-func (m *IgmpListen) Size() int {
+func (m *IgmpListen) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4     // m.Group.Filter
        size += 1     // m.Group.NSrcs
        size += 4     // m.Group.SwIfIndex
@@ -570,18 +537,16 @@ func (m *IgmpListen) Size() int {
        return size
 }
 func (m *IgmpListen) 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.Group.Filter))
        buf.EncodeUint8(uint8(len(m.Group.Saddrs)))
        buf.EncodeUint32(uint32(m.Group.SwIfIndex))
        buf.EncodeBytes(m.Group.Gaddr[:], 4)
        for j1 := 0; j1 < len(m.Group.Saddrs); j1++ {
-               var v1 ip_types.IP4Address
+               var v1 ip_types.IP4Address // Saddrs
                if j1 < len(m.Group.Saddrs) {
                        v1 = m.Group.Saddrs[j1]
                }
@@ -595,7 +560,7 @@ func (m *IgmpListen) Unmarshal(b []byte) error {
        m.Group.NSrcs = buf.DecodeUint8()
        m.Group.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
        copy(m.Group.Gaddr[:], buf.DecodeBytes(4))
-       m.Group.Saddrs = make([]ip_types.IP4Address, int(m.Group.NSrcs))
+       m.Group.Saddrs = make([]ip_types.IP4Address, m.Group.NSrcs)
        for j1 := 0; j1 < len(m.Group.Saddrs); j1++ {
                copy(m.Group.Saddrs[j1][:], buf.DecodeBytes(4))
        }
@@ -614,27 +579,24 @@ func (*IgmpListenReply) GetMessageType() api.MessageType {
        return api.ReplyMessage
 }
 
-func (m *IgmpListenReply) Size() int {
+func (m *IgmpListenReply) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.Retval
        return size
 }
 func (m *IgmpListenReply) 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 *IgmpListenReply) Unmarshal(b []byte) error {
        buf := codec.NewBuffer(b)
-       m.Retval = int32(buf.DecodeUint32())
+       m.Retval = buf.DecodeInt32()
        return nil
 }
 
@@ -652,25 +614,22 @@ func (*IgmpProxyDeviceAddDel) GetMessageType() api.MessageType {
        return api.RequestMessage
 }
 
-func (m *IgmpProxyDeviceAddDel) Size() int {
+func (m *IgmpProxyDeviceAddDel) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 1 // m.Add
        size += 4 // m.VrfID
        size += 4 // m.SwIfIndex
        return size
 }
 func (m *IgmpProxyDeviceAddDel) 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.EncodeUint8(uint8(m.Add))
-       buf.EncodeUint32(uint32(m.VrfID))
+       buf := codec.NewBuffer(b)
+       buf.EncodeUint8(m.Add)
+       buf.EncodeUint32(m.VrfID)
        buf.EncodeUint32(uint32(m.SwIfIndex))
        return buf.Bytes(), nil
 }
@@ -698,25 +657,22 @@ func (*IgmpProxyDeviceAddDelInterface) GetMessageType() api.MessageType {
        return api.RequestMessage
 }
 
-func (m *IgmpProxyDeviceAddDelInterface) Size() int {
+func (m *IgmpProxyDeviceAddDelInterface) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 1 // m.Add
        size += 4 // m.VrfID
        size += 4 // m.SwIfIndex
        return size
 }
 func (m *IgmpProxyDeviceAddDelInterface) 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.Add)
-       buf.EncodeUint32(uint32(m.VrfID))
+       buf.EncodeUint32(m.VrfID)
        buf.EncodeUint32(uint32(m.SwIfIndex))
        return buf.Bytes(), nil
 }
@@ -742,27 +698,24 @@ func (*IgmpProxyDeviceAddDelInterfaceReply) GetMessageType() api.MessageType {
        return api.ReplyMessage
 }
 
-func (m *IgmpProxyDeviceAddDelInterfaceReply) Size() int {
+func (m *IgmpProxyDeviceAddDelInterfaceReply) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.Retval
        return size
 }
 func (m *IgmpProxyDeviceAddDelInterfaceReply) 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 *IgmpProxyDeviceAddDelInterfaceReply) Unmarshal(b []byte) error {
        buf := codec.NewBuffer(b)
-       m.Retval = int32(buf.DecodeUint32())
+       m.Retval = buf.DecodeInt32()
        return nil
 }
 
@@ -778,27 +731,24 @@ func (*IgmpProxyDeviceAddDelReply) GetMessageType() api.MessageType {
        return api.ReplyMessage
 }
 
-func (m *IgmpProxyDeviceAddDelReply) Size() int {
+func (m *IgmpProxyDeviceAddDelReply) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.Retval
        return size
 }
 func (m *IgmpProxyDeviceAddDelReply) 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 *IgmpProxyDeviceAddDelReply) Unmarshal(b []byte) error {
        buf := codec.NewBuffer(b)
-       m.Retval = int32(buf.DecodeUint32())
+       m.Retval = buf.DecodeInt32()
        return nil
 }
 
@@ -815,24 +765,21 @@ func (*WantIgmpEvents) GetMessageType() api.MessageType {
        return api.RequestMessage
 }
 
-func (m *WantIgmpEvents) Size() int {
+func (m *WantIgmpEvents) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.Enable
        size += 4 // m.PID
        return size
 }
 func (m *WantIgmpEvents) 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.Enable))
-       buf.EncodeUint32(uint32(m.PID))
+       buf := codec.NewBuffer(b)
+       buf.EncodeUint32(m.Enable)
+       buf.EncodeUint32(m.PID)
        return buf.Bytes(), nil
 }
 func (m *WantIgmpEvents) Unmarshal(b []byte) error {
@@ -854,27 +801,24 @@ func (*WantIgmpEventsReply) GetMessageType() api.MessageType {
        return api.ReplyMessage
 }
 
-func (m *WantIgmpEventsReply) Size() int {
+func (m *WantIgmpEventsReply) Size() (size int) {
        if m == nil {
                return 0
        }
-       var size int
        size += 4 // m.Retval
        return size
 }
 func (m *WantIgmpEventsReply) 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 *WantIgmpEventsReply) Unmarshal(b []byte) error {
        buf := codec.NewBuffer(b)
-       m.Retval = int32(buf.DecodeUint32())
+       m.Retval = buf.DecodeInt32()
        return nil
 }
 
@@ -882,16 +826,16 @@ func init() { file_igmp_binapi_init() }
 func file_igmp_binapi_init() {
        api.RegisterMessage((*IgmpClearInterface)(nil), "igmp_clear_interface_f9e6675e")
        api.RegisterMessage((*IgmpClearInterfaceReply)(nil), "igmp_clear_interface_reply_e8d4e804")
-       api.RegisterMessage((*IgmpDetails)(nil), "igmp_details_52f12a89")
+       api.RegisterMessage((*IgmpDetails)(nil), "igmp_details_38f09929")
        api.RegisterMessage((*IgmpDump)(nil), "igmp_dump_f9e6675e")
        api.RegisterMessage((*IgmpEnableDisable)(nil), "igmp_enable_disable_b1edfb96")
        api.RegisterMessage((*IgmpEnableDisableReply)(nil), "igmp_enable_disable_reply_e8d4e804")
-       api.RegisterMessage((*IgmpEvent)(nil), "igmp_event_d7696eaf")
-       api.RegisterMessage((*IgmpGroupPrefixDetails)(nil), "igmp_group_prefix_details_c3b3c526")
+       api.RegisterMessage((*IgmpEvent)(nil), "igmp_event_85fe93ec")
+       api.RegisterMessage((*IgmpGroupPrefixDetails)(nil), "igmp_group_prefix_details_259ccd81")
        api.RegisterMessage((*IgmpGroupPrefixDump)(nil), "igmp_group_prefix_dump_51077d14")
-       api.RegisterMessage((*IgmpGroupPrefixSet)(nil), "igmp_group_prefix_set_d4f20ac5")
+       api.RegisterMessage((*IgmpGroupPrefixSet)(nil), "igmp_group_prefix_set_5b14a5ce")
        api.RegisterMessage((*IgmpGroupPrefixSetReply)(nil), "igmp_group_prefix_set_reply_e8d4e804")
-       api.RegisterMessage((*IgmpListen)(nil), "igmp_listen_3f93a51a")
+       api.RegisterMessage((*IgmpListen)(nil), "igmp_listen_19a49f1e")
        api.RegisterMessage((*IgmpListenReply)(nil), "igmp_listen_reply_e8d4e804")
        api.RegisterMessage((*IgmpProxyDeviceAddDel)(nil), "igmp_proxy_device_add_del_0b9be9ce")
        api.RegisterMessage((*IgmpProxyDeviceAddDelInterface)(nil), "igmp_proxy_device_add_del_interface_1a9ec24a")