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