diff options
author | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2022-04-27 18:39:03 +0200 |
---|---|---|
committer | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2022-05-30 18:49:13 +0200 |
commit | 4102c72bce694babd94a481b1201d33895a6f9c5 (patch) | |
tree | 1b11238ca4706008c88712f26942dd74ab9c14a6 /binapi/acl | |
parent | a4112fac7b86fe09650d2bb57969fe46404edd7d (diff) |
Update generated binapi to v22.02 & makefile changes
This patch does some small updates to the Makefile.
* `make gen-binapi-from-code` is removed, and moves to
`gen-binapi-local`
* `make build` is patched to build cmd & examples
* `make binapi-generator` to build the api-generator
without other binaries, as they typically require its
output to build.
* `make gen-binapi-local` runs the locally built binapi-generator
to update the local bindings. It expects ${VPP_DIR} to be set and
to point to a local vpp repository checked out with the right version
* `make gen-binapi-internal` runs the locally built binapi-generator
to update the bindings in `internal/testbinapi/binapi2001`
Regarding VPP, notable changes when moving to v22.02 are :
- ControlPing moved from vpe to memclnt
- CliInband went from vpe to vlib
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Change-Id: Ie5cd2d5ded7ecaffd9abc3ca675df40be272b1fa
Diffstat (limited to 'binapi/acl')
-rw-r--r-- | binapi/acl/acl.ba.go | 150 | ||||
-rw-r--r-- | binapi/acl/acl_rpc.ba.go | 42 |
2 files changed, 177 insertions, 15 deletions
diff --git a/binapi/acl/acl.ba.go b/binapi/acl/acl.ba.go index ee448cb..60e03e7 100644 --- a/binapi/acl/acl.ba.go +++ b/binapi/acl/acl.ba.go @@ -1,13 +1,13 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: // binapi-generator: v0.5.0-dev -// VPP: 21.06-release +// VPP: 22.02-release // source: /usr/share/vpp/api/plugins/acl.api.json // Package acl contains generated bindings for API file acl.api. // // Contents: -// 38 messages +// 42 messages // package acl @@ -28,8 +28,8 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "acl" - APIVersion = "2.0.0" - VersionCrc = 0x4a805ebc + APIVersion = "2.0.1" + VersionCrc = 0x5133bba0 ) // ACLAddReplace defines message 'acl_add_replace'. @@ -1000,6 +1000,140 @@ func (m *ACLPluginGetVersionReply) Unmarshal(b []byte) error { return nil } +// ACLPluginUseHashLookupGet defines message 'acl_plugin_use_hash_lookup_get'. +// InProgress: the message form may change in the future versions +type ACLPluginUseHashLookupGet struct{} + +func (m *ACLPluginUseHashLookupGet) Reset() { *m = ACLPluginUseHashLookupGet{} } +func (*ACLPluginUseHashLookupGet) GetMessageName() string { return "acl_plugin_use_hash_lookup_get" } +func (*ACLPluginUseHashLookupGet) GetCrcString() string { return "51077d14" } +func (*ACLPluginUseHashLookupGet) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *ACLPluginUseHashLookupGet) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *ACLPluginUseHashLookupGet) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *ACLPluginUseHashLookupGet) Unmarshal(b []byte) error { + return nil +} + +// ACLPluginUseHashLookupGetReply defines message 'acl_plugin_use_hash_lookup_get_reply'. +// InProgress: the message form may change in the future versions +type ACLPluginUseHashLookupGetReply struct { + Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` +} + +func (m *ACLPluginUseHashLookupGetReply) Reset() { *m = ACLPluginUseHashLookupGetReply{} } +func (*ACLPluginUseHashLookupGetReply) GetMessageName() string { + return "acl_plugin_use_hash_lookup_get_reply" +} +func (*ACLPluginUseHashLookupGetReply) GetCrcString() string { return "5392ad31" } +func (*ACLPluginUseHashLookupGetReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *ACLPluginUseHashLookupGetReply) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Enable + return size +} +func (m *ACLPluginUseHashLookupGetReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.Enable) + return buf.Bytes(), nil +} +func (m *ACLPluginUseHashLookupGetReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Enable = buf.DecodeBool() + return nil +} + +// ACLPluginUseHashLookupSet defines message 'acl_plugin_use_hash_lookup_set'. +// InProgress: the message form may change in the future versions +type ACLPluginUseHashLookupSet struct { + Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` +} + +func (m *ACLPluginUseHashLookupSet) Reset() { *m = ACLPluginUseHashLookupSet{} } +func (*ACLPluginUseHashLookupSet) GetMessageName() string { return "acl_plugin_use_hash_lookup_set" } +func (*ACLPluginUseHashLookupSet) GetCrcString() string { return "b3e225d2" } +func (*ACLPluginUseHashLookupSet) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *ACLPluginUseHashLookupSet) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Enable + return size +} +func (m *ACLPluginUseHashLookupSet) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.Enable) + return buf.Bytes(), nil +} +func (m *ACLPluginUseHashLookupSet) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Enable = buf.DecodeBool() + return nil +} + +// ACLPluginUseHashLookupSetReply defines message 'acl_plugin_use_hash_lookup_set_reply'. +// InProgress: the message form may change in the future versions +type ACLPluginUseHashLookupSetReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *ACLPluginUseHashLookupSetReply) Reset() { *m = ACLPluginUseHashLookupSetReply{} } +func (*ACLPluginUseHashLookupSetReply) GetMessageName() string { + return "acl_plugin_use_hash_lookup_set_reply" +} +func (*ACLPluginUseHashLookupSetReply) GetCrcString() string { return "e8d4e804" } +func (*ACLPluginUseHashLookupSetReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *ACLPluginUseHashLookupSetReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *ACLPluginUseHashLookupSetReply) 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 *ACLPluginUseHashLookupSetReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + // ACLStatsIntfCountersEnable defines message 'acl_stats_intf_counters_enable'. type ACLStatsIntfCountersEnable struct { Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` @@ -1723,6 +1857,10 @@ func file_acl_binapi_init() { api.RegisterMessage((*ACLPluginGetConnTableMaxEntriesReply)(nil), "acl_plugin_get_conn_table_max_entries_reply_7a096d3d") api.RegisterMessage((*ACLPluginGetVersion)(nil), "acl_plugin_get_version_51077d14") api.RegisterMessage((*ACLPluginGetVersionReply)(nil), "acl_plugin_get_version_reply_9b32cf86") + api.RegisterMessage((*ACLPluginUseHashLookupGet)(nil), "acl_plugin_use_hash_lookup_get_51077d14") + api.RegisterMessage((*ACLPluginUseHashLookupGetReply)(nil), "acl_plugin_use_hash_lookup_get_reply_5392ad31") + api.RegisterMessage((*ACLPluginUseHashLookupSet)(nil), "acl_plugin_use_hash_lookup_set_b3e225d2") + api.RegisterMessage((*ACLPluginUseHashLookupSetReply)(nil), "acl_plugin_use_hash_lookup_set_reply_e8d4e804") api.RegisterMessage((*ACLStatsIntfCountersEnable)(nil), "acl_stats_intf_counters_enable_b3e225d2") api.RegisterMessage((*ACLStatsIntfCountersEnableReply)(nil), "acl_stats_intf_counters_enable_reply_e8d4e804") api.RegisterMessage((*MacipACLAdd)(nil), "macip_acl_add_ce6fbad0") @@ -1766,6 +1904,10 @@ func AllMessages() []api.Message { (*ACLPluginGetConnTableMaxEntriesReply)(nil), (*ACLPluginGetVersion)(nil), (*ACLPluginGetVersionReply)(nil), + (*ACLPluginUseHashLookupGet)(nil), + (*ACLPluginUseHashLookupGetReply)(nil), + (*ACLPluginUseHashLookupSet)(nil), + (*ACLPluginUseHashLookupSetReply)(nil), (*ACLStatsIntfCountersEnable)(nil), (*ACLStatsIntfCountersEnableReply)(nil), (*MacipACLAdd)(nil), diff --git a/binapi/acl/acl_rpc.ba.go b/binapi/acl/acl_rpc.ba.go index 62c33e1..e8c3425 100644 --- a/binapi/acl/acl_rpc.ba.go +++ b/binapi/acl/acl_rpc.ba.go @@ -8,7 +8,7 @@ import ( "io" api "git.fd.io/govpp.git/api" - vpe "git.fd.io/govpp.git/binapi/vpe" + memclnt "git.fd.io/govpp.git/binapi/memclnt" ) // RPCService defines RPC service acl. @@ -24,6 +24,8 @@ type RPCService interface { ACLPluginControlPing(ctx context.Context, in *ACLPluginControlPing) (*ACLPluginControlPingReply, error) ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPluginGetConnTableMaxEntries) (*ACLPluginGetConnTableMaxEntriesReply, error) ACLPluginGetVersion(ctx context.Context, in *ACLPluginGetVersion) (*ACLPluginGetVersionReply, error) + ACLPluginUseHashLookupGet(ctx context.Context, in *ACLPluginUseHashLookupGet) (*ACLPluginUseHashLookupGetReply, error) + ACLPluginUseHashLookupSet(ctx context.Context, in *ACLPluginUseHashLookupSet) (*ACLPluginUseHashLookupSetReply, error) ACLStatsIntfCountersEnable(ctx context.Context, in *ACLStatsIntfCountersEnable) (*ACLStatsIntfCountersEnableReply, error) MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAddReply, error) MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace) (*MacipACLAddReplaceReply, error) @@ -69,7 +71,7 @@ func (c *serviceClient) ACLDump(ctx context.Context, in *ACLDump) (RPCService_AC if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -92,7 +94,7 @@ func (c *serviceClient_ACLDumpClient) Recv() (*ACLDetails, error) { switch m := msg.(type) { case *ACLDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -121,7 +123,7 @@ func (c *serviceClient) ACLInterfaceEtypeWhitelistDump(ctx context.Context, in * if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -144,7 +146,7 @@ func (c *serviceClient_ACLInterfaceEtypeWhitelistDumpClient) Recv() (*ACLInterfa switch m := msg.(type) { case *ACLInterfaceEtypeWhitelistDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -164,7 +166,7 @@ func (c *serviceClient) ACLInterfaceListDump(ctx context.Context, in *ACLInterfa if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -187,7 +189,7 @@ func (c *serviceClient_ACLInterfaceListDumpClient) Recv() (*ACLInterfaceListDeta switch m := msg.(type) { case *ACLInterfaceListDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -243,6 +245,24 @@ func (c *serviceClient) ACLPluginGetVersion(ctx context.Context, in *ACLPluginGe return out, nil } +func (c *serviceClient) ACLPluginUseHashLookupGet(ctx context.Context, in *ACLPluginUseHashLookupGet) (*ACLPluginUseHashLookupGetReply, error) { + out := new(ACLPluginUseHashLookupGetReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) ACLPluginUseHashLookupSet(ctx context.Context, in *ACLPluginUseHashLookupSet) (*ACLPluginUseHashLookupSetReply, error) { + out := new(ACLPluginUseHashLookupSetReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) ACLStatsIntfCountersEnable(ctx context.Context, in *ACLStatsIntfCountersEnable) (*ACLStatsIntfCountersEnableReply, error) { out := new(ACLStatsIntfCountersEnableReply) err := c.conn.Invoke(ctx, in, out) @@ -288,7 +308,7 @@ func (c *serviceClient) MacipACLDump(ctx context.Context, in *MacipACLDump) (RPC if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -311,7 +331,7 @@ func (c *serviceClient_MacipACLDumpClient) Recv() (*MacipACLDetails, error) { switch m := msg.(type) { case *MacipACLDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -349,7 +369,7 @@ func (c *serviceClient) MacipACLInterfaceListDump(ctx context.Context, in *Macip if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -372,7 +392,7 @@ func (c *serviceClient_MacipACLInterfaceListDumpClient) Recv() (*MacipACLInterfa switch m := msg.(type) { case *MacipACLInterfaceListDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err |