X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Flldp%2Flldp.ba.go;h=bf513a9bfad4fa626268f198be4dce3e99064ea6;hb=67cea0df30f7ef348e265c9326f7a9f15ba26240;hp=a9bae7fca696b6b6cb00b3677312587bf56d84b6;hpb=d1f24d37bd447b64e402298bb8eb2479681facf9;p=govpp.git diff --git a/binapi/lldp/lldp.ba.go b/binapi/lldp/lldp.ba.go index a9bae7f..bf513a9 100644 --- a/binapi/lldp/lldp.ba.go +++ b/binapi/lldp/lldp.ba.go @@ -1,8 +1,8 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 20.05-release -// source: /usr/share/vpp/api/core/lldp.api.json +// binapi-generator: v0.6.0-dev +// VPP: 22.02-release +// source: /usr/share/vpp/api/plugins/lldp.api.json // Package lldp contains generated bindings for API file lldp.api. // @@ -12,10 +12,10 @@ package lldp import ( - 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" + api "go.fd.io/govpp/api" + interface_types "go.fd.io/govpp/binapi/interface_types" + ip_types "go.fd.io/govpp/binapi/ip_types" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -27,7 +27,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "lldp" APIVersion = "2.0.0" - VersionCrc = 0x44347d6 + VersionCrc = 0x8a7e7049 ) // LldpConfig defines message 'lldp_config'. @@ -44,25 +44,22 @@ func (*LldpConfig) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *LldpConfig) Size() int { +func (m *LldpConfig) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.TxHold size += 4 // m.TxInterval size += 4 + len(m.SystemName) // m.SystemName return size } func (m *LldpConfig) 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.TxHold)) - buf.EncodeUint32(uint32(m.TxInterval)) + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.TxHold) + buf.EncodeUint32(m.TxInterval) buf.EncodeString(m.SystemName, 0) return buf.Bytes(), nil } @@ -86,27 +83,24 @@ func (*LldpConfigReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *LldpConfigReply) Size() int { +func (m *LldpConfigReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *LldpConfigReply) 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 *LldpConfigReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } @@ -122,16 +116,15 @@ type SwInterfaceSetLldp struct { func (m *SwInterfaceSetLldp) Reset() { *m = SwInterfaceSetLldp{} } func (*SwInterfaceSetLldp) GetMessageName() string { return "sw_interface_set_lldp" } -func (*SwInterfaceSetLldp) GetCrcString() string { return "d646ae0f" } +func (*SwInterfaceSetLldp) GetCrcString() string { return "57afbcd4" } func (*SwInterfaceSetLldp) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *SwInterfaceSetLldp) Size() int { +func (m *SwInterfaceSetLldp) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.SwIfIndex size += 1 * 4 // m.MgmtIP4 size += 1 * 16 // m.MgmtIP6 @@ -141,16 +134,14 @@ func (m *SwInterfaceSetLldp) Size() int { return size } func (m *SwInterfaceSetLldp) 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.MgmtIP4[:], 4) buf.EncodeBytes(m.MgmtIP6[:], 16) - buf.EncodeBytes(m.MgmtOid[:], 128) + buf.EncodeBytes(m.MgmtOid, 128) buf.EncodeBool(m.Enable) buf.EncodeString(m.PortDesc, 0) return buf.Bytes(), nil @@ -160,7 +151,8 @@ func (m *SwInterfaceSetLldp) Unmarshal(b []byte) error { m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) copy(m.MgmtIP4[:], buf.DecodeBytes(4)) copy(m.MgmtIP6[:], buf.DecodeBytes(16)) - copy(m.MgmtOid[:], buf.DecodeBytes(128)) + m.MgmtOid = make([]byte, 128) + copy(m.MgmtOid, buf.DecodeBytes(len(m.MgmtOid))) m.Enable = buf.DecodeBool() m.PortDesc = buf.DecodeString(0) return nil @@ -178,27 +170,24 @@ func (*SwInterfaceSetLldpReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *SwInterfaceSetLldpReply) Size() int { +func (m *SwInterfaceSetLldpReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *SwInterfaceSetLldpReply) 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 *SwInterfaceSetLldpReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } @@ -206,7 +195,7 @@ func init() { file_lldp_binapi_init() } func file_lldp_binapi_init() { api.RegisterMessage((*LldpConfig)(nil), "lldp_config_c14445df") api.RegisterMessage((*LldpConfigReply)(nil), "lldp_config_reply_e8d4e804") - api.RegisterMessage((*SwInterfaceSetLldp)(nil), "sw_interface_set_lldp_d646ae0f") + api.RegisterMessage((*SwInterfaceSetLldp)(nil), "sw_interface_set_lldp_57afbcd4") api.RegisterMessage((*SwInterfaceSetLldpReply)(nil), "sw_interface_set_lldp_reply_e8d4e804") }