X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Fioam_vxlan_gpe%2Fioam_vxlan_gpe.ba.go;h=2d582cd75052fd19047d5c59eb9eb3b5dc0eac1d;hb=c94a962279858fb13eaacc689f47aed358373e44;hp=819b136e34948184d826d50f01bcd55b76c4dfea;hpb=d1f24d37bd447b64e402298bb8eb2479681facf9;p=govpp.git diff --git a/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go b/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go index 819b136..2d582cd 100644 --- a/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go +++ b/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go @@ -2,7 +2,6 @@ // versions: // binapi-generator: v0.4.0-dev // VPP: 20.05-release -// source: /usr/share/vpp/api/plugins/ioam_vxlan_gpe.api.json // Package ioam_vxlan_gpe contains generated bindings for API file ioam_vxlan_gpe.api. // @@ -41,22 +40,19 @@ func (*VxlanGpeIoamDisable) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *VxlanGpeIoamDisable) Size() int { +func (m *VxlanGpeIoamDisable) Size() (size int) { if m == nil { return 0 } - var size int size += 2 // m.ID return size } func (m *VxlanGpeIoamDisable) 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.EncodeUint16(uint16(m.ID)) + buf := codec.NewBuffer(b) + buf.EncodeUint16(m.ID) return buf.Bytes(), nil } func (m *VxlanGpeIoamDisable) Unmarshal(b []byte) error { @@ -77,27 +73,24 @@ func (*VxlanGpeIoamDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *VxlanGpeIoamDisableReply) Size() int { +func (m *VxlanGpeIoamDisableReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *VxlanGpeIoamDisableReply) 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 *VxlanGpeIoamDisableReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } @@ -116,11 +109,10 @@ func (*VxlanGpeIoamEnable) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *VxlanGpeIoamEnable) Size() int { +func (m *VxlanGpeIoamEnable) Size() (size int) { if m == nil { return 0 } - var size int size += 2 // m.ID size += 1 // m.TracePpc size += 1 // m.PowEnable @@ -128,14 +120,12 @@ func (m *VxlanGpeIoamEnable) Size() int { return size } func (m *VxlanGpeIoamEnable) 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.EncodeUint16(uint16(m.ID)) - buf.EncodeUint8(uint8(m.TracePpc)) + buf := codec.NewBuffer(b) + buf.EncodeUint16(m.ID) + buf.EncodeUint8(m.TracePpc) buf.EncodeBool(m.PowEnable) buf.EncodeBool(m.TraceEnable) return buf.Bytes(), nil @@ -161,27 +151,24 @@ func (*VxlanGpeIoamEnableReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *VxlanGpeIoamEnableReply) Size() int { +func (m *VxlanGpeIoamEnableReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *VxlanGpeIoamEnableReply) 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 *VxlanGpeIoamEnableReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } @@ -198,26 +185,23 @@ func (*VxlanGpeIoamTransitDisable) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *VxlanGpeIoamTransitDisable) Size() int { +func (m *VxlanGpeIoamTransitDisable) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.OuterFibIndex size += 1 // m.DstAddr.Af size += 1 * 16 // m.DstAddr.Un return size } func (m *VxlanGpeIoamTransitDisable) 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.OuterFibIndex)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.OuterFibIndex) buf.EncodeUint8(uint8(m.DstAddr.Af)) - buf.EncodeBytes(m.DstAddr.Un.XXX_UnionData[:], 0) + buf.EncodeBytes(m.DstAddr.Un.XXX_UnionData[:], 16) return buf.Bytes(), nil } func (m *VxlanGpeIoamTransitDisable) Unmarshal(b []byte) error { @@ -242,27 +226,24 @@ func (*VxlanGpeIoamTransitDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *VxlanGpeIoamTransitDisableReply) Size() int { +func (m *VxlanGpeIoamTransitDisableReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *VxlanGpeIoamTransitDisableReply) 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 *VxlanGpeIoamTransitDisableReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } @@ -279,26 +260,23 @@ func (*VxlanGpeIoamTransitEnable) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *VxlanGpeIoamTransitEnable) Size() int { +func (m *VxlanGpeIoamTransitEnable) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.OuterFibIndex size += 1 // m.DstAddr.Af size += 1 * 16 // m.DstAddr.Un return size } func (m *VxlanGpeIoamTransitEnable) 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.OuterFibIndex)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.OuterFibIndex) buf.EncodeUint8(uint8(m.DstAddr.Af)) - buf.EncodeBytes(m.DstAddr.Un.XXX_UnionData[:], 0) + buf.EncodeBytes(m.DstAddr.Un.XXX_UnionData[:], 16) return buf.Bytes(), nil } func (m *VxlanGpeIoamTransitEnable) Unmarshal(b []byte) error { @@ -323,27 +301,24 @@ func (*VxlanGpeIoamTransitEnableReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *VxlanGpeIoamTransitEnableReply) Size() int { +func (m *VxlanGpeIoamTransitEnableReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *VxlanGpeIoamTransitEnableReply) 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 *VxlanGpeIoamTransitEnableReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } @@ -361,11 +336,10 @@ func (*VxlanGpeIoamVniDisable) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *VxlanGpeIoamVniDisable) Size() int { +func (m *VxlanGpeIoamVniDisable) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Vni size += 1 // m.Local.Af size += 1 * 16 // m.Local.Un @@ -374,17 +348,15 @@ func (m *VxlanGpeIoamVniDisable) Size() int { return size } func (m *VxlanGpeIoamVniDisable) 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.Vni)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Vni) buf.EncodeUint8(uint8(m.Local.Af)) - buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 0) + buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16) buf.EncodeUint8(uint8(m.Remote.Af)) - buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 0) + buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16) return buf.Bytes(), nil } func (m *VxlanGpeIoamVniDisable) Unmarshal(b []byte) error { @@ -411,27 +383,24 @@ func (*VxlanGpeIoamVniDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *VxlanGpeIoamVniDisableReply) Size() int { +func (m *VxlanGpeIoamVniDisableReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *VxlanGpeIoamVniDisableReply) 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 *VxlanGpeIoamVniDisableReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } @@ -449,11 +418,10 @@ func (*VxlanGpeIoamVniEnable) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *VxlanGpeIoamVniEnable) Size() int { +func (m *VxlanGpeIoamVniEnable) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Vni size += 1 // m.Local.Af size += 1 * 16 // m.Local.Un @@ -462,17 +430,15 @@ func (m *VxlanGpeIoamVniEnable) Size() int { return size } func (m *VxlanGpeIoamVniEnable) 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.Vni)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Vni) buf.EncodeUint8(uint8(m.Local.Af)) - buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 0) + buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16) buf.EncodeUint8(uint8(m.Remote.Af)) - buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 0) + buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16) return buf.Bytes(), nil } func (m *VxlanGpeIoamVniEnable) Unmarshal(b []byte) error { @@ -497,27 +463,24 @@ func (*VxlanGpeIoamVniEnableReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *VxlanGpeIoamVniEnableReply) Size() int { +func (m *VxlanGpeIoamVniEnableReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *VxlanGpeIoamVniEnableReply) 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 *VxlanGpeIoamVniEnableReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil }