Improve binapi generator
[govpp.git] / binapi / ip / ip.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5 // source: /usr/share/vpp/api/core/ip.api.json
6
7 // Package ip contains generated bindings for API file ip.api.
8 //
9 // Contents:
10 //   1 enum
11 //   4 structs
12 //  60 messages
13 //
14 package ip
15
16 import (
17         api "git.fd.io/govpp.git/api"
18         _ "git.fd.io/govpp.git/binapi/ethernet_types"
19         fib_types "git.fd.io/govpp.git/binapi/fib_types"
20         interface_types "git.fd.io/govpp.git/binapi/interface_types"
21         ip_types "git.fd.io/govpp.git/binapi/ip_types"
22         mfib_types "git.fd.io/govpp.git/binapi/mfib_types"
23         codec "git.fd.io/govpp.git/codec"
24         "strconv"
25 )
26
27 // This is a compile-time assertion to ensure that this generated file
28 // is compatible with the GoVPP api package it is being compiled against.
29 // A compilation error at this line likely means your copy of the
30 // GoVPP api package needs to be updated.
31 const _ = api.GoVppAPIPackageIsVersion2
32
33 const (
34         APIFile    = "ip"
35         APIVersion = "3.0.1"
36         VersionCrc = 0x765d74b1
37 )
38
39 // IPReassType defines enum 'ip_reass_type'.
40 type IPReassType uint32
41
42 const (
43         IP_REASS_TYPE_FULL            IPReassType = 0
44         IP_REASS_TYPE_SHALLOW_VIRTUAL IPReassType = 1
45 )
46
47 var (
48         IPReassType_name = map[uint32]string{
49                 0: "IP_REASS_TYPE_FULL",
50                 1: "IP_REASS_TYPE_SHALLOW_VIRTUAL",
51         }
52         IPReassType_value = map[string]uint32{
53                 "IP_REASS_TYPE_FULL":            0,
54                 "IP_REASS_TYPE_SHALLOW_VIRTUAL": 1,
55         }
56 )
57
58 func (x IPReassType) String() string {
59         s, ok := IPReassType_name[uint32(x)]
60         if ok {
61                 return s
62         }
63         return "IPReassType(" + strconv.Itoa(int(x)) + ")"
64 }
65
66 // IPMroute defines type 'ip_mroute'.
67 type IPMroute struct {
68         TableID    uint32                `binapi:"u32,name=table_id" json:"table_id,omitempty"`
69         EntryFlags uint32                `binapi:"u32,name=entry_flags" json:"entry_flags,omitempty"`
70         RpfID      uint32                `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
71         Prefix     ip_types.Mprefix      `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
72         NPaths     uint8                 `binapi:"u8,name=n_paths" json:"-"`
73         Paths      []mfib_types.MfibPath `binapi:"mfib_path[n_paths],name=paths" json:"paths,omitempty"`
74 }
75
76 // IPRoute defines type 'ip_route'.
77 type IPRoute struct {
78         TableID    uint32              `binapi:"u32,name=table_id" json:"table_id,omitempty"`
79         StatsIndex uint32              `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
80         Prefix     ip_types.Prefix     `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
81         NPaths     uint8               `binapi:"u8,name=n_paths" json:"-"`
82         Paths      []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
83 }
84
85 // IPTable defines type 'ip_table'.
86 type IPTable struct {
87         TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
88         IsIP6   bool   `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
89         Name    string `binapi:"string[64],name=name" json:"name,omitempty"`
90 }
91
92 // PuntRedirect defines type 'punt_redirect'.
93 type PuntRedirect struct {
94         RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
95         TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
96         Nh          ip_types.Address               `binapi:"address,name=nh" json:"nh,omitempty"`
97 }
98
99 // IoamDisable defines message 'ioam_disable'.
100 type IoamDisable struct {
101         ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
102 }
103
104 func (m *IoamDisable) Reset()               { *m = IoamDisable{} }
105 func (*IoamDisable) GetMessageName() string { return "ioam_disable" }
106 func (*IoamDisable) GetCrcString() string   { return "6b16a45e" }
107 func (*IoamDisable) GetMessageType() api.MessageType {
108         return api.RequestMessage
109 }
110
111 func (m *IoamDisable) Size() int {
112         if m == nil {
113                 return 0
114         }
115         var size int
116         size += 2 // m.ID
117         return size
118 }
119 func (m *IoamDisable) Marshal(b []byte) ([]byte, error) {
120         var buf *codec.Buffer
121         if b == nil {
122                 buf = codec.NewBuffer(make([]byte, m.Size()))
123         } else {
124                 buf = codec.NewBuffer(b)
125         }
126         buf.EncodeUint16(uint16(m.ID))
127         return buf.Bytes(), nil
128 }
129 func (m *IoamDisable) Unmarshal(b []byte) error {
130         buf := codec.NewBuffer(b)
131         m.ID = buf.DecodeUint16()
132         return nil
133 }
134
135 // IoamDisableReply defines message 'ioam_disable_reply'.
136 type IoamDisableReply struct {
137         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
138 }
139
140 func (m *IoamDisableReply) Reset()               { *m = IoamDisableReply{} }
141 func (*IoamDisableReply) GetMessageName() string { return "ioam_disable_reply" }
142 func (*IoamDisableReply) GetCrcString() string   { return "e8d4e804" }
143 func (*IoamDisableReply) GetMessageType() api.MessageType {
144         return api.ReplyMessage
145 }
146
147 func (m *IoamDisableReply) Size() int {
148         if m == nil {
149                 return 0
150         }
151         var size int
152         size += 4 // m.Retval
153         return size
154 }
155 func (m *IoamDisableReply) Marshal(b []byte) ([]byte, error) {
156         var buf *codec.Buffer
157         if b == nil {
158                 buf = codec.NewBuffer(make([]byte, m.Size()))
159         } else {
160                 buf = codec.NewBuffer(b)
161         }
162         buf.EncodeUint32(uint32(m.Retval))
163         return buf.Bytes(), nil
164 }
165 func (m *IoamDisableReply) Unmarshal(b []byte) error {
166         buf := codec.NewBuffer(b)
167         m.Retval = int32(buf.DecodeUint32())
168         return nil
169 }
170
171 // IoamEnable defines message 'ioam_enable'.
172 type IoamEnable struct {
173         ID          uint16 `binapi:"u16,name=id" json:"id,omitempty"`
174         Seqno       bool   `binapi:"bool,name=seqno" json:"seqno,omitempty"`
175         Analyse     bool   `binapi:"bool,name=analyse" json:"analyse,omitempty"`
176         PotEnable   bool   `binapi:"bool,name=pot_enable" json:"pot_enable,omitempty"`
177         TraceEnable bool   `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"`
178         NodeID      uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
179 }
180
181 func (m *IoamEnable) Reset()               { *m = IoamEnable{} }
182 func (*IoamEnable) GetMessageName() string { return "ioam_enable" }
183 func (*IoamEnable) GetCrcString() string   { return "51ccd868" }
184 func (*IoamEnable) GetMessageType() api.MessageType {
185         return api.RequestMessage
186 }
187
188 func (m *IoamEnable) Size() int {
189         if m == nil {
190                 return 0
191         }
192         var size int
193         size += 2 // m.ID
194         size += 1 // m.Seqno
195         size += 1 // m.Analyse
196         size += 1 // m.PotEnable
197         size += 1 // m.TraceEnable
198         size += 4 // m.NodeID
199         return size
200 }
201 func (m *IoamEnable) Marshal(b []byte) ([]byte, error) {
202         var buf *codec.Buffer
203         if b == nil {
204                 buf = codec.NewBuffer(make([]byte, m.Size()))
205         } else {
206                 buf = codec.NewBuffer(b)
207         }
208         buf.EncodeUint16(uint16(m.ID))
209         buf.EncodeBool(m.Seqno)
210         buf.EncodeBool(m.Analyse)
211         buf.EncodeBool(m.PotEnable)
212         buf.EncodeBool(m.TraceEnable)
213         buf.EncodeUint32(uint32(m.NodeID))
214         return buf.Bytes(), nil
215 }
216 func (m *IoamEnable) Unmarshal(b []byte) error {
217         buf := codec.NewBuffer(b)
218         m.ID = buf.DecodeUint16()
219         m.Seqno = buf.DecodeBool()
220         m.Analyse = buf.DecodeBool()
221         m.PotEnable = buf.DecodeBool()
222         m.TraceEnable = buf.DecodeBool()
223         m.NodeID = buf.DecodeUint32()
224         return nil
225 }
226
227 // IoamEnableReply defines message 'ioam_enable_reply'.
228 type IoamEnableReply struct {
229         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
230 }
231
232 func (m *IoamEnableReply) Reset()               { *m = IoamEnableReply{} }
233 func (*IoamEnableReply) GetMessageName() string { return "ioam_enable_reply" }
234 func (*IoamEnableReply) GetCrcString() string   { return "e8d4e804" }
235 func (*IoamEnableReply) GetMessageType() api.MessageType {
236         return api.ReplyMessage
237 }
238
239 func (m *IoamEnableReply) Size() int {
240         if m == nil {
241                 return 0
242         }
243         var size int
244         size += 4 // m.Retval
245         return size
246 }
247 func (m *IoamEnableReply) Marshal(b []byte) ([]byte, error) {
248         var buf *codec.Buffer
249         if b == nil {
250                 buf = codec.NewBuffer(make([]byte, m.Size()))
251         } else {
252                 buf = codec.NewBuffer(b)
253         }
254         buf.EncodeUint32(uint32(m.Retval))
255         return buf.Bytes(), nil
256 }
257 func (m *IoamEnableReply) Unmarshal(b []byte) error {
258         buf := codec.NewBuffer(b)
259         m.Retval = int32(buf.DecodeUint32())
260         return nil
261 }
262
263 // IPAddressDetails defines message 'ip_address_details'.
264 type IPAddressDetails struct {
265         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
266         Prefix    ip_types.AddressWithPrefix     `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
267 }
268
269 func (m *IPAddressDetails) Reset()               { *m = IPAddressDetails{} }
270 func (*IPAddressDetails) GetMessageName() string { return "ip_address_details" }
271 func (*IPAddressDetails) GetCrcString() string   { return "b1199745" }
272 func (*IPAddressDetails) GetMessageType() api.MessageType {
273         return api.ReplyMessage
274 }
275
276 func (m *IPAddressDetails) Size() int {
277         if m == nil {
278                 return 0
279         }
280         var size int
281         size += 4      // m.SwIfIndex
282         size += 1      // m.Prefix.Address.Af
283         size += 1 * 16 // m.Prefix.Address.Un
284         size += 1      // m.Prefix.Len
285         return size
286 }
287 func (m *IPAddressDetails) Marshal(b []byte) ([]byte, error) {
288         var buf *codec.Buffer
289         if b == nil {
290                 buf = codec.NewBuffer(make([]byte, m.Size()))
291         } else {
292                 buf = codec.NewBuffer(b)
293         }
294         buf.EncodeUint32(uint32(m.SwIfIndex))
295         buf.EncodeUint8(uint8(m.Prefix.Address.Af))
296         buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 0)
297         buf.EncodeUint8(uint8(m.Prefix.Len))
298         return buf.Bytes(), nil
299 }
300 func (m *IPAddressDetails) Unmarshal(b []byte) error {
301         buf := codec.NewBuffer(b)
302         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
303         m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
304         copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
305         m.Prefix.Len = buf.DecodeUint8()
306         return nil
307 }
308
309 // IPAddressDump defines message 'ip_address_dump'.
310 type IPAddressDump struct {
311         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
312         IsIPv6    bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
313 }
314
315 func (m *IPAddressDump) Reset()               { *m = IPAddressDump{} }
316 func (*IPAddressDump) GetMessageName() string { return "ip_address_dump" }
317 func (*IPAddressDump) GetCrcString() string   { return "2d033de4" }
318 func (*IPAddressDump) GetMessageType() api.MessageType {
319         return api.RequestMessage
320 }
321
322 func (m *IPAddressDump) Size() int {
323         if m == nil {
324                 return 0
325         }
326         var size int
327         size += 4 // m.SwIfIndex
328         size += 1 // m.IsIPv6
329         return size
330 }
331 func (m *IPAddressDump) Marshal(b []byte) ([]byte, error) {
332         var buf *codec.Buffer
333         if b == nil {
334                 buf = codec.NewBuffer(make([]byte, m.Size()))
335         } else {
336                 buf = codec.NewBuffer(b)
337         }
338         buf.EncodeUint32(uint32(m.SwIfIndex))
339         buf.EncodeBool(m.IsIPv6)
340         return buf.Bytes(), nil
341 }
342 func (m *IPAddressDump) Unmarshal(b []byte) error {
343         buf := codec.NewBuffer(b)
344         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
345         m.IsIPv6 = buf.DecodeBool()
346         return nil
347 }
348
349 // IPContainerProxyAddDel defines message 'ip_container_proxy_add_del'.
350 type IPContainerProxyAddDel struct {
351         Pfx       ip_types.Prefix                `binapi:"prefix,name=pfx" json:"pfx,omitempty"`
352         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
353         IsAdd     bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
354 }
355
356 func (m *IPContainerProxyAddDel) Reset()               { *m = IPContainerProxyAddDel{} }
357 func (*IPContainerProxyAddDel) GetMessageName() string { return "ip_container_proxy_add_del" }
358 func (*IPContainerProxyAddDel) GetCrcString() string   { return "91189f40" }
359 func (*IPContainerProxyAddDel) GetMessageType() api.MessageType {
360         return api.RequestMessage
361 }
362
363 func (m *IPContainerProxyAddDel) Size() int {
364         if m == nil {
365                 return 0
366         }
367         var size int
368         size += 1      // m.Pfx.Address.Af
369         size += 1 * 16 // m.Pfx.Address.Un
370         size += 1      // m.Pfx.Len
371         size += 4      // m.SwIfIndex
372         size += 1      // m.IsAdd
373         return size
374 }
375 func (m *IPContainerProxyAddDel) Marshal(b []byte) ([]byte, error) {
376         var buf *codec.Buffer
377         if b == nil {
378                 buf = codec.NewBuffer(make([]byte, m.Size()))
379         } else {
380                 buf = codec.NewBuffer(b)
381         }
382         buf.EncodeUint8(uint8(m.Pfx.Address.Af))
383         buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 0)
384         buf.EncodeUint8(uint8(m.Pfx.Len))
385         buf.EncodeUint32(uint32(m.SwIfIndex))
386         buf.EncodeBool(m.IsAdd)
387         return buf.Bytes(), nil
388 }
389 func (m *IPContainerProxyAddDel) Unmarshal(b []byte) error {
390         buf := codec.NewBuffer(b)
391         m.Pfx.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
392         copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
393         m.Pfx.Len = buf.DecodeUint8()
394         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
395         m.IsAdd = buf.DecodeBool()
396         return nil
397 }
398
399 // IPContainerProxyAddDelReply defines message 'ip_container_proxy_add_del_reply'.
400 type IPContainerProxyAddDelReply struct {
401         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
402 }
403
404 func (m *IPContainerProxyAddDelReply) Reset() { *m = IPContainerProxyAddDelReply{} }
405 func (*IPContainerProxyAddDelReply) GetMessageName() string {
406         return "ip_container_proxy_add_del_reply"
407 }
408 func (*IPContainerProxyAddDelReply) GetCrcString() string { return "e8d4e804" }
409 func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType {
410         return api.ReplyMessage
411 }
412
413 func (m *IPContainerProxyAddDelReply) Size() int {
414         if m == nil {
415                 return 0
416         }
417         var size int
418         size += 4 // m.Retval
419         return size
420 }
421 func (m *IPContainerProxyAddDelReply) Marshal(b []byte) ([]byte, error) {
422         var buf *codec.Buffer
423         if b == nil {
424                 buf = codec.NewBuffer(make([]byte, m.Size()))
425         } else {
426                 buf = codec.NewBuffer(b)
427         }
428         buf.EncodeUint32(uint32(m.Retval))
429         return buf.Bytes(), nil
430 }
431 func (m *IPContainerProxyAddDelReply) Unmarshal(b []byte) error {
432         buf := codec.NewBuffer(b)
433         m.Retval = int32(buf.DecodeUint32())
434         return nil
435 }
436
437 // IPContainerProxyDetails defines message 'ip_container_proxy_details'.
438 type IPContainerProxyDetails struct {
439         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
440         Prefix    ip_types.Prefix                `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
441 }
442
443 func (m *IPContainerProxyDetails) Reset()               { *m = IPContainerProxyDetails{} }
444 func (*IPContainerProxyDetails) GetMessageName() string { return "ip_container_proxy_details" }
445 func (*IPContainerProxyDetails) GetCrcString() string   { return "0ee460e8" }
446 func (*IPContainerProxyDetails) GetMessageType() api.MessageType {
447         return api.ReplyMessage
448 }
449
450 func (m *IPContainerProxyDetails) Size() int {
451         if m == nil {
452                 return 0
453         }
454         var size int
455         size += 4      // m.SwIfIndex
456         size += 1      // m.Prefix.Address.Af
457         size += 1 * 16 // m.Prefix.Address.Un
458         size += 1      // m.Prefix.Len
459         return size
460 }
461 func (m *IPContainerProxyDetails) Marshal(b []byte) ([]byte, error) {
462         var buf *codec.Buffer
463         if b == nil {
464                 buf = codec.NewBuffer(make([]byte, m.Size()))
465         } else {
466                 buf = codec.NewBuffer(b)
467         }
468         buf.EncodeUint32(uint32(m.SwIfIndex))
469         buf.EncodeUint8(uint8(m.Prefix.Address.Af))
470         buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 0)
471         buf.EncodeUint8(uint8(m.Prefix.Len))
472         return buf.Bytes(), nil
473 }
474 func (m *IPContainerProxyDetails) Unmarshal(b []byte) error {
475         buf := codec.NewBuffer(b)
476         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
477         m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
478         copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
479         m.Prefix.Len = buf.DecodeUint8()
480         return nil
481 }
482
483 // IPContainerProxyDump defines message 'ip_container_proxy_dump'.
484 type IPContainerProxyDump struct{}
485
486 func (m *IPContainerProxyDump) Reset()               { *m = IPContainerProxyDump{} }
487 func (*IPContainerProxyDump) GetMessageName() string { return "ip_container_proxy_dump" }
488 func (*IPContainerProxyDump) GetCrcString() string   { return "51077d14" }
489 func (*IPContainerProxyDump) GetMessageType() api.MessageType {
490         return api.RequestMessage
491 }
492
493 func (m *IPContainerProxyDump) Size() int {
494         if m == nil {
495                 return 0
496         }
497         var size int
498         return size
499 }
500 func (m *IPContainerProxyDump) Marshal(b []byte) ([]byte, error) {
501         var buf *codec.Buffer
502         if b == nil {
503                 buf = codec.NewBuffer(make([]byte, m.Size()))
504         } else {
505                 buf = codec.NewBuffer(b)
506         }
507         return buf.Bytes(), nil
508 }
509 func (m *IPContainerProxyDump) Unmarshal(b []byte) error {
510         return nil
511 }
512
513 // IPDetails defines message 'ip_details'.
514 type IPDetails struct {
515         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
516         IsIPv6    bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
517 }
518
519 func (m *IPDetails) Reset()               { *m = IPDetails{} }
520 func (*IPDetails) GetMessageName() string { return "ip_details" }
521 func (*IPDetails) GetCrcString() string   { return "eb152d07" }
522 func (*IPDetails) GetMessageType() api.MessageType {
523         return api.ReplyMessage
524 }
525
526 func (m *IPDetails) Size() int {
527         if m == nil {
528                 return 0
529         }
530         var size int
531         size += 4 // m.SwIfIndex
532         size += 1 // m.IsIPv6
533         return size
534 }
535 func (m *IPDetails) Marshal(b []byte) ([]byte, error) {
536         var buf *codec.Buffer
537         if b == nil {
538                 buf = codec.NewBuffer(make([]byte, m.Size()))
539         } else {
540                 buf = codec.NewBuffer(b)
541         }
542         buf.EncodeUint32(uint32(m.SwIfIndex))
543         buf.EncodeBool(m.IsIPv6)
544         return buf.Bytes(), nil
545 }
546 func (m *IPDetails) Unmarshal(b []byte) error {
547         buf := codec.NewBuffer(b)
548         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
549         m.IsIPv6 = buf.DecodeBool()
550         return nil
551 }
552
553 // IPDump defines message 'ip_dump'.
554 type IPDump struct {
555         IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
556 }
557
558 func (m *IPDump) Reset()               { *m = IPDump{} }
559 func (*IPDump) GetMessageName() string { return "ip_dump" }
560 func (*IPDump) GetCrcString() string   { return "98d231ca" }
561 func (*IPDump) GetMessageType() api.MessageType {
562         return api.RequestMessage
563 }
564
565 func (m *IPDump) Size() int {
566         if m == nil {
567                 return 0
568         }
569         var size int
570         size += 1 // m.IsIPv6
571         return size
572 }
573 func (m *IPDump) Marshal(b []byte) ([]byte, error) {
574         var buf *codec.Buffer
575         if b == nil {
576                 buf = codec.NewBuffer(make([]byte, m.Size()))
577         } else {
578                 buf = codec.NewBuffer(b)
579         }
580         buf.EncodeBool(m.IsIPv6)
581         return buf.Bytes(), nil
582 }
583 func (m *IPDump) Unmarshal(b []byte) error {
584         buf := codec.NewBuffer(b)
585         m.IsIPv6 = buf.DecodeBool()
586         return nil
587 }
588
589 // IPMrouteAddDel defines message 'ip_mroute_add_del'.
590 type IPMrouteAddDel struct {
591         IsAdd       bool     `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
592         IsMultipath bool     `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
593         Route       IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
594 }
595
596 func (m *IPMrouteAddDel) Reset()               { *m = IPMrouteAddDel{} }
597 func (*IPMrouteAddDel) GetMessageName() string { return "ip_mroute_add_del" }
598 func (*IPMrouteAddDel) GetCrcString() string   { return "f6627d17" }
599 func (*IPMrouteAddDel) GetMessageType() api.MessageType {
600         return api.RequestMessage
601 }
602
603 func (m *IPMrouteAddDel) Size() int {
604         if m == nil {
605                 return 0
606         }
607         var size int
608         size += 1      // m.IsAdd
609         size += 1      // m.IsMultipath
610         size += 4      // m.Route.TableID
611         size += 4      // m.Route.EntryFlags
612         size += 4      // m.Route.RpfID
613         size += 1      // m.Route.Prefix.Af
614         size += 2      // m.Route.Prefix.GrpAddressLength
615         size += 1 * 16 // m.Route.Prefix.GrpAddress
616         size += 1 * 16 // m.Route.Prefix.SrcAddress
617         size += 1      // m.Route.NPaths
618         for j2 := 0; j2 < len(m.Route.Paths); j2++ {
619                 var s2 mfib_types.MfibPath
620                 _ = s2
621                 if j2 < len(m.Route.Paths) {
622                         s2 = m.Route.Paths[j2]
623                 }
624                 size += 4      // s2.ItfFlags
625                 size += 4      // s2.Path.SwIfIndex
626                 size += 4      // s2.Path.TableID
627                 size += 4      // s2.Path.RpfID
628                 size += 1      // s2.Path.Weight
629                 size += 1      // s2.Path.Preference
630                 size += 4      // s2.Path.Type
631                 size += 4      // s2.Path.Flags
632                 size += 4      // s2.Path.Proto
633                 size += 1 * 16 // s2.Path.Nh.Address
634                 size += 4      // s2.Path.Nh.ViaLabel
635                 size += 4      // s2.Path.Nh.ObjID
636                 size += 4      // s2.Path.Nh.ClassifyTableIndex
637                 size += 1      // s2.Path.NLabels
638                 for j4 := 0; j4 < 16; j4++ {
639                         var s4 fib_types.FibMplsLabel
640                         _ = s4
641                         if j4 < len(s2.Path.LabelStack) {
642                                 s4 = s2.Path.LabelStack[j4]
643                         }
644                         size += 1 // s4.IsUniform
645                         size += 4 // s4.Label
646                         size += 1 // s4.TTL
647                         size += 1 // s4.Exp
648                 }
649         }
650         return size
651 }
652 func (m *IPMrouteAddDel) Marshal(b []byte) ([]byte, error) {
653         var buf *codec.Buffer
654         if b == nil {
655                 buf = codec.NewBuffer(make([]byte, m.Size()))
656         } else {
657                 buf = codec.NewBuffer(b)
658         }
659         buf.EncodeBool(m.IsAdd)
660         buf.EncodeBool(m.IsMultipath)
661         buf.EncodeUint32(uint32(m.Route.TableID))
662         buf.EncodeUint32(uint32(m.Route.EntryFlags))
663         buf.EncodeUint32(uint32(m.Route.RpfID))
664         buf.EncodeUint8(uint8(m.Route.Prefix.Af))
665         buf.EncodeUint16(uint16(m.Route.Prefix.GrpAddressLength))
666         buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 0)
667         buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 0)
668         buf.EncodeUint8(uint8(len(m.Route.Paths)))
669         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
670                 var v1 mfib_types.MfibPath
671                 if j1 < len(m.Route.Paths) {
672                         v1 = m.Route.Paths[j1]
673                 }
674                 buf.EncodeUint32(uint32(v1.ItfFlags))
675                 buf.EncodeUint32(uint32(v1.Path.SwIfIndex))
676                 buf.EncodeUint32(uint32(v1.Path.TableID))
677                 buf.EncodeUint32(uint32(v1.Path.RpfID))
678                 buf.EncodeUint8(uint8(v1.Path.Weight))
679                 buf.EncodeUint8(uint8(v1.Path.Preference))
680                 buf.EncodeUint32(uint32(v1.Path.Type))
681                 buf.EncodeUint32(uint32(v1.Path.Flags))
682                 buf.EncodeUint32(uint32(v1.Path.Proto))
683                 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 0)
684                 buf.EncodeUint32(uint32(v1.Path.Nh.ViaLabel))
685                 buf.EncodeUint32(uint32(v1.Path.Nh.ObjID))
686                 buf.EncodeUint32(uint32(v1.Path.Nh.ClassifyTableIndex))
687                 buf.EncodeUint8(uint8(v1.Path.NLabels))
688                 for j3 := 0; j3 < 16; j3++ {
689                         var v3 fib_types.FibMplsLabel
690                         if j3 < len(v1.Path.LabelStack) {
691                                 v3 = v1.Path.LabelStack[j3]
692                         }
693                         buf.EncodeUint8(uint8(v3.IsUniform))
694                         buf.EncodeUint32(uint32(v3.Label))
695                         buf.EncodeUint8(uint8(v3.TTL))
696                         buf.EncodeUint8(uint8(v3.Exp))
697                 }
698         }
699         return buf.Bytes(), nil
700 }
701 func (m *IPMrouteAddDel) Unmarshal(b []byte) error {
702         buf := codec.NewBuffer(b)
703         m.IsAdd = buf.DecodeBool()
704         m.IsMultipath = buf.DecodeBool()
705         m.Route.TableID = buf.DecodeUint32()
706         m.Route.EntryFlags = buf.DecodeUint32()
707         m.Route.RpfID = buf.DecodeUint32()
708         m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
709         m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
710         copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
711         copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
712         m.Route.NPaths = buf.DecodeUint8()
713         m.Route.Paths = make([]mfib_types.MfibPath, int(m.Route.NPaths))
714         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
715                 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
716                 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
717                 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
718                 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
719                 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
720                 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
721                 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32())
722                 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32())
723                 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
724                 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
725                 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
726                 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
727                 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
728                 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
729                 for j3 := 0; j3 < 16; j3++ {
730                         m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
731                         m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
732                         m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
733                         m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
734                 }
735         }
736         return nil
737 }
738
739 // IPMrouteAddDelReply defines message 'ip_mroute_add_del_reply'.
740 type IPMrouteAddDelReply struct {
741         Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
742         StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
743 }
744
745 func (m *IPMrouteAddDelReply) Reset()               { *m = IPMrouteAddDelReply{} }
746 func (*IPMrouteAddDelReply) GetMessageName() string { return "ip_mroute_add_del_reply" }
747 func (*IPMrouteAddDelReply) GetCrcString() string   { return "1992deab" }
748 func (*IPMrouteAddDelReply) GetMessageType() api.MessageType {
749         return api.ReplyMessage
750 }
751
752 func (m *IPMrouteAddDelReply) Size() int {
753         if m == nil {
754                 return 0
755         }
756         var size int
757         size += 4 // m.Retval
758         size += 4 // m.StatsIndex
759         return size
760 }
761 func (m *IPMrouteAddDelReply) Marshal(b []byte) ([]byte, error) {
762         var buf *codec.Buffer
763         if b == nil {
764                 buf = codec.NewBuffer(make([]byte, m.Size()))
765         } else {
766                 buf = codec.NewBuffer(b)
767         }
768         buf.EncodeUint32(uint32(m.Retval))
769         buf.EncodeUint32(uint32(m.StatsIndex))
770         return buf.Bytes(), nil
771 }
772 func (m *IPMrouteAddDelReply) Unmarshal(b []byte) error {
773         buf := codec.NewBuffer(b)
774         m.Retval = int32(buf.DecodeUint32())
775         m.StatsIndex = buf.DecodeUint32()
776         return nil
777 }
778
779 // IPMrouteDetails defines message 'ip_mroute_details'.
780 type IPMrouteDetails struct {
781         Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
782 }
783
784 func (m *IPMrouteDetails) Reset()               { *m = IPMrouteDetails{} }
785 func (*IPMrouteDetails) GetMessageName() string { return "ip_mroute_details" }
786 func (*IPMrouteDetails) GetCrcString() string   { return "c1cb4b44" }
787 func (*IPMrouteDetails) GetMessageType() api.MessageType {
788         return api.ReplyMessage
789 }
790
791 func (m *IPMrouteDetails) Size() int {
792         if m == nil {
793                 return 0
794         }
795         var size int
796         size += 4      // m.Route.TableID
797         size += 4      // m.Route.EntryFlags
798         size += 4      // m.Route.RpfID
799         size += 1      // m.Route.Prefix.Af
800         size += 2      // m.Route.Prefix.GrpAddressLength
801         size += 1 * 16 // m.Route.Prefix.GrpAddress
802         size += 1 * 16 // m.Route.Prefix.SrcAddress
803         size += 1      // m.Route.NPaths
804         for j2 := 0; j2 < len(m.Route.Paths); j2++ {
805                 var s2 mfib_types.MfibPath
806                 _ = s2
807                 if j2 < len(m.Route.Paths) {
808                         s2 = m.Route.Paths[j2]
809                 }
810                 size += 4      // s2.ItfFlags
811                 size += 4      // s2.Path.SwIfIndex
812                 size += 4      // s2.Path.TableID
813                 size += 4      // s2.Path.RpfID
814                 size += 1      // s2.Path.Weight
815                 size += 1      // s2.Path.Preference
816                 size += 4      // s2.Path.Type
817                 size += 4      // s2.Path.Flags
818                 size += 4      // s2.Path.Proto
819                 size += 1 * 16 // s2.Path.Nh.Address
820                 size += 4      // s2.Path.Nh.ViaLabel
821                 size += 4      // s2.Path.Nh.ObjID
822                 size += 4      // s2.Path.Nh.ClassifyTableIndex
823                 size += 1      // s2.Path.NLabels
824                 for j4 := 0; j4 < 16; j4++ {
825                         var s4 fib_types.FibMplsLabel
826                         _ = s4
827                         if j4 < len(s2.Path.LabelStack) {
828                                 s4 = s2.Path.LabelStack[j4]
829                         }
830                         size += 1 // s4.IsUniform
831                         size += 4 // s4.Label
832                         size += 1 // s4.TTL
833                         size += 1 // s4.Exp
834                 }
835         }
836         return size
837 }
838 func (m *IPMrouteDetails) Marshal(b []byte) ([]byte, error) {
839         var buf *codec.Buffer
840         if b == nil {
841                 buf = codec.NewBuffer(make([]byte, m.Size()))
842         } else {
843                 buf = codec.NewBuffer(b)
844         }
845         buf.EncodeUint32(uint32(m.Route.TableID))
846         buf.EncodeUint32(uint32(m.Route.EntryFlags))
847         buf.EncodeUint32(uint32(m.Route.RpfID))
848         buf.EncodeUint8(uint8(m.Route.Prefix.Af))
849         buf.EncodeUint16(uint16(m.Route.Prefix.GrpAddressLength))
850         buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 0)
851         buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 0)
852         buf.EncodeUint8(uint8(len(m.Route.Paths)))
853         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
854                 var v1 mfib_types.MfibPath
855                 if j1 < len(m.Route.Paths) {
856                         v1 = m.Route.Paths[j1]
857                 }
858                 buf.EncodeUint32(uint32(v1.ItfFlags))
859                 buf.EncodeUint32(uint32(v1.Path.SwIfIndex))
860                 buf.EncodeUint32(uint32(v1.Path.TableID))
861                 buf.EncodeUint32(uint32(v1.Path.RpfID))
862                 buf.EncodeUint8(uint8(v1.Path.Weight))
863                 buf.EncodeUint8(uint8(v1.Path.Preference))
864                 buf.EncodeUint32(uint32(v1.Path.Type))
865                 buf.EncodeUint32(uint32(v1.Path.Flags))
866                 buf.EncodeUint32(uint32(v1.Path.Proto))
867                 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 0)
868                 buf.EncodeUint32(uint32(v1.Path.Nh.ViaLabel))
869                 buf.EncodeUint32(uint32(v1.Path.Nh.ObjID))
870                 buf.EncodeUint32(uint32(v1.Path.Nh.ClassifyTableIndex))
871                 buf.EncodeUint8(uint8(v1.Path.NLabels))
872                 for j3 := 0; j3 < 16; j3++ {
873                         var v3 fib_types.FibMplsLabel
874                         if j3 < len(v1.Path.LabelStack) {
875                                 v3 = v1.Path.LabelStack[j3]
876                         }
877                         buf.EncodeUint8(uint8(v3.IsUniform))
878                         buf.EncodeUint32(uint32(v3.Label))
879                         buf.EncodeUint8(uint8(v3.TTL))
880                         buf.EncodeUint8(uint8(v3.Exp))
881                 }
882         }
883         return buf.Bytes(), nil
884 }
885 func (m *IPMrouteDetails) Unmarshal(b []byte) error {
886         buf := codec.NewBuffer(b)
887         m.Route.TableID = buf.DecodeUint32()
888         m.Route.EntryFlags = buf.DecodeUint32()
889         m.Route.RpfID = buf.DecodeUint32()
890         m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
891         m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
892         copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
893         copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
894         m.Route.NPaths = buf.DecodeUint8()
895         m.Route.Paths = make([]mfib_types.MfibPath, int(m.Route.NPaths))
896         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
897                 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
898                 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
899                 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
900                 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
901                 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
902                 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
903                 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32())
904                 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32())
905                 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
906                 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
907                 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
908                 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
909                 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
910                 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
911                 for j3 := 0; j3 < 16; j3++ {
912                         m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
913                         m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
914                         m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
915                         m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
916                 }
917         }
918         return nil
919 }
920
921 // IPMrouteDump defines message 'ip_mroute_dump'.
922 type IPMrouteDump struct {
923         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
924 }
925
926 func (m *IPMrouteDump) Reset()               { *m = IPMrouteDump{} }
927 func (*IPMrouteDump) GetMessageName() string { return "ip_mroute_dump" }
928 func (*IPMrouteDump) GetCrcString() string   { return "b9d2e09e" }
929 func (*IPMrouteDump) GetMessageType() api.MessageType {
930         return api.RequestMessage
931 }
932
933 func (m *IPMrouteDump) Size() int {
934         if m == nil {
935                 return 0
936         }
937         var size int
938         size += 4  // m.Table.TableID
939         size += 1  // m.Table.IsIP6
940         size += 64 // m.Table.Name
941         return size
942 }
943 func (m *IPMrouteDump) Marshal(b []byte) ([]byte, error) {
944         var buf *codec.Buffer
945         if b == nil {
946                 buf = codec.NewBuffer(make([]byte, m.Size()))
947         } else {
948                 buf = codec.NewBuffer(b)
949         }
950         buf.EncodeUint32(uint32(m.Table.TableID))
951         buf.EncodeBool(m.Table.IsIP6)
952         buf.EncodeString(m.Table.Name, 64)
953         return buf.Bytes(), nil
954 }
955 func (m *IPMrouteDump) Unmarshal(b []byte) error {
956         buf := codec.NewBuffer(b)
957         m.Table.TableID = buf.DecodeUint32()
958         m.Table.IsIP6 = buf.DecodeBool()
959         m.Table.Name = buf.DecodeString(64)
960         return nil
961 }
962
963 // IPMtableDetails defines message 'ip_mtable_details'.
964 type IPMtableDetails struct {
965         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
966 }
967
968 func (m *IPMtableDetails) Reset()               { *m = IPMtableDetails{} }
969 func (*IPMtableDetails) GetMessageName() string { return "ip_mtable_details" }
970 func (*IPMtableDetails) GetCrcString() string   { return "b9d2e09e" }
971 func (*IPMtableDetails) GetMessageType() api.MessageType {
972         return api.RequestMessage
973 }
974
975 func (m *IPMtableDetails) Size() int {
976         if m == nil {
977                 return 0
978         }
979         var size int
980         size += 4  // m.Table.TableID
981         size += 1  // m.Table.IsIP6
982         size += 64 // m.Table.Name
983         return size
984 }
985 func (m *IPMtableDetails) Marshal(b []byte) ([]byte, error) {
986         var buf *codec.Buffer
987         if b == nil {
988                 buf = codec.NewBuffer(make([]byte, m.Size()))
989         } else {
990                 buf = codec.NewBuffer(b)
991         }
992         buf.EncodeUint32(uint32(m.Table.TableID))
993         buf.EncodeBool(m.Table.IsIP6)
994         buf.EncodeString(m.Table.Name, 64)
995         return buf.Bytes(), nil
996 }
997 func (m *IPMtableDetails) Unmarshal(b []byte) error {
998         buf := codec.NewBuffer(b)
999         m.Table.TableID = buf.DecodeUint32()
1000         m.Table.IsIP6 = buf.DecodeBool()
1001         m.Table.Name = buf.DecodeString(64)
1002         return nil
1003 }
1004
1005 // IPMtableDump defines message 'ip_mtable_dump'.
1006 type IPMtableDump struct{}
1007
1008 func (m *IPMtableDump) Reset()               { *m = IPMtableDump{} }
1009 func (*IPMtableDump) GetMessageName() string { return "ip_mtable_dump" }
1010 func (*IPMtableDump) GetCrcString() string   { return "51077d14" }
1011 func (*IPMtableDump) GetMessageType() api.MessageType {
1012         return api.RequestMessage
1013 }
1014
1015 func (m *IPMtableDump) Size() int {
1016         if m == nil {
1017                 return 0
1018         }
1019         var size int
1020         return size
1021 }
1022 func (m *IPMtableDump) Marshal(b []byte) ([]byte, error) {
1023         var buf *codec.Buffer
1024         if b == nil {
1025                 buf = codec.NewBuffer(make([]byte, m.Size()))
1026         } else {
1027                 buf = codec.NewBuffer(b)
1028         }
1029         return buf.Bytes(), nil
1030 }
1031 func (m *IPMtableDump) Unmarshal(b []byte) error {
1032         return nil
1033 }
1034
1035 // IPPuntPolice defines message 'ip_punt_police'.
1036 type IPPuntPolice struct {
1037         PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"`
1038         IsAdd        bool   `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1039         IsIP6        bool   `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1040 }
1041
1042 func (m *IPPuntPolice) Reset()               { *m = IPPuntPolice{} }
1043 func (*IPPuntPolice) GetMessageName() string { return "ip_punt_police" }
1044 func (*IPPuntPolice) GetCrcString() string   { return "db867cea" }
1045 func (*IPPuntPolice) GetMessageType() api.MessageType {
1046         return api.RequestMessage
1047 }
1048
1049 func (m *IPPuntPolice) Size() int {
1050         if m == nil {
1051                 return 0
1052         }
1053         var size int
1054         size += 4 // m.PolicerIndex
1055         size += 1 // m.IsAdd
1056         size += 1 // m.IsIP6
1057         return size
1058 }
1059 func (m *IPPuntPolice) Marshal(b []byte) ([]byte, error) {
1060         var buf *codec.Buffer
1061         if b == nil {
1062                 buf = codec.NewBuffer(make([]byte, m.Size()))
1063         } else {
1064                 buf = codec.NewBuffer(b)
1065         }
1066         buf.EncodeUint32(uint32(m.PolicerIndex))
1067         buf.EncodeBool(m.IsAdd)
1068         buf.EncodeBool(m.IsIP6)
1069         return buf.Bytes(), nil
1070 }
1071 func (m *IPPuntPolice) Unmarshal(b []byte) error {
1072         buf := codec.NewBuffer(b)
1073         m.PolicerIndex = buf.DecodeUint32()
1074         m.IsAdd = buf.DecodeBool()
1075         m.IsIP6 = buf.DecodeBool()
1076         return nil
1077 }
1078
1079 // IPPuntPoliceReply defines message 'ip_punt_police_reply'.
1080 type IPPuntPoliceReply struct {
1081         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1082 }
1083
1084 func (m *IPPuntPoliceReply) Reset()               { *m = IPPuntPoliceReply{} }
1085 func (*IPPuntPoliceReply) GetMessageName() string { return "ip_punt_police_reply" }
1086 func (*IPPuntPoliceReply) GetCrcString() string   { return "e8d4e804" }
1087 func (*IPPuntPoliceReply) GetMessageType() api.MessageType {
1088         return api.ReplyMessage
1089 }
1090
1091 func (m *IPPuntPoliceReply) Size() int {
1092         if m == nil {
1093                 return 0
1094         }
1095         var size int
1096         size += 4 // m.Retval
1097         return size
1098 }
1099 func (m *IPPuntPoliceReply) Marshal(b []byte) ([]byte, error) {
1100         var buf *codec.Buffer
1101         if b == nil {
1102                 buf = codec.NewBuffer(make([]byte, m.Size()))
1103         } else {
1104                 buf = codec.NewBuffer(b)
1105         }
1106         buf.EncodeUint32(uint32(m.Retval))
1107         return buf.Bytes(), nil
1108 }
1109 func (m *IPPuntPoliceReply) Unmarshal(b []byte) error {
1110         buf := codec.NewBuffer(b)
1111         m.Retval = int32(buf.DecodeUint32())
1112         return nil
1113 }
1114
1115 // IPPuntRedirect defines message 'ip_punt_redirect'.
1116 type IPPuntRedirect struct {
1117         Punt  PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
1118         IsAdd bool         `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1119 }
1120
1121 func (m *IPPuntRedirect) Reset()               { *m = IPPuntRedirect{} }
1122 func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" }
1123 func (*IPPuntRedirect) GetCrcString() string   { return "a9a5592c" }
1124 func (*IPPuntRedirect) GetMessageType() api.MessageType {
1125         return api.RequestMessage
1126 }
1127
1128 func (m *IPPuntRedirect) Size() int {
1129         if m == nil {
1130                 return 0
1131         }
1132         var size int
1133         size += 4      // m.Punt.RxSwIfIndex
1134         size += 4      // m.Punt.TxSwIfIndex
1135         size += 1      // m.Punt.Nh.Af
1136         size += 1 * 16 // m.Punt.Nh.Un
1137         size += 1      // m.IsAdd
1138         return size
1139 }
1140 func (m *IPPuntRedirect) Marshal(b []byte) ([]byte, error) {
1141         var buf *codec.Buffer
1142         if b == nil {
1143                 buf = codec.NewBuffer(make([]byte, m.Size()))
1144         } else {
1145                 buf = codec.NewBuffer(b)
1146         }
1147         buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1148         buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
1149         buf.EncodeUint8(uint8(m.Punt.Nh.Af))
1150         buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 0)
1151         buf.EncodeBool(m.IsAdd)
1152         return buf.Bytes(), nil
1153 }
1154 func (m *IPPuntRedirect) Unmarshal(b []byte) error {
1155         buf := codec.NewBuffer(b)
1156         m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1157         m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1158         m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1159         copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1160         m.IsAdd = buf.DecodeBool()
1161         return nil
1162 }
1163
1164 // IPPuntRedirectDetails defines message 'ip_punt_redirect_details'.
1165 type IPPuntRedirectDetails struct {
1166         Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
1167 }
1168
1169 func (m *IPPuntRedirectDetails) Reset()               { *m = IPPuntRedirectDetails{} }
1170 func (*IPPuntRedirectDetails) GetMessageName() string { return "ip_punt_redirect_details" }
1171 func (*IPPuntRedirectDetails) GetCrcString() string   { return "3924f5d3" }
1172 func (*IPPuntRedirectDetails) GetMessageType() api.MessageType {
1173         return api.ReplyMessage
1174 }
1175
1176 func (m *IPPuntRedirectDetails) Size() int {
1177         if m == nil {
1178                 return 0
1179         }
1180         var size int
1181         size += 4      // m.Punt.RxSwIfIndex
1182         size += 4      // m.Punt.TxSwIfIndex
1183         size += 1      // m.Punt.Nh.Af
1184         size += 1 * 16 // m.Punt.Nh.Un
1185         return size
1186 }
1187 func (m *IPPuntRedirectDetails) Marshal(b []byte) ([]byte, error) {
1188         var buf *codec.Buffer
1189         if b == nil {
1190                 buf = codec.NewBuffer(make([]byte, m.Size()))
1191         } else {
1192                 buf = codec.NewBuffer(b)
1193         }
1194         buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1195         buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
1196         buf.EncodeUint8(uint8(m.Punt.Nh.Af))
1197         buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 0)
1198         return buf.Bytes(), nil
1199 }
1200 func (m *IPPuntRedirectDetails) Unmarshal(b []byte) error {
1201         buf := codec.NewBuffer(b)
1202         m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1203         m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1204         m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1205         copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1206         return nil
1207 }
1208
1209 // IPPuntRedirectDump defines message 'ip_punt_redirect_dump'.
1210 type IPPuntRedirectDump struct {
1211         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1212         IsIPv6    bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
1213 }
1214
1215 func (m *IPPuntRedirectDump) Reset()               { *m = IPPuntRedirectDump{} }
1216 func (*IPPuntRedirectDump) GetMessageName() string { return "ip_punt_redirect_dump" }
1217 func (*IPPuntRedirectDump) GetCrcString() string   { return "2d033de4" }
1218 func (*IPPuntRedirectDump) GetMessageType() api.MessageType {
1219         return api.RequestMessage
1220 }
1221
1222 func (m *IPPuntRedirectDump) Size() int {
1223         if m == nil {
1224                 return 0
1225         }
1226         var size int
1227         size += 4 // m.SwIfIndex
1228         size += 1 // m.IsIPv6
1229         return size
1230 }
1231 func (m *IPPuntRedirectDump) Marshal(b []byte) ([]byte, error) {
1232         var buf *codec.Buffer
1233         if b == nil {
1234                 buf = codec.NewBuffer(make([]byte, m.Size()))
1235         } else {
1236                 buf = codec.NewBuffer(b)
1237         }
1238         buf.EncodeUint32(uint32(m.SwIfIndex))
1239         buf.EncodeBool(m.IsIPv6)
1240         return buf.Bytes(), nil
1241 }
1242 func (m *IPPuntRedirectDump) Unmarshal(b []byte) error {
1243         buf := codec.NewBuffer(b)
1244         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1245         m.IsIPv6 = buf.DecodeBool()
1246         return nil
1247 }
1248
1249 // IPPuntRedirectReply defines message 'ip_punt_redirect_reply'.
1250 type IPPuntRedirectReply struct {
1251         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1252 }
1253
1254 func (m *IPPuntRedirectReply) Reset()               { *m = IPPuntRedirectReply{} }
1255 func (*IPPuntRedirectReply) GetMessageName() string { return "ip_punt_redirect_reply" }
1256 func (*IPPuntRedirectReply) GetCrcString() string   { return "e8d4e804" }
1257 func (*IPPuntRedirectReply) GetMessageType() api.MessageType {
1258         return api.ReplyMessage
1259 }
1260
1261 func (m *IPPuntRedirectReply) Size() int {
1262         if m == nil {
1263                 return 0
1264         }
1265         var size int
1266         size += 4 // m.Retval
1267         return size
1268 }
1269 func (m *IPPuntRedirectReply) Marshal(b []byte) ([]byte, error) {
1270         var buf *codec.Buffer
1271         if b == nil {
1272                 buf = codec.NewBuffer(make([]byte, m.Size()))
1273         } else {
1274                 buf = codec.NewBuffer(b)
1275         }
1276         buf.EncodeUint32(uint32(m.Retval))
1277         return buf.Bytes(), nil
1278 }
1279 func (m *IPPuntRedirectReply) Unmarshal(b []byte) error {
1280         buf := codec.NewBuffer(b)
1281         m.Retval = int32(buf.DecodeUint32())
1282         return nil
1283 }
1284
1285 // IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'.
1286 type IPReassemblyEnableDisable struct {
1287         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1288         EnableIP4 bool                           `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"`
1289         EnableIP6 bool                           `binapi:"bool,name=enable_ip6" json:"enable_ip6,omitempty"`
1290         Type      IPReassType                    `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1291 }
1292
1293 func (m *IPReassemblyEnableDisable) Reset()               { *m = IPReassemblyEnableDisable{} }
1294 func (*IPReassemblyEnableDisable) GetMessageName() string { return "ip_reassembly_enable_disable" }
1295 func (*IPReassemblyEnableDisable) GetCrcString() string   { return "885c85a6" }
1296 func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType {
1297         return api.RequestMessage
1298 }
1299
1300 func (m *IPReassemblyEnableDisable) Size() int {
1301         if m == nil {
1302                 return 0
1303         }
1304         var size int
1305         size += 4 // m.SwIfIndex
1306         size += 1 // m.EnableIP4
1307         size += 1 // m.EnableIP6
1308         size += 4 // m.Type
1309         return size
1310 }
1311 func (m *IPReassemblyEnableDisable) Marshal(b []byte) ([]byte, error) {
1312         var buf *codec.Buffer
1313         if b == nil {
1314                 buf = codec.NewBuffer(make([]byte, m.Size()))
1315         } else {
1316                 buf = codec.NewBuffer(b)
1317         }
1318         buf.EncodeUint32(uint32(m.SwIfIndex))
1319         buf.EncodeBool(m.EnableIP4)
1320         buf.EncodeBool(m.EnableIP6)
1321         buf.EncodeUint32(uint32(m.Type))
1322         return buf.Bytes(), nil
1323 }
1324 func (m *IPReassemblyEnableDisable) Unmarshal(b []byte) error {
1325         buf := codec.NewBuffer(b)
1326         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1327         m.EnableIP4 = buf.DecodeBool()
1328         m.EnableIP6 = buf.DecodeBool()
1329         m.Type = IPReassType(buf.DecodeUint32())
1330         return nil
1331 }
1332
1333 // IPReassemblyEnableDisableReply defines message 'ip_reassembly_enable_disable_reply'.
1334 type IPReassemblyEnableDisableReply struct {
1335         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1336 }
1337
1338 func (m *IPReassemblyEnableDisableReply) Reset() { *m = IPReassemblyEnableDisableReply{} }
1339 func (*IPReassemblyEnableDisableReply) GetMessageName() string {
1340         return "ip_reassembly_enable_disable_reply"
1341 }
1342 func (*IPReassemblyEnableDisableReply) GetCrcString() string { return "e8d4e804" }
1343 func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType {
1344         return api.ReplyMessage
1345 }
1346
1347 func (m *IPReassemblyEnableDisableReply) Size() int {
1348         if m == nil {
1349                 return 0
1350         }
1351         var size int
1352         size += 4 // m.Retval
1353         return size
1354 }
1355 func (m *IPReassemblyEnableDisableReply) Marshal(b []byte) ([]byte, error) {
1356         var buf *codec.Buffer
1357         if b == nil {
1358                 buf = codec.NewBuffer(make([]byte, m.Size()))
1359         } else {
1360                 buf = codec.NewBuffer(b)
1361         }
1362         buf.EncodeUint32(uint32(m.Retval))
1363         return buf.Bytes(), nil
1364 }
1365 func (m *IPReassemblyEnableDisableReply) Unmarshal(b []byte) error {
1366         buf := codec.NewBuffer(b)
1367         m.Retval = int32(buf.DecodeUint32())
1368         return nil
1369 }
1370
1371 // IPReassemblyGet defines message 'ip_reassembly_get'.
1372 type IPReassemblyGet struct {
1373         IsIP6 bool        `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1374         Type  IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1375 }
1376
1377 func (m *IPReassemblyGet) Reset()               { *m = IPReassemblyGet{} }
1378 func (*IPReassemblyGet) GetMessageName() string { return "ip_reassembly_get" }
1379 func (*IPReassemblyGet) GetCrcString() string   { return "ea13ff63" }
1380 func (*IPReassemblyGet) GetMessageType() api.MessageType {
1381         return api.RequestMessage
1382 }
1383
1384 func (m *IPReassemblyGet) Size() int {
1385         if m == nil {
1386                 return 0
1387         }
1388         var size int
1389         size += 1 // m.IsIP6
1390         size += 4 // m.Type
1391         return size
1392 }
1393 func (m *IPReassemblyGet) Marshal(b []byte) ([]byte, error) {
1394         var buf *codec.Buffer
1395         if b == nil {
1396                 buf = codec.NewBuffer(make([]byte, m.Size()))
1397         } else {
1398                 buf = codec.NewBuffer(b)
1399         }
1400         buf.EncodeBool(m.IsIP6)
1401         buf.EncodeUint32(uint32(m.Type))
1402         return buf.Bytes(), nil
1403 }
1404 func (m *IPReassemblyGet) Unmarshal(b []byte) error {
1405         buf := codec.NewBuffer(b)
1406         m.IsIP6 = buf.DecodeBool()
1407         m.Type = IPReassType(buf.DecodeUint32())
1408         return nil
1409 }
1410
1411 // IPReassemblyGetReply defines message 'ip_reassembly_get_reply'.
1412 type IPReassemblyGetReply struct {
1413         Retval               int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
1414         TimeoutMs            uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
1415         MaxReassemblies      uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
1416         MaxReassemblyLength  uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
1417         ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
1418         IsIP6                bool   `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1419 }
1420
1421 func (m *IPReassemblyGetReply) Reset()               { *m = IPReassemblyGetReply{} }
1422 func (*IPReassemblyGetReply) GetMessageName() string { return "ip_reassembly_get_reply" }
1423 func (*IPReassemblyGetReply) GetCrcString() string   { return "d5eb8d34" }
1424 func (*IPReassemblyGetReply) GetMessageType() api.MessageType {
1425         return api.ReplyMessage
1426 }
1427
1428 func (m *IPReassemblyGetReply) Size() int {
1429         if m == nil {
1430                 return 0
1431         }
1432         var size int
1433         size += 4 // m.Retval
1434         size += 4 // m.TimeoutMs
1435         size += 4 // m.MaxReassemblies
1436         size += 4 // m.MaxReassemblyLength
1437         size += 4 // m.ExpireWalkIntervalMs
1438         size += 1 // m.IsIP6
1439         return size
1440 }
1441 func (m *IPReassemblyGetReply) Marshal(b []byte) ([]byte, error) {
1442         var buf *codec.Buffer
1443         if b == nil {
1444                 buf = codec.NewBuffer(make([]byte, m.Size()))
1445         } else {
1446                 buf = codec.NewBuffer(b)
1447         }
1448         buf.EncodeUint32(uint32(m.Retval))
1449         buf.EncodeUint32(uint32(m.TimeoutMs))
1450         buf.EncodeUint32(uint32(m.MaxReassemblies))
1451         buf.EncodeUint32(uint32(m.MaxReassemblyLength))
1452         buf.EncodeUint32(uint32(m.ExpireWalkIntervalMs))
1453         buf.EncodeBool(m.IsIP6)
1454         return buf.Bytes(), nil
1455 }
1456 func (m *IPReassemblyGetReply) Unmarshal(b []byte) error {
1457         buf := codec.NewBuffer(b)
1458         m.Retval = int32(buf.DecodeUint32())
1459         m.TimeoutMs = buf.DecodeUint32()
1460         m.MaxReassemblies = buf.DecodeUint32()
1461         m.MaxReassemblyLength = buf.DecodeUint32()
1462         m.ExpireWalkIntervalMs = buf.DecodeUint32()
1463         m.IsIP6 = buf.DecodeBool()
1464         return nil
1465 }
1466
1467 // IPReassemblySet defines message 'ip_reassembly_set'.
1468 type IPReassemblySet struct {
1469         TimeoutMs            uint32      `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
1470         MaxReassemblies      uint32      `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
1471         MaxReassemblyLength  uint32      `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
1472         ExpireWalkIntervalMs uint32      `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
1473         IsIP6                bool        `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1474         Type                 IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1475 }
1476
1477 func (m *IPReassemblySet) Reset()               { *m = IPReassemblySet{} }
1478 func (*IPReassemblySet) GetMessageName() string { return "ip_reassembly_set" }
1479 func (*IPReassemblySet) GetCrcString() string   { return "16467d25" }
1480 func (*IPReassemblySet) GetMessageType() api.MessageType {
1481         return api.RequestMessage
1482 }
1483
1484 func (m *IPReassemblySet) Size() int {
1485         if m == nil {
1486                 return 0
1487         }
1488         var size int
1489         size += 4 // m.TimeoutMs
1490         size += 4 // m.MaxReassemblies
1491         size += 4 // m.MaxReassemblyLength
1492         size += 4 // m.ExpireWalkIntervalMs
1493         size += 1 // m.IsIP6
1494         size += 4 // m.Type
1495         return size
1496 }
1497 func (m *IPReassemblySet) Marshal(b []byte) ([]byte, error) {
1498         var buf *codec.Buffer
1499         if b == nil {
1500                 buf = codec.NewBuffer(make([]byte, m.Size()))
1501         } else {
1502                 buf = codec.NewBuffer(b)
1503         }
1504         buf.EncodeUint32(uint32(m.TimeoutMs))
1505         buf.EncodeUint32(uint32(m.MaxReassemblies))
1506         buf.EncodeUint32(uint32(m.MaxReassemblyLength))
1507         buf.EncodeUint32(uint32(m.ExpireWalkIntervalMs))
1508         buf.EncodeBool(m.IsIP6)
1509         buf.EncodeUint32(uint32(m.Type))
1510         return buf.Bytes(), nil
1511 }
1512 func (m *IPReassemblySet) Unmarshal(b []byte) error {
1513         buf := codec.NewBuffer(b)
1514         m.TimeoutMs = buf.DecodeUint32()
1515         m.MaxReassemblies = buf.DecodeUint32()
1516         m.MaxReassemblyLength = buf.DecodeUint32()
1517         m.ExpireWalkIntervalMs = buf.DecodeUint32()
1518         m.IsIP6 = buf.DecodeBool()
1519         m.Type = IPReassType(buf.DecodeUint32())
1520         return nil
1521 }
1522
1523 // IPReassemblySetReply defines message 'ip_reassembly_set_reply'.
1524 type IPReassemblySetReply struct {
1525         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1526 }
1527
1528 func (m *IPReassemblySetReply) Reset()               { *m = IPReassemblySetReply{} }
1529 func (*IPReassemblySetReply) GetMessageName() string { return "ip_reassembly_set_reply" }
1530 func (*IPReassemblySetReply) GetCrcString() string   { return "e8d4e804" }
1531 func (*IPReassemblySetReply) GetMessageType() api.MessageType {
1532         return api.ReplyMessage
1533 }
1534
1535 func (m *IPReassemblySetReply) Size() int {
1536         if m == nil {
1537                 return 0
1538         }
1539         var size int
1540         size += 4 // m.Retval
1541         return size
1542 }
1543 func (m *IPReassemblySetReply) Marshal(b []byte) ([]byte, error) {
1544         var buf *codec.Buffer
1545         if b == nil {
1546                 buf = codec.NewBuffer(make([]byte, m.Size()))
1547         } else {
1548                 buf = codec.NewBuffer(b)
1549         }
1550         buf.EncodeUint32(uint32(m.Retval))
1551         return buf.Bytes(), nil
1552 }
1553 func (m *IPReassemblySetReply) Unmarshal(b []byte) error {
1554         buf := codec.NewBuffer(b)
1555         m.Retval = int32(buf.DecodeUint32())
1556         return nil
1557 }
1558
1559 // IPRouteAddDel defines message 'ip_route_add_del'.
1560 type IPRouteAddDel struct {
1561         IsAdd       bool    `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1562         IsMultipath bool    `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
1563         Route       IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
1564 }
1565
1566 func (m *IPRouteAddDel) Reset()               { *m = IPRouteAddDel{} }
1567 func (*IPRouteAddDel) GetMessageName() string { return "ip_route_add_del" }
1568 func (*IPRouteAddDel) GetCrcString() string   { return "c1ff832d" }
1569 func (*IPRouteAddDel) GetMessageType() api.MessageType {
1570         return api.RequestMessage
1571 }
1572
1573 func (m *IPRouteAddDel) Size() int {
1574         if m == nil {
1575                 return 0
1576         }
1577         var size int
1578         size += 1      // m.IsAdd
1579         size += 1      // m.IsMultipath
1580         size += 4      // m.Route.TableID
1581         size += 4      // m.Route.StatsIndex
1582         size += 1      // m.Route.Prefix.Address.Af
1583         size += 1 * 16 // m.Route.Prefix.Address.Un
1584         size += 1      // m.Route.Prefix.Len
1585         size += 1      // m.Route.NPaths
1586         for j2 := 0; j2 < len(m.Route.Paths); j2++ {
1587                 var s2 fib_types.FibPath
1588                 _ = s2
1589                 if j2 < len(m.Route.Paths) {
1590                         s2 = m.Route.Paths[j2]
1591                 }
1592                 size += 4      // s2.SwIfIndex
1593                 size += 4      // s2.TableID
1594                 size += 4      // s2.RpfID
1595                 size += 1      // s2.Weight
1596                 size += 1      // s2.Preference
1597                 size += 4      // s2.Type
1598                 size += 4      // s2.Flags
1599                 size += 4      // s2.Proto
1600                 size += 1 * 16 // s2.Nh.Address
1601                 size += 4      // s2.Nh.ViaLabel
1602                 size += 4      // s2.Nh.ObjID
1603                 size += 4      // s2.Nh.ClassifyTableIndex
1604                 size += 1      // s2.NLabels
1605                 for j3 := 0; j3 < 16; j3++ {
1606                         var s3 fib_types.FibMplsLabel
1607                         _ = s3
1608                         if j3 < len(s2.LabelStack) {
1609                                 s3 = s2.LabelStack[j3]
1610                         }
1611                         size += 1 // s3.IsUniform
1612                         size += 4 // s3.Label
1613                         size += 1 // s3.TTL
1614                         size += 1 // s3.Exp
1615                 }
1616         }
1617         return size
1618 }
1619 func (m *IPRouteAddDel) Marshal(b []byte) ([]byte, error) {
1620         var buf *codec.Buffer
1621         if b == nil {
1622                 buf = codec.NewBuffer(make([]byte, m.Size()))
1623         } else {
1624                 buf = codec.NewBuffer(b)
1625         }
1626         buf.EncodeBool(m.IsAdd)
1627         buf.EncodeBool(m.IsMultipath)
1628         buf.EncodeUint32(uint32(m.Route.TableID))
1629         buf.EncodeUint32(uint32(m.Route.StatsIndex))
1630         buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
1631         buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 0)
1632         buf.EncodeUint8(uint8(m.Route.Prefix.Len))
1633         buf.EncodeUint8(uint8(len(m.Route.Paths)))
1634         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1635                 var v1 fib_types.FibPath
1636                 if j1 < len(m.Route.Paths) {
1637                         v1 = m.Route.Paths[j1]
1638                 }
1639                 buf.EncodeUint32(uint32(v1.SwIfIndex))
1640                 buf.EncodeUint32(uint32(v1.TableID))
1641                 buf.EncodeUint32(uint32(v1.RpfID))
1642                 buf.EncodeUint8(uint8(v1.Weight))
1643                 buf.EncodeUint8(uint8(v1.Preference))
1644                 buf.EncodeUint32(uint32(v1.Type))
1645                 buf.EncodeUint32(uint32(v1.Flags))
1646                 buf.EncodeUint32(uint32(v1.Proto))
1647                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
1648                 buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
1649                 buf.EncodeUint32(uint32(v1.Nh.ObjID))
1650                 buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
1651                 buf.EncodeUint8(uint8(v1.NLabels))
1652                 for j2 := 0; j2 < 16; j2++ {
1653                         var v2 fib_types.FibMplsLabel
1654                         if j2 < len(v1.LabelStack) {
1655                                 v2 = v1.LabelStack[j2]
1656                         }
1657                         buf.EncodeUint8(uint8(v2.IsUniform))
1658                         buf.EncodeUint32(uint32(v2.Label))
1659                         buf.EncodeUint8(uint8(v2.TTL))
1660                         buf.EncodeUint8(uint8(v2.Exp))
1661                 }
1662         }
1663         return buf.Bytes(), nil
1664 }
1665 func (m *IPRouteAddDel) Unmarshal(b []byte) error {
1666         buf := codec.NewBuffer(b)
1667         m.IsAdd = buf.DecodeBool()
1668         m.IsMultipath = buf.DecodeBool()
1669         m.Route.TableID = buf.DecodeUint32()
1670         m.Route.StatsIndex = buf.DecodeUint32()
1671         m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1672         copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1673         m.Route.Prefix.Len = buf.DecodeUint8()
1674         m.Route.NPaths = buf.DecodeUint8()
1675         m.Route.Paths = make([]fib_types.FibPath, int(m.Route.NPaths))
1676         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1677                 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
1678                 m.Route.Paths[j1].TableID = buf.DecodeUint32()
1679                 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
1680                 m.Route.Paths[j1].Weight = buf.DecodeUint8()
1681                 m.Route.Paths[j1].Preference = buf.DecodeUint8()
1682                 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
1683                 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1684                 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1685                 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1686                 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
1687                 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
1688                 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
1689                 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
1690                 for j2 := 0; j2 < 16; j2++ {
1691                         m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
1692                         m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
1693                         m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
1694                         m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1695                 }
1696         }
1697         return nil
1698 }
1699
1700 // IPRouteAddDelReply defines message 'ip_route_add_del_reply'.
1701 type IPRouteAddDelReply struct {
1702         Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
1703         StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
1704 }
1705
1706 func (m *IPRouteAddDelReply) Reset()               { *m = IPRouteAddDelReply{} }
1707 func (*IPRouteAddDelReply) GetMessageName() string { return "ip_route_add_del_reply" }
1708 func (*IPRouteAddDelReply) GetCrcString() string   { return "1992deab" }
1709 func (*IPRouteAddDelReply) GetMessageType() api.MessageType {
1710         return api.ReplyMessage
1711 }
1712
1713 func (m *IPRouteAddDelReply) Size() int {
1714         if m == nil {
1715                 return 0
1716         }
1717         var size int
1718         size += 4 // m.Retval
1719         size += 4 // m.StatsIndex
1720         return size
1721 }
1722 func (m *IPRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
1723         var buf *codec.Buffer
1724         if b == nil {
1725                 buf = codec.NewBuffer(make([]byte, m.Size()))
1726         } else {
1727                 buf = codec.NewBuffer(b)
1728         }
1729         buf.EncodeUint32(uint32(m.Retval))
1730         buf.EncodeUint32(uint32(m.StatsIndex))
1731         return buf.Bytes(), nil
1732 }
1733 func (m *IPRouteAddDelReply) Unmarshal(b []byte) error {
1734         buf := codec.NewBuffer(b)
1735         m.Retval = int32(buf.DecodeUint32())
1736         m.StatsIndex = buf.DecodeUint32()
1737         return nil
1738 }
1739
1740 // IPRouteDetails defines message 'ip_route_details'.
1741 type IPRouteDetails struct {
1742         Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
1743 }
1744
1745 func (m *IPRouteDetails) Reset()               { *m = IPRouteDetails{} }
1746 func (*IPRouteDetails) GetMessageName() string { return "ip_route_details" }
1747 func (*IPRouteDetails) GetCrcString() string   { return "d1ffaae1" }
1748 func (*IPRouteDetails) GetMessageType() api.MessageType {
1749         return api.ReplyMessage
1750 }
1751
1752 func (m *IPRouteDetails) Size() int {
1753         if m == nil {
1754                 return 0
1755         }
1756         var size int
1757         size += 4      // m.Route.TableID
1758         size += 4      // m.Route.StatsIndex
1759         size += 1      // m.Route.Prefix.Address.Af
1760         size += 1 * 16 // m.Route.Prefix.Address.Un
1761         size += 1      // m.Route.Prefix.Len
1762         size += 1      // m.Route.NPaths
1763         for j2 := 0; j2 < len(m.Route.Paths); j2++ {
1764                 var s2 fib_types.FibPath
1765                 _ = s2
1766                 if j2 < len(m.Route.Paths) {
1767                         s2 = m.Route.Paths[j2]
1768                 }
1769                 size += 4      // s2.SwIfIndex
1770                 size += 4      // s2.TableID
1771                 size += 4      // s2.RpfID
1772                 size += 1      // s2.Weight
1773                 size += 1      // s2.Preference
1774                 size += 4      // s2.Type
1775                 size += 4      // s2.Flags
1776                 size += 4      // s2.Proto
1777                 size += 1 * 16 // s2.Nh.Address
1778                 size += 4      // s2.Nh.ViaLabel
1779                 size += 4      // s2.Nh.ObjID
1780                 size += 4      // s2.Nh.ClassifyTableIndex
1781                 size += 1      // s2.NLabels
1782                 for j3 := 0; j3 < 16; j3++ {
1783                         var s3 fib_types.FibMplsLabel
1784                         _ = s3
1785                         if j3 < len(s2.LabelStack) {
1786                                 s3 = s2.LabelStack[j3]
1787                         }
1788                         size += 1 // s3.IsUniform
1789                         size += 4 // s3.Label
1790                         size += 1 // s3.TTL
1791                         size += 1 // s3.Exp
1792                 }
1793         }
1794         return size
1795 }
1796 func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) {
1797         var buf *codec.Buffer
1798         if b == nil {
1799                 buf = codec.NewBuffer(make([]byte, m.Size()))
1800         } else {
1801                 buf = codec.NewBuffer(b)
1802         }
1803         buf.EncodeUint32(uint32(m.Route.TableID))
1804         buf.EncodeUint32(uint32(m.Route.StatsIndex))
1805         buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
1806         buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 0)
1807         buf.EncodeUint8(uint8(m.Route.Prefix.Len))
1808         buf.EncodeUint8(uint8(len(m.Route.Paths)))
1809         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1810                 var v1 fib_types.FibPath
1811                 if j1 < len(m.Route.Paths) {
1812                         v1 = m.Route.Paths[j1]
1813                 }
1814                 buf.EncodeUint32(uint32(v1.SwIfIndex))
1815                 buf.EncodeUint32(uint32(v1.TableID))
1816                 buf.EncodeUint32(uint32(v1.RpfID))
1817                 buf.EncodeUint8(uint8(v1.Weight))
1818                 buf.EncodeUint8(uint8(v1.Preference))
1819                 buf.EncodeUint32(uint32(v1.Type))
1820                 buf.EncodeUint32(uint32(v1.Flags))
1821                 buf.EncodeUint32(uint32(v1.Proto))
1822                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
1823                 buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
1824                 buf.EncodeUint32(uint32(v1.Nh.ObjID))
1825                 buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
1826                 buf.EncodeUint8(uint8(v1.NLabels))
1827                 for j2 := 0; j2 < 16; j2++ {
1828                         var v2 fib_types.FibMplsLabel
1829                         if j2 < len(v1.LabelStack) {
1830                                 v2 = v1.LabelStack[j2]
1831                         }
1832                         buf.EncodeUint8(uint8(v2.IsUniform))
1833                         buf.EncodeUint32(uint32(v2.Label))
1834                         buf.EncodeUint8(uint8(v2.TTL))
1835                         buf.EncodeUint8(uint8(v2.Exp))
1836                 }
1837         }
1838         return buf.Bytes(), nil
1839 }
1840 func (m *IPRouteDetails) Unmarshal(b []byte) error {
1841         buf := codec.NewBuffer(b)
1842         m.Route.TableID = buf.DecodeUint32()
1843         m.Route.StatsIndex = buf.DecodeUint32()
1844         m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1845         copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1846         m.Route.Prefix.Len = buf.DecodeUint8()
1847         m.Route.NPaths = buf.DecodeUint8()
1848         m.Route.Paths = make([]fib_types.FibPath, int(m.Route.NPaths))
1849         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1850                 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
1851                 m.Route.Paths[j1].TableID = buf.DecodeUint32()
1852                 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
1853                 m.Route.Paths[j1].Weight = buf.DecodeUint8()
1854                 m.Route.Paths[j1].Preference = buf.DecodeUint8()
1855                 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
1856                 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1857                 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1858                 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1859                 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
1860                 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
1861                 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
1862                 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
1863                 for j2 := 0; j2 < 16; j2++ {
1864                         m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
1865                         m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
1866                         m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
1867                         m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1868                 }
1869         }
1870         return nil
1871 }
1872
1873 // IPRouteDump defines message 'ip_route_dump'.
1874 type IPRouteDump struct {
1875         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
1876 }
1877
1878 func (m *IPRouteDump) Reset()               { *m = IPRouteDump{} }
1879 func (*IPRouteDump) GetMessageName() string { return "ip_route_dump" }
1880 func (*IPRouteDump) GetCrcString() string   { return "b9d2e09e" }
1881 func (*IPRouteDump) GetMessageType() api.MessageType {
1882         return api.RequestMessage
1883 }
1884
1885 func (m *IPRouteDump) Size() int {
1886         if m == nil {
1887                 return 0
1888         }
1889         var size int
1890         size += 4  // m.Table.TableID
1891         size += 1  // m.Table.IsIP6
1892         size += 64 // m.Table.Name
1893         return size
1894 }
1895 func (m *IPRouteDump) Marshal(b []byte) ([]byte, error) {
1896         var buf *codec.Buffer
1897         if b == nil {
1898                 buf = codec.NewBuffer(make([]byte, m.Size()))
1899         } else {
1900                 buf = codec.NewBuffer(b)
1901         }
1902         buf.EncodeUint32(uint32(m.Table.TableID))
1903         buf.EncodeBool(m.Table.IsIP6)
1904         buf.EncodeString(m.Table.Name, 64)
1905         return buf.Bytes(), nil
1906 }
1907 func (m *IPRouteDump) Unmarshal(b []byte) error {
1908         buf := codec.NewBuffer(b)
1909         m.Table.TableID = buf.DecodeUint32()
1910         m.Table.IsIP6 = buf.DecodeBool()
1911         m.Table.Name = buf.DecodeString(64)
1912         return nil
1913 }
1914
1915 // IPRouteLookup defines message 'ip_route_lookup'.
1916 type IPRouteLookup struct {
1917         TableID uint32          `binapi:"u32,name=table_id" json:"table_id,omitempty"`
1918         Exact   uint8           `binapi:"u8,name=exact" json:"exact,omitempty"`
1919         Prefix  ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
1920 }
1921
1922 func (m *IPRouteLookup) Reset()               { *m = IPRouteLookup{} }
1923 func (*IPRouteLookup) GetMessageName() string { return "ip_route_lookup" }
1924 func (*IPRouteLookup) GetCrcString() string   { return "e2986185" }
1925 func (*IPRouteLookup) GetMessageType() api.MessageType {
1926         return api.RequestMessage
1927 }
1928
1929 func (m *IPRouteLookup) Size() int {
1930         if m == nil {
1931                 return 0
1932         }
1933         var size int
1934         size += 4      // m.TableID
1935         size += 1      // m.Exact
1936         size += 1      // m.Prefix.Address.Af
1937         size += 1 * 16 // m.Prefix.Address.Un
1938         size += 1      // m.Prefix.Len
1939         return size
1940 }
1941 func (m *IPRouteLookup) Marshal(b []byte) ([]byte, error) {
1942         var buf *codec.Buffer
1943         if b == nil {
1944                 buf = codec.NewBuffer(make([]byte, m.Size()))
1945         } else {
1946                 buf = codec.NewBuffer(b)
1947         }
1948         buf.EncodeUint32(uint32(m.TableID))
1949         buf.EncodeUint8(uint8(m.Exact))
1950         buf.EncodeUint8(uint8(m.Prefix.Address.Af))
1951         buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 0)
1952         buf.EncodeUint8(uint8(m.Prefix.Len))
1953         return buf.Bytes(), nil
1954 }
1955 func (m *IPRouteLookup) Unmarshal(b []byte) error {
1956         buf := codec.NewBuffer(b)
1957         m.TableID = buf.DecodeUint32()
1958         m.Exact = buf.DecodeUint8()
1959         m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1960         copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1961         m.Prefix.Len = buf.DecodeUint8()
1962         return nil
1963 }
1964
1965 // IPRouteLookupReply defines message 'ip_route_lookup_reply'.
1966 type IPRouteLookupReply struct {
1967         Retval int32   `binapi:"i32,name=retval" json:"retval,omitempty"`
1968         Route  IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
1969 }
1970
1971 func (m *IPRouteLookupReply) Reset()               { *m = IPRouteLookupReply{} }
1972 func (*IPRouteLookupReply) GetMessageName() string { return "ip_route_lookup_reply" }
1973 func (*IPRouteLookupReply) GetCrcString() string   { return "ae99de8e" }
1974 func (*IPRouteLookupReply) GetMessageType() api.MessageType {
1975         return api.ReplyMessage
1976 }
1977
1978 func (m *IPRouteLookupReply) Size() int {
1979         if m == nil {
1980                 return 0
1981         }
1982         var size int
1983         size += 4      // m.Retval
1984         size += 4      // m.Route.TableID
1985         size += 4      // m.Route.StatsIndex
1986         size += 1      // m.Route.Prefix.Address.Af
1987         size += 1 * 16 // m.Route.Prefix.Address.Un
1988         size += 1      // m.Route.Prefix.Len
1989         size += 1      // m.Route.NPaths
1990         for j2 := 0; j2 < len(m.Route.Paths); j2++ {
1991                 var s2 fib_types.FibPath
1992                 _ = s2
1993                 if j2 < len(m.Route.Paths) {
1994                         s2 = m.Route.Paths[j2]
1995                 }
1996                 size += 4      // s2.SwIfIndex
1997                 size += 4      // s2.TableID
1998                 size += 4      // s2.RpfID
1999                 size += 1      // s2.Weight
2000                 size += 1      // s2.Preference
2001                 size += 4      // s2.Type
2002                 size += 4      // s2.Flags
2003                 size += 4      // s2.Proto
2004                 size += 1 * 16 // s2.Nh.Address
2005                 size += 4      // s2.Nh.ViaLabel
2006                 size += 4      // s2.Nh.ObjID
2007                 size += 4      // s2.Nh.ClassifyTableIndex
2008                 size += 1      // s2.NLabels
2009                 for j3 := 0; j3 < 16; j3++ {
2010                         var s3 fib_types.FibMplsLabel
2011                         _ = s3
2012                         if j3 < len(s2.LabelStack) {
2013                                 s3 = s2.LabelStack[j3]
2014                         }
2015                         size += 1 // s3.IsUniform
2016                         size += 4 // s3.Label
2017                         size += 1 // s3.TTL
2018                         size += 1 // s3.Exp
2019                 }
2020         }
2021         return size
2022 }
2023 func (m *IPRouteLookupReply) Marshal(b []byte) ([]byte, error) {
2024         var buf *codec.Buffer
2025         if b == nil {
2026                 buf = codec.NewBuffer(make([]byte, m.Size()))
2027         } else {
2028                 buf = codec.NewBuffer(b)
2029         }
2030         buf.EncodeUint32(uint32(m.Retval))
2031         buf.EncodeUint32(uint32(m.Route.TableID))
2032         buf.EncodeUint32(uint32(m.Route.StatsIndex))
2033         buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2034         buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 0)
2035         buf.EncodeUint8(uint8(m.Route.Prefix.Len))
2036         buf.EncodeUint8(uint8(len(m.Route.Paths)))
2037         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2038                 var v1 fib_types.FibPath
2039                 if j1 < len(m.Route.Paths) {
2040                         v1 = m.Route.Paths[j1]
2041                 }
2042                 buf.EncodeUint32(uint32(v1.SwIfIndex))
2043                 buf.EncodeUint32(uint32(v1.TableID))
2044                 buf.EncodeUint32(uint32(v1.RpfID))
2045                 buf.EncodeUint8(uint8(v1.Weight))
2046                 buf.EncodeUint8(uint8(v1.Preference))
2047                 buf.EncodeUint32(uint32(v1.Type))
2048                 buf.EncodeUint32(uint32(v1.Flags))
2049                 buf.EncodeUint32(uint32(v1.Proto))
2050                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
2051                 buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
2052                 buf.EncodeUint32(uint32(v1.Nh.ObjID))
2053                 buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
2054                 buf.EncodeUint8(uint8(v1.NLabels))
2055                 for j2 := 0; j2 < 16; j2++ {
2056                         var v2 fib_types.FibMplsLabel
2057                         if j2 < len(v1.LabelStack) {
2058                                 v2 = v1.LabelStack[j2]
2059                         }
2060                         buf.EncodeUint8(uint8(v2.IsUniform))
2061                         buf.EncodeUint32(uint32(v2.Label))
2062                         buf.EncodeUint8(uint8(v2.TTL))
2063                         buf.EncodeUint8(uint8(v2.Exp))
2064                 }
2065         }
2066         return buf.Bytes(), nil
2067 }
2068 func (m *IPRouteLookupReply) Unmarshal(b []byte) error {
2069         buf := codec.NewBuffer(b)
2070         m.Retval = int32(buf.DecodeUint32())
2071         m.Route.TableID = buf.DecodeUint32()
2072         m.Route.StatsIndex = buf.DecodeUint32()
2073         m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2074         copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2075         m.Route.Prefix.Len = buf.DecodeUint8()
2076         m.Route.NPaths = buf.DecodeUint8()
2077         m.Route.Paths = make([]fib_types.FibPath, int(m.Route.NPaths))
2078         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2079                 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2080                 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2081                 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2082                 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2083                 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2084                 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2085                 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2086                 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2087                 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2088                 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2089                 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2090                 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2091                 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2092                 for j2 := 0; j2 < 16; j2++ {
2093                         m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2094                         m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2095                         m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2096                         m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2097                 }
2098         }
2099         return nil
2100 }
2101
2102 // IPSourceAndPortRangeCheckAddDel defines message 'ip_source_and_port_range_check_add_del'.
2103 type IPSourceAndPortRangeCheckAddDel struct {
2104         IsAdd          bool            `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2105         Prefix         ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
2106         NumberOfRanges uint8           `binapi:"u8,name=number_of_ranges" json:"number_of_ranges,omitempty"`
2107         LowPorts       []uint16        `binapi:"u16[32],name=low_ports" json:"low_ports,omitempty"`
2108         HighPorts      []uint16        `binapi:"u16[32],name=high_ports" json:"high_ports,omitempty"`
2109         VrfID          uint32          `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2110 }
2111
2112 func (m *IPSourceAndPortRangeCheckAddDel) Reset() { *m = IPSourceAndPortRangeCheckAddDel{} }
2113 func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string {
2114         return "ip_source_and_port_range_check_add_del"
2115 }
2116 func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "8bfc76f2" }
2117 func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType {
2118         return api.RequestMessage
2119 }
2120
2121 func (m *IPSourceAndPortRangeCheckAddDel) Size() int {
2122         if m == nil {
2123                 return 0
2124         }
2125         var size int
2126         size += 1      // m.IsAdd
2127         size += 1      // m.Prefix.Address.Af
2128         size += 1 * 16 // m.Prefix.Address.Un
2129         size += 1      // m.Prefix.Len
2130         size += 1      // m.NumberOfRanges
2131         size += 2 * 32 // m.LowPorts
2132         size += 2 * 32 // m.HighPorts
2133         size += 4      // m.VrfID
2134         return size
2135 }
2136 func (m *IPSourceAndPortRangeCheckAddDel) Marshal(b []byte) ([]byte, error) {
2137         var buf *codec.Buffer
2138         if b == nil {
2139                 buf = codec.NewBuffer(make([]byte, m.Size()))
2140         } else {
2141                 buf = codec.NewBuffer(b)
2142         }
2143         buf.EncodeBool(m.IsAdd)
2144         buf.EncodeUint8(uint8(m.Prefix.Address.Af))
2145         buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 0)
2146         buf.EncodeUint8(uint8(m.Prefix.Len))
2147         buf.EncodeUint8(uint8(m.NumberOfRanges))
2148         for i := 0; i < 32; i++ {
2149                 var x uint16
2150                 if i < len(m.LowPorts) {
2151                         x = uint16(m.LowPorts[i])
2152                 }
2153                 buf.EncodeUint16(uint16(x))
2154         }
2155         for i := 0; i < 32; i++ {
2156                 var x uint16
2157                 if i < len(m.HighPorts) {
2158                         x = uint16(m.HighPorts[i])
2159                 }
2160                 buf.EncodeUint16(uint16(x))
2161         }
2162         buf.EncodeUint32(uint32(m.VrfID))
2163         return buf.Bytes(), nil
2164 }
2165 func (m *IPSourceAndPortRangeCheckAddDel) Unmarshal(b []byte) error {
2166         buf := codec.NewBuffer(b)
2167         m.IsAdd = buf.DecodeBool()
2168         m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2169         copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2170         m.Prefix.Len = buf.DecodeUint8()
2171         m.NumberOfRanges = buf.DecodeUint8()
2172         m.LowPorts = make([]uint16, 32)
2173         for i := 0; i < len(m.LowPorts); i++ {
2174                 m.LowPorts[i] = buf.DecodeUint16()
2175         }
2176         m.HighPorts = make([]uint16, 32)
2177         for i := 0; i < len(m.HighPorts); i++ {
2178                 m.HighPorts[i] = buf.DecodeUint16()
2179         }
2180         m.VrfID = buf.DecodeUint32()
2181         return nil
2182 }
2183
2184 // IPSourceAndPortRangeCheckAddDelReply defines message 'ip_source_and_port_range_check_add_del_reply'.
2185 type IPSourceAndPortRangeCheckAddDelReply struct {
2186         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2187 }
2188
2189 func (m *IPSourceAndPortRangeCheckAddDelReply) Reset() { *m = IPSourceAndPortRangeCheckAddDelReply{} }
2190 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string {
2191         return "ip_source_and_port_range_check_add_del_reply"
2192 }
2193 func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { return "e8d4e804" }
2194 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType {
2195         return api.ReplyMessage
2196 }
2197
2198 func (m *IPSourceAndPortRangeCheckAddDelReply) Size() int {
2199         if m == nil {
2200                 return 0
2201         }
2202         var size int
2203         size += 4 // m.Retval
2204         return size
2205 }
2206 func (m *IPSourceAndPortRangeCheckAddDelReply) Marshal(b []byte) ([]byte, error) {
2207         var buf *codec.Buffer
2208         if b == nil {
2209                 buf = codec.NewBuffer(make([]byte, m.Size()))
2210         } else {
2211                 buf = codec.NewBuffer(b)
2212         }
2213         buf.EncodeUint32(uint32(m.Retval))
2214         return buf.Bytes(), nil
2215 }
2216 func (m *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(b []byte) error {
2217         buf := codec.NewBuffer(b)
2218         m.Retval = int32(buf.DecodeUint32())
2219         return nil
2220 }
2221
2222 // IPSourceAndPortRangeCheckInterfaceAddDel defines message 'ip_source_and_port_range_check_interface_add_del'.
2223 type IPSourceAndPortRangeCheckInterfaceAddDel struct {
2224         IsAdd       bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2225         SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2226         TCPInVrfID  uint32                         `binapi:"u32,name=tcp_in_vrf_id" json:"tcp_in_vrf_id,omitempty"`
2227         TCPOutVrfID uint32                         `binapi:"u32,name=tcp_out_vrf_id" json:"tcp_out_vrf_id,omitempty"`
2228         UDPInVrfID  uint32                         `binapi:"u32,name=udp_in_vrf_id" json:"udp_in_vrf_id,omitempty"`
2229         UDPOutVrfID uint32                         `binapi:"u32,name=udp_out_vrf_id" json:"udp_out_vrf_id,omitempty"`
2230 }
2231
2232 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Reset() {
2233         *m = IPSourceAndPortRangeCheckInterfaceAddDel{}
2234 }
2235 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string {
2236         return "ip_source_and_port_range_check_interface_add_del"
2237 }
2238 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { return "e1ba8987" }
2239 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType {
2240         return api.RequestMessage
2241 }
2242
2243 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() int {
2244         if m == nil {
2245                 return 0
2246         }
2247         var size int
2248         size += 1 // m.IsAdd
2249         size += 4 // m.SwIfIndex
2250         size += 4 // m.TCPInVrfID
2251         size += 4 // m.TCPOutVrfID
2252         size += 4 // m.UDPInVrfID
2253         size += 4 // m.UDPOutVrfID
2254         return size
2255 }
2256 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
2257         var buf *codec.Buffer
2258         if b == nil {
2259                 buf = codec.NewBuffer(make([]byte, m.Size()))
2260         } else {
2261                 buf = codec.NewBuffer(b)
2262         }
2263         buf.EncodeBool(m.IsAdd)
2264         buf.EncodeUint32(uint32(m.SwIfIndex))
2265         buf.EncodeUint32(uint32(m.TCPInVrfID))
2266         buf.EncodeUint32(uint32(m.TCPOutVrfID))
2267         buf.EncodeUint32(uint32(m.UDPInVrfID))
2268         buf.EncodeUint32(uint32(m.UDPOutVrfID))
2269         return buf.Bytes(), nil
2270 }
2271 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Unmarshal(b []byte) error {
2272         buf := codec.NewBuffer(b)
2273         m.IsAdd = buf.DecodeBool()
2274         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2275         m.TCPInVrfID = buf.DecodeUint32()
2276         m.TCPOutVrfID = buf.DecodeUint32()
2277         m.UDPInVrfID = buf.DecodeUint32()
2278         m.UDPOutVrfID = buf.DecodeUint32()
2279         return nil
2280 }
2281
2282 // IPSourceAndPortRangeCheckInterfaceAddDelReply defines message 'ip_source_and_port_range_check_interface_add_del_reply'.
2283 type IPSourceAndPortRangeCheckInterfaceAddDelReply struct {
2284         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2285 }
2286
2287 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Reset() {
2288         *m = IPSourceAndPortRangeCheckInterfaceAddDelReply{}
2289 }
2290 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string {
2291         return "ip_source_and_port_range_check_interface_add_del_reply"
2292 }
2293 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
2294 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType {
2295         return api.ReplyMessage
2296 }
2297
2298 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Size() int {
2299         if m == nil {
2300                 return 0
2301         }
2302         var size int
2303         size += 4 // m.Retval
2304         return size
2305 }
2306 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
2307         var buf *codec.Buffer
2308         if b == nil {
2309                 buf = codec.NewBuffer(make([]byte, m.Size()))
2310         } else {
2311                 buf = codec.NewBuffer(b)
2312         }
2313         buf.EncodeUint32(uint32(m.Retval))
2314         return buf.Bytes(), nil
2315 }
2316 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(b []byte) error {
2317         buf := codec.NewBuffer(b)
2318         m.Retval = int32(buf.DecodeUint32())
2319         return nil
2320 }
2321
2322 // IPTableAddDel defines message 'ip_table_add_del'.
2323 type IPTableAddDel struct {
2324         IsAdd bool    `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2325         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2326 }
2327
2328 func (m *IPTableAddDel) Reset()               { *m = IPTableAddDel{} }
2329 func (*IPTableAddDel) GetMessageName() string { return "ip_table_add_del" }
2330 func (*IPTableAddDel) GetCrcString() string   { return "0ffdaec0" }
2331 func (*IPTableAddDel) GetMessageType() api.MessageType {
2332         return api.RequestMessage
2333 }
2334
2335 func (m *IPTableAddDel) Size() int {
2336         if m == nil {
2337                 return 0
2338         }
2339         var size int
2340         size += 1  // m.IsAdd
2341         size += 4  // m.Table.TableID
2342         size += 1  // m.Table.IsIP6
2343         size += 64 // m.Table.Name
2344         return size
2345 }
2346 func (m *IPTableAddDel) Marshal(b []byte) ([]byte, error) {
2347         var buf *codec.Buffer
2348         if b == nil {
2349                 buf = codec.NewBuffer(make([]byte, m.Size()))
2350         } else {
2351                 buf = codec.NewBuffer(b)
2352         }
2353         buf.EncodeBool(m.IsAdd)
2354         buf.EncodeUint32(uint32(m.Table.TableID))
2355         buf.EncodeBool(m.Table.IsIP6)
2356         buf.EncodeString(m.Table.Name, 64)
2357         return buf.Bytes(), nil
2358 }
2359 func (m *IPTableAddDel) Unmarshal(b []byte) error {
2360         buf := codec.NewBuffer(b)
2361         m.IsAdd = buf.DecodeBool()
2362         m.Table.TableID = buf.DecodeUint32()
2363         m.Table.IsIP6 = buf.DecodeBool()
2364         m.Table.Name = buf.DecodeString(64)
2365         return nil
2366 }
2367
2368 // IPTableAddDelReply defines message 'ip_table_add_del_reply'.
2369 type IPTableAddDelReply struct {
2370         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2371 }
2372
2373 func (m *IPTableAddDelReply) Reset()               { *m = IPTableAddDelReply{} }
2374 func (*IPTableAddDelReply) GetMessageName() string { return "ip_table_add_del_reply" }
2375 func (*IPTableAddDelReply) GetCrcString() string   { return "e8d4e804" }
2376 func (*IPTableAddDelReply) GetMessageType() api.MessageType {
2377         return api.ReplyMessage
2378 }
2379
2380 func (m *IPTableAddDelReply) Size() int {
2381         if m == nil {
2382                 return 0
2383         }
2384         var size int
2385         size += 4 // m.Retval
2386         return size
2387 }
2388 func (m *IPTableAddDelReply) Marshal(b []byte) ([]byte, error) {
2389         var buf *codec.Buffer
2390         if b == nil {
2391                 buf = codec.NewBuffer(make([]byte, m.Size()))
2392         } else {
2393                 buf = codec.NewBuffer(b)
2394         }
2395         buf.EncodeUint32(uint32(m.Retval))
2396         return buf.Bytes(), nil
2397 }
2398 func (m *IPTableAddDelReply) Unmarshal(b []byte) error {
2399         buf := codec.NewBuffer(b)
2400         m.Retval = int32(buf.DecodeUint32())
2401         return nil
2402 }
2403
2404 // IPTableDetails defines message 'ip_table_details'.
2405 type IPTableDetails struct {
2406         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2407 }
2408
2409 func (m *IPTableDetails) Reset()               { *m = IPTableDetails{} }
2410 func (*IPTableDetails) GetMessageName() string { return "ip_table_details" }
2411 func (*IPTableDetails) GetCrcString() string   { return "c79fca0f" }
2412 func (*IPTableDetails) GetMessageType() api.MessageType {
2413         return api.ReplyMessage
2414 }
2415
2416 func (m *IPTableDetails) Size() int {
2417         if m == nil {
2418                 return 0
2419         }
2420         var size int
2421         size += 4  // m.Table.TableID
2422         size += 1  // m.Table.IsIP6
2423         size += 64 // m.Table.Name
2424         return size
2425 }
2426 func (m *IPTableDetails) Marshal(b []byte) ([]byte, error) {
2427         var buf *codec.Buffer
2428         if b == nil {
2429                 buf = codec.NewBuffer(make([]byte, m.Size()))
2430         } else {
2431                 buf = codec.NewBuffer(b)
2432         }
2433         buf.EncodeUint32(uint32(m.Table.TableID))
2434         buf.EncodeBool(m.Table.IsIP6)
2435         buf.EncodeString(m.Table.Name, 64)
2436         return buf.Bytes(), nil
2437 }
2438 func (m *IPTableDetails) Unmarshal(b []byte) error {
2439         buf := codec.NewBuffer(b)
2440         m.Table.TableID = buf.DecodeUint32()
2441         m.Table.IsIP6 = buf.DecodeBool()
2442         m.Table.Name = buf.DecodeString(64)
2443         return nil
2444 }
2445
2446 // IPTableDump defines message 'ip_table_dump'.
2447 type IPTableDump struct{}
2448
2449 func (m *IPTableDump) Reset()               { *m = IPTableDump{} }
2450 func (*IPTableDump) GetMessageName() string { return "ip_table_dump" }
2451 func (*IPTableDump) GetCrcString() string   { return "51077d14" }
2452 func (*IPTableDump) GetMessageType() api.MessageType {
2453         return api.RequestMessage
2454 }
2455
2456 func (m *IPTableDump) Size() int {
2457         if m == nil {
2458                 return 0
2459         }
2460         var size int
2461         return size
2462 }
2463 func (m *IPTableDump) Marshal(b []byte) ([]byte, error) {
2464         var buf *codec.Buffer
2465         if b == nil {
2466                 buf = codec.NewBuffer(make([]byte, m.Size()))
2467         } else {
2468                 buf = codec.NewBuffer(b)
2469         }
2470         return buf.Bytes(), nil
2471 }
2472 func (m *IPTableDump) Unmarshal(b []byte) error {
2473         return nil
2474 }
2475
2476 // IPTableFlush defines message 'ip_table_flush'.
2477 type IPTableFlush struct {
2478         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2479 }
2480
2481 func (m *IPTableFlush) Reset()               { *m = IPTableFlush{} }
2482 func (*IPTableFlush) GetMessageName() string { return "ip_table_flush" }
2483 func (*IPTableFlush) GetCrcString() string   { return "b9d2e09e" }
2484 func (*IPTableFlush) GetMessageType() api.MessageType {
2485         return api.RequestMessage
2486 }
2487
2488 func (m *IPTableFlush) Size() int {
2489         if m == nil {
2490                 return 0
2491         }
2492         var size int
2493         size += 4  // m.Table.TableID
2494         size += 1  // m.Table.IsIP6
2495         size += 64 // m.Table.Name
2496         return size
2497 }
2498 func (m *IPTableFlush) Marshal(b []byte) ([]byte, error) {
2499         var buf *codec.Buffer
2500         if b == nil {
2501                 buf = codec.NewBuffer(make([]byte, m.Size()))
2502         } else {
2503                 buf = codec.NewBuffer(b)
2504         }
2505         buf.EncodeUint32(uint32(m.Table.TableID))
2506         buf.EncodeBool(m.Table.IsIP6)
2507         buf.EncodeString(m.Table.Name, 64)
2508         return buf.Bytes(), nil
2509 }
2510 func (m *IPTableFlush) Unmarshal(b []byte) error {
2511         buf := codec.NewBuffer(b)
2512         m.Table.TableID = buf.DecodeUint32()
2513         m.Table.IsIP6 = buf.DecodeBool()
2514         m.Table.Name = buf.DecodeString(64)
2515         return nil
2516 }
2517
2518 // IPTableFlushReply defines message 'ip_table_flush_reply'.
2519 type IPTableFlushReply struct {
2520         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2521 }
2522
2523 func (m *IPTableFlushReply) Reset()               { *m = IPTableFlushReply{} }
2524 func (*IPTableFlushReply) GetMessageName() string { return "ip_table_flush_reply" }
2525 func (*IPTableFlushReply) GetCrcString() string   { return "e8d4e804" }
2526 func (*IPTableFlushReply) GetMessageType() api.MessageType {
2527         return api.ReplyMessage
2528 }
2529
2530 func (m *IPTableFlushReply) Size() int {
2531         if m == nil {
2532                 return 0
2533         }
2534         var size int
2535         size += 4 // m.Retval
2536         return size
2537 }
2538 func (m *IPTableFlushReply) Marshal(b []byte) ([]byte, error) {
2539         var buf *codec.Buffer
2540         if b == nil {
2541                 buf = codec.NewBuffer(make([]byte, m.Size()))
2542         } else {
2543                 buf = codec.NewBuffer(b)
2544         }
2545         buf.EncodeUint32(uint32(m.Retval))
2546         return buf.Bytes(), nil
2547 }
2548 func (m *IPTableFlushReply) Unmarshal(b []byte) error {
2549         buf := codec.NewBuffer(b)
2550         m.Retval = int32(buf.DecodeUint32())
2551         return nil
2552 }
2553
2554 // IPTableReplaceBegin defines message 'ip_table_replace_begin'.
2555 type IPTableReplaceBegin struct {
2556         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2557 }
2558
2559 func (m *IPTableReplaceBegin) Reset()               { *m = IPTableReplaceBegin{} }
2560 func (*IPTableReplaceBegin) GetMessageName() string { return "ip_table_replace_begin" }
2561 func (*IPTableReplaceBegin) GetCrcString() string   { return "b9d2e09e" }
2562 func (*IPTableReplaceBegin) GetMessageType() api.MessageType {
2563         return api.RequestMessage
2564 }
2565
2566 func (m *IPTableReplaceBegin) Size() int {
2567         if m == nil {
2568                 return 0
2569         }
2570         var size int
2571         size += 4  // m.Table.TableID
2572         size += 1  // m.Table.IsIP6
2573         size += 64 // m.Table.Name
2574         return size
2575 }
2576 func (m *IPTableReplaceBegin) Marshal(b []byte) ([]byte, error) {
2577         var buf *codec.Buffer
2578         if b == nil {
2579                 buf = codec.NewBuffer(make([]byte, m.Size()))
2580         } else {
2581                 buf = codec.NewBuffer(b)
2582         }
2583         buf.EncodeUint32(uint32(m.Table.TableID))
2584         buf.EncodeBool(m.Table.IsIP6)
2585         buf.EncodeString(m.Table.Name, 64)
2586         return buf.Bytes(), nil
2587 }
2588 func (m *IPTableReplaceBegin) Unmarshal(b []byte) error {
2589         buf := codec.NewBuffer(b)
2590         m.Table.TableID = buf.DecodeUint32()
2591         m.Table.IsIP6 = buf.DecodeBool()
2592         m.Table.Name = buf.DecodeString(64)
2593         return nil
2594 }
2595
2596 // IPTableReplaceBeginReply defines message 'ip_table_replace_begin_reply'.
2597 type IPTableReplaceBeginReply struct {
2598         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2599 }
2600
2601 func (m *IPTableReplaceBeginReply) Reset()               { *m = IPTableReplaceBeginReply{} }
2602 func (*IPTableReplaceBeginReply) GetMessageName() string { return "ip_table_replace_begin_reply" }
2603 func (*IPTableReplaceBeginReply) GetCrcString() string   { return "e8d4e804" }
2604 func (*IPTableReplaceBeginReply) GetMessageType() api.MessageType {
2605         return api.ReplyMessage
2606 }
2607
2608 func (m *IPTableReplaceBeginReply) Size() int {
2609         if m == nil {
2610                 return 0
2611         }
2612         var size int
2613         size += 4 // m.Retval
2614         return size
2615 }
2616 func (m *IPTableReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
2617         var buf *codec.Buffer
2618         if b == nil {
2619                 buf = codec.NewBuffer(make([]byte, m.Size()))
2620         } else {
2621                 buf = codec.NewBuffer(b)
2622         }
2623         buf.EncodeUint32(uint32(m.Retval))
2624         return buf.Bytes(), nil
2625 }
2626 func (m *IPTableReplaceBeginReply) Unmarshal(b []byte) error {
2627         buf := codec.NewBuffer(b)
2628         m.Retval = int32(buf.DecodeUint32())
2629         return nil
2630 }
2631
2632 // IPTableReplaceEnd defines message 'ip_table_replace_end'.
2633 type IPTableReplaceEnd struct {
2634         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2635 }
2636
2637 func (m *IPTableReplaceEnd) Reset()               { *m = IPTableReplaceEnd{} }
2638 func (*IPTableReplaceEnd) GetMessageName() string { return "ip_table_replace_end" }
2639 func (*IPTableReplaceEnd) GetCrcString() string   { return "b9d2e09e" }
2640 func (*IPTableReplaceEnd) GetMessageType() api.MessageType {
2641         return api.RequestMessage
2642 }
2643
2644 func (m *IPTableReplaceEnd) Size() int {
2645         if m == nil {
2646                 return 0
2647         }
2648         var size int
2649         size += 4  // m.Table.TableID
2650         size += 1  // m.Table.IsIP6
2651         size += 64 // m.Table.Name
2652         return size
2653 }
2654 func (m *IPTableReplaceEnd) Marshal(b []byte) ([]byte, error) {
2655         var buf *codec.Buffer
2656         if b == nil {
2657                 buf = codec.NewBuffer(make([]byte, m.Size()))
2658         } else {
2659                 buf = codec.NewBuffer(b)
2660         }
2661         buf.EncodeUint32(uint32(m.Table.TableID))
2662         buf.EncodeBool(m.Table.IsIP6)
2663         buf.EncodeString(m.Table.Name, 64)
2664         return buf.Bytes(), nil
2665 }
2666 func (m *IPTableReplaceEnd) Unmarshal(b []byte) error {
2667         buf := codec.NewBuffer(b)
2668         m.Table.TableID = buf.DecodeUint32()
2669         m.Table.IsIP6 = buf.DecodeBool()
2670         m.Table.Name = buf.DecodeString(64)
2671         return nil
2672 }
2673
2674 // IPTableReplaceEndReply defines message 'ip_table_replace_end_reply'.
2675 type IPTableReplaceEndReply struct {
2676         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2677 }
2678
2679 func (m *IPTableReplaceEndReply) Reset()               { *m = IPTableReplaceEndReply{} }
2680 func (*IPTableReplaceEndReply) GetMessageName() string { return "ip_table_replace_end_reply" }
2681 func (*IPTableReplaceEndReply) GetCrcString() string   { return "e8d4e804" }
2682 func (*IPTableReplaceEndReply) GetMessageType() api.MessageType {
2683         return api.ReplyMessage
2684 }
2685
2686 func (m *IPTableReplaceEndReply) Size() int {
2687         if m == nil {
2688                 return 0
2689         }
2690         var size int
2691         size += 4 // m.Retval
2692         return size
2693 }
2694 func (m *IPTableReplaceEndReply) Marshal(b []byte) ([]byte, error) {
2695         var buf *codec.Buffer
2696         if b == nil {
2697                 buf = codec.NewBuffer(make([]byte, m.Size()))
2698         } else {
2699                 buf = codec.NewBuffer(b)
2700         }
2701         buf.EncodeUint32(uint32(m.Retval))
2702         return buf.Bytes(), nil
2703 }
2704 func (m *IPTableReplaceEndReply) Unmarshal(b []byte) error {
2705         buf := codec.NewBuffer(b)
2706         m.Retval = int32(buf.DecodeUint32())
2707         return nil
2708 }
2709
2710 // IPUnnumberedDetails defines message 'ip_unnumbered_details'.
2711 type IPUnnumberedDetails struct {
2712         SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2713         IPSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip_sw_if_index" json:"ip_sw_if_index,omitempty"`
2714 }
2715
2716 func (m *IPUnnumberedDetails) Reset()               { *m = IPUnnumberedDetails{} }
2717 func (*IPUnnumberedDetails) GetMessageName() string { return "ip_unnumbered_details" }
2718 func (*IPUnnumberedDetails) GetCrcString() string   { return "aa12a483" }
2719 func (*IPUnnumberedDetails) GetMessageType() api.MessageType {
2720         return api.ReplyMessage
2721 }
2722
2723 func (m *IPUnnumberedDetails) Size() int {
2724         if m == nil {
2725                 return 0
2726         }
2727         var size int
2728         size += 4 // m.SwIfIndex
2729         size += 4 // m.IPSwIfIndex
2730         return size
2731 }
2732 func (m *IPUnnumberedDetails) Marshal(b []byte) ([]byte, error) {
2733         var buf *codec.Buffer
2734         if b == nil {
2735                 buf = codec.NewBuffer(make([]byte, m.Size()))
2736         } else {
2737                 buf = codec.NewBuffer(b)
2738         }
2739         buf.EncodeUint32(uint32(m.SwIfIndex))
2740         buf.EncodeUint32(uint32(m.IPSwIfIndex))
2741         return buf.Bytes(), nil
2742 }
2743 func (m *IPUnnumberedDetails) Unmarshal(b []byte) error {
2744         buf := codec.NewBuffer(b)
2745         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2746         m.IPSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2747         return nil
2748 }
2749
2750 // IPUnnumberedDump defines message 'ip_unnumbered_dump'.
2751 type IPUnnumberedDump struct {
2752         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=%!s(float64=4.294967295e+09)" json:"sw_if_index,omitempty"`
2753 }
2754
2755 func (m *IPUnnumberedDump) Reset()               { *m = IPUnnumberedDump{} }
2756 func (*IPUnnumberedDump) GetMessageName() string { return "ip_unnumbered_dump" }
2757 func (*IPUnnumberedDump) GetCrcString() string   { return "f9e6675e" }
2758 func (*IPUnnumberedDump) GetMessageType() api.MessageType {
2759         return api.RequestMessage
2760 }
2761
2762 func (m *IPUnnumberedDump) Size() int {
2763         if m == nil {
2764                 return 0
2765         }
2766         var size int
2767         size += 4 // m.SwIfIndex
2768         return size
2769 }
2770 func (m *IPUnnumberedDump) Marshal(b []byte) ([]byte, error) {
2771         var buf *codec.Buffer
2772         if b == nil {
2773                 buf = codec.NewBuffer(make([]byte, m.Size()))
2774         } else {
2775                 buf = codec.NewBuffer(b)
2776         }
2777         buf.EncodeUint32(uint32(m.SwIfIndex))
2778         return buf.Bytes(), nil
2779 }
2780 func (m *IPUnnumberedDump) Unmarshal(b []byte) error {
2781         buf := codec.NewBuffer(b)
2782         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2783         return nil
2784 }
2785
2786 // MfibSignalDetails defines message 'mfib_signal_details'.
2787 type MfibSignalDetails struct {
2788         SwIfIndex    interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2789         TableID      uint32                         `binapi:"u32,name=table_id" json:"table_id,omitempty"`
2790         Prefix       ip_types.Mprefix               `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
2791         IPPacketLen  uint16                         `binapi:"u16,name=ip_packet_len" json:"ip_packet_len,omitempty"`
2792         IPPacketData []byte                         `binapi:"u8[256],name=ip_packet_data" json:"ip_packet_data,omitempty"`
2793 }
2794
2795 func (m *MfibSignalDetails) Reset()               { *m = MfibSignalDetails{} }
2796 func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" }
2797 func (*MfibSignalDetails) GetCrcString() string   { return "64398a9a" }
2798 func (*MfibSignalDetails) GetMessageType() api.MessageType {
2799         return api.ReplyMessage
2800 }
2801
2802 func (m *MfibSignalDetails) Size() int {
2803         if m == nil {
2804                 return 0
2805         }
2806         var size int
2807         size += 4       // m.SwIfIndex
2808         size += 4       // m.TableID
2809         size += 1       // m.Prefix.Af
2810         size += 2       // m.Prefix.GrpAddressLength
2811         size += 1 * 16  // m.Prefix.GrpAddress
2812         size += 1 * 16  // m.Prefix.SrcAddress
2813         size += 2       // m.IPPacketLen
2814         size += 1 * 256 // m.IPPacketData
2815         return size
2816 }
2817 func (m *MfibSignalDetails) Marshal(b []byte) ([]byte, error) {
2818         var buf *codec.Buffer
2819         if b == nil {
2820                 buf = codec.NewBuffer(make([]byte, m.Size()))
2821         } else {
2822                 buf = codec.NewBuffer(b)
2823         }
2824         buf.EncodeUint32(uint32(m.SwIfIndex))
2825         buf.EncodeUint32(uint32(m.TableID))
2826         buf.EncodeUint8(uint8(m.Prefix.Af))
2827         buf.EncodeUint16(uint16(m.Prefix.GrpAddressLength))
2828         buf.EncodeBytes(m.Prefix.GrpAddress.XXX_UnionData[:], 0)
2829         buf.EncodeBytes(m.Prefix.SrcAddress.XXX_UnionData[:], 0)
2830         buf.EncodeUint16(uint16(m.IPPacketLen))
2831         buf.EncodeBytes(m.IPPacketData[:], 256)
2832         return buf.Bytes(), nil
2833 }
2834 func (m *MfibSignalDetails) Unmarshal(b []byte) error {
2835         buf := codec.NewBuffer(b)
2836         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2837         m.TableID = buf.DecodeUint32()
2838         m.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
2839         m.Prefix.GrpAddressLength = buf.DecodeUint16()
2840         copy(m.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
2841         copy(m.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
2842         m.IPPacketLen = buf.DecodeUint16()
2843         copy(m.IPPacketData[:], buf.DecodeBytes(256))
2844         return nil
2845 }
2846
2847 // MfibSignalDump defines message 'mfib_signal_dump'.
2848 type MfibSignalDump struct{}
2849
2850 func (m *MfibSignalDump) Reset()               { *m = MfibSignalDump{} }
2851 func (*MfibSignalDump) GetMessageName() string { return "mfib_signal_dump" }
2852 func (*MfibSignalDump) GetCrcString() string   { return "51077d14" }
2853 func (*MfibSignalDump) GetMessageType() api.MessageType {
2854         return api.RequestMessage
2855 }
2856
2857 func (m *MfibSignalDump) Size() int {
2858         if m == nil {
2859                 return 0
2860         }
2861         var size int
2862         return size
2863 }
2864 func (m *MfibSignalDump) Marshal(b []byte) ([]byte, error) {
2865         var buf *codec.Buffer
2866         if b == nil {
2867                 buf = codec.NewBuffer(make([]byte, m.Size()))
2868         } else {
2869                 buf = codec.NewBuffer(b)
2870         }
2871         return buf.Bytes(), nil
2872 }
2873 func (m *MfibSignalDump) Unmarshal(b []byte) error {
2874         return nil
2875 }
2876
2877 // SetIPFlowHash defines message 'set_ip_flow_hash'.
2878 type SetIPFlowHash struct {
2879         VrfID     uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2880         IsIPv6    bool   `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
2881         Src       bool   `binapi:"bool,name=src" json:"src,omitempty"`
2882         Dst       bool   `binapi:"bool,name=dst" json:"dst,omitempty"`
2883         Sport     bool   `binapi:"bool,name=sport" json:"sport,omitempty"`
2884         Dport     bool   `binapi:"bool,name=dport" json:"dport,omitempty"`
2885         Proto     bool   `binapi:"bool,name=proto" json:"proto,omitempty"`
2886         Reverse   bool   `binapi:"bool,name=reverse" json:"reverse,omitempty"`
2887         Symmetric bool   `binapi:"bool,name=symmetric" json:"symmetric,omitempty"`
2888 }
2889
2890 func (m *SetIPFlowHash) Reset()               { *m = SetIPFlowHash{} }
2891 func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" }
2892 func (*SetIPFlowHash) GetCrcString() string   { return "084ee09e" }
2893 func (*SetIPFlowHash) GetMessageType() api.MessageType {
2894         return api.RequestMessage
2895 }
2896
2897 func (m *SetIPFlowHash) Size() int {
2898         if m == nil {
2899                 return 0
2900         }
2901         var size int
2902         size += 4 // m.VrfID
2903         size += 1 // m.IsIPv6
2904         size += 1 // m.Src
2905         size += 1 // m.Dst
2906         size += 1 // m.Sport
2907         size += 1 // m.Dport
2908         size += 1 // m.Proto
2909         size += 1 // m.Reverse
2910         size += 1 // m.Symmetric
2911         return size
2912 }
2913 func (m *SetIPFlowHash) Marshal(b []byte) ([]byte, error) {
2914         var buf *codec.Buffer
2915         if b == nil {
2916                 buf = codec.NewBuffer(make([]byte, m.Size()))
2917         } else {
2918                 buf = codec.NewBuffer(b)
2919         }
2920         buf.EncodeUint32(uint32(m.VrfID))
2921         buf.EncodeBool(m.IsIPv6)
2922         buf.EncodeBool(m.Src)
2923         buf.EncodeBool(m.Dst)
2924         buf.EncodeBool(m.Sport)
2925         buf.EncodeBool(m.Dport)
2926         buf.EncodeBool(m.Proto)
2927         buf.EncodeBool(m.Reverse)
2928         buf.EncodeBool(m.Symmetric)
2929         return buf.Bytes(), nil
2930 }
2931 func (m *SetIPFlowHash) Unmarshal(b []byte) error {
2932         buf := codec.NewBuffer(b)
2933         m.VrfID = buf.DecodeUint32()
2934         m.IsIPv6 = buf.DecodeBool()
2935         m.Src = buf.DecodeBool()
2936         m.Dst = buf.DecodeBool()
2937         m.Sport = buf.DecodeBool()
2938         m.Dport = buf.DecodeBool()
2939         m.Proto = buf.DecodeBool()
2940         m.Reverse = buf.DecodeBool()
2941         m.Symmetric = buf.DecodeBool()
2942         return nil
2943 }
2944
2945 // SetIPFlowHashReply defines message 'set_ip_flow_hash_reply'.
2946 type SetIPFlowHashReply struct {
2947         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2948 }
2949
2950 func (m *SetIPFlowHashReply) Reset()               { *m = SetIPFlowHashReply{} }
2951 func (*SetIPFlowHashReply) GetMessageName() string { return "set_ip_flow_hash_reply" }
2952 func (*SetIPFlowHashReply) GetCrcString() string   { return "e8d4e804" }
2953 func (*SetIPFlowHashReply) GetMessageType() api.MessageType {
2954         return api.ReplyMessage
2955 }
2956
2957 func (m *SetIPFlowHashReply) Size() int {
2958         if m == nil {
2959                 return 0
2960         }
2961         var size int
2962         size += 4 // m.Retval
2963         return size
2964 }
2965 func (m *SetIPFlowHashReply) Marshal(b []byte) ([]byte, error) {
2966         var buf *codec.Buffer
2967         if b == nil {
2968                 buf = codec.NewBuffer(make([]byte, m.Size()))
2969         } else {
2970                 buf = codec.NewBuffer(b)
2971         }
2972         buf.EncodeUint32(uint32(m.Retval))
2973         return buf.Bytes(), nil
2974 }
2975 func (m *SetIPFlowHashReply) Unmarshal(b []byte) error {
2976         buf := codec.NewBuffer(b)
2977         m.Retval = int32(buf.DecodeUint32())
2978         return nil
2979 }
2980
2981 // SwInterfaceIP6EnableDisable defines message 'sw_interface_ip6_enable_disable'.
2982 type SwInterfaceIP6EnableDisable struct {
2983         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2984         Enable    bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
2985 }
2986
2987 func (m *SwInterfaceIP6EnableDisable) Reset()               { *m = SwInterfaceIP6EnableDisable{} }
2988 func (*SwInterfaceIP6EnableDisable) GetMessageName() string { return "sw_interface_ip6_enable_disable" }
2989 func (*SwInterfaceIP6EnableDisable) GetCrcString() string   { return "ae6cfcfb" }
2990 func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType {
2991         return api.RequestMessage
2992 }
2993
2994 func (m *SwInterfaceIP6EnableDisable) Size() int {
2995         if m == nil {
2996                 return 0
2997         }
2998         var size int
2999         size += 4 // m.SwIfIndex
3000         size += 1 // m.Enable
3001         return size
3002 }
3003 func (m *SwInterfaceIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
3004         var buf *codec.Buffer
3005         if b == nil {
3006                 buf = codec.NewBuffer(make([]byte, m.Size()))
3007         } else {
3008                 buf = codec.NewBuffer(b)
3009         }
3010         buf.EncodeUint32(uint32(m.SwIfIndex))
3011         buf.EncodeBool(m.Enable)
3012         return buf.Bytes(), nil
3013 }
3014 func (m *SwInterfaceIP6EnableDisable) Unmarshal(b []byte) error {
3015         buf := codec.NewBuffer(b)
3016         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3017         m.Enable = buf.DecodeBool()
3018         return nil
3019 }
3020
3021 // SwInterfaceIP6EnableDisableReply defines message 'sw_interface_ip6_enable_disable_reply'.
3022 type SwInterfaceIP6EnableDisableReply struct {
3023         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3024 }
3025
3026 func (m *SwInterfaceIP6EnableDisableReply) Reset() { *m = SwInterfaceIP6EnableDisableReply{} }
3027 func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string {
3028         return "sw_interface_ip6_enable_disable_reply"
3029 }
3030 func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
3031 func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType {
3032         return api.ReplyMessage
3033 }
3034
3035 func (m *SwInterfaceIP6EnableDisableReply) Size() int {
3036         if m == nil {
3037                 return 0
3038         }
3039         var size int
3040         size += 4 // m.Retval
3041         return size
3042 }
3043 func (m *SwInterfaceIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) {
3044         var buf *codec.Buffer
3045         if b == nil {
3046                 buf = codec.NewBuffer(make([]byte, m.Size()))
3047         } else {
3048                 buf = codec.NewBuffer(b)
3049         }
3050         buf.EncodeUint32(uint32(m.Retval))
3051         return buf.Bytes(), nil
3052 }
3053 func (m *SwInterfaceIP6EnableDisableReply) Unmarshal(b []byte) error {
3054         buf := codec.NewBuffer(b)
3055         m.Retval = int32(buf.DecodeUint32())
3056         return nil
3057 }
3058
3059 // SwInterfaceIP6SetLinkLocalAddress defines message 'sw_interface_ip6_set_link_local_address'.
3060 type SwInterfaceIP6SetLinkLocalAddress struct {
3061         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3062         IP        ip_types.IP6Address            `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
3063 }
3064
3065 func (m *SwInterfaceIP6SetLinkLocalAddress) Reset() { *m = SwInterfaceIP6SetLinkLocalAddress{} }
3066 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string {
3067         return "sw_interface_ip6_set_link_local_address"
3068 }
3069 func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "2931d9fa" }
3070 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType {
3071         return api.RequestMessage
3072 }
3073
3074 func (m *SwInterfaceIP6SetLinkLocalAddress) Size() int {
3075         if m == nil {
3076                 return 0
3077         }
3078         var size int
3079         size += 4      // m.SwIfIndex
3080         size += 1 * 16 // m.IP
3081         return size
3082 }
3083 func (m *SwInterfaceIP6SetLinkLocalAddress) Marshal(b []byte) ([]byte, error) {
3084         var buf *codec.Buffer
3085         if b == nil {
3086                 buf = codec.NewBuffer(make([]byte, m.Size()))
3087         } else {
3088                 buf = codec.NewBuffer(b)
3089         }
3090         buf.EncodeUint32(uint32(m.SwIfIndex))
3091         buf.EncodeBytes(m.IP[:], 16)
3092         return buf.Bytes(), nil
3093 }
3094 func (m *SwInterfaceIP6SetLinkLocalAddress) Unmarshal(b []byte) error {
3095         buf := codec.NewBuffer(b)
3096         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3097         copy(m.IP[:], buf.DecodeBytes(16))
3098         return nil
3099 }
3100
3101 // SwInterfaceIP6SetLinkLocalAddressReply defines message 'sw_interface_ip6_set_link_local_address_reply'.
3102 type SwInterfaceIP6SetLinkLocalAddressReply struct {
3103         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3104 }
3105
3106 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Reset() {
3107         *m = SwInterfaceIP6SetLinkLocalAddressReply{}
3108 }
3109 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string {
3110         return "sw_interface_ip6_set_link_local_address_reply"
3111 }
3112 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { return "e8d4e804" }
3113 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType {
3114         return api.ReplyMessage
3115 }
3116
3117 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Size() int {
3118         if m == nil {
3119                 return 0
3120         }
3121         var size int
3122         size += 4 // m.Retval
3123         return size
3124 }
3125 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) {
3126         var buf *codec.Buffer
3127         if b == nil {
3128                 buf = codec.NewBuffer(make([]byte, m.Size()))
3129         } else {
3130                 buf = codec.NewBuffer(b)
3131         }
3132         buf.EncodeUint32(uint32(m.Retval))
3133         return buf.Bytes(), nil
3134 }
3135 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error {
3136         buf := codec.NewBuffer(b)
3137         m.Retval = int32(buf.DecodeUint32())
3138         return nil
3139 }
3140
3141 func init() { file_ip_binapi_init() }
3142 func file_ip_binapi_init() {
3143         api.RegisterMessage((*IoamDisable)(nil), "ioam_disable_6b16a45e")
3144         api.RegisterMessage((*IoamDisableReply)(nil), "ioam_disable_reply_e8d4e804")
3145         api.RegisterMessage((*IoamEnable)(nil), "ioam_enable_51ccd868")
3146         api.RegisterMessage((*IoamEnableReply)(nil), "ioam_enable_reply_e8d4e804")
3147         api.RegisterMessage((*IPAddressDetails)(nil), "ip_address_details_b1199745")
3148         api.RegisterMessage((*IPAddressDump)(nil), "ip_address_dump_2d033de4")
3149         api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip_container_proxy_add_del_91189f40")
3150         api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip_container_proxy_add_del_reply_e8d4e804")
3151         api.RegisterMessage((*IPContainerProxyDetails)(nil), "ip_container_proxy_details_0ee460e8")
3152         api.RegisterMessage((*IPContainerProxyDump)(nil), "ip_container_proxy_dump_51077d14")
3153         api.RegisterMessage((*IPDetails)(nil), "ip_details_eb152d07")
3154         api.RegisterMessage((*IPDump)(nil), "ip_dump_98d231ca")
3155         api.RegisterMessage((*IPMrouteAddDel)(nil), "ip_mroute_add_del_f6627d17")
3156         api.RegisterMessage((*IPMrouteAddDelReply)(nil), "ip_mroute_add_del_reply_1992deab")
3157         api.RegisterMessage((*IPMrouteDetails)(nil), "ip_mroute_details_c1cb4b44")
3158         api.RegisterMessage((*IPMrouteDump)(nil), "ip_mroute_dump_b9d2e09e")
3159         api.RegisterMessage((*IPMtableDetails)(nil), "ip_mtable_details_b9d2e09e")
3160         api.RegisterMessage((*IPMtableDump)(nil), "ip_mtable_dump_51077d14")
3161         api.RegisterMessage((*IPPuntPolice)(nil), "ip_punt_police_db867cea")
3162         api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip_punt_police_reply_e8d4e804")
3163         api.RegisterMessage((*IPPuntRedirect)(nil), "ip_punt_redirect_a9a5592c")
3164         api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_3924f5d3")
3165         api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip_punt_redirect_dump_2d033de4")
3166         api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip_punt_redirect_reply_e8d4e804")
3167         api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_885c85a6")
3168         api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip_reassembly_enable_disable_reply_e8d4e804")
3169         api.RegisterMessage((*IPReassemblyGet)(nil), "ip_reassembly_get_ea13ff63")
3170         api.RegisterMessage((*IPReassemblyGetReply)(nil), "ip_reassembly_get_reply_d5eb8d34")
3171         api.RegisterMessage((*IPReassemblySet)(nil), "ip_reassembly_set_16467d25")
3172         api.RegisterMessage((*IPReassemblySetReply)(nil), "ip_reassembly_set_reply_e8d4e804")
3173         api.RegisterMessage((*IPRouteAddDel)(nil), "ip_route_add_del_c1ff832d")
3174         api.RegisterMessage((*IPRouteAddDelReply)(nil), "ip_route_add_del_reply_1992deab")
3175         api.RegisterMessage((*IPRouteDetails)(nil), "ip_route_details_d1ffaae1")
3176         api.RegisterMessage((*IPRouteDump)(nil), "ip_route_dump_b9d2e09e")
3177         api.RegisterMessage((*IPRouteLookup)(nil), "ip_route_lookup_e2986185")
3178         api.RegisterMessage((*IPRouteLookupReply)(nil), "ip_route_lookup_reply_ae99de8e")
3179         api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip_source_and_port_range_check_add_del_8bfc76f2")
3180         api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip_source_and_port_range_check_add_del_reply_e8d4e804")
3181         api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip_source_and_port_range_check_interface_add_del_e1ba8987")
3182         api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip_source_and_port_range_check_interface_add_del_reply_e8d4e804")
3183         api.RegisterMessage((*IPTableAddDel)(nil), "ip_table_add_del_0ffdaec0")
3184         api.RegisterMessage((*IPTableAddDelReply)(nil), "ip_table_add_del_reply_e8d4e804")
3185         api.RegisterMessage((*IPTableDetails)(nil), "ip_table_details_c79fca0f")
3186         api.RegisterMessage((*IPTableDump)(nil), "ip_table_dump_51077d14")
3187         api.RegisterMessage((*IPTableFlush)(nil), "ip_table_flush_b9d2e09e")
3188         api.RegisterMessage((*IPTableFlushReply)(nil), "ip_table_flush_reply_e8d4e804")
3189         api.RegisterMessage((*IPTableReplaceBegin)(nil), "ip_table_replace_begin_b9d2e09e")
3190         api.RegisterMessage((*IPTableReplaceBeginReply)(nil), "ip_table_replace_begin_reply_e8d4e804")
3191         api.RegisterMessage((*IPTableReplaceEnd)(nil), "ip_table_replace_end_b9d2e09e")
3192         api.RegisterMessage((*IPTableReplaceEndReply)(nil), "ip_table_replace_end_reply_e8d4e804")
3193         api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip_unnumbered_details_aa12a483")
3194         api.RegisterMessage((*IPUnnumberedDump)(nil), "ip_unnumbered_dump_f9e6675e")
3195         api.RegisterMessage((*MfibSignalDetails)(nil), "mfib_signal_details_64398a9a")
3196         api.RegisterMessage((*MfibSignalDump)(nil), "mfib_signal_dump_51077d14")
3197         api.RegisterMessage((*SetIPFlowHash)(nil), "set_ip_flow_hash_084ee09e")
3198         api.RegisterMessage((*SetIPFlowHashReply)(nil), "set_ip_flow_hash_reply_e8d4e804")
3199         api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "sw_interface_ip6_enable_disable_ae6cfcfb")
3200         api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "sw_interface_ip6_enable_disable_reply_e8d4e804")
3201         api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "sw_interface_ip6_set_link_local_address_2931d9fa")
3202         api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "sw_interface_ip6_set_link_local_address_reply_e8d4e804")
3203 }
3204
3205 // Messages returns list of all messages in this module.
3206 func AllMessages() []api.Message {
3207         return []api.Message{
3208                 (*IoamDisable)(nil),
3209                 (*IoamDisableReply)(nil),
3210                 (*IoamEnable)(nil),
3211                 (*IoamEnableReply)(nil),
3212                 (*IPAddressDetails)(nil),
3213                 (*IPAddressDump)(nil),
3214                 (*IPContainerProxyAddDel)(nil),
3215                 (*IPContainerProxyAddDelReply)(nil),
3216                 (*IPContainerProxyDetails)(nil),
3217                 (*IPContainerProxyDump)(nil),
3218                 (*IPDetails)(nil),
3219                 (*IPDump)(nil),
3220                 (*IPMrouteAddDel)(nil),
3221                 (*IPMrouteAddDelReply)(nil),
3222                 (*IPMrouteDetails)(nil),
3223                 (*IPMrouteDump)(nil),
3224                 (*IPMtableDetails)(nil),
3225                 (*IPMtableDump)(nil),
3226                 (*IPPuntPolice)(nil),
3227                 (*IPPuntPoliceReply)(nil),
3228                 (*IPPuntRedirect)(nil),
3229                 (*IPPuntRedirectDetails)(nil),
3230                 (*IPPuntRedirectDump)(nil),
3231                 (*IPPuntRedirectReply)(nil),
3232                 (*IPReassemblyEnableDisable)(nil),
3233                 (*IPReassemblyEnableDisableReply)(nil),
3234                 (*IPReassemblyGet)(nil),
3235                 (*IPReassemblyGetReply)(nil),
3236                 (*IPReassemblySet)(nil),
3237                 (*IPReassemblySetReply)(nil),
3238                 (*IPRouteAddDel)(nil),
3239                 (*IPRouteAddDelReply)(nil),
3240                 (*IPRouteDetails)(nil),
3241                 (*IPRouteDump)(nil),
3242                 (*IPRouteLookup)(nil),
3243                 (*IPRouteLookupReply)(nil),
3244                 (*IPSourceAndPortRangeCheckAddDel)(nil),
3245                 (*IPSourceAndPortRangeCheckAddDelReply)(nil),
3246                 (*IPSourceAndPortRangeCheckInterfaceAddDel)(nil),
3247                 (*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil),
3248                 (*IPTableAddDel)(nil),
3249                 (*IPTableAddDelReply)(nil),
3250                 (*IPTableDetails)(nil),
3251                 (*IPTableDump)(nil),
3252                 (*IPTableFlush)(nil),
3253                 (*IPTableFlushReply)(nil),
3254                 (*IPTableReplaceBegin)(nil),
3255                 (*IPTableReplaceBeginReply)(nil),
3256                 (*IPTableReplaceEnd)(nil),
3257                 (*IPTableReplaceEndReply)(nil),
3258                 (*IPUnnumberedDetails)(nil),
3259                 (*IPUnnumberedDump)(nil),
3260                 (*MfibSignalDetails)(nil),
3261                 (*MfibSignalDump)(nil),
3262                 (*SetIPFlowHash)(nil),
3263                 (*SetIPFlowHashReply)(nil),
3264                 (*SwInterfaceIP6EnableDisable)(nil),
3265                 (*SwInterfaceIP6EnableDisableReply)(nil),
3266                 (*SwInterfaceIP6SetLinkLocalAddress)(nil),
3267                 (*SwInterfaceIP6SetLinkLocalAddressReply)(nil),
3268         }
3269 }