6eb6cdc4725cba24f74eda088404b27afa4e2d74
[govpp.git] / binapi / map / map.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
6 // Package maps contains generated bindings for API file map.api.
7 //
8 // Contents:
9 //  30 messages
10 //
11 package maps
12
13 import (
14         api "git.fd.io/govpp.git/api"
15         interface_types "git.fd.io/govpp.git/binapi/interface_types"
16         ip_types "git.fd.io/govpp.git/binapi/ip_types"
17         codec "git.fd.io/govpp.git/codec"
18 )
19
20 // This is a compile-time assertion to ensure that this generated file
21 // is compatible with the GoVPP api package it is being compiled against.
22 // A compilation error at this line likely means your copy of the
23 // GoVPP api package needs to be updated.
24 const _ = api.GoVppAPIPackageIsVersion2
25
26 const (
27         APIFile    = "map"
28         APIVersion = "4.1.1"
29         VersionCrc = 0x82b79829
30 )
31
32 // MapAddDelRule defines message 'map_add_del_rule'.
33 type MapAddDelRule struct {
34         Index  uint32              `binapi:"u32,name=index" json:"index,omitempty"`
35         IsAdd  bool                `binapi:"bool,name=is_add" json:"is_add,omitempty"`
36         IP6Dst ip_types.IP6Address `binapi:"ip6_address,name=ip6_dst" json:"ip6_dst,omitempty"`
37         Psid   uint16              `binapi:"u16,name=psid" json:"psid,omitempty"`
38 }
39
40 func (m *MapAddDelRule) Reset()               { *m = MapAddDelRule{} }
41 func (*MapAddDelRule) GetMessageName() string { return "map_add_del_rule" }
42 func (*MapAddDelRule) GetCrcString() string   { return "c65b32f7" }
43 func (*MapAddDelRule) GetMessageType() api.MessageType {
44         return api.RequestMessage
45 }
46
47 func (m *MapAddDelRule) Size() (size int) {
48         if m == nil {
49                 return 0
50         }
51         size += 4      // m.Index
52         size += 1      // m.IsAdd
53         size += 1 * 16 // m.IP6Dst
54         size += 2      // m.Psid
55         return size
56 }
57 func (m *MapAddDelRule) Marshal(b []byte) ([]byte, error) {
58         if b == nil {
59                 b = make([]byte, m.Size())
60         }
61         buf := codec.NewBuffer(b)
62         buf.EncodeUint32(m.Index)
63         buf.EncodeBool(m.IsAdd)
64         buf.EncodeBytes(m.IP6Dst[:], 16)
65         buf.EncodeUint16(m.Psid)
66         return buf.Bytes(), nil
67 }
68 func (m *MapAddDelRule) Unmarshal(b []byte) error {
69         buf := codec.NewBuffer(b)
70         m.Index = buf.DecodeUint32()
71         m.IsAdd = buf.DecodeBool()
72         copy(m.IP6Dst[:], buf.DecodeBytes(16))
73         m.Psid = buf.DecodeUint16()
74         return nil
75 }
76
77 // MapAddDelRuleReply defines message 'map_add_del_rule_reply'.
78 type MapAddDelRuleReply struct {
79         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
80 }
81
82 func (m *MapAddDelRuleReply) Reset()               { *m = MapAddDelRuleReply{} }
83 func (*MapAddDelRuleReply) GetMessageName() string { return "map_add_del_rule_reply" }
84 func (*MapAddDelRuleReply) GetCrcString() string   { return "e8d4e804" }
85 func (*MapAddDelRuleReply) GetMessageType() api.MessageType {
86         return api.ReplyMessage
87 }
88
89 func (m *MapAddDelRuleReply) Size() (size int) {
90         if m == nil {
91                 return 0
92         }
93         size += 4 // m.Retval
94         return size
95 }
96 func (m *MapAddDelRuleReply) Marshal(b []byte) ([]byte, error) {
97         if b == nil {
98                 b = make([]byte, m.Size())
99         }
100         buf := codec.NewBuffer(b)
101         buf.EncodeInt32(m.Retval)
102         return buf.Bytes(), nil
103 }
104 func (m *MapAddDelRuleReply) Unmarshal(b []byte) error {
105         buf := codec.NewBuffer(b)
106         m.Retval = buf.DecodeInt32()
107         return nil
108 }
109
110 // MapAddDomain defines message 'map_add_domain'.
111 type MapAddDomain struct {
112         IP6Prefix  ip_types.IP6Prefix `binapi:"ip6_prefix,name=ip6_prefix" json:"ip6_prefix,omitempty"`
113         IP4Prefix  ip_types.IP4Prefix `binapi:"ip4_prefix,name=ip4_prefix" json:"ip4_prefix,omitempty"`
114         IP6Src     ip_types.IP6Prefix `binapi:"ip6_prefix,name=ip6_src" json:"ip6_src,omitempty"`
115         EaBitsLen  uint8              `binapi:"u8,name=ea_bits_len" json:"ea_bits_len,omitempty"`
116         PsidOffset uint8              `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
117         PsidLength uint8              `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
118         Mtu        uint16             `binapi:"u16,name=mtu,default=1280" json:"mtu,omitempty"`
119         Tag        string             `binapi:"string[64],name=tag" json:"tag,omitempty"`
120 }
121
122 func (m *MapAddDomain) Reset()               { *m = MapAddDomain{} }
123 func (*MapAddDomain) GetMessageName() string { return "map_add_domain" }
124 func (*MapAddDomain) GetCrcString() string   { return "7a5a18c9" }
125 func (*MapAddDomain) GetMessageType() api.MessageType {
126         return api.RequestMessage
127 }
128
129 func (m *MapAddDomain) Size() (size int) {
130         if m == nil {
131                 return 0
132         }
133         size += 1 * 16 // m.IP6Prefix.Address
134         size += 1      // m.IP6Prefix.Len
135         size += 1 * 4  // m.IP4Prefix.Address
136         size += 1      // m.IP4Prefix.Len
137         size += 1 * 16 // m.IP6Src.Address
138         size += 1      // m.IP6Src.Len
139         size += 1      // m.EaBitsLen
140         size += 1      // m.PsidOffset
141         size += 1      // m.PsidLength
142         size += 2      // m.Mtu
143         size += 64     // m.Tag
144         return size
145 }
146 func (m *MapAddDomain) Marshal(b []byte) ([]byte, error) {
147         if b == nil {
148                 b = make([]byte, m.Size())
149         }
150         buf := codec.NewBuffer(b)
151         buf.EncodeBytes(m.IP6Prefix.Address[:], 16)
152         buf.EncodeUint8(m.IP6Prefix.Len)
153         buf.EncodeBytes(m.IP4Prefix.Address[:], 4)
154         buf.EncodeUint8(m.IP4Prefix.Len)
155         buf.EncodeBytes(m.IP6Src.Address[:], 16)
156         buf.EncodeUint8(m.IP6Src.Len)
157         buf.EncodeUint8(m.EaBitsLen)
158         buf.EncodeUint8(m.PsidOffset)
159         buf.EncodeUint8(m.PsidLength)
160         buf.EncodeUint16(m.Mtu)
161         buf.EncodeString(m.Tag, 64)
162         return buf.Bytes(), nil
163 }
164 func (m *MapAddDomain) Unmarshal(b []byte) error {
165         buf := codec.NewBuffer(b)
166         copy(m.IP6Prefix.Address[:], buf.DecodeBytes(16))
167         m.IP6Prefix.Len = buf.DecodeUint8()
168         copy(m.IP4Prefix.Address[:], buf.DecodeBytes(4))
169         m.IP4Prefix.Len = buf.DecodeUint8()
170         copy(m.IP6Src.Address[:], buf.DecodeBytes(16))
171         m.IP6Src.Len = buf.DecodeUint8()
172         m.EaBitsLen = buf.DecodeUint8()
173         m.PsidOffset = buf.DecodeUint8()
174         m.PsidLength = buf.DecodeUint8()
175         m.Mtu = buf.DecodeUint16()
176         m.Tag = buf.DecodeString(64)
177         return nil
178 }
179
180 // MapAddDomainReply defines message 'map_add_domain_reply'.
181 type MapAddDomainReply struct {
182         Index  uint32 `binapi:"u32,name=index" json:"index,omitempty"`
183         Retval int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
184 }
185
186 func (m *MapAddDomainReply) Reset()               { *m = MapAddDomainReply{} }
187 func (*MapAddDomainReply) GetMessageName() string { return "map_add_domain_reply" }
188 func (*MapAddDomainReply) GetCrcString() string   { return "3e6d4e2c" }
189 func (*MapAddDomainReply) GetMessageType() api.MessageType {
190         return api.ReplyMessage
191 }
192
193 func (m *MapAddDomainReply) Size() (size int) {
194         if m == nil {
195                 return 0
196         }
197         size += 4 // m.Index
198         size += 4 // m.Retval
199         return size
200 }
201 func (m *MapAddDomainReply) Marshal(b []byte) ([]byte, error) {
202         if b == nil {
203                 b = make([]byte, m.Size())
204         }
205         buf := codec.NewBuffer(b)
206         buf.EncodeUint32(m.Index)
207         buf.EncodeInt32(m.Retval)
208         return buf.Bytes(), nil
209 }
210 func (m *MapAddDomainReply) Unmarshal(b []byte) error {
211         buf := codec.NewBuffer(b)
212         m.Index = buf.DecodeUint32()
213         m.Retval = buf.DecodeInt32()
214         return nil
215 }
216
217 // MapDelDomain defines message 'map_del_domain'.
218 type MapDelDomain struct {
219         Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
220 }
221
222 func (m *MapDelDomain) Reset()               { *m = MapDelDomain{} }
223 func (*MapDelDomain) GetMessageName() string { return "map_del_domain" }
224 func (*MapDelDomain) GetCrcString() string   { return "8ac76db6" }
225 func (*MapDelDomain) GetMessageType() api.MessageType {
226         return api.RequestMessage
227 }
228
229 func (m *MapDelDomain) Size() (size int) {
230         if m == nil {
231                 return 0
232         }
233         size += 4 // m.Index
234         return size
235 }
236 func (m *MapDelDomain) Marshal(b []byte) ([]byte, error) {
237         if b == nil {
238                 b = make([]byte, m.Size())
239         }
240         buf := codec.NewBuffer(b)
241         buf.EncodeUint32(m.Index)
242         return buf.Bytes(), nil
243 }
244 func (m *MapDelDomain) Unmarshal(b []byte) error {
245         buf := codec.NewBuffer(b)
246         m.Index = buf.DecodeUint32()
247         return nil
248 }
249
250 // MapDelDomainReply defines message 'map_del_domain_reply'.
251 type MapDelDomainReply struct {
252         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
253 }
254
255 func (m *MapDelDomainReply) Reset()               { *m = MapDelDomainReply{} }
256 func (*MapDelDomainReply) GetMessageName() string { return "map_del_domain_reply" }
257 func (*MapDelDomainReply) GetCrcString() string   { return "e8d4e804" }
258 func (*MapDelDomainReply) GetMessageType() api.MessageType {
259         return api.ReplyMessage
260 }
261
262 func (m *MapDelDomainReply) Size() (size int) {
263         if m == nil {
264                 return 0
265         }
266         size += 4 // m.Retval
267         return size
268 }
269 func (m *MapDelDomainReply) Marshal(b []byte) ([]byte, error) {
270         if b == nil {
271                 b = make([]byte, m.Size())
272         }
273         buf := codec.NewBuffer(b)
274         buf.EncodeInt32(m.Retval)
275         return buf.Bytes(), nil
276 }
277 func (m *MapDelDomainReply) Unmarshal(b []byte) error {
278         buf := codec.NewBuffer(b)
279         m.Retval = buf.DecodeInt32()
280         return nil
281 }
282
283 // MapDomainDetails defines message 'map_domain_details'.
284 type MapDomainDetails struct {
285         DomainIndex uint32             `binapi:"u32,name=domain_index" json:"domain_index,omitempty"`
286         IP6Prefix   ip_types.IP6Prefix `binapi:"ip6_prefix,name=ip6_prefix" json:"ip6_prefix,omitempty"`
287         IP4Prefix   ip_types.IP4Prefix `binapi:"ip4_prefix,name=ip4_prefix" json:"ip4_prefix,omitempty"`
288         IP6Src      ip_types.IP6Prefix `binapi:"ip6_prefix,name=ip6_src" json:"ip6_src,omitempty"`
289         EaBitsLen   uint8              `binapi:"u8,name=ea_bits_len" json:"ea_bits_len,omitempty"`
290         PsidOffset  uint8              `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
291         PsidLength  uint8              `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
292         Flags       uint8              `binapi:"u8,name=flags" json:"flags,omitempty"`
293         Mtu         uint16             `binapi:"u16,name=mtu" json:"mtu,omitempty"`
294         Tag         string             `binapi:"string[64],name=tag" json:"tag,omitempty"`
295 }
296
297 func (m *MapDomainDetails) Reset()               { *m = MapDomainDetails{} }
298 func (*MapDomainDetails) GetMessageName() string { return "map_domain_details" }
299 func (*MapDomainDetails) GetCrcString() string   { return "fc1859dd" }
300 func (*MapDomainDetails) GetMessageType() api.MessageType {
301         return api.ReplyMessage
302 }
303
304 func (m *MapDomainDetails) Size() (size int) {
305         if m == nil {
306                 return 0
307         }
308         size += 4      // m.DomainIndex
309         size += 1 * 16 // m.IP6Prefix.Address
310         size += 1      // m.IP6Prefix.Len
311         size += 1 * 4  // m.IP4Prefix.Address
312         size += 1      // m.IP4Prefix.Len
313         size += 1 * 16 // m.IP6Src.Address
314         size += 1      // m.IP6Src.Len
315         size += 1      // m.EaBitsLen
316         size += 1      // m.PsidOffset
317         size += 1      // m.PsidLength
318         size += 1      // m.Flags
319         size += 2      // m.Mtu
320         size += 64     // m.Tag
321         return size
322 }
323 func (m *MapDomainDetails) Marshal(b []byte) ([]byte, error) {
324         if b == nil {
325                 b = make([]byte, m.Size())
326         }
327         buf := codec.NewBuffer(b)
328         buf.EncodeUint32(m.DomainIndex)
329         buf.EncodeBytes(m.IP6Prefix.Address[:], 16)
330         buf.EncodeUint8(m.IP6Prefix.Len)
331         buf.EncodeBytes(m.IP4Prefix.Address[:], 4)
332         buf.EncodeUint8(m.IP4Prefix.Len)
333         buf.EncodeBytes(m.IP6Src.Address[:], 16)
334         buf.EncodeUint8(m.IP6Src.Len)
335         buf.EncodeUint8(m.EaBitsLen)
336         buf.EncodeUint8(m.PsidOffset)
337         buf.EncodeUint8(m.PsidLength)
338         buf.EncodeUint8(m.Flags)
339         buf.EncodeUint16(m.Mtu)
340         buf.EncodeString(m.Tag, 64)
341         return buf.Bytes(), nil
342 }
343 func (m *MapDomainDetails) Unmarshal(b []byte) error {
344         buf := codec.NewBuffer(b)
345         m.DomainIndex = buf.DecodeUint32()
346         copy(m.IP6Prefix.Address[:], buf.DecodeBytes(16))
347         m.IP6Prefix.Len = buf.DecodeUint8()
348         copy(m.IP4Prefix.Address[:], buf.DecodeBytes(4))
349         m.IP4Prefix.Len = buf.DecodeUint8()
350         copy(m.IP6Src.Address[:], buf.DecodeBytes(16))
351         m.IP6Src.Len = buf.DecodeUint8()
352         m.EaBitsLen = buf.DecodeUint8()
353         m.PsidOffset = buf.DecodeUint8()
354         m.PsidLength = buf.DecodeUint8()
355         m.Flags = buf.DecodeUint8()
356         m.Mtu = buf.DecodeUint16()
357         m.Tag = buf.DecodeString(64)
358         return nil
359 }
360
361 // MapDomainDump defines message 'map_domain_dump'.
362 type MapDomainDump struct{}
363
364 func (m *MapDomainDump) Reset()               { *m = MapDomainDump{} }
365 func (*MapDomainDump) GetMessageName() string { return "map_domain_dump" }
366 func (*MapDomainDump) GetCrcString() string   { return "51077d14" }
367 func (*MapDomainDump) GetMessageType() api.MessageType {
368         return api.RequestMessage
369 }
370
371 func (m *MapDomainDump) Size() (size int) {
372         if m == nil {
373                 return 0
374         }
375         return size
376 }
377 func (m *MapDomainDump) Marshal(b []byte) ([]byte, error) {
378         if b == nil {
379                 b = make([]byte, m.Size())
380         }
381         buf := codec.NewBuffer(b)
382         return buf.Bytes(), nil
383 }
384 func (m *MapDomainDump) Unmarshal(b []byte) error {
385         return nil
386 }
387
388 // MapIfEnableDisable defines message 'map_if_enable_disable'.
389 type MapIfEnableDisable struct {
390         SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
391         IsEnable      bool                           `binapi:"bool,name=is_enable" json:"is_enable,omitempty"`
392         IsTranslation bool                           `binapi:"bool,name=is_translation" json:"is_translation,omitempty"`
393 }
394
395 func (m *MapIfEnableDisable) Reset()               { *m = MapIfEnableDisable{} }
396 func (*MapIfEnableDisable) GetMessageName() string { return "map_if_enable_disable" }
397 func (*MapIfEnableDisable) GetCrcString() string   { return "59bb32f4" }
398 func (*MapIfEnableDisable) GetMessageType() api.MessageType {
399         return api.RequestMessage
400 }
401
402 func (m *MapIfEnableDisable) Size() (size int) {
403         if m == nil {
404                 return 0
405         }
406         size += 4 // m.SwIfIndex
407         size += 1 // m.IsEnable
408         size += 1 // m.IsTranslation
409         return size
410 }
411 func (m *MapIfEnableDisable) Marshal(b []byte) ([]byte, error) {
412         if b == nil {
413                 b = make([]byte, m.Size())
414         }
415         buf := codec.NewBuffer(b)
416         buf.EncodeUint32(uint32(m.SwIfIndex))
417         buf.EncodeBool(m.IsEnable)
418         buf.EncodeBool(m.IsTranslation)
419         return buf.Bytes(), nil
420 }
421 func (m *MapIfEnableDisable) Unmarshal(b []byte) error {
422         buf := codec.NewBuffer(b)
423         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
424         m.IsEnable = buf.DecodeBool()
425         m.IsTranslation = buf.DecodeBool()
426         return nil
427 }
428
429 // MapIfEnableDisableReply defines message 'map_if_enable_disable_reply'.
430 type MapIfEnableDisableReply struct {
431         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
432 }
433
434 func (m *MapIfEnableDisableReply) Reset()               { *m = MapIfEnableDisableReply{} }
435 func (*MapIfEnableDisableReply) GetMessageName() string { return "map_if_enable_disable_reply" }
436 func (*MapIfEnableDisableReply) GetCrcString() string   { return "e8d4e804" }
437 func (*MapIfEnableDisableReply) GetMessageType() api.MessageType {
438         return api.ReplyMessage
439 }
440
441 func (m *MapIfEnableDisableReply) Size() (size int) {
442         if m == nil {
443                 return 0
444         }
445         size += 4 // m.Retval
446         return size
447 }
448 func (m *MapIfEnableDisableReply) Marshal(b []byte) ([]byte, error) {
449         if b == nil {
450                 b = make([]byte, m.Size())
451         }
452         buf := codec.NewBuffer(b)
453         buf.EncodeInt32(m.Retval)
454         return buf.Bytes(), nil
455 }
456 func (m *MapIfEnableDisableReply) Unmarshal(b []byte) error {
457         buf := codec.NewBuffer(b)
458         m.Retval = buf.DecodeInt32()
459         return nil
460 }
461
462 // MapParamAddDelPreResolve defines message 'map_param_add_del_pre_resolve'.
463 type MapParamAddDelPreResolve struct {
464         IsAdd        bool                `binapi:"bool,name=is_add" json:"is_add,omitempty"`
465         IP4NhAddress ip_types.IP4Address `binapi:"ip4_address,name=ip4_nh_address" json:"ip4_nh_address,omitempty"`
466         IP6NhAddress ip_types.IP6Address `binapi:"ip6_address,name=ip6_nh_address" json:"ip6_nh_address,omitempty"`
467 }
468
469 func (m *MapParamAddDelPreResolve) Reset()               { *m = MapParamAddDelPreResolve{} }
470 func (*MapParamAddDelPreResolve) GetMessageName() string { return "map_param_add_del_pre_resolve" }
471 func (*MapParamAddDelPreResolve) GetCrcString() string   { return "17008c66" }
472 func (*MapParamAddDelPreResolve) GetMessageType() api.MessageType {
473         return api.RequestMessage
474 }
475
476 func (m *MapParamAddDelPreResolve) Size() (size int) {
477         if m == nil {
478                 return 0
479         }
480         size += 1      // m.IsAdd
481         size += 1 * 4  // m.IP4NhAddress
482         size += 1 * 16 // m.IP6NhAddress
483         return size
484 }
485 func (m *MapParamAddDelPreResolve) Marshal(b []byte) ([]byte, error) {
486         if b == nil {
487                 b = make([]byte, m.Size())
488         }
489         buf := codec.NewBuffer(b)
490         buf.EncodeBool(m.IsAdd)
491         buf.EncodeBytes(m.IP4NhAddress[:], 4)
492         buf.EncodeBytes(m.IP6NhAddress[:], 16)
493         return buf.Bytes(), nil
494 }
495 func (m *MapParamAddDelPreResolve) Unmarshal(b []byte) error {
496         buf := codec.NewBuffer(b)
497         m.IsAdd = buf.DecodeBool()
498         copy(m.IP4NhAddress[:], buf.DecodeBytes(4))
499         copy(m.IP6NhAddress[:], buf.DecodeBytes(16))
500         return nil
501 }
502
503 // MapParamAddDelPreResolveReply defines message 'map_param_add_del_pre_resolve_reply'.
504 type MapParamAddDelPreResolveReply struct {
505         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
506 }
507
508 func (m *MapParamAddDelPreResolveReply) Reset() { *m = MapParamAddDelPreResolveReply{} }
509 func (*MapParamAddDelPreResolveReply) GetMessageName() string {
510         return "map_param_add_del_pre_resolve_reply"
511 }
512 func (*MapParamAddDelPreResolveReply) GetCrcString() string { return "e8d4e804" }
513 func (*MapParamAddDelPreResolveReply) GetMessageType() api.MessageType {
514         return api.ReplyMessage
515 }
516
517 func (m *MapParamAddDelPreResolveReply) Size() (size int) {
518         if m == nil {
519                 return 0
520         }
521         size += 4 // m.Retval
522         return size
523 }
524 func (m *MapParamAddDelPreResolveReply) Marshal(b []byte) ([]byte, error) {
525         if b == nil {
526                 b = make([]byte, m.Size())
527         }
528         buf := codec.NewBuffer(b)
529         buf.EncodeInt32(m.Retval)
530         return buf.Bytes(), nil
531 }
532 func (m *MapParamAddDelPreResolveReply) Unmarshal(b []byte) error {
533         buf := codec.NewBuffer(b)
534         m.Retval = buf.DecodeInt32()
535         return nil
536 }
537
538 // MapParamGet defines message 'map_param_get'.
539 type MapParamGet struct{}
540
541 func (m *MapParamGet) Reset()               { *m = MapParamGet{} }
542 func (*MapParamGet) GetMessageName() string { return "map_param_get" }
543 func (*MapParamGet) GetCrcString() string   { return "51077d14" }
544 func (*MapParamGet) GetMessageType() api.MessageType {
545         return api.RequestMessage
546 }
547
548 func (m *MapParamGet) Size() (size int) {
549         if m == nil {
550                 return 0
551         }
552         return size
553 }
554 func (m *MapParamGet) Marshal(b []byte) ([]byte, error) {
555         if b == nil {
556                 b = make([]byte, m.Size())
557         }
558         buf := codec.NewBuffer(b)
559         return buf.Bytes(), nil
560 }
561 func (m *MapParamGet) Unmarshal(b []byte) error {
562         return nil
563 }
564
565 // MapParamGetReply defines message 'map_param_get_reply'.
566 type MapParamGetReply struct {
567         Retval                 int32               `binapi:"i32,name=retval" json:"retval,omitempty"`
568         FragInner              uint8               `binapi:"u8,name=frag_inner" json:"frag_inner,omitempty"`
569         FragIgnoreDf           uint8               `binapi:"u8,name=frag_ignore_df" json:"frag_ignore_df,omitempty"`
570         ICMPIP4ErrRelaySrc     ip_types.IP4Address `binapi:"ip4_address,name=icmp_ip4_err_relay_src" json:"icmp_ip4_err_relay_src,omitempty"`
571         ICMP6EnableUnreachable bool                `binapi:"bool,name=icmp6_enable_unreachable" json:"icmp6_enable_unreachable,omitempty"`
572         IP4NhAddress           ip_types.IP4Address `binapi:"ip4_address,name=ip4_nh_address" json:"ip4_nh_address,omitempty"`
573         IP6NhAddress           ip_types.IP6Address `binapi:"ip6_address,name=ip6_nh_address" json:"ip6_nh_address,omitempty"`
574         IP4LifetimeMs          uint16              `binapi:"u16,name=ip4_lifetime_ms" json:"ip4_lifetime_ms,omitempty"`
575         IP4PoolSize            uint16              `binapi:"u16,name=ip4_pool_size" json:"ip4_pool_size,omitempty"`
576         IP4Buffers             uint32              `binapi:"u32,name=ip4_buffers" json:"ip4_buffers,omitempty"`
577         IP4HtRatio             float64             `binapi:"f64,name=ip4_ht_ratio" json:"ip4_ht_ratio,omitempty"`
578         SecCheckEnable         bool                `binapi:"bool,name=sec_check_enable" json:"sec_check_enable,omitempty"`
579         SecCheckFragments      bool                `binapi:"bool,name=sec_check_fragments" json:"sec_check_fragments,omitempty"`
580         TcCopy                 bool                `binapi:"bool,name=tc_copy" json:"tc_copy,omitempty"`
581         TcClass                uint8               `binapi:"u8,name=tc_class" json:"tc_class,omitempty"`
582 }
583
584 func (m *MapParamGetReply) Reset()               { *m = MapParamGetReply{} }
585 func (*MapParamGetReply) GetMessageName() string { return "map_param_get_reply" }
586 func (*MapParamGetReply) GetCrcString() string   { return "28092156" }
587 func (*MapParamGetReply) GetMessageType() api.MessageType {
588         return api.ReplyMessage
589 }
590
591 func (m *MapParamGetReply) Size() (size int) {
592         if m == nil {
593                 return 0
594         }
595         size += 4      // m.Retval
596         size += 1      // m.FragInner
597         size += 1      // m.FragIgnoreDf
598         size += 1 * 4  // m.ICMPIP4ErrRelaySrc
599         size += 1      // m.ICMP6EnableUnreachable
600         size += 1 * 4  // m.IP4NhAddress
601         size += 1 * 16 // m.IP6NhAddress
602         size += 2      // m.IP4LifetimeMs
603         size += 2      // m.IP4PoolSize
604         size += 4      // m.IP4Buffers
605         size += 8      // m.IP4HtRatio
606         size += 1      // m.SecCheckEnable
607         size += 1      // m.SecCheckFragments
608         size += 1      // m.TcCopy
609         size += 1      // m.TcClass
610         return size
611 }
612 func (m *MapParamGetReply) Marshal(b []byte) ([]byte, error) {
613         if b == nil {
614                 b = make([]byte, m.Size())
615         }
616         buf := codec.NewBuffer(b)
617         buf.EncodeInt32(m.Retval)
618         buf.EncodeUint8(m.FragInner)
619         buf.EncodeUint8(m.FragIgnoreDf)
620         buf.EncodeBytes(m.ICMPIP4ErrRelaySrc[:], 4)
621         buf.EncodeBool(m.ICMP6EnableUnreachable)
622         buf.EncodeBytes(m.IP4NhAddress[:], 4)
623         buf.EncodeBytes(m.IP6NhAddress[:], 16)
624         buf.EncodeUint16(m.IP4LifetimeMs)
625         buf.EncodeUint16(m.IP4PoolSize)
626         buf.EncodeUint32(m.IP4Buffers)
627         buf.EncodeFloat64(m.IP4HtRatio)
628         buf.EncodeBool(m.SecCheckEnable)
629         buf.EncodeBool(m.SecCheckFragments)
630         buf.EncodeBool(m.TcCopy)
631         buf.EncodeUint8(m.TcClass)
632         return buf.Bytes(), nil
633 }
634 func (m *MapParamGetReply) Unmarshal(b []byte) error {
635         buf := codec.NewBuffer(b)
636         m.Retval = buf.DecodeInt32()
637         m.FragInner = buf.DecodeUint8()
638         m.FragIgnoreDf = buf.DecodeUint8()
639         copy(m.ICMPIP4ErrRelaySrc[:], buf.DecodeBytes(4))
640         m.ICMP6EnableUnreachable = buf.DecodeBool()
641         copy(m.IP4NhAddress[:], buf.DecodeBytes(4))
642         copy(m.IP6NhAddress[:], buf.DecodeBytes(16))
643         m.IP4LifetimeMs = buf.DecodeUint16()
644         m.IP4PoolSize = buf.DecodeUint16()
645         m.IP4Buffers = buf.DecodeUint32()
646         m.IP4HtRatio = buf.DecodeFloat64()
647         m.SecCheckEnable = buf.DecodeBool()
648         m.SecCheckFragments = buf.DecodeBool()
649         m.TcCopy = buf.DecodeBool()
650         m.TcClass = buf.DecodeUint8()
651         return nil
652 }
653
654 // MapParamSetFragmentation defines message 'map_param_set_fragmentation'.
655 type MapParamSetFragmentation struct {
656         Inner    bool `binapi:"bool,name=inner" json:"inner,omitempty"`
657         IgnoreDf bool `binapi:"bool,name=ignore_df" json:"ignore_df,omitempty"`
658 }
659
660 func (m *MapParamSetFragmentation) Reset()               { *m = MapParamSetFragmentation{} }
661 func (*MapParamSetFragmentation) GetMessageName() string { return "map_param_set_fragmentation" }
662 func (*MapParamSetFragmentation) GetCrcString() string   { return "9ff54d90" }
663 func (*MapParamSetFragmentation) GetMessageType() api.MessageType {
664         return api.RequestMessage
665 }
666
667 func (m *MapParamSetFragmentation) Size() (size int) {
668         if m == nil {
669                 return 0
670         }
671         size += 1 // m.Inner
672         size += 1 // m.IgnoreDf
673         return size
674 }
675 func (m *MapParamSetFragmentation) Marshal(b []byte) ([]byte, error) {
676         if b == nil {
677                 b = make([]byte, m.Size())
678         }
679         buf := codec.NewBuffer(b)
680         buf.EncodeBool(m.Inner)
681         buf.EncodeBool(m.IgnoreDf)
682         return buf.Bytes(), nil
683 }
684 func (m *MapParamSetFragmentation) Unmarshal(b []byte) error {
685         buf := codec.NewBuffer(b)
686         m.Inner = buf.DecodeBool()
687         m.IgnoreDf = buf.DecodeBool()
688         return nil
689 }
690
691 // MapParamSetFragmentationReply defines message 'map_param_set_fragmentation_reply'.
692 type MapParamSetFragmentationReply struct {
693         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
694 }
695
696 func (m *MapParamSetFragmentationReply) Reset() { *m = MapParamSetFragmentationReply{} }
697 func (*MapParamSetFragmentationReply) GetMessageName() string {
698         return "map_param_set_fragmentation_reply"
699 }
700 func (*MapParamSetFragmentationReply) GetCrcString() string { return "e8d4e804" }
701 func (*MapParamSetFragmentationReply) GetMessageType() api.MessageType {
702         return api.ReplyMessage
703 }
704
705 func (m *MapParamSetFragmentationReply) Size() (size int) {
706         if m == nil {
707                 return 0
708         }
709         size += 4 // m.Retval
710         return size
711 }
712 func (m *MapParamSetFragmentationReply) Marshal(b []byte) ([]byte, error) {
713         if b == nil {
714                 b = make([]byte, m.Size())
715         }
716         buf := codec.NewBuffer(b)
717         buf.EncodeInt32(m.Retval)
718         return buf.Bytes(), nil
719 }
720 func (m *MapParamSetFragmentationReply) Unmarshal(b []byte) error {
721         buf := codec.NewBuffer(b)
722         m.Retval = buf.DecodeInt32()
723         return nil
724 }
725
726 // MapParamSetICMP defines message 'map_param_set_icmp'.
727 type MapParamSetICMP struct {
728         IP4ErrRelaySrc ip_types.IP4Address `binapi:"ip4_address,name=ip4_err_relay_src" json:"ip4_err_relay_src,omitempty"`
729 }
730
731 func (m *MapParamSetICMP) Reset()               { *m = MapParamSetICMP{} }
732 func (*MapParamSetICMP) GetMessageName() string { return "map_param_set_icmp" }
733 func (*MapParamSetICMP) GetCrcString() string   { return "58210cbf" }
734 func (*MapParamSetICMP) GetMessageType() api.MessageType {
735         return api.RequestMessage
736 }
737
738 func (m *MapParamSetICMP) Size() (size int) {
739         if m == nil {
740                 return 0
741         }
742         size += 1 * 4 // m.IP4ErrRelaySrc
743         return size
744 }
745 func (m *MapParamSetICMP) Marshal(b []byte) ([]byte, error) {
746         if b == nil {
747                 b = make([]byte, m.Size())
748         }
749         buf := codec.NewBuffer(b)
750         buf.EncodeBytes(m.IP4ErrRelaySrc[:], 4)
751         return buf.Bytes(), nil
752 }
753 func (m *MapParamSetICMP) Unmarshal(b []byte) error {
754         buf := codec.NewBuffer(b)
755         copy(m.IP4ErrRelaySrc[:], buf.DecodeBytes(4))
756         return nil
757 }
758
759 // MapParamSetICMP6 defines message 'map_param_set_icmp6'.
760 type MapParamSetICMP6 struct {
761         EnableUnreachable bool `binapi:"bool,name=enable_unreachable" json:"enable_unreachable,omitempty"`
762 }
763
764 func (m *MapParamSetICMP6) Reset()               { *m = MapParamSetICMP6{} }
765 func (*MapParamSetICMP6) GetMessageName() string { return "map_param_set_icmp6" }
766 func (*MapParamSetICMP6) GetCrcString() string   { return "5d01f8c1" }
767 func (*MapParamSetICMP6) GetMessageType() api.MessageType {
768         return api.RequestMessage
769 }
770
771 func (m *MapParamSetICMP6) Size() (size int) {
772         if m == nil {
773                 return 0
774         }
775         size += 1 // m.EnableUnreachable
776         return size
777 }
778 func (m *MapParamSetICMP6) Marshal(b []byte) ([]byte, error) {
779         if b == nil {
780                 b = make([]byte, m.Size())
781         }
782         buf := codec.NewBuffer(b)
783         buf.EncodeBool(m.EnableUnreachable)
784         return buf.Bytes(), nil
785 }
786 func (m *MapParamSetICMP6) Unmarshal(b []byte) error {
787         buf := codec.NewBuffer(b)
788         m.EnableUnreachable = buf.DecodeBool()
789         return nil
790 }
791
792 // MapParamSetICMP6Reply defines message 'map_param_set_icmp6_reply'.
793 type MapParamSetICMP6Reply struct {
794         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
795 }
796
797 func (m *MapParamSetICMP6Reply) Reset()               { *m = MapParamSetICMP6Reply{} }
798 func (*MapParamSetICMP6Reply) GetMessageName() string { return "map_param_set_icmp6_reply" }
799 func (*MapParamSetICMP6Reply) GetCrcString() string   { return "e8d4e804" }
800 func (*MapParamSetICMP6Reply) GetMessageType() api.MessageType {
801         return api.ReplyMessage
802 }
803
804 func (m *MapParamSetICMP6Reply) Size() (size int) {
805         if m == nil {
806                 return 0
807         }
808         size += 4 // m.Retval
809         return size
810 }
811 func (m *MapParamSetICMP6Reply) Marshal(b []byte) ([]byte, error) {
812         if b == nil {
813                 b = make([]byte, m.Size())
814         }
815         buf := codec.NewBuffer(b)
816         buf.EncodeInt32(m.Retval)
817         return buf.Bytes(), nil
818 }
819 func (m *MapParamSetICMP6Reply) Unmarshal(b []byte) error {
820         buf := codec.NewBuffer(b)
821         m.Retval = buf.DecodeInt32()
822         return nil
823 }
824
825 // MapParamSetICMPReply defines message 'map_param_set_icmp_reply'.
826 type MapParamSetICMPReply struct {
827         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
828 }
829
830 func (m *MapParamSetICMPReply) Reset()               { *m = MapParamSetICMPReply{} }
831 func (*MapParamSetICMPReply) GetMessageName() string { return "map_param_set_icmp_reply" }
832 func (*MapParamSetICMPReply) GetCrcString() string   { return "e8d4e804" }
833 func (*MapParamSetICMPReply) GetMessageType() api.MessageType {
834         return api.ReplyMessage
835 }
836
837 func (m *MapParamSetICMPReply) Size() (size int) {
838         if m == nil {
839                 return 0
840         }
841         size += 4 // m.Retval
842         return size
843 }
844 func (m *MapParamSetICMPReply) Marshal(b []byte) ([]byte, error) {
845         if b == nil {
846                 b = make([]byte, m.Size())
847         }
848         buf := codec.NewBuffer(b)
849         buf.EncodeInt32(m.Retval)
850         return buf.Bytes(), nil
851 }
852 func (m *MapParamSetICMPReply) Unmarshal(b []byte) error {
853         buf := codec.NewBuffer(b)
854         m.Retval = buf.DecodeInt32()
855         return nil
856 }
857
858 // MapParamSetSecurityCheck defines message 'map_param_set_security_check'.
859 type MapParamSetSecurityCheck struct {
860         Enable    bool `binapi:"bool,name=enable" json:"enable,omitempty"`
861         Fragments bool `binapi:"bool,name=fragments" json:"fragments,omitempty"`
862 }
863
864 func (m *MapParamSetSecurityCheck) Reset()               { *m = MapParamSetSecurityCheck{} }
865 func (*MapParamSetSecurityCheck) GetMessageName() string { return "map_param_set_security_check" }
866 func (*MapParamSetSecurityCheck) GetCrcString() string   { return "6abe9836" }
867 func (*MapParamSetSecurityCheck) GetMessageType() api.MessageType {
868         return api.RequestMessage
869 }
870
871 func (m *MapParamSetSecurityCheck) Size() (size int) {
872         if m == nil {
873                 return 0
874         }
875         size += 1 // m.Enable
876         size += 1 // m.Fragments
877         return size
878 }
879 func (m *MapParamSetSecurityCheck) Marshal(b []byte) ([]byte, error) {
880         if b == nil {
881                 b = make([]byte, m.Size())
882         }
883         buf := codec.NewBuffer(b)
884         buf.EncodeBool(m.Enable)
885         buf.EncodeBool(m.Fragments)
886         return buf.Bytes(), nil
887 }
888 func (m *MapParamSetSecurityCheck) Unmarshal(b []byte) error {
889         buf := codec.NewBuffer(b)
890         m.Enable = buf.DecodeBool()
891         m.Fragments = buf.DecodeBool()
892         return nil
893 }
894
895 // MapParamSetSecurityCheckReply defines message 'map_param_set_security_check_reply'.
896 type MapParamSetSecurityCheckReply struct {
897         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
898 }
899
900 func (m *MapParamSetSecurityCheckReply) Reset() { *m = MapParamSetSecurityCheckReply{} }
901 func (*MapParamSetSecurityCheckReply) GetMessageName() string {
902         return "map_param_set_security_check_reply"
903 }
904 func (*MapParamSetSecurityCheckReply) GetCrcString() string { return "e8d4e804" }
905 func (*MapParamSetSecurityCheckReply) GetMessageType() api.MessageType {
906         return api.ReplyMessage
907 }
908
909 func (m *MapParamSetSecurityCheckReply) Size() (size int) {
910         if m == nil {
911                 return 0
912         }
913         size += 4 // m.Retval
914         return size
915 }
916 func (m *MapParamSetSecurityCheckReply) Marshal(b []byte) ([]byte, error) {
917         if b == nil {
918                 b = make([]byte, m.Size())
919         }
920         buf := codec.NewBuffer(b)
921         buf.EncodeInt32(m.Retval)
922         return buf.Bytes(), nil
923 }
924 func (m *MapParamSetSecurityCheckReply) Unmarshal(b []byte) error {
925         buf := codec.NewBuffer(b)
926         m.Retval = buf.DecodeInt32()
927         return nil
928 }
929
930 // MapParamSetTCP defines message 'map_param_set_tcp'.
931 type MapParamSetTCP struct {
932         TCPMss uint16 `binapi:"u16,name=tcp_mss" json:"tcp_mss,omitempty"`
933 }
934
935 func (m *MapParamSetTCP) Reset()               { *m = MapParamSetTCP{} }
936 func (*MapParamSetTCP) GetMessageName() string { return "map_param_set_tcp" }
937 func (*MapParamSetTCP) GetCrcString() string   { return "87a825d9" }
938 func (*MapParamSetTCP) GetMessageType() api.MessageType {
939         return api.RequestMessage
940 }
941
942 func (m *MapParamSetTCP) Size() (size int) {
943         if m == nil {
944                 return 0
945         }
946         size += 2 // m.TCPMss
947         return size
948 }
949 func (m *MapParamSetTCP) Marshal(b []byte) ([]byte, error) {
950         if b == nil {
951                 b = make([]byte, m.Size())
952         }
953         buf := codec.NewBuffer(b)
954         buf.EncodeUint16(m.TCPMss)
955         return buf.Bytes(), nil
956 }
957 func (m *MapParamSetTCP) Unmarshal(b []byte) error {
958         buf := codec.NewBuffer(b)
959         m.TCPMss = buf.DecodeUint16()
960         return nil
961 }
962
963 // MapParamSetTCPReply defines message 'map_param_set_tcp_reply'.
964 type MapParamSetTCPReply struct {
965         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
966 }
967
968 func (m *MapParamSetTCPReply) Reset()               { *m = MapParamSetTCPReply{} }
969 func (*MapParamSetTCPReply) GetMessageName() string { return "map_param_set_tcp_reply" }
970 func (*MapParamSetTCPReply) GetCrcString() string   { return "e8d4e804" }
971 func (*MapParamSetTCPReply) GetMessageType() api.MessageType {
972         return api.ReplyMessage
973 }
974
975 func (m *MapParamSetTCPReply) Size() (size int) {
976         if m == nil {
977                 return 0
978         }
979         size += 4 // m.Retval
980         return size
981 }
982 func (m *MapParamSetTCPReply) Marshal(b []byte) ([]byte, error) {
983         if b == nil {
984                 b = make([]byte, m.Size())
985         }
986         buf := codec.NewBuffer(b)
987         buf.EncodeInt32(m.Retval)
988         return buf.Bytes(), nil
989 }
990 func (m *MapParamSetTCPReply) Unmarshal(b []byte) error {
991         buf := codec.NewBuffer(b)
992         m.Retval = buf.DecodeInt32()
993         return nil
994 }
995
996 // MapParamSetTrafficClass defines message 'map_param_set_traffic_class'.
997 type MapParamSetTrafficClass struct {
998         Copy    bool  `binapi:"bool,name=copy" json:"copy,omitempty"`
999         TcClass uint8 `binapi:"u8,name=tc_class" json:"tc_class,omitempty"`
1000 }
1001
1002 func (m *MapParamSetTrafficClass) Reset()               { *m = MapParamSetTrafficClass{} }
1003 func (*MapParamSetTrafficClass) GetMessageName() string { return "map_param_set_traffic_class" }
1004 func (*MapParamSetTrafficClass) GetCrcString() string   { return "9cac455c" }
1005 func (*MapParamSetTrafficClass) GetMessageType() api.MessageType {
1006         return api.RequestMessage
1007 }
1008
1009 func (m *MapParamSetTrafficClass) Size() (size int) {
1010         if m == nil {
1011                 return 0
1012         }
1013         size += 1 // m.Copy
1014         size += 1 // m.TcClass
1015         return size
1016 }
1017 func (m *MapParamSetTrafficClass) Marshal(b []byte) ([]byte, error) {
1018         if b == nil {
1019                 b = make([]byte, m.Size())
1020         }
1021         buf := codec.NewBuffer(b)
1022         buf.EncodeBool(m.Copy)
1023         buf.EncodeUint8(m.TcClass)
1024         return buf.Bytes(), nil
1025 }
1026 func (m *MapParamSetTrafficClass) Unmarshal(b []byte) error {
1027         buf := codec.NewBuffer(b)
1028         m.Copy = buf.DecodeBool()
1029         m.TcClass = buf.DecodeUint8()
1030         return nil
1031 }
1032
1033 // MapParamSetTrafficClassReply defines message 'map_param_set_traffic_class_reply'.
1034 type MapParamSetTrafficClassReply struct {
1035         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1036 }
1037
1038 func (m *MapParamSetTrafficClassReply) Reset() { *m = MapParamSetTrafficClassReply{} }
1039 func (*MapParamSetTrafficClassReply) GetMessageName() string {
1040         return "map_param_set_traffic_class_reply"
1041 }
1042 func (*MapParamSetTrafficClassReply) GetCrcString() string { return "e8d4e804" }
1043 func (*MapParamSetTrafficClassReply) GetMessageType() api.MessageType {
1044         return api.ReplyMessage
1045 }
1046
1047 func (m *MapParamSetTrafficClassReply) Size() (size int) {
1048         if m == nil {
1049                 return 0
1050         }
1051         size += 4 // m.Retval
1052         return size
1053 }
1054 func (m *MapParamSetTrafficClassReply) Marshal(b []byte) ([]byte, error) {
1055         if b == nil {
1056                 b = make([]byte, m.Size())
1057         }
1058         buf := codec.NewBuffer(b)
1059         buf.EncodeInt32(m.Retval)
1060         return buf.Bytes(), nil
1061 }
1062 func (m *MapParamSetTrafficClassReply) Unmarshal(b []byte) error {
1063         buf := codec.NewBuffer(b)
1064         m.Retval = buf.DecodeInt32()
1065         return nil
1066 }
1067
1068 // MapRuleDetails defines message 'map_rule_details'.
1069 type MapRuleDetails struct {
1070         IP6Dst ip_types.IP6Address `binapi:"ip6_address,name=ip6_dst" json:"ip6_dst,omitempty"`
1071         Psid   uint16              `binapi:"u16,name=psid" json:"psid,omitempty"`
1072 }
1073
1074 func (m *MapRuleDetails) Reset()               { *m = MapRuleDetails{} }
1075 func (*MapRuleDetails) GetMessageName() string { return "map_rule_details" }
1076 func (*MapRuleDetails) GetCrcString() string   { return "c7cbeea5" }
1077 func (*MapRuleDetails) GetMessageType() api.MessageType {
1078         return api.ReplyMessage
1079 }
1080
1081 func (m *MapRuleDetails) Size() (size int) {
1082         if m == nil {
1083                 return 0
1084         }
1085         size += 1 * 16 // m.IP6Dst
1086         size += 2      // m.Psid
1087         return size
1088 }
1089 func (m *MapRuleDetails) Marshal(b []byte) ([]byte, error) {
1090         if b == nil {
1091                 b = make([]byte, m.Size())
1092         }
1093         buf := codec.NewBuffer(b)
1094         buf.EncodeBytes(m.IP6Dst[:], 16)
1095         buf.EncodeUint16(m.Psid)
1096         return buf.Bytes(), nil
1097 }
1098 func (m *MapRuleDetails) Unmarshal(b []byte) error {
1099         buf := codec.NewBuffer(b)
1100         copy(m.IP6Dst[:], buf.DecodeBytes(16))
1101         m.Psid = buf.DecodeUint16()
1102         return nil
1103 }
1104
1105 // MapRuleDump defines message 'map_rule_dump'.
1106 type MapRuleDump struct {
1107         DomainIndex uint32 `binapi:"u32,name=domain_index" json:"domain_index,omitempty"`
1108 }
1109
1110 func (m *MapRuleDump) Reset()               { *m = MapRuleDump{} }
1111 func (*MapRuleDump) GetMessageName() string { return "map_rule_dump" }
1112 func (*MapRuleDump) GetCrcString() string   { return "e43e6ff6" }
1113 func (*MapRuleDump) GetMessageType() api.MessageType {
1114         return api.RequestMessage
1115 }
1116
1117 func (m *MapRuleDump) Size() (size int) {
1118         if m == nil {
1119                 return 0
1120         }
1121         size += 4 // m.DomainIndex
1122         return size
1123 }
1124 func (m *MapRuleDump) Marshal(b []byte) ([]byte, error) {
1125         if b == nil {
1126                 b = make([]byte, m.Size())
1127         }
1128         buf := codec.NewBuffer(b)
1129         buf.EncodeUint32(m.DomainIndex)
1130         return buf.Bytes(), nil
1131 }
1132 func (m *MapRuleDump) Unmarshal(b []byte) error {
1133         buf := codec.NewBuffer(b)
1134         m.DomainIndex = buf.DecodeUint32()
1135         return nil
1136 }
1137
1138 // MapSummaryStats defines message 'map_summary_stats'.
1139 type MapSummaryStats struct{}
1140
1141 func (m *MapSummaryStats) Reset()               { *m = MapSummaryStats{} }
1142 func (*MapSummaryStats) GetMessageName() string { return "map_summary_stats" }
1143 func (*MapSummaryStats) GetCrcString() string   { return "51077d14" }
1144 func (*MapSummaryStats) GetMessageType() api.MessageType {
1145         return api.RequestMessage
1146 }
1147
1148 func (m *MapSummaryStats) Size() (size int) {
1149         if m == nil {
1150                 return 0
1151         }
1152         return size
1153 }
1154 func (m *MapSummaryStats) Marshal(b []byte) ([]byte, error) {
1155         if b == nil {
1156                 b = make([]byte, m.Size())
1157         }
1158         buf := codec.NewBuffer(b)
1159         return buf.Bytes(), nil
1160 }
1161 func (m *MapSummaryStats) Unmarshal(b []byte) error {
1162         return nil
1163 }
1164
1165 // MapSummaryStatsReply defines message 'map_summary_stats_reply'.
1166 type MapSummaryStatsReply struct {
1167         Retval             int32    `binapi:"i32,name=retval" json:"retval,omitempty"`
1168         TotalBindings      uint64   `binapi:"u64,name=total_bindings" json:"total_bindings,omitempty"`
1169         TotalPkts          []uint64 `binapi:"u64[2],name=total_pkts" json:"total_pkts,omitempty"`
1170         TotalBytes         []uint64 `binapi:"u64[2],name=total_bytes" json:"total_bytes,omitempty"`
1171         TotalIP4Fragments  uint64   `binapi:"u64,name=total_ip4_fragments" json:"total_ip4_fragments,omitempty"`
1172         TotalSecurityCheck []uint64 `binapi:"u64[2],name=total_security_check" json:"total_security_check,omitempty"`
1173 }
1174
1175 func (m *MapSummaryStatsReply) Reset()               { *m = MapSummaryStatsReply{} }
1176 func (*MapSummaryStatsReply) GetMessageName() string { return "map_summary_stats_reply" }
1177 func (*MapSummaryStatsReply) GetCrcString() string   { return "0e4ace0e" }
1178 func (*MapSummaryStatsReply) GetMessageType() api.MessageType {
1179         return api.ReplyMessage
1180 }
1181
1182 func (m *MapSummaryStatsReply) Size() (size int) {
1183         if m == nil {
1184                 return 0
1185         }
1186         size += 4     // m.Retval
1187         size += 8     // m.TotalBindings
1188         size += 8 * 2 // m.TotalPkts
1189         size += 8 * 2 // m.TotalBytes
1190         size += 8     // m.TotalIP4Fragments
1191         size += 8 * 2 // m.TotalSecurityCheck
1192         return size
1193 }
1194 func (m *MapSummaryStatsReply) Marshal(b []byte) ([]byte, error) {
1195         if b == nil {
1196                 b = make([]byte, m.Size())
1197         }
1198         buf := codec.NewBuffer(b)
1199         buf.EncodeInt32(m.Retval)
1200         buf.EncodeUint64(m.TotalBindings)
1201         for i := 0; i < 2; i++ {
1202                 var x uint64
1203                 if i < len(m.TotalPkts) {
1204                         x = uint64(m.TotalPkts[i])
1205                 }
1206                 buf.EncodeUint64(x)
1207         }
1208         for i := 0; i < 2; i++ {
1209                 var x uint64
1210                 if i < len(m.TotalBytes) {
1211                         x = uint64(m.TotalBytes[i])
1212                 }
1213                 buf.EncodeUint64(x)
1214         }
1215         buf.EncodeUint64(m.TotalIP4Fragments)
1216         for i := 0; i < 2; i++ {
1217                 var x uint64
1218                 if i < len(m.TotalSecurityCheck) {
1219                         x = uint64(m.TotalSecurityCheck[i])
1220                 }
1221                 buf.EncodeUint64(x)
1222         }
1223         return buf.Bytes(), nil
1224 }
1225 func (m *MapSummaryStatsReply) Unmarshal(b []byte) error {
1226         buf := codec.NewBuffer(b)
1227         m.Retval = buf.DecodeInt32()
1228         m.TotalBindings = buf.DecodeUint64()
1229         m.TotalPkts = make([]uint64, 2)
1230         for i := 0; i < len(m.TotalPkts); i++ {
1231                 m.TotalPkts[i] = buf.DecodeUint64()
1232         }
1233         m.TotalBytes = make([]uint64, 2)
1234         for i := 0; i < len(m.TotalBytes); i++ {
1235                 m.TotalBytes[i] = buf.DecodeUint64()
1236         }
1237         m.TotalIP4Fragments = buf.DecodeUint64()
1238         m.TotalSecurityCheck = make([]uint64, 2)
1239         for i := 0; i < len(m.TotalSecurityCheck); i++ {
1240                 m.TotalSecurityCheck[i] = buf.DecodeUint64()
1241         }
1242         return nil
1243 }
1244
1245 func init() { file_maps_binapi_init() }
1246 func file_maps_binapi_init() {
1247         api.RegisterMessage((*MapAddDelRule)(nil), "map_add_del_rule_c65b32f7")
1248         api.RegisterMessage((*MapAddDelRuleReply)(nil), "map_add_del_rule_reply_e8d4e804")
1249         api.RegisterMessage((*MapAddDomain)(nil), "map_add_domain_7a5a18c9")
1250         api.RegisterMessage((*MapAddDomainReply)(nil), "map_add_domain_reply_3e6d4e2c")
1251         api.RegisterMessage((*MapDelDomain)(nil), "map_del_domain_8ac76db6")
1252         api.RegisterMessage((*MapDelDomainReply)(nil), "map_del_domain_reply_e8d4e804")
1253         api.RegisterMessage((*MapDomainDetails)(nil), "map_domain_details_fc1859dd")
1254         api.RegisterMessage((*MapDomainDump)(nil), "map_domain_dump_51077d14")
1255         api.RegisterMessage((*MapIfEnableDisable)(nil), "map_if_enable_disable_59bb32f4")
1256         api.RegisterMessage((*MapIfEnableDisableReply)(nil), "map_if_enable_disable_reply_e8d4e804")
1257         api.RegisterMessage((*MapParamAddDelPreResolve)(nil), "map_param_add_del_pre_resolve_17008c66")
1258         api.RegisterMessage((*MapParamAddDelPreResolveReply)(nil), "map_param_add_del_pre_resolve_reply_e8d4e804")
1259         api.RegisterMessage((*MapParamGet)(nil), "map_param_get_51077d14")
1260         api.RegisterMessage((*MapParamGetReply)(nil), "map_param_get_reply_28092156")
1261         api.RegisterMessage((*MapParamSetFragmentation)(nil), "map_param_set_fragmentation_9ff54d90")
1262         api.RegisterMessage((*MapParamSetFragmentationReply)(nil), "map_param_set_fragmentation_reply_e8d4e804")
1263         api.RegisterMessage((*MapParamSetICMP)(nil), "map_param_set_icmp_58210cbf")
1264         api.RegisterMessage((*MapParamSetICMP6)(nil), "map_param_set_icmp6_5d01f8c1")
1265         api.RegisterMessage((*MapParamSetICMP6Reply)(nil), "map_param_set_icmp6_reply_e8d4e804")
1266         api.RegisterMessage((*MapParamSetICMPReply)(nil), "map_param_set_icmp_reply_e8d4e804")
1267         api.RegisterMessage((*MapParamSetSecurityCheck)(nil), "map_param_set_security_check_6abe9836")
1268         api.RegisterMessage((*MapParamSetSecurityCheckReply)(nil), "map_param_set_security_check_reply_e8d4e804")
1269         api.RegisterMessage((*MapParamSetTCP)(nil), "map_param_set_tcp_87a825d9")
1270         api.RegisterMessage((*MapParamSetTCPReply)(nil), "map_param_set_tcp_reply_e8d4e804")
1271         api.RegisterMessage((*MapParamSetTrafficClass)(nil), "map_param_set_traffic_class_9cac455c")
1272         api.RegisterMessage((*MapParamSetTrafficClassReply)(nil), "map_param_set_traffic_class_reply_e8d4e804")
1273         api.RegisterMessage((*MapRuleDetails)(nil), "map_rule_details_c7cbeea5")
1274         api.RegisterMessage((*MapRuleDump)(nil), "map_rule_dump_e43e6ff6")
1275         api.RegisterMessage((*MapSummaryStats)(nil), "map_summary_stats_51077d14")
1276         api.RegisterMessage((*MapSummaryStatsReply)(nil), "map_summary_stats_reply_0e4ace0e")
1277 }
1278
1279 // Messages returns list of all messages in this module.
1280 func AllMessages() []api.Message {
1281         return []api.Message{
1282                 (*MapAddDelRule)(nil),
1283                 (*MapAddDelRuleReply)(nil),
1284                 (*MapAddDomain)(nil),
1285                 (*MapAddDomainReply)(nil),
1286                 (*MapDelDomain)(nil),
1287                 (*MapDelDomainReply)(nil),
1288                 (*MapDomainDetails)(nil),
1289                 (*MapDomainDump)(nil),
1290                 (*MapIfEnableDisable)(nil),
1291                 (*MapIfEnableDisableReply)(nil),
1292                 (*MapParamAddDelPreResolve)(nil),
1293                 (*MapParamAddDelPreResolveReply)(nil),
1294                 (*MapParamGet)(nil),
1295                 (*MapParamGetReply)(nil),
1296                 (*MapParamSetFragmentation)(nil),
1297                 (*MapParamSetFragmentationReply)(nil),
1298                 (*MapParamSetICMP)(nil),
1299                 (*MapParamSetICMP6)(nil),
1300                 (*MapParamSetICMP6Reply)(nil),
1301                 (*MapParamSetICMPReply)(nil),
1302                 (*MapParamSetSecurityCheck)(nil),
1303                 (*MapParamSetSecurityCheckReply)(nil),
1304                 (*MapParamSetTCP)(nil),
1305                 (*MapParamSetTCPReply)(nil),
1306                 (*MapParamSetTrafficClass)(nil),
1307                 (*MapParamSetTrafficClassReply)(nil),
1308                 (*MapRuleDetails)(nil),
1309                 (*MapRuleDump)(nil),
1310                 (*MapSummaryStats)(nil),
1311                 (*MapSummaryStatsReply)(nil),
1312         }
1313 }