Improve binapi generator
[govpp.git] / binapi / session / session.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5 // source: /usr/share/vpp/api/core/session.api.json
6
7 // Package session contains generated bindings for API file session.api.
8 //
9 // Contents:
10 //   2 enums
11 //  22 messages
12 //
13 package session
14
15 import (
16         api "git.fd.io/govpp.git/api"
17         interface_types "git.fd.io/govpp.git/binapi/interface_types"
18         ip_types "git.fd.io/govpp.git/binapi/ip_types"
19         codec "git.fd.io/govpp.git/codec"
20         "strconv"
21 )
22
23 // This is a compile-time assertion to ensure that this generated file
24 // is compatible with the GoVPP api package it is being compiled against.
25 // A compilation error at this line likely means your copy of the
26 // GoVPP api package needs to be updated.
27 const _ = api.GoVppAPIPackageIsVersion2
28
29 const (
30         APIFile    = "session"
31         APIVersion = "3.2.0"
32         VersionCrc = 0x9aa0ebc0
33 )
34
35 // SessionRuleScope defines enum 'session_rule_scope'.
36 type SessionRuleScope uint32
37
38 const (
39         SESSION_RULE_SCOPE_API_GLOBAL SessionRuleScope = 0
40         SESSION_RULE_SCOPE_API_LOCAL  SessionRuleScope = 1
41         SESSION_RULE_SCOPE_API_BOTH   SessionRuleScope = 2
42 )
43
44 var (
45         SessionRuleScope_name = map[uint32]string{
46                 0: "SESSION_RULE_SCOPE_API_GLOBAL",
47                 1: "SESSION_RULE_SCOPE_API_LOCAL",
48                 2: "SESSION_RULE_SCOPE_API_BOTH",
49         }
50         SessionRuleScope_value = map[string]uint32{
51                 "SESSION_RULE_SCOPE_API_GLOBAL": 0,
52                 "SESSION_RULE_SCOPE_API_LOCAL":  1,
53                 "SESSION_RULE_SCOPE_API_BOTH":   2,
54         }
55 )
56
57 func (x SessionRuleScope) String() string {
58         s, ok := SessionRuleScope_name[uint32(x)]
59         if ok {
60                 return s
61         }
62         return "SessionRuleScope(" + strconv.Itoa(int(x)) + ")"
63 }
64
65 // TransportProto defines enum 'transport_proto'.
66 type TransportProto uint8
67
68 const (
69         TRANSPORT_PROTO_API_TCP  TransportProto = 1
70         TRANSPORT_PROTO_API_UDP  TransportProto = 2
71         TRANSPORT_PROTO_API_NONE TransportProto = 3
72         TRANSPORT_PROTO_API_TLS  TransportProto = 4
73         TRANSPORT_PROTO_API_QUIC TransportProto = 5
74 )
75
76 var (
77         TransportProto_name = map[uint8]string{
78                 1: "TRANSPORT_PROTO_API_TCP",
79                 2: "TRANSPORT_PROTO_API_UDP",
80                 3: "TRANSPORT_PROTO_API_NONE",
81                 4: "TRANSPORT_PROTO_API_TLS",
82                 5: "TRANSPORT_PROTO_API_QUIC",
83         }
84         TransportProto_value = map[string]uint8{
85                 "TRANSPORT_PROTO_API_TCP":  1,
86                 "TRANSPORT_PROTO_API_UDP":  2,
87                 "TRANSPORT_PROTO_API_NONE": 3,
88                 "TRANSPORT_PROTO_API_TLS":  4,
89                 "TRANSPORT_PROTO_API_QUIC": 5,
90         }
91 )
92
93 func (x TransportProto) String() string {
94         s, ok := TransportProto_name[uint8(x)]
95         if ok {
96                 return s
97         }
98         return "TransportProto(" + strconv.Itoa(int(x)) + ")"
99 }
100
101 // AppAddCertKeyPair defines message 'app_add_cert_key_pair'.
102 type AppAddCertKeyPair struct {
103         CertLen    uint16 `binapi:"u16,name=cert_len" json:"cert_len,omitempty"`
104         CertkeyLen uint16 `binapi:"u16,name=certkey_len" json:"-"`
105         Certkey    []byte `binapi:"u8[certkey_len],name=certkey" json:"certkey,omitempty"`
106 }
107
108 func (m *AppAddCertKeyPair) Reset()               { *m = AppAddCertKeyPair{} }
109 func (*AppAddCertKeyPair) GetMessageName() string { return "app_add_cert_key_pair" }
110 func (*AppAddCertKeyPair) GetCrcString() string   { return "02eb8016" }
111 func (*AppAddCertKeyPair) GetMessageType() api.MessageType {
112         return api.RequestMessage
113 }
114
115 func (m *AppAddCertKeyPair) Size() int {
116         if m == nil {
117                 return 0
118         }
119         var size int
120         size += 2                  // m.CertLen
121         size += 2                  // m.CertkeyLen
122         size += 1 * len(m.Certkey) // m.Certkey
123         return size
124 }
125 func (m *AppAddCertKeyPair) Marshal(b []byte) ([]byte, error) {
126         var buf *codec.Buffer
127         if b == nil {
128                 buf = codec.NewBuffer(make([]byte, m.Size()))
129         } else {
130                 buf = codec.NewBuffer(b)
131         }
132         buf.EncodeUint16(uint16(m.CertLen))
133         buf.EncodeUint16(uint16(len(m.Certkey)))
134         buf.EncodeBytes(m.Certkey[:], 0)
135         return buf.Bytes(), nil
136 }
137 func (m *AppAddCertKeyPair) Unmarshal(b []byte) error {
138         buf := codec.NewBuffer(b)
139         m.CertLen = buf.DecodeUint16()
140         m.CertkeyLen = buf.DecodeUint16()
141         copy(m.Certkey[:], buf.DecodeBytes(0))
142         return nil
143 }
144
145 // AppAddCertKeyPairReply defines message 'app_add_cert_key_pair_reply'.
146 type AppAddCertKeyPairReply struct {
147         Retval int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
148         Index  uint32 `binapi:"u32,name=index" json:"index,omitempty"`
149 }
150
151 func (m *AppAddCertKeyPairReply) Reset()               { *m = AppAddCertKeyPairReply{} }
152 func (*AppAddCertKeyPairReply) GetMessageName() string { return "app_add_cert_key_pair_reply" }
153 func (*AppAddCertKeyPairReply) GetCrcString() string   { return "b42958d0" }
154 func (*AppAddCertKeyPairReply) GetMessageType() api.MessageType {
155         return api.ReplyMessage
156 }
157
158 func (m *AppAddCertKeyPairReply) Size() int {
159         if m == nil {
160                 return 0
161         }
162         var size int
163         size += 4 // m.Retval
164         size += 4 // m.Index
165         return size
166 }
167 func (m *AppAddCertKeyPairReply) Marshal(b []byte) ([]byte, error) {
168         var buf *codec.Buffer
169         if b == nil {
170                 buf = codec.NewBuffer(make([]byte, m.Size()))
171         } else {
172                 buf = codec.NewBuffer(b)
173         }
174         buf.EncodeUint32(uint32(m.Retval))
175         buf.EncodeUint32(uint32(m.Index))
176         return buf.Bytes(), nil
177 }
178 func (m *AppAddCertKeyPairReply) Unmarshal(b []byte) error {
179         buf := codec.NewBuffer(b)
180         m.Retval = int32(buf.DecodeUint32())
181         m.Index = buf.DecodeUint32()
182         return nil
183 }
184
185 // AppAttach defines message 'app_attach'.
186 type AppAttach struct {
187         Options     []uint64 `binapi:"u64[18],name=options" json:"options,omitempty"`
188         NamespaceID string   `binapi:"string[],name=namespace_id" json:"namespace_id,omitempty"`
189 }
190
191 func (m *AppAttach) Reset()               { *m = AppAttach{} }
192 func (*AppAttach) GetMessageName() string { return "app_attach" }
193 func (*AppAttach) GetCrcString() string   { return "5f4a260d" }
194 func (*AppAttach) GetMessageType() api.MessageType {
195         return api.RequestMessage
196 }
197
198 func (m *AppAttach) Size() int {
199         if m == nil {
200                 return 0
201         }
202         var size int
203         size += 8 * 18                 // m.Options
204         size += 4 + len(m.NamespaceID) // m.NamespaceID
205         return size
206 }
207 func (m *AppAttach) Marshal(b []byte) ([]byte, error) {
208         var buf *codec.Buffer
209         if b == nil {
210                 buf = codec.NewBuffer(make([]byte, m.Size()))
211         } else {
212                 buf = codec.NewBuffer(b)
213         }
214         for i := 0; i < 18; i++ {
215                 var x uint64
216                 if i < len(m.Options) {
217                         x = uint64(m.Options[i])
218                 }
219                 buf.EncodeUint64(uint64(x))
220         }
221         buf.EncodeString(m.NamespaceID, 0)
222         return buf.Bytes(), nil
223 }
224 func (m *AppAttach) Unmarshal(b []byte) error {
225         buf := codec.NewBuffer(b)
226         m.Options = make([]uint64, 18)
227         for i := 0; i < len(m.Options); i++ {
228                 m.Options[i] = buf.DecodeUint64()
229         }
230         m.NamespaceID = buf.DecodeString(0)
231         return nil
232 }
233
234 // AppAttachReply defines message 'app_attach_reply'.
235 type AppAttachReply struct {
236         Retval          int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
237         AppMq           uint64 `binapi:"u64,name=app_mq" json:"app_mq,omitempty"`
238         VppCtrlMq       uint64 `binapi:"u64,name=vpp_ctrl_mq" json:"vpp_ctrl_mq,omitempty"`
239         VppCtrlMqThread uint8  `binapi:"u8,name=vpp_ctrl_mq_thread" json:"vpp_ctrl_mq_thread,omitempty"`
240         AppIndex        uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
241         NFds            uint8  `binapi:"u8,name=n_fds" json:"n_fds,omitempty"`
242         FdFlags         uint8  `binapi:"u8,name=fd_flags" json:"fd_flags,omitempty"`
243         SegmentSize     uint32 `binapi:"u32,name=segment_size" json:"segment_size,omitempty"`
244         SegmentHandle   uint64 `binapi:"u64,name=segment_handle" json:"segment_handle,omitempty"`
245         SegmentName     string `binapi:"string[],name=segment_name" json:"segment_name,omitempty"`
246 }
247
248 func (m *AppAttachReply) Reset()               { *m = AppAttachReply{} }
249 func (*AppAttachReply) GetMessageName() string { return "app_attach_reply" }
250 func (*AppAttachReply) GetCrcString() string   { return "5c89c3b0" }
251 func (*AppAttachReply) GetMessageType() api.MessageType {
252         return api.ReplyMessage
253 }
254
255 func (m *AppAttachReply) Size() int {
256         if m == nil {
257                 return 0
258         }
259         var size int
260         size += 4                      // m.Retval
261         size += 8                      // m.AppMq
262         size += 8                      // m.VppCtrlMq
263         size += 1                      // m.VppCtrlMqThread
264         size += 4                      // m.AppIndex
265         size += 1                      // m.NFds
266         size += 1                      // m.FdFlags
267         size += 4                      // m.SegmentSize
268         size += 8                      // m.SegmentHandle
269         size += 4 + len(m.SegmentName) // m.SegmentName
270         return size
271 }
272 func (m *AppAttachReply) Marshal(b []byte) ([]byte, error) {
273         var buf *codec.Buffer
274         if b == nil {
275                 buf = codec.NewBuffer(make([]byte, m.Size()))
276         } else {
277                 buf = codec.NewBuffer(b)
278         }
279         buf.EncodeUint32(uint32(m.Retval))
280         buf.EncodeUint64(uint64(m.AppMq))
281         buf.EncodeUint64(uint64(m.VppCtrlMq))
282         buf.EncodeUint8(uint8(m.VppCtrlMqThread))
283         buf.EncodeUint32(uint32(m.AppIndex))
284         buf.EncodeUint8(uint8(m.NFds))
285         buf.EncodeUint8(uint8(m.FdFlags))
286         buf.EncodeUint32(uint32(m.SegmentSize))
287         buf.EncodeUint64(uint64(m.SegmentHandle))
288         buf.EncodeString(m.SegmentName, 0)
289         return buf.Bytes(), nil
290 }
291 func (m *AppAttachReply) Unmarshal(b []byte) error {
292         buf := codec.NewBuffer(b)
293         m.Retval = int32(buf.DecodeUint32())
294         m.AppMq = buf.DecodeUint64()
295         m.VppCtrlMq = buf.DecodeUint64()
296         m.VppCtrlMqThread = buf.DecodeUint8()
297         m.AppIndex = buf.DecodeUint32()
298         m.NFds = buf.DecodeUint8()
299         m.FdFlags = buf.DecodeUint8()
300         m.SegmentSize = buf.DecodeUint32()
301         m.SegmentHandle = buf.DecodeUint64()
302         m.SegmentName = buf.DecodeString(0)
303         return nil
304 }
305
306 // AppDelCertKeyPair defines message 'app_del_cert_key_pair'.
307 type AppDelCertKeyPair struct {
308         Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
309 }
310
311 func (m *AppDelCertKeyPair) Reset()               { *m = AppDelCertKeyPair{} }
312 func (*AppDelCertKeyPair) GetMessageName() string { return "app_del_cert_key_pair" }
313 func (*AppDelCertKeyPair) GetCrcString() string   { return "8ac76db6" }
314 func (*AppDelCertKeyPair) GetMessageType() api.MessageType {
315         return api.RequestMessage
316 }
317
318 func (m *AppDelCertKeyPair) Size() int {
319         if m == nil {
320                 return 0
321         }
322         var size int
323         size += 4 // m.Index
324         return size
325 }
326 func (m *AppDelCertKeyPair) Marshal(b []byte) ([]byte, error) {
327         var buf *codec.Buffer
328         if b == nil {
329                 buf = codec.NewBuffer(make([]byte, m.Size()))
330         } else {
331                 buf = codec.NewBuffer(b)
332         }
333         buf.EncodeUint32(uint32(m.Index))
334         return buf.Bytes(), nil
335 }
336 func (m *AppDelCertKeyPair) Unmarshal(b []byte) error {
337         buf := codec.NewBuffer(b)
338         m.Index = buf.DecodeUint32()
339         return nil
340 }
341
342 // AppDelCertKeyPairReply defines message 'app_del_cert_key_pair_reply'.
343 type AppDelCertKeyPairReply struct {
344         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
345 }
346
347 func (m *AppDelCertKeyPairReply) Reset()               { *m = AppDelCertKeyPairReply{} }
348 func (*AppDelCertKeyPairReply) GetMessageName() string { return "app_del_cert_key_pair_reply" }
349 func (*AppDelCertKeyPairReply) GetCrcString() string   { return "e8d4e804" }
350 func (*AppDelCertKeyPairReply) GetMessageType() api.MessageType {
351         return api.ReplyMessage
352 }
353
354 func (m *AppDelCertKeyPairReply) Size() int {
355         if m == nil {
356                 return 0
357         }
358         var size int
359         size += 4 // m.Retval
360         return size
361 }
362 func (m *AppDelCertKeyPairReply) Marshal(b []byte) ([]byte, error) {
363         var buf *codec.Buffer
364         if b == nil {
365                 buf = codec.NewBuffer(make([]byte, m.Size()))
366         } else {
367                 buf = codec.NewBuffer(b)
368         }
369         buf.EncodeUint32(uint32(m.Retval))
370         return buf.Bytes(), nil
371 }
372 func (m *AppDelCertKeyPairReply) Unmarshal(b []byte) error {
373         buf := codec.NewBuffer(b)
374         m.Retval = int32(buf.DecodeUint32())
375         return nil
376 }
377
378 // AppNamespaceAddDel defines message 'app_namespace_add_del'.
379 type AppNamespaceAddDel struct {
380         Secret      uint64                         `binapi:"u64,name=secret" json:"secret,omitempty"`
381         SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=%!s(float64=4.294967295e+09)" json:"sw_if_index,omitempty"`
382         IP4FibID    uint32                         `binapi:"u32,name=ip4_fib_id" json:"ip4_fib_id,omitempty"`
383         IP6FibID    uint32                         `binapi:"u32,name=ip6_fib_id" json:"ip6_fib_id,omitempty"`
384         NamespaceID string                         `binapi:"string[],name=namespace_id" json:"namespace_id,omitempty"`
385 }
386
387 func (m *AppNamespaceAddDel) Reset()               { *m = AppNamespaceAddDel{} }
388 func (*AppNamespaceAddDel) GetMessageName() string { return "app_namespace_add_del" }
389 func (*AppNamespaceAddDel) GetCrcString() string   { return "6306aecb" }
390 func (*AppNamespaceAddDel) GetMessageType() api.MessageType {
391         return api.RequestMessage
392 }
393
394 func (m *AppNamespaceAddDel) Size() int {
395         if m == nil {
396                 return 0
397         }
398         var size int
399         size += 8                      // m.Secret
400         size += 4                      // m.SwIfIndex
401         size += 4                      // m.IP4FibID
402         size += 4                      // m.IP6FibID
403         size += 4 + len(m.NamespaceID) // m.NamespaceID
404         return size
405 }
406 func (m *AppNamespaceAddDel) Marshal(b []byte) ([]byte, error) {
407         var buf *codec.Buffer
408         if b == nil {
409                 buf = codec.NewBuffer(make([]byte, m.Size()))
410         } else {
411                 buf = codec.NewBuffer(b)
412         }
413         buf.EncodeUint64(uint64(m.Secret))
414         buf.EncodeUint32(uint32(m.SwIfIndex))
415         buf.EncodeUint32(uint32(m.IP4FibID))
416         buf.EncodeUint32(uint32(m.IP6FibID))
417         buf.EncodeString(m.NamespaceID, 0)
418         return buf.Bytes(), nil
419 }
420 func (m *AppNamespaceAddDel) Unmarshal(b []byte) error {
421         buf := codec.NewBuffer(b)
422         m.Secret = buf.DecodeUint64()
423         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
424         m.IP4FibID = buf.DecodeUint32()
425         m.IP6FibID = buf.DecodeUint32()
426         m.NamespaceID = buf.DecodeString(0)
427         return nil
428 }
429
430 // AppNamespaceAddDelReply defines message 'app_namespace_add_del_reply'.
431 type AppNamespaceAddDelReply struct {
432         Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
433         AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
434 }
435
436 func (m *AppNamespaceAddDelReply) Reset()               { *m = AppNamespaceAddDelReply{} }
437 func (*AppNamespaceAddDelReply) GetMessageName() string { return "app_namespace_add_del_reply" }
438 func (*AppNamespaceAddDelReply) GetCrcString() string   { return "85137120" }
439 func (*AppNamespaceAddDelReply) GetMessageType() api.MessageType {
440         return api.ReplyMessage
441 }
442
443 func (m *AppNamespaceAddDelReply) Size() int {
444         if m == nil {
445                 return 0
446         }
447         var size int
448         size += 4 // m.Retval
449         size += 4 // m.AppnsIndex
450         return size
451 }
452 func (m *AppNamespaceAddDelReply) Marshal(b []byte) ([]byte, error) {
453         var buf *codec.Buffer
454         if b == nil {
455                 buf = codec.NewBuffer(make([]byte, m.Size()))
456         } else {
457                 buf = codec.NewBuffer(b)
458         }
459         buf.EncodeUint32(uint32(m.Retval))
460         buf.EncodeUint32(uint32(m.AppnsIndex))
461         return buf.Bytes(), nil
462 }
463 func (m *AppNamespaceAddDelReply) Unmarshal(b []byte) error {
464         buf := codec.NewBuffer(b)
465         m.Retval = int32(buf.DecodeUint32())
466         m.AppnsIndex = buf.DecodeUint32()
467         return nil
468 }
469
470 // AppWorkerAddDel defines message 'app_worker_add_del'.
471 type AppWorkerAddDel struct {
472         AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
473         WrkIndex uint32 `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
474         IsAdd    bool   `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
475 }
476
477 func (m *AppWorkerAddDel) Reset()               { *m = AppWorkerAddDel{} }
478 func (*AppWorkerAddDel) GetMessageName() string { return "app_worker_add_del" }
479 func (*AppWorkerAddDel) GetCrcString() string   { return "753253dc" }
480 func (*AppWorkerAddDel) GetMessageType() api.MessageType {
481         return api.RequestMessage
482 }
483
484 func (m *AppWorkerAddDel) Size() int {
485         if m == nil {
486                 return 0
487         }
488         var size int
489         size += 4 // m.AppIndex
490         size += 4 // m.WrkIndex
491         size += 1 // m.IsAdd
492         return size
493 }
494 func (m *AppWorkerAddDel) Marshal(b []byte) ([]byte, error) {
495         var buf *codec.Buffer
496         if b == nil {
497                 buf = codec.NewBuffer(make([]byte, m.Size()))
498         } else {
499                 buf = codec.NewBuffer(b)
500         }
501         buf.EncodeUint32(uint32(m.AppIndex))
502         buf.EncodeUint32(uint32(m.WrkIndex))
503         buf.EncodeBool(m.IsAdd)
504         return buf.Bytes(), nil
505 }
506 func (m *AppWorkerAddDel) Unmarshal(b []byte) error {
507         buf := codec.NewBuffer(b)
508         m.AppIndex = buf.DecodeUint32()
509         m.WrkIndex = buf.DecodeUint32()
510         m.IsAdd = buf.DecodeBool()
511         return nil
512 }
513
514 // AppWorkerAddDelReply defines message 'app_worker_add_del_reply'.
515 type AppWorkerAddDelReply struct {
516         Retval               int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
517         WrkIndex             uint32 `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
518         AppEventQueueAddress uint64 `binapi:"u64,name=app_event_queue_address" json:"app_event_queue_address,omitempty"`
519         NFds                 uint8  `binapi:"u8,name=n_fds" json:"n_fds,omitempty"`
520         FdFlags              uint8  `binapi:"u8,name=fd_flags" json:"fd_flags,omitempty"`
521         SegmentHandle        uint64 `binapi:"u64,name=segment_handle" json:"segment_handle,omitempty"`
522         IsAdd                bool   `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
523         SegmentName          string `binapi:"string[],name=segment_name" json:"segment_name,omitempty"`
524 }
525
526 func (m *AppWorkerAddDelReply) Reset()               { *m = AppWorkerAddDelReply{} }
527 func (*AppWorkerAddDelReply) GetMessageName() string { return "app_worker_add_del_reply" }
528 func (*AppWorkerAddDelReply) GetCrcString() string   { return "5735ffe7" }
529 func (*AppWorkerAddDelReply) GetMessageType() api.MessageType {
530         return api.ReplyMessage
531 }
532
533 func (m *AppWorkerAddDelReply) Size() int {
534         if m == nil {
535                 return 0
536         }
537         var size int
538         size += 4                      // m.Retval
539         size += 4                      // m.WrkIndex
540         size += 8                      // m.AppEventQueueAddress
541         size += 1                      // m.NFds
542         size += 1                      // m.FdFlags
543         size += 8                      // m.SegmentHandle
544         size += 1                      // m.IsAdd
545         size += 4 + len(m.SegmentName) // m.SegmentName
546         return size
547 }
548 func (m *AppWorkerAddDelReply) Marshal(b []byte) ([]byte, error) {
549         var buf *codec.Buffer
550         if b == nil {
551                 buf = codec.NewBuffer(make([]byte, m.Size()))
552         } else {
553                 buf = codec.NewBuffer(b)
554         }
555         buf.EncodeUint32(uint32(m.Retval))
556         buf.EncodeUint32(uint32(m.WrkIndex))
557         buf.EncodeUint64(uint64(m.AppEventQueueAddress))
558         buf.EncodeUint8(uint8(m.NFds))
559         buf.EncodeUint8(uint8(m.FdFlags))
560         buf.EncodeUint64(uint64(m.SegmentHandle))
561         buf.EncodeBool(m.IsAdd)
562         buf.EncodeString(m.SegmentName, 0)
563         return buf.Bytes(), nil
564 }
565 func (m *AppWorkerAddDelReply) Unmarshal(b []byte) error {
566         buf := codec.NewBuffer(b)
567         m.Retval = int32(buf.DecodeUint32())
568         m.WrkIndex = buf.DecodeUint32()
569         m.AppEventQueueAddress = buf.DecodeUint64()
570         m.NFds = buf.DecodeUint8()
571         m.FdFlags = buf.DecodeUint8()
572         m.SegmentHandle = buf.DecodeUint64()
573         m.IsAdd = buf.DecodeBool()
574         m.SegmentName = buf.DecodeString(0)
575         return nil
576 }
577
578 // ApplicationDetach defines message 'application_detach'.
579 type ApplicationDetach struct{}
580
581 func (m *ApplicationDetach) Reset()               { *m = ApplicationDetach{} }
582 func (*ApplicationDetach) GetMessageName() string { return "application_detach" }
583 func (*ApplicationDetach) GetCrcString() string   { return "51077d14" }
584 func (*ApplicationDetach) GetMessageType() api.MessageType {
585         return api.RequestMessage
586 }
587
588 func (m *ApplicationDetach) Size() int {
589         if m == nil {
590                 return 0
591         }
592         var size int
593         return size
594 }
595 func (m *ApplicationDetach) Marshal(b []byte) ([]byte, error) {
596         var buf *codec.Buffer
597         if b == nil {
598                 buf = codec.NewBuffer(make([]byte, m.Size()))
599         } else {
600                 buf = codec.NewBuffer(b)
601         }
602         return buf.Bytes(), nil
603 }
604 func (m *ApplicationDetach) Unmarshal(b []byte) error {
605         return nil
606 }
607
608 // ApplicationDetachReply defines message 'application_detach_reply'.
609 type ApplicationDetachReply struct {
610         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
611 }
612
613 func (m *ApplicationDetachReply) Reset()               { *m = ApplicationDetachReply{} }
614 func (*ApplicationDetachReply) GetMessageName() string { return "application_detach_reply" }
615 func (*ApplicationDetachReply) GetCrcString() string   { return "e8d4e804" }
616 func (*ApplicationDetachReply) GetMessageType() api.MessageType {
617         return api.ReplyMessage
618 }
619
620 func (m *ApplicationDetachReply) Size() int {
621         if m == nil {
622                 return 0
623         }
624         var size int
625         size += 4 // m.Retval
626         return size
627 }
628 func (m *ApplicationDetachReply) Marshal(b []byte) ([]byte, error) {
629         var buf *codec.Buffer
630         if b == nil {
631                 buf = codec.NewBuffer(make([]byte, m.Size()))
632         } else {
633                 buf = codec.NewBuffer(b)
634         }
635         buf.EncodeUint32(uint32(m.Retval))
636         return buf.Bytes(), nil
637 }
638 func (m *ApplicationDetachReply) Unmarshal(b []byte) error {
639         buf := codec.NewBuffer(b)
640         m.Retval = int32(buf.DecodeUint32())
641         return nil
642 }
643
644 // ApplicationTLSCertAdd defines message 'application_tls_cert_add'.
645 type ApplicationTLSCertAdd struct {
646         AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
647         CertLen  uint16 `binapi:"u16,name=cert_len" json:"-"`
648         Cert     []byte `binapi:"u8[cert_len],name=cert" json:"cert,omitempty"`
649 }
650
651 func (m *ApplicationTLSCertAdd) Reset()               { *m = ApplicationTLSCertAdd{} }
652 func (*ApplicationTLSCertAdd) GetMessageName() string { return "application_tls_cert_add" }
653 func (*ApplicationTLSCertAdd) GetCrcString() string   { return "3f5cfe45" }
654 func (*ApplicationTLSCertAdd) GetMessageType() api.MessageType {
655         return api.RequestMessage
656 }
657
658 func (m *ApplicationTLSCertAdd) Size() int {
659         if m == nil {
660                 return 0
661         }
662         var size int
663         size += 4               // m.AppIndex
664         size += 2               // m.CertLen
665         size += 1 * len(m.Cert) // m.Cert
666         return size
667 }
668 func (m *ApplicationTLSCertAdd) Marshal(b []byte) ([]byte, error) {
669         var buf *codec.Buffer
670         if b == nil {
671                 buf = codec.NewBuffer(make([]byte, m.Size()))
672         } else {
673                 buf = codec.NewBuffer(b)
674         }
675         buf.EncodeUint32(uint32(m.AppIndex))
676         buf.EncodeUint16(uint16(len(m.Cert)))
677         buf.EncodeBytes(m.Cert[:], 0)
678         return buf.Bytes(), nil
679 }
680 func (m *ApplicationTLSCertAdd) Unmarshal(b []byte) error {
681         buf := codec.NewBuffer(b)
682         m.AppIndex = buf.DecodeUint32()
683         m.CertLen = buf.DecodeUint16()
684         copy(m.Cert[:], buf.DecodeBytes(0))
685         return nil
686 }
687
688 // ApplicationTLSCertAddReply defines message 'application_tls_cert_add_reply'.
689 type ApplicationTLSCertAddReply struct {
690         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
691 }
692
693 func (m *ApplicationTLSCertAddReply) Reset()               { *m = ApplicationTLSCertAddReply{} }
694 func (*ApplicationTLSCertAddReply) GetMessageName() string { return "application_tls_cert_add_reply" }
695 func (*ApplicationTLSCertAddReply) GetCrcString() string   { return "e8d4e804" }
696 func (*ApplicationTLSCertAddReply) GetMessageType() api.MessageType {
697         return api.ReplyMessage
698 }
699
700 func (m *ApplicationTLSCertAddReply) Size() int {
701         if m == nil {
702                 return 0
703         }
704         var size int
705         size += 4 // m.Retval
706         return size
707 }
708 func (m *ApplicationTLSCertAddReply) Marshal(b []byte) ([]byte, error) {
709         var buf *codec.Buffer
710         if b == nil {
711                 buf = codec.NewBuffer(make([]byte, m.Size()))
712         } else {
713                 buf = codec.NewBuffer(b)
714         }
715         buf.EncodeUint32(uint32(m.Retval))
716         return buf.Bytes(), nil
717 }
718 func (m *ApplicationTLSCertAddReply) Unmarshal(b []byte) error {
719         buf := codec.NewBuffer(b)
720         m.Retval = int32(buf.DecodeUint32())
721         return nil
722 }
723
724 // ApplicationTLSKeyAdd defines message 'application_tls_key_add'.
725 type ApplicationTLSKeyAdd struct {
726         AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
727         KeyLen   uint16 `binapi:"u16,name=key_len" json:"-"`
728         Key      []byte `binapi:"u8[key_len],name=key" json:"key,omitempty"`
729 }
730
731 func (m *ApplicationTLSKeyAdd) Reset()               { *m = ApplicationTLSKeyAdd{} }
732 func (*ApplicationTLSKeyAdd) GetMessageName() string { return "application_tls_key_add" }
733 func (*ApplicationTLSKeyAdd) GetCrcString() string   { return "5eaf70cd" }
734 func (*ApplicationTLSKeyAdd) GetMessageType() api.MessageType {
735         return api.RequestMessage
736 }
737
738 func (m *ApplicationTLSKeyAdd) Size() int {
739         if m == nil {
740                 return 0
741         }
742         var size int
743         size += 4              // m.AppIndex
744         size += 2              // m.KeyLen
745         size += 1 * len(m.Key) // m.Key
746         return size
747 }
748 func (m *ApplicationTLSKeyAdd) Marshal(b []byte) ([]byte, error) {
749         var buf *codec.Buffer
750         if b == nil {
751                 buf = codec.NewBuffer(make([]byte, m.Size()))
752         } else {
753                 buf = codec.NewBuffer(b)
754         }
755         buf.EncodeUint32(uint32(m.AppIndex))
756         buf.EncodeUint16(uint16(len(m.Key)))
757         buf.EncodeBytes(m.Key[:], 0)
758         return buf.Bytes(), nil
759 }
760 func (m *ApplicationTLSKeyAdd) Unmarshal(b []byte) error {
761         buf := codec.NewBuffer(b)
762         m.AppIndex = buf.DecodeUint32()
763         m.KeyLen = buf.DecodeUint16()
764         copy(m.Key[:], buf.DecodeBytes(0))
765         return nil
766 }
767
768 // ApplicationTLSKeyAddReply defines message 'application_tls_key_add_reply'.
769 type ApplicationTLSKeyAddReply struct {
770         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
771 }
772
773 func (m *ApplicationTLSKeyAddReply) Reset()               { *m = ApplicationTLSKeyAddReply{} }
774 func (*ApplicationTLSKeyAddReply) GetMessageName() string { return "application_tls_key_add_reply" }
775 func (*ApplicationTLSKeyAddReply) GetCrcString() string   { return "e8d4e804" }
776 func (*ApplicationTLSKeyAddReply) GetMessageType() api.MessageType {
777         return api.ReplyMessage
778 }
779
780 func (m *ApplicationTLSKeyAddReply) Size() int {
781         if m == nil {
782                 return 0
783         }
784         var size int
785         size += 4 // m.Retval
786         return size
787 }
788 func (m *ApplicationTLSKeyAddReply) Marshal(b []byte) ([]byte, error) {
789         var buf *codec.Buffer
790         if b == nil {
791                 buf = codec.NewBuffer(make([]byte, m.Size()))
792         } else {
793                 buf = codec.NewBuffer(b)
794         }
795         buf.EncodeUint32(uint32(m.Retval))
796         return buf.Bytes(), nil
797 }
798 func (m *ApplicationTLSKeyAddReply) Unmarshal(b []byte) error {
799         buf := codec.NewBuffer(b)
800         m.Retval = int32(buf.DecodeUint32())
801         return nil
802 }
803
804 // SessionEnableDisable defines message 'session_enable_disable'.
805 type SessionEnableDisable struct {
806         IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"`
807 }
808
809 func (m *SessionEnableDisable) Reset()               { *m = SessionEnableDisable{} }
810 func (*SessionEnableDisable) GetMessageName() string { return "session_enable_disable" }
811 func (*SessionEnableDisable) GetCrcString() string   { return "c264d7bf" }
812 func (*SessionEnableDisable) GetMessageType() api.MessageType {
813         return api.RequestMessage
814 }
815
816 func (m *SessionEnableDisable) Size() int {
817         if m == nil {
818                 return 0
819         }
820         var size int
821         size += 1 // m.IsEnable
822         return size
823 }
824 func (m *SessionEnableDisable) Marshal(b []byte) ([]byte, error) {
825         var buf *codec.Buffer
826         if b == nil {
827                 buf = codec.NewBuffer(make([]byte, m.Size()))
828         } else {
829                 buf = codec.NewBuffer(b)
830         }
831         buf.EncodeBool(m.IsEnable)
832         return buf.Bytes(), nil
833 }
834 func (m *SessionEnableDisable) Unmarshal(b []byte) error {
835         buf := codec.NewBuffer(b)
836         m.IsEnable = buf.DecodeBool()
837         return nil
838 }
839
840 // SessionEnableDisableReply defines message 'session_enable_disable_reply'.
841 type SessionEnableDisableReply struct {
842         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
843 }
844
845 func (m *SessionEnableDisableReply) Reset()               { *m = SessionEnableDisableReply{} }
846 func (*SessionEnableDisableReply) GetMessageName() string { return "session_enable_disable_reply" }
847 func (*SessionEnableDisableReply) GetCrcString() string   { return "e8d4e804" }
848 func (*SessionEnableDisableReply) GetMessageType() api.MessageType {
849         return api.ReplyMessage
850 }
851
852 func (m *SessionEnableDisableReply) Size() int {
853         if m == nil {
854                 return 0
855         }
856         var size int
857         size += 4 // m.Retval
858         return size
859 }
860 func (m *SessionEnableDisableReply) Marshal(b []byte) ([]byte, error) {
861         var buf *codec.Buffer
862         if b == nil {
863                 buf = codec.NewBuffer(make([]byte, m.Size()))
864         } else {
865                 buf = codec.NewBuffer(b)
866         }
867         buf.EncodeUint32(uint32(m.Retval))
868         return buf.Bytes(), nil
869 }
870 func (m *SessionEnableDisableReply) Unmarshal(b []byte) error {
871         buf := codec.NewBuffer(b)
872         m.Retval = int32(buf.DecodeUint32())
873         return nil
874 }
875
876 // SessionRuleAddDel defines message 'session_rule_add_del'.
877 type SessionRuleAddDel struct {
878         TransportProto TransportProto   `binapi:"transport_proto,name=transport_proto" json:"transport_proto,omitempty"`
879         Lcl            ip_types.Prefix  `binapi:"prefix,name=lcl" json:"lcl,omitempty"`
880         Rmt            ip_types.Prefix  `binapi:"prefix,name=rmt" json:"rmt,omitempty"`
881         LclPort        uint16           `binapi:"u16,name=lcl_port" json:"lcl_port,omitempty"`
882         RmtPort        uint16           `binapi:"u16,name=rmt_port" json:"rmt_port,omitempty"`
883         ActionIndex    uint32           `binapi:"u32,name=action_index" json:"action_index,omitempty"`
884         IsAdd          bool             `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
885         AppnsIndex     uint32           `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
886         Scope          SessionRuleScope `binapi:"session_rule_scope,name=scope" json:"scope,omitempty"`
887         Tag            string           `binapi:"string[64],name=tag" json:"tag,omitempty"`
888 }
889
890 func (m *SessionRuleAddDel) Reset()               { *m = SessionRuleAddDel{} }
891 func (*SessionRuleAddDel) GetMessageName() string { return "session_rule_add_del" }
892 func (*SessionRuleAddDel) GetCrcString() string   { return "e31f9443" }
893 func (*SessionRuleAddDel) GetMessageType() api.MessageType {
894         return api.RequestMessage
895 }
896
897 func (m *SessionRuleAddDel) Size() int {
898         if m == nil {
899                 return 0
900         }
901         var size int
902         size += 1      // m.TransportProto
903         size += 1      // m.Lcl.Address.Af
904         size += 1 * 16 // m.Lcl.Address.Un
905         size += 1      // m.Lcl.Len
906         size += 1      // m.Rmt.Address.Af
907         size += 1 * 16 // m.Rmt.Address.Un
908         size += 1      // m.Rmt.Len
909         size += 2      // m.LclPort
910         size += 2      // m.RmtPort
911         size += 4      // m.ActionIndex
912         size += 1      // m.IsAdd
913         size += 4      // m.AppnsIndex
914         size += 4      // m.Scope
915         size += 64     // m.Tag
916         return size
917 }
918 func (m *SessionRuleAddDel) Marshal(b []byte) ([]byte, error) {
919         var buf *codec.Buffer
920         if b == nil {
921                 buf = codec.NewBuffer(make([]byte, m.Size()))
922         } else {
923                 buf = codec.NewBuffer(b)
924         }
925         buf.EncodeUint8(uint8(m.TransportProto))
926         buf.EncodeUint8(uint8(m.Lcl.Address.Af))
927         buf.EncodeBytes(m.Lcl.Address.Un.XXX_UnionData[:], 0)
928         buf.EncodeUint8(uint8(m.Lcl.Len))
929         buf.EncodeUint8(uint8(m.Rmt.Address.Af))
930         buf.EncodeBytes(m.Rmt.Address.Un.XXX_UnionData[:], 0)
931         buf.EncodeUint8(uint8(m.Rmt.Len))
932         buf.EncodeUint16(uint16(m.LclPort))
933         buf.EncodeUint16(uint16(m.RmtPort))
934         buf.EncodeUint32(uint32(m.ActionIndex))
935         buf.EncodeBool(m.IsAdd)
936         buf.EncodeUint32(uint32(m.AppnsIndex))
937         buf.EncodeUint32(uint32(m.Scope))
938         buf.EncodeString(m.Tag, 64)
939         return buf.Bytes(), nil
940 }
941 func (m *SessionRuleAddDel) Unmarshal(b []byte) error {
942         buf := codec.NewBuffer(b)
943         m.TransportProto = TransportProto(buf.DecodeUint8())
944         m.Lcl.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
945         copy(m.Lcl.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
946         m.Lcl.Len = buf.DecodeUint8()
947         m.Rmt.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
948         copy(m.Rmt.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
949         m.Rmt.Len = buf.DecodeUint8()
950         m.LclPort = buf.DecodeUint16()
951         m.RmtPort = buf.DecodeUint16()
952         m.ActionIndex = buf.DecodeUint32()
953         m.IsAdd = buf.DecodeBool()
954         m.AppnsIndex = buf.DecodeUint32()
955         m.Scope = SessionRuleScope(buf.DecodeUint32())
956         m.Tag = buf.DecodeString(64)
957         return nil
958 }
959
960 // SessionRuleAddDelReply defines message 'session_rule_add_del_reply'.
961 type SessionRuleAddDelReply struct {
962         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
963 }
964
965 func (m *SessionRuleAddDelReply) Reset()               { *m = SessionRuleAddDelReply{} }
966 func (*SessionRuleAddDelReply) GetMessageName() string { return "session_rule_add_del_reply" }
967 func (*SessionRuleAddDelReply) GetCrcString() string   { return "e8d4e804" }
968 func (*SessionRuleAddDelReply) GetMessageType() api.MessageType {
969         return api.ReplyMessage
970 }
971
972 func (m *SessionRuleAddDelReply) Size() int {
973         if m == nil {
974                 return 0
975         }
976         var size int
977         size += 4 // m.Retval
978         return size
979 }
980 func (m *SessionRuleAddDelReply) Marshal(b []byte) ([]byte, error) {
981         var buf *codec.Buffer
982         if b == nil {
983                 buf = codec.NewBuffer(make([]byte, m.Size()))
984         } else {
985                 buf = codec.NewBuffer(b)
986         }
987         buf.EncodeUint32(uint32(m.Retval))
988         return buf.Bytes(), nil
989 }
990 func (m *SessionRuleAddDelReply) Unmarshal(b []byte) error {
991         buf := codec.NewBuffer(b)
992         m.Retval = int32(buf.DecodeUint32())
993         return nil
994 }
995
996 // SessionRulesDetails defines message 'session_rules_details'.
997 type SessionRulesDetails struct {
998         TransportProto TransportProto   `binapi:"transport_proto,name=transport_proto" json:"transport_proto,omitempty"`
999         Lcl            ip_types.Prefix  `binapi:"prefix,name=lcl" json:"lcl,omitempty"`
1000         Rmt            ip_types.Prefix  `binapi:"prefix,name=rmt" json:"rmt,omitempty"`
1001         LclPort        uint16           `binapi:"u16,name=lcl_port" json:"lcl_port,omitempty"`
1002         RmtPort        uint16           `binapi:"u16,name=rmt_port" json:"rmt_port,omitempty"`
1003         ActionIndex    uint32           `binapi:"u32,name=action_index" json:"action_index,omitempty"`
1004         AppnsIndex     uint32           `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
1005         Scope          SessionRuleScope `binapi:"session_rule_scope,name=scope" json:"scope,omitempty"`
1006         Tag            string           `binapi:"string[64],name=tag" json:"tag,omitempty"`
1007 }
1008
1009 func (m *SessionRulesDetails) Reset()               { *m = SessionRulesDetails{} }
1010 func (*SessionRulesDetails) GetMessageName() string { return "session_rules_details" }
1011 func (*SessionRulesDetails) GetCrcString() string   { return "304b91f0" }
1012 func (*SessionRulesDetails) GetMessageType() api.MessageType {
1013         return api.ReplyMessage
1014 }
1015
1016 func (m *SessionRulesDetails) Size() int {
1017         if m == nil {
1018                 return 0
1019         }
1020         var size int
1021         size += 1      // m.TransportProto
1022         size += 1      // m.Lcl.Address.Af
1023         size += 1 * 16 // m.Lcl.Address.Un
1024         size += 1      // m.Lcl.Len
1025         size += 1      // m.Rmt.Address.Af
1026         size += 1 * 16 // m.Rmt.Address.Un
1027         size += 1      // m.Rmt.Len
1028         size += 2      // m.LclPort
1029         size += 2      // m.RmtPort
1030         size += 4      // m.ActionIndex
1031         size += 4      // m.AppnsIndex
1032         size += 4      // m.Scope
1033         size += 64     // m.Tag
1034         return size
1035 }
1036 func (m *SessionRulesDetails) Marshal(b []byte) ([]byte, error) {
1037         var buf *codec.Buffer
1038         if b == nil {
1039                 buf = codec.NewBuffer(make([]byte, m.Size()))
1040         } else {
1041                 buf = codec.NewBuffer(b)
1042         }
1043         buf.EncodeUint8(uint8(m.TransportProto))
1044         buf.EncodeUint8(uint8(m.Lcl.Address.Af))
1045         buf.EncodeBytes(m.Lcl.Address.Un.XXX_UnionData[:], 0)
1046         buf.EncodeUint8(uint8(m.Lcl.Len))
1047         buf.EncodeUint8(uint8(m.Rmt.Address.Af))
1048         buf.EncodeBytes(m.Rmt.Address.Un.XXX_UnionData[:], 0)
1049         buf.EncodeUint8(uint8(m.Rmt.Len))
1050         buf.EncodeUint16(uint16(m.LclPort))
1051         buf.EncodeUint16(uint16(m.RmtPort))
1052         buf.EncodeUint32(uint32(m.ActionIndex))
1053         buf.EncodeUint32(uint32(m.AppnsIndex))
1054         buf.EncodeUint32(uint32(m.Scope))
1055         buf.EncodeString(m.Tag, 64)
1056         return buf.Bytes(), nil
1057 }
1058 func (m *SessionRulesDetails) Unmarshal(b []byte) error {
1059         buf := codec.NewBuffer(b)
1060         m.TransportProto = TransportProto(buf.DecodeUint8())
1061         m.Lcl.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1062         copy(m.Lcl.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1063         m.Lcl.Len = buf.DecodeUint8()
1064         m.Rmt.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1065         copy(m.Rmt.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1066         m.Rmt.Len = buf.DecodeUint8()
1067         m.LclPort = buf.DecodeUint16()
1068         m.RmtPort = buf.DecodeUint16()
1069         m.ActionIndex = buf.DecodeUint32()
1070         m.AppnsIndex = buf.DecodeUint32()
1071         m.Scope = SessionRuleScope(buf.DecodeUint32())
1072         m.Tag = buf.DecodeString(64)
1073         return nil
1074 }
1075
1076 // SessionRulesDump defines message 'session_rules_dump'.
1077 type SessionRulesDump struct{}
1078
1079 func (m *SessionRulesDump) Reset()               { *m = SessionRulesDump{} }
1080 func (*SessionRulesDump) GetMessageName() string { return "session_rules_dump" }
1081 func (*SessionRulesDump) GetCrcString() string   { return "51077d14" }
1082 func (*SessionRulesDump) GetMessageType() api.MessageType {
1083         return api.RequestMessage
1084 }
1085
1086 func (m *SessionRulesDump) Size() int {
1087         if m == nil {
1088                 return 0
1089         }
1090         var size int
1091         return size
1092 }
1093 func (m *SessionRulesDump) Marshal(b []byte) ([]byte, error) {
1094         var buf *codec.Buffer
1095         if b == nil {
1096                 buf = codec.NewBuffer(make([]byte, m.Size()))
1097         } else {
1098                 buf = codec.NewBuffer(b)
1099         }
1100         return buf.Bytes(), nil
1101 }
1102 func (m *SessionRulesDump) Unmarshal(b []byte) error {
1103         return nil
1104 }
1105
1106 func init() { file_session_binapi_init() }
1107 func file_session_binapi_init() {
1108         api.RegisterMessage((*AppAddCertKeyPair)(nil), "app_add_cert_key_pair_02eb8016")
1109         api.RegisterMessage((*AppAddCertKeyPairReply)(nil), "app_add_cert_key_pair_reply_b42958d0")
1110         api.RegisterMessage((*AppAttach)(nil), "app_attach_5f4a260d")
1111         api.RegisterMessage((*AppAttachReply)(nil), "app_attach_reply_5c89c3b0")
1112         api.RegisterMessage((*AppDelCertKeyPair)(nil), "app_del_cert_key_pair_8ac76db6")
1113         api.RegisterMessage((*AppDelCertKeyPairReply)(nil), "app_del_cert_key_pair_reply_e8d4e804")
1114         api.RegisterMessage((*AppNamespaceAddDel)(nil), "app_namespace_add_del_6306aecb")
1115         api.RegisterMessage((*AppNamespaceAddDelReply)(nil), "app_namespace_add_del_reply_85137120")
1116         api.RegisterMessage((*AppWorkerAddDel)(nil), "app_worker_add_del_753253dc")
1117         api.RegisterMessage((*AppWorkerAddDelReply)(nil), "app_worker_add_del_reply_5735ffe7")
1118         api.RegisterMessage((*ApplicationDetach)(nil), "application_detach_51077d14")
1119         api.RegisterMessage((*ApplicationDetachReply)(nil), "application_detach_reply_e8d4e804")
1120         api.RegisterMessage((*ApplicationTLSCertAdd)(nil), "application_tls_cert_add_3f5cfe45")
1121         api.RegisterMessage((*ApplicationTLSCertAddReply)(nil), "application_tls_cert_add_reply_e8d4e804")
1122         api.RegisterMessage((*ApplicationTLSKeyAdd)(nil), "application_tls_key_add_5eaf70cd")
1123         api.RegisterMessage((*ApplicationTLSKeyAddReply)(nil), "application_tls_key_add_reply_e8d4e804")
1124         api.RegisterMessage((*SessionEnableDisable)(nil), "session_enable_disable_c264d7bf")
1125         api.RegisterMessage((*SessionEnableDisableReply)(nil), "session_enable_disable_reply_e8d4e804")
1126         api.RegisterMessage((*SessionRuleAddDel)(nil), "session_rule_add_del_e31f9443")
1127         api.RegisterMessage((*SessionRuleAddDelReply)(nil), "session_rule_add_del_reply_e8d4e804")
1128         api.RegisterMessage((*SessionRulesDetails)(nil), "session_rules_details_304b91f0")
1129         api.RegisterMessage((*SessionRulesDump)(nil), "session_rules_dump_51077d14")
1130 }
1131
1132 // Messages returns list of all messages in this module.
1133 func AllMessages() []api.Message {
1134         return []api.Message{
1135                 (*AppAddCertKeyPair)(nil),
1136                 (*AppAddCertKeyPairReply)(nil),
1137                 (*AppAttach)(nil),
1138                 (*AppAttachReply)(nil),
1139                 (*AppDelCertKeyPair)(nil),
1140                 (*AppDelCertKeyPairReply)(nil),
1141                 (*AppNamespaceAddDel)(nil),
1142                 (*AppNamespaceAddDelReply)(nil),
1143                 (*AppWorkerAddDel)(nil),
1144                 (*AppWorkerAddDelReply)(nil),
1145                 (*ApplicationDetach)(nil),
1146                 (*ApplicationDetachReply)(nil),
1147                 (*ApplicationTLSCertAdd)(nil),
1148                 (*ApplicationTLSCertAddReply)(nil),
1149                 (*ApplicationTLSKeyAdd)(nil),
1150                 (*ApplicationTLSKeyAddReply)(nil),
1151                 (*SessionEnableDisable)(nil),
1152                 (*SessionEnableDisableReply)(nil),
1153                 (*SessionRuleAddDel)(nil),
1154                 (*SessionRuleAddDelReply)(nil),
1155                 (*SessionRulesDetails)(nil),
1156                 (*SessionRulesDump)(nil),
1157         }
1158 }