X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Fpg%2Fpg.ba.go;h=ae18acbf9c508b736c4bc7f1a85baafa78aac59b;hb=c09ee3241377aae2530a73d48c4e20641d76d0ee;hp=2f451354709d94e31cd6f179612cd08ecd4cc66d;hpb=d1f24d37bd447b64e402298bb8eb2479681facf9;p=govpp.git diff --git a/binapi/pg/pg.ba.go b/binapi/pg/pg.ba.go index 2f45135..ae18acb 100644 --- a/binapi/pg/pg.ba.go +++ b/binapi/pg/pg.ba.go @@ -1,13 +1,13 @@ // 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/core/pg.api.json // Package pg contains generated bindings for API file pg.api. // // Contents: -// 6 messages +// 8 messages // package pg @@ -26,7 +26,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "pg" APIVersion = "2.0.0" - VersionCrc = 0xb7fe86ae + VersionCrc = 0x3a037a0e ) // PgCapture defines message 'pg_capture'. @@ -44,11 +44,10 @@ func (*PgCapture) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *PgCapture) Size() int { +func (m *PgCapture) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.InterfaceID size += 1 // m.IsEnabled size += 4 // m.Count @@ -56,15 +55,13 @@ func (m *PgCapture) Size() int { return size } func (m *PgCapture) 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.InterfaceID)) buf.EncodeBool(m.IsEnabled) - buf.EncodeUint32(uint32(m.Count)) + buf.EncodeUint32(m.Count) buf.EncodeString(m.PcapFileName, 0) return buf.Bytes(), nil } @@ -89,27 +86,24 @@ func (*PgCaptureReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *PgCaptureReply) Size() int { +func (m *PgCaptureReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *PgCaptureReply) 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 *PgCaptureReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() return nil } @@ -127,26 +121,23 @@ func (*PgCreateInterface) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *PgCreateInterface) Size() int { +func (m *PgCreateInterface) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.InterfaceID size += 1 // m.GsoEnabled size += 4 // m.GsoSize return size } func (m *PgCreateInterface) 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.InterfaceID)) buf.EncodeBool(m.GsoEnabled) - buf.EncodeUint32(uint32(m.GsoSize)) + buf.EncodeUint32(m.GsoSize) return buf.Bytes(), nil } func (m *PgCreateInterface) Unmarshal(b []byte) error { @@ -170,29 +161,26 @@ func (*PgCreateInterfaceReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *PgCreateInterfaceReply) Size() int { +func (m *PgCreateInterfaceReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval size += 4 // m.SwIfIndex return size } func (m *PgCreateInterfaceReply) 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) buf.EncodeUint32(uint32(m.SwIfIndex)) return buf.Bytes(), nil } func (m *PgCreateInterfaceReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) return nil } @@ -210,22 +198,19 @@ func (*PgEnableDisable) GetMessageType() api.MessageType { return api.RequestMessage } -func (m *PgEnableDisable) Size() int { +func (m *PgEnableDisable) Size() (size int) { if m == nil { return 0 } - var size int size += 1 // m.IsEnabled size += 4 + len(m.StreamName) // m.StreamName return size } func (m *PgEnableDisable) 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.IsEnabled) buf.EncodeString(m.StreamName, 0) return buf.Bytes(), nil @@ -249,27 +234,100 @@ func (*PgEnableDisableReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func (m *PgEnableDisableReply) Size() int { +func (m *PgEnableDisableReply) Size() (size int) { if m == nil { return 0 } - var size int size += 4 // m.Retval return size } func (m *PgEnableDisableReply) 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 *PgEnableDisableReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) - m.Retval = int32(buf.DecodeUint32()) + m.Retval = buf.DecodeInt32() + return nil +} + +// PgInterfaceEnableDisableCoalesce defines message 'pg_interface_enable_disable_coalesce'. +// InProgress: the message form may change in the future versions +type PgInterfaceEnableDisableCoalesce struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + CoalesceEnabled bool `binapi:"bool,name=coalesce_enabled" json:"coalesce_enabled,omitempty"` +} + +func (m *PgInterfaceEnableDisableCoalesce) Reset() { *m = PgInterfaceEnableDisableCoalesce{} } +func (*PgInterfaceEnableDisableCoalesce) GetMessageName() string { + return "pg_interface_enable_disable_coalesce" +} +func (*PgInterfaceEnableDisableCoalesce) GetCrcString() string { return "a2ef99e7" } +func (*PgInterfaceEnableDisableCoalesce) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *PgInterfaceEnableDisableCoalesce) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SwIfIndex + size += 1 // m.CoalesceEnabled + return size +} +func (m *PgInterfaceEnableDisableCoalesce) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeBool(m.CoalesceEnabled) + return buf.Bytes(), nil +} +func (m *PgInterfaceEnableDisableCoalesce) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.CoalesceEnabled = buf.DecodeBool() + return nil +} + +// PgInterfaceEnableDisableCoalesceReply defines message 'pg_interface_enable_disable_coalesce_reply'. +// InProgress: the message form may change in the future versions +type PgInterfaceEnableDisableCoalesceReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *PgInterfaceEnableDisableCoalesceReply) Reset() { *m = PgInterfaceEnableDisableCoalesceReply{} } +func (*PgInterfaceEnableDisableCoalesceReply) GetMessageName() string { + return "pg_interface_enable_disable_coalesce_reply" +} +func (*PgInterfaceEnableDisableCoalesceReply) GetCrcString() string { return "e8d4e804" } +func (*PgInterfaceEnableDisableCoalesceReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *PgInterfaceEnableDisableCoalesceReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *PgInterfaceEnableDisableCoalesceReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *PgInterfaceEnableDisableCoalesceReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() return nil } @@ -281,6 +339,8 @@ func file_pg_binapi_init() { api.RegisterMessage((*PgCreateInterfaceReply)(nil), "pg_create_interface_reply_5383d31f") api.RegisterMessage((*PgEnableDisable)(nil), "pg_enable_disable_01f94f3a") api.RegisterMessage((*PgEnableDisableReply)(nil), "pg_enable_disable_reply_e8d4e804") + api.RegisterMessage((*PgInterfaceEnableDisableCoalesce)(nil), "pg_interface_enable_disable_coalesce_a2ef99e7") + api.RegisterMessage((*PgInterfaceEnableDisableCoalesceReply)(nil), "pg_interface_enable_disable_coalesce_reply_e8d4e804") } // Messages returns list of all messages in this module. @@ -292,5 +352,7 @@ func AllMessages() []api.Message { (*PgCreateInterfaceReply)(nil), (*PgEnableDisable)(nil), (*PgEnableDisableReply)(nil), + (*PgInterfaceEnableDisableCoalesce)(nil), + (*PgInterfaceEnableDisableCoalesceReply)(nil), } }