1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.6.0-dev
5 // source: /usr/share/vpp/api/core/session.api.json
7 // Package session contains generated bindings for API file session.api.
18 api "go.fd.io/govpp/api"
19 interface_types "go.fd.io/govpp/binapi/interface_types"
20 ip_types "go.fd.io/govpp/binapi/ip_types"
21 codec "go.fd.io/govpp/codec"
24 // This is a compile-time assertion to ensure that this generated file
25 // is compatible with the GoVPP api package it is being compiled against.
26 // A compilation error at this line likely means your copy of the
27 // GoVPP api package needs to be updated.
28 const _ = api.GoVppAPIPackageIsVersion2
33 VersionCrc = 0x44a59e26
36 // SessionRuleScope defines enum 'session_rule_scope'.
37 type SessionRuleScope uint32
40 SESSION_RULE_SCOPE_API_GLOBAL SessionRuleScope = 0
41 SESSION_RULE_SCOPE_API_LOCAL SessionRuleScope = 1
42 SESSION_RULE_SCOPE_API_BOTH SessionRuleScope = 2
46 SessionRuleScope_name = map[uint32]string{
47 0: "SESSION_RULE_SCOPE_API_GLOBAL",
48 1: "SESSION_RULE_SCOPE_API_LOCAL",
49 2: "SESSION_RULE_SCOPE_API_BOTH",
51 SessionRuleScope_value = map[string]uint32{
52 "SESSION_RULE_SCOPE_API_GLOBAL": 0,
53 "SESSION_RULE_SCOPE_API_LOCAL": 1,
54 "SESSION_RULE_SCOPE_API_BOTH": 2,
58 func (x SessionRuleScope) String() string {
59 s, ok := SessionRuleScope_name[uint32(x)]
63 return "SessionRuleScope(" + strconv.Itoa(int(x)) + ")"
66 // TransportProto defines enum 'transport_proto'.
67 type TransportProto uint8
70 TRANSPORT_PROTO_API_TCP TransportProto = 1
71 TRANSPORT_PROTO_API_UDP TransportProto = 2
72 TRANSPORT_PROTO_API_NONE TransportProto = 3
73 TRANSPORT_PROTO_API_TLS TransportProto = 4
74 TRANSPORT_PROTO_API_QUIC TransportProto = 5
78 TransportProto_name = map[uint8]string{
79 1: "TRANSPORT_PROTO_API_TCP",
80 2: "TRANSPORT_PROTO_API_UDP",
81 3: "TRANSPORT_PROTO_API_NONE",
82 4: "TRANSPORT_PROTO_API_TLS",
83 5: "TRANSPORT_PROTO_API_QUIC",
85 TransportProto_value = map[string]uint8{
86 "TRANSPORT_PROTO_API_TCP": 1,
87 "TRANSPORT_PROTO_API_UDP": 2,
88 "TRANSPORT_PROTO_API_NONE": 3,
89 "TRANSPORT_PROTO_API_TLS": 4,
90 "TRANSPORT_PROTO_API_QUIC": 5,
94 func (x TransportProto) String() string {
95 s, ok := TransportProto_name[uint8(x)]
99 return "TransportProto(" + strconv.Itoa(int(x)) + ")"
102 // AppAddCertKeyPair defines message 'app_add_cert_key_pair'.
103 type AppAddCertKeyPair struct {
104 CertLen uint16 `binapi:"u16,name=cert_len" json:"cert_len,omitempty"`
105 CertkeyLen uint16 `binapi:"u16,name=certkey_len" json:"-"`
106 Certkey []byte `binapi:"u8[certkey_len],name=certkey" json:"certkey,omitempty"`
109 func (m *AppAddCertKeyPair) Reset() { *m = AppAddCertKeyPair{} }
110 func (*AppAddCertKeyPair) GetMessageName() string { return "app_add_cert_key_pair" }
111 func (*AppAddCertKeyPair) GetCrcString() string { return "02eb8016" }
112 func (*AppAddCertKeyPair) GetMessageType() api.MessageType {
113 return api.RequestMessage
116 func (m *AppAddCertKeyPair) Size() (size int) {
120 size += 2 // m.CertLen
121 size += 2 // m.CertkeyLen
122 size += 1 * len(m.Certkey) // m.Certkey
125 func (m *AppAddCertKeyPair) Marshal(b []byte) ([]byte, error) {
127 b = make([]byte, m.Size())
129 buf := codec.NewBuffer(b)
130 buf.EncodeUint16(m.CertLen)
131 buf.EncodeUint16(uint16(len(m.Certkey)))
132 buf.EncodeBytes(m.Certkey, 0)
133 return buf.Bytes(), nil
135 func (m *AppAddCertKeyPair) Unmarshal(b []byte) error {
136 buf := codec.NewBuffer(b)
137 m.CertLen = buf.DecodeUint16()
138 m.CertkeyLen = buf.DecodeUint16()
139 m.Certkey = make([]byte, m.CertkeyLen)
140 copy(m.Certkey, buf.DecodeBytes(len(m.Certkey)))
144 // AppAddCertKeyPairReply defines message 'app_add_cert_key_pair_reply'.
145 type AppAddCertKeyPairReply struct {
146 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
147 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
150 func (m *AppAddCertKeyPairReply) Reset() { *m = AppAddCertKeyPairReply{} }
151 func (*AppAddCertKeyPairReply) GetMessageName() string { return "app_add_cert_key_pair_reply" }
152 func (*AppAddCertKeyPairReply) GetCrcString() string { return "b42958d0" }
153 func (*AppAddCertKeyPairReply) GetMessageType() api.MessageType {
154 return api.ReplyMessage
157 func (m *AppAddCertKeyPairReply) Size() (size int) {
161 size += 4 // m.Retval
165 func (m *AppAddCertKeyPairReply) Marshal(b []byte) ([]byte, error) {
167 b = make([]byte, m.Size())
169 buf := codec.NewBuffer(b)
170 buf.EncodeInt32(m.Retval)
171 buf.EncodeUint32(m.Index)
172 return buf.Bytes(), nil
174 func (m *AppAddCertKeyPairReply) Unmarshal(b []byte) error {
175 buf := codec.NewBuffer(b)
176 m.Retval = buf.DecodeInt32()
177 m.Index = buf.DecodeUint32()
181 // AppAttach defines message 'app_attach'.
182 type AppAttach struct {
183 Options []uint64 `binapi:"u64[18],name=options" json:"options,omitempty"`
184 NamespaceID string `binapi:"string[],name=namespace_id" json:"namespace_id,omitempty"`
187 func (m *AppAttach) Reset() { *m = AppAttach{} }
188 func (*AppAttach) GetMessageName() string { return "app_attach" }
189 func (*AppAttach) GetCrcString() string { return "5f4a260d" }
190 func (*AppAttach) GetMessageType() api.MessageType {
191 return api.RequestMessage
194 func (m *AppAttach) Size() (size int) {
198 size += 8 * 18 // m.Options
199 size += 4 + len(m.NamespaceID) // m.NamespaceID
202 func (m *AppAttach) Marshal(b []byte) ([]byte, error) {
204 b = make([]byte, m.Size())
206 buf := codec.NewBuffer(b)
207 for i := 0; i < 18; i++ {
209 if i < len(m.Options) {
210 x = uint64(m.Options[i])
214 buf.EncodeString(m.NamespaceID, 0)
215 return buf.Bytes(), nil
217 func (m *AppAttach) Unmarshal(b []byte) error {
218 buf := codec.NewBuffer(b)
219 m.Options = make([]uint64, 18)
220 for i := 0; i < len(m.Options); i++ {
221 m.Options[i] = buf.DecodeUint64()
223 m.NamespaceID = buf.DecodeString(0)
227 // AppAttachReply defines message 'app_attach_reply'.
228 type AppAttachReply struct {
229 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
230 AppMq uint64 `binapi:"u64,name=app_mq" json:"app_mq,omitempty"`
231 VppCtrlMq uint64 `binapi:"u64,name=vpp_ctrl_mq" json:"vpp_ctrl_mq,omitempty"`
232 VppCtrlMqThread uint8 `binapi:"u8,name=vpp_ctrl_mq_thread" json:"vpp_ctrl_mq_thread,omitempty"`
233 AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
234 NFds uint8 `binapi:"u8,name=n_fds" json:"n_fds,omitempty"`
235 FdFlags uint8 `binapi:"u8,name=fd_flags" json:"fd_flags,omitempty"`
236 SegmentSize uint32 `binapi:"u32,name=segment_size" json:"segment_size,omitempty"`
237 SegmentHandle uint64 `binapi:"u64,name=segment_handle" json:"segment_handle,omitempty"`
238 SegmentName string `binapi:"string[],name=segment_name" json:"segment_name,omitempty"`
241 func (m *AppAttachReply) Reset() { *m = AppAttachReply{} }
242 func (*AppAttachReply) GetMessageName() string { return "app_attach_reply" }
243 func (*AppAttachReply) GetCrcString() string { return "5c89c3b0" }
244 func (*AppAttachReply) GetMessageType() api.MessageType {
245 return api.ReplyMessage
248 func (m *AppAttachReply) Size() (size int) {
252 size += 4 // m.Retval
254 size += 8 // m.VppCtrlMq
255 size += 1 // m.VppCtrlMqThread
256 size += 4 // m.AppIndex
258 size += 1 // m.FdFlags
259 size += 4 // m.SegmentSize
260 size += 8 // m.SegmentHandle
261 size += 4 + len(m.SegmentName) // m.SegmentName
264 func (m *AppAttachReply) Marshal(b []byte) ([]byte, error) {
266 b = make([]byte, m.Size())
268 buf := codec.NewBuffer(b)
269 buf.EncodeInt32(m.Retval)
270 buf.EncodeUint64(m.AppMq)
271 buf.EncodeUint64(m.VppCtrlMq)
272 buf.EncodeUint8(m.VppCtrlMqThread)
273 buf.EncodeUint32(m.AppIndex)
274 buf.EncodeUint8(m.NFds)
275 buf.EncodeUint8(m.FdFlags)
276 buf.EncodeUint32(m.SegmentSize)
277 buf.EncodeUint64(m.SegmentHandle)
278 buf.EncodeString(m.SegmentName, 0)
279 return buf.Bytes(), nil
281 func (m *AppAttachReply) Unmarshal(b []byte) error {
282 buf := codec.NewBuffer(b)
283 m.Retval = buf.DecodeInt32()
284 m.AppMq = buf.DecodeUint64()
285 m.VppCtrlMq = buf.DecodeUint64()
286 m.VppCtrlMqThread = buf.DecodeUint8()
287 m.AppIndex = buf.DecodeUint32()
288 m.NFds = buf.DecodeUint8()
289 m.FdFlags = buf.DecodeUint8()
290 m.SegmentSize = buf.DecodeUint32()
291 m.SegmentHandle = buf.DecodeUint64()
292 m.SegmentName = buf.DecodeString(0)
296 // AppDelCertKeyPair defines message 'app_del_cert_key_pair'.
297 type AppDelCertKeyPair struct {
298 Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
301 func (m *AppDelCertKeyPair) Reset() { *m = AppDelCertKeyPair{} }
302 func (*AppDelCertKeyPair) GetMessageName() string { return "app_del_cert_key_pair" }
303 func (*AppDelCertKeyPair) GetCrcString() string { return "8ac76db6" }
304 func (*AppDelCertKeyPair) GetMessageType() api.MessageType {
305 return api.RequestMessage
308 func (m *AppDelCertKeyPair) Size() (size int) {
315 func (m *AppDelCertKeyPair) Marshal(b []byte) ([]byte, error) {
317 b = make([]byte, m.Size())
319 buf := codec.NewBuffer(b)
320 buf.EncodeUint32(m.Index)
321 return buf.Bytes(), nil
323 func (m *AppDelCertKeyPair) Unmarshal(b []byte) error {
324 buf := codec.NewBuffer(b)
325 m.Index = buf.DecodeUint32()
329 // AppDelCertKeyPairReply defines message 'app_del_cert_key_pair_reply'.
330 type AppDelCertKeyPairReply struct {
331 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
334 func (m *AppDelCertKeyPairReply) Reset() { *m = AppDelCertKeyPairReply{} }
335 func (*AppDelCertKeyPairReply) GetMessageName() string { return "app_del_cert_key_pair_reply" }
336 func (*AppDelCertKeyPairReply) GetCrcString() string { return "e8d4e804" }
337 func (*AppDelCertKeyPairReply) GetMessageType() api.MessageType {
338 return api.ReplyMessage
341 func (m *AppDelCertKeyPairReply) Size() (size int) {
345 size += 4 // m.Retval
348 func (m *AppDelCertKeyPairReply) Marshal(b []byte) ([]byte, error) {
350 b = make([]byte, m.Size())
352 buf := codec.NewBuffer(b)
353 buf.EncodeInt32(m.Retval)
354 return buf.Bytes(), nil
356 func (m *AppDelCertKeyPairReply) Unmarshal(b []byte) error {
357 buf := codec.NewBuffer(b)
358 m.Retval = buf.DecodeInt32()
362 // AppNamespaceAddDel defines message 'app_namespace_add_del'.
363 // Deprecated: the message will be removed in the future versions
364 type AppNamespaceAddDel struct {
365 Secret uint64 `binapi:"u64,name=secret" json:"secret,omitempty"`
366 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
367 IP4FibID uint32 `binapi:"u32,name=ip4_fib_id" json:"ip4_fib_id,omitempty"`
368 IP6FibID uint32 `binapi:"u32,name=ip6_fib_id" json:"ip6_fib_id,omitempty"`
369 NamespaceID string `binapi:"string[],name=namespace_id" json:"namespace_id,omitempty"`
372 func (m *AppNamespaceAddDel) Reset() { *m = AppNamespaceAddDel{} }
373 func (*AppNamespaceAddDel) GetMessageName() string { return "app_namespace_add_del" }
374 func (*AppNamespaceAddDel) GetCrcString() string { return "6306aecb" }
375 func (*AppNamespaceAddDel) GetMessageType() api.MessageType {
376 return api.RequestMessage
379 func (m *AppNamespaceAddDel) Size() (size int) {
383 size += 8 // m.Secret
384 size += 4 // m.SwIfIndex
385 size += 4 // m.IP4FibID
386 size += 4 // m.IP6FibID
387 size += 4 + len(m.NamespaceID) // m.NamespaceID
390 func (m *AppNamespaceAddDel) Marshal(b []byte) ([]byte, error) {
392 b = make([]byte, m.Size())
394 buf := codec.NewBuffer(b)
395 buf.EncodeUint64(m.Secret)
396 buf.EncodeUint32(uint32(m.SwIfIndex))
397 buf.EncodeUint32(m.IP4FibID)
398 buf.EncodeUint32(m.IP6FibID)
399 buf.EncodeString(m.NamespaceID, 0)
400 return buf.Bytes(), nil
402 func (m *AppNamespaceAddDel) Unmarshal(b []byte) error {
403 buf := codec.NewBuffer(b)
404 m.Secret = buf.DecodeUint64()
405 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
406 m.IP4FibID = buf.DecodeUint32()
407 m.IP6FibID = buf.DecodeUint32()
408 m.NamespaceID = buf.DecodeString(0)
412 // AppNamespaceAddDelReply defines message 'app_namespace_add_del_reply'.
413 // Deprecated: the message will be removed in the future versions
414 type AppNamespaceAddDelReply struct {
415 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
416 AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
419 func (m *AppNamespaceAddDelReply) Reset() { *m = AppNamespaceAddDelReply{} }
420 func (*AppNamespaceAddDelReply) GetMessageName() string { return "app_namespace_add_del_reply" }
421 func (*AppNamespaceAddDelReply) GetCrcString() string { return "85137120" }
422 func (*AppNamespaceAddDelReply) GetMessageType() api.MessageType {
423 return api.ReplyMessage
426 func (m *AppNamespaceAddDelReply) Size() (size int) {
430 size += 4 // m.Retval
431 size += 4 // m.AppnsIndex
434 func (m *AppNamespaceAddDelReply) Marshal(b []byte) ([]byte, error) {
436 b = make([]byte, m.Size())
438 buf := codec.NewBuffer(b)
439 buf.EncodeInt32(m.Retval)
440 buf.EncodeUint32(m.AppnsIndex)
441 return buf.Bytes(), nil
443 func (m *AppNamespaceAddDelReply) Unmarshal(b []byte) error {
444 buf := codec.NewBuffer(b)
445 m.Retval = buf.DecodeInt32()
446 m.AppnsIndex = buf.DecodeUint32()
450 // AppNamespaceAddDelV2 defines message 'app_namespace_add_del_v2'.
451 type AppNamespaceAddDelV2 struct {
452 Secret uint64 `binapi:"u64,name=secret" json:"secret,omitempty"`
453 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
454 IP4FibID uint32 `binapi:"u32,name=ip4_fib_id" json:"ip4_fib_id,omitempty"`
455 IP6FibID uint32 `binapi:"u32,name=ip6_fib_id" json:"ip6_fib_id,omitempty"`
456 NamespaceID string `binapi:"string[64],name=namespace_id" json:"namespace_id,omitempty"`
457 Netns string `binapi:"string[64],name=netns" json:"netns,omitempty"`
460 func (m *AppNamespaceAddDelV2) Reset() { *m = AppNamespaceAddDelV2{} }
461 func (*AppNamespaceAddDelV2) GetMessageName() string { return "app_namespace_add_del_v2" }
462 func (*AppNamespaceAddDelV2) GetCrcString() string { return "ee0755cf" }
463 func (*AppNamespaceAddDelV2) GetMessageType() api.MessageType {
464 return api.RequestMessage
467 func (m *AppNamespaceAddDelV2) Size() (size int) {
471 size += 8 // m.Secret
472 size += 4 // m.SwIfIndex
473 size += 4 // m.IP4FibID
474 size += 4 // m.IP6FibID
475 size += 64 // m.NamespaceID
476 size += 64 // m.Netns
479 func (m *AppNamespaceAddDelV2) Marshal(b []byte) ([]byte, error) {
481 b = make([]byte, m.Size())
483 buf := codec.NewBuffer(b)
484 buf.EncodeUint64(m.Secret)
485 buf.EncodeUint32(uint32(m.SwIfIndex))
486 buf.EncodeUint32(m.IP4FibID)
487 buf.EncodeUint32(m.IP6FibID)
488 buf.EncodeString(m.NamespaceID, 64)
489 buf.EncodeString(m.Netns, 64)
490 return buf.Bytes(), nil
492 func (m *AppNamespaceAddDelV2) Unmarshal(b []byte) error {
493 buf := codec.NewBuffer(b)
494 m.Secret = buf.DecodeUint64()
495 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
496 m.IP4FibID = buf.DecodeUint32()
497 m.IP6FibID = buf.DecodeUint32()
498 m.NamespaceID = buf.DecodeString(64)
499 m.Netns = buf.DecodeString(64)
503 // AppNamespaceAddDelV2Reply defines message 'app_namespace_add_del_v2_reply'.
504 type AppNamespaceAddDelV2Reply struct {
505 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
506 AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
509 func (m *AppNamespaceAddDelV2Reply) Reset() { *m = AppNamespaceAddDelV2Reply{} }
510 func (*AppNamespaceAddDelV2Reply) GetMessageName() string { return "app_namespace_add_del_v2_reply" }
511 func (*AppNamespaceAddDelV2Reply) GetCrcString() string { return "85137120" }
512 func (*AppNamespaceAddDelV2Reply) GetMessageType() api.MessageType {
513 return api.ReplyMessage
516 func (m *AppNamespaceAddDelV2Reply) Size() (size int) {
520 size += 4 // m.Retval
521 size += 4 // m.AppnsIndex
524 func (m *AppNamespaceAddDelV2Reply) Marshal(b []byte) ([]byte, error) {
526 b = make([]byte, m.Size())
528 buf := codec.NewBuffer(b)
529 buf.EncodeInt32(m.Retval)
530 buf.EncodeUint32(m.AppnsIndex)
531 return buf.Bytes(), nil
533 func (m *AppNamespaceAddDelV2Reply) Unmarshal(b []byte) error {
534 buf := codec.NewBuffer(b)
535 m.Retval = buf.DecodeInt32()
536 m.AppnsIndex = buf.DecodeUint32()
540 // AppNamespaceAddDelV3 defines message 'app_namespace_add_del_v3'.
541 type AppNamespaceAddDelV3 struct {
542 Secret uint64 `binapi:"u64,name=secret" json:"secret,omitempty"`
543 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
544 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
545 IP4FibID uint32 `binapi:"u32,name=ip4_fib_id" json:"ip4_fib_id,omitempty"`
546 IP6FibID uint32 `binapi:"u32,name=ip6_fib_id" json:"ip6_fib_id,omitempty"`
547 NamespaceID string `binapi:"string[64],name=namespace_id" json:"namespace_id,omitempty"`
548 Netns string `binapi:"string[64],name=netns" json:"netns,omitempty"`
549 SockName string `binapi:"string[],name=sock_name" json:"sock_name,omitempty"`
552 func (m *AppNamespaceAddDelV3) Reset() { *m = AppNamespaceAddDelV3{} }
553 func (*AppNamespaceAddDelV3) GetMessageName() string { return "app_namespace_add_del_v3" }
554 func (*AppNamespaceAddDelV3) GetCrcString() string { return "8a7e40a1" }
555 func (*AppNamespaceAddDelV3) GetMessageType() api.MessageType {
556 return api.RequestMessage
559 func (m *AppNamespaceAddDelV3) Size() (size int) {
563 size += 8 // m.Secret
565 size += 4 // m.SwIfIndex
566 size += 4 // m.IP4FibID
567 size += 4 // m.IP6FibID
568 size += 64 // m.NamespaceID
569 size += 64 // m.Netns
570 size += 4 + len(m.SockName) // m.SockName
573 func (m *AppNamespaceAddDelV3) Marshal(b []byte) ([]byte, error) {
575 b = make([]byte, m.Size())
577 buf := codec.NewBuffer(b)
578 buf.EncodeUint64(m.Secret)
579 buf.EncodeBool(m.IsAdd)
580 buf.EncodeUint32(uint32(m.SwIfIndex))
581 buf.EncodeUint32(m.IP4FibID)
582 buf.EncodeUint32(m.IP6FibID)
583 buf.EncodeString(m.NamespaceID, 64)
584 buf.EncodeString(m.Netns, 64)
585 buf.EncodeString(m.SockName, 0)
586 return buf.Bytes(), nil
588 func (m *AppNamespaceAddDelV3) Unmarshal(b []byte) error {
589 buf := codec.NewBuffer(b)
590 m.Secret = buf.DecodeUint64()
591 m.IsAdd = buf.DecodeBool()
592 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
593 m.IP4FibID = buf.DecodeUint32()
594 m.IP6FibID = buf.DecodeUint32()
595 m.NamespaceID = buf.DecodeString(64)
596 m.Netns = buf.DecodeString(64)
597 m.SockName = buf.DecodeString(0)
601 // AppNamespaceAddDelV3Reply defines message 'app_namespace_add_del_v3_reply'.
602 type AppNamespaceAddDelV3Reply struct {
603 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
604 AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
607 func (m *AppNamespaceAddDelV3Reply) Reset() { *m = AppNamespaceAddDelV3Reply{} }
608 func (*AppNamespaceAddDelV3Reply) GetMessageName() string { return "app_namespace_add_del_v3_reply" }
609 func (*AppNamespaceAddDelV3Reply) GetCrcString() string { return "85137120" }
610 func (*AppNamespaceAddDelV3Reply) GetMessageType() api.MessageType {
611 return api.ReplyMessage
614 func (m *AppNamespaceAddDelV3Reply) Size() (size int) {
618 size += 4 // m.Retval
619 size += 4 // m.AppnsIndex
622 func (m *AppNamespaceAddDelV3Reply) Marshal(b []byte) ([]byte, error) {
624 b = make([]byte, m.Size())
626 buf := codec.NewBuffer(b)
627 buf.EncodeInt32(m.Retval)
628 buf.EncodeUint32(m.AppnsIndex)
629 return buf.Bytes(), nil
631 func (m *AppNamespaceAddDelV3Reply) Unmarshal(b []byte) error {
632 buf := codec.NewBuffer(b)
633 m.Retval = buf.DecodeInt32()
634 m.AppnsIndex = buf.DecodeUint32()
638 // AppWorkerAddDel defines message 'app_worker_add_del'.
639 type AppWorkerAddDel struct {
640 AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
641 WrkIndex uint32 `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
642 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
645 func (m *AppWorkerAddDel) Reset() { *m = AppWorkerAddDel{} }
646 func (*AppWorkerAddDel) GetMessageName() string { return "app_worker_add_del" }
647 func (*AppWorkerAddDel) GetCrcString() string { return "753253dc" }
648 func (*AppWorkerAddDel) GetMessageType() api.MessageType {
649 return api.RequestMessage
652 func (m *AppWorkerAddDel) Size() (size int) {
656 size += 4 // m.AppIndex
657 size += 4 // m.WrkIndex
661 func (m *AppWorkerAddDel) Marshal(b []byte) ([]byte, error) {
663 b = make([]byte, m.Size())
665 buf := codec.NewBuffer(b)
666 buf.EncodeUint32(m.AppIndex)
667 buf.EncodeUint32(m.WrkIndex)
668 buf.EncodeBool(m.IsAdd)
669 return buf.Bytes(), nil
671 func (m *AppWorkerAddDel) Unmarshal(b []byte) error {
672 buf := codec.NewBuffer(b)
673 m.AppIndex = buf.DecodeUint32()
674 m.WrkIndex = buf.DecodeUint32()
675 m.IsAdd = buf.DecodeBool()
679 // AppWorkerAddDelReply defines message 'app_worker_add_del_reply'.
680 type AppWorkerAddDelReply struct {
681 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
682 WrkIndex uint32 `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
683 AppEventQueueAddress uint64 `binapi:"u64,name=app_event_queue_address" json:"app_event_queue_address,omitempty"`
684 NFds uint8 `binapi:"u8,name=n_fds" json:"n_fds,omitempty"`
685 FdFlags uint8 `binapi:"u8,name=fd_flags" json:"fd_flags,omitempty"`
686 SegmentHandle uint64 `binapi:"u64,name=segment_handle" json:"segment_handle,omitempty"`
687 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
688 SegmentName string `binapi:"string[],name=segment_name" json:"segment_name,omitempty"`
691 func (m *AppWorkerAddDelReply) Reset() { *m = AppWorkerAddDelReply{} }
692 func (*AppWorkerAddDelReply) GetMessageName() string { return "app_worker_add_del_reply" }
693 func (*AppWorkerAddDelReply) GetCrcString() string { return "5735ffe7" }
694 func (*AppWorkerAddDelReply) GetMessageType() api.MessageType {
695 return api.ReplyMessage
698 func (m *AppWorkerAddDelReply) Size() (size int) {
702 size += 4 // m.Retval
703 size += 4 // m.WrkIndex
704 size += 8 // m.AppEventQueueAddress
706 size += 1 // m.FdFlags
707 size += 8 // m.SegmentHandle
709 size += 4 + len(m.SegmentName) // m.SegmentName
712 func (m *AppWorkerAddDelReply) Marshal(b []byte) ([]byte, error) {
714 b = make([]byte, m.Size())
716 buf := codec.NewBuffer(b)
717 buf.EncodeInt32(m.Retval)
718 buf.EncodeUint32(m.WrkIndex)
719 buf.EncodeUint64(m.AppEventQueueAddress)
720 buf.EncodeUint8(m.NFds)
721 buf.EncodeUint8(m.FdFlags)
722 buf.EncodeUint64(m.SegmentHandle)
723 buf.EncodeBool(m.IsAdd)
724 buf.EncodeString(m.SegmentName, 0)
725 return buf.Bytes(), nil
727 func (m *AppWorkerAddDelReply) Unmarshal(b []byte) error {
728 buf := codec.NewBuffer(b)
729 m.Retval = buf.DecodeInt32()
730 m.WrkIndex = buf.DecodeUint32()
731 m.AppEventQueueAddress = buf.DecodeUint64()
732 m.NFds = buf.DecodeUint8()
733 m.FdFlags = buf.DecodeUint8()
734 m.SegmentHandle = buf.DecodeUint64()
735 m.IsAdd = buf.DecodeBool()
736 m.SegmentName = buf.DecodeString(0)
740 // ApplicationDetach defines message 'application_detach'.
741 type ApplicationDetach struct{}
743 func (m *ApplicationDetach) Reset() { *m = ApplicationDetach{} }
744 func (*ApplicationDetach) GetMessageName() string { return "application_detach" }
745 func (*ApplicationDetach) GetCrcString() string { return "51077d14" }
746 func (*ApplicationDetach) GetMessageType() api.MessageType {
747 return api.RequestMessage
750 func (m *ApplicationDetach) Size() (size int) {
756 func (m *ApplicationDetach) Marshal(b []byte) ([]byte, error) {
758 b = make([]byte, m.Size())
760 buf := codec.NewBuffer(b)
761 return buf.Bytes(), nil
763 func (m *ApplicationDetach) Unmarshal(b []byte) error {
767 // ApplicationDetachReply defines message 'application_detach_reply'.
768 type ApplicationDetachReply struct {
769 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
772 func (m *ApplicationDetachReply) Reset() { *m = ApplicationDetachReply{} }
773 func (*ApplicationDetachReply) GetMessageName() string { return "application_detach_reply" }
774 func (*ApplicationDetachReply) GetCrcString() string { return "e8d4e804" }
775 func (*ApplicationDetachReply) GetMessageType() api.MessageType {
776 return api.ReplyMessage
779 func (m *ApplicationDetachReply) Size() (size int) {
783 size += 4 // m.Retval
786 func (m *ApplicationDetachReply) Marshal(b []byte) ([]byte, error) {
788 b = make([]byte, m.Size())
790 buf := codec.NewBuffer(b)
791 buf.EncodeInt32(m.Retval)
792 return buf.Bytes(), nil
794 func (m *ApplicationDetachReply) Unmarshal(b []byte) error {
795 buf := codec.NewBuffer(b)
796 m.Retval = buf.DecodeInt32()
800 // ApplicationTLSCertAdd defines message 'application_tls_cert_add'.
801 // Deprecated: to be removed post 21.06
802 type ApplicationTLSCertAdd struct {
803 AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
804 CertLen uint16 `binapi:"u16,name=cert_len" json:"-"`
805 Cert []byte `binapi:"u8[cert_len],name=cert" json:"cert,omitempty"`
808 func (m *ApplicationTLSCertAdd) Reset() { *m = ApplicationTLSCertAdd{} }
809 func (*ApplicationTLSCertAdd) GetMessageName() string { return "application_tls_cert_add" }
810 func (*ApplicationTLSCertAdd) GetCrcString() string { return "3f5cfe45" }
811 func (*ApplicationTLSCertAdd) GetMessageType() api.MessageType {
812 return api.RequestMessage
815 func (m *ApplicationTLSCertAdd) Size() (size int) {
819 size += 4 // m.AppIndex
820 size += 2 // m.CertLen
821 size += 1 * len(m.Cert) // m.Cert
824 func (m *ApplicationTLSCertAdd) Marshal(b []byte) ([]byte, error) {
826 b = make([]byte, m.Size())
828 buf := codec.NewBuffer(b)
829 buf.EncodeUint32(m.AppIndex)
830 buf.EncodeUint16(uint16(len(m.Cert)))
831 buf.EncodeBytes(m.Cert, 0)
832 return buf.Bytes(), nil
834 func (m *ApplicationTLSCertAdd) Unmarshal(b []byte) error {
835 buf := codec.NewBuffer(b)
836 m.AppIndex = buf.DecodeUint32()
837 m.CertLen = buf.DecodeUint16()
838 m.Cert = make([]byte, m.CertLen)
839 copy(m.Cert, buf.DecodeBytes(len(m.Cert)))
843 // ApplicationTLSCertAddReply defines message 'application_tls_cert_add_reply'.
844 // Deprecated: to be removed post 21.06
845 type ApplicationTLSCertAddReply struct {
846 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
849 func (m *ApplicationTLSCertAddReply) Reset() { *m = ApplicationTLSCertAddReply{} }
850 func (*ApplicationTLSCertAddReply) GetMessageName() string { return "application_tls_cert_add_reply" }
851 func (*ApplicationTLSCertAddReply) GetCrcString() string { return "e8d4e804" }
852 func (*ApplicationTLSCertAddReply) GetMessageType() api.MessageType {
853 return api.ReplyMessage
856 func (m *ApplicationTLSCertAddReply) Size() (size int) {
860 size += 4 // m.Retval
863 func (m *ApplicationTLSCertAddReply) Marshal(b []byte) ([]byte, error) {
865 b = make([]byte, m.Size())
867 buf := codec.NewBuffer(b)
868 buf.EncodeInt32(m.Retval)
869 return buf.Bytes(), nil
871 func (m *ApplicationTLSCertAddReply) Unmarshal(b []byte) error {
872 buf := codec.NewBuffer(b)
873 m.Retval = buf.DecodeInt32()
877 // ApplicationTLSKeyAdd defines message 'application_tls_key_add'.
878 // Deprecated: to be removed post 21.06
879 type ApplicationTLSKeyAdd struct {
880 AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
881 KeyLen uint16 `binapi:"u16,name=key_len" json:"-"`
882 Key []byte `binapi:"u8[key_len],name=key" json:"key,omitempty"`
885 func (m *ApplicationTLSKeyAdd) Reset() { *m = ApplicationTLSKeyAdd{} }
886 func (*ApplicationTLSKeyAdd) GetMessageName() string { return "application_tls_key_add" }
887 func (*ApplicationTLSKeyAdd) GetCrcString() string { return "5eaf70cd" }
888 func (*ApplicationTLSKeyAdd) GetMessageType() api.MessageType {
889 return api.RequestMessage
892 func (m *ApplicationTLSKeyAdd) Size() (size int) {
896 size += 4 // m.AppIndex
897 size += 2 // m.KeyLen
898 size += 1 * len(m.Key) // m.Key
901 func (m *ApplicationTLSKeyAdd) Marshal(b []byte) ([]byte, error) {
903 b = make([]byte, m.Size())
905 buf := codec.NewBuffer(b)
906 buf.EncodeUint32(m.AppIndex)
907 buf.EncodeUint16(uint16(len(m.Key)))
908 buf.EncodeBytes(m.Key, 0)
909 return buf.Bytes(), nil
911 func (m *ApplicationTLSKeyAdd) Unmarshal(b []byte) error {
912 buf := codec.NewBuffer(b)
913 m.AppIndex = buf.DecodeUint32()
914 m.KeyLen = buf.DecodeUint16()
915 m.Key = make([]byte, m.KeyLen)
916 copy(m.Key, buf.DecodeBytes(len(m.Key)))
920 // ApplicationTLSKeyAddReply defines message 'application_tls_key_add_reply'.
921 // Deprecated: to be removed post 21.06
922 type ApplicationTLSKeyAddReply struct {
923 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
926 func (m *ApplicationTLSKeyAddReply) Reset() { *m = ApplicationTLSKeyAddReply{} }
927 func (*ApplicationTLSKeyAddReply) GetMessageName() string { return "application_tls_key_add_reply" }
928 func (*ApplicationTLSKeyAddReply) GetCrcString() string { return "e8d4e804" }
929 func (*ApplicationTLSKeyAddReply) GetMessageType() api.MessageType {
930 return api.ReplyMessage
933 func (m *ApplicationTLSKeyAddReply) Size() (size int) {
937 size += 4 // m.Retval
940 func (m *ApplicationTLSKeyAddReply) Marshal(b []byte) ([]byte, error) {
942 b = make([]byte, m.Size())
944 buf := codec.NewBuffer(b)
945 buf.EncodeInt32(m.Retval)
946 return buf.Bytes(), nil
948 func (m *ApplicationTLSKeyAddReply) Unmarshal(b []byte) error {
949 buf := codec.NewBuffer(b)
950 m.Retval = buf.DecodeInt32()
954 // SessionEnableDisable defines message 'session_enable_disable'.
955 type SessionEnableDisable struct {
956 IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"`
959 func (m *SessionEnableDisable) Reset() { *m = SessionEnableDisable{} }
960 func (*SessionEnableDisable) GetMessageName() string { return "session_enable_disable" }
961 func (*SessionEnableDisable) GetCrcString() string { return "c264d7bf" }
962 func (*SessionEnableDisable) GetMessageType() api.MessageType {
963 return api.RequestMessage
966 func (m *SessionEnableDisable) Size() (size int) {
970 size += 1 // m.IsEnable
973 func (m *SessionEnableDisable) Marshal(b []byte) ([]byte, error) {
975 b = make([]byte, m.Size())
977 buf := codec.NewBuffer(b)
978 buf.EncodeBool(m.IsEnable)
979 return buf.Bytes(), nil
981 func (m *SessionEnableDisable) Unmarshal(b []byte) error {
982 buf := codec.NewBuffer(b)
983 m.IsEnable = buf.DecodeBool()
987 // SessionEnableDisableReply defines message 'session_enable_disable_reply'.
988 type SessionEnableDisableReply struct {
989 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
992 func (m *SessionEnableDisableReply) Reset() { *m = SessionEnableDisableReply{} }
993 func (*SessionEnableDisableReply) GetMessageName() string { return "session_enable_disable_reply" }
994 func (*SessionEnableDisableReply) GetCrcString() string { return "e8d4e804" }
995 func (*SessionEnableDisableReply) GetMessageType() api.MessageType {
996 return api.ReplyMessage
999 func (m *SessionEnableDisableReply) Size() (size int) {
1003 size += 4 // m.Retval
1006 func (m *SessionEnableDisableReply) Marshal(b []byte) ([]byte, error) {
1008 b = make([]byte, m.Size())
1010 buf := codec.NewBuffer(b)
1011 buf.EncodeInt32(m.Retval)
1012 return buf.Bytes(), nil
1014 func (m *SessionEnableDisableReply) Unmarshal(b []byte) error {
1015 buf := codec.NewBuffer(b)
1016 m.Retval = buf.DecodeInt32()
1020 // SessionRuleAddDel defines message 'session_rule_add_del'.
1021 type SessionRuleAddDel struct {
1022 TransportProto TransportProto `binapi:"transport_proto,name=transport_proto" json:"transport_proto,omitempty"`
1023 Lcl ip_types.Prefix `binapi:"prefix,name=lcl" json:"lcl,omitempty"`
1024 Rmt ip_types.Prefix `binapi:"prefix,name=rmt" json:"rmt,omitempty"`
1025 LclPort uint16 `binapi:"u16,name=lcl_port" json:"lcl_port,omitempty"`
1026 RmtPort uint16 `binapi:"u16,name=rmt_port" json:"rmt_port,omitempty"`
1027 ActionIndex uint32 `binapi:"u32,name=action_index" json:"action_index,omitempty"`
1028 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1029 AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
1030 Scope SessionRuleScope `binapi:"session_rule_scope,name=scope" json:"scope,omitempty"`
1031 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
1034 func (m *SessionRuleAddDel) Reset() { *m = SessionRuleAddDel{} }
1035 func (*SessionRuleAddDel) GetMessageName() string { return "session_rule_add_del" }
1036 func (*SessionRuleAddDel) GetCrcString() string { return "e4895422" }
1037 func (*SessionRuleAddDel) GetMessageType() api.MessageType {
1038 return api.RequestMessage
1041 func (m *SessionRuleAddDel) Size() (size int) {
1045 size += 1 // m.TransportProto
1046 size += 1 // m.Lcl.Address.Af
1047 size += 1 * 16 // m.Lcl.Address.Un
1048 size += 1 // m.Lcl.Len
1049 size += 1 // m.Rmt.Address.Af
1050 size += 1 * 16 // m.Rmt.Address.Un
1051 size += 1 // m.Rmt.Len
1052 size += 2 // m.LclPort
1053 size += 2 // m.RmtPort
1054 size += 4 // m.ActionIndex
1055 size += 1 // m.IsAdd
1056 size += 4 // m.AppnsIndex
1057 size += 4 // m.Scope
1061 func (m *SessionRuleAddDel) Marshal(b []byte) ([]byte, error) {
1063 b = make([]byte, m.Size())
1065 buf := codec.NewBuffer(b)
1066 buf.EncodeUint8(uint8(m.TransportProto))
1067 buf.EncodeUint8(uint8(m.Lcl.Address.Af))
1068 buf.EncodeBytes(m.Lcl.Address.Un.XXX_UnionData[:], 16)
1069 buf.EncodeUint8(m.Lcl.Len)
1070 buf.EncodeUint8(uint8(m.Rmt.Address.Af))
1071 buf.EncodeBytes(m.Rmt.Address.Un.XXX_UnionData[:], 16)
1072 buf.EncodeUint8(m.Rmt.Len)
1073 buf.EncodeUint16(m.LclPort)
1074 buf.EncodeUint16(m.RmtPort)
1075 buf.EncodeUint32(m.ActionIndex)
1076 buf.EncodeBool(m.IsAdd)
1077 buf.EncodeUint32(m.AppnsIndex)
1078 buf.EncodeUint32(uint32(m.Scope))
1079 buf.EncodeString(m.Tag, 64)
1080 return buf.Bytes(), nil
1082 func (m *SessionRuleAddDel) Unmarshal(b []byte) error {
1083 buf := codec.NewBuffer(b)
1084 m.TransportProto = TransportProto(buf.DecodeUint8())
1085 m.Lcl.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1086 copy(m.Lcl.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1087 m.Lcl.Len = buf.DecodeUint8()
1088 m.Rmt.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1089 copy(m.Rmt.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1090 m.Rmt.Len = buf.DecodeUint8()
1091 m.LclPort = buf.DecodeUint16()
1092 m.RmtPort = buf.DecodeUint16()
1093 m.ActionIndex = buf.DecodeUint32()
1094 m.IsAdd = buf.DecodeBool()
1095 m.AppnsIndex = buf.DecodeUint32()
1096 m.Scope = SessionRuleScope(buf.DecodeUint32())
1097 m.Tag = buf.DecodeString(64)
1101 // SessionRuleAddDelReply defines message 'session_rule_add_del_reply'.
1102 type SessionRuleAddDelReply struct {
1103 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1106 func (m *SessionRuleAddDelReply) Reset() { *m = SessionRuleAddDelReply{} }
1107 func (*SessionRuleAddDelReply) GetMessageName() string { return "session_rule_add_del_reply" }
1108 func (*SessionRuleAddDelReply) GetCrcString() string { return "e8d4e804" }
1109 func (*SessionRuleAddDelReply) GetMessageType() api.MessageType {
1110 return api.ReplyMessage
1113 func (m *SessionRuleAddDelReply) Size() (size int) {
1117 size += 4 // m.Retval
1120 func (m *SessionRuleAddDelReply) Marshal(b []byte) ([]byte, error) {
1122 b = make([]byte, m.Size())
1124 buf := codec.NewBuffer(b)
1125 buf.EncodeInt32(m.Retval)
1126 return buf.Bytes(), nil
1128 func (m *SessionRuleAddDelReply) Unmarshal(b []byte) error {
1129 buf := codec.NewBuffer(b)
1130 m.Retval = buf.DecodeInt32()
1134 // SessionRulesDetails defines message 'session_rules_details'.
1135 type SessionRulesDetails struct {
1136 TransportProto TransportProto `binapi:"transport_proto,name=transport_proto" json:"transport_proto,omitempty"`
1137 Lcl ip_types.Prefix `binapi:"prefix,name=lcl" json:"lcl,omitempty"`
1138 Rmt ip_types.Prefix `binapi:"prefix,name=rmt" json:"rmt,omitempty"`
1139 LclPort uint16 `binapi:"u16,name=lcl_port" json:"lcl_port,omitempty"`
1140 RmtPort uint16 `binapi:"u16,name=rmt_port" json:"rmt_port,omitempty"`
1141 ActionIndex uint32 `binapi:"u32,name=action_index" json:"action_index,omitempty"`
1142 AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
1143 Scope SessionRuleScope `binapi:"session_rule_scope,name=scope" json:"scope,omitempty"`
1144 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
1147 func (m *SessionRulesDetails) Reset() { *m = SessionRulesDetails{} }
1148 func (*SessionRulesDetails) GetMessageName() string { return "session_rules_details" }
1149 func (*SessionRulesDetails) GetCrcString() string { return "28d71830" }
1150 func (*SessionRulesDetails) GetMessageType() api.MessageType {
1151 return api.ReplyMessage
1154 func (m *SessionRulesDetails) Size() (size int) {
1158 size += 1 // m.TransportProto
1159 size += 1 // m.Lcl.Address.Af
1160 size += 1 * 16 // m.Lcl.Address.Un
1161 size += 1 // m.Lcl.Len
1162 size += 1 // m.Rmt.Address.Af
1163 size += 1 * 16 // m.Rmt.Address.Un
1164 size += 1 // m.Rmt.Len
1165 size += 2 // m.LclPort
1166 size += 2 // m.RmtPort
1167 size += 4 // m.ActionIndex
1168 size += 4 // m.AppnsIndex
1169 size += 4 // m.Scope
1173 func (m *SessionRulesDetails) Marshal(b []byte) ([]byte, error) {
1175 b = make([]byte, m.Size())
1177 buf := codec.NewBuffer(b)
1178 buf.EncodeUint8(uint8(m.TransportProto))
1179 buf.EncodeUint8(uint8(m.Lcl.Address.Af))
1180 buf.EncodeBytes(m.Lcl.Address.Un.XXX_UnionData[:], 16)
1181 buf.EncodeUint8(m.Lcl.Len)
1182 buf.EncodeUint8(uint8(m.Rmt.Address.Af))
1183 buf.EncodeBytes(m.Rmt.Address.Un.XXX_UnionData[:], 16)
1184 buf.EncodeUint8(m.Rmt.Len)
1185 buf.EncodeUint16(m.LclPort)
1186 buf.EncodeUint16(m.RmtPort)
1187 buf.EncodeUint32(m.ActionIndex)
1188 buf.EncodeUint32(m.AppnsIndex)
1189 buf.EncodeUint32(uint32(m.Scope))
1190 buf.EncodeString(m.Tag, 64)
1191 return buf.Bytes(), nil
1193 func (m *SessionRulesDetails) Unmarshal(b []byte) error {
1194 buf := codec.NewBuffer(b)
1195 m.TransportProto = TransportProto(buf.DecodeUint8())
1196 m.Lcl.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1197 copy(m.Lcl.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1198 m.Lcl.Len = buf.DecodeUint8()
1199 m.Rmt.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1200 copy(m.Rmt.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1201 m.Rmt.Len = buf.DecodeUint8()
1202 m.LclPort = buf.DecodeUint16()
1203 m.RmtPort = buf.DecodeUint16()
1204 m.ActionIndex = buf.DecodeUint32()
1205 m.AppnsIndex = buf.DecodeUint32()
1206 m.Scope = SessionRuleScope(buf.DecodeUint32())
1207 m.Tag = buf.DecodeString(64)
1211 // SessionRulesDump defines message 'session_rules_dump'.
1212 type SessionRulesDump struct{}
1214 func (m *SessionRulesDump) Reset() { *m = SessionRulesDump{} }
1215 func (*SessionRulesDump) GetMessageName() string { return "session_rules_dump" }
1216 func (*SessionRulesDump) GetCrcString() string { return "51077d14" }
1217 func (*SessionRulesDump) GetMessageType() api.MessageType {
1218 return api.RequestMessage
1221 func (m *SessionRulesDump) Size() (size int) {
1227 func (m *SessionRulesDump) Marshal(b []byte) ([]byte, error) {
1229 b = make([]byte, m.Size())
1231 buf := codec.NewBuffer(b)
1232 return buf.Bytes(), nil
1234 func (m *SessionRulesDump) Unmarshal(b []byte) error {
1238 // SessionSapiEnableDisable defines message 'session_sapi_enable_disable'.
1239 type SessionSapiEnableDisable struct {
1240 IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"`
1243 func (m *SessionSapiEnableDisable) Reset() { *m = SessionSapiEnableDisable{} }
1244 func (*SessionSapiEnableDisable) GetMessageName() string { return "session_sapi_enable_disable" }
1245 func (*SessionSapiEnableDisable) GetCrcString() string { return "c264d7bf" }
1246 func (*SessionSapiEnableDisable) GetMessageType() api.MessageType {
1247 return api.RequestMessage
1250 func (m *SessionSapiEnableDisable) Size() (size int) {
1254 size += 1 // m.IsEnable
1257 func (m *SessionSapiEnableDisable) Marshal(b []byte) ([]byte, error) {
1259 b = make([]byte, m.Size())
1261 buf := codec.NewBuffer(b)
1262 buf.EncodeBool(m.IsEnable)
1263 return buf.Bytes(), nil
1265 func (m *SessionSapiEnableDisable) Unmarshal(b []byte) error {
1266 buf := codec.NewBuffer(b)
1267 m.IsEnable = buf.DecodeBool()
1271 // SessionSapiEnableDisableReply defines message 'session_sapi_enable_disable_reply'.
1272 type SessionSapiEnableDisableReply struct {
1273 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1276 func (m *SessionSapiEnableDisableReply) Reset() { *m = SessionSapiEnableDisableReply{} }
1277 func (*SessionSapiEnableDisableReply) GetMessageName() string {
1278 return "session_sapi_enable_disable_reply"
1280 func (*SessionSapiEnableDisableReply) GetCrcString() string { return "e8d4e804" }
1281 func (*SessionSapiEnableDisableReply) GetMessageType() api.MessageType {
1282 return api.ReplyMessage
1285 func (m *SessionSapiEnableDisableReply) Size() (size int) {
1289 size += 4 // m.Retval
1292 func (m *SessionSapiEnableDisableReply) Marshal(b []byte) ([]byte, error) {
1294 b = make([]byte, m.Size())
1296 buf := codec.NewBuffer(b)
1297 buf.EncodeInt32(m.Retval)
1298 return buf.Bytes(), nil
1300 func (m *SessionSapiEnableDisableReply) Unmarshal(b []byte) error {
1301 buf := codec.NewBuffer(b)
1302 m.Retval = buf.DecodeInt32()
1306 func init() { file_session_binapi_init() }
1307 func file_session_binapi_init() {
1308 api.RegisterMessage((*AppAddCertKeyPair)(nil), "app_add_cert_key_pair_02eb8016")
1309 api.RegisterMessage((*AppAddCertKeyPairReply)(nil), "app_add_cert_key_pair_reply_b42958d0")
1310 api.RegisterMessage((*AppAttach)(nil), "app_attach_5f4a260d")
1311 api.RegisterMessage((*AppAttachReply)(nil), "app_attach_reply_5c89c3b0")
1312 api.RegisterMessage((*AppDelCertKeyPair)(nil), "app_del_cert_key_pair_8ac76db6")
1313 api.RegisterMessage((*AppDelCertKeyPairReply)(nil), "app_del_cert_key_pair_reply_e8d4e804")
1314 api.RegisterMessage((*AppNamespaceAddDel)(nil), "app_namespace_add_del_6306aecb")
1315 api.RegisterMessage((*AppNamespaceAddDelReply)(nil), "app_namespace_add_del_reply_85137120")
1316 api.RegisterMessage((*AppNamespaceAddDelV2)(nil), "app_namespace_add_del_v2_ee0755cf")
1317 api.RegisterMessage((*AppNamespaceAddDelV2Reply)(nil), "app_namespace_add_del_v2_reply_85137120")
1318 api.RegisterMessage((*AppNamespaceAddDelV3)(nil), "app_namespace_add_del_v3_8a7e40a1")
1319 api.RegisterMessage((*AppNamespaceAddDelV3Reply)(nil), "app_namespace_add_del_v3_reply_85137120")
1320 api.RegisterMessage((*AppWorkerAddDel)(nil), "app_worker_add_del_753253dc")
1321 api.RegisterMessage((*AppWorkerAddDelReply)(nil), "app_worker_add_del_reply_5735ffe7")
1322 api.RegisterMessage((*ApplicationDetach)(nil), "application_detach_51077d14")
1323 api.RegisterMessage((*ApplicationDetachReply)(nil), "application_detach_reply_e8d4e804")
1324 api.RegisterMessage((*ApplicationTLSCertAdd)(nil), "application_tls_cert_add_3f5cfe45")
1325 api.RegisterMessage((*ApplicationTLSCertAddReply)(nil), "application_tls_cert_add_reply_e8d4e804")
1326 api.RegisterMessage((*ApplicationTLSKeyAdd)(nil), "application_tls_key_add_5eaf70cd")
1327 api.RegisterMessage((*ApplicationTLSKeyAddReply)(nil), "application_tls_key_add_reply_e8d4e804")
1328 api.RegisterMessage((*SessionEnableDisable)(nil), "session_enable_disable_c264d7bf")
1329 api.RegisterMessage((*SessionEnableDisableReply)(nil), "session_enable_disable_reply_e8d4e804")
1330 api.RegisterMessage((*SessionRuleAddDel)(nil), "session_rule_add_del_e4895422")
1331 api.RegisterMessage((*SessionRuleAddDelReply)(nil), "session_rule_add_del_reply_e8d4e804")
1332 api.RegisterMessage((*SessionRulesDetails)(nil), "session_rules_details_28d71830")
1333 api.RegisterMessage((*SessionRulesDump)(nil), "session_rules_dump_51077d14")
1334 api.RegisterMessage((*SessionSapiEnableDisable)(nil), "session_sapi_enable_disable_c264d7bf")
1335 api.RegisterMessage((*SessionSapiEnableDisableReply)(nil), "session_sapi_enable_disable_reply_e8d4e804")
1338 // Messages returns list of all messages in this module.
1339 func AllMessages() []api.Message {
1340 return []api.Message{
1341 (*AppAddCertKeyPair)(nil),
1342 (*AppAddCertKeyPairReply)(nil),
1344 (*AppAttachReply)(nil),
1345 (*AppDelCertKeyPair)(nil),
1346 (*AppDelCertKeyPairReply)(nil),
1347 (*AppNamespaceAddDel)(nil),
1348 (*AppNamespaceAddDelReply)(nil),
1349 (*AppNamespaceAddDelV2)(nil),
1350 (*AppNamespaceAddDelV2Reply)(nil),
1351 (*AppNamespaceAddDelV3)(nil),
1352 (*AppNamespaceAddDelV3Reply)(nil),
1353 (*AppWorkerAddDel)(nil),
1354 (*AppWorkerAddDelReply)(nil),
1355 (*ApplicationDetach)(nil),
1356 (*ApplicationDetachReply)(nil),
1357 (*ApplicationTLSCertAdd)(nil),
1358 (*ApplicationTLSCertAddReply)(nil),
1359 (*ApplicationTLSKeyAdd)(nil),
1360 (*ApplicationTLSKeyAddReply)(nil),
1361 (*SessionEnableDisable)(nil),
1362 (*SessionEnableDisableReply)(nil),
1363 (*SessionRuleAddDel)(nil),
1364 (*SessionRuleAddDelReply)(nil),
1365 (*SessionRulesDetails)(nil),
1366 (*SessionRulesDump)(nil),
1367 (*SessionSapiEnableDisable)(nil),
1368 (*SessionSapiEnableDisableReply)(nil),