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