Update generated binapi to v22.02 & makefile changes
[govpp.git] / internal / testbinapi / binapi2001 / session / session.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.5.0-dev
4 //  VPP:              20.01
5 // source: .vppapi/core/session.api.json
6
7 // Package session contains generated bindings for API file session.api.
8 //
9 // Contents:
10 //  44 messages
11 //
12 package session
13
14 import (
15         api "git.fd.io/govpp.git/api"
16         codec "git.fd.io/govpp.git/codec"
17 )
18
19 // This is a compile-time assertion to ensure that this generated file
20 // is compatible with the GoVPP api package it is being compiled against.
21 // A compilation error at this line likely means your copy of the
22 // GoVPP api package needs to be updated.
23 const _ = api.GoVppAPIPackageIsVersion2
24
25 const (
26         APIFile    = "session"
27         APIVersion = "1.7.0"
28         VersionCrc = 0xdf888b15
29 )
30
31 // AppAddCertKeyPair defines message 'app_add_cert_key_pair'.
32 type AppAddCertKeyPair struct {
33         CertLen    uint16 `binapi:"u16,name=cert_len" json:"cert_len,omitempty"`
34         CertkeyLen uint16 `binapi:"u16,name=certkey_len" json:"-"`
35         Certkey    []byte `binapi:"u8[certkey_len],name=certkey" json:"certkey,omitempty"`
36 }
37
38 func (m *AppAddCertKeyPair) Reset()               { *m = AppAddCertKeyPair{} }
39 func (*AppAddCertKeyPair) GetMessageName() string { return "app_add_cert_key_pair" }
40 func (*AppAddCertKeyPair) GetCrcString() string   { return "02eb8016" }
41 func (*AppAddCertKeyPair) GetMessageType() api.MessageType {
42         return api.RequestMessage
43 }
44
45 func (m *AppAddCertKeyPair) Size() (size int) {
46         if m == nil {
47                 return 0
48         }
49         size += 2                  // m.CertLen
50         size += 2                  // m.CertkeyLen
51         size += 1 * len(m.Certkey) // m.Certkey
52         return size
53 }
54 func (m *AppAddCertKeyPair) Marshal(b []byte) ([]byte, error) {
55         if b == nil {
56                 b = make([]byte, m.Size())
57         }
58         buf := codec.NewBuffer(b)
59         buf.EncodeUint16(m.CertLen)
60         buf.EncodeUint16(uint16(len(m.Certkey)))
61         buf.EncodeBytes(m.Certkey, 0)
62         return buf.Bytes(), nil
63 }
64 func (m *AppAddCertKeyPair) Unmarshal(b []byte) error {
65         buf := codec.NewBuffer(b)
66         m.CertLen = buf.DecodeUint16()
67         m.CertkeyLen = buf.DecodeUint16()
68         m.Certkey = make([]byte, m.CertkeyLen)
69         copy(m.Certkey, buf.DecodeBytes(len(m.Certkey)))
70         return nil
71 }
72
73 // AppAddCertKeyPairReply defines message 'app_add_cert_key_pair_reply'.
74 type AppAddCertKeyPairReply struct {
75         Retval int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
76         Index  uint32 `binapi:"u32,name=index" json:"index,omitempty"`
77 }
78
79 func (m *AppAddCertKeyPairReply) Reset()               { *m = AppAddCertKeyPairReply{} }
80 func (*AppAddCertKeyPairReply) GetMessageName() string { return "app_add_cert_key_pair_reply" }
81 func (*AppAddCertKeyPairReply) GetCrcString() string   { return "b42958d0" }
82 func (*AppAddCertKeyPairReply) GetMessageType() api.MessageType {
83         return api.ReplyMessage
84 }
85
86 func (m *AppAddCertKeyPairReply) Size() (size int) {
87         if m == nil {
88                 return 0
89         }
90         size += 4 // m.Retval
91         size += 4 // m.Index
92         return size
93 }
94 func (m *AppAddCertKeyPairReply) Marshal(b []byte) ([]byte, error) {
95         if b == nil {
96                 b = make([]byte, m.Size())
97         }
98         buf := codec.NewBuffer(b)
99         buf.EncodeInt32(m.Retval)
100         buf.EncodeUint32(m.Index)
101         return buf.Bytes(), nil
102 }
103 func (m *AppAddCertKeyPairReply) Unmarshal(b []byte) error {
104         buf := codec.NewBuffer(b)
105         m.Retval = buf.DecodeInt32()
106         m.Index = buf.DecodeUint32()
107         return nil
108 }
109
110 // AppAttach defines message 'app_attach'.
111 type AppAttach struct {
112         Options        []uint64 `binapi:"u64[16],name=options" json:"options,omitempty"`
113         NamespaceIDLen uint8    `binapi:"u8,name=namespace_id_len" json:"namespace_id_len,omitempty"`
114         NamespaceID    []byte   `binapi:"u8[64],name=namespace_id" json:"namespace_id,omitempty"`
115 }
116
117 func (m *AppAttach) Reset()               { *m = AppAttach{} }
118 func (*AppAttach) GetMessageName() string { return "app_attach" }
119 func (*AppAttach) GetCrcString() string   { return "ed08f4bd" }
120 func (*AppAttach) GetMessageType() api.MessageType {
121         return api.RequestMessage
122 }
123
124 func (m *AppAttach) Size() (size int) {
125         if m == nil {
126                 return 0
127         }
128         size += 8 * 16 // m.Options
129         size += 1      // m.NamespaceIDLen
130         size += 1 * 64 // m.NamespaceID
131         return size
132 }
133 func (m *AppAttach) Marshal(b []byte) ([]byte, error) {
134         if b == nil {
135                 b = make([]byte, m.Size())
136         }
137         buf := codec.NewBuffer(b)
138         for i := 0; i < 16; i++ {
139                 var x uint64
140                 if i < len(m.Options) {
141                         x = uint64(m.Options[i])
142                 }
143                 buf.EncodeUint64(x)
144         }
145         buf.EncodeUint8(m.NamespaceIDLen)
146         buf.EncodeBytes(m.NamespaceID, 64)
147         return buf.Bytes(), nil
148 }
149 func (m *AppAttach) Unmarshal(b []byte) error {
150         buf := codec.NewBuffer(b)
151         m.Options = make([]uint64, 16)
152         for i := 0; i < len(m.Options); i++ {
153                 m.Options[i] = buf.DecodeUint64()
154         }
155         m.NamespaceIDLen = buf.DecodeUint8()
156         m.NamespaceID = make([]byte, 64)
157         copy(m.NamespaceID, buf.DecodeBytes(len(m.NamespaceID)))
158         return nil
159 }
160
161 // AppAttachReply defines message 'app_attach_reply'.
162 type AppAttachReply struct {
163         Retval            int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
164         AppMq             uint64 `binapi:"u64,name=app_mq" json:"app_mq,omitempty"`
165         VppCtrlMq         uint64 `binapi:"u64,name=vpp_ctrl_mq" json:"vpp_ctrl_mq,omitempty"`
166         VppCtrlMqThread   uint8  `binapi:"u8,name=vpp_ctrl_mq_thread" json:"vpp_ctrl_mq_thread,omitempty"`
167         AppIndex          uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
168         NFds              uint8  `binapi:"u8,name=n_fds" json:"n_fds,omitempty"`
169         FdFlags           uint8  `binapi:"u8,name=fd_flags" json:"fd_flags,omitempty"`
170         SegmentSize       uint32 `binapi:"u32,name=segment_size" json:"segment_size,omitempty"`
171         SegmentNameLength uint8  `binapi:"u8,name=segment_name_length" json:"segment_name_length,omitempty"`
172         SegmentName       []byte `binapi:"u8[128],name=segment_name" json:"segment_name,omitempty"`
173         SegmentHandle     uint64 `binapi:"u64,name=segment_handle" json:"segment_handle,omitempty"`
174 }
175
176 func (m *AppAttachReply) Reset()               { *m = AppAttachReply{} }
177 func (*AppAttachReply) GetMessageName() string { return "app_attach_reply" }
178 func (*AppAttachReply) GetCrcString() string   { return "0112f647" }
179 func (*AppAttachReply) GetMessageType() api.MessageType {
180         return api.ReplyMessage
181 }
182
183 func (m *AppAttachReply) Size() (size int) {
184         if m == nil {
185                 return 0
186         }
187         size += 4       // m.Retval
188         size += 8       // m.AppMq
189         size += 8       // m.VppCtrlMq
190         size += 1       // m.VppCtrlMqThread
191         size += 4       // m.AppIndex
192         size += 1       // m.NFds
193         size += 1       // m.FdFlags
194         size += 4       // m.SegmentSize
195         size += 1       // m.SegmentNameLength
196         size += 1 * 128 // m.SegmentName
197         size += 8       // m.SegmentHandle
198         return size
199 }
200 func (m *AppAttachReply) Marshal(b []byte) ([]byte, error) {
201         if b == nil {
202                 b = make([]byte, m.Size())
203         }
204         buf := codec.NewBuffer(b)
205         buf.EncodeInt32(m.Retval)
206         buf.EncodeUint64(m.AppMq)
207         buf.EncodeUint64(m.VppCtrlMq)
208         buf.EncodeUint8(m.VppCtrlMqThread)
209         buf.EncodeUint32(m.AppIndex)
210         buf.EncodeUint8(m.NFds)
211         buf.EncodeUint8(m.FdFlags)
212         buf.EncodeUint32(m.SegmentSize)
213         buf.EncodeUint8(m.SegmentNameLength)
214         buf.EncodeBytes(m.SegmentName, 128)
215         buf.EncodeUint64(m.SegmentHandle)
216         return buf.Bytes(), nil
217 }
218 func (m *AppAttachReply) Unmarshal(b []byte) error {
219         buf := codec.NewBuffer(b)
220         m.Retval = buf.DecodeInt32()
221         m.AppMq = buf.DecodeUint64()
222         m.VppCtrlMq = buf.DecodeUint64()
223         m.VppCtrlMqThread = buf.DecodeUint8()
224         m.AppIndex = buf.DecodeUint32()
225         m.NFds = buf.DecodeUint8()
226         m.FdFlags = buf.DecodeUint8()
227         m.SegmentSize = buf.DecodeUint32()
228         m.SegmentNameLength = buf.DecodeUint8()
229         m.SegmentName = make([]byte, 128)
230         copy(m.SegmentName, buf.DecodeBytes(len(m.SegmentName)))
231         m.SegmentHandle = buf.DecodeUint64()
232         return nil
233 }
234
235 // AppCutThroughRegistrationAdd defines message 'app_cut_through_registration_add'.
236 type AppCutThroughRegistrationAdd struct {
237         EvtQAddress     uint64 `binapi:"u64,name=evt_q_address" json:"evt_q_address,omitempty"`
238         PeerEvtQAddress uint64 `binapi:"u64,name=peer_evt_q_address" json:"peer_evt_q_address,omitempty"`
239         WrkIndex        uint32 `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
240         NFds            uint8  `binapi:"u8,name=n_fds" json:"n_fds,omitempty"`
241         FdFlags         uint8  `binapi:"u8,name=fd_flags" json:"fd_flags,omitempty"`
242 }
243
244 func (m *AppCutThroughRegistrationAdd) Reset() { *m = AppCutThroughRegistrationAdd{} }
245 func (*AppCutThroughRegistrationAdd) GetMessageName() string {
246         return "app_cut_through_registration_add"
247 }
248 func (*AppCutThroughRegistrationAdd) GetCrcString() string { return "6d73b1b9" }
249 func (*AppCutThroughRegistrationAdd) GetMessageType() api.MessageType {
250         return api.RequestMessage
251 }
252
253 func (m *AppCutThroughRegistrationAdd) Size() (size int) {
254         if m == nil {
255                 return 0
256         }
257         size += 8 // m.EvtQAddress
258         size += 8 // m.PeerEvtQAddress
259         size += 4 // m.WrkIndex
260         size += 1 // m.NFds
261         size += 1 // m.FdFlags
262         return size
263 }
264 func (m *AppCutThroughRegistrationAdd) Marshal(b []byte) ([]byte, error) {
265         if b == nil {
266                 b = make([]byte, m.Size())
267         }
268         buf := codec.NewBuffer(b)
269         buf.EncodeUint64(m.EvtQAddress)
270         buf.EncodeUint64(m.PeerEvtQAddress)
271         buf.EncodeUint32(m.WrkIndex)
272         buf.EncodeUint8(m.NFds)
273         buf.EncodeUint8(m.FdFlags)
274         return buf.Bytes(), nil
275 }
276 func (m *AppCutThroughRegistrationAdd) Unmarshal(b []byte) error {
277         buf := codec.NewBuffer(b)
278         m.EvtQAddress = buf.DecodeUint64()
279         m.PeerEvtQAddress = buf.DecodeUint64()
280         m.WrkIndex = buf.DecodeUint32()
281         m.NFds = buf.DecodeUint8()
282         m.FdFlags = buf.DecodeUint8()
283         return nil
284 }
285
286 // AppCutThroughRegistrationAddReply defines message 'app_cut_through_registration_add_reply'.
287 type AppCutThroughRegistrationAddReply struct {
288         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
289 }
290
291 func (m *AppCutThroughRegistrationAddReply) Reset() { *m = AppCutThroughRegistrationAddReply{} }
292 func (*AppCutThroughRegistrationAddReply) GetMessageName() string {
293         return "app_cut_through_registration_add_reply"
294 }
295 func (*AppCutThroughRegistrationAddReply) GetCrcString() string { return "e8d4e804" }
296 func (*AppCutThroughRegistrationAddReply) GetMessageType() api.MessageType {
297         return api.ReplyMessage
298 }
299
300 func (m *AppCutThroughRegistrationAddReply) Size() (size int) {
301         if m == nil {
302                 return 0
303         }
304         size += 4 // m.Retval
305         return size
306 }
307 func (m *AppCutThroughRegistrationAddReply) Marshal(b []byte) ([]byte, error) {
308         if b == nil {
309                 b = make([]byte, m.Size())
310         }
311         buf := codec.NewBuffer(b)
312         buf.EncodeInt32(m.Retval)
313         return buf.Bytes(), nil
314 }
315 func (m *AppCutThroughRegistrationAddReply) Unmarshal(b []byte) error {
316         buf := codec.NewBuffer(b)
317         m.Retval = buf.DecodeInt32()
318         return nil
319 }
320
321 // AppDelCertKeyPair defines message 'app_del_cert_key_pair'.
322 type AppDelCertKeyPair struct {
323         Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
324 }
325
326 func (m *AppDelCertKeyPair) Reset()               { *m = AppDelCertKeyPair{} }
327 func (*AppDelCertKeyPair) GetMessageName() string { return "app_del_cert_key_pair" }
328 func (*AppDelCertKeyPair) GetCrcString() string   { return "8ac76db6" }
329 func (*AppDelCertKeyPair) GetMessageType() api.MessageType {
330         return api.RequestMessage
331 }
332
333 func (m *AppDelCertKeyPair) Size() (size int) {
334         if m == nil {
335                 return 0
336         }
337         size += 4 // m.Index
338         return size
339 }
340 func (m *AppDelCertKeyPair) Marshal(b []byte) ([]byte, error) {
341         if b == nil {
342                 b = make([]byte, m.Size())
343         }
344         buf := codec.NewBuffer(b)
345         buf.EncodeUint32(m.Index)
346         return buf.Bytes(), nil
347 }
348 func (m *AppDelCertKeyPair) Unmarshal(b []byte) error {
349         buf := codec.NewBuffer(b)
350         m.Index = buf.DecodeUint32()
351         return nil
352 }
353
354 // AppDelCertKeyPairReply defines message 'app_del_cert_key_pair_reply'.
355 type AppDelCertKeyPairReply struct {
356         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
357 }
358
359 func (m *AppDelCertKeyPairReply) Reset()               { *m = AppDelCertKeyPairReply{} }
360 func (*AppDelCertKeyPairReply) GetMessageName() string { return "app_del_cert_key_pair_reply" }
361 func (*AppDelCertKeyPairReply) GetCrcString() string   { return "e8d4e804" }
362 func (*AppDelCertKeyPairReply) GetMessageType() api.MessageType {
363         return api.ReplyMessage
364 }
365
366 func (m *AppDelCertKeyPairReply) Size() (size int) {
367         if m == nil {
368                 return 0
369         }
370         size += 4 // m.Retval
371         return size
372 }
373 func (m *AppDelCertKeyPairReply) Marshal(b []byte) ([]byte, error) {
374         if b == nil {
375                 b = make([]byte, m.Size())
376         }
377         buf := codec.NewBuffer(b)
378         buf.EncodeInt32(m.Retval)
379         return buf.Bytes(), nil
380 }
381 func (m *AppDelCertKeyPairReply) Unmarshal(b []byte) error {
382         buf := codec.NewBuffer(b)
383         m.Retval = buf.DecodeInt32()
384         return nil
385 }
386
387 // AppNamespaceAddDel defines message 'app_namespace_add_del'.
388 type AppNamespaceAddDel struct {
389         Secret         uint64 `binapi:"u64,name=secret" json:"secret,omitempty"`
390         SwIfIndex      uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
391         IP4FibID       uint32 `binapi:"u32,name=ip4_fib_id" json:"ip4_fib_id,omitempty"`
392         IP6FibID       uint32 `binapi:"u32,name=ip6_fib_id" json:"ip6_fib_id,omitempty"`
393         NamespaceIDLen uint8  `binapi:"u8,name=namespace_id_len" json:"namespace_id_len,omitempty"`
394         NamespaceID    []byte `binapi:"u8[64],name=namespace_id" json:"namespace_id,omitempty"`
395 }
396
397 func (m *AppNamespaceAddDel) Reset()               { *m = AppNamespaceAddDel{} }
398 func (*AppNamespaceAddDel) GetMessageName() string { return "app_namespace_add_del" }
399 func (*AppNamespaceAddDel) GetCrcString() string   { return "dd074c65" }
400 func (*AppNamespaceAddDel) GetMessageType() api.MessageType {
401         return api.RequestMessage
402 }
403
404 func (m *AppNamespaceAddDel) Size() (size int) {
405         if m == nil {
406                 return 0
407         }
408         size += 8      // m.Secret
409         size += 4      // m.SwIfIndex
410         size += 4      // m.IP4FibID
411         size += 4      // m.IP6FibID
412         size += 1      // m.NamespaceIDLen
413         size += 1 * 64 // m.NamespaceID
414         return size
415 }
416 func (m *AppNamespaceAddDel) Marshal(b []byte) ([]byte, error) {
417         if b == nil {
418                 b = make([]byte, m.Size())
419         }
420         buf := codec.NewBuffer(b)
421         buf.EncodeUint64(m.Secret)
422         buf.EncodeUint32(m.SwIfIndex)
423         buf.EncodeUint32(m.IP4FibID)
424         buf.EncodeUint32(m.IP6FibID)
425         buf.EncodeUint8(m.NamespaceIDLen)
426         buf.EncodeBytes(m.NamespaceID, 64)
427         return buf.Bytes(), nil
428 }
429 func (m *AppNamespaceAddDel) Unmarshal(b []byte) error {
430         buf := codec.NewBuffer(b)
431         m.Secret = buf.DecodeUint64()
432         m.SwIfIndex = buf.DecodeUint32()
433         m.IP4FibID = buf.DecodeUint32()
434         m.IP6FibID = buf.DecodeUint32()
435         m.NamespaceIDLen = buf.DecodeUint8()
436         m.NamespaceID = make([]byte, 64)
437         copy(m.NamespaceID, buf.DecodeBytes(len(m.NamespaceID)))
438         return nil
439 }
440
441 // AppNamespaceAddDelReply defines message 'app_namespace_add_del_reply'.
442 type AppNamespaceAddDelReply struct {
443         Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
444         AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
445 }
446
447 func (m *AppNamespaceAddDelReply) Reset()               { *m = AppNamespaceAddDelReply{} }
448 func (*AppNamespaceAddDelReply) GetMessageName() string { return "app_namespace_add_del_reply" }
449 func (*AppNamespaceAddDelReply) GetCrcString() string   { return "85137120" }
450 func (*AppNamespaceAddDelReply) GetMessageType() api.MessageType {
451         return api.ReplyMessage
452 }
453
454 func (m *AppNamespaceAddDelReply) Size() (size int) {
455         if m == nil {
456                 return 0
457         }
458         size += 4 // m.Retval
459         size += 4 // m.AppnsIndex
460         return size
461 }
462 func (m *AppNamespaceAddDelReply) Marshal(b []byte) ([]byte, error) {
463         if b == nil {
464                 b = make([]byte, m.Size())
465         }
466         buf := codec.NewBuffer(b)
467         buf.EncodeInt32(m.Retval)
468         buf.EncodeUint32(m.AppnsIndex)
469         return buf.Bytes(), nil
470 }
471 func (m *AppNamespaceAddDelReply) Unmarshal(b []byte) error {
472         buf := codec.NewBuffer(b)
473         m.Retval = buf.DecodeInt32()
474         m.AppnsIndex = buf.DecodeUint32()
475         return nil
476 }
477
478 // AppWorkerAddDel defines message 'app_worker_add_del'.
479 type AppWorkerAddDel struct {
480         AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
481         WrkIndex uint32 `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
482         IsAdd    uint8  `binapi:"u8,name=is_add" json:"is_add,omitempty"`
483 }
484
485 func (m *AppWorkerAddDel) Reset()               { *m = AppWorkerAddDel{} }
486 func (*AppWorkerAddDel) GetMessageName() string { return "app_worker_add_del" }
487 func (*AppWorkerAddDel) GetCrcString() string   { return "6d2b2279" }
488 func (*AppWorkerAddDel) GetMessageType() api.MessageType {
489         return api.RequestMessage
490 }
491
492 func (m *AppWorkerAddDel) Size() (size int) {
493         if m == nil {
494                 return 0
495         }
496         size += 4 // m.AppIndex
497         size += 4 // m.WrkIndex
498         size += 1 // m.IsAdd
499         return size
500 }
501 func (m *AppWorkerAddDel) Marshal(b []byte) ([]byte, error) {
502         if b == nil {
503                 b = make([]byte, m.Size())
504         }
505         buf := codec.NewBuffer(b)
506         buf.EncodeUint32(m.AppIndex)
507         buf.EncodeUint32(m.WrkIndex)
508         buf.EncodeUint8(m.IsAdd)
509         return buf.Bytes(), nil
510 }
511 func (m *AppWorkerAddDel) Unmarshal(b []byte) error {
512         buf := codec.NewBuffer(b)
513         m.AppIndex = buf.DecodeUint32()
514         m.WrkIndex = buf.DecodeUint32()
515         m.IsAdd = buf.DecodeUint8()
516         return nil
517 }
518
519 // AppWorkerAddDelReply defines message 'app_worker_add_del_reply'.
520 type AppWorkerAddDelReply struct {
521         Retval               int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
522         WrkIndex             uint32 `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
523         AppEventQueueAddress uint64 `binapi:"u64,name=app_event_queue_address" json:"app_event_queue_address,omitempty"`
524         NFds                 uint8  `binapi:"u8,name=n_fds" json:"n_fds,omitempty"`
525         FdFlags              uint8  `binapi:"u8,name=fd_flags" json:"fd_flags,omitempty"`
526         SegmentNameLength    uint8  `binapi:"u8,name=segment_name_length" json:"segment_name_length,omitempty"`
527         SegmentName          []byte `binapi:"u8[128],name=segment_name" json:"segment_name,omitempty"`
528         SegmentHandle        uint64 `binapi:"u64,name=segment_handle" json:"segment_handle,omitempty"`
529         IsAdd                uint8  `binapi:"u8,name=is_add" json:"is_add,omitempty"`
530 }
531
532 func (m *AppWorkerAddDelReply) Reset()               { *m = AppWorkerAddDelReply{} }
533 func (*AppWorkerAddDelReply) GetMessageName() string { return "app_worker_add_del_reply" }
534 func (*AppWorkerAddDelReply) GetCrcString() string   { return "56b21abc" }
535 func (*AppWorkerAddDelReply) GetMessageType() api.MessageType {
536         return api.ReplyMessage
537 }
538
539 func (m *AppWorkerAddDelReply) Size() (size int) {
540         if m == nil {
541                 return 0
542         }
543         size += 4       // m.Retval
544         size += 4       // m.WrkIndex
545         size += 8       // m.AppEventQueueAddress
546         size += 1       // m.NFds
547         size += 1       // m.FdFlags
548         size += 1       // m.SegmentNameLength
549         size += 1 * 128 // m.SegmentName
550         size += 8       // m.SegmentHandle
551         size += 1       // m.IsAdd
552         return size
553 }
554 func (m *AppWorkerAddDelReply) Marshal(b []byte) ([]byte, error) {
555         if b == nil {
556                 b = make([]byte, m.Size())
557         }
558         buf := codec.NewBuffer(b)
559         buf.EncodeInt32(m.Retval)
560         buf.EncodeUint32(m.WrkIndex)
561         buf.EncodeUint64(m.AppEventQueueAddress)
562         buf.EncodeUint8(m.NFds)
563         buf.EncodeUint8(m.FdFlags)
564         buf.EncodeUint8(m.SegmentNameLength)
565         buf.EncodeBytes(m.SegmentName, 128)
566         buf.EncodeUint64(m.SegmentHandle)
567         buf.EncodeUint8(m.IsAdd)
568         return buf.Bytes(), nil
569 }
570 func (m *AppWorkerAddDelReply) Unmarshal(b []byte) error {
571         buf := codec.NewBuffer(b)
572         m.Retval = buf.DecodeInt32()
573         m.WrkIndex = buf.DecodeUint32()
574         m.AppEventQueueAddress = buf.DecodeUint64()
575         m.NFds = buf.DecodeUint8()
576         m.FdFlags = buf.DecodeUint8()
577         m.SegmentNameLength = buf.DecodeUint8()
578         m.SegmentName = make([]byte, 128)
579         copy(m.SegmentName, buf.DecodeBytes(len(m.SegmentName)))
580         m.SegmentHandle = buf.DecodeUint64()
581         m.IsAdd = buf.DecodeUint8()
582         return nil
583 }
584
585 // ApplicationAttach defines message 'application_attach'.
586 type ApplicationAttach struct {
587         InitialSegmentSize uint32   `binapi:"u32,name=initial_segment_size" json:"initial_segment_size,omitempty"`
588         Options            []uint64 `binapi:"u64[16],name=options" json:"options,omitempty"`
589         NamespaceIDLen     uint8    `binapi:"u8,name=namespace_id_len" json:"namespace_id_len,omitempty"`
590         NamespaceID        []byte   `binapi:"u8[64],name=namespace_id" json:"namespace_id,omitempty"`
591 }
592
593 func (m *ApplicationAttach) Reset()               { *m = ApplicationAttach{} }
594 func (*ApplicationAttach) GetMessageName() string { return "application_attach" }
595 func (*ApplicationAttach) GetCrcString() string   { return "81d4f974" }
596 func (*ApplicationAttach) GetMessageType() api.MessageType {
597         return api.RequestMessage
598 }
599
600 func (m *ApplicationAttach) Size() (size int) {
601         if m == nil {
602                 return 0
603         }
604         size += 4      // m.InitialSegmentSize
605         size += 8 * 16 // m.Options
606         size += 1      // m.NamespaceIDLen
607         size += 1 * 64 // m.NamespaceID
608         return size
609 }
610 func (m *ApplicationAttach) Marshal(b []byte) ([]byte, error) {
611         if b == nil {
612                 b = make([]byte, m.Size())
613         }
614         buf := codec.NewBuffer(b)
615         buf.EncodeUint32(m.InitialSegmentSize)
616         for i := 0; i < 16; i++ {
617                 var x uint64
618                 if i < len(m.Options) {
619                         x = uint64(m.Options[i])
620                 }
621                 buf.EncodeUint64(x)
622         }
623         buf.EncodeUint8(m.NamespaceIDLen)
624         buf.EncodeBytes(m.NamespaceID, 64)
625         return buf.Bytes(), nil
626 }
627 func (m *ApplicationAttach) Unmarshal(b []byte) error {
628         buf := codec.NewBuffer(b)
629         m.InitialSegmentSize = buf.DecodeUint32()
630         m.Options = make([]uint64, 16)
631         for i := 0; i < len(m.Options); i++ {
632                 m.Options[i] = buf.DecodeUint64()
633         }
634         m.NamespaceIDLen = buf.DecodeUint8()
635         m.NamespaceID = make([]byte, 64)
636         copy(m.NamespaceID, buf.DecodeBytes(len(m.NamespaceID)))
637         return nil
638 }
639
640 // ApplicationAttachReply defines message 'application_attach_reply'.
641 type ApplicationAttachReply struct {
642         Retval               int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
643         AppEventQueueAddress uint64 `binapi:"u64,name=app_event_queue_address" json:"app_event_queue_address,omitempty"`
644         NFds                 uint8  `binapi:"u8,name=n_fds" json:"n_fds,omitempty"`
645         FdFlags              uint8  `binapi:"u8,name=fd_flags" json:"fd_flags,omitempty"`
646         SegmentSize          uint32 `binapi:"u32,name=segment_size" json:"segment_size,omitempty"`
647         SegmentNameLength    uint8  `binapi:"u8,name=segment_name_length" json:"segment_name_length,omitempty"`
648         SegmentName          []byte `binapi:"u8[128],name=segment_name" json:"segment_name,omitempty"`
649         AppIndex             uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
650         SegmentHandle        uint64 `binapi:"u64,name=segment_handle" json:"segment_handle,omitempty"`
651 }
652
653 func (m *ApplicationAttachReply) Reset()               { *m = ApplicationAttachReply{} }
654 func (*ApplicationAttachReply) GetMessageName() string { return "application_attach_reply" }
655 func (*ApplicationAttachReply) GetCrcString() string   { return "581866e8" }
656 func (*ApplicationAttachReply) GetMessageType() api.MessageType {
657         return api.ReplyMessage
658 }
659
660 func (m *ApplicationAttachReply) Size() (size int) {
661         if m == nil {
662                 return 0
663         }
664         size += 4       // m.Retval
665         size += 8       // m.AppEventQueueAddress
666         size += 1       // m.NFds
667         size += 1       // m.FdFlags
668         size += 4       // m.SegmentSize
669         size += 1       // m.SegmentNameLength
670         size += 1 * 128 // m.SegmentName
671         size += 4       // m.AppIndex
672         size += 8       // m.SegmentHandle
673         return size
674 }
675 func (m *ApplicationAttachReply) Marshal(b []byte) ([]byte, error) {
676         if b == nil {
677                 b = make([]byte, m.Size())
678         }
679         buf := codec.NewBuffer(b)
680         buf.EncodeInt32(m.Retval)
681         buf.EncodeUint64(m.AppEventQueueAddress)
682         buf.EncodeUint8(m.NFds)
683         buf.EncodeUint8(m.FdFlags)
684         buf.EncodeUint32(m.SegmentSize)
685         buf.EncodeUint8(m.SegmentNameLength)
686         buf.EncodeBytes(m.SegmentName, 128)
687         buf.EncodeUint32(m.AppIndex)
688         buf.EncodeUint64(m.SegmentHandle)
689         return buf.Bytes(), nil
690 }
691 func (m *ApplicationAttachReply) Unmarshal(b []byte) error {
692         buf := codec.NewBuffer(b)
693         m.Retval = buf.DecodeInt32()
694         m.AppEventQueueAddress = buf.DecodeUint64()
695         m.NFds = buf.DecodeUint8()
696         m.FdFlags = buf.DecodeUint8()
697         m.SegmentSize = buf.DecodeUint32()
698         m.SegmentNameLength = buf.DecodeUint8()
699         m.SegmentName = make([]byte, 128)
700         copy(m.SegmentName, buf.DecodeBytes(len(m.SegmentName)))
701         m.AppIndex = buf.DecodeUint32()
702         m.SegmentHandle = buf.DecodeUint64()
703         return nil
704 }
705
706 // ApplicationDetach defines message 'application_detach'.
707 type ApplicationDetach struct{}
708
709 func (m *ApplicationDetach) Reset()               { *m = ApplicationDetach{} }
710 func (*ApplicationDetach) GetMessageName() string { return "application_detach" }
711 func (*ApplicationDetach) GetCrcString() string   { return "51077d14" }
712 func (*ApplicationDetach) GetMessageType() api.MessageType {
713         return api.RequestMessage
714 }
715
716 func (m *ApplicationDetach) Size() (size int) {
717         if m == nil {
718                 return 0
719         }
720         return size
721 }
722 func (m *ApplicationDetach) Marshal(b []byte) ([]byte, error) {
723         if b == nil {
724                 b = make([]byte, m.Size())
725         }
726         buf := codec.NewBuffer(b)
727         return buf.Bytes(), nil
728 }
729 func (m *ApplicationDetach) Unmarshal(b []byte) error {
730         return nil
731 }
732
733 // ApplicationDetachReply defines message 'application_detach_reply'.
734 type ApplicationDetachReply struct {
735         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
736 }
737
738 func (m *ApplicationDetachReply) Reset()               { *m = ApplicationDetachReply{} }
739 func (*ApplicationDetachReply) GetMessageName() string { return "application_detach_reply" }
740 func (*ApplicationDetachReply) GetCrcString() string   { return "e8d4e804" }
741 func (*ApplicationDetachReply) GetMessageType() api.MessageType {
742         return api.ReplyMessage
743 }
744
745 func (m *ApplicationDetachReply) Size() (size int) {
746         if m == nil {
747                 return 0
748         }
749         size += 4 // m.Retval
750         return size
751 }
752 func (m *ApplicationDetachReply) Marshal(b []byte) ([]byte, error) {
753         if b == nil {
754                 b = make([]byte, m.Size())
755         }
756         buf := codec.NewBuffer(b)
757         buf.EncodeInt32(m.Retval)
758         return buf.Bytes(), nil
759 }
760 func (m *ApplicationDetachReply) Unmarshal(b []byte) error {
761         buf := codec.NewBuffer(b)
762         m.Retval = buf.DecodeInt32()
763         return nil
764 }
765
766 // ApplicationTLSCertAdd defines message 'application_tls_cert_add'.
767 type ApplicationTLSCertAdd struct {
768         AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
769         CertLen  uint16 `binapi:"u16,name=cert_len" json:"-"`
770         Cert     []byte `binapi:"u8[cert_len],name=cert" json:"cert,omitempty"`
771 }
772
773 func (m *ApplicationTLSCertAdd) Reset()               { *m = ApplicationTLSCertAdd{} }
774 func (*ApplicationTLSCertAdd) GetMessageName() string { return "application_tls_cert_add" }
775 func (*ApplicationTLSCertAdd) GetCrcString() string   { return "3f5cfe45" }
776 func (*ApplicationTLSCertAdd) GetMessageType() api.MessageType {
777         return api.RequestMessage
778 }
779
780 func (m *ApplicationTLSCertAdd) Size() (size int) {
781         if m == nil {
782                 return 0
783         }
784         size += 4               // m.AppIndex
785         size += 2               // m.CertLen
786         size += 1 * len(m.Cert) // m.Cert
787         return size
788 }
789 func (m *ApplicationTLSCertAdd) Marshal(b []byte) ([]byte, error) {
790         if b == nil {
791                 b = make([]byte, m.Size())
792         }
793         buf := codec.NewBuffer(b)
794         buf.EncodeUint32(m.AppIndex)
795         buf.EncodeUint16(uint16(len(m.Cert)))
796         buf.EncodeBytes(m.Cert, 0)
797         return buf.Bytes(), nil
798 }
799 func (m *ApplicationTLSCertAdd) Unmarshal(b []byte) error {
800         buf := codec.NewBuffer(b)
801         m.AppIndex = buf.DecodeUint32()
802         m.CertLen = buf.DecodeUint16()
803         m.Cert = make([]byte, m.CertLen)
804         copy(m.Cert, buf.DecodeBytes(len(m.Cert)))
805         return nil
806 }
807
808 // ApplicationTLSCertAddReply defines message 'application_tls_cert_add_reply'.
809 type ApplicationTLSCertAddReply struct {
810         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
811 }
812
813 func (m *ApplicationTLSCertAddReply) Reset()               { *m = ApplicationTLSCertAddReply{} }
814 func (*ApplicationTLSCertAddReply) GetMessageName() string { return "application_tls_cert_add_reply" }
815 func (*ApplicationTLSCertAddReply) GetCrcString() string   { return "e8d4e804" }
816 func (*ApplicationTLSCertAddReply) GetMessageType() api.MessageType {
817         return api.ReplyMessage
818 }
819
820 func (m *ApplicationTLSCertAddReply) Size() (size int) {
821         if m == nil {
822                 return 0
823         }
824         size += 4 // m.Retval
825         return size
826 }
827 func (m *ApplicationTLSCertAddReply) Marshal(b []byte) ([]byte, error) {
828         if b == nil {
829                 b = make([]byte, m.Size())
830         }
831         buf := codec.NewBuffer(b)
832         buf.EncodeInt32(m.Retval)
833         return buf.Bytes(), nil
834 }
835 func (m *ApplicationTLSCertAddReply) Unmarshal(b []byte) error {
836         buf := codec.NewBuffer(b)
837         m.Retval = buf.DecodeInt32()
838         return nil
839 }
840
841 // ApplicationTLSKeyAdd defines message 'application_tls_key_add'.
842 type ApplicationTLSKeyAdd struct {
843         AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
844         KeyLen   uint16 `binapi:"u16,name=key_len" json:"-"`
845         Key      []byte `binapi:"u8[key_len],name=key" json:"key,omitempty"`
846 }
847
848 func (m *ApplicationTLSKeyAdd) Reset()               { *m = ApplicationTLSKeyAdd{} }
849 func (*ApplicationTLSKeyAdd) GetMessageName() string { return "application_tls_key_add" }
850 func (*ApplicationTLSKeyAdd) GetCrcString() string   { return "5eaf70cd" }
851 func (*ApplicationTLSKeyAdd) GetMessageType() api.MessageType {
852         return api.RequestMessage
853 }
854
855 func (m *ApplicationTLSKeyAdd) Size() (size int) {
856         if m == nil {
857                 return 0
858         }
859         size += 4              // m.AppIndex
860         size += 2              // m.KeyLen
861         size += 1 * len(m.Key) // m.Key
862         return size
863 }
864 func (m *ApplicationTLSKeyAdd) Marshal(b []byte) ([]byte, error) {
865         if b == nil {
866                 b = make([]byte, m.Size())
867         }
868         buf := codec.NewBuffer(b)
869         buf.EncodeUint32(m.AppIndex)
870         buf.EncodeUint16(uint16(len(m.Key)))
871         buf.EncodeBytes(m.Key, 0)
872         return buf.Bytes(), nil
873 }
874 func (m *ApplicationTLSKeyAdd) Unmarshal(b []byte) error {
875         buf := codec.NewBuffer(b)
876         m.AppIndex = buf.DecodeUint32()
877         m.KeyLen = buf.DecodeUint16()
878         m.Key = make([]byte, m.KeyLen)
879         copy(m.Key, buf.DecodeBytes(len(m.Key)))
880         return nil
881 }
882
883 // ApplicationTLSKeyAddReply defines message 'application_tls_key_add_reply'.
884 type ApplicationTLSKeyAddReply struct {
885         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
886 }
887
888 func (m *ApplicationTLSKeyAddReply) Reset()               { *m = ApplicationTLSKeyAddReply{} }
889 func (*ApplicationTLSKeyAddReply) GetMessageName() string { return "application_tls_key_add_reply" }
890 func (*ApplicationTLSKeyAddReply) GetCrcString() string   { return "e8d4e804" }
891 func (*ApplicationTLSKeyAddReply) GetMessageType() api.MessageType {
892         return api.ReplyMessage
893 }
894
895 func (m *ApplicationTLSKeyAddReply) Size() (size int) {
896         if m == nil {
897                 return 0
898         }
899         size += 4 // m.Retval
900         return size
901 }
902 func (m *ApplicationTLSKeyAddReply) Marshal(b []byte) ([]byte, error) {
903         if b == nil {
904                 b = make([]byte, m.Size())
905         }
906         buf := codec.NewBuffer(b)
907         buf.EncodeInt32(m.Retval)
908         return buf.Bytes(), nil
909 }
910 func (m *ApplicationTLSKeyAddReply) Unmarshal(b []byte) error {
911         buf := codec.NewBuffer(b)
912         m.Retval = buf.DecodeInt32()
913         return nil
914 }
915
916 // BindSock defines message 'bind_sock'.
917 type BindSock struct {
918         WrkIndex uint32   `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
919         Vrf      uint32   `binapi:"u32,name=vrf" json:"vrf,omitempty"`
920         IsIP4    uint8    `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
921         IP       []byte   `binapi:"u8[16],name=ip" json:"ip,omitempty"`
922         Port     uint16   `binapi:"u16,name=port" json:"port,omitempty"`
923         Proto    uint8    `binapi:"u8,name=proto" json:"proto,omitempty"`
924         Options  []uint64 `binapi:"u64[16],name=options" json:"options,omitempty"`
925 }
926
927 func (m *BindSock) Reset()               { *m = BindSock{} }
928 func (*BindSock) GetMessageName() string { return "bind_sock" }
929 func (*BindSock) GetCrcString() string   { return "0394633f" }
930 func (*BindSock) GetMessageType() api.MessageType {
931         return api.RequestMessage
932 }
933
934 func (m *BindSock) Size() (size int) {
935         if m == nil {
936                 return 0
937         }
938         size += 4      // m.WrkIndex
939         size += 4      // m.Vrf
940         size += 1      // m.IsIP4
941         size += 1 * 16 // m.IP
942         size += 2      // m.Port
943         size += 1      // m.Proto
944         size += 8 * 16 // m.Options
945         return size
946 }
947 func (m *BindSock) Marshal(b []byte) ([]byte, error) {
948         if b == nil {
949                 b = make([]byte, m.Size())
950         }
951         buf := codec.NewBuffer(b)
952         buf.EncodeUint32(m.WrkIndex)
953         buf.EncodeUint32(m.Vrf)
954         buf.EncodeUint8(m.IsIP4)
955         buf.EncodeBytes(m.IP, 16)
956         buf.EncodeUint16(m.Port)
957         buf.EncodeUint8(m.Proto)
958         for i := 0; i < 16; i++ {
959                 var x uint64
960                 if i < len(m.Options) {
961                         x = uint64(m.Options[i])
962                 }
963                 buf.EncodeUint64(x)
964         }
965         return buf.Bytes(), nil
966 }
967 func (m *BindSock) Unmarshal(b []byte) error {
968         buf := codec.NewBuffer(b)
969         m.WrkIndex = buf.DecodeUint32()
970         m.Vrf = buf.DecodeUint32()
971         m.IsIP4 = buf.DecodeUint8()
972         m.IP = make([]byte, 16)
973         copy(m.IP, buf.DecodeBytes(len(m.IP)))
974         m.Port = buf.DecodeUint16()
975         m.Proto = buf.DecodeUint8()
976         m.Options = make([]uint64, 16)
977         for i := 0; i < len(m.Options); i++ {
978                 m.Options[i] = buf.DecodeUint64()
979         }
980         return nil
981 }
982
983 // BindSockReply defines message 'bind_sock_reply'.
984 type BindSockReply struct {
985         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
986 }
987
988 func (m *BindSockReply) Reset()               { *m = BindSockReply{} }
989 func (*BindSockReply) GetMessageName() string { return "bind_sock_reply" }
990 func (*BindSockReply) GetCrcString() string   { return "e8d4e804" }
991 func (*BindSockReply) GetMessageType() api.MessageType {
992         return api.ReplyMessage
993 }
994
995 func (m *BindSockReply) Size() (size int) {
996         if m == nil {
997                 return 0
998         }
999         size += 4 // m.Retval
1000         return size
1001 }
1002 func (m *BindSockReply) Marshal(b []byte) ([]byte, error) {
1003         if b == nil {
1004                 b = make([]byte, m.Size())
1005         }
1006         buf := codec.NewBuffer(b)
1007         buf.EncodeInt32(m.Retval)
1008         return buf.Bytes(), nil
1009 }
1010 func (m *BindSockReply) Unmarshal(b []byte) error {
1011         buf := codec.NewBuffer(b)
1012         m.Retval = buf.DecodeInt32()
1013         return nil
1014 }
1015
1016 // BindURI defines message 'bind_uri'.
1017 type BindURI struct {
1018         AcceptCookie uint32 `binapi:"u32,name=accept_cookie" json:"accept_cookie,omitempty"`
1019         URI          []byte `binapi:"u8[128],name=uri" json:"uri,omitempty"`
1020 }
1021
1022 func (m *BindURI) Reset()               { *m = BindURI{} }
1023 func (*BindURI) GetMessageName() string { return "bind_uri" }
1024 func (*BindURI) GetCrcString() string   { return "fae140cb" }
1025 func (*BindURI) GetMessageType() api.MessageType {
1026         return api.RequestMessage
1027 }
1028
1029 func (m *BindURI) Size() (size int) {
1030         if m == nil {
1031                 return 0
1032         }
1033         size += 4       // m.AcceptCookie
1034         size += 1 * 128 // m.URI
1035         return size
1036 }
1037 func (m *BindURI) Marshal(b []byte) ([]byte, error) {
1038         if b == nil {
1039                 b = make([]byte, m.Size())
1040         }
1041         buf := codec.NewBuffer(b)
1042         buf.EncodeUint32(m.AcceptCookie)
1043         buf.EncodeBytes(m.URI, 128)
1044         return buf.Bytes(), nil
1045 }
1046 func (m *BindURI) Unmarshal(b []byte) error {
1047         buf := codec.NewBuffer(b)
1048         m.AcceptCookie = buf.DecodeUint32()
1049         m.URI = make([]byte, 128)
1050         copy(m.URI, buf.DecodeBytes(len(m.URI)))
1051         return nil
1052 }
1053
1054 // BindURIReply defines message 'bind_uri_reply'.
1055 type BindURIReply struct {
1056         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1057 }
1058
1059 func (m *BindURIReply) Reset()               { *m = BindURIReply{} }
1060 func (*BindURIReply) GetMessageName() string { return "bind_uri_reply" }
1061 func (*BindURIReply) GetCrcString() string   { return "e8d4e804" }
1062 func (*BindURIReply) GetMessageType() api.MessageType {
1063         return api.ReplyMessage
1064 }
1065
1066 func (m *BindURIReply) Size() (size int) {
1067         if m == nil {
1068                 return 0
1069         }
1070         size += 4 // m.Retval
1071         return size
1072 }
1073 func (m *BindURIReply) Marshal(b []byte) ([]byte, error) {
1074         if b == nil {
1075                 b = make([]byte, m.Size())
1076         }
1077         buf := codec.NewBuffer(b)
1078         buf.EncodeInt32(m.Retval)
1079         return buf.Bytes(), nil
1080 }
1081 func (m *BindURIReply) Unmarshal(b []byte) error {
1082         buf := codec.NewBuffer(b)
1083         m.Retval = buf.DecodeInt32()
1084         return nil
1085 }
1086
1087 // ConnectSock defines message 'connect_sock'.
1088 type ConnectSock struct {
1089         WrkIndex           uint32   `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
1090         ClientQueueAddress uint64   `binapi:"u64,name=client_queue_address" json:"client_queue_address,omitempty"`
1091         Options            []uint64 `binapi:"u64[16],name=options" json:"options,omitempty"`
1092         Vrf                uint32   `binapi:"u32,name=vrf" json:"vrf,omitempty"`
1093         IsIP4              uint8    `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
1094         IP                 []byte   `binapi:"u8[16],name=ip" json:"ip,omitempty"`
1095         Port               uint16   `binapi:"u16,name=port" json:"port,omitempty"`
1096         Proto              uint8    `binapi:"u8,name=proto" json:"proto,omitempty"`
1097         ParentHandle       uint64   `binapi:"u64,name=parent_handle" json:"parent_handle,omitempty"`
1098         HostnameLen        uint8    `binapi:"u8,name=hostname_len" json:"-"`
1099         Hostname           []byte   `binapi:"u8[hostname_len],name=hostname" json:"hostname,omitempty"`
1100 }
1101
1102 func (m *ConnectSock) Reset()               { *m = ConnectSock{} }
1103 func (*ConnectSock) GetMessageName() string { return "connect_sock" }
1104 func (*ConnectSock) GetCrcString() string   { return "d2b460ca" }
1105 func (*ConnectSock) GetMessageType() api.MessageType {
1106         return api.RequestMessage
1107 }
1108
1109 func (m *ConnectSock) Size() (size int) {
1110         if m == nil {
1111                 return 0
1112         }
1113         size += 4                   // m.WrkIndex
1114         size += 8                   // m.ClientQueueAddress
1115         size += 8 * 16              // m.Options
1116         size += 4                   // m.Vrf
1117         size += 1                   // m.IsIP4
1118         size += 1 * 16              // m.IP
1119         size += 2                   // m.Port
1120         size += 1                   // m.Proto
1121         size += 8                   // m.ParentHandle
1122         size += 1                   // m.HostnameLen
1123         size += 1 * len(m.Hostname) // m.Hostname
1124         return size
1125 }
1126 func (m *ConnectSock) Marshal(b []byte) ([]byte, error) {
1127         if b == nil {
1128                 b = make([]byte, m.Size())
1129         }
1130         buf := codec.NewBuffer(b)
1131         buf.EncodeUint32(m.WrkIndex)
1132         buf.EncodeUint64(m.ClientQueueAddress)
1133         for i := 0; i < 16; i++ {
1134                 var x uint64
1135                 if i < len(m.Options) {
1136                         x = uint64(m.Options[i])
1137                 }
1138                 buf.EncodeUint64(x)
1139         }
1140         buf.EncodeUint32(m.Vrf)
1141         buf.EncodeUint8(m.IsIP4)
1142         buf.EncodeBytes(m.IP, 16)
1143         buf.EncodeUint16(m.Port)
1144         buf.EncodeUint8(m.Proto)
1145         buf.EncodeUint64(m.ParentHandle)
1146         buf.EncodeUint8(uint8(len(m.Hostname)))
1147         buf.EncodeBytes(m.Hostname, 0)
1148         return buf.Bytes(), nil
1149 }
1150 func (m *ConnectSock) Unmarshal(b []byte) error {
1151         buf := codec.NewBuffer(b)
1152         m.WrkIndex = buf.DecodeUint32()
1153         m.ClientQueueAddress = buf.DecodeUint64()
1154         m.Options = make([]uint64, 16)
1155         for i := 0; i < len(m.Options); i++ {
1156                 m.Options[i] = buf.DecodeUint64()
1157         }
1158         m.Vrf = buf.DecodeUint32()
1159         m.IsIP4 = buf.DecodeUint8()
1160         m.IP = make([]byte, 16)
1161         copy(m.IP, buf.DecodeBytes(len(m.IP)))
1162         m.Port = buf.DecodeUint16()
1163         m.Proto = buf.DecodeUint8()
1164         m.ParentHandle = buf.DecodeUint64()
1165         m.HostnameLen = buf.DecodeUint8()
1166         m.Hostname = make([]byte, m.HostnameLen)
1167         copy(m.Hostname, buf.DecodeBytes(len(m.Hostname)))
1168         return nil
1169 }
1170
1171 // ConnectSockReply defines message 'connect_sock_reply'.
1172 type ConnectSockReply struct {
1173         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1174 }
1175
1176 func (m *ConnectSockReply) Reset()               { *m = ConnectSockReply{} }
1177 func (*ConnectSockReply) GetMessageName() string { return "connect_sock_reply" }
1178 func (*ConnectSockReply) GetCrcString() string   { return "e8d4e804" }
1179 func (*ConnectSockReply) GetMessageType() api.MessageType {
1180         return api.ReplyMessage
1181 }
1182
1183 func (m *ConnectSockReply) Size() (size int) {
1184         if m == nil {
1185                 return 0
1186         }
1187         size += 4 // m.Retval
1188         return size
1189 }
1190 func (m *ConnectSockReply) Marshal(b []byte) ([]byte, error) {
1191         if b == nil {
1192                 b = make([]byte, m.Size())
1193         }
1194         buf := codec.NewBuffer(b)
1195         buf.EncodeInt32(m.Retval)
1196         return buf.Bytes(), nil
1197 }
1198 func (m *ConnectSockReply) Unmarshal(b []byte) error {
1199         buf := codec.NewBuffer(b)
1200         m.Retval = buf.DecodeInt32()
1201         return nil
1202 }
1203
1204 // ConnectURI defines message 'connect_uri'.
1205 type ConnectURI struct {
1206         ClientQueueAddress uint64   `binapi:"u64,name=client_queue_address" json:"client_queue_address,omitempty"`
1207         Options            []uint64 `binapi:"u64[16],name=options" json:"options,omitempty"`
1208         URI                []byte   `binapi:"u8[128],name=uri" json:"uri,omitempty"`
1209 }
1210
1211 func (m *ConnectURI) Reset()               { *m = ConnectURI{} }
1212 func (*ConnectURI) GetMessageName() string { return "connect_uri" }
1213 func (*ConnectURI) GetCrcString() string   { return "a36143d6" }
1214 func (*ConnectURI) GetMessageType() api.MessageType {
1215         return api.RequestMessage
1216 }
1217
1218 func (m *ConnectURI) Size() (size int) {
1219         if m == nil {
1220                 return 0
1221         }
1222         size += 8       // m.ClientQueueAddress
1223         size += 8 * 16  // m.Options
1224         size += 1 * 128 // m.URI
1225         return size
1226 }
1227 func (m *ConnectURI) Marshal(b []byte) ([]byte, error) {
1228         if b == nil {
1229                 b = make([]byte, m.Size())
1230         }
1231         buf := codec.NewBuffer(b)
1232         buf.EncodeUint64(m.ClientQueueAddress)
1233         for i := 0; i < 16; i++ {
1234                 var x uint64
1235                 if i < len(m.Options) {
1236                         x = uint64(m.Options[i])
1237                 }
1238                 buf.EncodeUint64(x)
1239         }
1240         buf.EncodeBytes(m.URI, 128)
1241         return buf.Bytes(), nil
1242 }
1243 func (m *ConnectURI) Unmarshal(b []byte) error {
1244         buf := codec.NewBuffer(b)
1245         m.ClientQueueAddress = buf.DecodeUint64()
1246         m.Options = make([]uint64, 16)
1247         for i := 0; i < len(m.Options); i++ {
1248                 m.Options[i] = buf.DecodeUint64()
1249         }
1250         m.URI = make([]byte, 128)
1251         copy(m.URI, buf.DecodeBytes(len(m.URI)))
1252         return nil
1253 }
1254
1255 // ConnectURIReply defines message 'connect_uri_reply'.
1256 type ConnectURIReply struct {
1257         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1258 }
1259
1260 func (m *ConnectURIReply) Reset()               { *m = ConnectURIReply{} }
1261 func (*ConnectURIReply) GetMessageName() string { return "connect_uri_reply" }
1262 func (*ConnectURIReply) GetCrcString() string   { return "e8d4e804" }
1263 func (*ConnectURIReply) GetMessageType() api.MessageType {
1264         return api.ReplyMessage
1265 }
1266
1267 func (m *ConnectURIReply) Size() (size int) {
1268         if m == nil {
1269                 return 0
1270         }
1271         size += 4 // m.Retval
1272         return size
1273 }
1274 func (m *ConnectURIReply) Marshal(b []byte) ([]byte, error) {
1275         if b == nil {
1276                 b = make([]byte, m.Size())
1277         }
1278         buf := codec.NewBuffer(b)
1279         buf.EncodeInt32(m.Retval)
1280         return buf.Bytes(), nil
1281 }
1282 func (m *ConnectURIReply) Unmarshal(b []byte) error {
1283         buf := codec.NewBuffer(b)
1284         m.Retval = buf.DecodeInt32()
1285         return nil
1286 }
1287
1288 // DisconnectSession defines message 'disconnect_session'.
1289 type DisconnectSession struct {
1290         Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
1291 }
1292
1293 func (m *DisconnectSession) Reset()               { *m = DisconnectSession{} }
1294 func (*DisconnectSession) GetMessageName() string { return "disconnect_session" }
1295 func (*DisconnectSession) GetCrcString() string   { return "7279205b" }
1296 func (*DisconnectSession) GetMessageType() api.MessageType {
1297         return api.RequestMessage
1298 }
1299
1300 func (m *DisconnectSession) Size() (size int) {
1301         if m == nil {
1302                 return 0
1303         }
1304         size += 8 // m.Handle
1305         return size
1306 }
1307 func (m *DisconnectSession) Marshal(b []byte) ([]byte, error) {
1308         if b == nil {
1309                 b = make([]byte, m.Size())
1310         }
1311         buf := codec.NewBuffer(b)
1312         buf.EncodeUint64(m.Handle)
1313         return buf.Bytes(), nil
1314 }
1315 func (m *DisconnectSession) Unmarshal(b []byte) error {
1316         buf := codec.NewBuffer(b)
1317         m.Handle = buf.DecodeUint64()
1318         return nil
1319 }
1320
1321 // DisconnectSessionReply defines message 'disconnect_session_reply'.
1322 type DisconnectSessionReply struct {
1323         Retval int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
1324         Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
1325 }
1326
1327 func (m *DisconnectSessionReply) Reset()               { *m = DisconnectSessionReply{} }
1328 func (*DisconnectSessionReply) GetMessageName() string { return "disconnect_session_reply" }
1329 func (*DisconnectSessionReply) GetCrcString() string   { return "d6960a03" }
1330 func (*DisconnectSessionReply) GetMessageType() api.MessageType {
1331         return api.ReplyMessage
1332 }
1333
1334 func (m *DisconnectSessionReply) Size() (size int) {
1335         if m == nil {
1336                 return 0
1337         }
1338         size += 4 // m.Retval
1339         size += 8 // m.Handle
1340         return size
1341 }
1342 func (m *DisconnectSessionReply) Marshal(b []byte) ([]byte, error) {
1343         if b == nil {
1344                 b = make([]byte, m.Size())
1345         }
1346         buf := codec.NewBuffer(b)
1347         buf.EncodeInt32(m.Retval)
1348         buf.EncodeUint64(m.Handle)
1349         return buf.Bytes(), nil
1350 }
1351 func (m *DisconnectSessionReply) Unmarshal(b []byte) error {
1352         buf := codec.NewBuffer(b)
1353         m.Retval = buf.DecodeInt32()
1354         m.Handle = buf.DecodeUint64()
1355         return nil
1356 }
1357
1358 // MapAnotherSegment defines message 'map_another_segment'.
1359 type MapAnotherSegment struct {
1360         FdFlags       uint8  `binapi:"u8,name=fd_flags" json:"fd_flags,omitempty"`
1361         SegmentSize   uint32 `binapi:"u32,name=segment_size" json:"segment_size,omitempty"`
1362         SegmentName   []byte `binapi:"u8[128],name=segment_name" json:"segment_name,omitempty"`
1363         SegmentHandle uint64 `binapi:"u64,name=segment_handle" json:"segment_handle,omitempty"`
1364 }
1365
1366 func (m *MapAnotherSegment) Reset()               { *m = MapAnotherSegment{} }
1367 func (*MapAnotherSegment) GetMessageName() string { return "map_another_segment" }
1368 func (*MapAnotherSegment) GetCrcString() string   { return "dc2d630b" }
1369 func (*MapAnotherSegment) GetMessageType() api.MessageType {
1370         return api.RequestMessage
1371 }
1372
1373 func (m *MapAnotherSegment) Size() (size int) {
1374         if m == nil {
1375                 return 0
1376         }
1377         size += 1       // m.FdFlags
1378         size += 4       // m.SegmentSize
1379         size += 1 * 128 // m.SegmentName
1380         size += 8       // m.SegmentHandle
1381         return size
1382 }
1383 func (m *MapAnotherSegment) Marshal(b []byte) ([]byte, error) {
1384         if b == nil {
1385                 b = make([]byte, m.Size())
1386         }
1387         buf := codec.NewBuffer(b)
1388         buf.EncodeUint8(m.FdFlags)
1389         buf.EncodeUint32(m.SegmentSize)
1390         buf.EncodeBytes(m.SegmentName, 128)
1391         buf.EncodeUint64(m.SegmentHandle)
1392         return buf.Bytes(), nil
1393 }
1394 func (m *MapAnotherSegment) Unmarshal(b []byte) error {
1395         buf := codec.NewBuffer(b)
1396         m.FdFlags = buf.DecodeUint8()
1397         m.SegmentSize = buf.DecodeUint32()
1398         m.SegmentName = make([]byte, 128)
1399         copy(m.SegmentName, buf.DecodeBytes(len(m.SegmentName)))
1400         m.SegmentHandle = buf.DecodeUint64()
1401         return nil
1402 }
1403
1404 // MapAnotherSegmentReply defines message 'map_another_segment_reply'.
1405 type MapAnotherSegmentReply struct {
1406         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1407 }
1408
1409 func (m *MapAnotherSegmentReply) Reset()               { *m = MapAnotherSegmentReply{} }
1410 func (*MapAnotherSegmentReply) GetMessageName() string { return "map_another_segment_reply" }
1411 func (*MapAnotherSegmentReply) GetCrcString() string   { return "e8d4e804" }
1412 func (*MapAnotherSegmentReply) GetMessageType() api.MessageType {
1413         return api.ReplyMessage
1414 }
1415
1416 func (m *MapAnotherSegmentReply) Size() (size int) {
1417         if m == nil {
1418                 return 0
1419         }
1420         size += 4 // m.Retval
1421         return size
1422 }
1423 func (m *MapAnotherSegmentReply) Marshal(b []byte) ([]byte, error) {
1424         if b == nil {
1425                 b = make([]byte, m.Size())
1426         }
1427         buf := codec.NewBuffer(b)
1428         buf.EncodeInt32(m.Retval)
1429         return buf.Bytes(), nil
1430 }
1431 func (m *MapAnotherSegmentReply) Unmarshal(b []byte) error {
1432         buf := codec.NewBuffer(b)
1433         m.Retval = buf.DecodeInt32()
1434         return nil
1435 }
1436
1437 // SessionEnableDisable defines message 'session_enable_disable'.
1438 type SessionEnableDisable struct {
1439         IsEnable uint8 `binapi:"u8,name=is_enable" json:"is_enable,omitempty"`
1440 }
1441
1442 func (m *SessionEnableDisable) Reset()               { *m = SessionEnableDisable{} }
1443 func (*SessionEnableDisable) GetMessageName() string { return "session_enable_disable" }
1444 func (*SessionEnableDisable) GetCrcString() string   { return "30ac9be7" }
1445 func (*SessionEnableDisable) GetMessageType() api.MessageType {
1446         return api.RequestMessage
1447 }
1448
1449 func (m *SessionEnableDisable) Size() (size int) {
1450         if m == nil {
1451                 return 0
1452         }
1453         size += 1 // m.IsEnable
1454         return size
1455 }
1456 func (m *SessionEnableDisable) Marshal(b []byte) ([]byte, error) {
1457         if b == nil {
1458                 b = make([]byte, m.Size())
1459         }
1460         buf := codec.NewBuffer(b)
1461         buf.EncodeUint8(m.IsEnable)
1462         return buf.Bytes(), nil
1463 }
1464 func (m *SessionEnableDisable) Unmarshal(b []byte) error {
1465         buf := codec.NewBuffer(b)
1466         m.IsEnable = buf.DecodeUint8()
1467         return nil
1468 }
1469
1470 // SessionEnableDisableReply defines message 'session_enable_disable_reply'.
1471 type SessionEnableDisableReply struct {
1472         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1473 }
1474
1475 func (m *SessionEnableDisableReply) Reset()               { *m = SessionEnableDisableReply{} }
1476 func (*SessionEnableDisableReply) GetMessageName() string { return "session_enable_disable_reply" }
1477 func (*SessionEnableDisableReply) GetCrcString() string   { return "e8d4e804" }
1478 func (*SessionEnableDisableReply) GetMessageType() api.MessageType {
1479         return api.ReplyMessage
1480 }
1481
1482 func (m *SessionEnableDisableReply) Size() (size int) {
1483         if m == nil {
1484                 return 0
1485         }
1486         size += 4 // m.Retval
1487         return size
1488 }
1489 func (m *SessionEnableDisableReply) Marshal(b []byte) ([]byte, error) {
1490         if b == nil {
1491                 b = make([]byte, m.Size())
1492         }
1493         buf := codec.NewBuffer(b)
1494         buf.EncodeInt32(m.Retval)
1495         return buf.Bytes(), nil
1496 }
1497 func (m *SessionEnableDisableReply) Unmarshal(b []byte) error {
1498         buf := codec.NewBuffer(b)
1499         m.Retval = buf.DecodeInt32()
1500         return nil
1501 }
1502
1503 // SessionRuleAddDel defines message 'session_rule_add_del'.
1504 type SessionRuleAddDel struct {
1505         TransportProto uint8  `binapi:"u8,name=transport_proto" json:"transport_proto,omitempty"`
1506         IsIP4          uint8  `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
1507         LclIP          []byte `binapi:"u8[16],name=lcl_ip" json:"lcl_ip,omitempty"`
1508         LclPlen        uint8  `binapi:"u8,name=lcl_plen" json:"lcl_plen,omitempty"`
1509         RmtIP          []byte `binapi:"u8[16],name=rmt_ip" json:"rmt_ip,omitempty"`
1510         RmtPlen        uint8  `binapi:"u8,name=rmt_plen" json:"rmt_plen,omitempty"`
1511         LclPort        uint16 `binapi:"u16,name=lcl_port" json:"lcl_port,omitempty"`
1512         RmtPort        uint16 `binapi:"u16,name=rmt_port" json:"rmt_port,omitempty"`
1513         ActionIndex    uint32 `binapi:"u32,name=action_index" json:"action_index,omitempty"`
1514         IsAdd          uint8  `binapi:"u8,name=is_add" json:"is_add,omitempty"`
1515         AppnsIndex     uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
1516         Scope          uint8  `binapi:"u8,name=scope" json:"scope,omitempty"`
1517         Tag            []byte `binapi:"u8[64],name=tag" json:"tag,omitempty"`
1518 }
1519
1520 func (m *SessionRuleAddDel) Reset()               { *m = SessionRuleAddDel{} }
1521 func (*SessionRuleAddDel) GetMessageName() string { return "session_rule_add_del" }
1522 func (*SessionRuleAddDel) GetCrcString() string   { return "4ab2eb06" }
1523 func (*SessionRuleAddDel) GetMessageType() api.MessageType {
1524         return api.RequestMessage
1525 }
1526
1527 func (m *SessionRuleAddDel) Size() (size int) {
1528         if m == nil {
1529                 return 0
1530         }
1531         size += 1      // m.TransportProto
1532         size += 1      // m.IsIP4
1533         size += 1 * 16 // m.LclIP
1534         size += 1      // m.LclPlen
1535         size += 1 * 16 // m.RmtIP
1536         size += 1      // m.RmtPlen
1537         size += 2      // m.LclPort
1538         size += 2      // m.RmtPort
1539         size += 4      // m.ActionIndex
1540         size += 1      // m.IsAdd
1541         size += 4      // m.AppnsIndex
1542         size += 1      // m.Scope
1543         size += 1 * 64 // m.Tag
1544         return size
1545 }
1546 func (m *SessionRuleAddDel) Marshal(b []byte) ([]byte, error) {
1547         if b == nil {
1548                 b = make([]byte, m.Size())
1549         }
1550         buf := codec.NewBuffer(b)
1551         buf.EncodeUint8(m.TransportProto)
1552         buf.EncodeUint8(m.IsIP4)
1553         buf.EncodeBytes(m.LclIP, 16)
1554         buf.EncodeUint8(m.LclPlen)
1555         buf.EncodeBytes(m.RmtIP, 16)
1556         buf.EncodeUint8(m.RmtPlen)
1557         buf.EncodeUint16(m.LclPort)
1558         buf.EncodeUint16(m.RmtPort)
1559         buf.EncodeUint32(m.ActionIndex)
1560         buf.EncodeUint8(m.IsAdd)
1561         buf.EncodeUint32(m.AppnsIndex)
1562         buf.EncodeUint8(m.Scope)
1563         buf.EncodeBytes(m.Tag, 64)
1564         return buf.Bytes(), nil
1565 }
1566 func (m *SessionRuleAddDel) Unmarshal(b []byte) error {
1567         buf := codec.NewBuffer(b)
1568         m.TransportProto = buf.DecodeUint8()
1569         m.IsIP4 = buf.DecodeUint8()
1570         m.LclIP = make([]byte, 16)
1571         copy(m.LclIP, buf.DecodeBytes(len(m.LclIP)))
1572         m.LclPlen = buf.DecodeUint8()
1573         m.RmtIP = make([]byte, 16)
1574         copy(m.RmtIP, buf.DecodeBytes(len(m.RmtIP)))
1575         m.RmtPlen = buf.DecodeUint8()
1576         m.LclPort = buf.DecodeUint16()
1577         m.RmtPort = buf.DecodeUint16()
1578         m.ActionIndex = buf.DecodeUint32()
1579         m.IsAdd = buf.DecodeUint8()
1580         m.AppnsIndex = buf.DecodeUint32()
1581         m.Scope = buf.DecodeUint8()
1582         m.Tag = make([]byte, 64)
1583         copy(m.Tag, buf.DecodeBytes(len(m.Tag)))
1584         return nil
1585 }
1586
1587 // SessionRuleAddDelReply defines message 'session_rule_add_del_reply'.
1588 type SessionRuleAddDelReply struct {
1589         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1590 }
1591
1592 func (m *SessionRuleAddDelReply) Reset()               { *m = SessionRuleAddDelReply{} }
1593 func (*SessionRuleAddDelReply) GetMessageName() string { return "session_rule_add_del_reply" }
1594 func (*SessionRuleAddDelReply) GetCrcString() string   { return "e8d4e804" }
1595 func (*SessionRuleAddDelReply) GetMessageType() api.MessageType {
1596         return api.ReplyMessage
1597 }
1598
1599 func (m *SessionRuleAddDelReply) Size() (size int) {
1600         if m == nil {
1601                 return 0
1602         }
1603         size += 4 // m.Retval
1604         return size
1605 }
1606 func (m *SessionRuleAddDelReply) Marshal(b []byte) ([]byte, error) {
1607         if b == nil {
1608                 b = make([]byte, m.Size())
1609         }
1610         buf := codec.NewBuffer(b)
1611         buf.EncodeInt32(m.Retval)
1612         return buf.Bytes(), nil
1613 }
1614 func (m *SessionRuleAddDelReply) Unmarshal(b []byte) error {
1615         buf := codec.NewBuffer(b)
1616         m.Retval = buf.DecodeInt32()
1617         return nil
1618 }
1619
1620 // SessionRulesDetails defines message 'session_rules_details'.
1621 type SessionRulesDetails struct {
1622         TransportProto uint8  `binapi:"u8,name=transport_proto" json:"transport_proto,omitempty"`
1623         IsIP4          uint8  `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
1624         LclIP          []byte `binapi:"u8[16],name=lcl_ip" json:"lcl_ip,omitempty"`
1625         LclPlen        uint8  `binapi:"u8,name=lcl_plen" json:"lcl_plen,omitempty"`
1626         RmtIP          []byte `binapi:"u8[16],name=rmt_ip" json:"rmt_ip,omitempty"`
1627         RmtPlen        uint8  `binapi:"u8,name=rmt_plen" json:"rmt_plen,omitempty"`
1628         LclPort        uint16 `binapi:"u16,name=lcl_port" json:"lcl_port,omitempty"`
1629         RmtPort        uint16 `binapi:"u16,name=rmt_port" json:"rmt_port,omitempty"`
1630         ActionIndex    uint32 `binapi:"u32,name=action_index" json:"action_index,omitempty"`
1631         AppnsIndex     uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
1632         Scope          uint8  `binapi:"u8,name=scope" json:"scope,omitempty"`
1633         Tag            []byte `binapi:"u8[64],name=tag" json:"tag,omitempty"`
1634 }
1635
1636 func (m *SessionRulesDetails) Reset()               { *m = SessionRulesDetails{} }
1637 func (*SessionRulesDetails) GetMessageName() string { return "session_rules_details" }
1638 func (*SessionRulesDetails) GetCrcString() string   { return "a52b0e96" }
1639 func (*SessionRulesDetails) GetMessageType() api.MessageType {
1640         return api.ReplyMessage
1641 }
1642
1643 func (m *SessionRulesDetails) Size() (size int) {
1644         if m == nil {
1645                 return 0
1646         }
1647         size += 1      // m.TransportProto
1648         size += 1      // m.IsIP4
1649         size += 1 * 16 // m.LclIP
1650         size += 1      // m.LclPlen
1651         size += 1 * 16 // m.RmtIP
1652         size += 1      // m.RmtPlen
1653         size += 2      // m.LclPort
1654         size += 2      // m.RmtPort
1655         size += 4      // m.ActionIndex
1656         size += 4      // m.AppnsIndex
1657         size += 1      // m.Scope
1658         size += 1 * 64 // m.Tag
1659         return size
1660 }
1661 func (m *SessionRulesDetails) Marshal(b []byte) ([]byte, error) {
1662         if b == nil {
1663                 b = make([]byte, m.Size())
1664         }
1665         buf := codec.NewBuffer(b)
1666         buf.EncodeUint8(m.TransportProto)
1667         buf.EncodeUint8(m.IsIP4)
1668         buf.EncodeBytes(m.LclIP, 16)
1669         buf.EncodeUint8(m.LclPlen)
1670         buf.EncodeBytes(m.RmtIP, 16)
1671         buf.EncodeUint8(m.RmtPlen)
1672         buf.EncodeUint16(m.LclPort)
1673         buf.EncodeUint16(m.RmtPort)
1674         buf.EncodeUint32(m.ActionIndex)
1675         buf.EncodeUint32(m.AppnsIndex)
1676         buf.EncodeUint8(m.Scope)
1677         buf.EncodeBytes(m.Tag, 64)
1678         return buf.Bytes(), nil
1679 }
1680 func (m *SessionRulesDetails) Unmarshal(b []byte) error {
1681         buf := codec.NewBuffer(b)
1682         m.TransportProto = buf.DecodeUint8()
1683         m.IsIP4 = buf.DecodeUint8()
1684         m.LclIP = make([]byte, 16)
1685         copy(m.LclIP, buf.DecodeBytes(len(m.LclIP)))
1686         m.LclPlen = buf.DecodeUint8()
1687         m.RmtIP = make([]byte, 16)
1688         copy(m.RmtIP, buf.DecodeBytes(len(m.RmtIP)))
1689         m.RmtPlen = buf.DecodeUint8()
1690         m.LclPort = buf.DecodeUint16()
1691         m.RmtPort = buf.DecodeUint16()
1692         m.ActionIndex = buf.DecodeUint32()
1693         m.AppnsIndex = buf.DecodeUint32()
1694         m.Scope = buf.DecodeUint8()
1695         m.Tag = make([]byte, 64)
1696         copy(m.Tag, buf.DecodeBytes(len(m.Tag)))
1697         return nil
1698 }
1699
1700 // SessionRulesDump defines message 'session_rules_dump'.
1701 type SessionRulesDump struct{}
1702
1703 func (m *SessionRulesDump) Reset()               { *m = SessionRulesDump{} }
1704 func (*SessionRulesDump) GetMessageName() string { return "session_rules_dump" }
1705 func (*SessionRulesDump) GetCrcString() string   { return "51077d14" }
1706 func (*SessionRulesDump) GetMessageType() api.MessageType {
1707         return api.RequestMessage
1708 }
1709
1710 func (m *SessionRulesDump) Size() (size int) {
1711         if m == nil {
1712                 return 0
1713         }
1714         return size
1715 }
1716 func (m *SessionRulesDump) Marshal(b []byte) ([]byte, error) {
1717         if b == nil {
1718                 b = make([]byte, m.Size())
1719         }
1720         buf := codec.NewBuffer(b)
1721         return buf.Bytes(), nil
1722 }
1723 func (m *SessionRulesDump) Unmarshal(b []byte) error {
1724         return nil
1725 }
1726
1727 // UnbindSock defines message 'unbind_sock'.
1728 type UnbindSock struct {
1729         WrkIndex uint32 `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
1730         Handle   uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
1731 }
1732
1733 func (m *UnbindSock) Reset()               { *m = UnbindSock{} }
1734 func (*UnbindSock) GetMessageName() string { return "unbind_sock" }
1735 func (*UnbindSock) GetCrcString() string   { return "08880908" }
1736 func (*UnbindSock) GetMessageType() api.MessageType {
1737         return api.RequestMessage
1738 }
1739
1740 func (m *UnbindSock) Size() (size int) {
1741         if m == nil {
1742                 return 0
1743         }
1744         size += 4 // m.WrkIndex
1745         size += 8 // m.Handle
1746         return size
1747 }
1748 func (m *UnbindSock) Marshal(b []byte) ([]byte, error) {
1749         if b == nil {
1750                 b = make([]byte, m.Size())
1751         }
1752         buf := codec.NewBuffer(b)
1753         buf.EncodeUint32(m.WrkIndex)
1754         buf.EncodeUint64(m.Handle)
1755         return buf.Bytes(), nil
1756 }
1757 func (m *UnbindSock) Unmarshal(b []byte) error {
1758         buf := codec.NewBuffer(b)
1759         m.WrkIndex = buf.DecodeUint32()
1760         m.Handle = buf.DecodeUint64()
1761         return nil
1762 }
1763
1764 // UnbindSockReply defines message 'unbind_sock_reply'.
1765 type UnbindSockReply struct {
1766         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1767 }
1768
1769 func (m *UnbindSockReply) Reset()               { *m = UnbindSockReply{} }
1770 func (*UnbindSockReply) GetMessageName() string { return "unbind_sock_reply" }
1771 func (*UnbindSockReply) GetCrcString() string   { return "e8d4e804" }
1772 func (*UnbindSockReply) GetMessageType() api.MessageType {
1773         return api.ReplyMessage
1774 }
1775
1776 func (m *UnbindSockReply) Size() (size int) {
1777         if m == nil {
1778                 return 0
1779         }
1780         size += 4 // m.Retval
1781         return size
1782 }
1783 func (m *UnbindSockReply) Marshal(b []byte) ([]byte, error) {
1784         if b == nil {
1785                 b = make([]byte, m.Size())
1786         }
1787         buf := codec.NewBuffer(b)
1788         buf.EncodeInt32(m.Retval)
1789         return buf.Bytes(), nil
1790 }
1791 func (m *UnbindSockReply) Unmarshal(b []byte) error {
1792         buf := codec.NewBuffer(b)
1793         m.Retval = buf.DecodeInt32()
1794         return nil
1795 }
1796
1797 // UnbindURI defines message 'unbind_uri'.
1798 type UnbindURI struct {
1799         URI []byte `binapi:"u8[128],name=uri" json:"uri,omitempty"`
1800 }
1801
1802 func (m *UnbindURI) Reset()               { *m = UnbindURI{} }
1803 func (*UnbindURI) GetMessageName() string { return "unbind_uri" }
1804 func (*UnbindURI) GetCrcString() string   { return "294cf07d" }
1805 func (*UnbindURI) GetMessageType() api.MessageType {
1806         return api.RequestMessage
1807 }
1808
1809 func (m *UnbindURI) Size() (size int) {
1810         if m == nil {
1811                 return 0
1812         }
1813         size += 1 * 128 // m.URI
1814         return size
1815 }
1816 func (m *UnbindURI) Marshal(b []byte) ([]byte, error) {
1817         if b == nil {
1818                 b = make([]byte, m.Size())
1819         }
1820         buf := codec.NewBuffer(b)
1821         buf.EncodeBytes(m.URI, 128)
1822         return buf.Bytes(), nil
1823 }
1824 func (m *UnbindURI) Unmarshal(b []byte) error {
1825         buf := codec.NewBuffer(b)
1826         m.URI = make([]byte, 128)
1827         copy(m.URI, buf.DecodeBytes(len(m.URI)))
1828         return nil
1829 }
1830
1831 // UnbindURIReply defines message 'unbind_uri_reply'.
1832 type UnbindURIReply struct {
1833         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1834 }
1835
1836 func (m *UnbindURIReply) Reset()               { *m = UnbindURIReply{} }
1837 func (*UnbindURIReply) GetMessageName() string { return "unbind_uri_reply" }
1838 func (*UnbindURIReply) GetCrcString() string   { return "e8d4e804" }
1839 func (*UnbindURIReply) GetMessageType() api.MessageType {
1840         return api.ReplyMessage
1841 }
1842
1843 func (m *UnbindURIReply) Size() (size int) {
1844         if m == nil {
1845                 return 0
1846         }
1847         size += 4 // m.Retval
1848         return size
1849 }
1850 func (m *UnbindURIReply) Marshal(b []byte) ([]byte, error) {
1851         if b == nil {
1852                 b = make([]byte, m.Size())
1853         }
1854         buf := codec.NewBuffer(b)
1855         buf.EncodeInt32(m.Retval)
1856         return buf.Bytes(), nil
1857 }
1858 func (m *UnbindURIReply) Unmarshal(b []byte) error {
1859         buf := codec.NewBuffer(b)
1860         m.Retval = buf.DecodeInt32()
1861         return nil
1862 }
1863
1864 // UnmapSegment defines message 'unmap_segment'.
1865 type UnmapSegment struct {
1866         SegmentHandle uint64 `binapi:"u64,name=segment_handle" json:"segment_handle,omitempty"`
1867 }
1868
1869 func (m *UnmapSegment) Reset()               { *m = UnmapSegment{} }
1870 func (*UnmapSegment) GetMessageName() string { return "unmap_segment" }
1871 func (*UnmapSegment) GetCrcString() string   { return "f77096f6" }
1872 func (*UnmapSegment) GetMessageType() api.MessageType {
1873         return api.RequestMessage
1874 }
1875
1876 func (m *UnmapSegment) Size() (size int) {
1877         if m == nil {
1878                 return 0
1879         }
1880         size += 8 // m.SegmentHandle
1881         return size
1882 }
1883 func (m *UnmapSegment) Marshal(b []byte) ([]byte, error) {
1884         if b == nil {
1885                 b = make([]byte, m.Size())
1886         }
1887         buf := codec.NewBuffer(b)
1888         buf.EncodeUint64(m.SegmentHandle)
1889         return buf.Bytes(), nil
1890 }
1891 func (m *UnmapSegment) Unmarshal(b []byte) error {
1892         buf := codec.NewBuffer(b)
1893         m.SegmentHandle = buf.DecodeUint64()
1894         return nil
1895 }
1896
1897 // UnmapSegmentReply defines message 'unmap_segment_reply'.
1898 type UnmapSegmentReply struct {
1899         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1900 }
1901
1902 func (m *UnmapSegmentReply) Reset()               { *m = UnmapSegmentReply{} }
1903 func (*UnmapSegmentReply) GetMessageName() string { return "unmap_segment_reply" }
1904 func (*UnmapSegmentReply) GetCrcString() string   { return "e8d4e804" }
1905 func (*UnmapSegmentReply) GetMessageType() api.MessageType {
1906         return api.ReplyMessage
1907 }
1908
1909 func (m *UnmapSegmentReply) Size() (size int) {
1910         if m == nil {
1911                 return 0
1912         }
1913         size += 4 // m.Retval
1914         return size
1915 }
1916 func (m *UnmapSegmentReply) Marshal(b []byte) ([]byte, error) {
1917         if b == nil {
1918                 b = make([]byte, m.Size())
1919         }
1920         buf := codec.NewBuffer(b)
1921         buf.EncodeInt32(m.Retval)
1922         return buf.Bytes(), nil
1923 }
1924 func (m *UnmapSegmentReply) Unmarshal(b []byte) error {
1925         buf := codec.NewBuffer(b)
1926         m.Retval = buf.DecodeInt32()
1927         return nil
1928 }
1929
1930 func init() { file_session_binapi_init() }
1931 func file_session_binapi_init() {
1932         api.RegisterMessage((*AppAddCertKeyPair)(nil), "app_add_cert_key_pair_02eb8016")
1933         api.RegisterMessage((*AppAddCertKeyPairReply)(nil), "app_add_cert_key_pair_reply_b42958d0")
1934         api.RegisterMessage((*AppAttach)(nil), "app_attach_ed08f4bd")
1935         api.RegisterMessage((*AppAttachReply)(nil), "app_attach_reply_0112f647")
1936         api.RegisterMessage((*AppCutThroughRegistrationAdd)(nil), "app_cut_through_registration_add_6d73b1b9")
1937         api.RegisterMessage((*AppCutThroughRegistrationAddReply)(nil), "app_cut_through_registration_add_reply_e8d4e804")
1938         api.RegisterMessage((*AppDelCertKeyPair)(nil), "app_del_cert_key_pair_8ac76db6")
1939         api.RegisterMessage((*AppDelCertKeyPairReply)(nil), "app_del_cert_key_pair_reply_e8d4e804")
1940         api.RegisterMessage((*AppNamespaceAddDel)(nil), "app_namespace_add_del_dd074c65")
1941         api.RegisterMessage((*AppNamespaceAddDelReply)(nil), "app_namespace_add_del_reply_85137120")
1942         api.RegisterMessage((*AppWorkerAddDel)(nil), "app_worker_add_del_6d2b2279")
1943         api.RegisterMessage((*AppWorkerAddDelReply)(nil), "app_worker_add_del_reply_56b21abc")
1944         api.RegisterMessage((*ApplicationAttach)(nil), "application_attach_81d4f974")
1945         api.RegisterMessage((*ApplicationAttachReply)(nil), "application_attach_reply_581866e8")
1946         api.RegisterMessage((*ApplicationDetach)(nil), "application_detach_51077d14")
1947         api.RegisterMessage((*ApplicationDetachReply)(nil), "application_detach_reply_e8d4e804")
1948         api.RegisterMessage((*ApplicationTLSCertAdd)(nil), "application_tls_cert_add_3f5cfe45")
1949         api.RegisterMessage((*ApplicationTLSCertAddReply)(nil), "application_tls_cert_add_reply_e8d4e804")
1950         api.RegisterMessage((*ApplicationTLSKeyAdd)(nil), "application_tls_key_add_5eaf70cd")
1951         api.RegisterMessage((*ApplicationTLSKeyAddReply)(nil), "application_tls_key_add_reply_e8d4e804")
1952         api.RegisterMessage((*BindSock)(nil), "bind_sock_0394633f")
1953         api.RegisterMessage((*BindSockReply)(nil), "bind_sock_reply_e8d4e804")
1954         api.RegisterMessage((*BindURI)(nil), "bind_uri_fae140cb")
1955         api.RegisterMessage((*BindURIReply)(nil), "bind_uri_reply_e8d4e804")
1956         api.RegisterMessage((*ConnectSock)(nil), "connect_sock_d2b460ca")
1957         api.RegisterMessage((*ConnectSockReply)(nil), "connect_sock_reply_e8d4e804")
1958         api.RegisterMessage((*ConnectURI)(nil), "connect_uri_a36143d6")
1959         api.RegisterMessage((*ConnectURIReply)(nil), "connect_uri_reply_e8d4e804")
1960         api.RegisterMessage((*DisconnectSession)(nil), "disconnect_session_7279205b")
1961         api.RegisterMessage((*DisconnectSessionReply)(nil), "disconnect_session_reply_d6960a03")
1962         api.RegisterMessage((*MapAnotherSegment)(nil), "map_another_segment_dc2d630b")
1963         api.RegisterMessage((*MapAnotherSegmentReply)(nil), "map_another_segment_reply_e8d4e804")
1964         api.RegisterMessage((*SessionEnableDisable)(nil), "session_enable_disable_30ac9be7")
1965         api.RegisterMessage((*SessionEnableDisableReply)(nil), "session_enable_disable_reply_e8d4e804")
1966         api.RegisterMessage((*SessionRuleAddDel)(nil), "session_rule_add_del_4ab2eb06")
1967         api.RegisterMessage((*SessionRuleAddDelReply)(nil), "session_rule_add_del_reply_e8d4e804")
1968         api.RegisterMessage((*SessionRulesDetails)(nil), "session_rules_details_a52b0e96")
1969         api.RegisterMessage((*SessionRulesDump)(nil), "session_rules_dump_51077d14")
1970         api.RegisterMessage((*UnbindSock)(nil), "unbind_sock_08880908")
1971         api.RegisterMessage((*UnbindSockReply)(nil), "unbind_sock_reply_e8d4e804")
1972         api.RegisterMessage((*UnbindURI)(nil), "unbind_uri_294cf07d")
1973         api.RegisterMessage((*UnbindURIReply)(nil), "unbind_uri_reply_e8d4e804")
1974         api.RegisterMessage((*UnmapSegment)(nil), "unmap_segment_f77096f6")
1975         api.RegisterMessage((*UnmapSegmentReply)(nil), "unmap_segment_reply_e8d4e804")
1976 }
1977
1978 // Messages returns list of all messages in this module.
1979 func AllMessages() []api.Message {
1980         return []api.Message{
1981                 (*AppAddCertKeyPair)(nil),
1982                 (*AppAddCertKeyPairReply)(nil),
1983                 (*AppAttach)(nil),
1984                 (*AppAttachReply)(nil),
1985                 (*AppCutThroughRegistrationAdd)(nil),
1986                 (*AppCutThroughRegistrationAddReply)(nil),
1987                 (*AppDelCertKeyPair)(nil),
1988                 (*AppDelCertKeyPairReply)(nil),
1989                 (*AppNamespaceAddDel)(nil),
1990                 (*AppNamespaceAddDelReply)(nil),
1991                 (*AppWorkerAddDel)(nil),
1992                 (*AppWorkerAddDelReply)(nil),
1993                 (*ApplicationAttach)(nil),
1994                 (*ApplicationAttachReply)(nil),
1995                 (*ApplicationDetach)(nil),
1996                 (*ApplicationDetachReply)(nil),
1997                 (*ApplicationTLSCertAdd)(nil),
1998                 (*ApplicationTLSCertAddReply)(nil),
1999                 (*ApplicationTLSKeyAdd)(nil),
2000                 (*ApplicationTLSKeyAddReply)(nil),
2001                 (*BindSock)(nil),
2002                 (*BindSockReply)(nil),
2003                 (*BindURI)(nil),
2004                 (*BindURIReply)(nil),
2005                 (*ConnectSock)(nil),
2006                 (*ConnectSockReply)(nil),
2007                 (*ConnectURI)(nil),
2008                 (*ConnectURIReply)(nil),
2009                 (*DisconnectSession)(nil),
2010                 (*DisconnectSessionReply)(nil),
2011                 (*MapAnotherSegment)(nil),
2012                 (*MapAnotherSegmentReply)(nil),
2013                 (*SessionEnableDisable)(nil),
2014                 (*SessionEnableDisableReply)(nil),
2015                 (*SessionRuleAddDel)(nil),
2016                 (*SessionRuleAddDelReply)(nil),
2017                 (*SessionRulesDetails)(nil),
2018                 (*SessionRulesDump)(nil),
2019                 (*UnbindSock)(nil),
2020                 (*UnbindSockReply)(nil),
2021                 (*UnbindURI)(nil),
2022                 (*UnbindURIReply)(nil),
2023                 (*UnmapSegment)(nil),
2024                 (*UnmapSegmentReply)(nil),
2025         }
2026 }