summaryrefslogtreecommitdiffstats
path: root/binapi/session
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2022-04-27 18:39:03 +0200
committerNathan Skrzypczak <nathan.skrzypczak@gmail.com>2022-05-30 18:49:13 +0200
commit4102c72bce694babd94a481b1201d33895a6f9c5 (patch)
tree1b11238ca4706008c88712f26942dd74ab9c14a6 /binapi/session
parenta4112fac7b86fe09650d2bb57969fe46404edd7d (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/session')
-rw-r--r--binapi/session/session.ba.go276
-rw-r--r--binapi/session/session_rpc.ba.go36
2 files changed, 306 insertions, 6 deletions
diff --git a/binapi/session/session.ba.go b/binapi/session/session.ba.go
index ab2328e..e01d2a4 100644
--- a/binapi/session/session.ba.go
+++ b/binapi/session/session.ba.go
@@ -1,14 +1,14 @@
// 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/core/session.api.json
// Package session contains generated bindings for API file session.api.
//
// Contents:
// 2 enums
-// 22 messages
+// 28 messages
//
package session
@@ -30,7 +30,7 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "session"
APIVersion = "4.0.0"
- VersionCrc = 0x32fe1c77
+ VersionCrc = 0x44a59e26
)
// SessionRuleScope defines enum 'session_rule_scope'.
@@ -360,6 +360,7 @@ func (m *AppDelCertKeyPairReply) Unmarshal(b []byte) error {
}
// AppNamespaceAddDel defines message 'app_namespace_add_del'.
+// Deprecated: the message will be removed in the future versions
type AppNamespaceAddDel struct {
Secret uint64 `binapi:"u64,name=secret" json:"secret,omitempty"`
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
@@ -409,6 +410,7 @@ func (m *AppNamespaceAddDel) Unmarshal(b []byte) error {
}
// AppNamespaceAddDelReply defines message 'app_namespace_add_del_reply'.
+// Deprecated: the message will be removed in the future versions
type AppNamespaceAddDelReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
@@ -445,6 +447,194 @@ func (m *AppNamespaceAddDelReply) Unmarshal(b []byte) error {
return nil
}
+// AppNamespaceAddDelV2 defines message 'app_namespace_add_del_v2'.
+type AppNamespaceAddDelV2 struct {
+ Secret uint64 `binapi:"u64,name=secret" json:"secret,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
+ IP4FibID uint32 `binapi:"u32,name=ip4_fib_id" json:"ip4_fib_id,omitempty"`
+ IP6FibID uint32 `binapi:"u32,name=ip6_fib_id" json:"ip6_fib_id,omitempty"`
+ NamespaceID string `binapi:"string[64],name=namespace_id" json:"namespace_id,omitempty"`
+ Netns string `binapi:"string[64],name=netns" json:"netns,omitempty"`
+}
+
+func (m *AppNamespaceAddDelV2) Reset() { *m = AppNamespaceAddDelV2{} }
+func (*AppNamespaceAddDelV2) GetMessageName() string { return "app_namespace_add_del_v2" }
+func (*AppNamespaceAddDelV2) GetCrcString() string { return "ee0755cf" }
+func (*AppNamespaceAddDelV2) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *AppNamespaceAddDelV2) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 8 // m.Secret
+ size += 4 // m.SwIfIndex
+ size += 4 // m.IP4FibID
+ size += 4 // m.IP6FibID
+ size += 64 // m.NamespaceID
+ size += 64 // m.Netns
+ return size
+}
+func (m *AppNamespaceAddDelV2) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint64(m.Secret)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint32(m.IP4FibID)
+ buf.EncodeUint32(m.IP6FibID)
+ buf.EncodeString(m.NamespaceID, 64)
+ buf.EncodeString(m.Netns, 64)
+ return buf.Bytes(), nil
+}
+func (m *AppNamespaceAddDelV2) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Secret = buf.DecodeUint64()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.IP4FibID = buf.DecodeUint32()
+ m.IP6FibID = buf.DecodeUint32()
+ m.NamespaceID = buf.DecodeString(64)
+ m.Netns = buf.DecodeString(64)
+ return nil
+}
+
+// AppNamespaceAddDelV2Reply defines message 'app_namespace_add_del_v2_reply'.
+type AppNamespaceAddDelV2Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
+}
+
+func (m *AppNamespaceAddDelV2Reply) Reset() { *m = AppNamespaceAddDelV2Reply{} }
+func (*AppNamespaceAddDelV2Reply) GetMessageName() string { return "app_namespace_add_del_v2_reply" }
+func (*AppNamespaceAddDelV2Reply) GetCrcString() string { return "85137120" }
+func (*AppNamespaceAddDelV2Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *AppNamespaceAddDelV2Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.AppnsIndex
+ return size
+}
+func (m *AppNamespaceAddDelV2Reply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.AppnsIndex)
+ return buf.Bytes(), nil
+}
+func (m *AppNamespaceAddDelV2Reply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.AppnsIndex = buf.DecodeUint32()
+ return nil
+}
+
+// AppNamespaceAddDelV3 defines message 'app_namespace_add_del_v3'.
+type AppNamespaceAddDelV3 struct {
+ Secret uint64 `binapi:"u64,name=secret" json:"secret,omitempty"`
+ IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
+ IP4FibID uint32 `binapi:"u32,name=ip4_fib_id" json:"ip4_fib_id,omitempty"`
+ IP6FibID uint32 `binapi:"u32,name=ip6_fib_id" json:"ip6_fib_id,omitempty"`
+ NamespaceID string `binapi:"string[64],name=namespace_id" json:"namespace_id,omitempty"`
+ Netns string `binapi:"string[64],name=netns" json:"netns,omitempty"`
+ SockName string `binapi:"string[],name=sock_name" json:"sock_name,omitempty"`
+}
+
+func (m *AppNamespaceAddDelV3) Reset() { *m = AppNamespaceAddDelV3{} }
+func (*AppNamespaceAddDelV3) GetMessageName() string { return "app_namespace_add_del_v3" }
+func (*AppNamespaceAddDelV3) GetCrcString() string { return "8a7e40a1" }
+func (*AppNamespaceAddDelV3) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *AppNamespaceAddDelV3) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 8 // m.Secret
+ size += 1 // m.IsAdd
+ size += 4 // m.SwIfIndex
+ size += 4 // m.IP4FibID
+ size += 4 // m.IP6FibID
+ size += 64 // m.NamespaceID
+ size += 64 // m.Netns
+ size += 4 + len(m.SockName) // m.SockName
+ return size
+}
+func (m *AppNamespaceAddDelV3) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint64(m.Secret)
+ buf.EncodeBool(m.IsAdd)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint32(m.IP4FibID)
+ buf.EncodeUint32(m.IP6FibID)
+ buf.EncodeString(m.NamespaceID, 64)
+ buf.EncodeString(m.Netns, 64)
+ buf.EncodeString(m.SockName, 0)
+ return buf.Bytes(), nil
+}
+func (m *AppNamespaceAddDelV3) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Secret = buf.DecodeUint64()
+ m.IsAdd = buf.DecodeBool()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.IP4FibID = buf.DecodeUint32()
+ m.IP6FibID = buf.DecodeUint32()
+ m.NamespaceID = buf.DecodeString(64)
+ m.Netns = buf.DecodeString(64)
+ m.SockName = buf.DecodeString(0)
+ return nil
+}
+
+// AppNamespaceAddDelV3Reply defines message 'app_namespace_add_del_v3_reply'.
+type AppNamespaceAddDelV3Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
+}
+
+func (m *AppNamespaceAddDelV3Reply) Reset() { *m = AppNamespaceAddDelV3Reply{} }
+func (*AppNamespaceAddDelV3Reply) GetMessageName() string { return "app_namespace_add_del_v3_reply" }
+func (*AppNamespaceAddDelV3Reply) GetCrcString() string { return "85137120" }
+func (*AppNamespaceAddDelV3Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *AppNamespaceAddDelV3Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.AppnsIndex
+ return size
+}
+func (m *AppNamespaceAddDelV3Reply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.AppnsIndex)
+ return buf.Bytes(), nil
+}
+func (m *AppNamespaceAddDelV3Reply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.AppnsIndex = buf.DecodeUint32()
+ return nil
+}
+
// AppWorkerAddDel defines message 'app_worker_add_del'.
type AppWorkerAddDel struct {
AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
@@ -1045,6 +1235,74 @@ func (m *SessionRulesDump) Unmarshal(b []byte) error {
return nil
}
+// SessionSapiEnableDisable defines message 'session_sapi_enable_disable'.
+type SessionSapiEnableDisable struct {
+ IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"`
+}
+
+func (m *SessionSapiEnableDisable) Reset() { *m = SessionSapiEnableDisable{} }
+func (*SessionSapiEnableDisable) GetMessageName() string { return "session_sapi_enable_disable" }
+func (*SessionSapiEnableDisable) GetCrcString() string { return "c264d7bf" }
+func (*SessionSapiEnableDisable) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *SessionSapiEnableDisable) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.IsEnable
+ return size
+}
+func (m *SessionSapiEnableDisable) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeBool(m.IsEnable)
+ return buf.Bytes(), nil
+}
+func (m *SessionSapiEnableDisable) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.IsEnable = buf.DecodeBool()
+ return nil
+}
+
+// SessionSapiEnableDisableReply defines message 'session_sapi_enable_disable_reply'.
+type SessionSapiEnableDisableReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *SessionSapiEnableDisableReply) Reset() { *m = SessionSapiEnableDisableReply{} }
+func (*SessionSapiEnableDisableReply) GetMessageName() string {
+ return "session_sapi_enable_disable_reply"
+}
+func (*SessionSapiEnableDisableReply) GetCrcString() string { return "e8d4e804" }
+func (*SessionSapiEnableDisableReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *SessionSapiEnableDisableReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *SessionSapiEnableDisableReply) 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 *SessionSapiEnableDisableReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
func init() { file_session_binapi_init() }
func file_session_binapi_init() {
api.RegisterMessage((*AppAddCertKeyPair)(nil), "app_add_cert_key_pair_02eb8016")
@@ -1055,6 +1313,10 @@ func file_session_binapi_init() {
api.RegisterMessage((*AppDelCertKeyPairReply)(nil), "app_del_cert_key_pair_reply_e8d4e804")
api.RegisterMessage((*AppNamespaceAddDel)(nil), "app_namespace_add_del_6306aecb")
api.RegisterMessage((*AppNamespaceAddDelReply)(nil), "app_namespace_add_del_reply_85137120")
+ api.RegisterMessage((*AppNamespaceAddDelV2)(nil), "app_namespace_add_del_v2_ee0755cf")
+ api.RegisterMessage((*AppNamespaceAddDelV2Reply)(nil), "app_namespace_add_del_v2_reply_85137120")
+ api.RegisterMessage((*AppNamespaceAddDelV3)(nil), "app_namespace_add_del_v3_8a7e40a1")
+ api.RegisterMessage((*AppNamespaceAddDelV3Reply)(nil), "app_namespace_add_del_v3_reply_85137120")
api.RegisterMessage((*AppWorkerAddDel)(nil), "app_worker_add_del_753253dc")
api.RegisterMessage((*AppWorkerAddDelReply)(nil), "app_worker_add_del_reply_5735ffe7")
api.RegisterMessage((*ApplicationDetach)(nil), "application_detach_51077d14")
@@ -1069,6 +1331,8 @@ func file_session_binapi_init() {
api.RegisterMessage((*SessionRuleAddDelReply)(nil), "session_rule_add_del_reply_e8d4e804")
api.RegisterMessage((*SessionRulesDetails)(nil), "session_rules_details_28d71830")
api.RegisterMessage((*SessionRulesDump)(nil), "session_rules_dump_51077d14")
+ api.RegisterMessage((*SessionSapiEnableDisable)(nil), "session_sapi_enable_disable_c264d7bf")
+ api.RegisterMessage((*SessionSapiEnableDisableReply)(nil), "session_sapi_enable_disable_reply_e8d4e804")
}
// Messages returns list of all messages in this module.
@@ -1082,6 +1346,10 @@ func AllMessages() []api.Message {
(*AppDelCertKeyPairReply)(nil),
(*AppNamespaceAddDel)(nil),
(*AppNamespaceAddDelReply)(nil),
+ (*AppNamespaceAddDelV2)(nil),
+ (*AppNamespaceAddDelV2Reply)(nil),
+ (*AppNamespaceAddDelV3)(nil),
+ (*AppNamespaceAddDelV3Reply)(nil),
(*AppWorkerAddDel)(nil),
(*AppWorkerAddDelReply)(nil),
(*ApplicationDetach)(nil),
@@ -1096,5 +1364,7 @@ func AllMessages() []api.Message {
(*SessionRuleAddDelReply)(nil),
(*SessionRulesDetails)(nil),
(*SessionRulesDump)(nil),
+ (*SessionSapiEnableDisable)(nil),
+ (*SessionSapiEnableDisableReply)(nil),
}
}
diff --git a/binapi/session/session_rpc.ba.go b/binapi/session/session_rpc.ba.go
index cba5890..adad529 100644
--- a/binapi/session/session_rpc.ba.go
+++ b/binapi/session/session_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 session.
@@ -17,6 +17,8 @@ type RPCService interface {
AppAttach(ctx context.Context, in *AppAttach) (*AppAttachReply, error)
AppDelCertKeyPair(ctx context.Context, in *AppDelCertKeyPair) (*AppDelCertKeyPairReply, error)
AppNamespaceAddDel(ctx context.Context, in *AppNamespaceAddDel) (*AppNamespaceAddDelReply, error)
+ AppNamespaceAddDelV2(ctx context.Context, in *AppNamespaceAddDelV2) (*AppNamespaceAddDelV2Reply, error)
+ AppNamespaceAddDelV3(ctx context.Context, in *AppNamespaceAddDelV3) (*AppNamespaceAddDelV3Reply, error)
AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error)
ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error)
ApplicationTLSCertAdd(ctx context.Context, in *ApplicationTLSCertAdd) (*ApplicationTLSCertAddReply, error)
@@ -24,6 +26,7 @@ type RPCService interface {
SessionEnableDisable(ctx context.Context, in *SessionEnableDisable) (*SessionEnableDisableReply, error)
SessionRuleAddDel(ctx context.Context, in *SessionRuleAddDel) (*SessionRuleAddDelReply, error)
SessionRulesDump(ctx context.Context, in *SessionRulesDump) (RPCService_SessionRulesDumpClient, error)
+ SessionSapiEnableDisable(ctx context.Context, in *SessionSapiEnableDisable) (*SessionSapiEnableDisableReply, error)
}
type serviceClient struct {
@@ -70,6 +73,24 @@ func (c *serviceClient) AppNamespaceAddDel(ctx context.Context, in *AppNamespace
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) AppNamespaceAddDelV2(ctx context.Context, in *AppNamespaceAddDelV2) (*AppNamespaceAddDelV2Reply, error) {
+ out := new(AppNamespaceAddDelV2Reply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
+func (c *serviceClient) AppNamespaceAddDelV3(ctx context.Context, in *AppNamespaceAddDelV3) (*AppNamespaceAddDelV3Reply, error) {
+ out := new(AppNamespaceAddDelV3Reply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error) {
out := new(AppWorkerAddDelReply)
err := c.conn.Invoke(ctx, in, out)
@@ -133,7 +154,7 @@ func (c *serviceClient) SessionRulesDump(ctx context.Context, in *SessionRulesDu
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
@@ -156,7 +177,7 @@ func (c *serviceClient_SessionRulesDumpClient) Recv() (*SessionRulesDetails, err
switch m := msg.(type) {
case *SessionRulesDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -166,3 +187,12 @@ func (c *serviceClient_SessionRulesDumpClient) Recv() (*SessionRulesDetails, err
return nil, fmt.Errorf("unexpected message: %T %v", m, m)
}
}
+
+func (c *serviceClient) SessionSapiEnableDisable(ctx context.Context, in *SessionSapiEnableDisable) (*SessionSapiEnableDisableReply, error) {
+ out := new(SessionSapiEnableDisableReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}