// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.5.0-dev
+// 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
import (
+ "strconv"
+
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"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
const (
APIFile = "session"
- APIVersion = "3.2.0"
- VersionCrc = 0x9aa0ebc0
+ APIVersion = "4.0.0"
+ VersionCrc = 0x44a59e26
)
// SessionRuleScope defines enum 'session_rule_scope'.
return api.RequestMessage
}
-func (m *AppAddCertKeyPair) Size() int {
+func (m *AppAddCertKeyPair) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 2 // m.CertLen
size += 2 // m.CertkeyLen
size += 1 * len(m.Certkey) // m.Certkey
return size
}
func (m *AppAddCertKeyPair) 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.CertLen))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint16(m.CertLen)
buf.EncodeUint16(uint16(len(m.Certkey)))
- buf.EncodeBytes(m.Certkey[:], 0)
+ buf.EncodeBytes(m.Certkey, 0)
return buf.Bytes(), nil
}
func (m *AppAddCertKeyPair) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.CertLen = buf.DecodeUint16()
m.CertkeyLen = buf.DecodeUint16()
- copy(m.Certkey[:], buf.DecodeBytes(0))
+ m.Certkey = make([]byte, m.CertkeyLen)
+ copy(m.Certkey, buf.DecodeBytes(len(m.Certkey)))
return nil
}
return api.ReplyMessage
}
-func (m *AppAddCertKeyPairReply) Size() int {
+func (m *AppAddCertKeyPairReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 4 // m.Index
return size
}
func (m *AppAddCertKeyPairReply) 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.EncodeUint32(uint32(m.Index))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.Index)
return buf.Bytes(), nil
}
func (m *AppAddCertKeyPairReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
m.Index = buf.DecodeUint32()
return nil
}
return api.RequestMessage
}
-func (m *AppAttach) Size() int {
+func (m *AppAttach) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 8 * 18 // m.Options
size += 4 + len(m.NamespaceID) // m.NamespaceID
return size
}
func (m *AppAttach) 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)
for i := 0; i < 18; i++ {
var x uint64
if i < len(m.Options) {
x = uint64(m.Options[i])
}
- buf.EncodeUint64(uint64(x))
+ buf.EncodeUint64(x)
}
buf.EncodeString(m.NamespaceID, 0)
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *AppAttachReply) Size() int {
+func (m *AppAttachReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 8 // m.AppMq
size += 8 // m.VppCtrlMq
return size
}
func (m *AppAttachReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
- }
- buf.EncodeUint32(uint32(m.Retval))
- buf.EncodeUint64(uint64(m.AppMq))
- buf.EncodeUint64(uint64(m.VppCtrlMq))
- buf.EncodeUint8(uint8(m.VppCtrlMqThread))
- buf.EncodeUint32(uint32(m.AppIndex))
- buf.EncodeUint8(uint8(m.NFds))
- buf.EncodeUint8(uint8(m.FdFlags))
- buf.EncodeUint32(uint32(m.SegmentSize))
- buf.EncodeUint64(uint64(m.SegmentHandle))
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint64(m.AppMq)
+ buf.EncodeUint64(m.VppCtrlMq)
+ buf.EncodeUint8(m.VppCtrlMqThread)
+ buf.EncodeUint32(m.AppIndex)
+ buf.EncodeUint8(m.NFds)
+ buf.EncodeUint8(m.FdFlags)
+ buf.EncodeUint32(m.SegmentSize)
+ buf.EncodeUint64(m.SegmentHandle)
buf.EncodeString(m.SegmentName, 0)
return buf.Bytes(), nil
}
func (m *AppAttachReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
m.AppMq = buf.DecodeUint64()
m.VppCtrlMq = buf.DecodeUint64()
m.VppCtrlMqThread = buf.DecodeUint8()
return api.RequestMessage
}
-func (m *AppDelCertKeyPair) Size() int {
+func (m *AppDelCertKeyPair) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Index
return size
}
func (m *AppDelCertKeyPair) 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.Index))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Index)
return buf.Bytes(), nil
}
func (m *AppDelCertKeyPair) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *AppDelCertKeyPairReply) Size() int {
+func (m *AppDelCertKeyPairReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *AppDelCertKeyPairReply) 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 *AppDelCertKeyPairReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
// 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=%!s(float64=4.294967295e+09)" json:"sw_if_index,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[],name=namespace_id" json:"namespace_id,omitempty"`
return api.RequestMessage
}
-func (m *AppNamespaceAddDel) Size() int {
+func (m *AppNamespaceAddDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 8 // m.Secret
size += 4 // m.SwIfIndex
size += 4 // m.IP4FibID
return size
}
func (m *AppNamespaceAddDel) 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.EncodeUint64(uint64(m.Secret))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint64(m.Secret)
buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.IP4FibID))
- buf.EncodeUint32(uint32(m.IP6FibID))
+ buf.EncodeUint32(m.IP4FibID)
+ buf.EncodeUint32(m.IP6FibID)
buf.EncodeString(m.NamespaceID, 0)
return buf.Bytes(), nil
}
}
// 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"`
return api.ReplyMessage
}
-func (m *AppNamespaceAddDelReply) Size() int {
+func (m *AppNamespaceAddDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 4 // m.AppnsIndex
return size
}
func (m *AppNamespaceAddDelReply) 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.EncodeUint32(uint32(m.AppnsIndex))
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.AppnsIndex)
return buf.Bytes(), nil
}
func (m *AppNamespaceAddDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
+ m.AppnsIndex = buf.DecodeUint32()
+ 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
}
return api.RequestMessage
}
-func (m *AppWorkerAddDel) Size() int {
+func (m *AppWorkerAddDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.AppIndex
size += 4 // m.WrkIndex
size += 1 // m.IsAdd
return size
}
func (m *AppWorkerAddDel) 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.AppIndex))
- buf.EncodeUint32(uint32(m.WrkIndex))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.AppIndex)
+ buf.EncodeUint32(m.WrkIndex)
buf.EncodeBool(m.IsAdd)
return buf.Bytes(), nil
}
return api.ReplyMessage
}
-func (m *AppWorkerAddDelReply) Size() int {
+func (m *AppWorkerAddDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
size += 4 // m.WrkIndex
size += 8 // m.AppEventQueueAddress
return size
}
func (m *AppWorkerAddDelReply) Marshal(b []byte) ([]byte, error) {
- var buf *codec.Buffer
if b == nil {
- buf = codec.NewBuffer(make([]byte, m.Size()))
- } else {
- buf = codec.NewBuffer(b)
- }
- buf.EncodeUint32(uint32(m.Retval))
- buf.EncodeUint32(uint32(m.WrkIndex))
- buf.EncodeUint64(uint64(m.AppEventQueueAddress))
- buf.EncodeUint8(uint8(m.NFds))
- buf.EncodeUint8(uint8(m.FdFlags))
- buf.EncodeUint64(uint64(m.SegmentHandle))
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.WrkIndex)
+ buf.EncodeUint64(m.AppEventQueueAddress)
+ buf.EncodeUint8(m.NFds)
+ buf.EncodeUint8(m.FdFlags)
+ buf.EncodeUint64(m.SegmentHandle)
buf.EncodeBool(m.IsAdd)
buf.EncodeString(m.SegmentName, 0)
return buf.Bytes(), nil
}
func (m *AppWorkerAddDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
m.WrkIndex = buf.DecodeUint32()
m.AppEventQueueAddress = buf.DecodeUint64()
m.NFds = buf.DecodeUint8()
return api.RequestMessage
}
-func (m *ApplicationDetach) Size() int {
+func (m *ApplicationDetach) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *ApplicationDetach) 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)
return buf.Bytes(), nil
}
func (m *ApplicationDetach) Unmarshal(b []byte) error {
return api.ReplyMessage
}
-func (m *ApplicationDetachReply) Size() int {
+func (m *ApplicationDetachReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *ApplicationDetachReply) 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 *ApplicationDetachReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
// ApplicationTLSCertAdd defines message 'application_tls_cert_add'.
+// Deprecated: to be removed post 21.06
type ApplicationTLSCertAdd struct {
AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
CertLen uint16 `binapi:"u16,name=cert_len" json:"-"`
return api.RequestMessage
}
-func (m *ApplicationTLSCertAdd) Size() int {
+func (m *ApplicationTLSCertAdd) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.AppIndex
size += 2 // m.CertLen
size += 1 * len(m.Cert) // m.Cert
return size
}
func (m *ApplicationTLSCertAdd) 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.AppIndex))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.AppIndex)
buf.EncodeUint16(uint16(len(m.Cert)))
- buf.EncodeBytes(m.Cert[:], 0)
+ buf.EncodeBytes(m.Cert, 0)
return buf.Bytes(), nil
}
func (m *ApplicationTLSCertAdd) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.AppIndex = buf.DecodeUint32()
m.CertLen = buf.DecodeUint16()
- copy(m.Cert[:], buf.DecodeBytes(0))
+ m.Cert = make([]byte, m.CertLen)
+ copy(m.Cert, buf.DecodeBytes(len(m.Cert)))
return nil
}
// ApplicationTLSCertAddReply defines message 'application_tls_cert_add_reply'.
+// Deprecated: to be removed post 21.06
type ApplicationTLSCertAddReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
return api.ReplyMessage
}
-func (m *ApplicationTLSCertAddReply) Size() int {
+func (m *ApplicationTLSCertAddReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *ApplicationTLSCertAddReply) 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 *ApplicationTLSCertAddReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
// ApplicationTLSKeyAdd defines message 'application_tls_key_add'.
+// Deprecated: to be removed post 21.06
type ApplicationTLSKeyAdd struct {
AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
KeyLen uint16 `binapi:"u16,name=key_len" json:"-"`
return api.RequestMessage
}
-func (m *ApplicationTLSKeyAdd) Size() int {
+func (m *ApplicationTLSKeyAdd) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.AppIndex
size += 2 // m.KeyLen
size += 1 * len(m.Key) // m.Key
return size
}
func (m *ApplicationTLSKeyAdd) 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.AppIndex))
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.AppIndex)
buf.EncodeUint16(uint16(len(m.Key)))
- buf.EncodeBytes(m.Key[:], 0)
+ buf.EncodeBytes(m.Key, 0)
return buf.Bytes(), nil
}
func (m *ApplicationTLSKeyAdd) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.AppIndex = buf.DecodeUint32()
m.KeyLen = buf.DecodeUint16()
- copy(m.Key[:], buf.DecodeBytes(0))
+ m.Key = make([]byte, m.KeyLen)
+ copy(m.Key, buf.DecodeBytes(len(m.Key)))
return nil
}
// ApplicationTLSKeyAddReply defines message 'application_tls_key_add_reply'.
+// Deprecated: to be removed post 21.06
type ApplicationTLSKeyAddReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
return api.ReplyMessage
}
-func (m *ApplicationTLSKeyAddReply) Size() int {
+func (m *ApplicationTLSKeyAddReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *ApplicationTLSKeyAddReply) 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 *ApplicationTLSKeyAddReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
return api.RequestMessage
}
-func (m *SessionEnableDisable) Size() int {
+func (m *SessionEnableDisable) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.IsEnable
return size
}
func (m *SessionEnableDisable) 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.IsEnable)
return buf.Bytes(), nil
}
return api.ReplyMessage
}
-func (m *SessionEnableDisableReply) Size() int {
+func (m *SessionEnableDisableReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *SessionEnableDisableReply) 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 *SessionEnableDisableReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *SessionRuleAddDel) Reset() { *m = SessionRuleAddDel{} }
func (*SessionRuleAddDel) GetMessageName() string { return "session_rule_add_del" }
-func (*SessionRuleAddDel) GetCrcString() string { return "e31f9443" }
+func (*SessionRuleAddDel) GetCrcString() string { return "e4895422" }
func (*SessionRuleAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
-func (m *SessionRuleAddDel) Size() int {
+func (m *SessionRuleAddDel) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.TransportProto
size += 1 // m.Lcl.Address.Af
size += 1 * 16 // m.Lcl.Address.Un
return size
}
func (m *SessionRuleAddDel) 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.EncodeUint8(uint8(m.TransportProto))
buf.EncodeUint8(uint8(m.Lcl.Address.Af))
- buf.EncodeBytes(m.Lcl.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Lcl.Len))
+ buf.EncodeBytes(m.Lcl.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Lcl.Len)
buf.EncodeUint8(uint8(m.Rmt.Address.Af))
- buf.EncodeBytes(m.Rmt.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Rmt.Len))
- buf.EncodeUint16(uint16(m.LclPort))
- buf.EncodeUint16(uint16(m.RmtPort))
- buf.EncodeUint32(uint32(m.ActionIndex))
+ buf.EncodeBytes(m.Rmt.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Rmt.Len)
+ buf.EncodeUint16(m.LclPort)
+ buf.EncodeUint16(m.RmtPort)
+ buf.EncodeUint32(m.ActionIndex)
buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.AppnsIndex))
+ buf.EncodeUint32(m.AppnsIndex)
buf.EncodeUint32(uint32(m.Scope))
buf.EncodeString(m.Tag, 64)
return buf.Bytes(), nil
return api.ReplyMessage
}
-func (m *SessionRuleAddDelReply) Size() int {
+func (m *SessionRuleAddDelReply) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 4 // m.Retval
return size
}
func (m *SessionRuleAddDelReply) 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 *SessionRuleAddDelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
- m.Retval = int32(buf.DecodeUint32())
+ m.Retval = buf.DecodeInt32()
return nil
}
func (m *SessionRulesDetails) Reset() { *m = SessionRulesDetails{} }
func (*SessionRulesDetails) GetMessageName() string { return "session_rules_details" }
-func (*SessionRulesDetails) GetCrcString() string { return "304b91f0" }
+func (*SessionRulesDetails) GetCrcString() string { return "28d71830" }
func (*SessionRulesDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
-func (m *SessionRulesDetails) Size() int {
+func (m *SessionRulesDetails) Size() (size int) {
if m == nil {
return 0
}
- var size int
size += 1 // m.TransportProto
size += 1 // m.Lcl.Address.Af
size += 1 * 16 // m.Lcl.Address.Un
return size
}
func (m *SessionRulesDetails) 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.EncodeUint8(uint8(m.TransportProto))
buf.EncodeUint8(uint8(m.Lcl.Address.Af))
- buf.EncodeBytes(m.Lcl.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Lcl.Len))
+ buf.EncodeBytes(m.Lcl.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Lcl.Len)
buf.EncodeUint8(uint8(m.Rmt.Address.Af))
- buf.EncodeBytes(m.Rmt.Address.Un.XXX_UnionData[:], 0)
- buf.EncodeUint8(uint8(m.Rmt.Len))
- buf.EncodeUint16(uint16(m.LclPort))
- buf.EncodeUint16(uint16(m.RmtPort))
- buf.EncodeUint32(uint32(m.ActionIndex))
- buf.EncodeUint32(uint32(m.AppnsIndex))
+ buf.EncodeBytes(m.Rmt.Address.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Rmt.Len)
+ buf.EncodeUint16(m.LclPort)
+ buf.EncodeUint16(m.RmtPort)
+ buf.EncodeUint32(m.ActionIndex)
+ buf.EncodeUint32(m.AppnsIndex)
buf.EncodeUint32(uint32(m.Scope))
buf.EncodeString(m.Tag, 64)
return buf.Bytes(), nil
return api.RequestMessage
}
-func (m *SessionRulesDump) Size() int {
+func (m *SessionRulesDump) Size() (size int) {
if m == nil {
return 0
}
- var size int
return size
}
func (m *SessionRulesDump) 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)
return buf.Bytes(), nil
}
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")
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")
api.RegisterMessage((*ApplicationTLSKeyAddReply)(nil), "application_tls_key_add_reply_e8d4e804")
api.RegisterMessage((*SessionEnableDisable)(nil), "session_enable_disable_c264d7bf")
api.RegisterMessage((*SessionEnableDisableReply)(nil), "session_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*SessionRuleAddDel)(nil), "session_rule_add_del_e31f9443")
+ api.RegisterMessage((*SessionRuleAddDel)(nil), "session_rule_add_del_e4895422")
api.RegisterMessage((*SessionRuleAddDelReply)(nil), "session_rule_add_del_reply_e8d4e804")
- api.RegisterMessage((*SessionRulesDetails)(nil), "session_rules_details_304b91f0")
+ 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.
(*AppDelCertKeyPairReply)(nil),
(*AppNamespaceAddDel)(nil),
(*AppNamespaceAddDelReply)(nil),
+ (*AppNamespaceAddDelV2)(nil),
+ (*AppNamespaceAddDelV2Reply)(nil),
+ (*AppNamespaceAddDelV3)(nil),
+ (*AppNamespaceAddDelV3Reply)(nil),
(*AppWorkerAddDel)(nil),
(*AppWorkerAddDelReply)(nil),
(*ApplicationDetach)(nil),
(*SessionRuleAddDelReply)(nil),
(*SessionRulesDetails)(nil),
(*SessionRulesDump)(nil),
+ (*SessionSapiEnableDisable)(nil),
+ (*SessionSapiEnableDisableReply)(nil),
}
}