Update generated binapi to v22.02 & makefile changes
[govpp.git] / internal / testbinapi / binapi2001 / nat / nat.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.5.0-dev
4 //  VPP:              20.01
5 // source: .vppapi/plugins/nat.api.json
6
7 // Package nat contains generated bindings for API file nat.api.
8 //
9 // Contents:
10 //   6 aliases
11 //  12 enums
12 //   7 structs
13 //   1 union
14 // 131 messages
15 //
16 package nat
17
18 import (
19         "fmt"
20         "net"
21         "strconv"
22         "strings"
23
24         api "git.fd.io/govpp.git/api"
25         codec "git.fd.io/govpp.git/codec"
26 )
27
28 // This is a compile-time assertion to ensure that this generated file
29 // is compatible with the GoVPP api package it is being compiled against.
30 // A compilation error at this line likely means your copy of the
31 // GoVPP api package needs to be updated.
32 const _ = api.GoVppAPIPackageIsVersion2
33
34 const (
35         APIFile    = "nat"
36         APIVersion = "5.2.0"
37         VersionCrc = 0xef1a1c94
38 )
39
40 // AddressFamily defines enum 'address_family'.
41 type AddressFamily uint32
42
43 const (
44         ADDRESS_IP4 AddressFamily = 0
45         ADDRESS_IP6 AddressFamily = 1
46 )
47
48 var (
49         AddressFamily_name = map[uint32]string{
50                 0: "ADDRESS_IP4",
51                 1: "ADDRESS_IP6",
52         }
53         AddressFamily_value = map[string]uint32{
54                 "ADDRESS_IP4": 0,
55                 "ADDRESS_IP6": 1,
56         }
57 )
58
59 func (x AddressFamily) String() string {
60         s, ok := AddressFamily_name[uint32(x)]
61         if ok {
62                 return s
63         }
64         return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
65 }
66
67 // IfStatusFlags defines enum 'if_status_flags'.
68 type IfStatusFlags uint32
69
70 const (
71         IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
72         IF_STATUS_API_FLAG_LINK_UP  IfStatusFlags = 2
73 )
74
75 var (
76         IfStatusFlags_name = map[uint32]string{
77                 1: "IF_STATUS_API_FLAG_ADMIN_UP",
78                 2: "IF_STATUS_API_FLAG_LINK_UP",
79         }
80         IfStatusFlags_value = map[string]uint32{
81                 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
82                 "IF_STATUS_API_FLAG_LINK_UP":  2,
83         }
84 )
85
86 func (x IfStatusFlags) String() string {
87         s, ok := IfStatusFlags_name[uint32(x)]
88         if ok {
89                 return s
90         }
91         str := func(n uint32) string {
92                 s, ok := IfStatusFlags_name[uint32(n)]
93                 if ok {
94                         return s
95                 }
96                 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
97         }
98         for i := uint32(0); i <= 32; i++ {
99                 val := uint32(x)
100                 if val&(1<<i) != 0 {
101                         if s != "" {
102                                 s += "|"
103                         }
104                         s += str(1 << i)
105                 }
106         }
107         if s == "" {
108                 return str(uint32(x))
109         }
110         return s
111 }
112
113 // IfType defines enum 'if_type'.
114 type IfType uint32
115
116 const (
117         IF_API_TYPE_HARDWARE IfType = 1
118         IF_API_TYPE_SUB      IfType = 2
119         IF_API_TYPE_P2P      IfType = 3
120         IF_API_TYPE_PIPE     IfType = 4
121 )
122
123 var (
124         IfType_name = map[uint32]string{
125                 1: "IF_API_TYPE_HARDWARE",
126                 2: "IF_API_TYPE_SUB",
127                 3: "IF_API_TYPE_P2P",
128                 4: "IF_API_TYPE_PIPE",
129         }
130         IfType_value = map[string]uint32{
131                 "IF_API_TYPE_HARDWARE": 1,
132                 "IF_API_TYPE_SUB":      2,
133                 "IF_API_TYPE_P2P":      3,
134                 "IF_API_TYPE_PIPE":     4,
135         }
136 )
137
138 func (x IfType) String() string {
139         s, ok := IfType_name[uint32(x)]
140         if ok {
141                 return s
142         }
143         return "IfType(" + strconv.Itoa(int(x)) + ")"
144 }
145
146 // IPDscp defines enum 'ip_dscp'.
147 type IPDscp uint8
148
149 const (
150         IP_API_DSCP_CS0  IPDscp = 0
151         IP_API_DSCP_CS1  IPDscp = 8
152         IP_API_DSCP_AF11 IPDscp = 10
153         IP_API_DSCP_AF12 IPDscp = 12
154         IP_API_DSCP_AF13 IPDscp = 14
155         IP_API_DSCP_CS2  IPDscp = 16
156         IP_API_DSCP_AF21 IPDscp = 18
157         IP_API_DSCP_AF22 IPDscp = 20
158         IP_API_DSCP_AF23 IPDscp = 22
159         IP_API_DSCP_CS3  IPDscp = 24
160         IP_API_DSCP_AF31 IPDscp = 26
161         IP_API_DSCP_AF32 IPDscp = 28
162         IP_API_DSCP_AF33 IPDscp = 30
163         IP_API_DSCP_CS4  IPDscp = 32
164         IP_API_DSCP_AF41 IPDscp = 34
165         IP_API_DSCP_AF42 IPDscp = 36
166         IP_API_DSCP_AF43 IPDscp = 38
167         IP_API_DSCP_CS5  IPDscp = 40
168         IP_API_DSCP_EF   IPDscp = 46
169         IP_API_DSCP_CS6  IPDscp = 48
170         IP_API_DSCP_CS7  IPDscp = 50
171 )
172
173 var (
174         IPDscp_name = map[uint8]string{
175                 0:  "IP_API_DSCP_CS0",
176                 8:  "IP_API_DSCP_CS1",
177                 10: "IP_API_DSCP_AF11",
178                 12: "IP_API_DSCP_AF12",
179                 14: "IP_API_DSCP_AF13",
180                 16: "IP_API_DSCP_CS2",
181                 18: "IP_API_DSCP_AF21",
182                 20: "IP_API_DSCP_AF22",
183                 22: "IP_API_DSCP_AF23",
184                 24: "IP_API_DSCP_CS3",
185                 26: "IP_API_DSCP_AF31",
186                 28: "IP_API_DSCP_AF32",
187                 30: "IP_API_DSCP_AF33",
188                 32: "IP_API_DSCP_CS4",
189                 34: "IP_API_DSCP_AF41",
190                 36: "IP_API_DSCP_AF42",
191                 38: "IP_API_DSCP_AF43",
192                 40: "IP_API_DSCP_CS5",
193                 46: "IP_API_DSCP_EF",
194                 48: "IP_API_DSCP_CS6",
195                 50: "IP_API_DSCP_CS7",
196         }
197         IPDscp_value = map[string]uint8{
198                 "IP_API_DSCP_CS0":  0,
199                 "IP_API_DSCP_CS1":  8,
200                 "IP_API_DSCP_AF11": 10,
201                 "IP_API_DSCP_AF12": 12,
202                 "IP_API_DSCP_AF13": 14,
203                 "IP_API_DSCP_CS2":  16,
204                 "IP_API_DSCP_AF21": 18,
205                 "IP_API_DSCP_AF22": 20,
206                 "IP_API_DSCP_AF23": 22,
207                 "IP_API_DSCP_CS3":  24,
208                 "IP_API_DSCP_AF31": 26,
209                 "IP_API_DSCP_AF32": 28,
210                 "IP_API_DSCP_AF33": 30,
211                 "IP_API_DSCP_CS4":  32,
212                 "IP_API_DSCP_AF41": 34,
213                 "IP_API_DSCP_AF42": 36,
214                 "IP_API_DSCP_AF43": 38,
215                 "IP_API_DSCP_CS5":  40,
216                 "IP_API_DSCP_EF":   46,
217                 "IP_API_DSCP_CS6":  48,
218                 "IP_API_DSCP_CS7":  50,
219         }
220 )
221
222 func (x IPDscp) String() string {
223         s, ok := IPDscp_name[uint8(x)]
224         if ok {
225                 return s
226         }
227         return "IPDscp(" + strconv.Itoa(int(x)) + ")"
228 }
229
230 // IPEcn defines enum 'ip_ecn'.
231 type IPEcn uint8
232
233 const (
234         IP_API_ECN_NONE IPEcn = 0
235         IP_API_ECN_ECT0 IPEcn = 1
236         IP_API_ECN_ECT1 IPEcn = 2
237         IP_API_ECN_CE   IPEcn = 3
238 )
239
240 var (
241         IPEcn_name = map[uint8]string{
242                 0: "IP_API_ECN_NONE",
243                 1: "IP_API_ECN_ECT0",
244                 2: "IP_API_ECN_ECT1",
245                 3: "IP_API_ECN_CE",
246         }
247         IPEcn_value = map[string]uint8{
248                 "IP_API_ECN_NONE": 0,
249                 "IP_API_ECN_ECT0": 1,
250                 "IP_API_ECN_ECT1": 2,
251                 "IP_API_ECN_CE":   3,
252         }
253 )
254
255 func (x IPEcn) String() string {
256         s, ok := IPEcn_name[uint8(x)]
257         if ok {
258                 return s
259         }
260         return "IPEcn(" + strconv.Itoa(int(x)) + ")"
261 }
262
263 // IPProto defines enum 'ip_proto'.
264 type IPProto uint32
265
266 const (
267         IP_API_PROTO_HOPOPT   IPProto = 0
268         IP_API_PROTO_ICMP     IPProto = 1
269         IP_API_PROTO_IGMP     IPProto = 2
270         IP_API_PROTO_TCP      IPProto = 6
271         IP_API_PROTO_UDP      IPProto = 17
272         IP_API_PROTO_GRE      IPProto = 47
273         IP_API_PROTO_AH       IPProto = 50
274         IP_API_PROTO_ESP      IPProto = 51
275         IP_API_PROTO_EIGRP    IPProto = 88
276         IP_API_PROTO_OSPF     IPProto = 89
277         IP_API_PROTO_SCTP     IPProto = 132
278         IP_API_PROTO_RESERVED IPProto = 255
279 )
280
281 var (
282         IPProto_name = map[uint32]string{
283                 0:   "IP_API_PROTO_HOPOPT",
284                 1:   "IP_API_PROTO_ICMP",
285                 2:   "IP_API_PROTO_IGMP",
286                 6:   "IP_API_PROTO_TCP",
287                 17:  "IP_API_PROTO_UDP",
288                 47:  "IP_API_PROTO_GRE",
289                 50:  "IP_API_PROTO_AH",
290                 51:  "IP_API_PROTO_ESP",
291                 88:  "IP_API_PROTO_EIGRP",
292                 89:  "IP_API_PROTO_OSPF",
293                 132: "IP_API_PROTO_SCTP",
294                 255: "IP_API_PROTO_RESERVED",
295         }
296         IPProto_value = map[string]uint32{
297                 "IP_API_PROTO_HOPOPT":   0,
298                 "IP_API_PROTO_ICMP":     1,
299                 "IP_API_PROTO_IGMP":     2,
300                 "IP_API_PROTO_TCP":      6,
301                 "IP_API_PROTO_UDP":      17,
302                 "IP_API_PROTO_GRE":      47,
303                 "IP_API_PROTO_AH":       50,
304                 "IP_API_PROTO_ESP":      51,
305                 "IP_API_PROTO_EIGRP":    88,
306                 "IP_API_PROTO_OSPF":     89,
307                 "IP_API_PROTO_SCTP":     132,
308                 "IP_API_PROTO_RESERVED": 255,
309         }
310 )
311
312 func (x IPProto) String() string {
313         s, ok := IPProto_name[uint32(x)]
314         if ok {
315                 return s
316         }
317         return "IPProto(" + strconv.Itoa(int(x)) + ")"
318 }
319
320 // LinkDuplex defines enum 'link_duplex'.
321 type LinkDuplex uint32
322
323 const (
324         LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
325         LINK_DUPLEX_API_HALF    LinkDuplex = 1
326         LINK_DUPLEX_API_FULL    LinkDuplex = 2
327 )
328
329 var (
330         LinkDuplex_name = map[uint32]string{
331                 0: "LINK_DUPLEX_API_UNKNOWN",
332                 1: "LINK_DUPLEX_API_HALF",
333                 2: "LINK_DUPLEX_API_FULL",
334         }
335         LinkDuplex_value = map[string]uint32{
336                 "LINK_DUPLEX_API_UNKNOWN": 0,
337                 "LINK_DUPLEX_API_HALF":    1,
338                 "LINK_DUPLEX_API_FULL":    2,
339         }
340 )
341
342 func (x LinkDuplex) String() string {
343         s, ok := LinkDuplex_name[uint32(x)]
344         if ok {
345                 return s
346         }
347         return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
348 }
349
350 // MtuProto defines enum 'mtu_proto'.
351 type MtuProto uint32
352
353 const (
354         MTU_PROTO_API_L3   MtuProto = 1
355         MTU_PROTO_API_IP4  MtuProto = 2
356         MTU_PROTO_API_IP6  MtuProto = 3
357         MTU_PROTO_API_MPLS MtuProto = 4
358         MTU_PROTO_API_N    MtuProto = 5
359 )
360
361 var (
362         MtuProto_name = map[uint32]string{
363                 1: "MTU_PROTO_API_L3",
364                 2: "MTU_PROTO_API_IP4",
365                 3: "MTU_PROTO_API_IP6",
366                 4: "MTU_PROTO_API_MPLS",
367                 5: "MTU_PROTO_API_N",
368         }
369         MtuProto_value = map[string]uint32{
370                 "MTU_PROTO_API_L3":   1,
371                 "MTU_PROTO_API_IP4":  2,
372                 "MTU_PROTO_API_IP6":  3,
373                 "MTU_PROTO_API_MPLS": 4,
374                 "MTU_PROTO_API_N":    5,
375         }
376 )
377
378 func (x MtuProto) String() string {
379         s, ok := MtuProto_name[uint32(x)]
380         if ok {
381                 return s
382         }
383         return "MtuProto(" + strconv.Itoa(int(x)) + ")"
384 }
385
386 // NatConfigFlags defines enum 'nat_config_flags'.
387 type NatConfigFlags uint8
388
389 const (
390         NAT_IS_NONE           NatConfigFlags = 0
391         NAT_IS_TWICE_NAT      NatConfigFlags = 1
392         NAT_IS_SELF_TWICE_NAT NatConfigFlags = 2
393         NAT_IS_OUT2IN_ONLY    NatConfigFlags = 4
394         NAT_IS_ADDR_ONLY      NatConfigFlags = 8
395         NAT_IS_OUTSIDE        NatConfigFlags = 16
396         NAT_IS_INSIDE         NatConfigFlags = 32
397         NAT_IS_STATIC         NatConfigFlags = 64
398         NAT_IS_EXT_HOST_VALID NatConfigFlags = 128
399 )
400
401 var (
402         NatConfigFlags_name = map[uint8]string{
403                 0:   "NAT_IS_NONE",
404                 1:   "NAT_IS_TWICE_NAT",
405                 2:   "NAT_IS_SELF_TWICE_NAT",
406                 4:   "NAT_IS_OUT2IN_ONLY",
407                 8:   "NAT_IS_ADDR_ONLY",
408                 16:  "NAT_IS_OUTSIDE",
409                 32:  "NAT_IS_INSIDE",
410                 64:  "NAT_IS_STATIC",
411                 128: "NAT_IS_EXT_HOST_VALID",
412         }
413         NatConfigFlags_value = map[string]uint8{
414                 "NAT_IS_NONE":           0,
415                 "NAT_IS_TWICE_NAT":      1,
416                 "NAT_IS_SELF_TWICE_NAT": 2,
417                 "NAT_IS_OUT2IN_ONLY":    4,
418                 "NAT_IS_ADDR_ONLY":      8,
419                 "NAT_IS_OUTSIDE":        16,
420                 "NAT_IS_INSIDE":         32,
421                 "NAT_IS_STATIC":         64,
422                 "NAT_IS_EXT_HOST_VALID": 128,
423         }
424 )
425
426 func (x NatConfigFlags) String() string {
427         s, ok := NatConfigFlags_name[uint8(x)]
428         if ok {
429                 return s
430         }
431         str := func(n uint8) string {
432                 s, ok := NatConfigFlags_name[uint8(n)]
433                 if ok {
434                         return s
435                 }
436                 return "NatConfigFlags(" + strconv.Itoa(int(n)) + ")"
437         }
438         for i := uint8(0); i <= 8; i++ {
439                 val := uint8(x)
440                 if val&(1<<i) != 0 {
441                         if s != "" {
442                                 s += "|"
443                         }
444                         s += str(1 << i)
445                 }
446         }
447         if s == "" {
448                 return str(uint8(x))
449         }
450         return s
451 }
452
453 // NatLogLevel defines enum 'nat_log_level'.
454 type NatLogLevel uint8
455
456 const (
457         NAT_LOG_NONE    NatLogLevel = 0
458         NAT_LOG_ERROR   NatLogLevel = 1
459         NAT_LOG_WARNING NatLogLevel = 2
460         NAT_LOG_NOTICE  NatLogLevel = 3
461         NAT_LOG_INFO    NatLogLevel = 4
462         NAT_LOG_DEBUG   NatLogLevel = 5
463 )
464
465 var (
466         NatLogLevel_name = map[uint8]string{
467                 0: "NAT_LOG_NONE",
468                 1: "NAT_LOG_ERROR",
469                 2: "NAT_LOG_WARNING",
470                 3: "NAT_LOG_NOTICE",
471                 4: "NAT_LOG_INFO",
472                 5: "NAT_LOG_DEBUG",
473         }
474         NatLogLevel_value = map[string]uint8{
475                 "NAT_LOG_NONE":    0,
476                 "NAT_LOG_ERROR":   1,
477                 "NAT_LOG_WARNING": 2,
478                 "NAT_LOG_NOTICE":  3,
479                 "NAT_LOG_INFO":    4,
480                 "NAT_LOG_DEBUG":   5,
481         }
482 )
483
484 func (x NatLogLevel) String() string {
485         s, ok := NatLogLevel_name[uint8(x)]
486         if ok {
487                 return s
488         }
489         return "NatLogLevel(" + strconv.Itoa(int(x)) + ")"
490 }
491
492 // RxMode defines enum 'rx_mode'.
493 type RxMode uint32
494
495 const (
496         RX_MODE_API_UNKNOWN   RxMode = 0
497         RX_MODE_API_POLLING   RxMode = 1
498         RX_MODE_API_INTERRUPT RxMode = 2
499         RX_MODE_API_ADAPTIVE  RxMode = 3
500         RX_MODE_API_DEFAULT   RxMode = 4
501 )
502
503 var (
504         RxMode_name = map[uint32]string{
505                 0: "RX_MODE_API_UNKNOWN",
506                 1: "RX_MODE_API_POLLING",
507                 2: "RX_MODE_API_INTERRUPT",
508                 3: "RX_MODE_API_ADAPTIVE",
509                 4: "RX_MODE_API_DEFAULT",
510         }
511         RxMode_value = map[string]uint32{
512                 "RX_MODE_API_UNKNOWN":   0,
513                 "RX_MODE_API_POLLING":   1,
514                 "RX_MODE_API_INTERRUPT": 2,
515                 "RX_MODE_API_ADAPTIVE":  3,
516                 "RX_MODE_API_DEFAULT":   4,
517         }
518 )
519
520 func (x RxMode) String() string {
521         s, ok := RxMode_name[uint32(x)]
522         if ok {
523                 return s
524         }
525         return "RxMode(" + strconv.Itoa(int(x)) + ")"
526 }
527
528 // SubIfFlags defines enum 'sub_if_flags'.
529 type SubIfFlags uint32
530
531 const (
532         SUB_IF_API_FLAG_NO_TAGS           SubIfFlags = 1
533         SUB_IF_API_FLAG_ONE_TAG           SubIfFlags = 2
534         SUB_IF_API_FLAG_TWO_TAGS          SubIfFlags = 4
535         SUB_IF_API_FLAG_DOT1AD            SubIfFlags = 8
536         SUB_IF_API_FLAG_EXACT_MATCH       SubIfFlags = 16
537         SUB_IF_API_FLAG_DEFAULT           SubIfFlags = 32
538         SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
539         SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
540         SUB_IF_API_FLAG_MASK_VNET         SubIfFlags = 254
541         SUB_IF_API_FLAG_DOT1AH            SubIfFlags = 256
542 )
543
544 var (
545         SubIfFlags_name = map[uint32]string{
546                 1:   "SUB_IF_API_FLAG_NO_TAGS",
547                 2:   "SUB_IF_API_FLAG_ONE_TAG",
548                 4:   "SUB_IF_API_FLAG_TWO_TAGS",
549                 8:   "SUB_IF_API_FLAG_DOT1AD",
550                 16:  "SUB_IF_API_FLAG_EXACT_MATCH",
551                 32:  "SUB_IF_API_FLAG_DEFAULT",
552                 64:  "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
553                 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
554                 254: "SUB_IF_API_FLAG_MASK_VNET",
555                 256: "SUB_IF_API_FLAG_DOT1AH",
556         }
557         SubIfFlags_value = map[string]uint32{
558                 "SUB_IF_API_FLAG_NO_TAGS":           1,
559                 "SUB_IF_API_FLAG_ONE_TAG":           2,
560                 "SUB_IF_API_FLAG_TWO_TAGS":          4,
561                 "SUB_IF_API_FLAG_DOT1AD":            8,
562                 "SUB_IF_API_FLAG_EXACT_MATCH":       16,
563                 "SUB_IF_API_FLAG_DEFAULT":           32,
564                 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
565                 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
566                 "SUB_IF_API_FLAG_MASK_VNET":         254,
567                 "SUB_IF_API_FLAG_DOT1AH":            256,
568         }
569 )
570
571 func (x SubIfFlags) String() string {
572         s, ok := SubIfFlags_name[uint32(x)]
573         if ok {
574                 return s
575         }
576         str := func(n uint32) string {
577                 s, ok := SubIfFlags_name[uint32(n)]
578                 if ok {
579                         return s
580                 }
581                 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
582         }
583         for i := uint32(0); i <= 32; i++ {
584                 val := uint32(x)
585                 if val&(1<<i) != 0 {
586                         if s != "" {
587                                 s += "|"
588                         }
589                         s += str(1 << i)
590                 }
591         }
592         if s == "" {
593                 return str(uint32(x))
594         }
595         return s
596 }
597
598 // AddressWithPrefix defines alias 'address_with_prefix'.
599 type AddressWithPrefix Prefix
600
601 func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
602         prefix, err := ParsePrefix(s)
603         if err != nil {
604                 return AddressWithPrefix{}, err
605         }
606         return AddressWithPrefix(prefix), nil
607 }
608
609 func (x AddressWithPrefix) String() string {
610         return Prefix(x).String()
611 }
612
613 func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
614         return []byte(x.String()), nil
615 }
616
617 func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
618         prefix, err := ParseAddressWithPrefix(string(text))
619         if err != nil {
620                 return err
621         }
622         *x = prefix
623         return nil
624 }
625
626 // InterfaceIndex defines alias 'interface_index'.
627 type InterfaceIndex uint32
628
629 // IP4Address defines alias 'ip4_address'.
630 type IP4Address [4]uint8
631
632 func ParseIP4Address(s string) (IP4Address, error) {
633         ip := net.ParseIP(s).To4()
634         if ip == nil {
635                 return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
636         }
637         var ipaddr IP4Address
638         copy(ipaddr[:], ip.To4())
639         return ipaddr, nil
640 }
641
642 func (x IP4Address) ToIP() net.IP {
643         return net.IP(x[:]).To4()
644 }
645
646 func (x IP4Address) String() string {
647         return x.ToIP().String()
648 }
649
650 func (x *IP4Address) MarshalText() ([]byte, error) {
651         return []byte(x.String()), nil
652 }
653
654 func (x *IP4Address) UnmarshalText(text []byte) error {
655         ipaddr, err := ParseIP4Address(string(text))
656         if err != nil {
657                 return err
658         }
659         *x = ipaddr
660         return nil
661 }
662
663 // IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
664 type IP4AddressWithPrefix IP4Prefix
665
666 // IP6Address defines alias 'ip6_address'.
667 type IP6Address [16]uint8
668
669 func ParseIP6Address(s string) (IP6Address, error) {
670         ip := net.ParseIP(s).To16()
671         if ip == nil {
672                 return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
673         }
674         var ipaddr IP6Address
675         copy(ipaddr[:], ip.To16())
676         return ipaddr, nil
677 }
678
679 func (x IP6Address) ToIP() net.IP {
680         return net.IP(x[:]).To16()
681 }
682
683 func (x IP6Address) String() string {
684         return x.ToIP().String()
685 }
686
687 func (x *IP6Address) MarshalText() ([]byte, error) {
688         return []byte(x.String()), nil
689 }
690
691 func (x *IP6Address) UnmarshalText(text []byte) error {
692         ipaddr, err := ParseIP6Address(string(text))
693         if err != nil {
694                 return err
695         }
696         *x = ipaddr
697         return nil
698 }
699
700 // IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
701 type IP6AddressWithPrefix IP6Prefix
702
703 // Address defines type 'address'.
704 type Address struct {
705         Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
706         Un AddressUnion  `binapi:"address_union,name=un" json:"un,omitempty"`
707 }
708
709 func ParseAddress(s string) (Address, error) {
710         ip := net.ParseIP(s)
711         if ip == nil {
712                 return Address{}, fmt.Errorf("invalid address: %s", s)
713         }
714         return AddressFromIP(ip), nil
715 }
716
717 func AddressFromIP(ip net.IP) Address {
718         var addr Address
719         if ip.To4() == nil {
720                 addr.Af = ADDRESS_IP6
721                 var ip6 IP6Address
722                 copy(ip6[:], ip.To16())
723                 addr.Un.SetIP6(ip6)
724         } else {
725                 addr.Af = ADDRESS_IP4
726                 var ip4 IP4Address
727                 copy(ip4[:], ip.To4())
728                 addr.Un.SetIP4(ip4)
729         }
730         return addr
731 }
732
733 func (x Address) ToIP() net.IP {
734         if x.Af == ADDRESS_IP6 {
735                 ip6 := x.Un.GetIP6()
736                 return net.IP(ip6[:]).To16()
737         } else {
738                 ip4 := x.Un.GetIP4()
739                 return net.IP(ip4[:]).To4()
740         }
741 }
742
743 func (x Address) String() string {
744         return x.ToIP().String()
745 }
746
747 func (x *Address) MarshalText() ([]byte, error) {
748         return []byte(x.String()), nil
749 }
750
751 func (x *Address) UnmarshalText(text []byte) error {
752         addr, err := ParseAddress(string(text))
753         if err != nil {
754                 return err
755         }
756         *x = addr
757         return nil
758 }
759
760 // IP4Prefix defines type 'ip4_prefix'.
761 type IP4Prefix struct {
762         Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
763         Len     uint8      `binapi:"u8,name=len" json:"len,omitempty"`
764 }
765
766 func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
767         hasPrefix := strings.Contains(s, "/")
768         if hasPrefix {
769                 ip, network, err := net.ParseCIDR(s)
770                 if err != nil {
771                         return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
772                 }
773                 maskSize, _ := network.Mask.Size()
774                 prefix.Len = byte(maskSize)
775                 prefix.Address, err = ParseIP4Address(ip.String())
776                 if err != nil {
777                         return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
778                 }
779         } else {
780                 ip := net.ParseIP(s)
781                 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
782                 if ip.To4() == nil {
783                         defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
784                 }
785                 prefix.Len = byte(defaultMaskSize)
786                 prefix.Address, err = ParseIP4Address(ip.String())
787                 if err != nil {
788                         return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
789                 }
790         }
791         return prefix, nil
792 }
793
794 func (x IP4Prefix) ToIPNet() *net.IPNet {
795         mask := net.CIDRMask(int(x.Len), 32)
796         ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
797         return ipnet
798 }
799
800 func (x IP4Prefix) String() string {
801         ip := x.Address.String()
802         return ip + "/" + strconv.Itoa(int(x.Len))
803 }
804
805 func (x *IP4Prefix) MarshalText() ([]byte, error) {
806         return []byte(x.String()), nil
807 }
808
809 func (x *IP4Prefix) UnmarshalText(text []byte) error {
810         prefix, err := ParseIP4Prefix(string(text))
811         if err != nil {
812                 return err
813         }
814         *x = prefix
815         return nil
816 }
817
818 // IP6Prefix defines type 'ip6_prefix'.
819 type IP6Prefix struct {
820         Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
821         Len     uint8      `binapi:"u8,name=len" json:"len,omitempty"`
822 }
823
824 func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
825         hasPrefix := strings.Contains(s, "/")
826         if hasPrefix {
827                 ip, network, err := net.ParseCIDR(s)
828                 if err != nil {
829                         return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
830                 }
831                 maskSize, _ := network.Mask.Size()
832                 prefix.Len = byte(maskSize)
833                 prefix.Address, err = ParseIP6Address(ip.String())
834                 if err != nil {
835                         return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
836                 }
837         } else {
838                 ip := net.ParseIP(s)
839                 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
840                 if ip.To4() == nil {
841                         defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
842                 }
843                 prefix.Len = byte(defaultMaskSize)
844                 prefix.Address, err = ParseIP6Address(ip.String())
845                 if err != nil {
846                         return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
847                 }
848         }
849         return prefix, nil
850 }
851
852 func (x IP6Prefix) ToIPNet() *net.IPNet {
853         mask := net.CIDRMask(int(x.Len), 128)
854         ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
855         return ipnet
856 }
857
858 func (x IP6Prefix) String() string {
859         ip := x.Address.String()
860         return ip + "/" + strconv.Itoa(int(x.Len))
861 }
862
863 func (x *IP6Prefix) MarshalText() ([]byte, error) {
864         return []byte(x.String()), nil
865 }
866
867 func (x *IP6Prefix) UnmarshalText(text []byte) error {
868         prefix, err := ParseIP6Prefix(string(text))
869         if err != nil {
870                 return err
871         }
872         *x = prefix
873         return nil
874 }
875
876 // Mprefix defines type 'mprefix'.
877 type Mprefix struct {
878         Af               AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
879         GrpAddressLength uint16        `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
880         GrpAddress       AddressUnion  `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
881         SrcAddress       AddressUnion  `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
882 }
883
884 // Nat44LbAddrPort defines type 'nat44_lb_addr_port'.
885 type Nat44LbAddrPort struct {
886         Addr        IP4Address `binapi:"ip4_address,name=addr" json:"addr,omitempty"`
887         Port        uint16     `binapi:"u16,name=port" json:"port,omitempty"`
888         Probability uint8      `binapi:"u8,name=probability" json:"probability,omitempty"`
889         VrfID       uint32     `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
890 }
891
892 // Prefix defines type 'prefix'.
893 type Prefix struct {
894         Address Address `binapi:"address,name=address" json:"address,omitempty"`
895         Len     uint8   `binapi:"u8,name=len" json:"len,omitempty"`
896 }
897
898 func ParsePrefix(ip string) (prefix Prefix, err error) {
899         hasPrefix := strings.Contains(ip, "/")
900         if hasPrefix {
901                 netIP, network, err := net.ParseCIDR(ip)
902                 if err != nil {
903                         return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
904                 }
905                 maskSize, _ := network.Mask.Size()
906                 prefix.Len = byte(maskSize)
907                 prefix.Address, err = ParseAddress(netIP.String())
908                 if err != nil {
909                         return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
910                 }
911         } else {
912                 netIP := net.ParseIP(ip)
913                 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
914                 if netIP.To4() == nil {
915                         defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
916                 }
917                 prefix.Len = byte(defaultMaskSize)
918                 prefix.Address, err = ParseAddress(netIP.String())
919                 if err != nil {
920                         return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
921                 }
922         }
923         return prefix, nil
924 }
925
926 func (x Prefix) ToIPNet() *net.IPNet {
927         var mask net.IPMask
928         if x.Address.Af == ADDRESS_IP4 {
929                 mask = net.CIDRMask(int(x.Len), 32)
930         } else {
931                 mask = net.CIDRMask(int(x.Len), 128)
932         }
933         ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
934         return ipnet
935 }
936
937 func (x Prefix) String() string {
938         ip := x.Address.String()
939         return ip + "/" + strconv.Itoa(int(x.Len))
940 }
941
942 func (x *Prefix) MarshalText() ([]byte, error) {
943         return []byte(x.String()), nil
944 }
945
946 func (x *Prefix) UnmarshalText(text []byte) error {
947         prefix, err := ParsePrefix(string(text))
948         if err != nil {
949                 return err
950         }
951         *x = prefix
952         return nil
953 }
954
955 // PrefixMatcher defines type 'prefix_matcher'.
956 type PrefixMatcher struct {
957         Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
958         Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
959 }
960
961 // AddressUnion defines union 'address_union'.
962 type AddressUnion struct {
963         // AddressUnion can be one of:
964         // - IP4 *IP4Address
965         // - IP6 *IP6Address
966         XXX_UnionData [16]byte
967 }
968
969 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
970         u.SetIP4(a)
971         return
972 }
973 func (u *AddressUnion) SetIP4(a IP4Address) {
974         buf := codec.NewBuffer(u.XXX_UnionData[:])
975         buf.EncodeBytes(a[:], 4)
976 }
977 func (u *AddressUnion) GetIP4() (a IP4Address) {
978         buf := codec.NewBuffer(u.XXX_UnionData[:])
979         copy(a[:], buf.DecodeBytes(4))
980         return
981 }
982
983 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
984         u.SetIP6(a)
985         return
986 }
987 func (u *AddressUnion) SetIP6(a IP6Address) {
988         buf := codec.NewBuffer(u.XXX_UnionData[:])
989         buf.EncodeBytes(a[:], 16)
990 }
991 func (u *AddressUnion) GetIP6() (a IP6Address) {
992         buf := codec.NewBuffer(u.XXX_UnionData[:])
993         copy(a[:], buf.DecodeBytes(16))
994         return
995 }
996
997 // DsliteAddDelPoolAddrRange defines message 'dslite_add_del_pool_addr_range'.
998 type DsliteAddDelPoolAddrRange struct {
999         StartAddr IP4Address `binapi:"ip4_address,name=start_addr" json:"start_addr,omitempty"`
1000         EndAddr   IP4Address `binapi:"ip4_address,name=end_addr" json:"end_addr,omitempty"`
1001         IsAdd     bool       `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1002 }
1003
1004 func (m *DsliteAddDelPoolAddrRange) Reset()               { *m = DsliteAddDelPoolAddrRange{} }
1005 func (*DsliteAddDelPoolAddrRange) GetMessageName() string { return "dslite_add_del_pool_addr_range" }
1006 func (*DsliteAddDelPoolAddrRange) GetCrcString() string   { return "c448457a" }
1007 func (*DsliteAddDelPoolAddrRange) GetMessageType() api.MessageType {
1008         return api.RequestMessage
1009 }
1010
1011 func (m *DsliteAddDelPoolAddrRange) Size() (size int) {
1012         if m == nil {
1013                 return 0
1014         }
1015         size += 1 * 4 // m.StartAddr
1016         size += 1 * 4 // m.EndAddr
1017         size += 1     // m.IsAdd
1018         return size
1019 }
1020 func (m *DsliteAddDelPoolAddrRange) Marshal(b []byte) ([]byte, error) {
1021         if b == nil {
1022                 b = make([]byte, m.Size())
1023         }
1024         buf := codec.NewBuffer(b)
1025         buf.EncodeBytes(m.StartAddr[:], 4)
1026         buf.EncodeBytes(m.EndAddr[:], 4)
1027         buf.EncodeBool(m.IsAdd)
1028         return buf.Bytes(), nil
1029 }
1030 func (m *DsliteAddDelPoolAddrRange) Unmarshal(b []byte) error {
1031         buf := codec.NewBuffer(b)
1032         copy(m.StartAddr[:], buf.DecodeBytes(4))
1033         copy(m.EndAddr[:], buf.DecodeBytes(4))
1034         m.IsAdd = buf.DecodeBool()
1035         return nil
1036 }
1037
1038 // DsliteAddDelPoolAddrRangeReply defines message 'dslite_add_del_pool_addr_range_reply'.
1039 type DsliteAddDelPoolAddrRangeReply struct {
1040         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1041 }
1042
1043 func (m *DsliteAddDelPoolAddrRangeReply) Reset() { *m = DsliteAddDelPoolAddrRangeReply{} }
1044 func (*DsliteAddDelPoolAddrRangeReply) GetMessageName() string {
1045         return "dslite_add_del_pool_addr_range_reply"
1046 }
1047 func (*DsliteAddDelPoolAddrRangeReply) GetCrcString() string { return "e8d4e804" }
1048 func (*DsliteAddDelPoolAddrRangeReply) GetMessageType() api.MessageType {
1049         return api.ReplyMessage
1050 }
1051
1052 func (m *DsliteAddDelPoolAddrRangeReply) Size() (size int) {
1053         if m == nil {
1054                 return 0
1055         }
1056         size += 4 // m.Retval
1057         return size
1058 }
1059 func (m *DsliteAddDelPoolAddrRangeReply) Marshal(b []byte) ([]byte, error) {
1060         if b == nil {
1061                 b = make([]byte, m.Size())
1062         }
1063         buf := codec.NewBuffer(b)
1064         buf.EncodeInt32(m.Retval)
1065         return buf.Bytes(), nil
1066 }
1067 func (m *DsliteAddDelPoolAddrRangeReply) Unmarshal(b []byte) error {
1068         buf := codec.NewBuffer(b)
1069         m.Retval = buf.DecodeInt32()
1070         return nil
1071 }
1072
1073 // DsliteAddressDetails defines message 'dslite_address_details'.
1074 type DsliteAddressDetails struct {
1075         IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
1076 }
1077
1078 func (m *DsliteAddressDetails) Reset()               { *m = DsliteAddressDetails{} }
1079 func (*DsliteAddressDetails) GetMessageName() string { return "dslite_address_details" }
1080 func (*DsliteAddressDetails) GetCrcString() string   { return "ec26d648" }
1081 func (*DsliteAddressDetails) GetMessageType() api.MessageType {
1082         return api.ReplyMessage
1083 }
1084
1085 func (m *DsliteAddressDetails) Size() (size int) {
1086         if m == nil {
1087                 return 0
1088         }
1089         size += 1 * 4 // m.IPAddress
1090         return size
1091 }
1092 func (m *DsliteAddressDetails) Marshal(b []byte) ([]byte, error) {
1093         if b == nil {
1094                 b = make([]byte, m.Size())
1095         }
1096         buf := codec.NewBuffer(b)
1097         buf.EncodeBytes(m.IPAddress[:], 4)
1098         return buf.Bytes(), nil
1099 }
1100 func (m *DsliteAddressDetails) Unmarshal(b []byte) error {
1101         buf := codec.NewBuffer(b)
1102         copy(m.IPAddress[:], buf.DecodeBytes(4))
1103         return nil
1104 }
1105
1106 // DsliteAddressDump defines message 'dslite_address_dump'.
1107 type DsliteAddressDump struct{}
1108
1109 func (m *DsliteAddressDump) Reset()               { *m = DsliteAddressDump{} }
1110 func (*DsliteAddressDump) GetMessageName() string { return "dslite_address_dump" }
1111 func (*DsliteAddressDump) GetCrcString() string   { return "51077d14" }
1112 func (*DsliteAddressDump) GetMessageType() api.MessageType {
1113         return api.RequestMessage
1114 }
1115
1116 func (m *DsliteAddressDump) Size() (size int) {
1117         if m == nil {
1118                 return 0
1119         }
1120         return size
1121 }
1122 func (m *DsliteAddressDump) Marshal(b []byte) ([]byte, error) {
1123         if b == nil {
1124                 b = make([]byte, m.Size())
1125         }
1126         buf := codec.NewBuffer(b)
1127         return buf.Bytes(), nil
1128 }
1129 func (m *DsliteAddressDump) Unmarshal(b []byte) error {
1130         return nil
1131 }
1132
1133 // DsliteGetAftrAddr defines message 'dslite_get_aftr_addr'.
1134 type DsliteGetAftrAddr struct{}
1135
1136 func (m *DsliteGetAftrAddr) Reset()               { *m = DsliteGetAftrAddr{} }
1137 func (*DsliteGetAftrAddr) GetMessageName() string { return "dslite_get_aftr_addr" }
1138 func (*DsliteGetAftrAddr) GetCrcString() string   { return "51077d14" }
1139 func (*DsliteGetAftrAddr) GetMessageType() api.MessageType {
1140         return api.RequestMessage
1141 }
1142
1143 func (m *DsliteGetAftrAddr) Size() (size int) {
1144         if m == nil {
1145                 return 0
1146         }
1147         return size
1148 }
1149 func (m *DsliteGetAftrAddr) Marshal(b []byte) ([]byte, error) {
1150         if b == nil {
1151                 b = make([]byte, m.Size())
1152         }
1153         buf := codec.NewBuffer(b)
1154         return buf.Bytes(), nil
1155 }
1156 func (m *DsliteGetAftrAddr) Unmarshal(b []byte) error {
1157         return nil
1158 }
1159
1160 // DsliteGetAftrAddrReply defines message 'dslite_get_aftr_addr_reply'.
1161 type DsliteGetAftrAddrReply struct {
1162         Retval  int32      `binapi:"i32,name=retval" json:"retval,omitempty"`
1163         IP4Addr IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"`
1164         IP6Addr IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"`
1165 }
1166
1167 func (m *DsliteGetAftrAddrReply) Reset()               { *m = DsliteGetAftrAddrReply{} }
1168 func (*DsliteGetAftrAddrReply) GetMessageName() string { return "dslite_get_aftr_addr_reply" }
1169 func (*DsliteGetAftrAddrReply) GetCrcString() string   { return "38e30db1" }
1170 func (*DsliteGetAftrAddrReply) GetMessageType() api.MessageType {
1171         return api.ReplyMessage
1172 }
1173
1174 func (m *DsliteGetAftrAddrReply) Size() (size int) {
1175         if m == nil {
1176                 return 0
1177         }
1178         size += 4      // m.Retval
1179         size += 1 * 4  // m.IP4Addr
1180         size += 1 * 16 // m.IP6Addr
1181         return size
1182 }
1183 func (m *DsliteGetAftrAddrReply) Marshal(b []byte) ([]byte, error) {
1184         if b == nil {
1185                 b = make([]byte, m.Size())
1186         }
1187         buf := codec.NewBuffer(b)
1188         buf.EncodeInt32(m.Retval)
1189         buf.EncodeBytes(m.IP4Addr[:], 4)
1190         buf.EncodeBytes(m.IP6Addr[:], 16)
1191         return buf.Bytes(), nil
1192 }
1193 func (m *DsliteGetAftrAddrReply) Unmarshal(b []byte) error {
1194         buf := codec.NewBuffer(b)
1195         m.Retval = buf.DecodeInt32()
1196         copy(m.IP4Addr[:], buf.DecodeBytes(4))
1197         copy(m.IP6Addr[:], buf.DecodeBytes(16))
1198         return nil
1199 }
1200
1201 // DsliteGetB4Addr defines message 'dslite_get_b4_addr'.
1202 type DsliteGetB4Addr struct{}
1203
1204 func (m *DsliteGetB4Addr) Reset()               { *m = DsliteGetB4Addr{} }
1205 func (*DsliteGetB4Addr) GetMessageName() string { return "dslite_get_b4_addr" }
1206 func (*DsliteGetB4Addr) GetCrcString() string   { return "51077d14" }
1207 func (*DsliteGetB4Addr) GetMessageType() api.MessageType {
1208         return api.RequestMessage
1209 }
1210
1211 func (m *DsliteGetB4Addr) Size() (size int) {
1212         if m == nil {
1213                 return 0
1214         }
1215         return size
1216 }
1217 func (m *DsliteGetB4Addr) Marshal(b []byte) ([]byte, error) {
1218         if b == nil {
1219                 b = make([]byte, m.Size())
1220         }
1221         buf := codec.NewBuffer(b)
1222         return buf.Bytes(), nil
1223 }
1224 func (m *DsliteGetB4Addr) Unmarshal(b []byte) error {
1225         return nil
1226 }
1227
1228 // DsliteGetB4AddrReply defines message 'dslite_get_b4_addr_reply'.
1229 type DsliteGetB4AddrReply struct {
1230         Retval  int32      `binapi:"i32,name=retval" json:"retval,omitempty"`
1231         IP4Addr IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"`
1232         IP6Addr IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"`
1233 }
1234
1235 func (m *DsliteGetB4AddrReply) Reset()               { *m = DsliteGetB4AddrReply{} }
1236 func (*DsliteGetB4AddrReply) GetMessageName() string { return "dslite_get_b4_addr_reply" }
1237 func (*DsliteGetB4AddrReply) GetCrcString() string   { return "38e30db1" }
1238 func (*DsliteGetB4AddrReply) GetMessageType() api.MessageType {
1239         return api.ReplyMessage
1240 }
1241
1242 func (m *DsliteGetB4AddrReply) Size() (size int) {
1243         if m == nil {
1244                 return 0
1245         }
1246         size += 4      // m.Retval
1247         size += 1 * 4  // m.IP4Addr
1248         size += 1 * 16 // m.IP6Addr
1249         return size
1250 }
1251 func (m *DsliteGetB4AddrReply) Marshal(b []byte) ([]byte, error) {
1252         if b == nil {
1253                 b = make([]byte, m.Size())
1254         }
1255         buf := codec.NewBuffer(b)
1256         buf.EncodeInt32(m.Retval)
1257         buf.EncodeBytes(m.IP4Addr[:], 4)
1258         buf.EncodeBytes(m.IP6Addr[:], 16)
1259         return buf.Bytes(), nil
1260 }
1261 func (m *DsliteGetB4AddrReply) Unmarshal(b []byte) error {
1262         buf := codec.NewBuffer(b)
1263         m.Retval = buf.DecodeInt32()
1264         copy(m.IP4Addr[:], buf.DecodeBytes(4))
1265         copy(m.IP6Addr[:], buf.DecodeBytes(16))
1266         return nil
1267 }
1268
1269 // DsliteSetAftrAddr defines message 'dslite_set_aftr_addr'.
1270 type DsliteSetAftrAddr struct {
1271         IP4Addr IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"`
1272         IP6Addr IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"`
1273 }
1274
1275 func (m *DsliteSetAftrAddr) Reset()               { *m = DsliteSetAftrAddr{} }
1276 func (*DsliteSetAftrAddr) GetMessageName() string { return "dslite_set_aftr_addr" }
1277 func (*DsliteSetAftrAddr) GetCrcString() string   { return "1e955f8d" }
1278 func (*DsliteSetAftrAddr) GetMessageType() api.MessageType {
1279         return api.RequestMessage
1280 }
1281
1282 func (m *DsliteSetAftrAddr) Size() (size int) {
1283         if m == nil {
1284                 return 0
1285         }
1286         size += 1 * 4  // m.IP4Addr
1287         size += 1 * 16 // m.IP6Addr
1288         return size
1289 }
1290 func (m *DsliteSetAftrAddr) Marshal(b []byte) ([]byte, error) {
1291         if b == nil {
1292                 b = make([]byte, m.Size())
1293         }
1294         buf := codec.NewBuffer(b)
1295         buf.EncodeBytes(m.IP4Addr[:], 4)
1296         buf.EncodeBytes(m.IP6Addr[:], 16)
1297         return buf.Bytes(), nil
1298 }
1299 func (m *DsliteSetAftrAddr) Unmarshal(b []byte) error {
1300         buf := codec.NewBuffer(b)
1301         copy(m.IP4Addr[:], buf.DecodeBytes(4))
1302         copy(m.IP6Addr[:], buf.DecodeBytes(16))
1303         return nil
1304 }
1305
1306 // DsliteSetAftrAddrReply defines message 'dslite_set_aftr_addr_reply'.
1307 type DsliteSetAftrAddrReply struct {
1308         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1309 }
1310
1311 func (m *DsliteSetAftrAddrReply) Reset()               { *m = DsliteSetAftrAddrReply{} }
1312 func (*DsliteSetAftrAddrReply) GetMessageName() string { return "dslite_set_aftr_addr_reply" }
1313 func (*DsliteSetAftrAddrReply) GetCrcString() string   { return "e8d4e804" }
1314 func (*DsliteSetAftrAddrReply) GetMessageType() api.MessageType {
1315         return api.ReplyMessage
1316 }
1317
1318 func (m *DsliteSetAftrAddrReply) Size() (size int) {
1319         if m == nil {
1320                 return 0
1321         }
1322         size += 4 // m.Retval
1323         return size
1324 }
1325 func (m *DsliteSetAftrAddrReply) Marshal(b []byte) ([]byte, error) {
1326         if b == nil {
1327                 b = make([]byte, m.Size())
1328         }
1329         buf := codec.NewBuffer(b)
1330         buf.EncodeInt32(m.Retval)
1331         return buf.Bytes(), nil
1332 }
1333 func (m *DsliteSetAftrAddrReply) Unmarshal(b []byte) error {
1334         buf := codec.NewBuffer(b)
1335         m.Retval = buf.DecodeInt32()
1336         return nil
1337 }
1338
1339 // DsliteSetB4Addr defines message 'dslite_set_b4_addr'.
1340 type DsliteSetB4Addr struct {
1341         IP4Addr IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"`
1342         IP6Addr IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"`
1343 }
1344
1345 func (m *DsliteSetB4Addr) Reset()               { *m = DsliteSetB4Addr{} }
1346 func (*DsliteSetB4Addr) GetMessageName() string { return "dslite_set_b4_addr" }
1347 func (*DsliteSetB4Addr) GetCrcString() string   { return "1e955f8d" }
1348 func (*DsliteSetB4Addr) GetMessageType() api.MessageType {
1349         return api.RequestMessage
1350 }
1351
1352 func (m *DsliteSetB4Addr) Size() (size int) {
1353         if m == nil {
1354                 return 0
1355         }
1356         size += 1 * 4  // m.IP4Addr
1357         size += 1 * 16 // m.IP6Addr
1358         return size
1359 }
1360 func (m *DsliteSetB4Addr) Marshal(b []byte) ([]byte, error) {
1361         if b == nil {
1362                 b = make([]byte, m.Size())
1363         }
1364         buf := codec.NewBuffer(b)
1365         buf.EncodeBytes(m.IP4Addr[:], 4)
1366         buf.EncodeBytes(m.IP6Addr[:], 16)
1367         return buf.Bytes(), nil
1368 }
1369 func (m *DsliteSetB4Addr) Unmarshal(b []byte) error {
1370         buf := codec.NewBuffer(b)
1371         copy(m.IP4Addr[:], buf.DecodeBytes(4))
1372         copy(m.IP6Addr[:], buf.DecodeBytes(16))
1373         return nil
1374 }
1375
1376 // DsliteSetB4AddrReply defines message 'dslite_set_b4_addr_reply'.
1377 type DsliteSetB4AddrReply struct {
1378         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1379 }
1380
1381 func (m *DsliteSetB4AddrReply) Reset()               { *m = DsliteSetB4AddrReply{} }
1382 func (*DsliteSetB4AddrReply) GetMessageName() string { return "dslite_set_b4_addr_reply" }
1383 func (*DsliteSetB4AddrReply) GetCrcString() string   { return "e8d4e804" }
1384 func (*DsliteSetB4AddrReply) GetMessageType() api.MessageType {
1385         return api.ReplyMessage
1386 }
1387
1388 func (m *DsliteSetB4AddrReply) Size() (size int) {
1389         if m == nil {
1390                 return 0
1391         }
1392         size += 4 // m.Retval
1393         return size
1394 }
1395 func (m *DsliteSetB4AddrReply) Marshal(b []byte) ([]byte, error) {
1396         if b == nil {
1397                 b = make([]byte, m.Size())
1398         }
1399         buf := codec.NewBuffer(b)
1400         buf.EncodeInt32(m.Retval)
1401         return buf.Bytes(), nil
1402 }
1403 func (m *DsliteSetB4AddrReply) Unmarshal(b []byte) error {
1404         buf := codec.NewBuffer(b)
1405         m.Retval = buf.DecodeInt32()
1406         return nil
1407 }
1408
1409 // Nat44AddDelAddressRange defines message 'nat44_add_del_address_range'.
1410 type Nat44AddDelAddressRange struct {
1411         FirstIPAddress IP4Address     `binapi:"ip4_address,name=first_ip_address" json:"first_ip_address,omitempty"`
1412         LastIPAddress  IP4Address     `binapi:"ip4_address,name=last_ip_address" json:"last_ip_address,omitempty"`
1413         VrfID          uint32         `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
1414         IsAdd          bool           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1415         Flags          NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
1416 }
1417
1418 func (m *Nat44AddDelAddressRange) Reset()               { *m = Nat44AddDelAddressRange{} }
1419 func (*Nat44AddDelAddressRange) GetMessageName() string { return "nat44_add_del_address_range" }
1420 func (*Nat44AddDelAddressRange) GetCrcString() string   { return "d4c7568c" }
1421 func (*Nat44AddDelAddressRange) GetMessageType() api.MessageType {
1422         return api.RequestMessage
1423 }
1424
1425 func (m *Nat44AddDelAddressRange) Size() (size int) {
1426         if m == nil {
1427                 return 0
1428         }
1429         size += 1 * 4 // m.FirstIPAddress
1430         size += 1 * 4 // m.LastIPAddress
1431         size += 4     // m.VrfID
1432         size += 1     // m.IsAdd
1433         size += 1     // m.Flags
1434         return size
1435 }
1436 func (m *Nat44AddDelAddressRange) Marshal(b []byte) ([]byte, error) {
1437         if b == nil {
1438                 b = make([]byte, m.Size())
1439         }
1440         buf := codec.NewBuffer(b)
1441         buf.EncodeBytes(m.FirstIPAddress[:], 4)
1442         buf.EncodeBytes(m.LastIPAddress[:], 4)
1443         buf.EncodeUint32(m.VrfID)
1444         buf.EncodeBool(m.IsAdd)
1445         buf.EncodeUint8(uint8(m.Flags))
1446         return buf.Bytes(), nil
1447 }
1448 func (m *Nat44AddDelAddressRange) Unmarshal(b []byte) error {
1449         buf := codec.NewBuffer(b)
1450         copy(m.FirstIPAddress[:], buf.DecodeBytes(4))
1451         copy(m.LastIPAddress[:], buf.DecodeBytes(4))
1452         m.VrfID = buf.DecodeUint32()
1453         m.IsAdd = buf.DecodeBool()
1454         m.Flags = NatConfigFlags(buf.DecodeUint8())
1455         return nil
1456 }
1457
1458 // Nat44AddDelAddressRangeReply defines message 'nat44_add_del_address_range_reply'.
1459 type Nat44AddDelAddressRangeReply struct {
1460         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1461 }
1462
1463 func (m *Nat44AddDelAddressRangeReply) Reset() { *m = Nat44AddDelAddressRangeReply{} }
1464 func (*Nat44AddDelAddressRangeReply) GetMessageName() string {
1465         return "nat44_add_del_address_range_reply"
1466 }
1467 func (*Nat44AddDelAddressRangeReply) GetCrcString() string { return "e8d4e804" }
1468 func (*Nat44AddDelAddressRangeReply) GetMessageType() api.MessageType {
1469         return api.ReplyMessage
1470 }
1471
1472 func (m *Nat44AddDelAddressRangeReply) Size() (size int) {
1473         if m == nil {
1474                 return 0
1475         }
1476         size += 4 // m.Retval
1477         return size
1478 }
1479 func (m *Nat44AddDelAddressRangeReply) Marshal(b []byte) ([]byte, error) {
1480         if b == nil {
1481                 b = make([]byte, m.Size())
1482         }
1483         buf := codec.NewBuffer(b)
1484         buf.EncodeInt32(m.Retval)
1485         return buf.Bytes(), nil
1486 }
1487 func (m *Nat44AddDelAddressRangeReply) Unmarshal(b []byte) error {
1488         buf := codec.NewBuffer(b)
1489         m.Retval = buf.DecodeInt32()
1490         return nil
1491 }
1492
1493 // Nat44AddDelIdentityMapping defines message 'nat44_add_del_identity_mapping'.
1494 type Nat44AddDelIdentityMapping struct {
1495         IsAdd     bool           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1496         Flags     NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
1497         IPAddress IP4Address     `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
1498         Protocol  uint8          `binapi:"u8,name=protocol" json:"protocol,omitempty"`
1499         Port      uint16         `binapi:"u16,name=port" json:"port,omitempty"`
1500         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1501         VrfID     uint32         `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
1502         Tag       string         `binapi:"string[64],name=tag" json:"tag,omitempty"`
1503 }
1504
1505 func (m *Nat44AddDelIdentityMapping) Reset()               { *m = Nat44AddDelIdentityMapping{} }
1506 func (*Nat44AddDelIdentityMapping) GetMessageName() string { return "nat44_add_del_identity_mapping" }
1507 func (*Nat44AddDelIdentityMapping) GetCrcString() string   { return "8e12743f" }
1508 func (*Nat44AddDelIdentityMapping) GetMessageType() api.MessageType {
1509         return api.RequestMessage
1510 }
1511
1512 func (m *Nat44AddDelIdentityMapping) Size() (size int) {
1513         if m == nil {
1514                 return 0
1515         }
1516         size += 1     // m.IsAdd
1517         size += 1     // m.Flags
1518         size += 1 * 4 // m.IPAddress
1519         size += 1     // m.Protocol
1520         size += 2     // m.Port
1521         size += 4     // m.SwIfIndex
1522         size += 4     // m.VrfID
1523         size += 64    // m.Tag
1524         return size
1525 }
1526 func (m *Nat44AddDelIdentityMapping) Marshal(b []byte) ([]byte, error) {
1527         if b == nil {
1528                 b = make([]byte, m.Size())
1529         }
1530         buf := codec.NewBuffer(b)
1531         buf.EncodeBool(m.IsAdd)
1532         buf.EncodeUint8(uint8(m.Flags))
1533         buf.EncodeBytes(m.IPAddress[:], 4)
1534         buf.EncodeUint8(m.Protocol)
1535         buf.EncodeUint16(m.Port)
1536         buf.EncodeUint32(uint32(m.SwIfIndex))
1537         buf.EncodeUint32(m.VrfID)
1538         buf.EncodeString(m.Tag, 64)
1539         return buf.Bytes(), nil
1540 }
1541 func (m *Nat44AddDelIdentityMapping) Unmarshal(b []byte) error {
1542         buf := codec.NewBuffer(b)
1543         m.IsAdd = buf.DecodeBool()
1544         m.Flags = NatConfigFlags(buf.DecodeUint8())
1545         copy(m.IPAddress[:], buf.DecodeBytes(4))
1546         m.Protocol = buf.DecodeUint8()
1547         m.Port = buf.DecodeUint16()
1548         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1549         m.VrfID = buf.DecodeUint32()
1550         m.Tag = buf.DecodeString(64)
1551         return nil
1552 }
1553
1554 // Nat44AddDelIdentityMappingReply defines message 'nat44_add_del_identity_mapping_reply'.
1555 type Nat44AddDelIdentityMappingReply struct {
1556         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1557 }
1558
1559 func (m *Nat44AddDelIdentityMappingReply) Reset() { *m = Nat44AddDelIdentityMappingReply{} }
1560 func (*Nat44AddDelIdentityMappingReply) GetMessageName() string {
1561         return "nat44_add_del_identity_mapping_reply"
1562 }
1563 func (*Nat44AddDelIdentityMappingReply) GetCrcString() string { return "e8d4e804" }
1564 func (*Nat44AddDelIdentityMappingReply) GetMessageType() api.MessageType {
1565         return api.ReplyMessage
1566 }
1567
1568 func (m *Nat44AddDelIdentityMappingReply) Size() (size int) {
1569         if m == nil {
1570                 return 0
1571         }
1572         size += 4 // m.Retval
1573         return size
1574 }
1575 func (m *Nat44AddDelIdentityMappingReply) Marshal(b []byte) ([]byte, error) {
1576         if b == nil {
1577                 b = make([]byte, m.Size())
1578         }
1579         buf := codec.NewBuffer(b)
1580         buf.EncodeInt32(m.Retval)
1581         return buf.Bytes(), nil
1582 }
1583 func (m *Nat44AddDelIdentityMappingReply) Unmarshal(b []byte) error {
1584         buf := codec.NewBuffer(b)
1585         m.Retval = buf.DecodeInt32()
1586         return nil
1587 }
1588
1589 // Nat44AddDelInterfaceAddr defines message 'nat44_add_del_interface_addr'.
1590 type Nat44AddDelInterfaceAddr struct {
1591         IsAdd     bool           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1592         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1593         Flags     NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
1594 }
1595
1596 func (m *Nat44AddDelInterfaceAddr) Reset()               { *m = Nat44AddDelInterfaceAddr{} }
1597 func (*Nat44AddDelInterfaceAddr) GetMessageName() string { return "nat44_add_del_interface_addr" }
1598 func (*Nat44AddDelInterfaceAddr) GetCrcString() string   { return "fc835325" }
1599 func (*Nat44AddDelInterfaceAddr) GetMessageType() api.MessageType {
1600         return api.RequestMessage
1601 }
1602
1603 func (m *Nat44AddDelInterfaceAddr) Size() (size int) {
1604         if m == nil {
1605                 return 0
1606         }
1607         size += 1 // m.IsAdd
1608         size += 4 // m.SwIfIndex
1609         size += 1 // m.Flags
1610         return size
1611 }
1612 func (m *Nat44AddDelInterfaceAddr) Marshal(b []byte) ([]byte, error) {
1613         if b == nil {
1614                 b = make([]byte, m.Size())
1615         }
1616         buf := codec.NewBuffer(b)
1617         buf.EncodeBool(m.IsAdd)
1618         buf.EncodeUint32(uint32(m.SwIfIndex))
1619         buf.EncodeUint8(uint8(m.Flags))
1620         return buf.Bytes(), nil
1621 }
1622 func (m *Nat44AddDelInterfaceAddr) Unmarshal(b []byte) error {
1623         buf := codec.NewBuffer(b)
1624         m.IsAdd = buf.DecodeBool()
1625         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1626         m.Flags = NatConfigFlags(buf.DecodeUint8())
1627         return nil
1628 }
1629
1630 // Nat44AddDelInterfaceAddrReply defines message 'nat44_add_del_interface_addr_reply'.
1631 type Nat44AddDelInterfaceAddrReply struct {
1632         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1633 }
1634
1635 func (m *Nat44AddDelInterfaceAddrReply) Reset() { *m = Nat44AddDelInterfaceAddrReply{} }
1636 func (*Nat44AddDelInterfaceAddrReply) GetMessageName() string {
1637         return "nat44_add_del_interface_addr_reply"
1638 }
1639 func (*Nat44AddDelInterfaceAddrReply) GetCrcString() string { return "e8d4e804" }
1640 func (*Nat44AddDelInterfaceAddrReply) GetMessageType() api.MessageType {
1641         return api.ReplyMessage
1642 }
1643
1644 func (m *Nat44AddDelInterfaceAddrReply) Size() (size int) {
1645         if m == nil {
1646                 return 0
1647         }
1648         size += 4 // m.Retval
1649         return size
1650 }
1651 func (m *Nat44AddDelInterfaceAddrReply) Marshal(b []byte) ([]byte, error) {
1652         if b == nil {
1653                 b = make([]byte, m.Size())
1654         }
1655         buf := codec.NewBuffer(b)
1656         buf.EncodeInt32(m.Retval)
1657         return buf.Bytes(), nil
1658 }
1659 func (m *Nat44AddDelInterfaceAddrReply) Unmarshal(b []byte) error {
1660         buf := codec.NewBuffer(b)
1661         m.Retval = buf.DecodeInt32()
1662         return nil
1663 }
1664
1665 // Nat44AddDelLbStaticMapping defines message 'nat44_add_del_lb_static_mapping'.
1666 type Nat44AddDelLbStaticMapping struct {
1667         IsAdd        bool              `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1668         Flags        NatConfigFlags    `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
1669         ExternalAddr IP4Address        `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"`
1670         ExternalPort uint16            `binapi:"u16,name=external_port" json:"external_port,omitempty"`
1671         Protocol     uint8             `binapi:"u8,name=protocol" json:"protocol,omitempty"`
1672         Affinity     uint32            `binapi:"u32,name=affinity" json:"affinity,omitempty"`
1673         Tag          string            `binapi:"string[64],name=tag" json:"tag,omitempty"`
1674         LocalNum     uint32            `binapi:"u32,name=local_num" json:"-"`
1675         Locals       []Nat44LbAddrPort `binapi:"nat44_lb_addr_port[local_num],name=locals" json:"locals,omitempty"`
1676 }
1677
1678 func (m *Nat44AddDelLbStaticMapping) Reset()               { *m = Nat44AddDelLbStaticMapping{} }
1679 func (*Nat44AddDelLbStaticMapping) GetMessageName() string { return "nat44_add_del_lb_static_mapping" }
1680 func (*Nat44AddDelLbStaticMapping) GetCrcString() string   { return "53b24611" }
1681 func (*Nat44AddDelLbStaticMapping) GetMessageType() api.MessageType {
1682         return api.RequestMessage
1683 }
1684
1685 func (m *Nat44AddDelLbStaticMapping) Size() (size int) {
1686         if m == nil {
1687                 return 0
1688         }
1689         size += 1     // m.IsAdd
1690         size += 1     // m.Flags
1691         size += 1 * 4 // m.ExternalAddr
1692         size += 2     // m.ExternalPort
1693         size += 1     // m.Protocol
1694         size += 4     // m.Affinity
1695         size += 64    // m.Tag
1696         size += 4     // m.LocalNum
1697         for j1 := 0; j1 < len(m.Locals); j1++ {
1698                 var s1 Nat44LbAddrPort
1699                 _ = s1
1700                 if j1 < len(m.Locals) {
1701                         s1 = m.Locals[j1]
1702                 }
1703                 size += 1 * 4 // s1.Addr
1704                 size += 2     // s1.Port
1705                 size += 1     // s1.Probability
1706                 size += 4     // s1.VrfID
1707         }
1708         return size
1709 }
1710 func (m *Nat44AddDelLbStaticMapping) Marshal(b []byte) ([]byte, error) {
1711         if b == nil {
1712                 b = make([]byte, m.Size())
1713         }
1714         buf := codec.NewBuffer(b)
1715         buf.EncodeBool(m.IsAdd)
1716         buf.EncodeUint8(uint8(m.Flags))
1717         buf.EncodeBytes(m.ExternalAddr[:], 4)
1718         buf.EncodeUint16(m.ExternalPort)
1719         buf.EncodeUint8(m.Protocol)
1720         buf.EncodeUint32(m.Affinity)
1721         buf.EncodeString(m.Tag, 64)
1722         buf.EncodeUint32(uint32(len(m.Locals)))
1723         for j0 := 0; j0 < len(m.Locals); j0++ {
1724                 var v0 Nat44LbAddrPort // Locals
1725                 if j0 < len(m.Locals) {
1726                         v0 = m.Locals[j0]
1727                 }
1728                 buf.EncodeBytes(v0.Addr[:], 4)
1729                 buf.EncodeUint16(v0.Port)
1730                 buf.EncodeUint8(v0.Probability)
1731                 buf.EncodeUint32(v0.VrfID)
1732         }
1733         return buf.Bytes(), nil
1734 }
1735 func (m *Nat44AddDelLbStaticMapping) Unmarshal(b []byte) error {
1736         buf := codec.NewBuffer(b)
1737         m.IsAdd = buf.DecodeBool()
1738         m.Flags = NatConfigFlags(buf.DecodeUint8())
1739         copy(m.ExternalAddr[:], buf.DecodeBytes(4))
1740         m.ExternalPort = buf.DecodeUint16()
1741         m.Protocol = buf.DecodeUint8()
1742         m.Affinity = buf.DecodeUint32()
1743         m.Tag = buf.DecodeString(64)
1744         m.LocalNum = buf.DecodeUint32()
1745         m.Locals = make([]Nat44LbAddrPort, m.LocalNum)
1746         for j0 := 0; j0 < len(m.Locals); j0++ {
1747                 copy(m.Locals[j0].Addr[:], buf.DecodeBytes(4))
1748                 m.Locals[j0].Port = buf.DecodeUint16()
1749                 m.Locals[j0].Probability = buf.DecodeUint8()
1750                 m.Locals[j0].VrfID = buf.DecodeUint32()
1751         }
1752         return nil
1753 }
1754
1755 // Nat44AddDelLbStaticMappingReply defines message 'nat44_add_del_lb_static_mapping_reply'.
1756 type Nat44AddDelLbStaticMappingReply struct {
1757         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1758 }
1759
1760 func (m *Nat44AddDelLbStaticMappingReply) Reset() { *m = Nat44AddDelLbStaticMappingReply{} }
1761 func (*Nat44AddDelLbStaticMappingReply) GetMessageName() string {
1762         return "nat44_add_del_lb_static_mapping_reply"
1763 }
1764 func (*Nat44AddDelLbStaticMappingReply) GetCrcString() string { return "e8d4e804" }
1765 func (*Nat44AddDelLbStaticMappingReply) GetMessageType() api.MessageType {
1766         return api.ReplyMessage
1767 }
1768
1769 func (m *Nat44AddDelLbStaticMappingReply) Size() (size int) {
1770         if m == nil {
1771                 return 0
1772         }
1773         size += 4 // m.Retval
1774         return size
1775 }
1776 func (m *Nat44AddDelLbStaticMappingReply) Marshal(b []byte) ([]byte, error) {
1777         if b == nil {
1778                 b = make([]byte, m.Size())
1779         }
1780         buf := codec.NewBuffer(b)
1781         buf.EncodeInt32(m.Retval)
1782         return buf.Bytes(), nil
1783 }
1784 func (m *Nat44AddDelLbStaticMappingReply) Unmarshal(b []byte) error {
1785         buf := codec.NewBuffer(b)
1786         m.Retval = buf.DecodeInt32()
1787         return nil
1788 }
1789
1790 // Nat44AddDelStaticMapping defines message 'nat44_add_del_static_mapping'.
1791 type Nat44AddDelStaticMapping struct {
1792         IsAdd             bool           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1793         Flags             NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
1794         LocalIPAddress    IP4Address     `binapi:"ip4_address,name=local_ip_address" json:"local_ip_address,omitempty"`
1795         ExternalIPAddress IP4Address     `binapi:"ip4_address,name=external_ip_address" json:"external_ip_address,omitempty"`
1796         Protocol          uint8          `binapi:"u8,name=protocol" json:"protocol,omitempty"`
1797         LocalPort         uint16         `binapi:"u16,name=local_port" json:"local_port,omitempty"`
1798         ExternalPort      uint16         `binapi:"u16,name=external_port" json:"external_port,omitempty"`
1799         ExternalSwIfIndex InterfaceIndex `binapi:"interface_index,name=external_sw_if_index" json:"external_sw_if_index,omitempty"`
1800         VrfID             uint32         `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
1801         Tag               string         `binapi:"string[64],name=tag" json:"tag,omitempty"`
1802 }
1803
1804 func (m *Nat44AddDelStaticMapping) Reset()               { *m = Nat44AddDelStaticMapping{} }
1805 func (*Nat44AddDelStaticMapping) GetMessageName() string { return "nat44_add_del_static_mapping" }
1806 func (*Nat44AddDelStaticMapping) GetCrcString() string   { return "e165e83b" }
1807 func (*Nat44AddDelStaticMapping) GetMessageType() api.MessageType {
1808         return api.RequestMessage
1809 }
1810
1811 func (m *Nat44AddDelStaticMapping) Size() (size int) {
1812         if m == nil {
1813                 return 0
1814         }
1815         size += 1     // m.IsAdd
1816         size += 1     // m.Flags
1817         size += 1 * 4 // m.LocalIPAddress
1818         size += 1 * 4 // m.ExternalIPAddress
1819         size += 1     // m.Protocol
1820         size += 2     // m.LocalPort
1821         size += 2     // m.ExternalPort
1822         size += 4     // m.ExternalSwIfIndex
1823         size += 4     // m.VrfID
1824         size += 64    // m.Tag
1825         return size
1826 }
1827 func (m *Nat44AddDelStaticMapping) Marshal(b []byte) ([]byte, error) {
1828         if b == nil {
1829                 b = make([]byte, m.Size())
1830         }
1831         buf := codec.NewBuffer(b)
1832         buf.EncodeBool(m.IsAdd)
1833         buf.EncodeUint8(uint8(m.Flags))
1834         buf.EncodeBytes(m.LocalIPAddress[:], 4)
1835         buf.EncodeBytes(m.ExternalIPAddress[:], 4)
1836         buf.EncodeUint8(m.Protocol)
1837         buf.EncodeUint16(m.LocalPort)
1838         buf.EncodeUint16(m.ExternalPort)
1839         buf.EncodeUint32(uint32(m.ExternalSwIfIndex))
1840         buf.EncodeUint32(m.VrfID)
1841         buf.EncodeString(m.Tag, 64)
1842         return buf.Bytes(), nil
1843 }
1844 func (m *Nat44AddDelStaticMapping) Unmarshal(b []byte) error {
1845         buf := codec.NewBuffer(b)
1846         m.IsAdd = buf.DecodeBool()
1847         m.Flags = NatConfigFlags(buf.DecodeUint8())
1848         copy(m.LocalIPAddress[:], buf.DecodeBytes(4))
1849         copy(m.ExternalIPAddress[:], buf.DecodeBytes(4))
1850         m.Protocol = buf.DecodeUint8()
1851         m.LocalPort = buf.DecodeUint16()
1852         m.ExternalPort = buf.DecodeUint16()
1853         m.ExternalSwIfIndex = InterfaceIndex(buf.DecodeUint32())
1854         m.VrfID = buf.DecodeUint32()
1855         m.Tag = buf.DecodeString(64)
1856         return nil
1857 }
1858
1859 // Nat44AddDelStaticMappingReply defines message 'nat44_add_del_static_mapping_reply'.
1860 type Nat44AddDelStaticMappingReply struct {
1861         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1862 }
1863
1864 func (m *Nat44AddDelStaticMappingReply) Reset() { *m = Nat44AddDelStaticMappingReply{} }
1865 func (*Nat44AddDelStaticMappingReply) GetMessageName() string {
1866         return "nat44_add_del_static_mapping_reply"
1867 }
1868 func (*Nat44AddDelStaticMappingReply) GetCrcString() string { return "e8d4e804" }
1869 func (*Nat44AddDelStaticMappingReply) GetMessageType() api.MessageType {
1870         return api.ReplyMessage
1871 }
1872
1873 func (m *Nat44AddDelStaticMappingReply) Size() (size int) {
1874         if m == nil {
1875                 return 0
1876         }
1877         size += 4 // m.Retval
1878         return size
1879 }
1880 func (m *Nat44AddDelStaticMappingReply) Marshal(b []byte) ([]byte, error) {
1881         if b == nil {
1882                 b = make([]byte, m.Size())
1883         }
1884         buf := codec.NewBuffer(b)
1885         buf.EncodeInt32(m.Retval)
1886         return buf.Bytes(), nil
1887 }
1888 func (m *Nat44AddDelStaticMappingReply) Unmarshal(b []byte) error {
1889         buf := codec.NewBuffer(b)
1890         m.Retval = buf.DecodeInt32()
1891         return nil
1892 }
1893
1894 // Nat44AddressDetails defines message 'nat44_address_details'.
1895 type Nat44AddressDetails struct {
1896         IPAddress IP4Address     `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
1897         Flags     NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
1898         VrfID     uint32         `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
1899 }
1900
1901 func (m *Nat44AddressDetails) Reset()               { *m = Nat44AddressDetails{} }
1902 func (*Nat44AddressDetails) GetMessageName() string { return "nat44_address_details" }
1903 func (*Nat44AddressDetails) GetCrcString() string   { return "45410ac4" }
1904 func (*Nat44AddressDetails) GetMessageType() api.MessageType {
1905         return api.ReplyMessage
1906 }
1907
1908 func (m *Nat44AddressDetails) Size() (size int) {
1909         if m == nil {
1910                 return 0
1911         }
1912         size += 1 * 4 // m.IPAddress
1913         size += 1     // m.Flags
1914         size += 4     // m.VrfID
1915         return size
1916 }
1917 func (m *Nat44AddressDetails) Marshal(b []byte) ([]byte, error) {
1918         if b == nil {
1919                 b = make([]byte, m.Size())
1920         }
1921         buf := codec.NewBuffer(b)
1922         buf.EncodeBytes(m.IPAddress[:], 4)
1923         buf.EncodeUint8(uint8(m.Flags))
1924         buf.EncodeUint32(m.VrfID)
1925         return buf.Bytes(), nil
1926 }
1927 func (m *Nat44AddressDetails) Unmarshal(b []byte) error {
1928         buf := codec.NewBuffer(b)
1929         copy(m.IPAddress[:], buf.DecodeBytes(4))
1930         m.Flags = NatConfigFlags(buf.DecodeUint8())
1931         m.VrfID = buf.DecodeUint32()
1932         return nil
1933 }
1934
1935 // Nat44AddressDump defines message 'nat44_address_dump'.
1936 type Nat44AddressDump struct{}
1937
1938 func (m *Nat44AddressDump) Reset()               { *m = Nat44AddressDump{} }
1939 func (*Nat44AddressDump) GetMessageName() string { return "nat44_address_dump" }
1940 func (*Nat44AddressDump) GetCrcString() string   { return "51077d14" }
1941 func (*Nat44AddressDump) GetMessageType() api.MessageType {
1942         return api.RequestMessage
1943 }
1944
1945 func (m *Nat44AddressDump) Size() (size int) {
1946         if m == nil {
1947                 return 0
1948         }
1949         return size
1950 }
1951 func (m *Nat44AddressDump) Marshal(b []byte) ([]byte, error) {
1952         if b == nil {
1953                 b = make([]byte, m.Size())
1954         }
1955         buf := codec.NewBuffer(b)
1956         return buf.Bytes(), nil
1957 }
1958 func (m *Nat44AddressDump) Unmarshal(b []byte) error {
1959         return nil
1960 }
1961
1962 // Nat44DelSession defines message 'nat44_del_session'.
1963 type Nat44DelSession struct {
1964         Address        IP4Address     `binapi:"ip4_address,name=address" json:"address,omitempty"`
1965         Protocol       uint8          `binapi:"u8,name=protocol" json:"protocol,omitempty"`
1966         Port           uint16         `binapi:"u16,name=port" json:"port,omitempty"`
1967         VrfID          uint32         `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
1968         Flags          NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
1969         ExtHostAddress IP4Address     `binapi:"ip4_address,name=ext_host_address" json:"ext_host_address,omitempty"`
1970         ExtHostPort    uint16         `binapi:"u16,name=ext_host_port" json:"ext_host_port,omitempty"`
1971 }
1972
1973 func (m *Nat44DelSession) Reset()               { *m = Nat44DelSession{} }
1974 func (*Nat44DelSession) GetMessageName() string { return "nat44_del_session" }
1975 func (*Nat44DelSession) GetCrcString() string   { return "4c49c387" }
1976 func (*Nat44DelSession) GetMessageType() api.MessageType {
1977         return api.RequestMessage
1978 }
1979
1980 func (m *Nat44DelSession) Size() (size int) {
1981         if m == nil {
1982                 return 0
1983         }
1984         size += 1 * 4 // m.Address
1985         size += 1     // m.Protocol
1986         size += 2     // m.Port
1987         size += 4     // m.VrfID
1988         size += 1     // m.Flags
1989         size += 1 * 4 // m.ExtHostAddress
1990         size += 2     // m.ExtHostPort
1991         return size
1992 }
1993 func (m *Nat44DelSession) Marshal(b []byte) ([]byte, error) {
1994         if b == nil {
1995                 b = make([]byte, m.Size())
1996         }
1997         buf := codec.NewBuffer(b)
1998         buf.EncodeBytes(m.Address[:], 4)
1999         buf.EncodeUint8(m.Protocol)
2000         buf.EncodeUint16(m.Port)
2001         buf.EncodeUint32(m.VrfID)
2002         buf.EncodeUint8(uint8(m.Flags))
2003         buf.EncodeBytes(m.ExtHostAddress[:], 4)
2004         buf.EncodeUint16(m.ExtHostPort)
2005         return buf.Bytes(), nil
2006 }
2007 func (m *Nat44DelSession) Unmarshal(b []byte) error {
2008         buf := codec.NewBuffer(b)
2009         copy(m.Address[:], buf.DecodeBytes(4))
2010         m.Protocol = buf.DecodeUint8()
2011         m.Port = buf.DecodeUint16()
2012         m.VrfID = buf.DecodeUint32()
2013         m.Flags = NatConfigFlags(buf.DecodeUint8())
2014         copy(m.ExtHostAddress[:], buf.DecodeBytes(4))
2015         m.ExtHostPort = buf.DecodeUint16()
2016         return nil
2017 }
2018
2019 // Nat44DelSessionReply defines message 'nat44_del_session_reply'.
2020 type Nat44DelSessionReply struct {
2021         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2022 }
2023
2024 func (m *Nat44DelSessionReply) Reset()               { *m = Nat44DelSessionReply{} }
2025 func (*Nat44DelSessionReply) GetMessageName() string { return "nat44_del_session_reply" }
2026 func (*Nat44DelSessionReply) GetCrcString() string   { return "e8d4e804" }
2027 func (*Nat44DelSessionReply) GetMessageType() api.MessageType {
2028         return api.ReplyMessage
2029 }
2030
2031 func (m *Nat44DelSessionReply) Size() (size int) {
2032         if m == nil {
2033                 return 0
2034         }
2035         size += 4 // m.Retval
2036         return size
2037 }
2038 func (m *Nat44DelSessionReply) Marshal(b []byte) ([]byte, error) {
2039         if b == nil {
2040                 b = make([]byte, m.Size())
2041         }
2042         buf := codec.NewBuffer(b)
2043         buf.EncodeInt32(m.Retval)
2044         return buf.Bytes(), nil
2045 }
2046 func (m *Nat44DelSessionReply) Unmarshal(b []byte) error {
2047         buf := codec.NewBuffer(b)
2048         m.Retval = buf.DecodeInt32()
2049         return nil
2050 }
2051
2052 // Nat44ForwardingEnableDisable defines message 'nat44_forwarding_enable_disable'.
2053 type Nat44ForwardingEnableDisable struct {
2054         Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
2055 }
2056
2057 func (m *Nat44ForwardingEnableDisable) Reset() { *m = Nat44ForwardingEnableDisable{} }
2058 func (*Nat44ForwardingEnableDisable) GetMessageName() string {
2059         return "nat44_forwarding_enable_disable"
2060 }
2061 func (*Nat44ForwardingEnableDisable) GetCrcString() string { return "b3e225d2" }
2062 func (*Nat44ForwardingEnableDisable) GetMessageType() api.MessageType {
2063         return api.RequestMessage
2064 }
2065
2066 func (m *Nat44ForwardingEnableDisable) Size() (size int) {
2067         if m == nil {
2068                 return 0
2069         }
2070         size += 1 // m.Enable
2071         return size
2072 }
2073 func (m *Nat44ForwardingEnableDisable) Marshal(b []byte) ([]byte, error) {
2074         if b == nil {
2075                 b = make([]byte, m.Size())
2076         }
2077         buf := codec.NewBuffer(b)
2078         buf.EncodeBool(m.Enable)
2079         return buf.Bytes(), nil
2080 }
2081 func (m *Nat44ForwardingEnableDisable) Unmarshal(b []byte) error {
2082         buf := codec.NewBuffer(b)
2083         m.Enable = buf.DecodeBool()
2084         return nil
2085 }
2086
2087 // Nat44ForwardingEnableDisableReply defines message 'nat44_forwarding_enable_disable_reply'.
2088 type Nat44ForwardingEnableDisableReply struct {
2089         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2090 }
2091
2092 func (m *Nat44ForwardingEnableDisableReply) Reset() { *m = Nat44ForwardingEnableDisableReply{} }
2093 func (*Nat44ForwardingEnableDisableReply) GetMessageName() string {
2094         return "nat44_forwarding_enable_disable_reply"
2095 }
2096 func (*Nat44ForwardingEnableDisableReply) GetCrcString() string { return "e8d4e804" }
2097 func (*Nat44ForwardingEnableDisableReply) GetMessageType() api.MessageType {
2098         return api.ReplyMessage
2099 }
2100
2101 func (m *Nat44ForwardingEnableDisableReply) Size() (size int) {
2102         if m == nil {
2103                 return 0
2104         }
2105         size += 4 // m.Retval
2106         return size
2107 }
2108 func (m *Nat44ForwardingEnableDisableReply) Marshal(b []byte) ([]byte, error) {
2109         if b == nil {
2110                 b = make([]byte, m.Size())
2111         }
2112         buf := codec.NewBuffer(b)
2113         buf.EncodeInt32(m.Retval)
2114         return buf.Bytes(), nil
2115 }
2116 func (m *Nat44ForwardingEnableDisableReply) Unmarshal(b []byte) error {
2117         buf := codec.NewBuffer(b)
2118         m.Retval = buf.DecodeInt32()
2119         return nil
2120 }
2121
2122 // Nat44ForwardingIsEnabled defines message 'nat44_forwarding_is_enabled'.
2123 type Nat44ForwardingIsEnabled struct{}
2124
2125 func (m *Nat44ForwardingIsEnabled) Reset()               { *m = Nat44ForwardingIsEnabled{} }
2126 func (*Nat44ForwardingIsEnabled) GetMessageName() string { return "nat44_forwarding_is_enabled" }
2127 func (*Nat44ForwardingIsEnabled) GetCrcString() string   { return "51077d14" }
2128 func (*Nat44ForwardingIsEnabled) GetMessageType() api.MessageType {
2129         return api.RequestMessage
2130 }
2131
2132 func (m *Nat44ForwardingIsEnabled) Size() (size int) {
2133         if m == nil {
2134                 return 0
2135         }
2136         return size
2137 }
2138 func (m *Nat44ForwardingIsEnabled) Marshal(b []byte) ([]byte, error) {
2139         if b == nil {
2140                 b = make([]byte, m.Size())
2141         }
2142         buf := codec.NewBuffer(b)
2143         return buf.Bytes(), nil
2144 }
2145 func (m *Nat44ForwardingIsEnabled) Unmarshal(b []byte) error {
2146         return nil
2147 }
2148
2149 // Nat44ForwardingIsEnabledReply defines message 'nat44_forwarding_is_enabled_reply'.
2150 type Nat44ForwardingIsEnabledReply struct {
2151         Enabled bool `binapi:"bool,name=enabled" json:"enabled,omitempty"`
2152 }
2153
2154 func (m *Nat44ForwardingIsEnabledReply) Reset() { *m = Nat44ForwardingIsEnabledReply{} }
2155 func (*Nat44ForwardingIsEnabledReply) GetMessageName() string {
2156         return "nat44_forwarding_is_enabled_reply"
2157 }
2158 func (*Nat44ForwardingIsEnabledReply) GetCrcString() string { return "46924a06" }
2159 func (*Nat44ForwardingIsEnabledReply) GetMessageType() api.MessageType {
2160         return api.ReplyMessage
2161 }
2162
2163 func (m *Nat44ForwardingIsEnabledReply) Size() (size int) {
2164         if m == nil {
2165                 return 0
2166         }
2167         size += 1 // m.Enabled
2168         return size
2169 }
2170 func (m *Nat44ForwardingIsEnabledReply) Marshal(b []byte) ([]byte, error) {
2171         if b == nil {
2172                 b = make([]byte, m.Size())
2173         }
2174         buf := codec.NewBuffer(b)
2175         buf.EncodeBool(m.Enabled)
2176         return buf.Bytes(), nil
2177 }
2178 func (m *Nat44ForwardingIsEnabledReply) Unmarshal(b []byte) error {
2179         buf := codec.NewBuffer(b)
2180         m.Enabled = buf.DecodeBool()
2181         return nil
2182 }
2183
2184 // Nat44IdentityMappingDetails defines message 'nat44_identity_mapping_details'.
2185 type Nat44IdentityMappingDetails struct {
2186         Flags     NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
2187         IPAddress IP4Address     `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
2188         Protocol  uint8          `binapi:"u8,name=protocol" json:"protocol,omitempty"`
2189         Port      uint16         `binapi:"u16,name=port" json:"port,omitempty"`
2190         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2191         VrfID     uint32         `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2192         Tag       string         `binapi:"string[64],name=tag" json:"tag,omitempty"`
2193 }
2194
2195 func (m *Nat44IdentityMappingDetails) Reset()               { *m = Nat44IdentityMappingDetails{} }
2196 func (*Nat44IdentityMappingDetails) GetMessageName() string { return "nat44_identity_mapping_details" }
2197 func (*Nat44IdentityMappingDetails) GetCrcString() string   { return "36d21351" }
2198 func (*Nat44IdentityMappingDetails) GetMessageType() api.MessageType {
2199         return api.ReplyMessage
2200 }
2201
2202 func (m *Nat44IdentityMappingDetails) Size() (size int) {
2203         if m == nil {
2204                 return 0
2205         }
2206         size += 1     // m.Flags
2207         size += 1 * 4 // m.IPAddress
2208         size += 1     // m.Protocol
2209         size += 2     // m.Port
2210         size += 4     // m.SwIfIndex
2211         size += 4     // m.VrfID
2212         size += 64    // m.Tag
2213         return size
2214 }
2215 func (m *Nat44IdentityMappingDetails) Marshal(b []byte) ([]byte, error) {
2216         if b == nil {
2217                 b = make([]byte, m.Size())
2218         }
2219         buf := codec.NewBuffer(b)
2220         buf.EncodeUint8(uint8(m.Flags))
2221         buf.EncodeBytes(m.IPAddress[:], 4)
2222         buf.EncodeUint8(m.Protocol)
2223         buf.EncodeUint16(m.Port)
2224         buf.EncodeUint32(uint32(m.SwIfIndex))
2225         buf.EncodeUint32(m.VrfID)
2226         buf.EncodeString(m.Tag, 64)
2227         return buf.Bytes(), nil
2228 }
2229 func (m *Nat44IdentityMappingDetails) Unmarshal(b []byte) error {
2230         buf := codec.NewBuffer(b)
2231         m.Flags = NatConfigFlags(buf.DecodeUint8())
2232         copy(m.IPAddress[:], buf.DecodeBytes(4))
2233         m.Protocol = buf.DecodeUint8()
2234         m.Port = buf.DecodeUint16()
2235         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2236         m.VrfID = buf.DecodeUint32()
2237         m.Tag = buf.DecodeString(64)
2238         return nil
2239 }
2240
2241 // Nat44IdentityMappingDump defines message 'nat44_identity_mapping_dump'.
2242 type Nat44IdentityMappingDump struct{}
2243
2244 func (m *Nat44IdentityMappingDump) Reset()               { *m = Nat44IdentityMappingDump{} }
2245 func (*Nat44IdentityMappingDump) GetMessageName() string { return "nat44_identity_mapping_dump" }
2246 func (*Nat44IdentityMappingDump) GetCrcString() string   { return "51077d14" }
2247 func (*Nat44IdentityMappingDump) GetMessageType() api.MessageType {
2248         return api.RequestMessage
2249 }
2250
2251 func (m *Nat44IdentityMappingDump) Size() (size int) {
2252         if m == nil {
2253                 return 0
2254         }
2255         return size
2256 }
2257 func (m *Nat44IdentityMappingDump) Marshal(b []byte) ([]byte, error) {
2258         if b == nil {
2259                 b = make([]byte, m.Size())
2260         }
2261         buf := codec.NewBuffer(b)
2262         return buf.Bytes(), nil
2263 }
2264 func (m *Nat44IdentityMappingDump) Unmarshal(b []byte) error {
2265         return nil
2266 }
2267
2268 // Nat44InterfaceAddDelFeature defines message 'nat44_interface_add_del_feature'.
2269 type Nat44InterfaceAddDelFeature struct {
2270         IsAdd     bool           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2271         Flags     NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
2272         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2273 }
2274
2275 func (m *Nat44InterfaceAddDelFeature) Reset()               { *m = Nat44InterfaceAddDelFeature{} }
2276 func (*Nat44InterfaceAddDelFeature) GetMessageName() string { return "nat44_interface_add_del_feature" }
2277 func (*Nat44InterfaceAddDelFeature) GetCrcString() string   { return "f3699b83" }
2278 func (*Nat44InterfaceAddDelFeature) GetMessageType() api.MessageType {
2279         return api.RequestMessage
2280 }
2281
2282 func (m *Nat44InterfaceAddDelFeature) Size() (size int) {
2283         if m == nil {
2284                 return 0
2285         }
2286         size += 1 // m.IsAdd
2287         size += 1 // m.Flags
2288         size += 4 // m.SwIfIndex
2289         return size
2290 }
2291 func (m *Nat44InterfaceAddDelFeature) Marshal(b []byte) ([]byte, error) {
2292         if b == nil {
2293                 b = make([]byte, m.Size())
2294         }
2295         buf := codec.NewBuffer(b)
2296         buf.EncodeBool(m.IsAdd)
2297         buf.EncodeUint8(uint8(m.Flags))
2298         buf.EncodeUint32(uint32(m.SwIfIndex))
2299         return buf.Bytes(), nil
2300 }
2301 func (m *Nat44InterfaceAddDelFeature) Unmarshal(b []byte) error {
2302         buf := codec.NewBuffer(b)
2303         m.IsAdd = buf.DecodeBool()
2304         m.Flags = NatConfigFlags(buf.DecodeUint8())
2305         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2306         return nil
2307 }
2308
2309 // Nat44InterfaceAddDelFeatureReply defines message 'nat44_interface_add_del_feature_reply'.
2310 type Nat44InterfaceAddDelFeatureReply struct {
2311         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2312 }
2313
2314 func (m *Nat44InterfaceAddDelFeatureReply) Reset() { *m = Nat44InterfaceAddDelFeatureReply{} }
2315 func (*Nat44InterfaceAddDelFeatureReply) GetMessageName() string {
2316         return "nat44_interface_add_del_feature_reply"
2317 }
2318 func (*Nat44InterfaceAddDelFeatureReply) GetCrcString() string { return "e8d4e804" }
2319 func (*Nat44InterfaceAddDelFeatureReply) GetMessageType() api.MessageType {
2320         return api.ReplyMessage
2321 }
2322
2323 func (m *Nat44InterfaceAddDelFeatureReply) Size() (size int) {
2324         if m == nil {
2325                 return 0
2326         }
2327         size += 4 // m.Retval
2328         return size
2329 }
2330 func (m *Nat44InterfaceAddDelFeatureReply) Marshal(b []byte) ([]byte, error) {
2331         if b == nil {
2332                 b = make([]byte, m.Size())
2333         }
2334         buf := codec.NewBuffer(b)
2335         buf.EncodeInt32(m.Retval)
2336         return buf.Bytes(), nil
2337 }
2338 func (m *Nat44InterfaceAddDelFeatureReply) Unmarshal(b []byte) error {
2339         buf := codec.NewBuffer(b)
2340         m.Retval = buf.DecodeInt32()
2341         return nil
2342 }
2343
2344 // Nat44InterfaceAddDelOutputFeature defines message 'nat44_interface_add_del_output_feature'.
2345 type Nat44InterfaceAddDelOutputFeature struct {
2346         IsAdd     bool           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2347         Flags     NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
2348         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2349 }
2350
2351 func (m *Nat44InterfaceAddDelOutputFeature) Reset() { *m = Nat44InterfaceAddDelOutputFeature{} }
2352 func (*Nat44InterfaceAddDelOutputFeature) GetMessageName() string {
2353         return "nat44_interface_add_del_output_feature"
2354 }
2355 func (*Nat44InterfaceAddDelOutputFeature) GetCrcString() string { return "f3699b83" }
2356 func (*Nat44InterfaceAddDelOutputFeature) GetMessageType() api.MessageType {
2357         return api.RequestMessage
2358 }
2359
2360 func (m *Nat44InterfaceAddDelOutputFeature) Size() (size int) {
2361         if m == nil {
2362                 return 0
2363         }
2364         size += 1 // m.IsAdd
2365         size += 1 // m.Flags
2366         size += 4 // m.SwIfIndex
2367         return size
2368 }
2369 func (m *Nat44InterfaceAddDelOutputFeature) Marshal(b []byte) ([]byte, error) {
2370         if b == nil {
2371                 b = make([]byte, m.Size())
2372         }
2373         buf := codec.NewBuffer(b)
2374         buf.EncodeBool(m.IsAdd)
2375         buf.EncodeUint8(uint8(m.Flags))
2376         buf.EncodeUint32(uint32(m.SwIfIndex))
2377         return buf.Bytes(), nil
2378 }
2379 func (m *Nat44InterfaceAddDelOutputFeature) Unmarshal(b []byte) error {
2380         buf := codec.NewBuffer(b)
2381         m.IsAdd = buf.DecodeBool()
2382         m.Flags = NatConfigFlags(buf.DecodeUint8())
2383         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2384         return nil
2385 }
2386
2387 // Nat44InterfaceAddDelOutputFeatureReply defines message 'nat44_interface_add_del_output_feature_reply'.
2388 type Nat44InterfaceAddDelOutputFeatureReply struct {
2389         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2390 }
2391
2392 func (m *Nat44InterfaceAddDelOutputFeatureReply) Reset() {
2393         *m = Nat44InterfaceAddDelOutputFeatureReply{}
2394 }
2395 func (*Nat44InterfaceAddDelOutputFeatureReply) GetMessageName() string {
2396         return "nat44_interface_add_del_output_feature_reply"
2397 }
2398 func (*Nat44InterfaceAddDelOutputFeatureReply) GetCrcString() string { return "e8d4e804" }
2399 func (*Nat44InterfaceAddDelOutputFeatureReply) GetMessageType() api.MessageType {
2400         return api.ReplyMessage
2401 }
2402
2403 func (m *Nat44InterfaceAddDelOutputFeatureReply) Size() (size int) {
2404         if m == nil {
2405                 return 0
2406         }
2407         size += 4 // m.Retval
2408         return size
2409 }
2410 func (m *Nat44InterfaceAddDelOutputFeatureReply) Marshal(b []byte) ([]byte, error) {
2411         if b == nil {
2412                 b = make([]byte, m.Size())
2413         }
2414         buf := codec.NewBuffer(b)
2415         buf.EncodeInt32(m.Retval)
2416         return buf.Bytes(), nil
2417 }
2418 func (m *Nat44InterfaceAddDelOutputFeatureReply) Unmarshal(b []byte) error {
2419         buf := codec.NewBuffer(b)
2420         m.Retval = buf.DecodeInt32()
2421         return nil
2422 }
2423
2424 // Nat44InterfaceAddrDetails defines message 'nat44_interface_addr_details'.
2425 type Nat44InterfaceAddrDetails struct {
2426         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2427         Flags     NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
2428 }
2429
2430 func (m *Nat44InterfaceAddrDetails) Reset()               { *m = Nat44InterfaceAddrDetails{} }
2431 func (*Nat44InterfaceAddrDetails) GetMessageName() string { return "nat44_interface_addr_details" }
2432 func (*Nat44InterfaceAddrDetails) GetCrcString() string   { return "3e687514" }
2433 func (*Nat44InterfaceAddrDetails) GetMessageType() api.MessageType {
2434         return api.ReplyMessage
2435 }
2436
2437 func (m *Nat44InterfaceAddrDetails) Size() (size int) {
2438         if m == nil {
2439                 return 0
2440         }
2441         size += 4 // m.SwIfIndex
2442         size += 1 // m.Flags
2443         return size
2444 }
2445 func (m *Nat44InterfaceAddrDetails) Marshal(b []byte) ([]byte, error) {
2446         if b == nil {
2447                 b = make([]byte, m.Size())
2448         }
2449         buf := codec.NewBuffer(b)
2450         buf.EncodeUint32(uint32(m.SwIfIndex))
2451         buf.EncodeUint8(uint8(m.Flags))
2452         return buf.Bytes(), nil
2453 }
2454 func (m *Nat44InterfaceAddrDetails) Unmarshal(b []byte) error {
2455         buf := codec.NewBuffer(b)
2456         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2457         m.Flags = NatConfigFlags(buf.DecodeUint8())
2458         return nil
2459 }
2460
2461 // Nat44InterfaceAddrDump defines message 'nat44_interface_addr_dump'.
2462 type Nat44InterfaceAddrDump struct{}
2463
2464 func (m *Nat44InterfaceAddrDump) Reset()               { *m = Nat44InterfaceAddrDump{} }
2465 func (*Nat44InterfaceAddrDump) GetMessageName() string { return "nat44_interface_addr_dump" }
2466 func (*Nat44InterfaceAddrDump) GetCrcString() string   { return "51077d14" }
2467 func (*Nat44InterfaceAddrDump) GetMessageType() api.MessageType {
2468         return api.RequestMessage
2469 }
2470
2471 func (m *Nat44InterfaceAddrDump) Size() (size int) {
2472         if m == nil {
2473                 return 0
2474         }
2475         return size
2476 }
2477 func (m *Nat44InterfaceAddrDump) Marshal(b []byte) ([]byte, error) {
2478         if b == nil {
2479                 b = make([]byte, m.Size())
2480         }
2481         buf := codec.NewBuffer(b)
2482         return buf.Bytes(), nil
2483 }
2484 func (m *Nat44InterfaceAddrDump) Unmarshal(b []byte) error {
2485         return nil
2486 }
2487
2488 // Nat44InterfaceDetails defines message 'nat44_interface_details'.
2489 type Nat44InterfaceDetails struct {
2490         Flags     NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
2491         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2492 }
2493
2494 func (m *Nat44InterfaceDetails) Reset()               { *m = Nat44InterfaceDetails{} }
2495 func (*Nat44InterfaceDetails) GetMessageName() string { return "nat44_interface_details" }
2496 func (*Nat44InterfaceDetails) GetCrcString() string   { return "5d286289" }
2497 func (*Nat44InterfaceDetails) GetMessageType() api.MessageType {
2498         return api.ReplyMessage
2499 }
2500
2501 func (m *Nat44InterfaceDetails) Size() (size int) {
2502         if m == nil {
2503                 return 0
2504         }
2505         size += 1 // m.Flags
2506         size += 4 // m.SwIfIndex
2507         return size
2508 }
2509 func (m *Nat44InterfaceDetails) Marshal(b []byte) ([]byte, error) {
2510         if b == nil {
2511                 b = make([]byte, m.Size())
2512         }
2513         buf := codec.NewBuffer(b)
2514         buf.EncodeUint8(uint8(m.Flags))
2515         buf.EncodeUint32(uint32(m.SwIfIndex))
2516         return buf.Bytes(), nil
2517 }
2518 func (m *Nat44InterfaceDetails) Unmarshal(b []byte) error {
2519         buf := codec.NewBuffer(b)
2520         m.Flags = NatConfigFlags(buf.DecodeUint8())
2521         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2522         return nil
2523 }
2524
2525 // Nat44InterfaceDump defines message 'nat44_interface_dump'.
2526 type Nat44InterfaceDump struct{}
2527
2528 func (m *Nat44InterfaceDump) Reset()               { *m = Nat44InterfaceDump{} }
2529 func (*Nat44InterfaceDump) GetMessageName() string { return "nat44_interface_dump" }
2530 func (*Nat44InterfaceDump) GetCrcString() string   { return "51077d14" }
2531 func (*Nat44InterfaceDump) GetMessageType() api.MessageType {
2532         return api.RequestMessage
2533 }
2534
2535 func (m *Nat44InterfaceDump) Size() (size int) {
2536         if m == nil {
2537                 return 0
2538         }
2539         return size
2540 }
2541 func (m *Nat44InterfaceDump) Marshal(b []byte) ([]byte, error) {
2542         if b == nil {
2543                 b = make([]byte, m.Size())
2544         }
2545         buf := codec.NewBuffer(b)
2546         return buf.Bytes(), nil
2547 }
2548 func (m *Nat44InterfaceDump) Unmarshal(b []byte) error {
2549         return nil
2550 }
2551
2552 // Nat44InterfaceOutputFeatureDetails defines message 'nat44_interface_output_feature_details'.
2553 type Nat44InterfaceOutputFeatureDetails struct {
2554         Flags     NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
2555         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2556 }
2557
2558 func (m *Nat44InterfaceOutputFeatureDetails) Reset() { *m = Nat44InterfaceOutputFeatureDetails{} }
2559 func (*Nat44InterfaceOutputFeatureDetails) GetMessageName() string {
2560         return "nat44_interface_output_feature_details"
2561 }
2562 func (*Nat44InterfaceOutputFeatureDetails) GetCrcString() string { return "5d286289" }
2563 func (*Nat44InterfaceOutputFeatureDetails) GetMessageType() api.MessageType {
2564         return api.ReplyMessage
2565 }
2566
2567 func (m *Nat44InterfaceOutputFeatureDetails) Size() (size int) {
2568         if m == nil {
2569                 return 0
2570         }
2571         size += 1 // m.Flags
2572         size += 4 // m.SwIfIndex
2573         return size
2574 }
2575 func (m *Nat44InterfaceOutputFeatureDetails) Marshal(b []byte) ([]byte, error) {
2576         if b == nil {
2577                 b = make([]byte, m.Size())
2578         }
2579         buf := codec.NewBuffer(b)
2580         buf.EncodeUint8(uint8(m.Flags))
2581         buf.EncodeUint32(uint32(m.SwIfIndex))
2582         return buf.Bytes(), nil
2583 }
2584 func (m *Nat44InterfaceOutputFeatureDetails) Unmarshal(b []byte) error {
2585         buf := codec.NewBuffer(b)
2586         m.Flags = NatConfigFlags(buf.DecodeUint8())
2587         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2588         return nil
2589 }
2590
2591 // Nat44InterfaceOutputFeatureDump defines message 'nat44_interface_output_feature_dump'.
2592 type Nat44InterfaceOutputFeatureDump struct{}
2593
2594 func (m *Nat44InterfaceOutputFeatureDump) Reset() { *m = Nat44InterfaceOutputFeatureDump{} }
2595 func (*Nat44InterfaceOutputFeatureDump) GetMessageName() string {
2596         return "nat44_interface_output_feature_dump"
2597 }
2598 func (*Nat44InterfaceOutputFeatureDump) GetCrcString() string { return "51077d14" }
2599 func (*Nat44InterfaceOutputFeatureDump) GetMessageType() api.MessageType {
2600         return api.RequestMessage
2601 }
2602
2603 func (m *Nat44InterfaceOutputFeatureDump) Size() (size int) {
2604         if m == nil {
2605                 return 0
2606         }
2607         return size
2608 }
2609 func (m *Nat44InterfaceOutputFeatureDump) Marshal(b []byte) ([]byte, error) {
2610         if b == nil {
2611                 b = make([]byte, m.Size())
2612         }
2613         buf := codec.NewBuffer(b)
2614         return buf.Bytes(), nil
2615 }
2616 func (m *Nat44InterfaceOutputFeatureDump) Unmarshal(b []byte) error {
2617         return nil
2618 }
2619
2620 // Nat44LbStaticMappingAddDelLocal defines message 'nat44_lb_static_mapping_add_del_local'.
2621 type Nat44LbStaticMappingAddDelLocal struct {
2622         IsAdd        bool            `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2623         ExternalAddr IP4Address      `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"`
2624         ExternalPort uint16          `binapi:"u16,name=external_port" json:"external_port,omitempty"`
2625         Protocol     uint8           `binapi:"u8,name=protocol" json:"protocol,omitempty"`
2626         Local        Nat44LbAddrPort `binapi:"nat44_lb_addr_port,name=local" json:"local,omitempty"`
2627 }
2628
2629 func (m *Nat44LbStaticMappingAddDelLocal) Reset() { *m = Nat44LbStaticMappingAddDelLocal{} }
2630 func (*Nat44LbStaticMappingAddDelLocal) GetMessageName() string {
2631         return "nat44_lb_static_mapping_add_del_local"
2632 }
2633 func (*Nat44LbStaticMappingAddDelLocal) GetCrcString() string { return "2910a151" }
2634 func (*Nat44LbStaticMappingAddDelLocal) GetMessageType() api.MessageType {
2635         return api.RequestMessage
2636 }
2637
2638 func (m *Nat44LbStaticMappingAddDelLocal) Size() (size int) {
2639         if m == nil {
2640                 return 0
2641         }
2642         size += 1     // m.IsAdd
2643         size += 1 * 4 // m.ExternalAddr
2644         size += 2     // m.ExternalPort
2645         size += 1     // m.Protocol
2646         size += 1 * 4 // m.Local.Addr
2647         size += 2     // m.Local.Port
2648         size += 1     // m.Local.Probability
2649         size += 4     // m.Local.VrfID
2650         return size
2651 }
2652 func (m *Nat44LbStaticMappingAddDelLocal) Marshal(b []byte) ([]byte, error) {
2653         if b == nil {
2654                 b = make([]byte, m.Size())
2655         }
2656         buf := codec.NewBuffer(b)
2657         buf.EncodeBool(m.IsAdd)
2658         buf.EncodeBytes(m.ExternalAddr[:], 4)
2659         buf.EncodeUint16(m.ExternalPort)
2660         buf.EncodeUint8(m.Protocol)
2661         buf.EncodeBytes(m.Local.Addr[:], 4)
2662         buf.EncodeUint16(m.Local.Port)
2663         buf.EncodeUint8(m.Local.Probability)
2664         buf.EncodeUint32(m.Local.VrfID)
2665         return buf.Bytes(), nil
2666 }
2667 func (m *Nat44LbStaticMappingAddDelLocal) Unmarshal(b []byte) error {
2668         buf := codec.NewBuffer(b)
2669         m.IsAdd = buf.DecodeBool()
2670         copy(m.ExternalAddr[:], buf.DecodeBytes(4))
2671         m.ExternalPort = buf.DecodeUint16()
2672         m.Protocol = buf.DecodeUint8()
2673         copy(m.Local.Addr[:], buf.DecodeBytes(4))
2674         m.Local.Port = buf.DecodeUint16()
2675         m.Local.Probability = buf.DecodeUint8()
2676         m.Local.VrfID = buf.DecodeUint32()
2677         return nil
2678 }
2679
2680 // Nat44LbStaticMappingAddDelLocalReply defines message 'nat44_lb_static_mapping_add_del_local_reply'.
2681 type Nat44LbStaticMappingAddDelLocalReply struct {
2682         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2683 }
2684
2685 func (m *Nat44LbStaticMappingAddDelLocalReply) Reset() { *m = Nat44LbStaticMappingAddDelLocalReply{} }
2686 func (*Nat44LbStaticMappingAddDelLocalReply) GetMessageName() string {
2687         return "nat44_lb_static_mapping_add_del_local_reply"
2688 }
2689 func (*Nat44LbStaticMappingAddDelLocalReply) GetCrcString() string { return "e8d4e804" }
2690 func (*Nat44LbStaticMappingAddDelLocalReply) GetMessageType() api.MessageType {
2691         return api.ReplyMessage
2692 }
2693
2694 func (m *Nat44LbStaticMappingAddDelLocalReply) Size() (size int) {
2695         if m == nil {
2696                 return 0
2697         }
2698         size += 4 // m.Retval
2699         return size
2700 }
2701 func (m *Nat44LbStaticMappingAddDelLocalReply) Marshal(b []byte) ([]byte, error) {
2702         if b == nil {
2703                 b = make([]byte, m.Size())
2704         }
2705         buf := codec.NewBuffer(b)
2706         buf.EncodeInt32(m.Retval)
2707         return buf.Bytes(), nil
2708 }
2709 func (m *Nat44LbStaticMappingAddDelLocalReply) Unmarshal(b []byte) error {
2710         buf := codec.NewBuffer(b)
2711         m.Retval = buf.DecodeInt32()
2712         return nil
2713 }
2714
2715 // Nat44LbStaticMappingDetails defines message 'nat44_lb_static_mapping_details'.
2716 type Nat44LbStaticMappingDetails struct {
2717         ExternalAddr IP4Address        `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"`
2718         ExternalPort uint16            `binapi:"u16,name=external_port" json:"external_port,omitempty"`
2719         Protocol     uint8             `binapi:"u8,name=protocol" json:"protocol,omitempty"`
2720         Flags        NatConfigFlags    `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
2721         Affinity     uint32            `binapi:"u32,name=affinity" json:"affinity,omitempty"`
2722         Tag          string            `binapi:"string[64],name=tag" json:"tag,omitempty"`
2723         LocalNum     uint32            `binapi:"u32,name=local_num" json:"-"`
2724         Locals       []Nat44LbAddrPort `binapi:"nat44_lb_addr_port[local_num],name=locals" json:"locals,omitempty"`
2725 }
2726
2727 func (m *Nat44LbStaticMappingDetails) Reset()               { *m = Nat44LbStaticMappingDetails{} }
2728 func (*Nat44LbStaticMappingDetails) GetMessageName() string { return "nat44_lb_static_mapping_details" }
2729 func (*Nat44LbStaticMappingDetails) GetCrcString() string   { return "2267b9e8" }
2730 func (*Nat44LbStaticMappingDetails) GetMessageType() api.MessageType {
2731         return api.ReplyMessage
2732 }
2733
2734 func (m *Nat44LbStaticMappingDetails) Size() (size int) {
2735         if m == nil {
2736                 return 0
2737         }
2738         size += 1 * 4 // m.ExternalAddr
2739         size += 2     // m.ExternalPort
2740         size += 1     // m.Protocol
2741         size += 1     // m.Flags
2742         size += 4     // m.Affinity
2743         size += 64    // m.Tag
2744         size += 4     // m.LocalNum
2745         for j1 := 0; j1 < len(m.Locals); j1++ {
2746                 var s1 Nat44LbAddrPort
2747                 _ = s1
2748                 if j1 < len(m.Locals) {
2749                         s1 = m.Locals[j1]
2750                 }
2751                 size += 1 * 4 // s1.Addr
2752                 size += 2     // s1.Port
2753                 size += 1     // s1.Probability
2754                 size += 4     // s1.VrfID
2755         }
2756         return size
2757 }
2758 func (m *Nat44LbStaticMappingDetails) Marshal(b []byte) ([]byte, error) {
2759         if b == nil {
2760                 b = make([]byte, m.Size())
2761         }
2762         buf := codec.NewBuffer(b)
2763         buf.EncodeBytes(m.ExternalAddr[:], 4)
2764         buf.EncodeUint16(m.ExternalPort)
2765         buf.EncodeUint8(m.Protocol)
2766         buf.EncodeUint8(uint8(m.Flags))
2767         buf.EncodeUint32(m.Affinity)
2768         buf.EncodeString(m.Tag, 64)
2769         buf.EncodeUint32(uint32(len(m.Locals)))
2770         for j0 := 0; j0 < len(m.Locals); j0++ {
2771                 var v0 Nat44LbAddrPort // Locals
2772                 if j0 < len(m.Locals) {
2773                         v0 = m.Locals[j0]
2774                 }
2775                 buf.EncodeBytes(v0.Addr[:], 4)
2776                 buf.EncodeUint16(v0.Port)
2777                 buf.EncodeUint8(v0.Probability)
2778                 buf.EncodeUint32(v0.VrfID)
2779         }
2780         return buf.Bytes(), nil
2781 }
2782 func (m *Nat44LbStaticMappingDetails) Unmarshal(b []byte) error {
2783         buf := codec.NewBuffer(b)
2784         copy(m.ExternalAddr[:], buf.DecodeBytes(4))
2785         m.ExternalPort = buf.DecodeUint16()
2786         m.Protocol = buf.DecodeUint8()
2787         m.Flags = NatConfigFlags(buf.DecodeUint8())
2788         m.Affinity = buf.DecodeUint32()
2789         m.Tag = buf.DecodeString(64)
2790         m.LocalNum = buf.DecodeUint32()
2791         m.Locals = make([]Nat44LbAddrPort, m.LocalNum)
2792         for j0 := 0; j0 < len(m.Locals); j0++ {
2793                 copy(m.Locals[j0].Addr[:], buf.DecodeBytes(4))
2794                 m.Locals[j0].Port = buf.DecodeUint16()
2795                 m.Locals[j0].Probability = buf.DecodeUint8()
2796                 m.Locals[j0].VrfID = buf.DecodeUint32()
2797         }
2798         return nil
2799 }
2800
2801 // Nat44LbStaticMappingDump defines message 'nat44_lb_static_mapping_dump'.
2802 type Nat44LbStaticMappingDump struct{}
2803
2804 func (m *Nat44LbStaticMappingDump) Reset()               { *m = Nat44LbStaticMappingDump{} }
2805 func (*Nat44LbStaticMappingDump) GetMessageName() string { return "nat44_lb_static_mapping_dump" }
2806 func (*Nat44LbStaticMappingDump) GetCrcString() string   { return "51077d14" }
2807 func (*Nat44LbStaticMappingDump) GetMessageType() api.MessageType {
2808         return api.RequestMessage
2809 }
2810
2811 func (m *Nat44LbStaticMappingDump) Size() (size int) {
2812         if m == nil {
2813                 return 0
2814         }
2815         return size
2816 }
2817 func (m *Nat44LbStaticMappingDump) Marshal(b []byte) ([]byte, error) {
2818         if b == nil {
2819                 b = make([]byte, m.Size())
2820         }
2821         buf := codec.NewBuffer(b)
2822         return buf.Bytes(), nil
2823 }
2824 func (m *Nat44LbStaticMappingDump) Unmarshal(b []byte) error {
2825         return nil
2826 }
2827
2828 // Nat44StaticMappingDetails defines message 'nat44_static_mapping_details'.
2829 type Nat44StaticMappingDetails struct {
2830         Flags             NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
2831         LocalIPAddress    IP4Address     `binapi:"ip4_address,name=local_ip_address" json:"local_ip_address,omitempty"`
2832         ExternalIPAddress IP4Address     `binapi:"ip4_address,name=external_ip_address" json:"external_ip_address,omitempty"`
2833         Protocol          uint8          `binapi:"u8,name=protocol" json:"protocol,omitempty"`
2834         LocalPort         uint16         `binapi:"u16,name=local_port" json:"local_port,omitempty"`
2835         ExternalPort      uint16         `binapi:"u16,name=external_port" json:"external_port,omitempty"`
2836         ExternalSwIfIndex InterfaceIndex `binapi:"interface_index,name=external_sw_if_index" json:"external_sw_if_index,omitempty"`
2837         VrfID             uint32         `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2838         Tag               string         `binapi:"string[64],name=tag" json:"tag,omitempty"`
2839 }
2840
2841 func (m *Nat44StaticMappingDetails) Reset()               { *m = Nat44StaticMappingDetails{} }
2842 func (*Nat44StaticMappingDetails) GetMessageName() string { return "nat44_static_mapping_details" }
2843 func (*Nat44StaticMappingDetails) GetCrcString() string   { return "1a433ef7" }
2844 func (*Nat44StaticMappingDetails) GetMessageType() api.MessageType {
2845         return api.ReplyMessage
2846 }
2847
2848 func (m *Nat44StaticMappingDetails) Size() (size int) {
2849         if m == nil {
2850                 return 0
2851         }
2852         size += 1     // m.Flags
2853         size += 1 * 4 // m.LocalIPAddress
2854         size += 1 * 4 // m.ExternalIPAddress
2855         size += 1     // m.Protocol
2856         size += 2     // m.LocalPort
2857         size += 2     // m.ExternalPort
2858         size += 4     // m.ExternalSwIfIndex
2859         size += 4     // m.VrfID
2860         size += 64    // m.Tag
2861         return size
2862 }
2863 func (m *Nat44StaticMappingDetails) Marshal(b []byte) ([]byte, error) {
2864         if b == nil {
2865                 b = make([]byte, m.Size())
2866         }
2867         buf := codec.NewBuffer(b)
2868         buf.EncodeUint8(uint8(m.Flags))
2869         buf.EncodeBytes(m.LocalIPAddress[:], 4)
2870         buf.EncodeBytes(m.ExternalIPAddress[:], 4)
2871         buf.EncodeUint8(m.Protocol)
2872         buf.EncodeUint16(m.LocalPort)
2873         buf.EncodeUint16(m.ExternalPort)
2874         buf.EncodeUint32(uint32(m.ExternalSwIfIndex))
2875         buf.EncodeUint32(m.VrfID)
2876         buf.EncodeString(m.Tag, 64)
2877         return buf.Bytes(), nil
2878 }
2879 func (m *Nat44StaticMappingDetails) Unmarshal(b []byte) error {
2880         buf := codec.NewBuffer(b)
2881         m.Flags = NatConfigFlags(buf.DecodeUint8())
2882         copy(m.LocalIPAddress[:], buf.DecodeBytes(4))
2883         copy(m.ExternalIPAddress[:], buf.DecodeBytes(4))
2884         m.Protocol = buf.DecodeUint8()
2885         m.LocalPort = buf.DecodeUint16()
2886         m.ExternalPort = buf.DecodeUint16()
2887         m.ExternalSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2888         m.VrfID = buf.DecodeUint32()
2889         m.Tag = buf.DecodeString(64)
2890         return nil
2891 }
2892
2893 // Nat44StaticMappingDump defines message 'nat44_static_mapping_dump'.
2894 type Nat44StaticMappingDump struct{}
2895
2896 func (m *Nat44StaticMappingDump) Reset()               { *m = Nat44StaticMappingDump{} }
2897 func (*Nat44StaticMappingDump) GetMessageName() string { return "nat44_static_mapping_dump" }
2898 func (*Nat44StaticMappingDump) GetCrcString() string   { return "51077d14" }
2899 func (*Nat44StaticMappingDump) GetMessageType() api.MessageType {
2900         return api.RequestMessage
2901 }
2902
2903 func (m *Nat44StaticMappingDump) Size() (size int) {
2904         if m == nil {
2905                 return 0
2906         }
2907         return size
2908 }
2909 func (m *Nat44StaticMappingDump) Marshal(b []byte) ([]byte, error) {
2910         if b == nil {
2911                 b = make([]byte, m.Size())
2912         }
2913         buf := codec.NewBuffer(b)
2914         return buf.Bytes(), nil
2915 }
2916 func (m *Nat44StaticMappingDump) Unmarshal(b []byte) error {
2917         return nil
2918 }
2919
2920 // Nat44UserDetails defines message 'nat44_user_details'.
2921 type Nat44UserDetails struct {
2922         VrfID           uint32     `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2923         IPAddress       IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
2924         Nsessions       uint32     `binapi:"u32,name=nsessions" json:"nsessions,omitempty"`
2925         Nstaticsessions uint32     `binapi:"u32,name=nstaticsessions" json:"nstaticsessions,omitempty"`
2926 }
2927
2928 func (m *Nat44UserDetails) Reset()               { *m = Nat44UserDetails{} }
2929 func (*Nat44UserDetails) GetMessageName() string { return "nat44_user_details" }
2930 func (*Nat44UserDetails) GetCrcString() string   { return "355896c2" }
2931 func (*Nat44UserDetails) GetMessageType() api.MessageType {
2932         return api.ReplyMessage
2933 }
2934
2935 func (m *Nat44UserDetails) Size() (size int) {
2936         if m == nil {
2937                 return 0
2938         }
2939         size += 4     // m.VrfID
2940         size += 1 * 4 // m.IPAddress
2941         size += 4     // m.Nsessions
2942         size += 4     // m.Nstaticsessions
2943         return size
2944 }
2945 func (m *Nat44UserDetails) Marshal(b []byte) ([]byte, error) {
2946         if b == nil {
2947                 b = make([]byte, m.Size())
2948         }
2949         buf := codec.NewBuffer(b)
2950         buf.EncodeUint32(m.VrfID)
2951         buf.EncodeBytes(m.IPAddress[:], 4)
2952         buf.EncodeUint32(m.Nsessions)
2953         buf.EncodeUint32(m.Nstaticsessions)
2954         return buf.Bytes(), nil
2955 }
2956 func (m *Nat44UserDetails) Unmarshal(b []byte) error {
2957         buf := codec.NewBuffer(b)
2958         m.VrfID = buf.DecodeUint32()
2959         copy(m.IPAddress[:], buf.DecodeBytes(4))
2960         m.Nsessions = buf.DecodeUint32()
2961         m.Nstaticsessions = buf.DecodeUint32()
2962         return nil
2963 }
2964
2965 // Nat44UserDump defines message 'nat44_user_dump'.
2966 type Nat44UserDump struct{}
2967
2968 func (m *Nat44UserDump) Reset()               { *m = Nat44UserDump{} }
2969 func (*Nat44UserDump) GetMessageName() string { return "nat44_user_dump" }
2970 func (*Nat44UserDump) GetCrcString() string   { return "51077d14" }
2971 func (*Nat44UserDump) GetMessageType() api.MessageType {
2972         return api.RequestMessage
2973 }
2974
2975 func (m *Nat44UserDump) Size() (size int) {
2976         if m == nil {
2977                 return 0
2978         }
2979         return size
2980 }
2981 func (m *Nat44UserDump) Marshal(b []byte) ([]byte, error) {
2982         if b == nil {
2983                 b = make([]byte, m.Size())
2984         }
2985         buf := codec.NewBuffer(b)
2986         return buf.Bytes(), nil
2987 }
2988 func (m *Nat44UserDump) Unmarshal(b []byte) error {
2989         return nil
2990 }
2991
2992 // Nat44UserSessionDetails defines message 'nat44_user_session_details'.
2993 type Nat44UserSessionDetails struct {
2994         OutsideIPAddress  IP4Address     `binapi:"ip4_address,name=outside_ip_address" json:"outside_ip_address,omitempty"`
2995         OutsidePort       uint16         `binapi:"u16,name=outside_port" json:"outside_port,omitempty"`
2996         InsideIPAddress   IP4Address     `binapi:"ip4_address,name=inside_ip_address" json:"inside_ip_address,omitempty"`
2997         InsidePort        uint16         `binapi:"u16,name=inside_port" json:"inside_port,omitempty"`
2998         Protocol          uint16         `binapi:"u16,name=protocol" json:"protocol,omitempty"`
2999         Flags             NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
3000         LastHeard         uint64         `binapi:"u64,name=last_heard" json:"last_heard,omitempty"`
3001         TotalBytes        uint64         `binapi:"u64,name=total_bytes" json:"total_bytes,omitempty"`
3002         TotalPkts         uint32         `binapi:"u32,name=total_pkts" json:"total_pkts,omitempty"`
3003         ExtHostAddress    IP4Address     `binapi:"ip4_address,name=ext_host_address" json:"ext_host_address,omitempty"`
3004         ExtHostPort       uint16         `binapi:"u16,name=ext_host_port" json:"ext_host_port,omitempty"`
3005         ExtHostNatAddress IP4Address     `binapi:"ip4_address,name=ext_host_nat_address" json:"ext_host_nat_address,omitempty"`
3006         ExtHostNatPort    uint16         `binapi:"u16,name=ext_host_nat_port" json:"ext_host_nat_port,omitempty"`
3007 }
3008
3009 func (m *Nat44UserSessionDetails) Reset()               { *m = Nat44UserSessionDetails{} }
3010 func (*Nat44UserSessionDetails) GetMessageName() string { return "nat44_user_session_details" }
3011 func (*Nat44UserSessionDetails) GetCrcString() string   { return "1965fd69" }
3012 func (*Nat44UserSessionDetails) GetMessageType() api.MessageType {
3013         return api.ReplyMessage
3014 }
3015
3016 func (m *Nat44UserSessionDetails) Size() (size int) {
3017         if m == nil {
3018                 return 0
3019         }
3020         size += 1 * 4 // m.OutsideIPAddress
3021         size += 2     // m.OutsidePort
3022         size += 1 * 4 // m.InsideIPAddress
3023         size += 2     // m.InsidePort
3024         size += 2     // m.Protocol
3025         size += 1     // m.Flags
3026         size += 8     // m.LastHeard
3027         size += 8     // m.TotalBytes
3028         size += 4     // m.TotalPkts
3029         size += 1 * 4 // m.ExtHostAddress
3030         size += 2     // m.ExtHostPort
3031         size += 1 * 4 // m.ExtHostNatAddress
3032         size += 2     // m.ExtHostNatPort
3033         return size
3034 }
3035 func (m *Nat44UserSessionDetails) Marshal(b []byte) ([]byte, error) {
3036         if b == nil {
3037                 b = make([]byte, m.Size())
3038         }
3039         buf := codec.NewBuffer(b)
3040         buf.EncodeBytes(m.OutsideIPAddress[:], 4)
3041         buf.EncodeUint16(m.OutsidePort)
3042         buf.EncodeBytes(m.InsideIPAddress[:], 4)
3043         buf.EncodeUint16(m.InsidePort)
3044         buf.EncodeUint16(m.Protocol)
3045         buf.EncodeUint8(uint8(m.Flags))
3046         buf.EncodeUint64(m.LastHeard)
3047         buf.EncodeUint64(m.TotalBytes)
3048         buf.EncodeUint32(m.TotalPkts)
3049         buf.EncodeBytes(m.ExtHostAddress[:], 4)
3050         buf.EncodeUint16(m.ExtHostPort)
3051         buf.EncodeBytes(m.ExtHostNatAddress[:], 4)
3052         buf.EncodeUint16(m.ExtHostNatPort)
3053         return buf.Bytes(), nil
3054 }
3055 func (m *Nat44UserSessionDetails) Unmarshal(b []byte) error {
3056         buf := codec.NewBuffer(b)
3057         copy(m.OutsideIPAddress[:], buf.DecodeBytes(4))
3058         m.OutsidePort = buf.DecodeUint16()
3059         copy(m.InsideIPAddress[:], buf.DecodeBytes(4))
3060         m.InsidePort = buf.DecodeUint16()
3061         m.Protocol = buf.DecodeUint16()
3062         m.Flags = NatConfigFlags(buf.DecodeUint8())
3063         m.LastHeard = buf.DecodeUint64()
3064         m.TotalBytes = buf.DecodeUint64()
3065         m.TotalPkts = buf.DecodeUint32()
3066         copy(m.ExtHostAddress[:], buf.DecodeBytes(4))
3067         m.ExtHostPort = buf.DecodeUint16()
3068         copy(m.ExtHostNatAddress[:], buf.DecodeBytes(4))
3069         m.ExtHostNatPort = buf.DecodeUint16()
3070         return nil
3071 }
3072
3073 // Nat44UserSessionDump defines message 'nat44_user_session_dump'.
3074 type Nat44UserSessionDump struct {
3075         IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
3076         VrfID     uint32     `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3077 }
3078
3079 func (m *Nat44UserSessionDump) Reset()               { *m = Nat44UserSessionDump{} }
3080 func (*Nat44UserSessionDump) GetMessageName() string { return "nat44_user_session_dump" }
3081 func (*Nat44UserSessionDump) GetCrcString() string   { return "e1899c98" }
3082 func (*Nat44UserSessionDump) GetMessageType() api.MessageType {
3083         return api.RequestMessage
3084 }
3085
3086 func (m *Nat44UserSessionDump) Size() (size int) {
3087         if m == nil {
3088                 return 0
3089         }
3090         size += 1 * 4 // m.IPAddress
3091         size += 4     // m.VrfID
3092         return size
3093 }
3094 func (m *Nat44UserSessionDump) Marshal(b []byte) ([]byte, error) {
3095         if b == nil {
3096                 b = make([]byte, m.Size())
3097         }
3098         buf := codec.NewBuffer(b)
3099         buf.EncodeBytes(m.IPAddress[:], 4)
3100         buf.EncodeUint32(m.VrfID)
3101         return buf.Bytes(), nil
3102 }
3103 func (m *Nat44UserSessionDump) Unmarshal(b []byte) error {
3104         buf := codec.NewBuffer(b)
3105         copy(m.IPAddress[:], buf.DecodeBytes(4))
3106         m.VrfID = buf.DecodeUint32()
3107         return nil
3108 }
3109
3110 // Nat64AddDelInterface defines message 'nat64_add_del_interface'.
3111 type Nat64AddDelInterface struct {
3112         IsAdd     bool           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
3113         Flags     NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
3114         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3115 }
3116
3117 func (m *Nat64AddDelInterface) Reset()               { *m = Nat64AddDelInterface{} }
3118 func (*Nat64AddDelInterface) GetMessageName() string { return "nat64_add_del_interface" }
3119 func (*Nat64AddDelInterface) GetCrcString() string   { return "f3699b83" }
3120 func (*Nat64AddDelInterface) GetMessageType() api.MessageType {
3121         return api.RequestMessage
3122 }
3123
3124 func (m *Nat64AddDelInterface) Size() (size int) {
3125         if m == nil {
3126                 return 0
3127         }
3128         size += 1 // m.IsAdd
3129         size += 1 // m.Flags
3130         size += 4 // m.SwIfIndex
3131         return size
3132 }
3133 func (m *Nat64AddDelInterface) Marshal(b []byte) ([]byte, error) {
3134         if b == nil {
3135                 b = make([]byte, m.Size())
3136         }
3137         buf := codec.NewBuffer(b)
3138         buf.EncodeBool(m.IsAdd)
3139         buf.EncodeUint8(uint8(m.Flags))
3140         buf.EncodeUint32(uint32(m.SwIfIndex))
3141         return buf.Bytes(), nil
3142 }
3143 func (m *Nat64AddDelInterface) Unmarshal(b []byte) error {
3144         buf := codec.NewBuffer(b)
3145         m.IsAdd = buf.DecodeBool()
3146         m.Flags = NatConfigFlags(buf.DecodeUint8())
3147         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
3148         return nil
3149 }
3150
3151 // Nat64AddDelInterfaceAddr defines message 'nat64_add_del_interface_addr'.
3152 type Nat64AddDelInterfaceAddr struct {
3153         IsAdd     bool           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
3154         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3155 }
3156
3157 func (m *Nat64AddDelInterfaceAddr) Reset()               { *m = Nat64AddDelInterfaceAddr{} }
3158 func (*Nat64AddDelInterfaceAddr) GetMessageName() string { return "nat64_add_del_interface_addr" }
3159 func (*Nat64AddDelInterfaceAddr) GetCrcString() string   { return "47d6e753" }
3160 func (*Nat64AddDelInterfaceAddr) GetMessageType() api.MessageType {
3161         return api.RequestMessage
3162 }
3163
3164 func (m *Nat64AddDelInterfaceAddr) Size() (size int) {
3165         if m == nil {
3166                 return 0
3167         }
3168         size += 1 // m.IsAdd
3169         size += 4 // m.SwIfIndex
3170         return size
3171 }
3172 func (m *Nat64AddDelInterfaceAddr) Marshal(b []byte) ([]byte, error) {
3173         if b == nil {
3174                 b = make([]byte, m.Size())
3175         }
3176         buf := codec.NewBuffer(b)
3177         buf.EncodeBool(m.IsAdd)
3178         buf.EncodeUint32(uint32(m.SwIfIndex))
3179         return buf.Bytes(), nil
3180 }
3181 func (m *Nat64AddDelInterfaceAddr) Unmarshal(b []byte) error {
3182         buf := codec.NewBuffer(b)
3183         m.IsAdd = buf.DecodeBool()
3184         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
3185         return nil
3186 }
3187
3188 // Nat64AddDelInterfaceAddrReply defines message 'nat64_add_del_interface_addr_reply'.
3189 type Nat64AddDelInterfaceAddrReply struct {
3190         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3191 }
3192
3193 func (m *Nat64AddDelInterfaceAddrReply) Reset() { *m = Nat64AddDelInterfaceAddrReply{} }
3194 func (*Nat64AddDelInterfaceAddrReply) GetMessageName() string {
3195         return "nat64_add_del_interface_addr_reply"
3196 }
3197 func (*Nat64AddDelInterfaceAddrReply) GetCrcString() string { return "e8d4e804" }
3198 func (*Nat64AddDelInterfaceAddrReply) GetMessageType() api.MessageType {
3199         return api.ReplyMessage
3200 }
3201
3202 func (m *Nat64AddDelInterfaceAddrReply) Size() (size int) {
3203         if m == nil {
3204                 return 0
3205         }
3206         size += 4 // m.Retval
3207         return size
3208 }
3209 func (m *Nat64AddDelInterfaceAddrReply) Marshal(b []byte) ([]byte, error) {
3210         if b == nil {
3211                 b = make([]byte, m.Size())
3212         }
3213         buf := codec.NewBuffer(b)
3214         buf.EncodeInt32(m.Retval)
3215         return buf.Bytes(), nil
3216 }
3217 func (m *Nat64AddDelInterfaceAddrReply) Unmarshal(b []byte) error {
3218         buf := codec.NewBuffer(b)
3219         m.Retval = buf.DecodeInt32()
3220         return nil
3221 }
3222
3223 // Nat64AddDelInterfaceReply defines message 'nat64_add_del_interface_reply'.
3224 type Nat64AddDelInterfaceReply struct {
3225         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3226 }
3227
3228 func (m *Nat64AddDelInterfaceReply) Reset()               { *m = Nat64AddDelInterfaceReply{} }
3229 func (*Nat64AddDelInterfaceReply) GetMessageName() string { return "nat64_add_del_interface_reply" }
3230 func (*Nat64AddDelInterfaceReply) GetCrcString() string   { return "e8d4e804" }
3231 func (*Nat64AddDelInterfaceReply) GetMessageType() api.MessageType {
3232         return api.ReplyMessage
3233 }
3234
3235 func (m *Nat64AddDelInterfaceReply) Size() (size int) {
3236         if m == nil {
3237                 return 0
3238         }
3239         size += 4 // m.Retval
3240         return size
3241 }
3242 func (m *Nat64AddDelInterfaceReply) Marshal(b []byte) ([]byte, error) {
3243         if b == nil {
3244                 b = make([]byte, m.Size())
3245         }
3246         buf := codec.NewBuffer(b)
3247         buf.EncodeInt32(m.Retval)
3248         return buf.Bytes(), nil
3249 }
3250 func (m *Nat64AddDelInterfaceReply) Unmarshal(b []byte) error {
3251         buf := codec.NewBuffer(b)
3252         m.Retval = buf.DecodeInt32()
3253         return nil
3254 }
3255
3256 // Nat64AddDelPoolAddrRange defines message 'nat64_add_del_pool_addr_range'.
3257 type Nat64AddDelPoolAddrRange struct {
3258         StartAddr IP4Address `binapi:"ip4_address,name=start_addr" json:"start_addr,omitempty"`
3259         EndAddr   IP4Address `binapi:"ip4_address,name=end_addr" json:"end_addr,omitempty"`
3260         VrfID     uint32     `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3261         IsAdd     bool       `binapi:"bool,name=is_add" json:"is_add,omitempty"`
3262 }
3263
3264 func (m *Nat64AddDelPoolAddrRange) Reset()               { *m = Nat64AddDelPoolAddrRange{} }
3265 func (*Nat64AddDelPoolAddrRange) GetMessageName() string { return "nat64_add_del_pool_addr_range" }
3266 func (*Nat64AddDelPoolAddrRange) GetCrcString() string   { return "21234ef3" }
3267 func (*Nat64AddDelPoolAddrRange) GetMessageType() api.MessageType {
3268         return api.RequestMessage
3269 }
3270
3271 func (m *Nat64AddDelPoolAddrRange) Size() (size int) {
3272         if m == nil {
3273                 return 0
3274         }
3275         size += 1 * 4 // m.StartAddr
3276         size += 1 * 4 // m.EndAddr
3277         size += 4     // m.VrfID
3278         size += 1     // m.IsAdd
3279         return size
3280 }
3281 func (m *Nat64AddDelPoolAddrRange) Marshal(b []byte) ([]byte, error) {
3282         if b == nil {
3283                 b = make([]byte, m.Size())
3284         }
3285         buf := codec.NewBuffer(b)
3286         buf.EncodeBytes(m.StartAddr[:], 4)
3287         buf.EncodeBytes(m.EndAddr[:], 4)
3288         buf.EncodeUint32(m.VrfID)
3289         buf.EncodeBool(m.IsAdd)
3290         return buf.Bytes(), nil
3291 }
3292 func (m *Nat64AddDelPoolAddrRange) Unmarshal(b []byte) error {
3293         buf := codec.NewBuffer(b)
3294         copy(m.StartAddr[:], buf.DecodeBytes(4))
3295         copy(m.EndAddr[:], buf.DecodeBytes(4))
3296         m.VrfID = buf.DecodeUint32()
3297         m.IsAdd = buf.DecodeBool()
3298         return nil
3299 }
3300
3301 // Nat64AddDelPoolAddrRangeReply defines message 'nat64_add_del_pool_addr_range_reply'.
3302 type Nat64AddDelPoolAddrRangeReply struct {
3303         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3304 }
3305
3306 func (m *Nat64AddDelPoolAddrRangeReply) Reset() { *m = Nat64AddDelPoolAddrRangeReply{} }
3307 func (*Nat64AddDelPoolAddrRangeReply) GetMessageName() string {
3308         return "nat64_add_del_pool_addr_range_reply"
3309 }
3310 func (*Nat64AddDelPoolAddrRangeReply) GetCrcString() string { return "e8d4e804" }
3311 func (*Nat64AddDelPoolAddrRangeReply) GetMessageType() api.MessageType {
3312         return api.ReplyMessage
3313 }
3314
3315 func (m *Nat64AddDelPoolAddrRangeReply) Size() (size int) {
3316         if m == nil {
3317                 return 0
3318         }
3319         size += 4 // m.Retval
3320         return size
3321 }
3322 func (m *Nat64AddDelPoolAddrRangeReply) Marshal(b []byte) ([]byte, error) {
3323         if b == nil {
3324                 b = make([]byte, m.Size())
3325         }
3326         buf := codec.NewBuffer(b)
3327         buf.EncodeInt32(m.Retval)
3328         return buf.Bytes(), nil
3329 }
3330 func (m *Nat64AddDelPoolAddrRangeReply) Unmarshal(b []byte) error {
3331         buf := codec.NewBuffer(b)
3332         m.Retval = buf.DecodeInt32()
3333         return nil
3334 }
3335
3336 // Nat64AddDelPrefix defines message 'nat64_add_del_prefix'.
3337 type Nat64AddDelPrefix struct {
3338         Prefix IP6Prefix `binapi:"ip6_prefix,name=prefix" json:"prefix,omitempty"`
3339         VrfID  uint32    `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3340         IsAdd  bool      `binapi:"bool,name=is_add" json:"is_add,omitempty"`
3341 }
3342
3343 func (m *Nat64AddDelPrefix) Reset()               { *m = Nat64AddDelPrefix{} }
3344 func (*Nat64AddDelPrefix) GetMessageName() string { return "nat64_add_del_prefix" }
3345 func (*Nat64AddDelPrefix) GetCrcString() string   { return "727b2f4c" }
3346 func (*Nat64AddDelPrefix) GetMessageType() api.MessageType {
3347         return api.RequestMessage
3348 }
3349
3350 func (m *Nat64AddDelPrefix) Size() (size int) {
3351         if m == nil {
3352                 return 0
3353         }
3354         size += 1 * 16 // m.Prefix.Address
3355         size += 1      // m.Prefix.Len
3356         size += 4      // m.VrfID
3357         size += 1      // m.IsAdd
3358         return size
3359 }
3360 func (m *Nat64AddDelPrefix) Marshal(b []byte) ([]byte, error) {
3361         if b == nil {
3362                 b = make([]byte, m.Size())
3363         }
3364         buf := codec.NewBuffer(b)
3365         buf.EncodeBytes(m.Prefix.Address[:], 16)
3366         buf.EncodeUint8(m.Prefix.Len)
3367         buf.EncodeUint32(m.VrfID)
3368         buf.EncodeBool(m.IsAdd)
3369         return buf.Bytes(), nil
3370 }
3371 func (m *Nat64AddDelPrefix) Unmarshal(b []byte) error {
3372         buf := codec.NewBuffer(b)
3373         copy(m.Prefix.Address[:], buf.DecodeBytes(16))
3374         m.Prefix.Len = buf.DecodeUint8()
3375         m.VrfID = buf.DecodeUint32()
3376         m.IsAdd = buf.DecodeBool()
3377         return nil
3378 }
3379
3380 // Nat64AddDelPrefixReply defines message 'nat64_add_del_prefix_reply'.
3381 type Nat64AddDelPrefixReply struct {
3382         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3383 }
3384
3385 func (m *Nat64AddDelPrefixReply) Reset()               { *m = Nat64AddDelPrefixReply{} }
3386 func (*Nat64AddDelPrefixReply) GetMessageName() string { return "nat64_add_del_prefix_reply" }
3387 func (*Nat64AddDelPrefixReply) GetCrcString() string   { return "e8d4e804" }
3388 func (*Nat64AddDelPrefixReply) GetMessageType() api.MessageType {
3389         return api.ReplyMessage
3390 }
3391
3392 func (m *Nat64AddDelPrefixReply) Size() (size int) {
3393         if m == nil {
3394                 return 0
3395         }
3396         size += 4 // m.Retval
3397         return size
3398 }
3399 func (m *Nat64AddDelPrefixReply) Marshal(b []byte) ([]byte, error) {
3400         if b == nil {
3401                 b = make([]byte, m.Size())
3402         }
3403         buf := codec.NewBuffer(b)
3404         buf.EncodeInt32(m.Retval)
3405         return buf.Bytes(), nil
3406 }
3407 func (m *Nat64AddDelPrefixReply) Unmarshal(b []byte) error {
3408         buf := codec.NewBuffer(b)
3409         m.Retval = buf.DecodeInt32()
3410         return nil
3411 }
3412
3413 // Nat64AddDelStaticBib defines message 'nat64_add_del_static_bib'.
3414 type Nat64AddDelStaticBib struct {
3415         IAddr IP6Address `binapi:"ip6_address,name=i_addr" json:"i_addr,omitempty"`
3416         OAddr IP4Address `binapi:"ip4_address,name=o_addr" json:"o_addr,omitempty"`
3417         IPort uint16     `binapi:"u16,name=i_port" json:"i_port,omitempty"`
3418         OPort uint16     `binapi:"u16,name=o_port" json:"o_port,omitempty"`
3419         VrfID uint32     `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3420         Proto uint8      `binapi:"u8,name=proto" json:"proto,omitempty"`
3421         IsAdd bool       `binapi:"bool,name=is_add" json:"is_add,omitempty"`
3422 }
3423
3424 func (m *Nat64AddDelStaticBib) Reset()               { *m = Nat64AddDelStaticBib{} }
3425 func (*Nat64AddDelStaticBib) GetMessageName() string { return "nat64_add_del_static_bib" }
3426 func (*Nat64AddDelStaticBib) GetCrcString() string   { return "90fae58a" }
3427 func (*Nat64AddDelStaticBib) GetMessageType() api.MessageType {
3428         return api.RequestMessage
3429 }
3430
3431 func (m *Nat64AddDelStaticBib) Size() (size int) {
3432         if m == nil {
3433                 return 0
3434         }
3435         size += 1 * 16 // m.IAddr
3436         size += 1 * 4  // m.OAddr
3437         size += 2      // m.IPort
3438         size += 2      // m.OPort
3439         size += 4      // m.VrfID
3440         size += 1      // m.Proto
3441         size += 1      // m.IsAdd
3442         return size
3443 }
3444 func (m *Nat64AddDelStaticBib) Marshal(b []byte) ([]byte, error) {
3445         if b == nil {
3446                 b = make([]byte, m.Size())
3447         }
3448         buf := codec.NewBuffer(b)
3449         buf.EncodeBytes(m.IAddr[:], 16)
3450         buf.EncodeBytes(m.OAddr[:], 4)
3451         buf.EncodeUint16(m.IPort)
3452         buf.EncodeUint16(m.OPort)
3453         buf.EncodeUint32(m.VrfID)
3454         buf.EncodeUint8(m.Proto)
3455         buf.EncodeBool(m.IsAdd)
3456         return buf.Bytes(), nil
3457 }
3458 func (m *Nat64AddDelStaticBib) Unmarshal(b []byte) error {
3459         buf := codec.NewBuffer(b)
3460         copy(m.IAddr[:], buf.DecodeBytes(16))
3461         copy(m.OAddr[:], buf.DecodeBytes(4))
3462         m.IPort = buf.DecodeUint16()
3463         m.OPort = buf.DecodeUint16()
3464         m.VrfID = buf.DecodeUint32()
3465         m.Proto = buf.DecodeUint8()
3466         m.IsAdd = buf.DecodeBool()
3467         return nil
3468 }
3469
3470 // Nat64AddDelStaticBibReply defines message 'nat64_add_del_static_bib_reply'.
3471 type Nat64AddDelStaticBibReply struct {
3472         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3473 }
3474
3475 func (m *Nat64AddDelStaticBibReply) Reset()               { *m = Nat64AddDelStaticBibReply{} }
3476 func (*Nat64AddDelStaticBibReply) GetMessageName() string { return "nat64_add_del_static_bib_reply" }
3477 func (*Nat64AddDelStaticBibReply) GetCrcString() string   { return "e8d4e804" }
3478 func (*Nat64AddDelStaticBibReply) GetMessageType() api.MessageType {
3479         return api.ReplyMessage
3480 }
3481
3482 func (m *Nat64AddDelStaticBibReply) Size() (size int) {
3483         if m == nil {
3484                 return 0
3485         }
3486         size += 4 // m.Retval
3487         return size
3488 }
3489 func (m *Nat64AddDelStaticBibReply) Marshal(b []byte) ([]byte, error) {
3490         if b == nil {
3491                 b = make([]byte, m.Size())
3492         }
3493         buf := codec.NewBuffer(b)
3494         buf.EncodeInt32(m.Retval)
3495         return buf.Bytes(), nil
3496 }
3497 func (m *Nat64AddDelStaticBibReply) Unmarshal(b []byte) error {
3498         buf := codec.NewBuffer(b)
3499         m.Retval = buf.DecodeInt32()
3500         return nil
3501 }
3502
3503 // Nat64BibDetails defines message 'nat64_bib_details'.
3504 type Nat64BibDetails struct {
3505         IAddr  IP6Address     `binapi:"ip6_address,name=i_addr" json:"i_addr,omitempty"`
3506         OAddr  IP4Address     `binapi:"ip4_address,name=o_addr" json:"o_addr,omitempty"`
3507         IPort  uint16         `binapi:"u16,name=i_port" json:"i_port,omitempty"`
3508         OPort  uint16         `binapi:"u16,name=o_port" json:"o_port,omitempty"`
3509         VrfID  uint32         `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3510         Proto  uint8          `binapi:"u8,name=proto" json:"proto,omitempty"`
3511         Flags  NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
3512         SesNum uint32         `binapi:"u32,name=ses_num" json:"ses_num,omitempty"`
3513 }
3514
3515 func (m *Nat64BibDetails) Reset()               { *m = Nat64BibDetails{} }
3516 func (*Nat64BibDetails) GetMessageName() string { return "nat64_bib_details" }
3517 func (*Nat64BibDetails) GetCrcString() string   { return "62c8541d" }
3518 func (*Nat64BibDetails) GetMessageType() api.MessageType {
3519         return api.ReplyMessage
3520 }
3521
3522 func (m *Nat64BibDetails) Size() (size int) {
3523         if m == nil {
3524                 return 0
3525         }
3526         size += 1 * 16 // m.IAddr
3527         size += 1 * 4  // m.OAddr
3528         size += 2      // m.IPort
3529         size += 2      // m.OPort
3530         size += 4      // m.VrfID
3531         size += 1      // m.Proto
3532         size += 1      // m.Flags
3533         size += 4      // m.SesNum
3534         return size
3535 }
3536 func (m *Nat64BibDetails) Marshal(b []byte) ([]byte, error) {
3537         if b == nil {
3538                 b = make([]byte, m.Size())
3539         }
3540         buf := codec.NewBuffer(b)
3541         buf.EncodeBytes(m.IAddr[:], 16)
3542         buf.EncodeBytes(m.OAddr[:], 4)
3543         buf.EncodeUint16(m.IPort)
3544         buf.EncodeUint16(m.OPort)
3545         buf.EncodeUint32(m.VrfID)
3546         buf.EncodeUint8(m.Proto)
3547         buf.EncodeUint8(uint8(m.Flags))
3548         buf.EncodeUint32(m.SesNum)
3549         return buf.Bytes(), nil
3550 }
3551 func (m *Nat64BibDetails) Unmarshal(b []byte) error {
3552         buf := codec.NewBuffer(b)
3553         copy(m.IAddr[:], buf.DecodeBytes(16))
3554         copy(m.OAddr[:], buf.DecodeBytes(4))
3555         m.IPort = buf.DecodeUint16()
3556         m.OPort = buf.DecodeUint16()
3557         m.VrfID = buf.DecodeUint32()
3558         m.Proto = buf.DecodeUint8()
3559         m.Flags = NatConfigFlags(buf.DecodeUint8())
3560         m.SesNum = buf.DecodeUint32()
3561         return nil
3562 }
3563
3564 // Nat64BibDump defines message 'nat64_bib_dump'.
3565 type Nat64BibDump struct {
3566         Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
3567 }
3568
3569 func (m *Nat64BibDump) Reset()               { *m = Nat64BibDump{} }
3570 func (*Nat64BibDump) GetMessageName() string { return "nat64_bib_dump" }
3571 func (*Nat64BibDump) GetCrcString() string   { return "cfcb6b75" }
3572 func (*Nat64BibDump) GetMessageType() api.MessageType {
3573         return api.RequestMessage
3574 }
3575
3576 func (m *Nat64BibDump) Size() (size int) {
3577         if m == nil {
3578                 return 0
3579         }
3580         size += 1 // m.Proto
3581         return size
3582 }
3583 func (m *Nat64BibDump) Marshal(b []byte) ([]byte, error) {
3584         if b == nil {
3585                 b = make([]byte, m.Size())
3586         }
3587         buf := codec.NewBuffer(b)
3588         buf.EncodeUint8(m.Proto)
3589         return buf.Bytes(), nil
3590 }
3591 func (m *Nat64BibDump) Unmarshal(b []byte) error {
3592         buf := codec.NewBuffer(b)
3593         m.Proto = buf.DecodeUint8()
3594         return nil
3595 }
3596
3597 // Nat64InterfaceDetails defines message 'nat64_interface_details'.
3598 type Nat64InterfaceDetails struct {
3599         Flags     NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
3600         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3601 }
3602
3603 func (m *Nat64InterfaceDetails) Reset()               { *m = Nat64InterfaceDetails{} }
3604 func (*Nat64InterfaceDetails) GetMessageName() string { return "nat64_interface_details" }
3605 func (*Nat64InterfaceDetails) GetCrcString() string   { return "5d286289" }
3606 func (*Nat64InterfaceDetails) GetMessageType() api.MessageType {
3607         return api.ReplyMessage
3608 }
3609
3610 func (m *Nat64InterfaceDetails) Size() (size int) {
3611         if m == nil {
3612                 return 0
3613         }
3614         size += 1 // m.Flags
3615         size += 4 // m.SwIfIndex
3616         return size
3617 }
3618 func (m *Nat64InterfaceDetails) Marshal(b []byte) ([]byte, error) {
3619         if b == nil {
3620                 b = make([]byte, m.Size())
3621         }
3622         buf := codec.NewBuffer(b)
3623         buf.EncodeUint8(uint8(m.Flags))
3624         buf.EncodeUint32(uint32(m.SwIfIndex))
3625         return buf.Bytes(), nil
3626 }
3627 func (m *Nat64InterfaceDetails) Unmarshal(b []byte) error {
3628         buf := codec.NewBuffer(b)
3629         m.Flags = NatConfigFlags(buf.DecodeUint8())
3630         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
3631         return nil
3632 }
3633
3634 // Nat64InterfaceDump defines message 'nat64_interface_dump'.
3635 type Nat64InterfaceDump struct{}
3636
3637 func (m *Nat64InterfaceDump) Reset()               { *m = Nat64InterfaceDump{} }
3638 func (*Nat64InterfaceDump) GetMessageName() string { return "nat64_interface_dump" }
3639 func (*Nat64InterfaceDump) GetCrcString() string   { return "51077d14" }
3640 func (*Nat64InterfaceDump) GetMessageType() api.MessageType {
3641         return api.RequestMessage
3642 }
3643
3644 func (m *Nat64InterfaceDump) Size() (size int) {
3645         if m == nil {
3646                 return 0
3647         }
3648         return size
3649 }
3650 func (m *Nat64InterfaceDump) Marshal(b []byte) ([]byte, error) {
3651         if b == nil {
3652                 b = make([]byte, m.Size())
3653         }
3654         buf := codec.NewBuffer(b)
3655         return buf.Bytes(), nil
3656 }
3657 func (m *Nat64InterfaceDump) Unmarshal(b []byte) error {
3658         return nil
3659 }
3660
3661 // Nat64PoolAddrDetails defines message 'nat64_pool_addr_details'.
3662 type Nat64PoolAddrDetails struct {
3663         Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
3664         VrfID   uint32     `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3665 }
3666
3667 func (m *Nat64PoolAddrDetails) Reset()               { *m = Nat64PoolAddrDetails{} }
3668 func (*Nat64PoolAddrDetails) GetMessageName() string { return "nat64_pool_addr_details" }
3669 func (*Nat64PoolAddrDetails) GetCrcString() string   { return "9bb99cdb" }
3670 func (*Nat64PoolAddrDetails) GetMessageType() api.MessageType {
3671         return api.ReplyMessage
3672 }
3673
3674 func (m *Nat64PoolAddrDetails) Size() (size int) {
3675         if m == nil {
3676                 return 0
3677         }
3678         size += 1 * 4 // m.Address
3679         size += 4     // m.VrfID
3680         return size
3681 }
3682 func (m *Nat64PoolAddrDetails) Marshal(b []byte) ([]byte, error) {
3683         if b == nil {
3684                 b = make([]byte, m.Size())
3685         }
3686         buf := codec.NewBuffer(b)
3687         buf.EncodeBytes(m.Address[:], 4)
3688         buf.EncodeUint32(m.VrfID)
3689         return buf.Bytes(), nil
3690 }
3691 func (m *Nat64PoolAddrDetails) Unmarshal(b []byte) error {
3692         buf := codec.NewBuffer(b)
3693         copy(m.Address[:], buf.DecodeBytes(4))
3694         m.VrfID = buf.DecodeUint32()
3695         return nil
3696 }
3697
3698 // Nat64PoolAddrDump defines message 'nat64_pool_addr_dump'.
3699 type Nat64PoolAddrDump struct{}
3700
3701 func (m *Nat64PoolAddrDump) Reset()               { *m = Nat64PoolAddrDump{} }
3702 func (*Nat64PoolAddrDump) GetMessageName() string { return "nat64_pool_addr_dump" }
3703 func (*Nat64PoolAddrDump) GetCrcString() string   { return "51077d14" }
3704 func (*Nat64PoolAddrDump) GetMessageType() api.MessageType {
3705         return api.RequestMessage
3706 }
3707
3708 func (m *Nat64PoolAddrDump) Size() (size int) {
3709         if m == nil {
3710                 return 0
3711         }
3712         return size
3713 }
3714 func (m *Nat64PoolAddrDump) Marshal(b []byte) ([]byte, error) {
3715         if b == nil {
3716                 b = make([]byte, m.Size())
3717         }
3718         buf := codec.NewBuffer(b)
3719         return buf.Bytes(), nil
3720 }
3721 func (m *Nat64PoolAddrDump) Unmarshal(b []byte) error {
3722         return nil
3723 }
3724
3725 // Nat64PrefixDetails defines message 'nat64_prefix_details'.
3726 type Nat64PrefixDetails struct {
3727         Prefix IP6Prefix `binapi:"ip6_prefix,name=prefix" json:"prefix,omitempty"`
3728         VrfID  uint32    `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3729 }
3730
3731 func (m *Nat64PrefixDetails) Reset()               { *m = Nat64PrefixDetails{} }
3732 func (*Nat64PrefixDetails) GetMessageName() string { return "nat64_prefix_details" }
3733 func (*Nat64PrefixDetails) GetCrcString() string   { return "20568de3" }
3734 func (*Nat64PrefixDetails) GetMessageType() api.MessageType {
3735         return api.ReplyMessage
3736 }
3737
3738 func (m *Nat64PrefixDetails) Size() (size int) {
3739         if m == nil {
3740                 return 0
3741         }
3742         size += 1 * 16 // m.Prefix.Address
3743         size += 1      // m.Prefix.Len
3744         size += 4      // m.VrfID
3745         return size
3746 }
3747 func (m *Nat64PrefixDetails) Marshal(b []byte) ([]byte, error) {
3748         if b == nil {
3749                 b = make([]byte, m.Size())
3750         }
3751         buf := codec.NewBuffer(b)
3752         buf.EncodeBytes(m.Prefix.Address[:], 16)
3753         buf.EncodeUint8(m.Prefix.Len)
3754         buf.EncodeUint32(m.VrfID)
3755         return buf.Bytes(), nil
3756 }
3757 func (m *Nat64PrefixDetails) Unmarshal(b []byte) error {
3758         buf := codec.NewBuffer(b)
3759         copy(m.Prefix.Address[:], buf.DecodeBytes(16))
3760         m.Prefix.Len = buf.DecodeUint8()
3761         m.VrfID = buf.DecodeUint32()
3762         return nil
3763 }
3764
3765 // Nat64PrefixDump defines message 'nat64_prefix_dump'.
3766 type Nat64PrefixDump struct{}
3767
3768 func (m *Nat64PrefixDump) Reset()               { *m = Nat64PrefixDump{} }
3769 func (*Nat64PrefixDump) GetMessageName() string { return "nat64_prefix_dump" }
3770 func (*Nat64PrefixDump) GetCrcString() string   { return "51077d14" }
3771 func (*Nat64PrefixDump) GetMessageType() api.MessageType {
3772         return api.RequestMessage
3773 }
3774
3775 func (m *Nat64PrefixDump) Size() (size int) {
3776         if m == nil {
3777                 return 0
3778         }
3779         return size
3780 }
3781 func (m *Nat64PrefixDump) Marshal(b []byte) ([]byte, error) {
3782         if b == nil {
3783                 b = make([]byte, m.Size())
3784         }
3785         buf := codec.NewBuffer(b)
3786         return buf.Bytes(), nil
3787 }
3788 func (m *Nat64PrefixDump) Unmarshal(b []byte) error {
3789         return nil
3790 }
3791
3792 // Nat64StDetails defines message 'nat64_st_details'.
3793 type Nat64StDetails struct {
3794         IlAddr IP6Address `binapi:"ip6_address,name=il_addr" json:"il_addr,omitempty"`
3795         OlAddr IP4Address `binapi:"ip4_address,name=ol_addr" json:"ol_addr,omitempty"`
3796         IlPort uint16     `binapi:"u16,name=il_port" json:"il_port,omitempty"`
3797         OlPort uint16     `binapi:"u16,name=ol_port" json:"ol_port,omitempty"`
3798         IrAddr IP6Address `binapi:"ip6_address,name=ir_addr" json:"ir_addr,omitempty"`
3799         OrAddr IP4Address `binapi:"ip4_address,name=or_addr" json:"or_addr,omitempty"`
3800         RPort  uint16     `binapi:"u16,name=r_port" json:"r_port,omitempty"`
3801         VrfID  uint32     `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3802         Proto  uint8      `binapi:"u8,name=proto" json:"proto,omitempty"`
3803 }
3804
3805 func (m *Nat64StDetails) Reset()               { *m = Nat64StDetails{} }
3806 func (*Nat64StDetails) GetMessageName() string { return "nat64_st_details" }
3807 func (*Nat64StDetails) GetCrcString() string   { return "c770d620" }
3808 func (*Nat64StDetails) GetMessageType() api.MessageType {
3809         return api.ReplyMessage
3810 }
3811
3812 func (m *Nat64StDetails) Size() (size int) {
3813         if m == nil {
3814                 return 0
3815         }
3816         size += 1 * 16 // m.IlAddr
3817         size += 1 * 4  // m.OlAddr
3818         size += 2      // m.IlPort
3819         size += 2      // m.OlPort
3820         size += 1 * 16 // m.IrAddr
3821         size += 1 * 4  // m.OrAddr
3822         size += 2      // m.RPort
3823         size += 4      // m.VrfID
3824         size += 1      // m.Proto
3825         return size
3826 }
3827 func (m *Nat64StDetails) Marshal(b []byte) ([]byte, error) {
3828         if b == nil {
3829                 b = make([]byte, m.Size())
3830         }
3831         buf := codec.NewBuffer(b)
3832         buf.EncodeBytes(m.IlAddr[:], 16)
3833         buf.EncodeBytes(m.OlAddr[:], 4)
3834         buf.EncodeUint16(m.IlPort)
3835         buf.EncodeUint16(m.OlPort)
3836         buf.EncodeBytes(m.IrAddr[:], 16)
3837         buf.EncodeBytes(m.OrAddr[:], 4)
3838         buf.EncodeUint16(m.RPort)
3839         buf.EncodeUint32(m.VrfID)
3840         buf.EncodeUint8(m.Proto)
3841         return buf.Bytes(), nil
3842 }
3843 func (m *Nat64StDetails) Unmarshal(b []byte) error {
3844         buf := codec.NewBuffer(b)
3845         copy(m.IlAddr[:], buf.DecodeBytes(16))
3846         copy(m.OlAddr[:], buf.DecodeBytes(4))
3847         m.IlPort = buf.DecodeUint16()
3848         m.OlPort = buf.DecodeUint16()
3849         copy(m.IrAddr[:], buf.DecodeBytes(16))
3850         copy(m.OrAddr[:], buf.DecodeBytes(4))
3851         m.RPort = buf.DecodeUint16()
3852         m.VrfID = buf.DecodeUint32()
3853         m.Proto = buf.DecodeUint8()
3854         return nil
3855 }
3856
3857 // Nat64StDump defines message 'nat64_st_dump'.
3858 type Nat64StDump struct {
3859         Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
3860 }
3861
3862 func (m *Nat64StDump) Reset()               { *m = Nat64StDump{} }
3863 func (*Nat64StDump) GetMessageName() string { return "nat64_st_dump" }
3864 func (*Nat64StDump) GetCrcString() string   { return "cfcb6b75" }
3865 func (*Nat64StDump) GetMessageType() api.MessageType {
3866         return api.RequestMessage
3867 }
3868
3869 func (m *Nat64StDump) Size() (size int) {
3870         if m == nil {
3871                 return 0
3872         }
3873         size += 1 // m.Proto
3874         return size
3875 }
3876 func (m *Nat64StDump) Marshal(b []byte) ([]byte, error) {
3877         if b == nil {
3878                 b = make([]byte, m.Size())
3879         }
3880         buf := codec.NewBuffer(b)
3881         buf.EncodeUint8(m.Proto)
3882         return buf.Bytes(), nil
3883 }
3884 func (m *Nat64StDump) Unmarshal(b []byte) error {
3885         buf := codec.NewBuffer(b)
3886         m.Proto = buf.DecodeUint8()
3887         return nil
3888 }
3889
3890 // Nat66AddDelInterface defines message 'nat66_add_del_interface'.
3891 type Nat66AddDelInterface struct {
3892         IsAdd     bool           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
3893         Flags     NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
3894         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3895 }
3896
3897 func (m *Nat66AddDelInterface) Reset()               { *m = Nat66AddDelInterface{} }
3898 func (*Nat66AddDelInterface) GetMessageName() string { return "nat66_add_del_interface" }
3899 func (*Nat66AddDelInterface) GetCrcString() string   { return "f3699b83" }
3900 func (*Nat66AddDelInterface) GetMessageType() api.MessageType {
3901         return api.RequestMessage
3902 }
3903
3904 func (m *Nat66AddDelInterface) Size() (size int) {
3905         if m == nil {
3906                 return 0
3907         }
3908         size += 1 // m.IsAdd
3909         size += 1 // m.Flags
3910         size += 4 // m.SwIfIndex
3911         return size
3912 }
3913 func (m *Nat66AddDelInterface) Marshal(b []byte) ([]byte, error) {
3914         if b == nil {
3915                 b = make([]byte, m.Size())
3916         }
3917         buf := codec.NewBuffer(b)
3918         buf.EncodeBool(m.IsAdd)
3919         buf.EncodeUint8(uint8(m.Flags))
3920         buf.EncodeUint32(uint32(m.SwIfIndex))
3921         return buf.Bytes(), nil
3922 }
3923 func (m *Nat66AddDelInterface) Unmarshal(b []byte) error {
3924         buf := codec.NewBuffer(b)
3925         m.IsAdd = buf.DecodeBool()
3926         m.Flags = NatConfigFlags(buf.DecodeUint8())
3927         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
3928         return nil
3929 }
3930
3931 // Nat66AddDelInterfaceReply defines message 'nat66_add_del_interface_reply'.
3932 type Nat66AddDelInterfaceReply struct {
3933         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3934 }
3935
3936 func (m *Nat66AddDelInterfaceReply) Reset()               { *m = Nat66AddDelInterfaceReply{} }
3937 func (*Nat66AddDelInterfaceReply) GetMessageName() string { return "nat66_add_del_interface_reply" }
3938 func (*Nat66AddDelInterfaceReply) GetCrcString() string   { return "e8d4e804" }
3939 func (*Nat66AddDelInterfaceReply) GetMessageType() api.MessageType {
3940         return api.ReplyMessage
3941 }
3942
3943 func (m *Nat66AddDelInterfaceReply) Size() (size int) {
3944         if m == nil {
3945                 return 0
3946         }
3947         size += 4 // m.Retval
3948         return size
3949 }
3950 func (m *Nat66AddDelInterfaceReply) Marshal(b []byte) ([]byte, error) {
3951         if b == nil {
3952                 b = make([]byte, m.Size())
3953         }
3954         buf := codec.NewBuffer(b)
3955         buf.EncodeInt32(m.Retval)
3956         return buf.Bytes(), nil
3957 }
3958 func (m *Nat66AddDelInterfaceReply) Unmarshal(b []byte) error {
3959         buf := codec.NewBuffer(b)
3960         m.Retval = buf.DecodeInt32()
3961         return nil
3962 }
3963
3964 // Nat66AddDelStaticMapping defines message 'nat66_add_del_static_mapping'.
3965 type Nat66AddDelStaticMapping struct {
3966         IsAdd             bool       `binapi:"bool,name=is_add" json:"is_add,omitempty"`
3967         LocalIPAddress    IP6Address `binapi:"ip6_address,name=local_ip_address" json:"local_ip_address,omitempty"`
3968         ExternalIPAddress IP6Address `binapi:"ip6_address,name=external_ip_address" json:"external_ip_address,omitempty"`
3969         VrfID             uint32     `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3970 }
3971
3972 func (m *Nat66AddDelStaticMapping) Reset()               { *m = Nat66AddDelStaticMapping{} }
3973 func (*Nat66AddDelStaticMapping) GetMessageName() string { return "nat66_add_del_static_mapping" }
3974 func (*Nat66AddDelStaticMapping) GetCrcString() string   { return "fb64e50b" }
3975 func (*Nat66AddDelStaticMapping) GetMessageType() api.MessageType {
3976         return api.RequestMessage
3977 }
3978
3979 func (m *Nat66AddDelStaticMapping) Size() (size int) {
3980         if m == nil {
3981                 return 0
3982         }
3983         size += 1      // m.IsAdd
3984         size += 1 * 16 // m.LocalIPAddress
3985         size += 1 * 16 // m.ExternalIPAddress
3986         size += 4      // m.VrfID
3987         return size
3988 }
3989 func (m *Nat66AddDelStaticMapping) Marshal(b []byte) ([]byte, error) {
3990         if b == nil {
3991                 b = make([]byte, m.Size())
3992         }
3993         buf := codec.NewBuffer(b)
3994         buf.EncodeBool(m.IsAdd)
3995         buf.EncodeBytes(m.LocalIPAddress[:], 16)
3996         buf.EncodeBytes(m.ExternalIPAddress[:], 16)
3997         buf.EncodeUint32(m.VrfID)
3998         return buf.Bytes(), nil
3999 }
4000 func (m *Nat66AddDelStaticMapping) Unmarshal(b []byte) error {
4001         buf := codec.NewBuffer(b)
4002         m.IsAdd = buf.DecodeBool()
4003         copy(m.LocalIPAddress[:], buf.DecodeBytes(16))
4004         copy(m.ExternalIPAddress[:], buf.DecodeBytes(16))
4005         m.VrfID = buf.DecodeUint32()
4006         return nil
4007 }
4008
4009 // Nat66AddDelStaticMappingReply defines message 'nat66_add_del_static_mapping_reply'.
4010 type Nat66AddDelStaticMappingReply struct {
4011         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4012 }
4013
4014 func (m *Nat66AddDelStaticMappingReply) Reset() { *m = Nat66AddDelStaticMappingReply{} }
4015 func (*Nat66AddDelStaticMappingReply) GetMessageName() string {
4016         return "nat66_add_del_static_mapping_reply"
4017 }
4018 func (*Nat66AddDelStaticMappingReply) GetCrcString() string { return "e8d4e804" }
4019 func (*Nat66AddDelStaticMappingReply) GetMessageType() api.MessageType {
4020         return api.ReplyMessage
4021 }
4022
4023 func (m *Nat66AddDelStaticMappingReply) Size() (size int) {
4024         if m == nil {
4025                 return 0
4026         }
4027         size += 4 // m.Retval
4028         return size
4029 }
4030 func (m *Nat66AddDelStaticMappingReply) Marshal(b []byte) ([]byte, error) {
4031         if b == nil {
4032                 b = make([]byte, m.Size())
4033         }
4034         buf := codec.NewBuffer(b)
4035         buf.EncodeInt32(m.Retval)
4036         return buf.Bytes(), nil
4037 }
4038 func (m *Nat66AddDelStaticMappingReply) Unmarshal(b []byte) error {
4039         buf := codec.NewBuffer(b)
4040         m.Retval = buf.DecodeInt32()
4041         return nil
4042 }
4043
4044 // Nat66InterfaceDetails defines message 'nat66_interface_details'.
4045 type Nat66InterfaceDetails struct {
4046         Flags     NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
4047         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
4048 }
4049
4050 func (m *Nat66InterfaceDetails) Reset()               { *m = Nat66InterfaceDetails{} }
4051 func (*Nat66InterfaceDetails) GetMessageName() string { return "nat66_interface_details" }
4052 func (*Nat66InterfaceDetails) GetCrcString() string   { return "5d286289" }
4053 func (*Nat66InterfaceDetails) GetMessageType() api.MessageType {
4054         return api.ReplyMessage
4055 }
4056
4057 func (m *Nat66InterfaceDetails) Size() (size int) {
4058         if m == nil {
4059                 return 0
4060         }
4061         size += 1 // m.Flags
4062         size += 4 // m.SwIfIndex
4063         return size
4064 }
4065 func (m *Nat66InterfaceDetails) Marshal(b []byte) ([]byte, error) {
4066         if b == nil {
4067                 b = make([]byte, m.Size())
4068         }
4069         buf := codec.NewBuffer(b)
4070         buf.EncodeUint8(uint8(m.Flags))
4071         buf.EncodeUint32(uint32(m.SwIfIndex))
4072         return buf.Bytes(), nil
4073 }
4074 func (m *Nat66InterfaceDetails) Unmarshal(b []byte) error {
4075         buf := codec.NewBuffer(b)
4076         m.Flags = NatConfigFlags(buf.DecodeUint8())
4077         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
4078         return nil
4079 }
4080
4081 // Nat66InterfaceDump defines message 'nat66_interface_dump'.
4082 type Nat66InterfaceDump struct{}
4083
4084 func (m *Nat66InterfaceDump) Reset()               { *m = Nat66InterfaceDump{} }
4085 func (*Nat66InterfaceDump) GetMessageName() string { return "nat66_interface_dump" }
4086 func (*Nat66InterfaceDump) GetCrcString() string   { return "51077d14" }
4087 func (*Nat66InterfaceDump) GetMessageType() api.MessageType {
4088         return api.RequestMessage
4089 }
4090
4091 func (m *Nat66InterfaceDump) Size() (size int) {
4092         if m == nil {
4093                 return 0
4094         }
4095         return size
4096 }
4097 func (m *Nat66InterfaceDump) Marshal(b []byte) ([]byte, error) {
4098         if b == nil {
4099                 b = make([]byte, m.Size())
4100         }
4101         buf := codec.NewBuffer(b)
4102         return buf.Bytes(), nil
4103 }
4104 func (m *Nat66InterfaceDump) Unmarshal(b []byte) error {
4105         return nil
4106 }
4107
4108 // Nat66StaticMappingDetails defines message 'nat66_static_mapping_details'.
4109 type Nat66StaticMappingDetails struct {
4110         LocalIPAddress    IP6Address `binapi:"ip6_address,name=local_ip_address" json:"local_ip_address,omitempty"`
4111         ExternalIPAddress IP6Address `binapi:"ip6_address,name=external_ip_address" json:"external_ip_address,omitempty"`
4112         VrfID             uint32     `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
4113         TotalBytes        uint64     `binapi:"u64,name=total_bytes" json:"total_bytes,omitempty"`
4114         TotalPkts         uint64     `binapi:"u64,name=total_pkts" json:"total_pkts,omitempty"`
4115 }
4116
4117 func (m *Nat66StaticMappingDetails) Reset()               { *m = Nat66StaticMappingDetails{} }
4118 func (*Nat66StaticMappingDetails) GetMessageName() string { return "nat66_static_mapping_details" }
4119 func (*Nat66StaticMappingDetails) GetCrcString() string   { return "5c568448" }
4120 func (*Nat66StaticMappingDetails) GetMessageType() api.MessageType {
4121         return api.ReplyMessage
4122 }
4123
4124 func (m *Nat66StaticMappingDetails) Size() (size int) {
4125         if m == nil {
4126                 return 0
4127         }
4128         size += 1 * 16 // m.LocalIPAddress
4129         size += 1 * 16 // m.ExternalIPAddress
4130         size += 4      // m.VrfID
4131         size += 8      // m.TotalBytes
4132         size += 8      // m.TotalPkts
4133         return size
4134 }
4135 func (m *Nat66StaticMappingDetails) Marshal(b []byte) ([]byte, error) {
4136         if b == nil {
4137                 b = make([]byte, m.Size())
4138         }
4139         buf := codec.NewBuffer(b)
4140         buf.EncodeBytes(m.LocalIPAddress[:], 16)
4141         buf.EncodeBytes(m.ExternalIPAddress[:], 16)
4142         buf.EncodeUint32(m.VrfID)
4143         buf.EncodeUint64(m.TotalBytes)
4144         buf.EncodeUint64(m.TotalPkts)
4145         return buf.Bytes(), nil
4146 }
4147 func (m *Nat66StaticMappingDetails) Unmarshal(b []byte) error {
4148         buf := codec.NewBuffer(b)
4149         copy(m.LocalIPAddress[:], buf.DecodeBytes(16))
4150         copy(m.ExternalIPAddress[:], buf.DecodeBytes(16))
4151         m.VrfID = buf.DecodeUint32()
4152         m.TotalBytes = buf.DecodeUint64()
4153         m.TotalPkts = buf.DecodeUint64()
4154         return nil
4155 }
4156
4157 // Nat66StaticMappingDump defines message 'nat66_static_mapping_dump'.
4158 type Nat66StaticMappingDump struct{}
4159
4160 func (m *Nat66StaticMappingDump) Reset()               { *m = Nat66StaticMappingDump{} }
4161 func (*Nat66StaticMappingDump) GetMessageName() string { return "nat66_static_mapping_dump" }
4162 func (*Nat66StaticMappingDump) GetCrcString() string   { return "51077d14" }
4163 func (*Nat66StaticMappingDump) GetMessageType() api.MessageType {
4164         return api.RequestMessage
4165 }
4166
4167 func (m *Nat66StaticMappingDump) Size() (size int) {
4168         if m == nil {
4169                 return 0
4170         }
4171         return size
4172 }
4173 func (m *Nat66StaticMappingDump) Marshal(b []byte) ([]byte, error) {
4174         if b == nil {
4175                 b = make([]byte, m.Size())
4176         }
4177         buf := codec.NewBuffer(b)
4178         return buf.Bytes(), nil
4179 }
4180 func (m *Nat66StaticMappingDump) Unmarshal(b []byte) error {
4181         return nil
4182 }
4183
4184 // NatControlPing defines message 'nat_control_ping'.
4185 type NatControlPing struct{}
4186
4187 func (m *NatControlPing) Reset()               { *m = NatControlPing{} }
4188 func (*NatControlPing) GetMessageName() string { return "nat_control_ping" }
4189 func (*NatControlPing) GetCrcString() string   { return "51077d14" }
4190 func (*NatControlPing) GetMessageType() api.MessageType {
4191         return api.RequestMessage
4192 }
4193
4194 func (m *NatControlPing) Size() (size int) {
4195         if m == nil {
4196                 return 0
4197         }
4198         return size
4199 }
4200 func (m *NatControlPing) Marshal(b []byte) ([]byte, error) {
4201         if b == nil {
4202                 b = make([]byte, m.Size())
4203         }
4204         buf := codec.NewBuffer(b)
4205         return buf.Bytes(), nil
4206 }
4207 func (m *NatControlPing) Unmarshal(b []byte) error {
4208         return nil
4209 }
4210
4211 // NatControlPingReply defines message 'nat_control_ping_reply'.
4212 type NatControlPingReply struct {
4213         Retval      int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
4214         ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
4215         VpePID      uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
4216 }
4217
4218 func (m *NatControlPingReply) Reset()               { *m = NatControlPingReply{} }
4219 func (*NatControlPingReply) GetMessageName() string { return "nat_control_ping_reply" }
4220 func (*NatControlPingReply) GetCrcString() string   { return "f6b0b8ca" }
4221 func (*NatControlPingReply) GetMessageType() api.MessageType {
4222         return api.ReplyMessage
4223 }
4224
4225 func (m *NatControlPingReply) Size() (size int) {
4226         if m == nil {
4227                 return 0
4228         }
4229         size += 4 // m.Retval
4230         size += 4 // m.ClientIndex
4231         size += 4 // m.VpePID
4232         return size
4233 }
4234 func (m *NatControlPingReply) Marshal(b []byte) ([]byte, error) {
4235         if b == nil {
4236                 b = make([]byte, m.Size())
4237         }
4238         buf := codec.NewBuffer(b)
4239         buf.EncodeInt32(m.Retval)
4240         buf.EncodeUint32(m.ClientIndex)
4241         buf.EncodeUint32(m.VpePID)
4242         return buf.Bytes(), nil
4243 }
4244 func (m *NatControlPingReply) Unmarshal(b []byte) error {
4245         buf := codec.NewBuffer(b)
4246         m.Retval = buf.DecodeInt32()
4247         m.ClientIndex = buf.DecodeUint32()
4248         m.VpePID = buf.DecodeUint32()
4249         return nil
4250 }
4251
4252 // NatDetAddDelMap defines message 'nat_det_add_del_map'.
4253 type NatDetAddDelMap struct {
4254         IsAdd   bool       `binapi:"bool,name=is_add" json:"is_add,omitempty"`
4255         InAddr  IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
4256         InPlen  uint8      `binapi:"u8,name=in_plen" json:"in_plen,omitempty"`
4257         OutAddr IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
4258         OutPlen uint8      `binapi:"u8,name=out_plen" json:"out_plen,omitempty"`
4259 }
4260
4261 func (m *NatDetAddDelMap) Reset()               { *m = NatDetAddDelMap{} }
4262 func (*NatDetAddDelMap) GetMessageName() string { return "nat_det_add_del_map" }
4263 func (*NatDetAddDelMap) GetCrcString() string   { return "112fde05" }
4264 func (*NatDetAddDelMap) GetMessageType() api.MessageType {
4265         return api.RequestMessage
4266 }
4267
4268 func (m *NatDetAddDelMap) Size() (size int) {
4269         if m == nil {
4270                 return 0
4271         }
4272         size += 1     // m.IsAdd
4273         size += 1 * 4 // m.InAddr
4274         size += 1     // m.InPlen
4275         size += 1 * 4 // m.OutAddr
4276         size += 1     // m.OutPlen
4277         return size
4278 }
4279 func (m *NatDetAddDelMap) Marshal(b []byte) ([]byte, error) {
4280         if b == nil {
4281                 b = make([]byte, m.Size())
4282         }
4283         buf := codec.NewBuffer(b)
4284         buf.EncodeBool(m.IsAdd)
4285         buf.EncodeBytes(m.InAddr[:], 4)
4286         buf.EncodeUint8(m.InPlen)
4287         buf.EncodeBytes(m.OutAddr[:], 4)
4288         buf.EncodeUint8(m.OutPlen)
4289         return buf.Bytes(), nil
4290 }
4291 func (m *NatDetAddDelMap) Unmarshal(b []byte) error {
4292         buf := codec.NewBuffer(b)
4293         m.IsAdd = buf.DecodeBool()
4294         copy(m.InAddr[:], buf.DecodeBytes(4))
4295         m.InPlen = buf.DecodeUint8()
4296         copy(m.OutAddr[:], buf.DecodeBytes(4))
4297         m.OutPlen = buf.DecodeUint8()
4298         return nil
4299 }
4300
4301 // NatDetAddDelMapReply defines message 'nat_det_add_del_map_reply'.
4302 type NatDetAddDelMapReply struct {
4303         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4304 }
4305
4306 func (m *NatDetAddDelMapReply) Reset()               { *m = NatDetAddDelMapReply{} }
4307 func (*NatDetAddDelMapReply) GetMessageName() string { return "nat_det_add_del_map_reply" }
4308 func (*NatDetAddDelMapReply) GetCrcString() string   { return "e8d4e804" }
4309 func (*NatDetAddDelMapReply) GetMessageType() api.MessageType {
4310         return api.ReplyMessage
4311 }
4312
4313 func (m *NatDetAddDelMapReply) Size() (size int) {
4314         if m == nil {
4315                 return 0
4316         }
4317         size += 4 // m.Retval
4318         return size
4319 }
4320 func (m *NatDetAddDelMapReply) Marshal(b []byte) ([]byte, error) {
4321         if b == nil {
4322                 b = make([]byte, m.Size())
4323         }
4324         buf := codec.NewBuffer(b)
4325         buf.EncodeInt32(m.Retval)
4326         return buf.Bytes(), nil
4327 }
4328 func (m *NatDetAddDelMapReply) Unmarshal(b []byte) error {
4329         buf := codec.NewBuffer(b)
4330         m.Retval = buf.DecodeInt32()
4331         return nil
4332 }
4333
4334 // NatDetCloseSessionIn defines message 'nat_det_close_session_in'.
4335 type NatDetCloseSessionIn struct {
4336         InAddr  IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
4337         InPort  uint16     `binapi:"u16,name=in_port" json:"in_port,omitempty"`
4338         ExtAddr IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
4339         ExtPort uint16     `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
4340 }
4341
4342 func (m *NatDetCloseSessionIn) Reset()               { *m = NatDetCloseSessionIn{} }
4343 func (*NatDetCloseSessionIn) GetMessageName() string { return "nat_det_close_session_in" }
4344 func (*NatDetCloseSessionIn) GetCrcString() string   { return "0a10ef64" }
4345 func (*NatDetCloseSessionIn) GetMessageType() api.MessageType {
4346         return api.RequestMessage
4347 }
4348
4349 func (m *NatDetCloseSessionIn) Size() (size int) {
4350         if m == nil {
4351                 return 0
4352         }
4353         size += 1 * 4 // m.InAddr
4354         size += 2     // m.InPort
4355         size += 1 * 4 // m.ExtAddr
4356         size += 2     // m.ExtPort
4357         return size
4358 }
4359 func (m *NatDetCloseSessionIn) Marshal(b []byte) ([]byte, error) {
4360         if b == nil {
4361                 b = make([]byte, m.Size())
4362         }
4363         buf := codec.NewBuffer(b)
4364         buf.EncodeBytes(m.InAddr[:], 4)
4365         buf.EncodeUint16(m.InPort)
4366         buf.EncodeBytes(m.ExtAddr[:], 4)
4367         buf.EncodeUint16(m.ExtPort)
4368         return buf.Bytes(), nil
4369 }
4370 func (m *NatDetCloseSessionIn) Unmarshal(b []byte) error {
4371         buf := codec.NewBuffer(b)
4372         copy(m.InAddr[:], buf.DecodeBytes(4))
4373         m.InPort = buf.DecodeUint16()
4374         copy(m.ExtAddr[:], buf.DecodeBytes(4))
4375         m.ExtPort = buf.DecodeUint16()
4376         return nil
4377 }
4378
4379 // NatDetCloseSessionInReply defines message 'nat_det_close_session_in_reply'.
4380 type NatDetCloseSessionInReply struct {
4381         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4382 }
4383
4384 func (m *NatDetCloseSessionInReply) Reset()               { *m = NatDetCloseSessionInReply{} }
4385 func (*NatDetCloseSessionInReply) GetMessageName() string { return "nat_det_close_session_in_reply" }
4386 func (*NatDetCloseSessionInReply) GetCrcString() string   { return "e8d4e804" }
4387 func (*NatDetCloseSessionInReply) GetMessageType() api.MessageType {
4388         return api.ReplyMessage
4389 }
4390
4391 func (m *NatDetCloseSessionInReply) Size() (size int) {
4392         if m == nil {
4393                 return 0
4394         }
4395         size += 4 // m.Retval
4396         return size
4397 }
4398 func (m *NatDetCloseSessionInReply) Marshal(b []byte) ([]byte, error) {
4399         if b == nil {
4400                 b = make([]byte, m.Size())
4401         }
4402         buf := codec.NewBuffer(b)
4403         buf.EncodeInt32(m.Retval)
4404         return buf.Bytes(), nil
4405 }
4406 func (m *NatDetCloseSessionInReply) Unmarshal(b []byte) error {
4407         buf := codec.NewBuffer(b)
4408         m.Retval = buf.DecodeInt32()
4409         return nil
4410 }
4411
4412 // NatDetCloseSessionOut defines message 'nat_det_close_session_out'.
4413 type NatDetCloseSessionOut struct {
4414         OutAddr IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
4415         OutPort uint16     `binapi:"u16,name=out_port" json:"out_port,omitempty"`
4416         ExtAddr IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
4417         ExtPort uint16     `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
4418 }
4419
4420 func (m *NatDetCloseSessionOut) Reset()               { *m = NatDetCloseSessionOut{} }
4421 func (*NatDetCloseSessionOut) GetMessageName() string { return "nat_det_close_session_out" }
4422 func (*NatDetCloseSessionOut) GetCrcString() string   { return "c1b6cbfb" }
4423 func (*NatDetCloseSessionOut) GetMessageType() api.MessageType {
4424         return api.RequestMessage
4425 }
4426
4427 func (m *NatDetCloseSessionOut) Size() (size int) {
4428         if m == nil {
4429                 return 0
4430         }
4431         size += 1 * 4 // m.OutAddr
4432         size += 2     // m.OutPort
4433         size += 1 * 4 // m.ExtAddr
4434         size += 2     // m.ExtPort
4435         return size
4436 }
4437 func (m *NatDetCloseSessionOut) Marshal(b []byte) ([]byte, error) {
4438         if b == nil {
4439                 b = make([]byte, m.Size())
4440         }
4441         buf := codec.NewBuffer(b)
4442         buf.EncodeBytes(m.OutAddr[:], 4)
4443         buf.EncodeUint16(m.OutPort)
4444         buf.EncodeBytes(m.ExtAddr[:], 4)
4445         buf.EncodeUint16(m.ExtPort)
4446         return buf.Bytes(), nil
4447 }
4448 func (m *NatDetCloseSessionOut) Unmarshal(b []byte) error {
4449         buf := codec.NewBuffer(b)
4450         copy(m.OutAddr[:], buf.DecodeBytes(4))
4451         m.OutPort = buf.DecodeUint16()
4452         copy(m.ExtAddr[:], buf.DecodeBytes(4))
4453         m.ExtPort = buf.DecodeUint16()
4454         return nil
4455 }
4456
4457 // NatDetCloseSessionOutReply defines message 'nat_det_close_session_out_reply'.
4458 type NatDetCloseSessionOutReply struct {
4459         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4460 }
4461
4462 func (m *NatDetCloseSessionOutReply) Reset()               { *m = NatDetCloseSessionOutReply{} }
4463 func (*NatDetCloseSessionOutReply) GetMessageName() string { return "nat_det_close_session_out_reply" }
4464 func (*NatDetCloseSessionOutReply) GetCrcString() string   { return "e8d4e804" }
4465 func (*NatDetCloseSessionOutReply) GetMessageType() api.MessageType {
4466         return api.ReplyMessage
4467 }
4468
4469 func (m *NatDetCloseSessionOutReply) Size() (size int) {
4470         if m == nil {
4471                 return 0
4472         }
4473         size += 4 // m.Retval
4474         return size
4475 }
4476 func (m *NatDetCloseSessionOutReply) Marshal(b []byte) ([]byte, error) {
4477         if b == nil {
4478                 b = make([]byte, m.Size())
4479         }
4480         buf := codec.NewBuffer(b)
4481         buf.EncodeInt32(m.Retval)
4482         return buf.Bytes(), nil
4483 }
4484 func (m *NatDetCloseSessionOutReply) Unmarshal(b []byte) error {
4485         buf := codec.NewBuffer(b)
4486         m.Retval = buf.DecodeInt32()
4487         return nil
4488 }
4489
4490 // NatDetForward defines message 'nat_det_forward'.
4491 type NatDetForward struct {
4492         InAddr IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
4493 }
4494
4495 func (m *NatDetForward) Reset()               { *m = NatDetForward{} }
4496 func (*NatDetForward) GetMessageName() string { return "nat_det_forward" }
4497 func (*NatDetForward) GetCrcString() string   { return "7f8a89cd" }
4498 func (*NatDetForward) GetMessageType() api.MessageType {
4499         return api.RequestMessage
4500 }
4501
4502 func (m *NatDetForward) Size() (size int) {
4503         if m == nil {
4504                 return 0
4505         }
4506         size += 1 * 4 // m.InAddr
4507         return size
4508 }
4509 func (m *NatDetForward) Marshal(b []byte) ([]byte, error) {
4510         if b == nil {
4511                 b = make([]byte, m.Size())
4512         }
4513         buf := codec.NewBuffer(b)
4514         buf.EncodeBytes(m.InAddr[:], 4)
4515         return buf.Bytes(), nil
4516 }
4517 func (m *NatDetForward) Unmarshal(b []byte) error {
4518         buf := codec.NewBuffer(b)
4519         copy(m.InAddr[:], buf.DecodeBytes(4))
4520         return nil
4521 }
4522
4523 // NatDetForwardReply defines message 'nat_det_forward_reply'.
4524 type NatDetForwardReply struct {
4525         Retval    int32      `binapi:"i32,name=retval" json:"retval,omitempty"`
4526         OutPortLo uint16     `binapi:"u16,name=out_port_lo" json:"out_port_lo,omitempty"`
4527         OutPortHi uint16     `binapi:"u16,name=out_port_hi" json:"out_port_hi,omitempty"`
4528         OutAddr   IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
4529 }
4530
4531 func (m *NatDetForwardReply) Reset()               { *m = NatDetForwardReply{} }
4532 func (*NatDetForwardReply) GetMessageName() string { return "nat_det_forward_reply" }
4533 func (*NatDetForwardReply) GetCrcString() string   { return "a8ccbdc0" }
4534 func (*NatDetForwardReply) GetMessageType() api.MessageType {
4535         return api.ReplyMessage
4536 }
4537
4538 func (m *NatDetForwardReply) Size() (size int) {
4539         if m == nil {
4540                 return 0
4541         }
4542         size += 4     // m.Retval
4543         size += 2     // m.OutPortLo
4544         size += 2     // m.OutPortHi
4545         size += 1 * 4 // m.OutAddr
4546         return size
4547 }
4548 func (m *NatDetForwardReply) Marshal(b []byte) ([]byte, error) {
4549         if b == nil {
4550                 b = make([]byte, m.Size())
4551         }
4552         buf := codec.NewBuffer(b)
4553         buf.EncodeInt32(m.Retval)
4554         buf.EncodeUint16(m.OutPortLo)
4555         buf.EncodeUint16(m.OutPortHi)
4556         buf.EncodeBytes(m.OutAddr[:], 4)
4557         return buf.Bytes(), nil
4558 }
4559 func (m *NatDetForwardReply) Unmarshal(b []byte) error {
4560         buf := codec.NewBuffer(b)
4561         m.Retval = buf.DecodeInt32()
4562         m.OutPortLo = buf.DecodeUint16()
4563         m.OutPortHi = buf.DecodeUint16()
4564         copy(m.OutAddr[:], buf.DecodeBytes(4))
4565         return nil
4566 }
4567
4568 // NatDetMapDetails defines message 'nat_det_map_details'.
4569 type NatDetMapDetails struct {
4570         InAddr       IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
4571         InPlen       uint8      `binapi:"u8,name=in_plen" json:"in_plen,omitempty"`
4572         OutAddr      IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
4573         OutPlen      uint8      `binapi:"u8,name=out_plen" json:"out_plen,omitempty"`
4574         SharingRatio uint32     `binapi:"u32,name=sharing_ratio" json:"sharing_ratio,omitempty"`
4575         PortsPerHost uint16     `binapi:"u16,name=ports_per_host" json:"ports_per_host,omitempty"`
4576         SesNum       uint32     `binapi:"u32,name=ses_num" json:"ses_num,omitempty"`
4577 }
4578
4579 func (m *NatDetMapDetails) Reset()               { *m = NatDetMapDetails{} }
4580 func (*NatDetMapDetails) GetMessageName() string { return "nat_det_map_details" }
4581 func (*NatDetMapDetails) GetCrcString() string   { return "88000ee1" }
4582 func (*NatDetMapDetails) GetMessageType() api.MessageType {
4583         return api.ReplyMessage
4584 }
4585
4586 func (m *NatDetMapDetails) Size() (size int) {
4587         if m == nil {
4588                 return 0
4589         }
4590         size += 1 * 4 // m.InAddr
4591         size += 1     // m.InPlen
4592         size += 1 * 4 // m.OutAddr
4593         size += 1     // m.OutPlen
4594         size += 4     // m.SharingRatio
4595         size += 2     // m.PortsPerHost
4596         size += 4     // m.SesNum
4597         return size
4598 }
4599 func (m *NatDetMapDetails) Marshal(b []byte) ([]byte, error) {
4600         if b == nil {
4601                 b = make([]byte, m.Size())
4602         }
4603         buf := codec.NewBuffer(b)
4604         buf.EncodeBytes(m.InAddr[:], 4)
4605         buf.EncodeUint8(m.InPlen)
4606         buf.EncodeBytes(m.OutAddr[:], 4)
4607         buf.EncodeUint8(m.OutPlen)
4608         buf.EncodeUint32(m.SharingRatio)
4609         buf.EncodeUint16(m.PortsPerHost)
4610         buf.EncodeUint32(m.SesNum)
4611         return buf.Bytes(), nil
4612 }
4613 func (m *NatDetMapDetails) Unmarshal(b []byte) error {
4614         buf := codec.NewBuffer(b)
4615         copy(m.InAddr[:], buf.DecodeBytes(4))
4616         m.InPlen = buf.DecodeUint8()
4617         copy(m.OutAddr[:], buf.DecodeBytes(4))
4618         m.OutPlen = buf.DecodeUint8()
4619         m.SharingRatio = buf.DecodeUint32()
4620         m.PortsPerHost = buf.DecodeUint16()
4621         m.SesNum = buf.DecodeUint32()
4622         return nil
4623 }
4624
4625 // NatDetMapDump defines message 'nat_det_map_dump'.
4626 type NatDetMapDump struct{}
4627
4628 func (m *NatDetMapDump) Reset()               { *m = NatDetMapDump{} }
4629 func (*NatDetMapDump) GetMessageName() string { return "nat_det_map_dump" }
4630 func (*NatDetMapDump) GetCrcString() string   { return "51077d14" }
4631 func (*NatDetMapDump) GetMessageType() api.MessageType {
4632         return api.RequestMessage
4633 }
4634
4635 func (m *NatDetMapDump) Size() (size int) {
4636         if m == nil {
4637                 return 0
4638         }
4639         return size
4640 }
4641 func (m *NatDetMapDump) Marshal(b []byte) ([]byte, error) {
4642         if b == nil {
4643                 b = make([]byte, m.Size())
4644         }
4645         buf := codec.NewBuffer(b)
4646         return buf.Bytes(), nil
4647 }
4648 func (m *NatDetMapDump) Unmarshal(b []byte) error {
4649         return nil
4650 }
4651
4652 // NatDetReverse defines message 'nat_det_reverse'.
4653 type NatDetReverse struct {
4654         OutPort uint16     `binapi:"u16,name=out_port" json:"out_port,omitempty"`
4655         OutAddr IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
4656 }
4657
4658 func (m *NatDetReverse) Reset()               { *m = NatDetReverse{} }
4659 func (*NatDetReverse) GetMessageName() string { return "nat_det_reverse" }
4660 func (*NatDetReverse) GetCrcString() string   { return "a7573fe1" }
4661 func (*NatDetReverse) GetMessageType() api.MessageType {
4662         return api.RequestMessage
4663 }
4664
4665 func (m *NatDetReverse) Size() (size int) {
4666         if m == nil {
4667                 return 0
4668         }
4669         size += 2     // m.OutPort
4670         size += 1 * 4 // m.OutAddr
4671         return size
4672 }
4673 func (m *NatDetReverse) Marshal(b []byte) ([]byte, error) {
4674         if b == nil {
4675                 b = make([]byte, m.Size())
4676         }
4677         buf := codec.NewBuffer(b)
4678         buf.EncodeUint16(m.OutPort)
4679         buf.EncodeBytes(m.OutAddr[:], 4)
4680         return buf.Bytes(), nil
4681 }
4682 func (m *NatDetReverse) Unmarshal(b []byte) error {
4683         buf := codec.NewBuffer(b)
4684         m.OutPort = buf.DecodeUint16()
4685         copy(m.OutAddr[:], buf.DecodeBytes(4))
4686         return nil
4687 }
4688
4689 // NatDetReverseReply defines message 'nat_det_reverse_reply'.
4690 type NatDetReverseReply struct {
4691         Retval int32      `binapi:"i32,name=retval" json:"retval,omitempty"`
4692         InAddr IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
4693 }
4694
4695 func (m *NatDetReverseReply) Reset()               { *m = NatDetReverseReply{} }
4696 func (*NatDetReverseReply) GetMessageName() string { return "nat_det_reverse_reply" }
4697 func (*NatDetReverseReply) GetCrcString() string   { return "34066d48" }
4698 func (*NatDetReverseReply) GetMessageType() api.MessageType {
4699         return api.ReplyMessage
4700 }
4701
4702 func (m *NatDetReverseReply) Size() (size int) {
4703         if m == nil {
4704                 return 0
4705         }
4706         size += 4     // m.Retval
4707         size += 1 * 4 // m.InAddr
4708         return size
4709 }
4710 func (m *NatDetReverseReply) Marshal(b []byte) ([]byte, error) {
4711         if b == nil {
4712                 b = make([]byte, m.Size())
4713         }
4714         buf := codec.NewBuffer(b)
4715         buf.EncodeInt32(m.Retval)
4716         buf.EncodeBytes(m.InAddr[:], 4)
4717         return buf.Bytes(), nil
4718 }
4719 func (m *NatDetReverseReply) Unmarshal(b []byte) error {
4720         buf := codec.NewBuffer(b)
4721         m.Retval = buf.DecodeInt32()
4722         copy(m.InAddr[:], buf.DecodeBytes(4))
4723         return nil
4724 }
4725
4726 // NatDetSessionDetails defines message 'nat_det_session_details'.
4727 type NatDetSessionDetails struct {
4728         InPort  uint16     `binapi:"u16,name=in_port" json:"in_port,omitempty"`
4729         ExtAddr IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
4730         ExtPort uint16     `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
4731         OutPort uint16     `binapi:"u16,name=out_port" json:"out_port,omitempty"`
4732         State   uint8      `binapi:"u8,name=state" json:"state,omitempty"`
4733         Expire  uint32     `binapi:"u32,name=expire" json:"expire,omitempty"`
4734 }
4735
4736 func (m *NatDetSessionDetails) Reset()               { *m = NatDetSessionDetails{} }
4737 func (*NatDetSessionDetails) GetMessageName() string { return "nat_det_session_details" }
4738 func (*NatDetSessionDetails) GetCrcString() string   { return "27f3c171" }
4739 func (*NatDetSessionDetails) GetMessageType() api.MessageType {
4740         return api.ReplyMessage
4741 }
4742
4743 func (m *NatDetSessionDetails) Size() (size int) {
4744         if m == nil {
4745                 return 0
4746         }
4747         size += 2     // m.InPort
4748         size += 1 * 4 // m.ExtAddr
4749         size += 2     // m.ExtPort
4750         size += 2     // m.OutPort
4751         size += 1     // m.State
4752         size += 4     // m.Expire
4753         return size
4754 }
4755 func (m *NatDetSessionDetails) Marshal(b []byte) ([]byte, error) {
4756         if b == nil {
4757                 b = make([]byte, m.Size())
4758         }
4759         buf := codec.NewBuffer(b)
4760         buf.EncodeUint16(m.InPort)
4761         buf.EncodeBytes(m.ExtAddr[:], 4)
4762         buf.EncodeUint16(m.ExtPort)
4763         buf.EncodeUint16(m.OutPort)
4764         buf.EncodeUint8(m.State)
4765         buf.EncodeUint32(m.Expire)
4766         return buf.Bytes(), nil
4767 }
4768 func (m *NatDetSessionDetails) Unmarshal(b []byte) error {
4769         buf := codec.NewBuffer(b)
4770         m.InPort = buf.DecodeUint16()
4771         copy(m.ExtAddr[:], buf.DecodeBytes(4))
4772         m.ExtPort = buf.DecodeUint16()
4773         m.OutPort = buf.DecodeUint16()
4774         m.State = buf.DecodeUint8()
4775         m.Expire = buf.DecodeUint32()
4776         return nil
4777 }
4778
4779 // NatDetSessionDump defines message 'nat_det_session_dump'.
4780 type NatDetSessionDump struct {
4781         UserAddr IP4Address `binapi:"ip4_address,name=user_addr" json:"user_addr,omitempty"`
4782 }
4783
4784 func (m *NatDetSessionDump) Reset()               { *m = NatDetSessionDump{} }
4785 func (*NatDetSessionDump) GetMessageName() string { return "nat_det_session_dump" }
4786 func (*NatDetSessionDump) GetCrcString() string   { return "e45a3af7" }
4787 func (*NatDetSessionDump) GetMessageType() api.MessageType {
4788         return api.RequestMessage
4789 }
4790
4791 func (m *NatDetSessionDump) Size() (size int) {
4792         if m == nil {
4793                 return 0
4794         }
4795         size += 1 * 4 // m.UserAddr
4796         return size
4797 }
4798 func (m *NatDetSessionDump) Marshal(b []byte) ([]byte, error) {
4799         if b == nil {
4800                 b = make([]byte, m.Size())
4801         }
4802         buf := codec.NewBuffer(b)
4803         buf.EncodeBytes(m.UserAddr[:], 4)
4804         return buf.Bytes(), nil
4805 }
4806 func (m *NatDetSessionDump) Unmarshal(b []byte) error {
4807         buf := codec.NewBuffer(b)
4808         copy(m.UserAddr[:], buf.DecodeBytes(4))
4809         return nil
4810 }
4811
4812 // NatGetAddrAndPortAllocAlg defines message 'nat_get_addr_and_port_alloc_alg'.
4813 type NatGetAddrAndPortAllocAlg struct{}
4814
4815 func (m *NatGetAddrAndPortAllocAlg) Reset()               { *m = NatGetAddrAndPortAllocAlg{} }
4816 func (*NatGetAddrAndPortAllocAlg) GetMessageName() string { return "nat_get_addr_and_port_alloc_alg" }
4817 func (*NatGetAddrAndPortAllocAlg) GetCrcString() string   { return "51077d14" }
4818 func (*NatGetAddrAndPortAllocAlg) GetMessageType() api.MessageType {
4819         return api.RequestMessage
4820 }
4821
4822 func (m *NatGetAddrAndPortAllocAlg) Size() (size int) {
4823         if m == nil {
4824                 return 0
4825         }
4826         return size
4827 }
4828 func (m *NatGetAddrAndPortAllocAlg) Marshal(b []byte) ([]byte, error) {
4829         if b == nil {
4830                 b = make([]byte, m.Size())
4831         }
4832         buf := codec.NewBuffer(b)
4833         return buf.Bytes(), nil
4834 }
4835 func (m *NatGetAddrAndPortAllocAlg) Unmarshal(b []byte) error {
4836         return nil
4837 }
4838
4839 // NatGetAddrAndPortAllocAlgReply defines message 'nat_get_addr_and_port_alloc_alg_reply'.
4840 type NatGetAddrAndPortAllocAlgReply struct {
4841         Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
4842         Alg        uint8  `binapi:"u8,name=alg" json:"alg,omitempty"`
4843         PsidOffset uint8  `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
4844         PsidLength uint8  `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
4845         Psid       uint16 `binapi:"u16,name=psid" json:"psid,omitempty"`
4846         StartPort  uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"`
4847         EndPort    uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"`
4848 }
4849
4850 func (m *NatGetAddrAndPortAllocAlgReply) Reset() { *m = NatGetAddrAndPortAllocAlgReply{} }
4851 func (*NatGetAddrAndPortAllocAlgReply) GetMessageName() string {
4852         return "nat_get_addr_and_port_alloc_alg_reply"
4853 }
4854 func (*NatGetAddrAndPortAllocAlgReply) GetCrcString() string { return "3607a7d0" }
4855 func (*NatGetAddrAndPortAllocAlgReply) GetMessageType() api.MessageType {
4856         return api.ReplyMessage
4857 }
4858
4859 func (m *NatGetAddrAndPortAllocAlgReply) Size() (size int) {
4860         if m == nil {
4861                 return 0
4862         }
4863         size += 4 // m.Retval
4864         size += 1 // m.Alg
4865         size += 1 // m.PsidOffset
4866         size += 1 // m.PsidLength
4867         size += 2 // m.Psid
4868         size += 2 // m.StartPort
4869         size += 2 // m.EndPort
4870         return size
4871 }
4872 func (m *NatGetAddrAndPortAllocAlgReply) Marshal(b []byte) ([]byte, error) {
4873         if b == nil {
4874                 b = make([]byte, m.Size())
4875         }
4876         buf := codec.NewBuffer(b)
4877         buf.EncodeInt32(m.Retval)
4878         buf.EncodeUint8(m.Alg)
4879         buf.EncodeUint8(m.PsidOffset)
4880         buf.EncodeUint8(m.PsidLength)
4881         buf.EncodeUint16(m.Psid)
4882         buf.EncodeUint16(m.StartPort)
4883         buf.EncodeUint16(m.EndPort)
4884         return buf.Bytes(), nil
4885 }
4886 func (m *NatGetAddrAndPortAllocAlgReply) Unmarshal(b []byte) error {
4887         buf := codec.NewBuffer(b)
4888         m.Retval = buf.DecodeInt32()
4889         m.Alg = buf.DecodeUint8()
4890         m.PsidOffset = buf.DecodeUint8()
4891         m.PsidLength = buf.DecodeUint8()
4892         m.Psid = buf.DecodeUint16()
4893         m.StartPort = buf.DecodeUint16()
4894         m.EndPort = buf.DecodeUint16()
4895         return nil
4896 }
4897
4898 // NatGetMssClamping defines message 'nat_get_mss_clamping'.
4899 type NatGetMssClamping struct{}
4900
4901 func (m *NatGetMssClamping) Reset()               { *m = NatGetMssClamping{} }
4902 func (*NatGetMssClamping) GetMessageName() string { return "nat_get_mss_clamping" }
4903 func (*NatGetMssClamping) GetCrcString() string   { return "51077d14" }
4904 func (*NatGetMssClamping) GetMessageType() api.MessageType {
4905         return api.RequestMessage
4906 }
4907
4908 func (m *NatGetMssClamping) Size() (size int) {
4909         if m == nil {
4910                 return 0
4911         }
4912         return size
4913 }
4914 func (m *NatGetMssClamping) Marshal(b []byte) ([]byte, error) {
4915         if b == nil {
4916                 b = make([]byte, m.Size())
4917         }
4918         buf := codec.NewBuffer(b)
4919         return buf.Bytes(), nil
4920 }
4921 func (m *NatGetMssClamping) Unmarshal(b []byte) error {
4922         return nil
4923 }
4924
4925 // NatGetMssClampingReply defines message 'nat_get_mss_clamping_reply'.
4926 type NatGetMssClampingReply struct {
4927         Retval   int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
4928         MssValue uint16 `binapi:"u16,name=mss_value" json:"mss_value,omitempty"`
4929         Enable   bool   `binapi:"bool,name=enable" json:"enable,omitempty"`
4930 }
4931
4932 func (m *NatGetMssClampingReply) Reset()               { *m = NatGetMssClampingReply{} }
4933 func (*NatGetMssClampingReply) GetMessageName() string { return "nat_get_mss_clamping_reply" }
4934 func (*NatGetMssClampingReply) GetCrcString() string   { return "1c0b2a78" }
4935 func (*NatGetMssClampingReply) GetMessageType() api.MessageType {
4936         return api.ReplyMessage
4937 }
4938
4939 func (m *NatGetMssClampingReply) Size() (size int) {
4940         if m == nil {
4941                 return 0
4942         }
4943         size += 4 // m.Retval
4944         size += 2 // m.MssValue
4945         size += 1 // m.Enable
4946         return size
4947 }
4948 func (m *NatGetMssClampingReply) Marshal(b []byte) ([]byte, error) {
4949         if b == nil {
4950                 b = make([]byte, m.Size())
4951         }
4952         buf := codec.NewBuffer(b)
4953         buf.EncodeInt32(m.Retval)
4954         buf.EncodeUint16(m.MssValue)
4955         buf.EncodeBool(m.Enable)
4956         return buf.Bytes(), nil
4957 }
4958 func (m *NatGetMssClampingReply) Unmarshal(b []byte) error {
4959         buf := codec.NewBuffer(b)
4960         m.Retval = buf.DecodeInt32()
4961         m.MssValue = buf.DecodeUint16()
4962         m.Enable = buf.DecodeBool()
4963         return nil
4964 }
4965
4966 // NatGetTimeouts defines message 'nat_get_timeouts'.
4967 type NatGetTimeouts struct{}
4968
4969 func (m *NatGetTimeouts) Reset()               { *m = NatGetTimeouts{} }
4970 func (*NatGetTimeouts) GetMessageName() string { return "nat_get_timeouts" }
4971 func (*NatGetTimeouts) GetCrcString() string   { return "51077d14" }
4972 func (*NatGetTimeouts) GetMessageType() api.MessageType {
4973         return api.RequestMessage
4974 }
4975
4976 func (m *NatGetTimeouts) Size() (size int) {
4977         if m == nil {
4978                 return 0
4979         }
4980         return size
4981 }
4982 func (m *NatGetTimeouts) Marshal(b []byte) ([]byte, error) {
4983         if b == nil {
4984                 b = make([]byte, m.Size())
4985         }
4986         buf := codec.NewBuffer(b)
4987         return buf.Bytes(), nil
4988 }
4989 func (m *NatGetTimeouts) Unmarshal(b []byte) error {
4990         return nil
4991 }
4992
4993 // NatGetTimeoutsReply defines message 'nat_get_timeouts_reply'.
4994 type NatGetTimeoutsReply struct {
4995         Retval         int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
4996         UDP            uint32 `binapi:"u32,name=udp" json:"udp,omitempty"`
4997         TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"`
4998         TCPTransitory  uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"`
4999         ICMP           uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"`
5000 }
5001
5002 func (m *NatGetTimeoutsReply) Reset()               { *m = NatGetTimeoutsReply{} }
5003 func (*NatGetTimeoutsReply) GetMessageName() string { return "nat_get_timeouts_reply" }
5004 func (*NatGetTimeoutsReply) GetCrcString() string   { return "3c4df4e1" }
5005 func (*NatGetTimeoutsReply) GetMessageType() api.MessageType {
5006         return api.ReplyMessage
5007 }
5008
5009 func (m *NatGetTimeoutsReply) Size() (size int) {
5010         if m == nil {
5011                 return 0
5012         }
5013         size += 4 // m.Retval
5014         size += 4 // m.UDP
5015         size += 4 // m.TCPEstablished
5016         size += 4 // m.TCPTransitory
5017         size += 4 // m.ICMP
5018         return size
5019 }
5020 func (m *NatGetTimeoutsReply) Marshal(b []byte) ([]byte, error) {
5021         if b == nil {
5022                 b = make([]byte, m.Size())
5023         }
5024         buf := codec.NewBuffer(b)
5025         buf.EncodeInt32(m.Retval)
5026         buf.EncodeUint32(m.UDP)
5027         buf.EncodeUint32(m.TCPEstablished)
5028         buf.EncodeUint32(m.TCPTransitory)
5029         buf.EncodeUint32(m.ICMP)
5030         return buf.Bytes(), nil
5031 }
5032 func (m *NatGetTimeoutsReply) Unmarshal(b []byte) error {
5033         buf := codec.NewBuffer(b)
5034         m.Retval = buf.DecodeInt32()
5035         m.UDP = buf.DecodeUint32()
5036         m.TCPEstablished = buf.DecodeUint32()
5037         m.TCPTransitory = buf.DecodeUint32()
5038         m.ICMP = buf.DecodeUint32()
5039         return nil
5040 }
5041
5042 // NatHaFlush defines message 'nat_ha_flush'.
5043 type NatHaFlush struct{}
5044
5045 func (m *NatHaFlush) Reset()               { *m = NatHaFlush{} }
5046 func (*NatHaFlush) GetMessageName() string { return "nat_ha_flush" }
5047 func (*NatHaFlush) GetCrcString() string   { return "51077d14" }
5048 func (*NatHaFlush) GetMessageType() api.MessageType {
5049         return api.RequestMessage
5050 }
5051
5052 func (m *NatHaFlush) Size() (size int) {
5053         if m == nil {
5054                 return 0
5055         }
5056         return size
5057 }
5058 func (m *NatHaFlush) Marshal(b []byte) ([]byte, error) {
5059         if b == nil {
5060                 b = make([]byte, m.Size())
5061         }
5062         buf := codec.NewBuffer(b)
5063         return buf.Bytes(), nil
5064 }
5065 func (m *NatHaFlush) Unmarshal(b []byte) error {
5066         return nil
5067 }
5068
5069 // NatHaFlushReply defines message 'nat_ha_flush_reply'.
5070 type NatHaFlushReply struct {
5071         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
5072 }
5073
5074 func (m *NatHaFlushReply) Reset()               { *m = NatHaFlushReply{} }
5075 func (*NatHaFlushReply) GetMessageName() string { return "nat_ha_flush_reply" }
5076 func (*NatHaFlushReply) GetCrcString() string   { return "e8d4e804" }
5077 func (*NatHaFlushReply) GetMessageType() api.MessageType {
5078         return api.ReplyMessage
5079 }
5080
5081 func (m *NatHaFlushReply) Size() (size int) {
5082         if m == nil {
5083                 return 0
5084         }
5085         size += 4 // m.Retval
5086         return size
5087 }
5088 func (m *NatHaFlushReply) Marshal(b []byte) ([]byte, error) {
5089         if b == nil {
5090                 b = make([]byte, m.Size())
5091         }
5092         buf := codec.NewBuffer(b)
5093         buf.EncodeInt32(m.Retval)
5094         return buf.Bytes(), nil
5095 }
5096 func (m *NatHaFlushReply) Unmarshal(b []byte) error {
5097         buf := codec.NewBuffer(b)
5098         m.Retval = buf.DecodeInt32()
5099         return nil
5100 }
5101
5102 // NatHaGetFailover defines message 'nat_ha_get_failover'.
5103 type NatHaGetFailover struct{}
5104
5105 func (m *NatHaGetFailover) Reset()               { *m = NatHaGetFailover{} }
5106 func (*NatHaGetFailover) GetMessageName() string { return "nat_ha_get_failover" }
5107 func (*NatHaGetFailover) GetCrcString() string   { return "51077d14" }
5108 func (*NatHaGetFailover) GetMessageType() api.MessageType {
5109         return api.RequestMessage
5110 }
5111
5112 func (m *NatHaGetFailover) Size() (size int) {
5113         if m == nil {
5114                 return 0
5115         }
5116         return size
5117 }
5118 func (m *NatHaGetFailover) Marshal(b []byte) ([]byte, error) {
5119         if b == nil {
5120                 b = make([]byte, m.Size())
5121         }
5122         buf := codec.NewBuffer(b)
5123         return buf.Bytes(), nil
5124 }
5125 func (m *NatHaGetFailover) Unmarshal(b []byte) error {
5126         return nil
5127 }
5128
5129 // NatHaGetFailoverReply defines message 'nat_ha_get_failover_reply'.
5130 type NatHaGetFailoverReply struct {
5131         Retval                 int32      `binapi:"i32,name=retval" json:"retval,omitempty"`
5132         IPAddress              IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
5133         Port                   uint16     `binapi:"u16,name=port" json:"port,omitempty"`
5134         SessionRefreshInterval uint32     `binapi:"u32,name=session_refresh_interval" json:"session_refresh_interval,omitempty"`
5135 }
5136
5137 func (m *NatHaGetFailoverReply) Reset()               { *m = NatHaGetFailoverReply{} }
5138 func (*NatHaGetFailoverReply) GetMessageName() string { return "nat_ha_get_failover_reply" }
5139 func (*NatHaGetFailoverReply) GetCrcString() string   { return "a67d8752" }
5140 func (*NatHaGetFailoverReply) GetMessageType() api.MessageType {
5141         return api.ReplyMessage
5142 }
5143
5144 func (m *NatHaGetFailoverReply) Size() (size int) {
5145         if m == nil {
5146                 return 0
5147         }
5148         size += 4     // m.Retval
5149         size += 1 * 4 // m.IPAddress
5150         size += 2     // m.Port
5151         size += 4     // m.SessionRefreshInterval
5152         return size
5153 }
5154 func (m *NatHaGetFailoverReply) Marshal(b []byte) ([]byte, error) {
5155         if b == nil {
5156                 b = make([]byte, m.Size())
5157         }
5158         buf := codec.NewBuffer(b)
5159         buf.EncodeInt32(m.Retval)
5160         buf.EncodeBytes(m.IPAddress[:], 4)
5161         buf.EncodeUint16(m.Port)
5162         buf.EncodeUint32(m.SessionRefreshInterval)
5163         return buf.Bytes(), nil
5164 }
5165 func (m *NatHaGetFailoverReply) Unmarshal(b []byte) error {
5166         buf := codec.NewBuffer(b)
5167         m.Retval = buf.DecodeInt32()
5168         copy(m.IPAddress[:], buf.DecodeBytes(4))
5169         m.Port = buf.DecodeUint16()
5170         m.SessionRefreshInterval = buf.DecodeUint32()
5171         return nil
5172 }
5173
5174 // NatHaGetListener defines message 'nat_ha_get_listener'.
5175 type NatHaGetListener struct{}
5176
5177 func (m *NatHaGetListener) Reset()               { *m = NatHaGetListener{} }
5178 func (*NatHaGetListener) GetMessageName() string { return "nat_ha_get_listener" }
5179 func (*NatHaGetListener) GetCrcString() string   { return "51077d14" }
5180 func (*NatHaGetListener) GetMessageType() api.MessageType {
5181         return api.RequestMessage
5182 }
5183
5184 func (m *NatHaGetListener) Size() (size int) {
5185         if m == nil {
5186                 return 0
5187         }
5188         return size
5189 }
5190 func (m *NatHaGetListener) Marshal(b []byte) ([]byte, error) {
5191         if b == nil {
5192                 b = make([]byte, m.Size())
5193         }
5194         buf := codec.NewBuffer(b)
5195         return buf.Bytes(), nil
5196 }
5197 func (m *NatHaGetListener) Unmarshal(b []byte) error {
5198         return nil
5199 }
5200
5201 // NatHaGetListenerReply defines message 'nat_ha_get_listener_reply'.
5202 type NatHaGetListenerReply struct {
5203         Retval    int32      `binapi:"i32,name=retval" json:"retval,omitempty"`
5204         IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
5205         Port      uint16     `binapi:"u16,name=port" json:"port,omitempty"`
5206         PathMtu   uint32     `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
5207 }
5208
5209 func (m *NatHaGetListenerReply) Reset()               { *m = NatHaGetListenerReply{} }
5210 func (*NatHaGetListenerReply) GetMessageName() string { return "nat_ha_get_listener_reply" }
5211 func (*NatHaGetListenerReply) GetCrcString() string   { return "123ea41f" }
5212 func (*NatHaGetListenerReply) GetMessageType() api.MessageType {
5213         return api.ReplyMessage
5214 }
5215
5216 func (m *NatHaGetListenerReply) Size() (size int) {
5217         if m == nil {
5218                 return 0
5219         }
5220         size += 4     // m.Retval
5221         size += 1 * 4 // m.IPAddress
5222         size += 2     // m.Port
5223         size += 4     // m.PathMtu
5224         return size
5225 }
5226 func (m *NatHaGetListenerReply) Marshal(b []byte) ([]byte, error) {
5227         if b == nil {
5228                 b = make([]byte, m.Size())
5229         }
5230         buf := codec.NewBuffer(b)
5231         buf.EncodeInt32(m.Retval)
5232         buf.EncodeBytes(m.IPAddress[:], 4)
5233         buf.EncodeUint16(m.Port)
5234         buf.EncodeUint32(m.PathMtu)
5235         return buf.Bytes(), nil
5236 }
5237 func (m *NatHaGetListenerReply) Unmarshal(b []byte) error {
5238         buf := codec.NewBuffer(b)
5239         m.Retval = buf.DecodeInt32()
5240         copy(m.IPAddress[:], buf.DecodeBytes(4))
5241         m.Port = buf.DecodeUint16()
5242         m.PathMtu = buf.DecodeUint32()
5243         return nil
5244 }
5245
5246 // NatHaResync defines message 'nat_ha_resync'.
5247 type NatHaResync struct {
5248         WantResyncEvent uint8  `binapi:"u8,name=want_resync_event" json:"want_resync_event,omitempty"`
5249         PID             uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
5250 }
5251
5252 func (m *NatHaResync) Reset()               { *m = NatHaResync{} }
5253 func (*NatHaResync) GetMessageName() string { return "nat_ha_resync" }
5254 func (*NatHaResync) GetCrcString() string   { return "c8ab9e03" }
5255 func (*NatHaResync) GetMessageType() api.MessageType {
5256         return api.RequestMessage
5257 }
5258
5259 func (m *NatHaResync) Size() (size int) {
5260         if m == nil {
5261                 return 0
5262         }
5263         size += 1 // m.WantResyncEvent
5264         size += 4 // m.PID
5265         return size
5266 }
5267 func (m *NatHaResync) Marshal(b []byte) ([]byte, error) {
5268         if b == nil {
5269                 b = make([]byte, m.Size())
5270         }
5271         buf := codec.NewBuffer(b)
5272         buf.EncodeUint8(m.WantResyncEvent)
5273         buf.EncodeUint32(m.PID)
5274         return buf.Bytes(), nil
5275 }
5276 func (m *NatHaResync) Unmarshal(b []byte) error {
5277         buf := codec.NewBuffer(b)
5278         m.WantResyncEvent = buf.DecodeUint8()
5279         m.PID = buf.DecodeUint32()
5280         return nil
5281 }
5282
5283 // NatHaResyncCompletedEvent defines message 'nat_ha_resync_completed_event'.
5284 type NatHaResyncCompletedEvent struct {
5285         PID         uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
5286         MissedCount uint32 `binapi:"u32,name=missed_count" json:"missed_count,omitempty"`
5287 }
5288
5289 func (m *NatHaResyncCompletedEvent) Reset()               { *m = NatHaResyncCompletedEvent{} }
5290 func (*NatHaResyncCompletedEvent) GetMessageName() string { return "nat_ha_resync_completed_event" }
5291 func (*NatHaResyncCompletedEvent) GetCrcString() string   { return "fdc598fb" }
5292 func (*NatHaResyncCompletedEvent) GetMessageType() api.MessageType {
5293         return api.EventMessage
5294 }
5295
5296 func (m *NatHaResyncCompletedEvent) Size() (size int) {
5297         if m == nil {
5298                 return 0
5299         }
5300         size += 4 // m.PID
5301         size += 4 // m.MissedCount
5302         return size
5303 }
5304 func (m *NatHaResyncCompletedEvent) Marshal(b []byte) ([]byte, error) {
5305         if b == nil {
5306                 b = make([]byte, m.Size())
5307         }
5308         buf := codec.NewBuffer(b)
5309         buf.EncodeUint32(m.PID)
5310         buf.EncodeUint32(m.MissedCount)
5311         return buf.Bytes(), nil
5312 }
5313 func (m *NatHaResyncCompletedEvent) Unmarshal(b []byte) error {
5314         buf := codec.NewBuffer(b)
5315         m.PID = buf.DecodeUint32()
5316         m.MissedCount = buf.DecodeUint32()
5317         return nil
5318 }
5319
5320 // NatHaResyncReply defines message 'nat_ha_resync_reply'.
5321 type NatHaResyncReply struct {
5322         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
5323 }
5324
5325 func (m *NatHaResyncReply) Reset()               { *m = NatHaResyncReply{} }
5326 func (*NatHaResyncReply) GetMessageName() string { return "nat_ha_resync_reply" }
5327 func (*NatHaResyncReply) GetCrcString() string   { return "e8d4e804" }
5328 func (*NatHaResyncReply) GetMessageType() api.MessageType {
5329         return api.ReplyMessage
5330 }
5331
5332 func (m *NatHaResyncReply) Size() (size int) {
5333         if m == nil {
5334                 return 0
5335         }
5336         size += 4 // m.Retval
5337         return size
5338 }
5339 func (m *NatHaResyncReply) Marshal(b []byte) ([]byte, error) {
5340         if b == nil {
5341                 b = make([]byte, m.Size())
5342         }
5343         buf := codec.NewBuffer(b)
5344         buf.EncodeInt32(m.Retval)
5345         return buf.Bytes(), nil
5346 }
5347 func (m *NatHaResyncReply) Unmarshal(b []byte) error {
5348         buf := codec.NewBuffer(b)
5349         m.Retval = buf.DecodeInt32()
5350         return nil
5351 }
5352
5353 // NatHaSetFailover defines message 'nat_ha_set_failover'.
5354 type NatHaSetFailover struct {
5355         IPAddress              IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
5356         Port                   uint16     `binapi:"u16,name=port" json:"port,omitempty"`
5357         SessionRefreshInterval uint32     `binapi:"u32,name=session_refresh_interval" json:"session_refresh_interval,omitempty"`
5358 }
5359
5360 func (m *NatHaSetFailover) Reset()               { *m = NatHaSetFailover{} }
5361 func (*NatHaSetFailover) GetMessageName() string { return "nat_ha_set_failover" }
5362 func (*NatHaSetFailover) GetCrcString() string   { return "718246af" }
5363 func (*NatHaSetFailover) GetMessageType() api.MessageType {
5364         return api.RequestMessage
5365 }
5366
5367 func (m *NatHaSetFailover) Size() (size int) {
5368         if m == nil {
5369                 return 0
5370         }
5371         size += 1 * 4 // m.IPAddress
5372         size += 2     // m.Port
5373         size += 4     // m.SessionRefreshInterval
5374         return size
5375 }
5376 func (m *NatHaSetFailover) Marshal(b []byte) ([]byte, error) {
5377         if b == nil {
5378                 b = make([]byte, m.Size())
5379         }
5380         buf := codec.NewBuffer(b)
5381         buf.EncodeBytes(m.IPAddress[:], 4)
5382         buf.EncodeUint16(m.Port)
5383         buf.EncodeUint32(m.SessionRefreshInterval)
5384         return buf.Bytes(), nil
5385 }
5386 func (m *NatHaSetFailover) Unmarshal(b []byte) error {
5387         buf := codec.NewBuffer(b)
5388         copy(m.IPAddress[:], buf.DecodeBytes(4))
5389         m.Port = buf.DecodeUint16()
5390         m.SessionRefreshInterval = buf.DecodeUint32()
5391         return nil
5392 }
5393
5394 // NatHaSetFailoverReply defines message 'nat_ha_set_failover_reply'.
5395 type NatHaSetFailoverReply struct {
5396         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
5397 }
5398
5399 func (m *NatHaSetFailoverReply) Reset()               { *m = NatHaSetFailoverReply{} }
5400 func (*NatHaSetFailoverReply) GetMessageName() string { return "nat_ha_set_failover_reply" }
5401 func (*NatHaSetFailoverReply) GetCrcString() string   { return "e8d4e804" }
5402 func (*NatHaSetFailoverReply) GetMessageType() api.MessageType {
5403         return api.ReplyMessage
5404 }
5405
5406 func (m *NatHaSetFailoverReply) Size() (size int) {
5407         if m == nil {
5408                 return 0
5409         }
5410         size += 4 // m.Retval
5411         return size
5412 }
5413 func (m *NatHaSetFailoverReply) Marshal(b []byte) ([]byte, error) {
5414         if b == nil {
5415                 b = make([]byte, m.Size())
5416         }
5417         buf := codec.NewBuffer(b)
5418         buf.EncodeInt32(m.Retval)
5419         return buf.Bytes(), nil
5420 }
5421 func (m *NatHaSetFailoverReply) Unmarshal(b []byte) error {
5422         buf := codec.NewBuffer(b)
5423         m.Retval = buf.DecodeInt32()
5424         return nil
5425 }
5426
5427 // NatHaSetListener defines message 'nat_ha_set_listener'.
5428 type NatHaSetListener struct {
5429         IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
5430         Port      uint16     `binapi:"u16,name=port" json:"port,omitempty"`
5431         PathMtu   uint32     `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
5432 }
5433
5434 func (m *NatHaSetListener) Reset()               { *m = NatHaSetListener{} }
5435 func (*NatHaSetListener) GetMessageName() string { return "nat_ha_set_listener" }
5436 func (*NatHaSetListener) GetCrcString() string   { return "e4a8cb4e" }
5437 func (*NatHaSetListener) GetMessageType() api.MessageType {
5438         return api.RequestMessage
5439 }
5440
5441 func (m *NatHaSetListener) Size() (size int) {
5442         if m == nil {
5443                 return 0
5444         }
5445         size += 1 * 4 // m.IPAddress
5446         size += 2     // m.Port
5447         size += 4     // m.PathMtu
5448         return size
5449 }
5450 func (m *NatHaSetListener) Marshal(b []byte) ([]byte, error) {
5451         if b == nil {
5452                 b = make([]byte, m.Size())
5453         }
5454         buf := codec.NewBuffer(b)
5455         buf.EncodeBytes(m.IPAddress[:], 4)
5456         buf.EncodeUint16(m.Port)
5457         buf.EncodeUint32(m.PathMtu)
5458         return buf.Bytes(), nil
5459 }
5460 func (m *NatHaSetListener) Unmarshal(b []byte) error {
5461         buf := codec.NewBuffer(b)
5462         copy(m.IPAddress[:], buf.DecodeBytes(4))
5463         m.Port = buf.DecodeUint16()
5464         m.PathMtu = buf.DecodeUint32()
5465         return nil
5466 }
5467
5468 // NatHaSetListenerReply defines message 'nat_ha_set_listener_reply'.
5469 type NatHaSetListenerReply struct {
5470         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
5471 }
5472
5473 func (m *NatHaSetListenerReply) Reset()               { *m = NatHaSetListenerReply{} }
5474 func (*NatHaSetListenerReply) GetMessageName() string { return "nat_ha_set_listener_reply" }
5475 func (*NatHaSetListenerReply) GetCrcString() string   { return "e8d4e804" }
5476 func (*NatHaSetListenerReply) GetMessageType() api.MessageType {
5477         return api.ReplyMessage
5478 }
5479
5480 func (m *NatHaSetListenerReply) Size() (size int) {
5481         if m == nil {
5482                 return 0
5483         }
5484         size += 4 // m.Retval
5485         return size
5486 }
5487 func (m *NatHaSetListenerReply) Marshal(b []byte) ([]byte, error) {
5488         if b == nil {
5489                 b = make([]byte, m.Size())
5490         }
5491         buf := codec.NewBuffer(b)
5492         buf.EncodeInt32(m.Retval)
5493         return buf.Bytes(), nil
5494 }
5495 func (m *NatHaSetListenerReply) Unmarshal(b []byte) error {
5496         buf := codec.NewBuffer(b)
5497         m.Retval = buf.DecodeInt32()
5498         return nil
5499 }
5500
5501 // NatIpfixEnableDisable defines message 'nat_ipfix_enable_disable'.
5502 type NatIpfixEnableDisable struct {
5503         DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"`
5504         SrcPort  uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
5505         Enable   bool   `binapi:"bool,name=enable" json:"enable,omitempty"`
5506 }
5507
5508 func (m *NatIpfixEnableDisable) Reset()               { *m = NatIpfixEnableDisable{} }
5509 func (*NatIpfixEnableDisable) GetMessageName() string { return "nat_ipfix_enable_disable" }
5510 func (*NatIpfixEnableDisable) GetCrcString() string   { return "9af4a2d2" }
5511 func (*NatIpfixEnableDisable) GetMessageType() api.MessageType {
5512         return api.RequestMessage
5513 }
5514
5515 func (m *NatIpfixEnableDisable) Size() (size int) {
5516         if m == nil {
5517                 return 0
5518         }
5519         size += 4 // m.DomainID
5520         size += 2 // m.SrcPort
5521         size += 1 // m.Enable
5522         return size
5523 }
5524 func (m *NatIpfixEnableDisable) Marshal(b []byte) ([]byte, error) {
5525         if b == nil {
5526                 b = make([]byte, m.Size())
5527         }
5528         buf := codec.NewBuffer(b)
5529         buf.EncodeUint32(m.DomainID)
5530         buf.EncodeUint16(m.SrcPort)
5531         buf.EncodeBool(m.Enable)
5532         return buf.Bytes(), nil
5533 }
5534 func (m *NatIpfixEnableDisable) Unmarshal(b []byte) error {
5535         buf := codec.NewBuffer(b)
5536         m.DomainID = buf.DecodeUint32()
5537         m.SrcPort = buf.DecodeUint16()
5538         m.Enable = buf.DecodeBool()
5539         return nil
5540 }
5541
5542 // NatIpfixEnableDisableReply defines message 'nat_ipfix_enable_disable_reply'.
5543 type NatIpfixEnableDisableReply struct {
5544         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
5545 }
5546
5547 func (m *NatIpfixEnableDisableReply) Reset()               { *m = NatIpfixEnableDisableReply{} }
5548 func (*NatIpfixEnableDisableReply) GetMessageName() string { return "nat_ipfix_enable_disable_reply" }
5549 func (*NatIpfixEnableDisableReply) GetCrcString() string   { return "e8d4e804" }
5550 func (*NatIpfixEnableDisableReply) GetMessageType() api.MessageType {
5551         return api.ReplyMessage
5552 }
5553
5554 func (m *NatIpfixEnableDisableReply) Size() (size int) {
5555         if m == nil {
5556                 return 0
5557         }
5558         size += 4 // m.Retval
5559         return size
5560 }
5561 func (m *NatIpfixEnableDisableReply) Marshal(b []byte) ([]byte, error) {
5562         if b == nil {
5563                 b = make([]byte, m.Size())
5564         }
5565         buf := codec.NewBuffer(b)
5566         buf.EncodeInt32(m.Retval)
5567         return buf.Bytes(), nil
5568 }
5569 func (m *NatIpfixEnableDisableReply) Unmarshal(b []byte) error {
5570         buf := codec.NewBuffer(b)
5571         m.Retval = buf.DecodeInt32()
5572         return nil
5573 }
5574
5575 // NatSetAddrAndPortAllocAlg defines message 'nat_set_addr_and_port_alloc_alg'.
5576 type NatSetAddrAndPortAllocAlg struct {
5577         Alg        uint8  `binapi:"u8,name=alg" json:"alg,omitempty"`
5578         PsidOffset uint8  `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
5579         PsidLength uint8  `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
5580         Psid       uint16 `binapi:"u16,name=psid" json:"psid,omitempty"`
5581         StartPort  uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"`
5582         EndPort    uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"`
5583 }
5584
5585 func (m *NatSetAddrAndPortAllocAlg) Reset()               { *m = NatSetAddrAndPortAllocAlg{} }
5586 func (*NatSetAddrAndPortAllocAlg) GetMessageName() string { return "nat_set_addr_and_port_alloc_alg" }
5587 func (*NatSetAddrAndPortAllocAlg) GetCrcString() string   { return "deeb746f" }
5588 func (*NatSetAddrAndPortAllocAlg) GetMessageType() api.MessageType {
5589         return api.RequestMessage
5590 }
5591
5592 func (m *NatSetAddrAndPortAllocAlg) Size() (size int) {
5593         if m == nil {
5594                 return 0
5595         }
5596         size += 1 // m.Alg
5597         size += 1 // m.PsidOffset
5598         size += 1 // m.PsidLength
5599         size += 2 // m.Psid
5600         size += 2 // m.StartPort
5601         size += 2 // m.EndPort
5602         return size
5603 }
5604 func (m *NatSetAddrAndPortAllocAlg) Marshal(b []byte) ([]byte, error) {
5605         if b == nil {
5606                 b = make([]byte, m.Size())
5607         }
5608         buf := codec.NewBuffer(b)
5609         buf.EncodeUint8(m.Alg)
5610         buf.EncodeUint8(m.PsidOffset)
5611         buf.EncodeUint8(m.PsidLength)
5612         buf.EncodeUint16(m.Psid)
5613         buf.EncodeUint16(m.StartPort)
5614         buf.EncodeUint16(m.EndPort)
5615         return buf.Bytes(), nil
5616 }
5617 func (m *NatSetAddrAndPortAllocAlg) Unmarshal(b []byte) error {
5618         buf := codec.NewBuffer(b)
5619         m.Alg = buf.DecodeUint8()
5620         m.PsidOffset = buf.DecodeUint8()
5621         m.PsidLength = buf.DecodeUint8()
5622         m.Psid = buf.DecodeUint16()
5623         m.StartPort = buf.DecodeUint16()
5624         m.EndPort = buf.DecodeUint16()
5625         return nil
5626 }
5627
5628 // NatSetAddrAndPortAllocAlgReply defines message 'nat_set_addr_and_port_alloc_alg_reply'.
5629 type NatSetAddrAndPortAllocAlgReply struct {
5630         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
5631 }
5632
5633 func (m *NatSetAddrAndPortAllocAlgReply) Reset() { *m = NatSetAddrAndPortAllocAlgReply{} }
5634 func (*NatSetAddrAndPortAllocAlgReply) GetMessageName() string {
5635         return "nat_set_addr_and_port_alloc_alg_reply"
5636 }
5637 func (*NatSetAddrAndPortAllocAlgReply) GetCrcString() string { return "e8d4e804" }
5638 func (*NatSetAddrAndPortAllocAlgReply) GetMessageType() api.MessageType {
5639         return api.ReplyMessage
5640 }
5641
5642 func (m *NatSetAddrAndPortAllocAlgReply) Size() (size int) {
5643         if m == nil {
5644                 return 0
5645         }
5646         size += 4 // m.Retval
5647         return size
5648 }
5649 func (m *NatSetAddrAndPortAllocAlgReply) Marshal(b []byte) ([]byte, error) {
5650         if b == nil {
5651                 b = make([]byte, m.Size())
5652         }
5653         buf := codec.NewBuffer(b)
5654         buf.EncodeInt32(m.Retval)
5655         return buf.Bytes(), nil
5656 }
5657 func (m *NatSetAddrAndPortAllocAlgReply) Unmarshal(b []byte) error {
5658         buf := codec.NewBuffer(b)
5659         m.Retval = buf.DecodeInt32()
5660         return nil
5661 }
5662
5663 // NatSetLogLevel defines message 'nat_set_log_level'.
5664 type NatSetLogLevel struct {
5665         LogLevel NatLogLevel `binapi:"nat_log_level,name=log_level" json:"log_level,omitempty"`
5666 }
5667
5668 func (m *NatSetLogLevel) Reset()               { *m = NatSetLogLevel{} }
5669 func (*NatSetLogLevel) GetMessageName() string { return "nat_set_log_level" }
5670 func (*NatSetLogLevel) GetCrcString() string   { return "70076bfe" }
5671 func (*NatSetLogLevel) GetMessageType() api.MessageType {
5672         return api.RequestMessage
5673 }
5674
5675 func (m *NatSetLogLevel) Size() (size int) {
5676         if m == nil {
5677                 return 0
5678         }
5679         size += 1 // m.LogLevel
5680         return size
5681 }
5682 func (m *NatSetLogLevel) Marshal(b []byte) ([]byte, error) {
5683         if b == nil {
5684                 b = make([]byte, m.Size())
5685         }
5686         buf := codec.NewBuffer(b)
5687         buf.EncodeUint8(uint8(m.LogLevel))
5688         return buf.Bytes(), nil
5689 }
5690 func (m *NatSetLogLevel) Unmarshal(b []byte) error {
5691         buf := codec.NewBuffer(b)
5692         m.LogLevel = NatLogLevel(buf.DecodeUint8())
5693         return nil
5694 }
5695
5696 // NatSetLogLevelReply defines message 'nat_set_log_level_reply'.
5697 type NatSetLogLevelReply struct {
5698         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
5699 }
5700
5701 func (m *NatSetLogLevelReply) Reset()               { *m = NatSetLogLevelReply{} }
5702 func (*NatSetLogLevelReply) GetMessageName() string { return "nat_set_log_level_reply" }
5703 func (*NatSetLogLevelReply) GetCrcString() string   { return "e8d4e804" }
5704 func (*NatSetLogLevelReply) GetMessageType() api.MessageType {
5705         return api.ReplyMessage
5706 }
5707
5708 func (m *NatSetLogLevelReply) Size() (size int) {
5709         if m == nil {
5710                 return 0
5711         }
5712         size += 4 // m.Retval
5713         return size
5714 }
5715 func (m *NatSetLogLevelReply) Marshal(b []byte) ([]byte, error) {
5716         if b == nil {
5717                 b = make([]byte, m.Size())
5718         }
5719         buf := codec.NewBuffer(b)
5720         buf.EncodeInt32(m.Retval)
5721         return buf.Bytes(), nil
5722 }
5723 func (m *NatSetLogLevelReply) Unmarshal(b []byte) error {
5724         buf := codec.NewBuffer(b)
5725         m.Retval = buf.DecodeInt32()
5726         return nil
5727 }
5728
5729 // NatSetMssClamping defines message 'nat_set_mss_clamping'.
5730 type NatSetMssClamping struct {
5731         MssValue uint16 `binapi:"u16,name=mss_value" json:"mss_value,omitempty"`
5732         Enable   bool   `binapi:"bool,name=enable" json:"enable,omitempty"`
5733 }
5734
5735 func (m *NatSetMssClamping) Reset()               { *m = NatSetMssClamping{} }
5736 func (*NatSetMssClamping) GetMessageName() string { return "nat_set_mss_clamping" }
5737 func (*NatSetMssClamping) GetCrcString() string   { return "25e90abb" }
5738 func (*NatSetMssClamping) GetMessageType() api.MessageType {
5739         return api.RequestMessage
5740 }
5741
5742 func (m *NatSetMssClamping) Size() (size int) {
5743         if m == nil {
5744                 return 0
5745         }
5746         size += 2 // m.MssValue
5747         size += 1 // m.Enable
5748         return size
5749 }
5750 func (m *NatSetMssClamping) Marshal(b []byte) ([]byte, error) {
5751         if b == nil {
5752                 b = make([]byte, m.Size())
5753         }
5754         buf := codec.NewBuffer(b)
5755         buf.EncodeUint16(m.MssValue)
5756         buf.EncodeBool(m.Enable)
5757         return buf.Bytes(), nil
5758 }
5759 func (m *NatSetMssClamping) Unmarshal(b []byte) error {
5760         buf := codec.NewBuffer(b)
5761         m.MssValue = buf.DecodeUint16()
5762         m.Enable = buf.DecodeBool()
5763         return nil
5764 }
5765
5766 // NatSetMssClampingReply defines message 'nat_set_mss_clamping_reply'.
5767 type NatSetMssClampingReply struct {
5768         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
5769 }
5770
5771 func (m *NatSetMssClampingReply) Reset()               { *m = NatSetMssClampingReply{} }
5772 func (*NatSetMssClampingReply) GetMessageName() string { return "nat_set_mss_clamping_reply" }
5773 func (*NatSetMssClampingReply) GetCrcString() string   { return "e8d4e804" }
5774 func (*NatSetMssClampingReply) GetMessageType() api.MessageType {
5775         return api.ReplyMessage
5776 }
5777
5778 func (m *NatSetMssClampingReply) Size() (size int) {
5779         if m == nil {
5780                 return 0
5781         }
5782         size += 4 // m.Retval
5783         return size
5784 }
5785 func (m *NatSetMssClampingReply) Marshal(b []byte) ([]byte, error) {
5786         if b == nil {
5787                 b = make([]byte, m.Size())
5788         }
5789         buf := codec.NewBuffer(b)
5790         buf.EncodeInt32(m.Retval)
5791         return buf.Bytes(), nil
5792 }
5793 func (m *NatSetMssClampingReply) Unmarshal(b []byte) error {
5794         buf := codec.NewBuffer(b)
5795         m.Retval = buf.DecodeInt32()
5796         return nil
5797 }
5798
5799 // NatSetTimeouts defines message 'nat_set_timeouts'.
5800 type NatSetTimeouts struct {
5801         UDP            uint32 `binapi:"u32,name=udp" json:"udp,omitempty"`
5802         TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"`
5803         TCPTransitory  uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"`
5804         ICMP           uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"`
5805 }
5806
5807 func (m *NatSetTimeouts) Reset()               { *m = NatSetTimeouts{} }
5808 func (*NatSetTimeouts) GetMessageName() string { return "nat_set_timeouts" }
5809 func (*NatSetTimeouts) GetCrcString() string   { return "d4746b16" }
5810 func (*NatSetTimeouts) GetMessageType() api.MessageType {
5811         return api.RequestMessage
5812 }
5813
5814 func (m *NatSetTimeouts) Size() (size int) {
5815         if m == nil {
5816                 return 0
5817         }
5818         size += 4 // m.UDP
5819         size += 4 // m.TCPEstablished
5820         size += 4 // m.TCPTransitory
5821         size += 4 // m.ICMP
5822         return size
5823 }
5824 func (m *NatSetTimeouts) Marshal(b []byte) ([]byte, error) {
5825         if b == nil {
5826                 b = make([]byte, m.Size())
5827         }
5828         buf := codec.NewBuffer(b)
5829         buf.EncodeUint32(m.UDP)
5830         buf.EncodeUint32(m.TCPEstablished)
5831         buf.EncodeUint32(m.TCPTransitory)
5832         buf.EncodeUint32(m.ICMP)
5833         return buf.Bytes(), nil
5834 }
5835 func (m *NatSetTimeouts) Unmarshal(b []byte) error {
5836         buf := codec.NewBuffer(b)
5837         m.UDP = buf.DecodeUint32()
5838         m.TCPEstablished = buf.DecodeUint32()
5839         m.TCPTransitory = buf.DecodeUint32()
5840         m.ICMP = buf.DecodeUint32()
5841         return nil
5842 }
5843
5844 // NatSetTimeoutsReply defines message 'nat_set_timeouts_reply'.
5845 type NatSetTimeoutsReply struct {
5846         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
5847 }
5848
5849 func (m *NatSetTimeoutsReply) Reset()               { *m = NatSetTimeoutsReply{} }
5850 func (*NatSetTimeoutsReply) GetMessageName() string { return "nat_set_timeouts_reply" }
5851 func (*NatSetTimeoutsReply) GetCrcString() string   { return "e8d4e804" }
5852 func (*NatSetTimeoutsReply) GetMessageType() api.MessageType {
5853         return api.ReplyMessage
5854 }
5855
5856 func (m *NatSetTimeoutsReply) Size() (size int) {
5857         if m == nil {
5858                 return 0
5859         }
5860         size += 4 // m.Retval
5861         return size
5862 }
5863 func (m *NatSetTimeoutsReply) Marshal(b []byte) ([]byte, error) {
5864         if b == nil {
5865                 b = make([]byte, m.Size())
5866         }
5867         buf := codec.NewBuffer(b)
5868         buf.EncodeInt32(m.Retval)
5869         return buf.Bytes(), nil
5870 }
5871 func (m *NatSetTimeoutsReply) Unmarshal(b []byte) error {
5872         buf := codec.NewBuffer(b)
5873         m.Retval = buf.DecodeInt32()
5874         return nil
5875 }
5876
5877 // NatSetWorkers defines message 'nat_set_workers'.
5878 type NatSetWorkers struct {
5879         WorkerMask uint64 `binapi:"u64,name=worker_mask" json:"worker_mask,omitempty"`
5880 }
5881
5882 func (m *NatSetWorkers) Reset()               { *m = NatSetWorkers{} }
5883 func (*NatSetWorkers) GetMessageName() string { return "nat_set_workers" }
5884 func (*NatSetWorkers) GetCrcString() string   { return "da926638" }
5885 func (*NatSetWorkers) GetMessageType() api.MessageType {
5886         return api.RequestMessage
5887 }
5888
5889 func (m *NatSetWorkers) Size() (size int) {
5890         if m == nil {
5891                 return 0
5892         }
5893         size += 8 // m.WorkerMask
5894         return size
5895 }
5896 func (m *NatSetWorkers) Marshal(b []byte) ([]byte, error) {
5897         if b == nil {
5898                 b = make([]byte, m.Size())
5899         }
5900         buf := codec.NewBuffer(b)
5901         buf.EncodeUint64(m.WorkerMask)
5902         return buf.Bytes(), nil
5903 }
5904 func (m *NatSetWorkers) Unmarshal(b []byte) error {
5905         buf := codec.NewBuffer(b)
5906         m.WorkerMask = buf.DecodeUint64()
5907         return nil
5908 }
5909
5910 // NatSetWorkersReply defines message 'nat_set_workers_reply'.
5911 type NatSetWorkersReply struct {
5912         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
5913 }
5914
5915 func (m *NatSetWorkersReply) Reset()               { *m = NatSetWorkersReply{} }
5916 func (*NatSetWorkersReply) GetMessageName() string { return "nat_set_workers_reply" }
5917 func (*NatSetWorkersReply) GetCrcString() string   { return "e8d4e804" }
5918 func (*NatSetWorkersReply) GetMessageType() api.MessageType {
5919         return api.ReplyMessage
5920 }
5921
5922 func (m *NatSetWorkersReply) Size() (size int) {
5923         if m == nil {
5924                 return 0
5925         }
5926         size += 4 // m.Retval
5927         return size
5928 }
5929 func (m *NatSetWorkersReply) Marshal(b []byte) ([]byte, error) {
5930         if b == nil {
5931                 b = make([]byte, m.Size())
5932         }
5933         buf := codec.NewBuffer(b)
5934         buf.EncodeInt32(m.Retval)
5935         return buf.Bytes(), nil
5936 }
5937 func (m *NatSetWorkersReply) Unmarshal(b []byte) error {
5938         buf := codec.NewBuffer(b)
5939         m.Retval = buf.DecodeInt32()
5940         return nil
5941 }
5942
5943 // NatShowConfig defines message 'nat_show_config'.
5944 type NatShowConfig struct{}
5945
5946 func (m *NatShowConfig) Reset()               { *m = NatShowConfig{} }
5947 func (*NatShowConfig) GetMessageName() string { return "nat_show_config" }
5948 func (*NatShowConfig) GetCrcString() string   { return "51077d14" }
5949 func (*NatShowConfig) GetMessageType() api.MessageType {
5950         return api.RequestMessage
5951 }
5952
5953 func (m *NatShowConfig) Size() (size int) {
5954         if m == nil {
5955                 return 0
5956         }
5957         return size
5958 }
5959 func (m *NatShowConfig) Marshal(b []byte) ([]byte, error) {
5960         if b == nil {
5961                 b = make([]byte, m.Size())
5962         }
5963         buf := codec.NewBuffer(b)
5964         return buf.Bytes(), nil
5965 }
5966 func (m *NatShowConfig) Unmarshal(b []byte) error {
5967         return nil
5968 }
5969
5970 // NatShowConfigReply defines message 'nat_show_config_reply'.
5971 type NatShowConfigReply struct {
5972         Retval                          int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
5973         StaticMappingOnly               bool   `binapi:"bool,name=static_mapping_only" json:"static_mapping_only,omitempty"`
5974         StaticMappingConnectionTracking bool   `binapi:"bool,name=static_mapping_connection_tracking" json:"static_mapping_connection_tracking,omitempty"`
5975         Deterministic                   bool   `binapi:"bool,name=deterministic" json:"deterministic,omitempty"`
5976         EndpointDependent               bool   `binapi:"bool,name=endpoint_dependent" json:"endpoint_dependent,omitempty"`
5977         Out2inDpo                       bool   `binapi:"bool,name=out2in_dpo" json:"out2in_dpo,omitempty"`
5978         DsliteCe                        bool   `binapi:"bool,name=dslite_ce" json:"dslite_ce,omitempty"`
5979         TranslationBuckets              uint32 `binapi:"u32,name=translation_buckets" json:"translation_buckets,omitempty"`
5980         TranslationMemorySize           uint32 `binapi:"u32,name=translation_memory_size" json:"translation_memory_size,omitempty"`
5981         UserBuckets                     uint32 `binapi:"u32,name=user_buckets" json:"user_buckets,omitempty"`
5982         UserMemorySize                  uint32 `binapi:"u32,name=user_memory_size" json:"user_memory_size,omitempty"`
5983         MaxTranslationsPerUser          uint32 `binapi:"u32,name=max_translations_per_user" json:"max_translations_per_user,omitempty"`
5984         OutsideVrfID                    uint32 `binapi:"u32,name=outside_vrf_id" json:"outside_vrf_id,omitempty"`
5985         InsideVrfID                     uint32 `binapi:"u32,name=inside_vrf_id" json:"inside_vrf_id,omitempty"`
5986         Nat64BibBuckets                 uint32 `binapi:"u32,name=nat64_bib_buckets" json:"nat64_bib_buckets,omitempty"`
5987         Nat64BibMemorySize              uint32 `binapi:"u32,name=nat64_bib_memory_size" json:"nat64_bib_memory_size,omitempty"`
5988         Nat64StBuckets                  uint32 `binapi:"u32,name=nat64_st_buckets" json:"nat64_st_buckets,omitempty"`
5989         Nat64StMemorySize               uint32 `binapi:"u32,name=nat64_st_memory_size" json:"nat64_st_memory_size,omitempty"`
5990 }
5991
5992 func (m *NatShowConfigReply) Reset()               { *m = NatShowConfigReply{} }
5993 func (*NatShowConfigReply) GetMessageName() string { return "nat_show_config_reply" }
5994 func (*NatShowConfigReply) GetCrcString() string   { return "006a0786" }
5995 func (*NatShowConfigReply) GetMessageType() api.MessageType {
5996         return api.ReplyMessage
5997 }
5998
5999 func (m *NatShowConfigReply) Size() (size int) {
6000         if m == nil {
6001                 return 0
6002         }
6003         size += 4 // m.Retval
6004         size += 1 // m.StaticMappingOnly
6005         size += 1 // m.StaticMappingConnectionTracking
6006         size += 1 // m.Deterministic
6007         size += 1 // m.EndpointDependent
6008         size += 1 // m.Out2inDpo
6009         size += 1 // m.DsliteCe
6010         size += 4 // m.TranslationBuckets
6011         size += 4 // m.TranslationMemorySize
6012         size += 4 // m.UserBuckets
6013         size += 4 // m.UserMemorySize
6014         size += 4 // m.MaxTranslationsPerUser
6015         size += 4 // m.OutsideVrfID
6016         size += 4 // m.InsideVrfID
6017         size += 4 // m.Nat64BibBuckets
6018         size += 4 // m.Nat64BibMemorySize
6019         size += 4 // m.Nat64StBuckets
6020         size += 4 // m.Nat64StMemorySize
6021         return size
6022 }
6023 func (m *NatShowConfigReply) Marshal(b []byte) ([]byte, error) {
6024         if b == nil {
6025                 b = make([]byte, m.Size())
6026         }
6027         buf := codec.NewBuffer(b)
6028         buf.EncodeInt32(m.Retval)
6029         buf.EncodeBool(m.StaticMappingOnly)
6030         buf.EncodeBool(m.StaticMappingConnectionTracking)
6031         buf.EncodeBool(m.Deterministic)
6032         buf.EncodeBool(m.EndpointDependent)
6033         buf.EncodeBool(m.Out2inDpo)
6034         buf.EncodeBool(m.DsliteCe)
6035         buf.EncodeUint32(m.TranslationBuckets)
6036         buf.EncodeUint32(m.TranslationMemorySize)
6037         buf.EncodeUint32(m.UserBuckets)
6038         buf.EncodeUint32(m.UserMemorySize)
6039         buf.EncodeUint32(m.MaxTranslationsPerUser)
6040         buf.EncodeUint32(m.OutsideVrfID)
6041         buf.EncodeUint32(m.InsideVrfID)
6042         buf.EncodeUint32(m.Nat64BibBuckets)
6043         buf.EncodeUint32(m.Nat64BibMemorySize)
6044         buf.EncodeUint32(m.Nat64StBuckets)
6045         buf.EncodeUint32(m.Nat64StMemorySize)
6046         return buf.Bytes(), nil
6047 }
6048 func (m *NatShowConfigReply) Unmarshal(b []byte) error {
6049         buf := codec.NewBuffer(b)
6050         m.Retval = buf.DecodeInt32()
6051         m.StaticMappingOnly = buf.DecodeBool()
6052         m.StaticMappingConnectionTracking = buf.DecodeBool()
6053         m.Deterministic = buf.DecodeBool()
6054         m.EndpointDependent = buf.DecodeBool()
6055         m.Out2inDpo = buf.DecodeBool()
6056         m.DsliteCe = buf.DecodeBool()
6057         m.TranslationBuckets = buf.DecodeUint32()
6058         m.TranslationMemorySize = buf.DecodeUint32()
6059         m.UserBuckets = buf.DecodeUint32()
6060         m.UserMemorySize = buf.DecodeUint32()
6061         m.MaxTranslationsPerUser = buf.DecodeUint32()
6062         m.OutsideVrfID = buf.DecodeUint32()
6063         m.InsideVrfID = buf.DecodeUint32()
6064         m.Nat64BibBuckets = buf.DecodeUint32()
6065         m.Nat64BibMemorySize = buf.DecodeUint32()
6066         m.Nat64StBuckets = buf.DecodeUint32()
6067         m.Nat64StMemorySize = buf.DecodeUint32()
6068         return nil
6069 }
6070
6071 // NatWorkerDetails defines message 'nat_worker_details'.
6072 type NatWorkerDetails struct {
6073         WorkerIndex uint32 `binapi:"u32,name=worker_index" json:"worker_index,omitempty"`
6074         LcoreID     uint32 `binapi:"u32,name=lcore_id" json:"lcore_id,omitempty"`
6075         Name        string `binapi:"string[64],name=name" json:"name,omitempty"`
6076 }
6077
6078 func (m *NatWorkerDetails) Reset()               { *m = NatWorkerDetails{} }
6079 func (*NatWorkerDetails) GetMessageName() string { return "nat_worker_details" }
6080 func (*NatWorkerDetails) GetCrcString() string   { return "84bf06fc" }
6081 func (*NatWorkerDetails) GetMessageType() api.MessageType {
6082         return api.ReplyMessage
6083 }
6084
6085 func (m *NatWorkerDetails) Size() (size int) {
6086         if m == nil {
6087                 return 0
6088         }
6089         size += 4  // m.WorkerIndex
6090         size += 4  // m.LcoreID
6091         size += 64 // m.Name
6092         return size
6093 }
6094 func (m *NatWorkerDetails) Marshal(b []byte) ([]byte, error) {
6095         if b == nil {
6096                 b = make([]byte, m.Size())
6097         }
6098         buf := codec.NewBuffer(b)
6099         buf.EncodeUint32(m.WorkerIndex)
6100         buf.EncodeUint32(m.LcoreID)
6101         buf.EncodeString(m.Name, 64)
6102         return buf.Bytes(), nil
6103 }
6104 func (m *NatWorkerDetails) Unmarshal(b []byte) error {
6105         buf := codec.NewBuffer(b)
6106         m.WorkerIndex = buf.DecodeUint32()
6107         m.LcoreID = buf.DecodeUint32()
6108         m.Name = buf.DecodeString(64)
6109         return nil
6110 }
6111
6112 // NatWorkerDump defines message 'nat_worker_dump'.
6113 type NatWorkerDump struct{}
6114
6115 func (m *NatWorkerDump) Reset()               { *m = NatWorkerDump{} }
6116 func (*NatWorkerDump) GetMessageName() string { return "nat_worker_dump" }
6117 func (*NatWorkerDump) GetCrcString() string   { return "51077d14" }
6118 func (*NatWorkerDump) GetMessageType() api.MessageType {
6119         return api.RequestMessage
6120 }
6121
6122 func (m *NatWorkerDump) Size() (size int) {
6123         if m == nil {
6124                 return 0
6125         }
6126         return size
6127 }
6128 func (m *NatWorkerDump) Marshal(b []byte) ([]byte, error) {
6129         if b == nil {
6130                 b = make([]byte, m.Size())
6131         }
6132         buf := codec.NewBuffer(b)
6133         return buf.Bytes(), nil
6134 }
6135 func (m *NatWorkerDump) Unmarshal(b []byte) error {
6136         return nil
6137 }
6138
6139 func init() { file_nat_binapi_init() }
6140 func file_nat_binapi_init() {
6141         api.RegisterMessage((*DsliteAddDelPoolAddrRange)(nil), "dslite_add_del_pool_addr_range_c448457a")
6142         api.RegisterMessage((*DsliteAddDelPoolAddrRangeReply)(nil), "dslite_add_del_pool_addr_range_reply_e8d4e804")
6143         api.RegisterMessage((*DsliteAddressDetails)(nil), "dslite_address_details_ec26d648")
6144         api.RegisterMessage((*DsliteAddressDump)(nil), "dslite_address_dump_51077d14")
6145         api.RegisterMessage((*DsliteGetAftrAddr)(nil), "dslite_get_aftr_addr_51077d14")
6146         api.RegisterMessage((*DsliteGetAftrAddrReply)(nil), "dslite_get_aftr_addr_reply_38e30db1")
6147         api.RegisterMessage((*DsliteGetB4Addr)(nil), "dslite_get_b4_addr_51077d14")
6148         api.RegisterMessage((*DsliteGetB4AddrReply)(nil), "dslite_get_b4_addr_reply_38e30db1")
6149         api.RegisterMessage((*DsliteSetAftrAddr)(nil), "dslite_set_aftr_addr_1e955f8d")
6150         api.RegisterMessage((*DsliteSetAftrAddrReply)(nil), "dslite_set_aftr_addr_reply_e8d4e804")
6151         api.RegisterMessage((*DsliteSetB4Addr)(nil), "dslite_set_b4_addr_1e955f8d")
6152         api.RegisterMessage((*DsliteSetB4AddrReply)(nil), "dslite_set_b4_addr_reply_e8d4e804")
6153         api.RegisterMessage((*Nat44AddDelAddressRange)(nil), "nat44_add_del_address_range_d4c7568c")
6154         api.RegisterMessage((*Nat44AddDelAddressRangeReply)(nil), "nat44_add_del_address_range_reply_e8d4e804")
6155         api.RegisterMessage((*Nat44AddDelIdentityMapping)(nil), "nat44_add_del_identity_mapping_8e12743f")
6156         api.RegisterMessage((*Nat44AddDelIdentityMappingReply)(nil), "nat44_add_del_identity_mapping_reply_e8d4e804")
6157         api.RegisterMessage((*Nat44AddDelInterfaceAddr)(nil), "nat44_add_del_interface_addr_fc835325")
6158         api.RegisterMessage((*Nat44AddDelInterfaceAddrReply)(nil), "nat44_add_del_interface_addr_reply_e8d4e804")
6159         api.RegisterMessage((*Nat44AddDelLbStaticMapping)(nil), "nat44_add_del_lb_static_mapping_53b24611")
6160         api.RegisterMessage((*Nat44AddDelLbStaticMappingReply)(nil), "nat44_add_del_lb_static_mapping_reply_e8d4e804")
6161         api.RegisterMessage((*Nat44AddDelStaticMapping)(nil), "nat44_add_del_static_mapping_e165e83b")
6162         api.RegisterMessage((*Nat44AddDelStaticMappingReply)(nil), "nat44_add_del_static_mapping_reply_e8d4e804")
6163         api.RegisterMessage((*Nat44AddressDetails)(nil), "nat44_address_details_45410ac4")
6164         api.RegisterMessage((*Nat44AddressDump)(nil), "nat44_address_dump_51077d14")
6165         api.RegisterMessage((*Nat44DelSession)(nil), "nat44_del_session_4c49c387")
6166         api.RegisterMessage((*Nat44DelSessionReply)(nil), "nat44_del_session_reply_e8d4e804")
6167         api.RegisterMessage((*Nat44ForwardingEnableDisable)(nil), "nat44_forwarding_enable_disable_b3e225d2")
6168         api.RegisterMessage((*Nat44ForwardingEnableDisableReply)(nil), "nat44_forwarding_enable_disable_reply_e8d4e804")
6169         api.RegisterMessage((*Nat44ForwardingIsEnabled)(nil), "nat44_forwarding_is_enabled_51077d14")
6170         api.RegisterMessage((*Nat44ForwardingIsEnabledReply)(nil), "nat44_forwarding_is_enabled_reply_46924a06")
6171         api.RegisterMessage((*Nat44IdentityMappingDetails)(nil), "nat44_identity_mapping_details_36d21351")
6172         api.RegisterMessage((*Nat44IdentityMappingDump)(nil), "nat44_identity_mapping_dump_51077d14")
6173         api.RegisterMessage((*Nat44InterfaceAddDelFeature)(nil), "nat44_interface_add_del_feature_f3699b83")
6174         api.RegisterMessage((*Nat44InterfaceAddDelFeatureReply)(nil), "nat44_interface_add_del_feature_reply_e8d4e804")
6175         api.RegisterMessage((*Nat44InterfaceAddDelOutputFeature)(nil), "nat44_interface_add_del_output_feature_f3699b83")
6176         api.RegisterMessage((*Nat44InterfaceAddDelOutputFeatureReply)(nil), "nat44_interface_add_del_output_feature_reply_e8d4e804")
6177         api.RegisterMessage((*Nat44InterfaceAddrDetails)(nil), "nat44_interface_addr_details_3e687514")
6178         api.RegisterMessage((*Nat44InterfaceAddrDump)(nil), "nat44_interface_addr_dump_51077d14")
6179         api.RegisterMessage((*Nat44InterfaceDetails)(nil), "nat44_interface_details_5d286289")
6180         api.RegisterMessage((*Nat44InterfaceDump)(nil), "nat44_interface_dump_51077d14")
6181         api.RegisterMessage((*Nat44InterfaceOutputFeatureDetails)(nil), "nat44_interface_output_feature_details_5d286289")
6182         api.RegisterMessage((*Nat44InterfaceOutputFeatureDump)(nil), "nat44_interface_output_feature_dump_51077d14")
6183         api.RegisterMessage((*Nat44LbStaticMappingAddDelLocal)(nil), "nat44_lb_static_mapping_add_del_local_2910a151")
6184         api.RegisterMessage((*Nat44LbStaticMappingAddDelLocalReply)(nil), "nat44_lb_static_mapping_add_del_local_reply_e8d4e804")
6185         api.RegisterMessage((*Nat44LbStaticMappingDetails)(nil), "nat44_lb_static_mapping_details_2267b9e8")
6186         api.RegisterMessage((*Nat44LbStaticMappingDump)(nil), "nat44_lb_static_mapping_dump_51077d14")
6187         api.RegisterMessage((*Nat44StaticMappingDetails)(nil), "nat44_static_mapping_details_1a433ef7")
6188         api.RegisterMessage((*Nat44StaticMappingDump)(nil), "nat44_static_mapping_dump_51077d14")
6189         api.RegisterMessage((*Nat44UserDetails)(nil), "nat44_user_details_355896c2")
6190         api.RegisterMessage((*Nat44UserDump)(nil), "nat44_user_dump_51077d14")
6191         api.RegisterMessage((*Nat44UserSessionDetails)(nil), "nat44_user_session_details_1965fd69")
6192         api.RegisterMessage((*Nat44UserSessionDump)(nil), "nat44_user_session_dump_e1899c98")
6193         api.RegisterMessage((*Nat64AddDelInterface)(nil), "nat64_add_del_interface_f3699b83")
6194         api.RegisterMessage((*Nat64AddDelInterfaceAddr)(nil), "nat64_add_del_interface_addr_47d6e753")
6195         api.RegisterMessage((*Nat64AddDelInterfaceAddrReply)(nil), "nat64_add_del_interface_addr_reply_e8d4e804")
6196         api.RegisterMessage((*Nat64AddDelInterfaceReply)(nil), "nat64_add_del_interface_reply_e8d4e804")
6197         api.RegisterMessage((*Nat64AddDelPoolAddrRange)(nil), "nat64_add_del_pool_addr_range_21234ef3")
6198         api.RegisterMessage((*Nat64AddDelPoolAddrRangeReply)(nil), "nat64_add_del_pool_addr_range_reply_e8d4e804")
6199         api.RegisterMessage((*Nat64AddDelPrefix)(nil), "nat64_add_del_prefix_727b2f4c")
6200         api.RegisterMessage((*Nat64AddDelPrefixReply)(nil), "nat64_add_del_prefix_reply_e8d4e804")
6201         api.RegisterMessage((*Nat64AddDelStaticBib)(nil), "nat64_add_del_static_bib_90fae58a")
6202         api.RegisterMessage((*Nat64AddDelStaticBibReply)(nil), "nat64_add_del_static_bib_reply_e8d4e804")
6203         api.RegisterMessage((*Nat64BibDetails)(nil), "nat64_bib_details_62c8541d")
6204         api.RegisterMessage((*Nat64BibDump)(nil), "nat64_bib_dump_cfcb6b75")
6205         api.RegisterMessage((*Nat64InterfaceDetails)(nil), "nat64_interface_details_5d286289")
6206         api.RegisterMessage((*Nat64InterfaceDump)(nil), "nat64_interface_dump_51077d14")
6207         api.RegisterMessage((*Nat64PoolAddrDetails)(nil), "nat64_pool_addr_details_9bb99cdb")
6208         api.RegisterMessage((*Nat64PoolAddrDump)(nil), "nat64_pool_addr_dump_51077d14")
6209         api.RegisterMessage((*Nat64PrefixDetails)(nil), "nat64_prefix_details_20568de3")
6210         api.RegisterMessage((*Nat64PrefixDump)(nil), "nat64_prefix_dump_51077d14")
6211         api.RegisterMessage((*Nat64StDetails)(nil), "nat64_st_details_c770d620")
6212         api.RegisterMessage((*Nat64StDump)(nil), "nat64_st_dump_cfcb6b75")
6213         api.RegisterMessage((*Nat66AddDelInterface)(nil), "nat66_add_del_interface_f3699b83")
6214         api.RegisterMessage((*Nat66AddDelInterfaceReply)(nil), "nat66_add_del_interface_reply_e8d4e804")
6215         api.RegisterMessage((*Nat66AddDelStaticMapping)(nil), "nat66_add_del_static_mapping_fb64e50b")
6216         api.RegisterMessage((*Nat66AddDelStaticMappingReply)(nil), "nat66_add_del_static_mapping_reply_e8d4e804")
6217         api.RegisterMessage((*Nat66InterfaceDetails)(nil), "nat66_interface_details_5d286289")
6218         api.RegisterMessage((*Nat66InterfaceDump)(nil), "nat66_interface_dump_51077d14")
6219         api.RegisterMessage((*Nat66StaticMappingDetails)(nil), "nat66_static_mapping_details_5c568448")
6220         api.RegisterMessage((*Nat66StaticMappingDump)(nil), "nat66_static_mapping_dump_51077d14")
6221         api.RegisterMessage((*NatControlPing)(nil), "nat_control_ping_51077d14")
6222         api.RegisterMessage((*NatControlPingReply)(nil), "nat_control_ping_reply_f6b0b8ca")
6223         api.RegisterMessage((*NatDetAddDelMap)(nil), "nat_det_add_del_map_112fde05")
6224         api.RegisterMessage((*NatDetAddDelMapReply)(nil), "nat_det_add_del_map_reply_e8d4e804")
6225         api.RegisterMessage((*NatDetCloseSessionIn)(nil), "nat_det_close_session_in_0a10ef64")
6226         api.RegisterMessage((*NatDetCloseSessionInReply)(nil), "nat_det_close_session_in_reply_e8d4e804")
6227         api.RegisterMessage((*NatDetCloseSessionOut)(nil), "nat_det_close_session_out_c1b6cbfb")
6228         api.RegisterMessage((*NatDetCloseSessionOutReply)(nil), "nat_det_close_session_out_reply_e8d4e804")
6229         api.RegisterMessage((*NatDetForward)(nil), "nat_det_forward_7f8a89cd")
6230         api.RegisterMessage((*NatDetForwardReply)(nil), "nat_det_forward_reply_a8ccbdc0")
6231         api.RegisterMessage((*NatDetMapDetails)(nil), "nat_det_map_details_88000ee1")
6232         api.RegisterMessage((*NatDetMapDump)(nil), "nat_det_map_dump_51077d14")
6233         api.RegisterMessage((*NatDetReverse)(nil), "nat_det_reverse_a7573fe1")
6234         api.RegisterMessage((*NatDetReverseReply)(nil), "nat_det_reverse_reply_34066d48")
6235         api.RegisterMessage((*NatDetSessionDetails)(nil), "nat_det_session_details_27f3c171")
6236         api.RegisterMessage((*NatDetSessionDump)(nil), "nat_det_session_dump_e45a3af7")
6237         api.RegisterMessage((*NatGetAddrAndPortAllocAlg)(nil), "nat_get_addr_and_port_alloc_alg_51077d14")
6238         api.RegisterMessage((*NatGetAddrAndPortAllocAlgReply)(nil), "nat_get_addr_and_port_alloc_alg_reply_3607a7d0")
6239         api.RegisterMessage((*NatGetMssClamping)(nil), "nat_get_mss_clamping_51077d14")
6240         api.RegisterMessage((*NatGetMssClampingReply)(nil), "nat_get_mss_clamping_reply_1c0b2a78")
6241         api.RegisterMessage((*NatGetTimeouts)(nil), "nat_get_timeouts_51077d14")
6242         api.RegisterMessage((*NatGetTimeoutsReply)(nil), "nat_get_timeouts_reply_3c4df4e1")
6243         api.RegisterMessage((*NatHaFlush)(nil), "nat_ha_flush_51077d14")
6244         api.RegisterMessage((*NatHaFlushReply)(nil), "nat_ha_flush_reply_e8d4e804")
6245         api.RegisterMessage((*NatHaGetFailover)(nil), "nat_ha_get_failover_51077d14")
6246         api.RegisterMessage((*NatHaGetFailoverReply)(nil), "nat_ha_get_failover_reply_a67d8752")
6247         api.RegisterMessage((*NatHaGetListener)(nil), "nat_ha_get_listener_51077d14")
6248         api.RegisterMessage((*NatHaGetListenerReply)(nil), "nat_ha_get_listener_reply_123ea41f")
6249         api.RegisterMessage((*NatHaResync)(nil), "nat_ha_resync_c8ab9e03")
6250         api.RegisterMessage((*NatHaResyncCompletedEvent)(nil), "nat_ha_resync_completed_event_fdc598fb")
6251         api.RegisterMessage((*NatHaResyncReply)(nil), "nat_ha_resync_reply_e8d4e804")
6252         api.RegisterMessage((*NatHaSetFailover)(nil), "nat_ha_set_failover_718246af")
6253         api.RegisterMessage((*NatHaSetFailoverReply)(nil), "nat_ha_set_failover_reply_e8d4e804")
6254         api.RegisterMessage((*NatHaSetListener)(nil), "nat_ha_set_listener_e4a8cb4e")
6255         api.RegisterMessage((*NatHaSetListenerReply)(nil), "nat_ha_set_listener_reply_e8d4e804")
6256         api.RegisterMessage((*NatIpfixEnableDisable)(nil), "nat_ipfix_enable_disable_9af4a2d2")
6257         api.RegisterMessage((*NatIpfixEnableDisableReply)(nil), "nat_ipfix_enable_disable_reply_e8d4e804")
6258         api.RegisterMessage((*NatSetAddrAndPortAllocAlg)(nil), "nat_set_addr_and_port_alloc_alg_deeb746f")
6259         api.RegisterMessage((*NatSetAddrAndPortAllocAlgReply)(nil), "nat_set_addr_and_port_alloc_alg_reply_e8d4e804")
6260         api.RegisterMessage((*NatSetLogLevel)(nil), "nat_set_log_level_70076bfe")
6261         api.RegisterMessage((*NatSetLogLevelReply)(nil), "nat_set_log_level_reply_e8d4e804")
6262         api.RegisterMessage((*NatSetMssClamping)(nil), "nat_set_mss_clamping_25e90abb")
6263         api.RegisterMessage((*NatSetMssClampingReply)(nil), "nat_set_mss_clamping_reply_e8d4e804")
6264         api.RegisterMessage((*NatSetTimeouts)(nil), "nat_set_timeouts_d4746b16")
6265         api.RegisterMessage((*NatSetTimeoutsReply)(nil), "nat_set_timeouts_reply_e8d4e804")
6266         api.RegisterMessage((*NatSetWorkers)(nil), "nat_set_workers_da926638")
6267         api.RegisterMessage((*NatSetWorkersReply)(nil), "nat_set_workers_reply_e8d4e804")
6268         api.RegisterMessage((*NatShowConfig)(nil), "nat_show_config_51077d14")
6269         api.RegisterMessage((*NatShowConfigReply)(nil), "nat_show_config_reply_006a0786")
6270         api.RegisterMessage((*NatWorkerDetails)(nil), "nat_worker_details_84bf06fc")
6271         api.RegisterMessage((*NatWorkerDump)(nil), "nat_worker_dump_51077d14")
6272 }
6273
6274 // Messages returns list of all messages in this module.
6275 func AllMessages() []api.Message {
6276         return []api.Message{
6277                 (*DsliteAddDelPoolAddrRange)(nil),
6278                 (*DsliteAddDelPoolAddrRangeReply)(nil),
6279                 (*DsliteAddressDetails)(nil),
6280                 (*DsliteAddressDump)(nil),
6281                 (*DsliteGetAftrAddr)(nil),
6282                 (*DsliteGetAftrAddrReply)(nil),
6283                 (*DsliteGetB4Addr)(nil),
6284                 (*DsliteGetB4AddrReply)(nil),
6285                 (*DsliteSetAftrAddr)(nil),
6286                 (*DsliteSetAftrAddrReply)(nil),
6287                 (*DsliteSetB4Addr)(nil),
6288                 (*DsliteSetB4AddrReply)(nil),
6289                 (*Nat44AddDelAddressRange)(nil),
6290                 (*Nat44AddDelAddressRangeReply)(nil),
6291                 (*Nat44AddDelIdentityMapping)(nil),
6292                 (*Nat44AddDelIdentityMappingReply)(nil),
6293                 (*Nat44AddDelInterfaceAddr)(nil),
6294                 (*Nat44AddDelInterfaceAddrReply)(nil),
6295                 (*Nat44AddDelLbStaticMapping)(nil),
6296                 (*Nat44AddDelLbStaticMappingReply)(nil),
6297                 (*Nat44AddDelStaticMapping)(nil),
6298                 (*Nat44AddDelStaticMappingReply)(nil),
6299                 (*Nat44AddressDetails)(nil),
6300                 (*Nat44AddressDump)(nil),
6301                 (*Nat44DelSession)(nil),
6302                 (*Nat44DelSessionReply)(nil),
6303                 (*Nat44ForwardingEnableDisable)(nil),
6304                 (*Nat44ForwardingEnableDisableReply)(nil),
6305                 (*Nat44ForwardingIsEnabled)(nil),
6306                 (*Nat44ForwardingIsEnabledReply)(nil),
6307                 (*Nat44IdentityMappingDetails)(nil),
6308                 (*Nat44IdentityMappingDump)(nil),
6309                 (*Nat44InterfaceAddDelFeature)(nil),
6310                 (*Nat44InterfaceAddDelFeatureReply)(nil),
6311                 (*Nat44InterfaceAddDelOutputFeature)(nil),
6312                 (*Nat44InterfaceAddDelOutputFeatureReply)(nil),
6313                 (*Nat44InterfaceAddrDetails)(nil),
6314                 (*Nat44InterfaceAddrDump)(nil),
6315                 (*Nat44InterfaceDetails)(nil),
6316                 (*Nat44InterfaceDump)(nil),
6317                 (*Nat44InterfaceOutputFeatureDetails)(nil),
6318                 (*Nat44InterfaceOutputFeatureDump)(nil),
6319                 (*Nat44LbStaticMappingAddDelLocal)(nil),
6320                 (*Nat44LbStaticMappingAddDelLocalReply)(nil),
6321                 (*Nat44LbStaticMappingDetails)(nil),
6322                 (*Nat44LbStaticMappingDump)(nil),
6323                 (*Nat44StaticMappingDetails)(nil),
6324                 (*Nat44StaticMappingDump)(nil),
6325                 (*Nat44UserDetails)(nil),
6326                 (*Nat44UserDump)(nil),
6327                 (*Nat44UserSessionDetails)(nil),
6328                 (*Nat44UserSessionDump)(nil),
6329                 (*Nat64AddDelInterface)(nil),
6330                 (*Nat64AddDelInterfaceAddr)(nil),
6331                 (*Nat64AddDelInterfaceAddrReply)(nil),
6332                 (*Nat64AddDelInterfaceReply)(nil),
6333                 (*Nat64AddDelPoolAddrRange)(nil),
6334                 (*Nat64AddDelPoolAddrRangeReply)(nil),
6335                 (*Nat64AddDelPrefix)(nil),
6336                 (*Nat64AddDelPrefixReply)(nil),
6337                 (*Nat64AddDelStaticBib)(nil),
6338                 (*Nat64AddDelStaticBibReply)(nil),
6339                 (*Nat64BibDetails)(nil),
6340                 (*Nat64BibDump)(nil),
6341                 (*Nat64InterfaceDetails)(nil),
6342                 (*Nat64InterfaceDump)(nil),
6343                 (*Nat64PoolAddrDetails)(nil),
6344                 (*Nat64PoolAddrDump)(nil),
6345                 (*Nat64PrefixDetails)(nil),
6346                 (*Nat64PrefixDump)(nil),
6347                 (*Nat64StDetails)(nil),
6348                 (*Nat64StDump)(nil),
6349                 (*Nat66AddDelInterface)(nil),
6350                 (*Nat66AddDelInterfaceReply)(nil),
6351                 (*Nat66AddDelStaticMapping)(nil),
6352                 (*Nat66AddDelStaticMappingReply)(nil),
6353                 (*Nat66InterfaceDetails)(nil),
6354                 (*Nat66InterfaceDump)(nil),
6355                 (*Nat66StaticMappingDetails)(nil),
6356                 (*Nat66StaticMappingDump)(nil),
6357                 (*NatControlPing)(nil),
6358                 (*NatControlPingReply)(nil),
6359                 (*NatDetAddDelMap)(nil),
6360                 (*NatDetAddDelMapReply)(nil),
6361                 (*NatDetCloseSessionIn)(nil),
6362                 (*NatDetCloseSessionInReply)(nil),
6363                 (*NatDetCloseSessionOut)(nil),
6364                 (*NatDetCloseSessionOutReply)(nil),
6365                 (*NatDetForward)(nil),
6366                 (*NatDetForwardReply)(nil),
6367                 (*NatDetMapDetails)(nil),
6368                 (*NatDetMapDump)(nil),
6369                 (*NatDetReverse)(nil),
6370                 (*NatDetReverseReply)(nil),
6371                 (*NatDetSessionDetails)(nil),
6372                 (*NatDetSessionDump)(nil),
6373                 (*NatGetAddrAndPortAllocAlg)(nil),
6374                 (*NatGetAddrAndPortAllocAlgReply)(nil),
6375                 (*NatGetMssClamping)(nil),
6376                 (*NatGetMssClampingReply)(nil),
6377                 (*NatGetTimeouts)(nil),
6378                 (*NatGetTimeoutsReply)(nil),
6379                 (*NatHaFlush)(nil),
6380                 (*NatHaFlushReply)(nil),
6381                 (*NatHaGetFailover)(nil),
6382                 (*NatHaGetFailoverReply)(nil),
6383                 (*NatHaGetListener)(nil),
6384                 (*NatHaGetListenerReply)(nil),
6385                 (*NatHaResync)(nil),
6386                 (*NatHaResyncCompletedEvent)(nil),
6387                 (*NatHaResyncReply)(nil),
6388                 (*NatHaSetFailover)(nil),
6389                 (*NatHaSetFailoverReply)(nil),
6390                 (*NatHaSetListener)(nil),
6391                 (*NatHaSetListenerReply)(nil),
6392                 (*NatIpfixEnableDisable)(nil),
6393                 (*NatIpfixEnableDisableReply)(nil),
6394                 (*NatSetAddrAndPortAllocAlg)(nil),
6395                 (*NatSetAddrAndPortAllocAlgReply)(nil),
6396                 (*NatSetLogLevel)(nil),
6397                 (*NatSetLogLevelReply)(nil),
6398                 (*NatSetMssClamping)(nil),
6399                 (*NatSetMssClampingReply)(nil),
6400                 (*NatSetTimeouts)(nil),
6401                 (*NatSetTimeoutsReply)(nil),
6402                 (*NatSetWorkers)(nil),
6403                 (*NatSetWorkersReply)(nil),
6404                 (*NatShowConfig)(nil),
6405                 (*NatShowConfigReply)(nil),
6406                 (*NatWorkerDetails)(nil),
6407                 (*NatWorkerDump)(nil),
6408         }
6409 }