Change module name to go.fd.io/govpp
[govpp.git] / binapi / ip / ip.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.6.0-dev
4 //  VPP:              22.02-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 //   2 enums
11 //   7 structs
12 //  87 messages
13 //
14 package ip
15
16 import (
17         "strconv"
18
19         api "go.fd.io/govpp/api"
20         _ "go.fd.io/govpp/binapi/ethernet_types"
21         fib_types "go.fd.io/govpp/binapi/fib_types"
22         interface_types "go.fd.io/govpp/binapi/interface_types"
23         ip_types "go.fd.io/govpp/binapi/ip_types"
24         mfib_types "go.fd.io/govpp/binapi/mfib_types"
25         codec "go.fd.io/govpp/codec"
26 )
27
28 // This is a compile-time assertion to ensure that this generated file
29 // is compatible with the GoVPP api package it is being compiled against.
30 // A compilation error at this line likely means your copy of the
31 // GoVPP api package needs to be updated.
32 const _ = api.GoVppAPIPackageIsVersion2
33
34 const (
35         APIFile    = "ip"
36         APIVersion = "3.2.0"
37         VersionCrc = 0x557b5866
38 )
39
40 // IPReassType defines enum 'ip_reass_type'.
41 type IPReassType uint32
42
43 const (
44         IP_REASS_TYPE_FULL            IPReassType = 0
45         IP_REASS_TYPE_SHALLOW_VIRTUAL IPReassType = 1
46 )
47
48 var (
49         IPReassType_name = map[uint32]string{
50                 0: "IP_REASS_TYPE_FULL",
51                 1: "IP_REASS_TYPE_SHALLOW_VIRTUAL",
52         }
53         IPReassType_value = map[string]uint32{
54                 "IP_REASS_TYPE_FULL":            0,
55                 "IP_REASS_TYPE_SHALLOW_VIRTUAL": 1,
56         }
57 )
58
59 func (x IPReassType) String() string {
60         s, ok := IPReassType_name[uint32(x)]
61         if ok {
62                 return s
63         }
64         return "IPReassType(" + strconv.Itoa(int(x)) + ")"
65 }
66
67 // IPFlowHashConfig defines enum 'ip_flow_hash_config'.
68 type IPFlowHashConfig uint32
69
70 const (
71         IP_API_FLOW_HASH_SRC_IP     IPFlowHashConfig = 1
72         IP_API_FLOW_HASH_DST_IP     IPFlowHashConfig = 2
73         IP_API_FLOW_HASH_SRC_PORT   IPFlowHashConfig = 4
74         IP_API_FLOW_HASH_DST_PORT   IPFlowHashConfig = 8
75         IP_API_FLOW_HASH_PROTO      IPFlowHashConfig = 16
76         IP_API_FLOW_HASH_REVERSE    IPFlowHashConfig = 32
77         IP_API_FLOW_HASH_SYMETRIC   IPFlowHashConfig = 64
78         IP_API_FLOW_HASH_FLOW_LABEL IPFlowHashConfig = 128
79 )
80
81 var (
82         IPFlowHashConfig_name = map[uint32]string{
83                 1:   "IP_API_FLOW_HASH_SRC_IP",
84                 2:   "IP_API_FLOW_HASH_DST_IP",
85                 4:   "IP_API_FLOW_HASH_SRC_PORT",
86                 8:   "IP_API_FLOW_HASH_DST_PORT",
87                 16:  "IP_API_FLOW_HASH_PROTO",
88                 32:  "IP_API_FLOW_HASH_REVERSE",
89                 64:  "IP_API_FLOW_HASH_SYMETRIC",
90                 128: "IP_API_FLOW_HASH_FLOW_LABEL",
91         }
92         IPFlowHashConfig_value = map[string]uint32{
93                 "IP_API_FLOW_HASH_SRC_IP":     1,
94                 "IP_API_FLOW_HASH_DST_IP":     2,
95                 "IP_API_FLOW_HASH_SRC_PORT":   4,
96                 "IP_API_FLOW_HASH_DST_PORT":   8,
97                 "IP_API_FLOW_HASH_PROTO":      16,
98                 "IP_API_FLOW_HASH_REVERSE":    32,
99                 "IP_API_FLOW_HASH_SYMETRIC":   64,
100                 "IP_API_FLOW_HASH_FLOW_LABEL": 128,
101         }
102 )
103
104 func (x IPFlowHashConfig) String() string {
105         s, ok := IPFlowHashConfig_name[uint32(x)]
106         if ok {
107                 return s
108         }
109         str := func(n uint32) string {
110                 s, ok := IPFlowHashConfig_name[uint32(n)]
111                 if ok {
112                         return s
113                 }
114                 return "IPFlowHashConfig(" + strconv.Itoa(int(n)) + ")"
115         }
116         for i := uint32(0); i <= 32; i++ {
117                 val := uint32(x)
118                 if val&(1<<i) != 0 {
119                         if s != "" {
120                                 s += "|"
121                         }
122                         s += str(1 << i)
123                 }
124         }
125         if s == "" {
126                 return str(uint32(x))
127         }
128         return s
129 }
130
131 // IPMroute defines type 'ip_mroute'.
132 type IPMroute struct {
133         TableID    uint32                    `binapi:"u32,name=table_id" json:"table_id,omitempty"`
134         EntryFlags mfib_types.MfibEntryFlags `binapi:"mfib_entry_flags,name=entry_flags" json:"entry_flags,omitempty"`
135         RpfID      uint32                    `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
136         Prefix     ip_types.Mprefix          `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
137         NPaths     uint8                     `binapi:"u8,name=n_paths" json:"-"`
138         Paths      []mfib_types.MfibPath     `binapi:"mfib_path[n_paths],name=paths" json:"paths,omitempty"`
139 }
140
141 // IPPathMtu defines type 'ip_path_mtu'.
142 type IPPathMtu struct {
143         ClientIndex uint32           `binapi:"u32,name=client_index" json:"client_index,omitempty"`
144         Context     uint32           `binapi:"u32,name=context" json:"context,omitempty"`
145         TableID     uint32           `binapi:"u32,name=table_id" json:"table_id,omitempty"`
146         Nh          ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"`
147         PathMtu     uint16           `binapi:"u16,name=path_mtu" json:"path_mtu,omitempty"`
148 }
149
150 // IPRoute defines type 'ip_route'.
151 type IPRoute struct {
152         TableID    uint32              `binapi:"u32,name=table_id" json:"table_id,omitempty"`
153         StatsIndex uint32              `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
154         Prefix     ip_types.Prefix     `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
155         NPaths     uint8               `binapi:"u8,name=n_paths" json:"-"`
156         Paths      []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
157 }
158
159 // IPRouteV2 defines type 'ip_route_v2'.
160 type IPRouteV2 struct {
161         TableID    uint32              `binapi:"u32,name=table_id" json:"table_id,omitempty"`
162         StatsIndex uint32              `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
163         Prefix     ip_types.Prefix     `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
164         NPaths     uint8               `binapi:"u8,name=n_paths" json:"-"`
165         Src        uint8               `binapi:"u8,name=src" json:"src,omitempty"`
166         Paths      []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
167 }
168
169 // IPTable defines type 'ip_table'.
170 type IPTable struct {
171         TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
172         IsIP6   bool   `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
173         Name    string `binapi:"string[64],name=name" json:"name,omitempty"`
174 }
175
176 // PuntRedirect defines type 'punt_redirect'.
177 type PuntRedirect struct {
178         RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
179         TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
180         Nh          ip_types.Address               `binapi:"address,name=nh" json:"nh,omitempty"`
181 }
182
183 // PuntRedirectV2 defines type 'punt_redirect_v2'.
184 type PuntRedirectV2 struct {
185         RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index,default=4294967295" json:"rx_sw_if_index,omitempty"`
186         Af          ip_types.AddressFamily         `binapi:"address_family,name=af" json:"af,omitempty"`
187         NPaths      uint32                         `binapi:"u32,name=n_paths" json:"-"`
188         Paths       []fib_types.FibPath            `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
189 }
190
191 // AddDelIPPuntRedirectV2 defines message 'add_del_ip_punt_redirect_v2'.
192 type AddDelIPPuntRedirectV2 struct {
193         IsAdd bool           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
194         Punt  PuntRedirectV2 `binapi:"punt_redirect_v2,name=punt" json:"punt,omitempty"`
195 }
196
197 func (m *AddDelIPPuntRedirectV2) Reset()               { *m = AddDelIPPuntRedirectV2{} }
198 func (*AddDelIPPuntRedirectV2) GetMessageName() string { return "add_del_ip_punt_redirect_v2" }
199 func (*AddDelIPPuntRedirectV2) GetCrcString() string   { return "9e804227" }
200 func (*AddDelIPPuntRedirectV2) GetMessageType() api.MessageType {
201         return api.RequestMessage
202 }
203
204 func (m *AddDelIPPuntRedirectV2) Size() (size int) {
205         if m == nil {
206                 return 0
207         }
208         size += 1 // m.IsAdd
209         size += 4 // m.Punt.RxSwIfIndex
210         size += 1 // m.Punt.Af
211         size += 4 // m.Punt.NPaths
212         for j2 := 0; j2 < len(m.Punt.Paths); j2++ {
213                 var s2 fib_types.FibPath
214                 _ = s2
215                 if j2 < len(m.Punt.Paths) {
216                         s2 = m.Punt.Paths[j2]
217                 }
218                 size += 4      // s2.SwIfIndex
219                 size += 4      // s2.TableID
220                 size += 4      // s2.RpfID
221                 size += 1      // s2.Weight
222                 size += 1      // s2.Preference
223                 size += 4      // s2.Type
224                 size += 4      // s2.Flags
225                 size += 4      // s2.Proto
226                 size += 1 * 16 // s2.Nh.Address
227                 size += 4      // s2.Nh.ViaLabel
228                 size += 4      // s2.Nh.ObjID
229                 size += 4      // s2.Nh.ClassifyTableIndex
230                 size += 1      // s2.NLabels
231                 for j3 := 0; j3 < 16; j3++ {
232                         size += 1 // s2.LabelStack[j3].IsUniform
233                         size += 4 // s2.LabelStack[j3].Label
234                         size += 1 // s2.LabelStack[j3].TTL
235                         size += 1 // s2.LabelStack[j3].Exp
236                 }
237         }
238         return size
239 }
240 func (m *AddDelIPPuntRedirectV2) Marshal(b []byte) ([]byte, error) {
241         if b == nil {
242                 b = make([]byte, m.Size())
243         }
244         buf := codec.NewBuffer(b)
245         buf.EncodeBool(m.IsAdd)
246         buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
247         buf.EncodeUint8(uint8(m.Punt.Af))
248         buf.EncodeUint32(uint32(len(m.Punt.Paths)))
249         for j1 := 0; j1 < len(m.Punt.Paths); j1++ {
250                 var v1 fib_types.FibPath // Paths
251                 if j1 < len(m.Punt.Paths) {
252                         v1 = m.Punt.Paths[j1]
253                 }
254                 buf.EncodeUint32(v1.SwIfIndex)
255                 buf.EncodeUint32(v1.TableID)
256                 buf.EncodeUint32(v1.RpfID)
257                 buf.EncodeUint8(v1.Weight)
258                 buf.EncodeUint8(v1.Preference)
259                 buf.EncodeUint32(uint32(v1.Type))
260                 buf.EncodeUint32(uint32(v1.Flags))
261                 buf.EncodeUint32(uint32(v1.Proto))
262                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
263                 buf.EncodeUint32(v1.Nh.ViaLabel)
264                 buf.EncodeUint32(v1.Nh.ObjID)
265                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
266                 buf.EncodeUint8(v1.NLabels)
267                 for j2 := 0; j2 < 16; j2++ {
268                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
269                         buf.EncodeUint32(v1.LabelStack[j2].Label)
270                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
271                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
272                 }
273         }
274         return buf.Bytes(), nil
275 }
276 func (m *AddDelIPPuntRedirectV2) Unmarshal(b []byte) error {
277         buf := codec.NewBuffer(b)
278         m.IsAdd = buf.DecodeBool()
279         m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
280         m.Punt.Af = ip_types.AddressFamily(buf.DecodeUint8())
281         m.Punt.NPaths = buf.DecodeUint32()
282         m.Punt.Paths = make([]fib_types.FibPath, m.Punt.NPaths)
283         for j1 := 0; j1 < len(m.Punt.Paths); j1++ {
284                 m.Punt.Paths[j1].SwIfIndex = buf.DecodeUint32()
285                 m.Punt.Paths[j1].TableID = buf.DecodeUint32()
286                 m.Punt.Paths[j1].RpfID = buf.DecodeUint32()
287                 m.Punt.Paths[j1].Weight = buf.DecodeUint8()
288                 m.Punt.Paths[j1].Preference = buf.DecodeUint8()
289                 m.Punt.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
290                 m.Punt.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
291                 m.Punt.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
292                 copy(m.Punt.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
293                 m.Punt.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
294                 m.Punt.Paths[j1].Nh.ObjID = buf.DecodeUint32()
295                 m.Punt.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
296                 m.Punt.Paths[j1].NLabels = buf.DecodeUint8()
297                 for j2 := 0; j2 < 16; j2++ {
298                         m.Punt.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
299                         m.Punt.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
300                         m.Punt.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
301                         m.Punt.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
302                 }
303         }
304         return nil
305 }
306
307 // AddDelIPPuntRedirectV2Reply defines message 'add_del_ip_punt_redirect_v2_reply'.
308 type AddDelIPPuntRedirectV2Reply struct {
309         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
310 }
311
312 func (m *AddDelIPPuntRedirectV2Reply) Reset() { *m = AddDelIPPuntRedirectV2Reply{} }
313 func (*AddDelIPPuntRedirectV2Reply) GetMessageName() string {
314         return "add_del_ip_punt_redirect_v2_reply"
315 }
316 func (*AddDelIPPuntRedirectV2Reply) GetCrcString() string { return "e8d4e804" }
317 func (*AddDelIPPuntRedirectV2Reply) GetMessageType() api.MessageType {
318         return api.ReplyMessage
319 }
320
321 func (m *AddDelIPPuntRedirectV2Reply) Size() (size int) {
322         if m == nil {
323                 return 0
324         }
325         size += 4 // m.Retval
326         return size
327 }
328 func (m *AddDelIPPuntRedirectV2Reply) Marshal(b []byte) ([]byte, error) {
329         if b == nil {
330                 b = make([]byte, m.Size())
331         }
332         buf := codec.NewBuffer(b)
333         buf.EncodeInt32(m.Retval)
334         return buf.Bytes(), nil
335 }
336 func (m *AddDelIPPuntRedirectV2Reply) Unmarshal(b []byte) error {
337         buf := codec.NewBuffer(b)
338         m.Retval = buf.DecodeInt32()
339         return nil
340 }
341
342 // IoamDisable defines message 'ioam_disable'.
343 type IoamDisable struct {
344         ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
345 }
346
347 func (m *IoamDisable) Reset()               { *m = IoamDisable{} }
348 func (*IoamDisable) GetMessageName() string { return "ioam_disable" }
349 func (*IoamDisable) GetCrcString() string   { return "6b16a45e" }
350 func (*IoamDisable) GetMessageType() api.MessageType {
351         return api.RequestMessage
352 }
353
354 func (m *IoamDisable) Size() (size int) {
355         if m == nil {
356                 return 0
357         }
358         size += 2 // m.ID
359         return size
360 }
361 func (m *IoamDisable) Marshal(b []byte) ([]byte, error) {
362         if b == nil {
363                 b = make([]byte, m.Size())
364         }
365         buf := codec.NewBuffer(b)
366         buf.EncodeUint16(m.ID)
367         return buf.Bytes(), nil
368 }
369 func (m *IoamDisable) Unmarshal(b []byte) error {
370         buf := codec.NewBuffer(b)
371         m.ID = buf.DecodeUint16()
372         return nil
373 }
374
375 // IoamDisableReply defines message 'ioam_disable_reply'.
376 type IoamDisableReply struct {
377         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
378 }
379
380 func (m *IoamDisableReply) Reset()               { *m = IoamDisableReply{} }
381 func (*IoamDisableReply) GetMessageName() string { return "ioam_disable_reply" }
382 func (*IoamDisableReply) GetCrcString() string   { return "e8d4e804" }
383 func (*IoamDisableReply) GetMessageType() api.MessageType {
384         return api.ReplyMessage
385 }
386
387 func (m *IoamDisableReply) Size() (size int) {
388         if m == nil {
389                 return 0
390         }
391         size += 4 // m.Retval
392         return size
393 }
394 func (m *IoamDisableReply) Marshal(b []byte) ([]byte, error) {
395         if b == nil {
396                 b = make([]byte, m.Size())
397         }
398         buf := codec.NewBuffer(b)
399         buf.EncodeInt32(m.Retval)
400         return buf.Bytes(), nil
401 }
402 func (m *IoamDisableReply) Unmarshal(b []byte) error {
403         buf := codec.NewBuffer(b)
404         m.Retval = buf.DecodeInt32()
405         return nil
406 }
407
408 // IoamEnable defines message 'ioam_enable'.
409 type IoamEnable struct {
410         ID          uint16 `binapi:"u16,name=id" json:"id,omitempty"`
411         Seqno       bool   `binapi:"bool,name=seqno" json:"seqno,omitempty"`
412         Analyse     bool   `binapi:"bool,name=analyse" json:"analyse,omitempty"`
413         PotEnable   bool   `binapi:"bool,name=pot_enable" json:"pot_enable,omitempty"`
414         TraceEnable bool   `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"`
415         NodeID      uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
416 }
417
418 func (m *IoamEnable) Reset()               { *m = IoamEnable{} }
419 func (*IoamEnable) GetMessageName() string { return "ioam_enable" }
420 func (*IoamEnable) GetCrcString() string   { return "51ccd868" }
421 func (*IoamEnable) GetMessageType() api.MessageType {
422         return api.RequestMessage
423 }
424
425 func (m *IoamEnable) Size() (size int) {
426         if m == nil {
427                 return 0
428         }
429         size += 2 // m.ID
430         size += 1 // m.Seqno
431         size += 1 // m.Analyse
432         size += 1 // m.PotEnable
433         size += 1 // m.TraceEnable
434         size += 4 // m.NodeID
435         return size
436 }
437 func (m *IoamEnable) Marshal(b []byte) ([]byte, error) {
438         if b == nil {
439                 b = make([]byte, m.Size())
440         }
441         buf := codec.NewBuffer(b)
442         buf.EncodeUint16(m.ID)
443         buf.EncodeBool(m.Seqno)
444         buf.EncodeBool(m.Analyse)
445         buf.EncodeBool(m.PotEnable)
446         buf.EncodeBool(m.TraceEnable)
447         buf.EncodeUint32(m.NodeID)
448         return buf.Bytes(), nil
449 }
450 func (m *IoamEnable) Unmarshal(b []byte) error {
451         buf := codec.NewBuffer(b)
452         m.ID = buf.DecodeUint16()
453         m.Seqno = buf.DecodeBool()
454         m.Analyse = buf.DecodeBool()
455         m.PotEnable = buf.DecodeBool()
456         m.TraceEnable = buf.DecodeBool()
457         m.NodeID = buf.DecodeUint32()
458         return nil
459 }
460
461 // IoamEnableReply defines message 'ioam_enable_reply'.
462 type IoamEnableReply struct {
463         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
464 }
465
466 func (m *IoamEnableReply) Reset()               { *m = IoamEnableReply{} }
467 func (*IoamEnableReply) GetMessageName() string { return "ioam_enable_reply" }
468 func (*IoamEnableReply) GetCrcString() string   { return "e8d4e804" }
469 func (*IoamEnableReply) GetMessageType() api.MessageType {
470         return api.ReplyMessage
471 }
472
473 func (m *IoamEnableReply) Size() (size int) {
474         if m == nil {
475                 return 0
476         }
477         size += 4 // m.Retval
478         return size
479 }
480 func (m *IoamEnableReply) Marshal(b []byte) ([]byte, error) {
481         if b == nil {
482                 b = make([]byte, m.Size())
483         }
484         buf := codec.NewBuffer(b)
485         buf.EncodeInt32(m.Retval)
486         return buf.Bytes(), nil
487 }
488 func (m *IoamEnableReply) Unmarshal(b []byte) error {
489         buf := codec.NewBuffer(b)
490         m.Retval = buf.DecodeInt32()
491         return nil
492 }
493
494 // IPAddressDetails defines message 'ip_address_details'.
495 type IPAddressDetails struct {
496         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
497         Prefix    ip_types.AddressWithPrefix     `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
498 }
499
500 func (m *IPAddressDetails) Reset()               { *m = IPAddressDetails{} }
501 func (*IPAddressDetails) GetMessageName() string { return "ip_address_details" }
502 func (*IPAddressDetails) GetCrcString() string   { return "ee29b797" }
503 func (*IPAddressDetails) GetMessageType() api.MessageType {
504         return api.ReplyMessage
505 }
506
507 func (m *IPAddressDetails) Size() (size int) {
508         if m == nil {
509                 return 0
510         }
511         size += 4      // m.SwIfIndex
512         size += 1      // m.Prefix.Address.Af
513         size += 1 * 16 // m.Prefix.Address.Un
514         size += 1      // m.Prefix.Len
515         return size
516 }
517 func (m *IPAddressDetails) Marshal(b []byte) ([]byte, error) {
518         if b == nil {
519                 b = make([]byte, m.Size())
520         }
521         buf := codec.NewBuffer(b)
522         buf.EncodeUint32(uint32(m.SwIfIndex))
523         buf.EncodeUint8(uint8(m.Prefix.Address.Af))
524         buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
525         buf.EncodeUint8(m.Prefix.Len)
526         return buf.Bytes(), nil
527 }
528 func (m *IPAddressDetails) Unmarshal(b []byte) error {
529         buf := codec.NewBuffer(b)
530         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
531         m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
532         copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
533         m.Prefix.Len = buf.DecodeUint8()
534         return nil
535 }
536
537 // IPAddressDump defines message 'ip_address_dump'.
538 type IPAddressDump struct {
539         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
540         IsIPv6    bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
541 }
542
543 func (m *IPAddressDump) Reset()               { *m = IPAddressDump{} }
544 func (*IPAddressDump) GetMessageName() string { return "ip_address_dump" }
545 func (*IPAddressDump) GetCrcString() string   { return "2d033de4" }
546 func (*IPAddressDump) GetMessageType() api.MessageType {
547         return api.RequestMessage
548 }
549
550 func (m *IPAddressDump) Size() (size int) {
551         if m == nil {
552                 return 0
553         }
554         size += 4 // m.SwIfIndex
555         size += 1 // m.IsIPv6
556         return size
557 }
558 func (m *IPAddressDump) Marshal(b []byte) ([]byte, error) {
559         if b == nil {
560                 b = make([]byte, m.Size())
561         }
562         buf := codec.NewBuffer(b)
563         buf.EncodeUint32(uint32(m.SwIfIndex))
564         buf.EncodeBool(m.IsIPv6)
565         return buf.Bytes(), nil
566 }
567 func (m *IPAddressDump) Unmarshal(b []byte) error {
568         buf := codec.NewBuffer(b)
569         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
570         m.IsIPv6 = buf.DecodeBool()
571         return nil
572 }
573
574 // IPContainerProxyAddDel defines message 'ip_container_proxy_add_del'.
575 type IPContainerProxyAddDel struct {
576         Pfx       ip_types.Prefix                `binapi:"prefix,name=pfx" json:"pfx,omitempty"`
577         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
578         IsAdd     bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
579 }
580
581 func (m *IPContainerProxyAddDel) Reset()               { *m = IPContainerProxyAddDel{} }
582 func (*IPContainerProxyAddDel) GetMessageName() string { return "ip_container_proxy_add_del" }
583 func (*IPContainerProxyAddDel) GetCrcString() string   { return "7df1dff1" }
584 func (*IPContainerProxyAddDel) GetMessageType() api.MessageType {
585         return api.RequestMessage
586 }
587
588 func (m *IPContainerProxyAddDel) Size() (size int) {
589         if m == nil {
590                 return 0
591         }
592         size += 1      // m.Pfx.Address.Af
593         size += 1 * 16 // m.Pfx.Address.Un
594         size += 1      // m.Pfx.Len
595         size += 4      // m.SwIfIndex
596         size += 1      // m.IsAdd
597         return size
598 }
599 func (m *IPContainerProxyAddDel) Marshal(b []byte) ([]byte, error) {
600         if b == nil {
601                 b = make([]byte, m.Size())
602         }
603         buf := codec.NewBuffer(b)
604         buf.EncodeUint8(uint8(m.Pfx.Address.Af))
605         buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
606         buf.EncodeUint8(m.Pfx.Len)
607         buf.EncodeUint32(uint32(m.SwIfIndex))
608         buf.EncodeBool(m.IsAdd)
609         return buf.Bytes(), nil
610 }
611 func (m *IPContainerProxyAddDel) Unmarshal(b []byte) error {
612         buf := codec.NewBuffer(b)
613         m.Pfx.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
614         copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
615         m.Pfx.Len = buf.DecodeUint8()
616         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
617         m.IsAdd = buf.DecodeBool()
618         return nil
619 }
620
621 // IPContainerProxyAddDelReply defines message 'ip_container_proxy_add_del_reply'.
622 type IPContainerProxyAddDelReply struct {
623         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
624 }
625
626 func (m *IPContainerProxyAddDelReply) Reset() { *m = IPContainerProxyAddDelReply{} }
627 func (*IPContainerProxyAddDelReply) GetMessageName() string {
628         return "ip_container_proxy_add_del_reply"
629 }
630 func (*IPContainerProxyAddDelReply) GetCrcString() string { return "e8d4e804" }
631 func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType {
632         return api.ReplyMessage
633 }
634
635 func (m *IPContainerProxyAddDelReply) Size() (size int) {
636         if m == nil {
637                 return 0
638         }
639         size += 4 // m.Retval
640         return size
641 }
642 func (m *IPContainerProxyAddDelReply) Marshal(b []byte) ([]byte, error) {
643         if b == nil {
644                 b = make([]byte, m.Size())
645         }
646         buf := codec.NewBuffer(b)
647         buf.EncodeInt32(m.Retval)
648         return buf.Bytes(), nil
649 }
650 func (m *IPContainerProxyAddDelReply) Unmarshal(b []byte) error {
651         buf := codec.NewBuffer(b)
652         m.Retval = buf.DecodeInt32()
653         return nil
654 }
655
656 // IPContainerProxyDetails defines message 'ip_container_proxy_details'.
657 type IPContainerProxyDetails struct {
658         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
659         Prefix    ip_types.Prefix                `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
660 }
661
662 func (m *IPContainerProxyDetails) Reset()               { *m = IPContainerProxyDetails{} }
663 func (*IPContainerProxyDetails) GetMessageName() string { return "ip_container_proxy_details" }
664 func (*IPContainerProxyDetails) GetCrcString() string   { return "a8085523" }
665 func (*IPContainerProxyDetails) GetMessageType() api.MessageType {
666         return api.ReplyMessage
667 }
668
669 func (m *IPContainerProxyDetails) Size() (size int) {
670         if m == nil {
671                 return 0
672         }
673         size += 4      // m.SwIfIndex
674         size += 1      // m.Prefix.Address.Af
675         size += 1 * 16 // m.Prefix.Address.Un
676         size += 1      // m.Prefix.Len
677         return size
678 }
679 func (m *IPContainerProxyDetails) Marshal(b []byte) ([]byte, error) {
680         if b == nil {
681                 b = make([]byte, m.Size())
682         }
683         buf := codec.NewBuffer(b)
684         buf.EncodeUint32(uint32(m.SwIfIndex))
685         buf.EncodeUint8(uint8(m.Prefix.Address.Af))
686         buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
687         buf.EncodeUint8(m.Prefix.Len)
688         return buf.Bytes(), nil
689 }
690 func (m *IPContainerProxyDetails) Unmarshal(b []byte) error {
691         buf := codec.NewBuffer(b)
692         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
693         m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
694         copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
695         m.Prefix.Len = buf.DecodeUint8()
696         return nil
697 }
698
699 // IPContainerProxyDump defines message 'ip_container_proxy_dump'.
700 type IPContainerProxyDump struct{}
701
702 func (m *IPContainerProxyDump) Reset()               { *m = IPContainerProxyDump{} }
703 func (*IPContainerProxyDump) GetMessageName() string { return "ip_container_proxy_dump" }
704 func (*IPContainerProxyDump) GetCrcString() string   { return "51077d14" }
705 func (*IPContainerProxyDump) GetMessageType() api.MessageType {
706         return api.RequestMessage
707 }
708
709 func (m *IPContainerProxyDump) Size() (size int) {
710         if m == nil {
711                 return 0
712         }
713         return size
714 }
715 func (m *IPContainerProxyDump) Marshal(b []byte) ([]byte, error) {
716         if b == nil {
717                 b = make([]byte, m.Size())
718         }
719         buf := codec.NewBuffer(b)
720         return buf.Bytes(), nil
721 }
722 func (m *IPContainerProxyDump) Unmarshal(b []byte) error {
723         return nil
724 }
725
726 // IPDetails defines message 'ip_details'.
727 type IPDetails struct {
728         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
729         IsIPv6    bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
730 }
731
732 func (m *IPDetails) Reset()               { *m = IPDetails{} }
733 func (*IPDetails) GetMessageName() string { return "ip_details" }
734 func (*IPDetails) GetCrcString() string   { return "eb152d07" }
735 func (*IPDetails) GetMessageType() api.MessageType {
736         return api.ReplyMessage
737 }
738
739 func (m *IPDetails) Size() (size int) {
740         if m == nil {
741                 return 0
742         }
743         size += 4 // m.SwIfIndex
744         size += 1 // m.IsIPv6
745         return size
746 }
747 func (m *IPDetails) Marshal(b []byte) ([]byte, error) {
748         if b == nil {
749                 b = make([]byte, m.Size())
750         }
751         buf := codec.NewBuffer(b)
752         buf.EncodeUint32(uint32(m.SwIfIndex))
753         buf.EncodeBool(m.IsIPv6)
754         return buf.Bytes(), nil
755 }
756 func (m *IPDetails) Unmarshal(b []byte) error {
757         buf := codec.NewBuffer(b)
758         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
759         m.IsIPv6 = buf.DecodeBool()
760         return nil
761 }
762
763 // IPDump defines message 'ip_dump'.
764 type IPDump struct {
765         IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
766 }
767
768 func (m *IPDump) Reset()               { *m = IPDump{} }
769 func (*IPDump) GetMessageName() string { return "ip_dump" }
770 func (*IPDump) GetCrcString() string   { return "98d231ca" }
771 func (*IPDump) GetMessageType() api.MessageType {
772         return api.RequestMessage
773 }
774
775 func (m *IPDump) Size() (size int) {
776         if m == nil {
777                 return 0
778         }
779         size += 1 // m.IsIPv6
780         return size
781 }
782 func (m *IPDump) Marshal(b []byte) ([]byte, error) {
783         if b == nil {
784                 b = make([]byte, m.Size())
785         }
786         buf := codec.NewBuffer(b)
787         buf.EncodeBool(m.IsIPv6)
788         return buf.Bytes(), nil
789 }
790 func (m *IPDump) Unmarshal(b []byte) error {
791         buf := codec.NewBuffer(b)
792         m.IsIPv6 = buf.DecodeBool()
793         return nil
794 }
795
796 // IPMrouteAddDel defines message 'ip_mroute_add_del'.
797 type IPMrouteAddDel struct {
798         IsAdd       bool     `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
799         IsMultipath bool     `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
800         Route       IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
801 }
802
803 func (m *IPMrouteAddDel) Reset()               { *m = IPMrouteAddDel{} }
804 func (*IPMrouteAddDel) GetMessageName() string { return "ip_mroute_add_del" }
805 func (*IPMrouteAddDel) GetCrcString() string   { return "0dd7e790" }
806 func (*IPMrouteAddDel) GetMessageType() api.MessageType {
807         return api.RequestMessage
808 }
809
810 func (m *IPMrouteAddDel) Size() (size int) {
811         if m == nil {
812                 return 0
813         }
814         size += 1      // m.IsAdd
815         size += 1      // m.IsMultipath
816         size += 4      // m.Route.TableID
817         size += 4      // m.Route.EntryFlags
818         size += 4      // m.Route.RpfID
819         size += 1      // m.Route.Prefix.Af
820         size += 2      // m.Route.Prefix.GrpAddressLength
821         size += 1 * 16 // m.Route.Prefix.GrpAddress
822         size += 1 * 16 // m.Route.Prefix.SrcAddress
823         size += 1      // m.Route.NPaths
824         for j2 := 0; j2 < len(m.Route.Paths); j2++ {
825                 var s2 mfib_types.MfibPath
826                 _ = s2
827                 if j2 < len(m.Route.Paths) {
828                         s2 = m.Route.Paths[j2]
829                 }
830                 size += 4      // s2.ItfFlags
831                 size += 4      // s2.Path.SwIfIndex
832                 size += 4      // s2.Path.TableID
833                 size += 4      // s2.Path.RpfID
834                 size += 1      // s2.Path.Weight
835                 size += 1      // s2.Path.Preference
836                 size += 4      // s2.Path.Type
837                 size += 4      // s2.Path.Flags
838                 size += 4      // s2.Path.Proto
839                 size += 1 * 16 // s2.Path.Nh.Address
840                 size += 4      // s2.Path.Nh.ViaLabel
841                 size += 4      // s2.Path.Nh.ObjID
842                 size += 4      // s2.Path.Nh.ClassifyTableIndex
843                 size += 1      // s2.Path.NLabels
844                 for j4 := 0; j4 < 16; j4++ {
845                         size += 1 // s2.Path.LabelStack[j4].IsUniform
846                         size += 4 // s2.Path.LabelStack[j4].Label
847                         size += 1 // s2.Path.LabelStack[j4].TTL
848                         size += 1 // s2.Path.LabelStack[j4].Exp
849                 }
850         }
851         return size
852 }
853 func (m *IPMrouteAddDel) Marshal(b []byte) ([]byte, error) {
854         if b == nil {
855                 b = make([]byte, m.Size())
856         }
857         buf := codec.NewBuffer(b)
858         buf.EncodeBool(m.IsAdd)
859         buf.EncodeBool(m.IsMultipath)
860         buf.EncodeUint32(m.Route.TableID)
861         buf.EncodeUint32(uint32(m.Route.EntryFlags))
862         buf.EncodeUint32(m.Route.RpfID)
863         buf.EncodeUint8(uint8(m.Route.Prefix.Af))
864         buf.EncodeUint16(m.Route.Prefix.GrpAddressLength)
865         buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16)
866         buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16)
867         buf.EncodeUint8(uint8(len(m.Route.Paths)))
868         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
869                 var v1 mfib_types.MfibPath // Paths
870                 if j1 < len(m.Route.Paths) {
871                         v1 = m.Route.Paths[j1]
872                 }
873                 buf.EncodeUint32(uint32(v1.ItfFlags))
874                 buf.EncodeUint32(v1.Path.SwIfIndex)
875                 buf.EncodeUint32(v1.Path.TableID)
876                 buf.EncodeUint32(v1.Path.RpfID)
877                 buf.EncodeUint8(v1.Path.Weight)
878                 buf.EncodeUint8(v1.Path.Preference)
879                 buf.EncodeUint32(uint32(v1.Path.Type))
880                 buf.EncodeUint32(uint32(v1.Path.Flags))
881                 buf.EncodeUint32(uint32(v1.Path.Proto))
882                 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16)
883                 buf.EncodeUint32(v1.Path.Nh.ViaLabel)
884                 buf.EncodeUint32(v1.Path.Nh.ObjID)
885                 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex)
886                 buf.EncodeUint8(v1.Path.NLabels)
887                 for j3 := 0; j3 < 16; j3++ {
888                         buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform)
889                         buf.EncodeUint32(v1.Path.LabelStack[j3].Label)
890                         buf.EncodeUint8(v1.Path.LabelStack[j3].TTL)
891                         buf.EncodeUint8(v1.Path.LabelStack[j3].Exp)
892                 }
893         }
894         return buf.Bytes(), nil
895 }
896 func (m *IPMrouteAddDel) Unmarshal(b []byte) error {
897         buf := codec.NewBuffer(b)
898         m.IsAdd = buf.DecodeBool()
899         m.IsMultipath = buf.DecodeBool()
900         m.Route.TableID = buf.DecodeUint32()
901         m.Route.EntryFlags = mfib_types.MfibEntryFlags(buf.DecodeUint32())
902         m.Route.RpfID = buf.DecodeUint32()
903         m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
904         m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
905         copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
906         copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
907         m.Route.NPaths = buf.DecodeUint8()
908         m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths)
909         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
910                 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
911                 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
912                 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
913                 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
914                 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
915                 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
916                 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32())
917                 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32())
918                 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
919                 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
920                 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
921                 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
922                 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
923                 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
924                 for j3 := 0; j3 < 16; j3++ {
925                         m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
926                         m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
927                         m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
928                         m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
929                 }
930         }
931         return nil
932 }
933
934 // IPMrouteAddDelReply defines message 'ip_mroute_add_del_reply'.
935 type IPMrouteAddDelReply struct {
936         Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
937         StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
938 }
939
940 func (m *IPMrouteAddDelReply) Reset()               { *m = IPMrouteAddDelReply{} }
941 func (*IPMrouteAddDelReply) GetMessageName() string { return "ip_mroute_add_del_reply" }
942 func (*IPMrouteAddDelReply) GetCrcString() string   { return "1992deab" }
943 func (*IPMrouteAddDelReply) GetMessageType() api.MessageType {
944         return api.ReplyMessage
945 }
946
947 func (m *IPMrouteAddDelReply) Size() (size int) {
948         if m == nil {
949                 return 0
950         }
951         size += 4 // m.Retval
952         size += 4 // m.StatsIndex
953         return size
954 }
955 func (m *IPMrouteAddDelReply) Marshal(b []byte) ([]byte, error) {
956         if b == nil {
957                 b = make([]byte, m.Size())
958         }
959         buf := codec.NewBuffer(b)
960         buf.EncodeInt32(m.Retval)
961         buf.EncodeUint32(m.StatsIndex)
962         return buf.Bytes(), nil
963 }
964 func (m *IPMrouteAddDelReply) Unmarshal(b []byte) error {
965         buf := codec.NewBuffer(b)
966         m.Retval = buf.DecodeInt32()
967         m.StatsIndex = buf.DecodeUint32()
968         return nil
969 }
970
971 // IPMrouteDetails defines message 'ip_mroute_details'.
972 type IPMrouteDetails struct {
973         Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
974 }
975
976 func (m *IPMrouteDetails) Reset()               { *m = IPMrouteDetails{} }
977 func (*IPMrouteDetails) GetMessageName() string { return "ip_mroute_details" }
978 func (*IPMrouteDetails) GetCrcString() string   { return "c5cb23fc" }
979 func (*IPMrouteDetails) GetMessageType() api.MessageType {
980         return api.ReplyMessage
981 }
982
983 func (m *IPMrouteDetails) Size() (size int) {
984         if m == nil {
985                 return 0
986         }
987         size += 4      // m.Route.TableID
988         size += 4      // m.Route.EntryFlags
989         size += 4      // m.Route.RpfID
990         size += 1      // m.Route.Prefix.Af
991         size += 2      // m.Route.Prefix.GrpAddressLength
992         size += 1 * 16 // m.Route.Prefix.GrpAddress
993         size += 1 * 16 // m.Route.Prefix.SrcAddress
994         size += 1      // m.Route.NPaths
995         for j2 := 0; j2 < len(m.Route.Paths); j2++ {
996                 var s2 mfib_types.MfibPath
997                 _ = s2
998                 if j2 < len(m.Route.Paths) {
999                         s2 = m.Route.Paths[j2]
1000                 }
1001                 size += 4      // s2.ItfFlags
1002                 size += 4      // s2.Path.SwIfIndex
1003                 size += 4      // s2.Path.TableID
1004                 size += 4      // s2.Path.RpfID
1005                 size += 1      // s2.Path.Weight
1006                 size += 1      // s2.Path.Preference
1007                 size += 4      // s2.Path.Type
1008                 size += 4      // s2.Path.Flags
1009                 size += 4      // s2.Path.Proto
1010                 size += 1 * 16 // s2.Path.Nh.Address
1011                 size += 4      // s2.Path.Nh.ViaLabel
1012                 size += 4      // s2.Path.Nh.ObjID
1013                 size += 4      // s2.Path.Nh.ClassifyTableIndex
1014                 size += 1      // s2.Path.NLabels
1015                 for j4 := 0; j4 < 16; j4++ {
1016                         size += 1 // s2.Path.LabelStack[j4].IsUniform
1017                         size += 4 // s2.Path.LabelStack[j4].Label
1018                         size += 1 // s2.Path.LabelStack[j4].TTL
1019                         size += 1 // s2.Path.LabelStack[j4].Exp
1020                 }
1021         }
1022         return size
1023 }
1024 func (m *IPMrouteDetails) Marshal(b []byte) ([]byte, error) {
1025         if b == nil {
1026                 b = make([]byte, m.Size())
1027         }
1028         buf := codec.NewBuffer(b)
1029         buf.EncodeUint32(m.Route.TableID)
1030         buf.EncodeUint32(uint32(m.Route.EntryFlags))
1031         buf.EncodeUint32(m.Route.RpfID)
1032         buf.EncodeUint8(uint8(m.Route.Prefix.Af))
1033         buf.EncodeUint16(m.Route.Prefix.GrpAddressLength)
1034         buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16)
1035         buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16)
1036         buf.EncodeUint8(uint8(len(m.Route.Paths)))
1037         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1038                 var v1 mfib_types.MfibPath // Paths
1039                 if j1 < len(m.Route.Paths) {
1040                         v1 = m.Route.Paths[j1]
1041                 }
1042                 buf.EncodeUint32(uint32(v1.ItfFlags))
1043                 buf.EncodeUint32(v1.Path.SwIfIndex)
1044                 buf.EncodeUint32(v1.Path.TableID)
1045                 buf.EncodeUint32(v1.Path.RpfID)
1046                 buf.EncodeUint8(v1.Path.Weight)
1047                 buf.EncodeUint8(v1.Path.Preference)
1048                 buf.EncodeUint32(uint32(v1.Path.Type))
1049                 buf.EncodeUint32(uint32(v1.Path.Flags))
1050                 buf.EncodeUint32(uint32(v1.Path.Proto))
1051                 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16)
1052                 buf.EncodeUint32(v1.Path.Nh.ViaLabel)
1053                 buf.EncodeUint32(v1.Path.Nh.ObjID)
1054                 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex)
1055                 buf.EncodeUint8(v1.Path.NLabels)
1056                 for j3 := 0; j3 < 16; j3++ {
1057                         buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform)
1058                         buf.EncodeUint32(v1.Path.LabelStack[j3].Label)
1059                         buf.EncodeUint8(v1.Path.LabelStack[j3].TTL)
1060                         buf.EncodeUint8(v1.Path.LabelStack[j3].Exp)
1061                 }
1062         }
1063         return buf.Bytes(), nil
1064 }
1065 func (m *IPMrouteDetails) Unmarshal(b []byte) error {
1066         buf := codec.NewBuffer(b)
1067         m.Route.TableID = buf.DecodeUint32()
1068         m.Route.EntryFlags = mfib_types.MfibEntryFlags(buf.DecodeUint32())
1069         m.Route.RpfID = buf.DecodeUint32()
1070         m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
1071         m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
1072         copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
1073         copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
1074         m.Route.NPaths = buf.DecodeUint8()
1075         m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths)
1076         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1077                 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
1078                 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
1079                 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
1080                 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
1081                 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
1082                 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
1083                 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32())
1084                 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1085                 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1086                 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1087                 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
1088                 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
1089                 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
1090                 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
1091                 for j3 := 0; j3 < 16; j3++ {
1092                         m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
1093                         m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
1094                         m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
1095                         m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
1096                 }
1097         }
1098         return nil
1099 }
1100
1101 // IPMrouteDump defines message 'ip_mroute_dump'.
1102 type IPMrouteDump struct {
1103         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
1104 }
1105
1106 func (m *IPMrouteDump) Reset()               { *m = IPMrouteDump{} }
1107 func (*IPMrouteDump) GetMessageName() string { return "ip_mroute_dump" }
1108 func (*IPMrouteDump) GetCrcString() string   { return "b9d2e09e" }
1109 func (*IPMrouteDump) GetMessageType() api.MessageType {
1110         return api.RequestMessage
1111 }
1112
1113 func (m *IPMrouteDump) Size() (size int) {
1114         if m == nil {
1115                 return 0
1116         }
1117         size += 4  // m.Table.TableID
1118         size += 1  // m.Table.IsIP6
1119         size += 64 // m.Table.Name
1120         return size
1121 }
1122 func (m *IPMrouteDump) Marshal(b []byte) ([]byte, error) {
1123         if b == nil {
1124                 b = make([]byte, m.Size())
1125         }
1126         buf := codec.NewBuffer(b)
1127         buf.EncodeUint32(m.Table.TableID)
1128         buf.EncodeBool(m.Table.IsIP6)
1129         buf.EncodeString(m.Table.Name, 64)
1130         return buf.Bytes(), nil
1131 }
1132 func (m *IPMrouteDump) Unmarshal(b []byte) error {
1133         buf := codec.NewBuffer(b)
1134         m.Table.TableID = buf.DecodeUint32()
1135         m.Table.IsIP6 = buf.DecodeBool()
1136         m.Table.Name = buf.DecodeString(64)
1137         return nil
1138 }
1139
1140 // IPMtableDetails defines message 'ip_mtable_details'.
1141 type IPMtableDetails struct {
1142         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
1143 }
1144
1145 func (m *IPMtableDetails) Reset()               { *m = IPMtableDetails{} }
1146 func (*IPMtableDetails) GetMessageName() string { return "ip_mtable_details" }
1147 func (*IPMtableDetails) GetCrcString() string   { return "b9d2e09e" }
1148 func (*IPMtableDetails) GetMessageType() api.MessageType {
1149         return api.RequestMessage
1150 }
1151
1152 func (m *IPMtableDetails) Size() (size int) {
1153         if m == nil {
1154                 return 0
1155         }
1156         size += 4  // m.Table.TableID
1157         size += 1  // m.Table.IsIP6
1158         size += 64 // m.Table.Name
1159         return size
1160 }
1161 func (m *IPMtableDetails) Marshal(b []byte) ([]byte, error) {
1162         if b == nil {
1163                 b = make([]byte, m.Size())
1164         }
1165         buf := codec.NewBuffer(b)
1166         buf.EncodeUint32(m.Table.TableID)
1167         buf.EncodeBool(m.Table.IsIP6)
1168         buf.EncodeString(m.Table.Name, 64)
1169         return buf.Bytes(), nil
1170 }
1171 func (m *IPMtableDetails) Unmarshal(b []byte) error {
1172         buf := codec.NewBuffer(b)
1173         m.Table.TableID = buf.DecodeUint32()
1174         m.Table.IsIP6 = buf.DecodeBool()
1175         m.Table.Name = buf.DecodeString(64)
1176         return nil
1177 }
1178
1179 // IPMtableDump defines message 'ip_mtable_dump'.
1180 type IPMtableDump struct{}
1181
1182 func (m *IPMtableDump) Reset()               { *m = IPMtableDump{} }
1183 func (*IPMtableDump) GetMessageName() string { return "ip_mtable_dump" }
1184 func (*IPMtableDump) GetCrcString() string   { return "51077d14" }
1185 func (*IPMtableDump) GetMessageType() api.MessageType {
1186         return api.RequestMessage
1187 }
1188
1189 func (m *IPMtableDump) Size() (size int) {
1190         if m == nil {
1191                 return 0
1192         }
1193         return size
1194 }
1195 func (m *IPMtableDump) Marshal(b []byte) ([]byte, error) {
1196         if b == nil {
1197                 b = make([]byte, m.Size())
1198         }
1199         buf := codec.NewBuffer(b)
1200         return buf.Bytes(), nil
1201 }
1202 func (m *IPMtableDump) Unmarshal(b []byte) error {
1203         return nil
1204 }
1205
1206 // IPPathMtuDetails defines message 'ip_path_mtu_details'.
1207 type IPPathMtuDetails struct {
1208         Pmtu IPPathMtu `binapi:"ip_path_mtu,name=pmtu" json:"pmtu,omitempty"`
1209 }
1210
1211 func (m *IPPathMtuDetails) Reset()               { *m = IPPathMtuDetails{} }
1212 func (*IPPathMtuDetails) GetMessageName() string { return "ip_path_mtu_details" }
1213 func (*IPPathMtuDetails) GetCrcString() string   { return "ac9539a7" }
1214 func (*IPPathMtuDetails) GetMessageType() api.MessageType {
1215         return api.ReplyMessage
1216 }
1217
1218 func (m *IPPathMtuDetails) Size() (size int) {
1219         if m == nil {
1220                 return 0
1221         }
1222         size += 4      // m.Pmtu.ClientIndex
1223         size += 4      // m.Pmtu.Context
1224         size += 4      // m.Pmtu.TableID
1225         size += 1      // m.Pmtu.Nh.Af
1226         size += 1 * 16 // m.Pmtu.Nh.Un
1227         size += 2      // m.Pmtu.PathMtu
1228         return size
1229 }
1230 func (m *IPPathMtuDetails) Marshal(b []byte) ([]byte, error) {
1231         if b == nil {
1232                 b = make([]byte, m.Size())
1233         }
1234         buf := codec.NewBuffer(b)
1235         buf.EncodeUint32(m.Pmtu.ClientIndex)
1236         buf.EncodeUint32(m.Pmtu.Context)
1237         buf.EncodeUint32(m.Pmtu.TableID)
1238         buf.EncodeUint8(uint8(m.Pmtu.Nh.Af))
1239         buf.EncodeBytes(m.Pmtu.Nh.Un.XXX_UnionData[:], 16)
1240         buf.EncodeUint16(m.Pmtu.PathMtu)
1241         return buf.Bytes(), nil
1242 }
1243 func (m *IPPathMtuDetails) Unmarshal(b []byte) error {
1244         buf := codec.NewBuffer(b)
1245         m.Pmtu.ClientIndex = buf.DecodeUint32()
1246         m.Pmtu.Context = buf.DecodeUint32()
1247         m.Pmtu.TableID = buf.DecodeUint32()
1248         m.Pmtu.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1249         copy(m.Pmtu.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1250         m.Pmtu.PathMtu = buf.DecodeUint16()
1251         return nil
1252 }
1253
1254 // IPPathMtuGet defines message 'ip_path_mtu_get'.
1255 type IPPathMtuGet struct {
1256         Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
1257 }
1258
1259 func (m *IPPathMtuGet) Reset()               { *m = IPPathMtuGet{} }
1260 func (*IPPathMtuGet) GetMessageName() string { return "ip_path_mtu_get" }
1261 func (*IPPathMtuGet) GetCrcString() string   { return "f75ba505" }
1262 func (*IPPathMtuGet) GetMessageType() api.MessageType {
1263         return api.RequestMessage
1264 }
1265
1266 func (m *IPPathMtuGet) Size() (size int) {
1267         if m == nil {
1268                 return 0
1269         }
1270         size += 4 // m.Cursor
1271         return size
1272 }
1273 func (m *IPPathMtuGet) Marshal(b []byte) ([]byte, error) {
1274         if b == nil {
1275                 b = make([]byte, m.Size())
1276         }
1277         buf := codec.NewBuffer(b)
1278         buf.EncodeUint32(m.Cursor)
1279         return buf.Bytes(), nil
1280 }
1281 func (m *IPPathMtuGet) Unmarshal(b []byte) error {
1282         buf := codec.NewBuffer(b)
1283         m.Cursor = buf.DecodeUint32()
1284         return nil
1285 }
1286
1287 // IPPathMtuGetReply defines message 'ip_path_mtu_get_reply'.
1288 type IPPathMtuGetReply struct {
1289         Retval int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
1290         Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
1291 }
1292
1293 func (m *IPPathMtuGetReply) Reset()               { *m = IPPathMtuGetReply{} }
1294 func (*IPPathMtuGetReply) GetMessageName() string { return "ip_path_mtu_get_reply" }
1295 func (*IPPathMtuGetReply) GetCrcString() string   { return "53b48f5d" }
1296 func (*IPPathMtuGetReply) GetMessageType() api.MessageType {
1297         return api.ReplyMessage
1298 }
1299
1300 func (m *IPPathMtuGetReply) Size() (size int) {
1301         if m == nil {
1302                 return 0
1303         }
1304         size += 4 // m.Retval
1305         size += 4 // m.Cursor
1306         return size
1307 }
1308 func (m *IPPathMtuGetReply) Marshal(b []byte) ([]byte, error) {
1309         if b == nil {
1310                 b = make([]byte, m.Size())
1311         }
1312         buf := codec.NewBuffer(b)
1313         buf.EncodeInt32(m.Retval)
1314         buf.EncodeUint32(m.Cursor)
1315         return buf.Bytes(), nil
1316 }
1317 func (m *IPPathMtuGetReply) Unmarshal(b []byte) error {
1318         buf := codec.NewBuffer(b)
1319         m.Retval = buf.DecodeInt32()
1320         m.Cursor = buf.DecodeUint32()
1321         return nil
1322 }
1323
1324 // IPPathMtuReplaceBegin defines message 'ip_path_mtu_replace_begin'.
1325 type IPPathMtuReplaceBegin struct{}
1326
1327 func (m *IPPathMtuReplaceBegin) Reset()               { *m = IPPathMtuReplaceBegin{} }
1328 func (*IPPathMtuReplaceBegin) GetMessageName() string { return "ip_path_mtu_replace_begin" }
1329 func (*IPPathMtuReplaceBegin) GetCrcString() string   { return "51077d14" }
1330 func (*IPPathMtuReplaceBegin) GetMessageType() api.MessageType {
1331         return api.RequestMessage
1332 }
1333
1334 func (m *IPPathMtuReplaceBegin) Size() (size int) {
1335         if m == nil {
1336                 return 0
1337         }
1338         return size
1339 }
1340 func (m *IPPathMtuReplaceBegin) Marshal(b []byte) ([]byte, error) {
1341         if b == nil {
1342                 b = make([]byte, m.Size())
1343         }
1344         buf := codec.NewBuffer(b)
1345         return buf.Bytes(), nil
1346 }
1347 func (m *IPPathMtuReplaceBegin) Unmarshal(b []byte) error {
1348         return nil
1349 }
1350
1351 // IPPathMtuReplaceBeginReply defines message 'ip_path_mtu_replace_begin_reply'.
1352 type IPPathMtuReplaceBeginReply struct {
1353         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1354 }
1355
1356 func (m *IPPathMtuReplaceBeginReply) Reset()               { *m = IPPathMtuReplaceBeginReply{} }
1357 func (*IPPathMtuReplaceBeginReply) GetMessageName() string { return "ip_path_mtu_replace_begin_reply" }
1358 func (*IPPathMtuReplaceBeginReply) GetCrcString() string   { return "e8d4e804" }
1359 func (*IPPathMtuReplaceBeginReply) GetMessageType() api.MessageType {
1360         return api.ReplyMessage
1361 }
1362
1363 func (m *IPPathMtuReplaceBeginReply) Size() (size int) {
1364         if m == nil {
1365                 return 0
1366         }
1367         size += 4 // m.Retval
1368         return size
1369 }
1370 func (m *IPPathMtuReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
1371         if b == nil {
1372                 b = make([]byte, m.Size())
1373         }
1374         buf := codec.NewBuffer(b)
1375         buf.EncodeInt32(m.Retval)
1376         return buf.Bytes(), nil
1377 }
1378 func (m *IPPathMtuReplaceBeginReply) Unmarshal(b []byte) error {
1379         buf := codec.NewBuffer(b)
1380         m.Retval = buf.DecodeInt32()
1381         return nil
1382 }
1383
1384 // IPPathMtuReplaceEnd defines message 'ip_path_mtu_replace_end'.
1385 type IPPathMtuReplaceEnd struct{}
1386
1387 func (m *IPPathMtuReplaceEnd) Reset()               { *m = IPPathMtuReplaceEnd{} }
1388 func (*IPPathMtuReplaceEnd) GetMessageName() string { return "ip_path_mtu_replace_end" }
1389 func (*IPPathMtuReplaceEnd) GetCrcString() string   { return "51077d14" }
1390 func (*IPPathMtuReplaceEnd) GetMessageType() api.MessageType {
1391         return api.RequestMessage
1392 }
1393
1394 func (m *IPPathMtuReplaceEnd) Size() (size int) {
1395         if m == nil {
1396                 return 0
1397         }
1398         return size
1399 }
1400 func (m *IPPathMtuReplaceEnd) Marshal(b []byte) ([]byte, error) {
1401         if b == nil {
1402                 b = make([]byte, m.Size())
1403         }
1404         buf := codec.NewBuffer(b)
1405         return buf.Bytes(), nil
1406 }
1407 func (m *IPPathMtuReplaceEnd) Unmarshal(b []byte) error {
1408         return nil
1409 }
1410
1411 // IPPathMtuReplaceEndReply defines message 'ip_path_mtu_replace_end_reply'.
1412 type IPPathMtuReplaceEndReply struct {
1413         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1414 }
1415
1416 func (m *IPPathMtuReplaceEndReply) Reset()               { *m = IPPathMtuReplaceEndReply{} }
1417 func (*IPPathMtuReplaceEndReply) GetMessageName() string { return "ip_path_mtu_replace_end_reply" }
1418 func (*IPPathMtuReplaceEndReply) GetCrcString() string   { return "e8d4e804" }
1419 func (*IPPathMtuReplaceEndReply) GetMessageType() api.MessageType {
1420         return api.ReplyMessage
1421 }
1422
1423 func (m *IPPathMtuReplaceEndReply) Size() (size int) {
1424         if m == nil {
1425                 return 0
1426         }
1427         size += 4 // m.Retval
1428         return size
1429 }
1430 func (m *IPPathMtuReplaceEndReply) Marshal(b []byte) ([]byte, error) {
1431         if b == nil {
1432                 b = make([]byte, m.Size())
1433         }
1434         buf := codec.NewBuffer(b)
1435         buf.EncodeInt32(m.Retval)
1436         return buf.Bytes(), nil
1437 }
1438 func (m *IPPathMtuReplaceEndReply) Unmarshal(b []byte) error {
1439         buf := codec.NewBuffer(b)
1440         m.Retval = buf.DecodeInt32()
1441         return nil
1442 }
1443
1444 // IPPathMtuUpdate defines message 'ip_path_mtu_update'.
1445 type IPPathMtuUpdate struct {
1446         Pmtu IPPathMtu `binapi:"ip_path_mtu,name=pmtu" json:"pmtu,omitempty"`
1447 }
1448
1449 func (m *IPPathMtuUpdate) Reset()               { *m = IPPathMtuUpdate{} }
1450 func (*IPPathMtuUpdate) GetMessageName() string { return "ip_path_mtu_update" }
1451 func (*IPPathMtuUpdate) GetCrcString() string   { return "10bbe5cb" }
1452 func (*IPPathMtuUpdate) GetMessageType() api.MessageType {
1453         return api.RequestMessage
1454 }
1455
1456 func (m *IPPathMtuUpdate) Size() (size int) {
1457         if m == nil {
1458                 return 0
1459         }
1460         size += 4      // m.Pmtu.ClientIndex
1461         size += 4      // m.Pmtu.Context
1462         size += 4      // m.Pmtu.TableID
1463         size += 1      // m.Pmtu.Nh.Af
1464         size += 1 * 16 // m.Pmtu.Nh.Un
1465         size += 2      // m.Pmtu.PathMtu
1466         return size
1467 }
1468 func (m *IPPathMtuUpdate) Marshal(b []byte) ([]byte, error) {
1469         if b == nil {
1470                 b = make([]byte, m.Size())
1471         }
1472         buf := codec.NewBuffer(b)
1473         buf.EncodeUint32(m.Pmtu.ClientIndex)
1474         buf.EncodeUint32(m.Pmtu.Context)
1475         buf.EncodeUint32(m.Pmtu.TableID)
1476         buf.EncodeUint8(uint8(m.Pmtu.Nh.Af))
1477         buf.EncodeBytes(m.Pmtu.Nh.Un.XXX_UnionData[:], 16)
1478         buf.EncodeUint16(m.Pmtu.PathMtu)
1479         return buf.Bytes(), nil
1480 }
1481 func (m *IPPathMtuUpdate) Unmarshal(b []byte) error {
1482         buf := codec.NewBuffer(b)
1483         m.Pmtu.ClientIndex = buf.DecodeUint32()
1484         m.Pmtu.Context = buf.DecodeUint32()
1485         m.Pmtu.TableID = buf.DecodeUint32()
1486         m.Pmtu.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1487         copy(m.Pmtu.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1488         m.Pmtu.PathMtu = buf.DecodeUint16()
1489         return nil
1490 }
1491
1492 // IPPathMtuUpdateReply defines message 'ip_path_mtu_update_reply'.
1493 type IPPathMtuUpdateReply struct {
1494         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1495 }
1496
1497 func (m *IPPathMtuUpdateReply) Reset()               { *m = IPPathMtuUpdateReply{} }
1498 func (*IPPathMtuUpdateReply) GetMessageName() string { return "ip_path_mtu_update_reply" }
1499 func (*IPPathMtuUpdateReply) GetCrcString() string   { return "e8d4e804" }
1500 func (*IPPathMtuUpdateReply) GetMessageType() api.MessageType {
1501         return api.ReplyMessage
1502 }
1503
1504 func (m *IPPathMtuUpdateReply) Size() (size int) {
1505         if m == nil {
1506                 return 0
1507         }
1508         size += 4 // m.Retval
1509         return size
1510 }
1511 func (m *IPPathMtuUpdateReply) Marshal(b []byte) ([]byte, error) {
1512         if b == nil {
1513                 b = make([]byte, m.Size())
1514         }
1515         buf := codec.NewBuffer(b)
1516         buf.EncodeInt32(m.Retval)
1517         return buf.Bytes(), nil
1518 }
1519 func (m *IPPathMtuUpdateReply) Unmarshal(b []byte) error {
1520         buf := codec.NewBuffer(b)
1521         m.Retval = buf.DecodeInt32()
1522         return nil
1523 }
1524
1525 // IPPuntPolice defines message 'ip_punt_police'.
1526 type IPPuntPolice struct {
1527         PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"`
1528         IsAdd        bool   `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1529         IsIP6        bool   `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1530 }
1531
1532 func (m *IPPuntPolice) Reset()               { *m = IPPuntPolice{} }
1533 func (*IPPuntPolice) GetMessageName() string { return "ip_punt_police" }
1534 func (*IPPuntPolice) GetCrcString() string   { return "db867cea" }
1535 func (*IPPuntPolice) GetMessageType() api.MessageType {
1536         return api.RequestMessage
1537 }
1538
1539 func (m *IPPuntPolice) Size() (size int) {
1540         if m == nil {
1541                 return 0
1542         }
1543         size += 4 // m.PolicerIndex
1544         size += 1 // m.IsAdd
1545         size += 1 // m.IsIP6
1546         return size
1547 }
1548 func (m *IPPuntPolice) Marshal(b []byte) ([]byte, error) {
1549         if b == nil {
1550                 b = make([]byte, m.Size())
1551         }
1552         buf := codec.NewBuffer(b)
1553         buf.EncodeUint32(m.PolicerIndex)
1554         buf.EncodeBool(m.IsAdd)
1555         buf.EncodeBool(m.IsIP6)
1556         return buf.Bytes(), nil
1557 }
1558 func (m *IPPuntPolice) Unmarshal(b []byte) error {
1559         buf := codec.NewBuffer(b)
1560         m.PolicerIndex = buf.DecodeUint32()
1561         m.IsAdd = buf.DecodeBool()
1562         m.IsIP6 = buf.DecodeBool()
1563         return nil
1564 }
1565
1566 // IPPuntPoliceReply defines message 'ip_punt_police_reply'.
1567 type IPPuntPoliceReply struct {
1568         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1569 }
1570
1571 func (m *IPPuntPoliceReply) Reset()               { *m = IPPuntPoliceReply{} }
1572 func (*IPPuntPoliceReply) GetMessageName() string { return "ip_punt_police_reply" }
1573 func (*IPPuntPoliceReply) GetCrcString() string   { return "e8d4e804" }
1574 func (*IPPuntPoliceReply) GetMessageType() api.MessageType {
1575         return api.ReplyMessage
1576 }
1577
1578 func (m *IPPuntPoliceReply) Size() (size int) {
1579         if m == nil {
1580                 return 0
1581         }
1582         size += 4 // m.Retval
1583         return size
1584 }
1585 func (m *IPPuntPoliceReply) Marshal(b []byte) ([]byte, error) {
1586         if b == nil {
1587                 b = make([]byte, m.Size())
1588         }
1589         buf := codec.NewBuffer(b)
1590         buf.EncodeInt32(m.Retval)
1591         return buf.Bytes(), nil
1592 }
1593 func (m *IPPuntPoliceReply) Unmarshal(b []byte) error {
1594         buf := codec.NewBuffer(b)
1595         m.Retval = buf.DecodeInt32()
1596         return nil
1597 }
1598
1599 // IPPuntRedirect defines message 'ip_punt_redirect'.
1600 // Deprecated: the message will be removed in the future versions
1601 type IPPuntRedirect struct {
1602         Punt  PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
1603         IsAdd bool         `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1604 }
1605
1606 func (m *IPPuntRedirect) Reset()               { *m = IPPuntRedirect{} }
1607 func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" }
1608 func (*IPPuntRedirect) GetCrcString() string   { return "6580f635" }
1609 func (*IPPuntRedirect) GetMessageType() api.MessageType {
1610         return api.RequestMessage
1611 }
1612
1613 func (m *IPPuntRedirect) Size() (size int) {
1614         if m == nil {
1615                 return 0
1616         }
1617         size += 4      // m.Punt.RxSwIfIndex
1618         size += 4      // m.Punt.TxSwIfIndex
1619         size += 1      // m.Punt.Nh.Af
1620         size += 1 * 16 // m.Punt.Nh.Un
1621         size += 1      // m.IsAdd
1622         return size
1623 }
1624 func (m *IPPuntRedirect) Marshal(b []byte) ([]byte, error) {
1625         if b == nil {
1626                 b = make([]byte, m.Size())
1627         }
1628         buf := codec.NewBuffer(b)
1629         buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1630         buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
1631         buf.EncodeUint8(uint8(m.Punt.Nh.Af))
1632         buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16)
1633         buf.EncodeBool(m.IsAdd)
1634         return buf.Bytes(), nil
1635 }
1636 func (m *IPPuntRedirect) Unmarshal(b []byte) error {
1637         buf := codec.NewBuffer(b)
1638         m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1639         m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1640         m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1641         copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1642         m.IsAdd = buf.DecodeBool()
1643         return nil
1644 }
1645
1646 // IPPuntRedirectDetails defines message 'ip_punt_redirect_details'.
1647 type IPPuntRedirectDetails struct {
1648         Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
1649 }
1650
1651 func (m *IPPuntRedirectDetails) Reset()               { *m = IPPuntRedirectDetails{} }
1652 func (*IPPuntRedirectDetails) GetMessageName() string { return "ip_punt_redirect_details" }
1653 func (*IPPuntRedirectDetails) GetCrcString() string   { return "2cef63e7" }
1654 func (*IPPuntRedirectDetails) GetMessageType() api.MessageType {
1655         return api.ReplyMessage
1656 }
1657
1658 func (m *IPPuntRedirectDetails) Size() (size int) {
1659         if m == nil {
1660                 return 0
1661         }
1662         size += 4      // m.Punt.RxSwIfIndex
1663         size += 4      // m.Punt.TxSwIfIndex
1664         size += 1      // m.Punt.Nh.Af
1665         size += 1 * 16 // m.Punt.Nh.Un
1666         return size
1667 }
1668 func (m *IPPuntRedirectDetails) Marshal(b []byte) ([]byte, error) {
1669         if b == nil {
1670                 b = make([]byte, m.Size())
1671         }
1672         buf := codec.NewBuffer(b)
1673         buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1674         buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
1675         buf.EncodeUint8(uint8(m.Punt.Nh.Af))
1676         buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16)
1677         return buf.Bytes(), nil
1678 }
1679 func (m *IPPuntRedirectDetails) Unmarshal(b []byte) error {
1680         buf := codec.NewBuffer(b)
1681         m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1682         m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1683         m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1684         copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1685         return nil
1686 }
1687
1688 // IPPuntRedirectDump defines message 'ip_punt_redirect_dump'.
1689 type IPPuntRedirectDump struct {
1690         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1691         IsIPv6    bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
1692 }
1693
1694 func (m *IPPuntRedirectDump) Reset()               { *m = IPPuntRedirectDump{} }
1695 func (*IPPuntRedirectDump) GetMessageName() string { return "ip_punt_redirect_dump" }
1696 func (*IPPuntRedirectDump) GetCrcString() string   { return "2d033de4" }
1697 func (*IPPuntRedirectDump) GetMessageType() api.MessageType {
1698         return api.RequestMessage
1699 }
1700
1701 func (m *IPPuntRedirectDump) Size() (size int) {
1702         if m == nil {
1703                 return 0
1704         }
1705         size += 4 // m.SwIfIndex
1706         size += 1 // m.IsIPv6
1707         return size
1708 }
1709 func (m *IPPuntRedirectDump) Marshal(b []byte) ([]byte, error) {
1710         if b == nil {
1711                 b = make([]byte, m.Size())
1712         }
1713         buf := codec.NewBuffer(b)
1714         buf.EncodeUint32(uint32(m.SwIfIndex))
1715         buf.EncodeBool(m.IsIPv6)
1716         return buf.Bytes(), nil
1717 }
1718 func (m *IPPuntRedirectDump) Unmarshal(b []byte) error {
1719         buf := codec.NewBuffer(b)
1720         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1721         m.IsIPv6 = buf.DecodeBool()
1722         return nil
1723 }
1724
1725 // IPPuntRedirectReply defines message 'ip_punt_redirect_reply'.
1726 // Deprecated: the message will be removed in the future versions
1727 type IPPuntRedirectReply struct {
1728         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1729 }
1730
1731 func (m *IPPuntRedirectReply) Reset()               { *m = IPPuntRedirectReply{} }
1732 func (*IPPuntRedirectReply) GetMessageName() string { return "ip_punt_redirect_reply" }
1733 func (*IPPuntRedirectReply) GetCrcString() string   { return "e8d4e804" }
1734 func (*IPPuntRedirectReply) GetMessageType() api.MessageType {
1735         return api.ReplyMessage
1736 }
1737
1738 func (m *IPPuntRedirectReply) Size() (size int) {
1739         if m == nil {
1740                 return 0
1741         }
1742         size += 4 // m.Retval
1743         return size
1744 }
1745 func (m *IPPuntRedirectReply) Marshal(b []byte) ([]byte, error) {
1746         if b == nil {
1747                 b = make([]byte, m.Size())
1748         }
1749         buf := codec.NewBuffer(b)
1750         buf.EncodeInt32(m.Retval)
1751         return buf.Bytes(), nil
1752 }
1753 func (m *IPPuntRedirectReply) Unmarshal(b []byte) error {
1754         buf := codec.NewBuffer(b)
1755         m.Retval = buf.DecodeInt32()
1756         return nil
1757 }
1758
1759 // IPPuntRedirectV2Details defines message 'ip_punt_redirect_v2_details'.
1760 type IPPuntRedirectV2Details struct {
1761         Punt PuntRedirectV2 `binapi:"punt_redirect_v2,name=punt" json:"punt,omitempty"`
1762 }
1763
1764 func (m *IPPuntRedirectV2Details) Reset()               { *m = IPPuntRedirectV2Details{} }
1765 func (*IPPuntRedirectV2Details) GetMessageName() string { return "ip_punt_redirect_v2_details" }
1766 func (*IPPuntRedirectV2Details) GetCrcString() string   { return "7ba42e1d" }
1767 func (*IPPuntRedirectV2Details) GetMessageType() api.MessageType {
1768         return api.ReplyMessage
1769 }
1770
1771 func (m *IPPuntRedirectV2Details) Size() (size int) {
1772         if m == nil {
1773                 return 0
1774         }
1775         size += 4 // m.Punt.RxSwIfIndex
1776         size += 1 // m.Punt.Af
1777         size += 4 // m.Punt.NPaths
1778         for j2 := 0; j2 < len(m.Punt.Paths); j2++ {
1779                 var s2 fib_types.FibPath
1780                 _ = s2
1781                 if j2 < len(m.Punt.Paths) {
1782                         s2 = m.Punt.Paths[j2]
1783                 }
1784                 size += 4      // s2.SwIfIndex
1785                 size += 4      // s2.TableID
1786                 size += 4      // s2.RpfID
1787                 size += 1      // s2.Weight
1788                 size += 1      // s2.Preference
1789                 size += 4      // s2.Type
1790                 size += 4      // s2.Flags
1791                 size += 4      // s2.Proto
1792                 size += 1 * 16 // s2.Nh.Address
1793                 size += 4      // s2.Nh.ViaLabel
1794                 size += 4      // s2.Nh.ObjID
1795                 size += 4      // s2.Nh.ClassifyTableIndex
1796                 size += 1      // s2.NLabels
1797                 for j3 := 0; j3 < 16; j3++ {
1798                         size += 1 // s2.LabelStack[j3].IsUniform
1799                         size += 4 // s2.LabelStack[j3].Label
1800                         size += 1 // s2.LabelStack[j3].TTL
1801                         size += 1 // s2.LabelStack[j3].Exp
1802                 }
1803         }
1804         return size
1805 }
1806 func (m *IPPuntRedirectV2Details) Marshal(b []byte) ([]byte, error) {
1807         if b == nil {
1808                 b = make([]byte, m.Size())
1809         }
1810         buf := codec.NewBuffer(b)
1811         buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1812         buf.EncodeUint8(uint8(m.Punt.Af))
1813         buf.EncodeUint32(uint32(len(m.Punt.Paths)))
1814         for j1 := 0; j1 < len(m.Punt.Paths); j1++ {
1815                 var v1 fib_types.FibPath // Paths
1816                 if j1 < len(m.Punt.Paths) {
1817                         v1 = m.Punt.Paths[j1]
1818                 }
1819                 buf.EncodeUint32(v1.SwIfIndex)
1820                 buf.EncodeUint32(v1.TableID)
1821                 buf.EncodeUint32(v1.RpfID)
1822                 buf.EncodeUint8(v1.Weight)
1823                 buf.EncodeUint8(v1.Preference)
1824                 buf.EncodeUint32(uint32(v1.Type))
1825                 buf.EncodeUint32(uint32(v1.Flags))
1826                 buf.EncodeUint32(uint32(v1.Proto))
1827                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
1828                 buf.EncodeUint32(v1.Nh.ViaLabel)
1829                 buf.EncodeUint32(v1.Nh.ObjID)
1830                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
1831                 buf.EncodeUint8(v1.NLabels)
1832                 for j2 := 0; j2 < 16; j2++ {
1833                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
1834                         buf.EncodeUint32(v1.LabelStack[j2].Label)
1835                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
1836                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
1837                 }
1838         }
1839         return buf.Bytes(), nil
1840 }
1841 func (m *IPPuntRedirectV2Details) Unmarshal(b []byte) error {
1842         buf := codec.NewBuffer(b)
1843         m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1844         m.Punt.Af = ip_types.AddressFamily(buf.DecodeUint8())
1845         m.Punt.NPaths = buf.DecodeUint32()
1846         m.Punt.Paths = make([]fib_types.FibPath, m.Punt.NPaths)
1847         for j1 := 0; j1 < len(m.Punt.Paths); j1++ {
1848                 m.Punt.Paths[j1].SwIfIndex = buf.DecodeUint32()
1849                 m.Punt.Paths[j1].TableID = buf.DecodeUint32()
1850                 m.Punt.Paths[j1].RpfID = buf.DecodeUint32()
1851                 m.Punt.Paths[j1].Weight = buf.DecodeUint8()
1852                 m.Punt.Paths[j1].Preference = buf.DecodeUint8()
1853                 m.Punt.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
1854                 m.Punt.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1855                 m.Punt.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1856                 copy(m.Punt.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1857                 m.Punt.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
1858                 m.Punt.Paths[j1].Nh.ObjID = buf.DecodeUint32()
1859                 m.Punt.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
1860                 m.Punt.Paths[j1].NLabels = buf.DecodeUint8()
1861                 for j2 := 0; j2 < 16; j2++ {
1862                         m.Punt.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
1863                         m.Punt.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
1864                         m.Punt.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
1865                         m.Punt.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1866                 }
1867         }
1868         return nil
1869 }
1870
1871 // IPPuntRedirectV2Dump defines message 'ip_punt_redirect_v2_dump'.
1872 type IPPuntRedirectV2Dump struct {
1873         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1874         Af        ip_types.AddressFamily         `binapi:"address_family,name=af" json:"af,omitempty"`
1875 }
1876
1877 func (m *IPPuntRedirectV2Dump) Reset()               { *m = IPPuntRedirectV2Dump{} }
1878 func (*IPPuntRedirectV2Dump) GetMessageName() string { return "ip_punt_redirect_v2_dump" }
1879 func (*IPPuntRedirectV2Dump) GetCrcString() string   { return "d817a484" }
1880 func (*IPPuntRedirectV2Dump) GetMessageType() api.MessageType {
1881         return api.RequestMessage
1882 }
1883
1884 func (m *IPPuntRedirectV2Dump) Size() (size int) {
1885         if m == nil {
1886                 return 0
1887         }
1888         size += 4 // m.SwIfIndex
1889         size += 1 // m.Af
1890         return size
1891 }
1892 func (m *IPPuntRedirectV2Dump) Marshal(b []byte) ([]byte, error) {
1893         if b == nil {
1894                 b = make([]byte, m.Size())
1895         }
1896         buf := codec.NewBuffer(b)
1897         buf.EncodeUint32(uint32(m.SwIfIndex))
1898         buf.EncodeUint8(uint8(m.Af))
1899         return buf.Bytes(), nil
1900 }
1901 func (m *IPPuntRedirectV2Dump) Unmarshal(b []byte) error {
1902         buf := codec.NewBuffer(b)
1903         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1904         m.Af = ip_types.AddressFamily(buf.DecodeUint8())
1905         return nil
1906 }
1907
1908 // IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'.
1909 type IPReassemblyEnableDisable struct {
1910         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1911         EnableIP4 bool                           `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"`
1912         EnableIP6 bool                           `binapi:"bool,name=enable_ip6" json:"enable_ip6,omitempty"`
1913         Type      IPReassType                    `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1914 }
1915
1916 func (m *IPReassemblyEnableDisable) Reset()               { *m = IPReassemblyEnableDisable{} }
1917 func (*IPReassemblyEnableDisable) GetMessageName() string { return "ip_reassembly_enable_disable" }
1918 func (*IPReassemblyEnableDisable) GetCrcString() string   { return "eb77968d" }
1919 func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType {
1920         return api.RequestMessage
1921 }
1922
1923 func (m *IPReassemblyEnableDisable) Size() (size int) {
1924         if m == nil {
1925                 return 0
1926         }
1927         size += 4 // m.SwIfIndex
1928         size += 1 // m.EnableIP4
1929         size += 1 // m.EnableIP6
1930         size += 4 // m.Type
1931         return size
1932 }
1933 func (m *IPReassemblyEnableDisable) Marshal(b []byte) ([]byte, error) {
1934         if b == nil {
1935                 b = make([]byte, m.Size())
1936         }
1937         buf := codec.NewBuffer(b)
1938         buf.EncodeUint32(uint32(m.SwIfIndex))
1939         buf.EncodeBool(m.EnableIP4)
1940         buf.EncodeBool(m.EnableIP6)
1941         buf.EncodeUint32(uint32(m.Type))
1942         return buf.Bytes(), nil
1943 }
1944 func (m *IPReassemblyEnableDisable) Unmarshal(b []byte) error {
1945         buf := codec.NewBuffer(b)
1946         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1947         m.EnableIP4 = buf.DecodeBool()
1948         m.EnableIP6 = buf.DecodeBool()
1949         m.Type = IPReassType(buf.DecodeUint32())
1950         return nil
1951 }
1952
1953 // IPReassemblyEnableDisableReply defines message 'ip_reassembly_enable_disable_reply'.
1954 type IPReassemblyEnableDisableReply struct {
1955         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1956 }
1957
1958 func (m *IPReassemblyEnableDisableReply) Reset() { *m = IPReassemblyEnableDisableReply{} }
1959 func (*IPReassemblyEnableDisableReply) GetMessageName() string {
1960         return "ip_reassembly_enable_disable_reply"
1961 }
1962 func (*IPReassemblyEnableDisableReply) GetCrcString() string { return "e8d4e804" }
1963 func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType {
1964         return api.ReplyMessage
1965 }
1966
1967 func (m *IPReassemblyEnableDisableReply) Size() (size int) {
1968         if m == nil {
1969                 return 0
1970         }
1971         size += 4 // m.Retval
1972         return size
1973 }
1974 func (m *IPReassemblyEnableDisableReply) Marshal(b []byte) ([]byte, error) {
1975         if b == nil {
1976                 b = make([]byte, m.Size())
1977         }
1978         buf := codec.NewBuffer(b)
1979         buf.EncodeInt32(m.Retval)
1980         return buf.Bytes(), nil
1981 }
1982 func (m *IPReassemblyEnableDisableReply) Unmarshal(b []byte) error {
1983         buf := codec.NewBuffer(b)
1984         m.Retval = buf.DecodeInt32()
1985         return nil
1986 }
1987
1988 // IPReassemblyGet defines message 'ip_reassembly_get'.
1989 type IPReassemblyGet struct {
1990         IsIP6 bool        `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1991         Type  IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1992 }
1993
1994 func (m *IPReassemblyGet) Reset()               { *m = IPReassemblyGet{} }
1995 func (*IPReassemblyGet) GetMessageName() string { return "ip_reassembly_get" }
1996 func (*IPReassemblyGet) GetCrcString() string   { return "ea13ff63" }
1997 func (*IPReassemblyGet) GetMessageType() api.MessageType {
1998         return api.RequestMessage
1999 }
2000
2001 func (m *IPReassemblyGet) Size() (size int) {
2002         if m == nil {
2003                 return 0
2004         }
2005         size += 1 // m.IsIP6
2006         size += 4 // m.Type
2007         return size
2008 }
2009 func (m *IPReassemblyGet) Marshal(b []byte) ([]byte, error) {
2010         if b == nil {
2011                 b = make([]byte, m.Size())
2012         }
2013         buf := codec.NewBuffer(b)
2014         buf.EncodeBool(m.IsIP6)
2015         buf.EncodeUint32(uint32(m.Type))
2016         return buf.Bytes(), nil
2017 }
2018 func (m *IPReassemblyGet) Unmarshal(b []byte) error {
2019         buf := codec.NewBuffer(b)
2020         m.IsIP6 = buf.DecodeBool()
2021         m.Type = IPReassType(buf.DecodeUint32())
2022         return nil
2023 }
2024
2025 // IPReassemblyGetReply defines message 'ip_reassembly_get_reply'.
2026 type IPReassemblyGetReply struct {
2027         Retval               int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
2028         TimeoutMs            uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
2029         MaxReassemblies      uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
2030         MaxReassemblyLength  uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
2031         ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
2032         IsIP6                bool   `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
2033 }
2034
2035 func (m *IPReassemblyGetReply) Reset()               { *m = IPReassemblyGetReply{} }
2036 func (*IPReassemblyGetReply) GetMessageName() string { return "ip_reassembly_get_reply" }
2037 func (*IPReassemblyGetReply) GetCrcString() string   { return "d5eb8d34" }
2038 func (*IPReassemblyGetReply) GetMessageType() api.MessageType {
2039         return api.ReplyMessage
2040 }
2041
2042 func (m *IPReassemblyGetReply) Size() (size int) {
2043         if m == nil {
2044                 return 0
2045         }
2046         size += 4 // m.Retval
2047         size += 4 // m.TimeoutMs
2048         size += 4 // m.MaxReassemblies
2049         size += 4 // m.MaxReassemblyLength
2050         size += 4 // m.ExpireWalkIntervalMs
2051         size += 1 // m.IsIP6
2052         return size
2053 }
2054 func (m *IPReassemblyGetReply) Marshal(b []byte) ([]byte, error) {
2055         if b == nil {
2056                 b = make([]byte, m.Size())
2057         }
2058         buf := codec.NewBuffer(b)
2059         buf.EncodeInt32(m.Retval)
2060         buf.EncodeUint32(m.TimeoutMs)
2061         buf.EncodeUint32(m.MaxReassemblies)
2062         buf.EncodeUint32(m.MaxReassemblyLength)
2063         buf.EncodeUint32(m.ExpireWalkIntervalMs)
2064         buf.EncodeBool(m.IsIP6)
2065         return buf.Bytes(), nil
2066 }
2067 func (m *IPReassemblyGetReply) Unmarshal(b []byte) error {
2068         buf := codec.NewBuffer(b)
2069         m.Retval = buf.DecodeInt32()
2070         m.TimeoutMs = buf.DecodeUint32()
2071         m.MaxReassemblies = buf.DecodeUint32()
2072         m.MaxReassemblyLength = buf.DecodeUint32()
2073         m.ExpireWalkIntervalMs = buf.DecodeUint32()
2074         m.IsIP6 = buf.DecodeBool()
2075         return nil
2076 }
2077
2078 // IPReassemblySet defines message 'ip_reassembly_set'.
2079 type IPReassemblySet struct {
2080         TimeoutMs            uint32      `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
2081         MaxReassemblies      uint32      `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
2082         MaxReassemblyLength  uint32      `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
2083         ExpireWalkIntervalMs uint32      `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
2084         IsIP6                bool        `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
2085         Type                 IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
2086 }
2087
2088 func (m *IPReassemblySet) Reset()               { *m = IPReassemblySet{} }
2089 func (*IPReassemblySet) GetMessageName() string { return "ip_reassembly_set" }
2090 func (*IPReassemblySet) GetCrcString() string   { return "16467d25" }
2091 func (*IPReassemblySet) GetMessageType() api.MessageType {
2092         return api.RequestMessage
2093 }
2094
2095 func (m *IPReassemblySet) Size() (size int) {
2096         if m == nil {
2097                 return 0
2098         }
2099         size += 4 // m.TimeoutMs
2100         size += 4 // m.MaxReassemblies
2101         size += 4 // m.MaxReassemblyLength
2102         size += 4 // m.ExpireWalkIntervalMs
2103         size += 1 // m.IsIP6
2104         size += 4 // m.Type
2105         return size
2106 }
2107 func (m *IPReassemblySet) Marshal(b []byte) ([]byte, error) {
2108         if b == nil {
2109                 b = make([]byte, m.Size())
2110         }
2111         buf := codec.NewBuffer(b)
2112         buf.EncodeUint32(m.TimeoutMs)
2113         buf.EncodeUint32(m.MaxReassemblies)
2114         buf.EncodeUint32(m.MaxReassemblyLength)
2115         buf.EncodeUint32(m.ExpireWalkIntervalMs)
2116         buf.EncodeBool(m.IsIP6)
2117         buf.EncodeUint32(uint32(m.Type))
2118         return buf.Bytes(), nil
2119 }
2120 func (m *IPReassemblySet) Unmarshal(b []byte) error {
2121         buf := codec.NewBuffer(b)
2122         m.TimeoutMs = buf.DecodeUint32()
2123         m.MaxReassemblies = buf.DecodeUint32()
2124         m.MaxReassemblyLength = buf.DecodeUint32()
2125         m.ExpireWalkIntervalMs = buf.DecodeUint32()
2126         m.IsIP6 = buf.DecodeBool()
2127         m.Type = IPReassType(buf.DecodeUint32())
2128         return nil
2129 }
2130
2131 // IPReassemblySetReply defines message 'ip_reassembly_set_reply'.
2132 type IPReassemblySetReply struct {
2133         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2134 }
2135
2136 func (m *IPReassemblySetReply) Reset()               { *m = IPReassemblySetReply{} }
2137 func (*IPReassemblySetReply) GetMessageName() string { return "ip_reassembly_set_reply" }
2138 func (*IPReassemblySetReply) GetCrcString() string   { return "e8d4e804" }
2139 func (*IPReassemblySetReply) GetMessageType() api.MessageType {
2140         return api.ReplyMessage
2141 }
2142
2143 func (m *IPReassemblySetReply) Size() (size int) {
2144         if m == nil {
2145                 return 0
2146         }
2147         size += 4 // m.Retval
2148         return size
2149 }
2150 func (m *IPReassemblySetReply) Marshal(b []byte) ([]byte, error) {
2151         if b == nil {
2152                 b = make([]byte, m.Size())
2153         }
2154         buf := codec.NewBuffer(b)
2155         buf.EncodeInt32(m.Retval)
2156         return buf.Bytes(), nil
2157 }
2158 func (m *IPReassemblySetReply) Unmarshal(b []byte) error {
2159         buf := codec.NewBuffer(b)
2160         m.Retval = buf.DecodeInt32()
2161         return nil
2162 }
2163
2164 // IPRouteAddDel defines message 'ip_route_add_del'.
2165 type IPRouteAddDel struct {
2166         IsAdd       bool    `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2167         IsMultipath bool    `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
2168         Route       IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
2169 }
2170
2171 func (m *IPRouteAddDel) Reset()               { *m = IPRouteAddDel{} }
2172 func (*IPRouteAddDel) GetMessageName() string { return "ip_route_add_del" }
2173 func (*IPRouteAddDel) GetCrcString() string   { return "b8ecfe0d" }
2174 func (*IPRouteAddDel) GetMessageType() api.MessageType {
2175         return api.RequestMessage
2176 }
2177
2178 func (m *IPRouteAddDel) Size() (size int) {
2179         if m == nil {
2180                 return 0
2181         }
2182         size += 1      // m.IsAdd
2183         size += 1      // m.IsMultipath
2184         size += 4      // m.Route.TableID
2185         size += 4      // m.Route.StatsIndex
2186         size += 1      // m.Route.Prefix.Address.Af
2187         size += 1 * 16 // m.Route.Prefix.Address.Un
2188         size += 1      // m.Route.Prefix.Len
2189         size += 1      // m.Route.NPaths
2190         for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2191                 var s2 fib_types.FibPath
2192                 _ = s2
2193                 if j2 < len(m.Route.Paths) {
2194                         s2 = m.Route.Paths[j2]
2195                 }
2196                 size += 4      // s2.SwIfIndex
2197                 size += 4      // s2.TableID
2198                 size += 4      // s2.RpfID
2199                 size += 1      // s2.Weight
2200                 size += 1      // s2.Preference
2201                 size += 4      // s2.Type
2202                 size += 4      // s2.Flags
2203                 size += 4      // s2.Proto
2204                 size += 1 * 16 // s2.Nh.Address
2205                 size += 4      // s2.Nh.ViaLabel
2206                 size += 4      // s2.Nh.ObjID
2207                 size += 4      // s2.Nh.ClassifyTableIndex
2208                 size += 1      // s2.NLabels
2209                 for j3 := 0; j3 < 16; j3++ {
2210                         size += 1 // s2.LabelStack[j3].IsUniform
2211                         size += 4 // s2.LabelStack[j3].Label
2212                         size += 1 // s2.LabelStack[j3].TTL
2213                         size += 1 // s2.LabelStack[j3].Exp
2214                 }
2215         }
2216         return size
2217 }
2218 func (m *IPRouteAddDel) Marshal(b []byte) ([]byte, error) {
2219         if b == nil {
2220                 b = make([]byte, m.Size())
2221         }
2222         buf := codec.NewBuffer(b)
2223         buf.EncodeBool(m.IsAdd)
2224         buf.EncodeBool(m.IsMultipath)
2225         buf.EncodeUint32(m.Route.TableID)
2226         buf.EncodeUint32(m.Route.StatsIndex)
2227         buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2228         buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2229         buf.EncodeUint8(m.Route.Prefix.Len)
2230         buf.EncodeUint8(uint8(len(m.Route.Paths)))
2231         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2232                 var v1 fib_types.FibPath // Paths
2233                 if j1 < len(m.Route.Paths) {
2234                         v1 = m.Route.Paths[j1]
2235                 }
2236                 buf.EncodeUint32(v1.SwIfIndex)
2237                 buf.EncodeUint32(v1.TableID)
2238                 buf.EncodeUint32(v1.RpfID)
2239                 buf.EncodeUint8(v1.Weight)
2240                 buf.EncodeUint8(v1.Preference)
2241                 buf.EncodeUint32(uint32(v1.Type))
2242                 buf.EncodeUint32(uint32(v1.Flags))
2243                 buf.EncodeUint32(uint32(v1.Proto))
2244                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2245                 buf.EncodeUint32(v1.Nh.ViaLabel)
2246                 buf.EncodeUint32(v1.Nh.ObjID)
2247                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2248                 buf.EncodeUint8(v1.NLabels)
2249                 for j2 := 0; j2 < 16; j2++ {
2250                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2251                         buf.EncodeUint32(v1.LabelStack[j2].Label)
2252                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
2253                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
2254                 }
2255         }
2256         return buf.Bytes(), nil
2257 }
2258 func (m *IPRouteAddDel) Unmarshal(b []byte) error {
2259         buf := codec.NewBuffer(b)
2260         m.IsAdd = buf.DecodeBool()
2261         m.IsMultipath = buf.DecodeBool()
2262         m.Route.TableID = buf.DecodeUint32()
2263         m.Route.StatsIndex = buf.DecodeUint32()
2264         m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2265         copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2266         m.Route.Prefix.Len = buf.DecodeUint8()
2267         m.Route.NPaths = buf.DecodeUint8()
2268         m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2269         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2270                 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2271                 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2272                 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2273                 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2274                 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2275                 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2276                 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2277                 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2278                 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2279                 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2280                 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2281                 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2282                 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2283                 for j2 := 0; j2 < 16; j2++ {
2284                         m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2285                         m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2286                         m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2287                         m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2288                 }
2289         }
2290         return nil
2291 }
2292
2293 // IPRouteAddDelReply defines message 'ip_route_add_del_reply'.
2294 type IPRouteAddDelReply struct {
2295         Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
2296         StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
2297 }
2298
2299 func (m *IPRouteAddDelReply) Reset()               { *m = IPRouteAddDelReply{} }
2300 func (*IPRouteAddDelReply) GetMessageName() string { return "ip_route_add_del_reply" }
2301 func (*IPRouteAddDelReply) GetCrcString() string   { return "1992deab" }
2302 func (*IPRouteAddDelReply) GetMessageType() api.MessageType {
2303         return api.ReplyMessage
2304 }
2305
2306 func (m *IPRouteAddDelReply) Size() (size int) {
2307         if m == nil {
2308                 return 0
2309         }
2310         size += 4 // m.Retval
2311         size += 4 // m.StatsIndex
2312         return size
2313 }
2314 func (m *IPRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
2315         if b == nil {
2316                 b = make([]byte, m.Size())
2317         }
2318         buf := codec.NewBuffer(b)
2319         buf.EncodeInt32(m.Retval)
2320         buf.EncodeUint32(m.StatsIndex)
2321         return buf.Bytes(), nil
2322 }
2323 func (m *IPRouteAddDelReply) Unmarshal(b []byte) error {
2324         buf := codec.NewBuffer(b)
2325         m.Retval = buf.DecodeInt32()
2326         m.StatsIndex = buf.DecodeUint32()
2327         return nil
2328 }
2329
2330 // IPRouteAddDelV2 defines message 'ip_route_add_del_v2'.
2331 // InProgress: the message form may change in the future versions
2332 type IPRouteAddDelV2 struct {
2333         IsAdd       bool      `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2334         IsMultipath bool      `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
2335         Route       IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"`
2336 }
2337
2338 func (m *IPRouteAddDelV2) Reset()               { *m = IPRouteAddDelV2{} }
2339 func (*IPRouteAddDelV2) GetMessageName() string { return "ip_route_add_del_v2" }
2340 func (*IPRouteAddDelV2) GetCrcString() string   { return "521ef330" }
2341 func (*IPRouteAddDelV2) GetMessageType() api.MessageType {
2342         return api.RequestMessage
2343 }
2344
2345 func (m *IPRouteAddDelV2) Size() (size int) {
2346         if m == nil {
2347                 return 0
2348         }
2349         size += 1      // m.IsAdd
2350         size += 1      // m.IsMultipath
2351         size += 4      // m.Route.TableID
2352         size += 4      // m.Route.StatsIndex
2353         size += 1      // m.Route.Prefix.Address.Af
2354         size += 1 * 16 // m.Route.Prefix.Address.Un
2355         size += 1      // m.Route.Prefix.Len
2356         size += 1      // m.Route.NPaths
2357         size += 1      // m.Route.Src
2358         for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2359                 var s2 fib_types.FibPath
2360                 _ = s2
2361                 if j2 < len(m.Route.Paths) {
2362                         s2 = m.Route.Paths[j2]
2363                 }
2364                 size += 4      // s2.SwIfIndex
2365                 size += 4      // s2.TableID
2366                 size += 4      // s2.RpfID
2367                 size += 1      // s2.Weight
2368                 size += 1      // s2.Preference
2369                 size += 4      // s2.Type
2370                 size += 4      // s2.Flags
2371                 size += 4      // s2.Proto
2372                 size += 1 * 16 // s2.Nh.Address
2373                 size += 4      // s2.Nh.ViaLabel
2374                 size += 4      // s2.Nh.ObjID
2375                 size += 4      // s2.Nh.ClassifyTableIndex
2376                 size += 1      // s2.NLabels
2377                 for j3 := 0; j3 < 16; j3++ {
2378                         size += 1 // s2.LabelStack[j3].IsUniform
2379                         size += 4 // s2.LabelStack[j3].Label
2380                         size += 1 // s2.LabelStack[j3].TTL
2381                         size += 1 // s2.LabelStack[j3].Exp
2382                 }
2383         }
2384         return size
2385 }
2386 func (m *IPRouteAddDelV2) Marshal(b []byte) ([]byte, error) {
2387         if b == nil {
2388                 b = make([]byte, m.Size())
2389         }
2390         buf := codec.NewBuffer(b)
2391         buf.EncodeBool(m.IsAdd)
2392         buf.EncodeBool(m.IsMultipath)
2393         buf.EncodeUint32(m.Route.TableID)
2394         buf.EncodeUint32(m.Route.StatsIndex)
2395         buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2396         buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2397         buf.EncodeUint8(m.Route.Prefix.Len)
2398         buf.EncodeUint8(uint8(len(m.Route.Paths)))
2399         buf.EncodeUint8(m.Route.Src)
2400         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2401                 var v1 fib_types.FibPath // Paths
2402                 if j1 < len(m.Route.Paths) {
2403                         v1 = m.Route.Paths[j1]
2404                 }
2405                 buf.EncodeUint32(v1.SwIfIndex)
2406                 buf.EncodeUint32(v1.TableID)
2407                 buf.EncodeUint32(v1.RpfID)
2408                 buf.EncodeUint8(v1.Weight)
2409                 buf.EncodeUint8(v1.Preference)
2410                 buf.EncodeUint32(uint32(v1.Type))
2411                 buf.EncodeUint32(uint32(v1.Flags))
2412                 buf.EncodeUint32(uint32(v1.Proto))
2413                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2414                 buf.EncodeUint32(v1.Nh.ViaLabel)
2415                 buf.EncodeUint32(v1.Nh.ObjID)
2416                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2417                 buf.EncodeUint8(v1.NLabels)
2418                 for j2 := 0; j2 < 16; j2++ {
2419                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2420                         buf.EncodeUint32(v1.LabelStack[j2].Label)
2421                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
2422                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
2423                 }
2424         }
2425         return buf.Bytes(), nil
2426 }
2427 func (m *IPRouteAddDelV2) Unmarshal(b []byte) error {
2428         buf := codec.NewBuffer(b)
2429         m.IsAdd = buf.DecodeBool()
2430         m.IsMultipath = buf.DecodeBool()
2431         m.Route.TableID = buf.DecodeUint32()
2432         m.Route.StatsIndex = buf.DecodeUint32()
2433         m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2434         copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2435         m.Route.Prefix.Len = buf.DecodeUint8()
2436         m.Route.NPaths = buf.DecodeUint8()
2437         m.Route.Src = buf.DecodeUint8()
2438         m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2439         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2440                 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2441                 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2442                 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2443                 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2444                 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2445                 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2446                 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2447                 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2448                 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2449                 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2450                 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2451                 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2452                 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2453                 for j2 := 0; j2 < 16; j2++ {
2454                         m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2455                         m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2456                         m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2457                         m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2458                 }
2459         }
2460         return nil
2461 }
2462
2463 // IPRouteAddDelV2Reply defines message 'ip_route_add_del_v2_reply'.
2464 // InProgress: the message form may change in the future versions
2465 type IPRouteAddDelV2Reply struct {
2466         Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
2467         StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
2468 }
2469
2470 func (m *IPRouteAddDelV2Reply) Reset()               { *m = IPRouteAddDelV2Reply{} }
2471 func (*IPRouteAddDelV2Reply) GetMessageName() string { return "ip_route_add_del_v2_reply" }
2472 func (*IPRouteAddDelV2Reply) GetCrcString() string   { return "1992deab" }
2473 func (*IPRouteAddDelV2Reply) GetMessageType() api.MessageType {
2474         return api.ReplyMessage
2475 }
2476
2477 func (m *IPRouteAddDelV2Reply) Size() (size int) {
2478         if m == nil {
2479                 return 0
2480         }
2481         size += 4 // m.Retval
2482         size += 4 // m.StatsIndex
2483         return size
2484 }
2485 func (m *IPRouteAddDelV2Reply) Marshal(b []byte) ([]byte, error) {
2486         if b == nil {
2487                 b = make([]byte, m.Size())
2488         }
2489         buf := codec.NewBuffer(b)
2490         buf.EncodeInt32(m.Retval)
2491         buf.EncodeUint32(m.StatsIndex)
2492         return buf.Bytes(), nil
2493 }
2494 func (m *IPRouteAddDelV2Reply) Unmarshal(b []byte) error {
2495         buf := codec.NewBuffer(b)
2496         m.Retval = buf.DecodeInt32()
2497         m.StatsIndex = buf.DecodeUint32()
2498         return nil
2499 }
2500
2501 // IPRouteDetails defines message 'ip_route_details'.
2502 type IPRouteDetails struct {
2503         Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
2504 }
2505
2506 func (m *IPRouteDetails) Reset()               { *m = IPRouteDetails{} }
2507 func (*IPRouteDetails) GetMessageName() string { return "ip_route_details" }
2508 func (*IPRouteDetails) GetCrcString() string   { return "bda8f315" }
2509 func (*IPRouteDetails) GetMessageType() api.MessageType {
2510         return api.ReplyMessage
2511 }
2512
2513 func (m *IPRouteDetails) Size() (size int) {
2514         if m == nil {
2515                 return 0
2516         }
2517         size += 4      // m.Route.TableID
2518         size += 4      // m.Route.StatsIndex
2519         size += 1      // m.Route.Prefix.Address.Af
2520         size += 1 * 16 // m.Route.Prefix.Address.Un
2521         size += 1      // m.Route.Prefix.Len
2522         size += 1      // m.Route.NPaths
2523         for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2524                 var s2 fib_types.FibPath
2525                 _ = s2
2526                 if j2 < len(m.Route.Paths) {
2527                         s2 = m.Route.Paths[j2]
2528                 }
2529                 size += 4      // s2.SwIfIndex
2530                 size += 4      // s2.TableID
2531                 size += 4      // s2.RpfID
2532                 size += 1      // s2.Weight
2533                 size += 1      // s2.Preference
2534                 size += 4      // s2.Type
2535                 size += 4      // s2.Flags
2536                 size += 4      // s2.Proto
2537                 size += 1 * 16 // s2.Nh.Address
2538                 size += 4      // s2.Nh.ViaLabel
2539                 size += 4      // s2.Nh.ObjID
2540                 size += 4      // s2.Nh.ClassifyTableIndex
2541                 size += 1      // s2.NLabels
2542                 for j3 := 0; j3 < 16; j3++ {
2543                         size += 1 // s2.LabelStack[j3].IsUniform
2544                         size += 4 // s2.LabelStack[j3].Label
2545                         size += 1 // s2.LabelStack[j3].TTL
2546                         size += 1 // s2.LabelStack[j3].Exp
2547                 }
2548         }
2549         return size
2550 }
2551 func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) {
2552         if b == nil {
2553                 b = make([]byte, m.Size())
2554         }
2555         buf := codec.NewBuffer(b)
2556         buf.EncodeUint32(m.Route.TableID)
2557         buf.EncodeUint32(m.Route.StatsIndex)
2558         buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2559         buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2560         buf.EncodeUint8(m.Route.Prefix.Len)
2561         buf.EncodeUint8(uint8(len(m.Route.Paths)))
2562         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2563                 var v1 fib_types.FibPath // Paths
2564                 if j1 < len(m.Route.Paths) {
2565                         v1 = m.Route.Paths[j1]
2566                 }
2567                 buf.EncodeUint32(v1.SwIfIndex)
2568                 buf.EncodeUint32(v1.TableID)
2569                 buf.EncodeUint32(v1.RpfID)
2570                 buf.EncodeUint8(v1.Weight)
2571                 buf.EncodeUint8(v1.Preference)
2572                 buf.EncodeUint32(uint32(v1.Type))
2573                 buf.EncodeUint32(uint32(v1.Flags))
2574                 buf.EncodeUint32(uint32(v1.Proto))
2575                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2576                 buf.EncodeUint32(v1.Nh.ViaLabel)
2577                 buf.EncodeUint32(v1.Nh.ObjID)
2578                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2579                 buf.EncodeUint8(v1.NLabels)
2580                 for j2 := 0; j2 < 16; j2++ {
2581                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2582                         buf.EncodeUint32(v1.LabelStack[j2].Label)
2583                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
2584                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
2585                 }
2586         }
2587         return buf.Bytes(), nil
2588 }
2589 func (m *IPRouteDetails) Unmarshal(b []byte) error {
2590         buf := codec.NewBuffer(b)
2591         m.Route.TableID = buf.DecodeUint32()
2592         m.Route.StatsIndex = buf.DecodeUint32()
2593         m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2594         copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2595         m.Route.Prefix.Len = buf.DecodeUint8()
2596         m.Route.NPaths = buf.DecodeUint8()
2597         m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2598         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2599                 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2600                 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2601                 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2602                 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2603                 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2604                 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2605                 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2606                 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2607                 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2608                 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2609                 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2610                 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2611                 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2612                 for j2 := 0; j2 < 16; j2++ {
2613                         m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2614                         m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2615                         m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2616                         m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2617                 }
2618         }
2619         return nil
2620 }
2621
2622 // IPRouteDump defines message 'ip_route_dump'.
2623 type IPRouteDump struct {
2624         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2625 }
2626
2627 func (m *IPRouteDump) Reset()               { *m = IPRouteDump{} }
2628 func (*IPRouteDump) GetMessageName() string { return "ip_route_dump" }
2629 func (*IPRouteDump) GetCrcString() string   { return "b9d2e09e" }
2630 func (*IPRouteDump) GetMessageType() api.MessageType {
2631         return api.RequestMessage
2632 }
2633
2634 func (m *IPRouteDump) Size() (size int) {
2635         if m == nil {
2636                 return 0
2637         }
2638         size += 4  // m.Table.TableID
2639         size += 1  // m.Table.IsIP6
2640         size += 64 // m.Table.Name
2641         return size
2642 }
2643 func (m *IPRouteDump) Marshal(b []byte) ([]byte, error) {
2644         if b == nil {
2645                 b = make([]byte, m.Size())
2646         }
2647         buf := codec.NewBuffer(b)
2648         buf.EncodeUint32(m.Table.TableID)
2649         buf.EncodeBool(m.Table.IsIP6)
2650         buf.EncodeString(m.Table.Name, 64)
2651         return buf.Bytes(), nil
2652 }
2653 func (m *IPRouteDump) Unmarshal(b []byte) error {
2654         buf := codec.NewBuffer(b)
2655         m.Table.TableID = buf.DecodeUint32()
2656         m.Table.IsIP6 = buf.DecodeBool()
2657         m.Table.Name = buf.DecodeString(64)
2658         return nil
2659 }
2660
2661 // IPRouteLookup defines message 'ip_route_lookup'.
2662 type IPRouteLookup struct {
2663         TableID uint32          `binapi:"u32,name=table_id" json:"table_id,omitempty"`
2664         Exact   uint8           `binapi:"u8,name=exact" json:"exact,omitempty"`
2665         Prefix  ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
2666 }
2667
2668 func (m *IPRouteLookup) Reset()               { *m = IPRouteLookup{} }
2669 func (*IPRouteLookup) GetMessageName() string { return "ip_route_lookup" }
2670 func (*IPRouteLookup) GetCrcString() string   { return "710d6471" }
2671 func (*IPRouteLookup) GetMessageType() api.MessageType {
2672         return api.RequestMessage
2673 }
2674
2675 func (m *IPRouteLookup) Size() (size int) {
2676         if m == nil {
2677                 return 0
2678         }
2679         size += 4      // m.TableID
2680         size += 1      // m.Exact
2681         size += 1      // m.Prefix.Address.Af
2682         size += 1 * 16 // m.Prefix.Address.Un
2683         size += 1      // m.Prefix.Len
2684         return size
2685 }
2686 func (m *IPRouteLookup) Marshal(b []byte) ([]byte, error) {
2687         if b == nil {
2688                 b = make([]byte, m.Size())
2689         }
2690         buf := codec.NewBuffer(b)
2691         buf.EncodeUint32(m.TableID)
2692         buf.EncodeUint8(m.Exact)
2693         buf.EncodeUint8(uint8(m.Prefix.Address.Af))
2694         buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
2695         buf.EncodeUint8(m.Prefix.Len)
2696         return buf.Bytes(), nil
2697 }
2698 func (m *IPRouteLookup) Unmarshal(b []byte) error {
2699         buf := codec.NewBuffer(b)
2700         m.TableID = buf.DecodeUint32()
2701         m.Exact = buf.DecodeUint8()
2702         m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2703         copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2704         m.Prefix.Len = buf.DecodeUint8()
2705         return nil
2706 }
2707
2708 // IPRouteLookupReply defines message 'ip_route_lookup_reply'.
2709 type IPRouteLookupReply struct {
2710         Retval int32   `binapi:"i32,name=retval" json:"retval,omitempty"`
2711         Route  IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
2712 }
2713
2714 func (m *IPRouteLookupReply) Reset()               { *m = IPRouteLookupReply{} }
2715 func (*IPRouteLookupReply) GetMessageName() string { return "ip_route_lookup_reply" }
2716 func (*IPRouteLookupReply) GetCrcString() string   { return "5d8febcb" }
2717 func (*IPRouteLookupReply) GetMessageType() api.MessageType {
2718         return api.ReplyMessage
2719 }
2720
2721 func (m *IPRouteLookupReply) Size() (size int) {
2722         if m == nil {
2723                 return 0
2724         }
2725         size += 4      // m.Retval
2726         size += 4      // m.Route.TableID
2727         size += 4      // m.Route.StatsIndex
2728         size += 1      // m.Route.Prefix.Address.Af
2729         size += 1 * 16 // m.Route.Prefix.Address.Un
2730         size += 1      // m.Route.Prefix.Len
2731         size += 1      // m.Route.NPaths
2732         for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2733                 var s2 fib_types.FibPath
2734                 _ = s2
2735                 if j2 < len(m.Route.Paths) {
2736                         s2 = m.Route.Paths[j2]
2737                 }
2738                 size += 4      // s2.SwIfIndex
2739                 size += 4      // s2.TableID
2740                 size += 4      // s2.RpfID
2741                 size += 1      // s2.Weight
2742                 size += 1      // s2.Preference
2743                 size += 4      // s2.Type
2744                 size += 4      // s2.Flags
2745                 size += 4      // s2.Proto
2746                 size += 1 * 16 // s2.Nh.Address
2747                 size += 4      // s2.Nh.ViaLabel
2748                 size += 4      // s2.Nh.ObjID
2749                 size += 4      // s2.Nh.ClassifyTableIndex
2750                 size += 1      // s2.NLabels
2751                 for j3 := 0; j3 < 16; j3++ {
2752                         size += 1 // s2.LabelStack[j3].IsUniform
2753                         size += 4 // s2.LabelStack[j3].Label
2754                         size += 1 // s2.LabelStack[j3].TTL
2755                         size += 1 // s2.LabelStack[j3].Exp
2756                 }
2757         }
2758         return size
2759 }
2760 func (m *IPRouteLookupReply) Marshal(b []byte) ([]byte, error) {
2761         if b == nil {
2762                 b = make([]byte, m.Size())
2763         }
2764         buf := codec.NewBuffer(b)
2765         buf.EncodeInt32(m.Retval)
2766         buf.EncodeUint32(m.Route.TableID)
2767         buf.EncodeUint32(m.Route.StatsIndex)
2768         buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2769         buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2770         buf.EncodeUint8(m.Route.Prefix.Len)
2771         buf.EncodeUint8(uint8(len(m.Route.Paths)))
2772         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2773                 var v1 fib_types.FibPath // Paths
2774                 if j1 < len(m.Route.Paths) {
2775                         v1 = m.Route.Paths[j1]
2776                 }
2777                 buf.EncodeUint32(v1.SwIfIndex)
2778                 buf.EncodeUint32(v1.TableID)
2779                 buf.EncodeUint32(v1.RpfID)
2780                 buf.EncodeUint8(v1.Weight)
2781                 buf.EncodeUint8(v1.Preference)
2782                 buf.EncodeUint32(uint32(v1.Type))
2783                 buf.EncodeUint32(uint32(v1.Flags))
2784                 buf.EncodeUint32(uint32(v1.Proto))
2785                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2786                 buf.EncodeUint32(v1.Nh.ViaLabel)
2787                 buf.EncodeUint32(v1.Nh.ObjID)
2788                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2789                 buf.EncodeUint8(v1.NLabels)
2790                 for j2 := 0; j2 < 16; j2++ {
2791                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2792                         buf.EncodeUint32(v1.LabelStack[j2].Label)
2793                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
2794                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
2795                 }
2796         }
2797         return buf.Bytes(), nil
2798 }
2799 func (m *IPRouteLookupReply) Unmarshal(b []byte) error {
2800         buf := codec.NewBuffer(b)
2801         m.Retval = buf.DecodeInt32()
2802         m.Route.TableID = buf.DecodeUint32()
2803         m.Route.StatsIndex = buf.DecodeUint32()
2804         m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2805         copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2806         m.Route.Prefix.Len = buf.DecodeUint8()
2807         m.Route.NPaths = buf.DecodeUint8()
2808         m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2809         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2810                 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2811                 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2812                 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2813                 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2814                 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2815                 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2816                 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2817                 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2818                 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2819                 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2820                 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2821                 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2822                 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2823                 for j2 := 0; j2 < 16; j2++ {
2824                         m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2825                         m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2826                         m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2827                         m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2828                 }
2829         }
2830         return nil
2831 }
2832
2833 // IPRouteLookupV2 defines message 'ip_route_lookup_v2'.
2834 // InProgress: the message form may change in the future versions
2835 type IPRouteLookupV2 struct {
2836         TableID uint32          `binapi:"u32,name=table_id" json:"table_id,omitempty"`
2837         Exact   uint8           `binapi:"u8,name=exact" json:"exact,omitempty"`
2838         Prefix  ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
2839 }
2840
2841 func (m *IPRouteLookupV2) Reset()               { *m = IPRouteLookupV2{} }
2842 func (*IPRouteLookupV2) GetMessageName() string { return "ip_route_lookup_v2" }
2843 func (*IPRouteLookupV2) GetCrcString() string   { return "710d6471" }
2844 func (*IPRouteLookupV2) GetMessageType() api.MessageType {
2845         return api.RequestMessage
2846 }
2847
2848 func (m *IPRouteLookupV2) Size() (size int) {
2849         if m == nil {
2850                 return 0
2851         }
2852         size += 4      // m.TableID
2853         size += 1      // m.Exact
2854         size += 1      // m.Prefix.Address.Af
2855         size += 1 * 16 // m.Prefix.Address.Un
2856         size += 1      // m.Prefix.Len
2857         return size
2858 }
2859 func (m *IPRouteLookupV2) Marshal(b []byte) ([]byte, error) {
2860         if b == nil {
2861                 b = make([]byte, m.Size())
2862         }
2863         buf := codec.NewBuffer(b)
2864         buf.EncodeUint32(m.TableID)
2865         buf.EncodeUint8(m.Exact)
2866         buf.EncodeUint8(uint8(m.Prefix.Address.Af))
2867         buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
2868         buf.EncodeUint8(m.Prefix.Len)
2869         return buf.Bytes(), nil
2870 }
2871 func (m *IPRouteLookupV2) Unmarshal(b []byte) error {
2872         buf := codec.NewBuffer(b)
2873         m.TableID = buf.DecodeUint32()
2874         m.Exact = buf.DecodeUint8()
2875         m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2876         copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2877         m.Prefix.Len = buf.DecodeUint8()
2878         return nil
2879 }
2880
2881 // IPRouteLookupV2Reply defines message 'ip_route_lookup_v2_reply'.
2882 // InProgress: the message form may change in the future versions
2883 type IPRouteLookupV2Reply struct {
2884         Retval int32     `binapi:"i32,name=retval" json:"retval,omitempty"`
2885         Route  IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"`
2886 }
2887
2888 func (m *IPRouteLookupV2Reply) Reset()               { *m = IPRouteLookupV2Reply{} }
2889 func (*IPRouteLookupV2Reply) GetMessageName() string { return "ip_route_lookup_v2_reply" }
2890 func (*IPRouteLookupV2Reply) GetCrcString() string   { return "84cc9e03" }
2891 func (*IPRouteLookupV2Reply) GetMessageType() api.MessageType {
2892         return api.ReplyMessage
2893 }
2894
2895 func (m *IPRouteLookupV2Reply) Size() (size int) {
2896         if m == nil {
2897                 return 0
2898         }
2899         size += 4      // m.Retval
2900         size += 4      // m.Route.TableID
2901         size += 4      // m.Route.StatsIndex
2902         size += 1      // m.Route.Prefix.Address.Af
2903         size += 1 * 16 // m.Route.Prefix.Address.Un
2904         size += 1      // m.Route.Prefix.Len
2905         size += 1      // m.Route.NPaths
2906         size += 1      // m.Route.Src
2907         for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2908                 var s2 fib_types.FibPath
2909                 _ = s2
2910                 if j2 < len(m.Route.Paths) {
2911                         s2 = m.Route.Paths[j2]
2912                 }
2913                 size += 4      // s2.SwIfIndex
2914                 size += 4      // s2.TableID
2915                 size += 4      // s2.RpfID
2916                 size += 1      // s2.Weight
2917                 size += 1      // s2.Preference
2918                 size += 4      // s2.Type
2919                 size += 4      // s2.Flags
2920                 size += 4      // s2.Proto
2921                 size += 1 * 16 // s2.Nh.Address
2922                 size += 4      // s2.Nh.ViaLabel
2923                 size += 4      // s2.Nh.ObjID
2924                 size += 4      // s2.Nh.ClassifyTableIndex
2925                 size += 1      // s2.NLabels
2926                 for j3 := 0; j3 < 16; j3++ {
2927                         size += 1 // s2.LabelStack[j3].IsUniform
2928                         size += 4 // s2.LabelStack[j3].Label
2929                         size += 1 // s2.LabelStack[j3].TTL
2930                         size += 1 // s2.LabelStack[j3].Exp
2931                 }
2932         }
2933         return size
2934 }
2935 func (m *IPRouteLookupV2Reply) Marshal(b []byte) ([]byte, error) {
2936         if b == nil {
2937                 b = make([]byte, m.Size())
2938         }
2939         buf := codec.NewBuffer(b)
2940         buf.EncodeInt32(m.Retval)
2941         buf.EncodeUint32(m.Route.TableID)
2942         buf.EncodeUint32(m.Route.StatsIndex)
2943         buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2944         buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2945         buf.EncodeUint8(m.Route.Prefix.Len)
2946         buf.EncodeUint8(uint8(len(m.Route.Paths)))
2947         buf.EncodeUint8(m.Route.Src)
2948         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2949                 var v1 fib_types.FibPath // Paths
2950                 if j1 < len(m.Route.Paths) {
2951                         v1 = m.Route.Paths[j1]
2952                 }
2953                 buf.EncodeUint32(v1.SwIfIndex)
2954                 buf.EncodeUint32(v1.TableID)
2955                 buf.EncodeUint32(v1.RpfID)
2956                 buf.EncodeUint8(v1.Weight)
2957                 buf.EncodeUint8(v1.Preference)
2958                 buf.EncodeUint32(uint32(v1.Type))
2959                 buf.EncodeUint32(uint32(v1.Flags))
2960                 buf.EncodeUint32(uint32(v1.Proto))
2961                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2962                 buf.EncodeUint32(v1.Nh.ViaLabel)
2963                 buf.EncodeUint32(v1.Nh.ObjID)
2964                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2965                 buf.EncodeUint8(v1.NLabels)
2966                 for j2 := 0; j2 < 16; j2++ {
2967                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2968                         buf.EncodeUint32(v1.LabelStack[j2].Label)
2969                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
2970                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
2971                 }
2972         }
2973         return buf.Bytes(), nil
2974 }
2975 func (m *IPRouteLookupV2Reply) Unmarshal(b []byte) error {
2976         buf := codec.NewBuffer(b)
2977         m.Retval = buf.DecodeInt32()
2978         m.Route.TableID = buf.DecodeUint32()
2979         m.Route.StatsIndex = buf.DecodeUint32()
2980         m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2981         copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2982         m.Route.Prefix.Len = buf.DecodeUint8()
2983         m.Route.NPaths = buf.DecodeUint8()
2984         m.Route.Src = buf.DecodeUint8()
2985         m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2986         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2987                 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2988                 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2989                 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2990                 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2991                 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2992                 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2993                 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2994                 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2995                 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2996                 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2997                 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2998                 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2999                 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
3000                 for j2 := 0; j2 < 16; j2++ {
3001                         m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
3002                         m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
3003                         m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
3004                         m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
3005                 }
3006         }
3007         return nil
3008 }
3009
3010 // IPRouteV2Details defines message 'ip_route_v2_details'.
3011 // InProgress: the message form may change in the future versions
3012 type IPRouteV2Details struct {
3013         Route IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"`
3014 }
3015
3016 func (m *IPRouteV2Details) Reset()               { *m = IPRouteV2Details{} }
3017 func (*IPRouteV2Details) GetMessageName() string { return "ip_route_v2_details" }
3018 func (*IPRouteV2Details) GetCrcString() string   { return "b09aa6c0" }
3019 func (*IPRouteV2Details) GetMessageType() api.MessageType {
3020         return api.ReplyMessage
3021 }
3022
3023 func (m *IPRouteV2Details) Size() (size int) {
3024         if m == nil {
3025                 return 0
3026         }
3027         size += 4      // m.Route.TableID
3028         size += 4      // m.Route.StatsIndex
3029         size += 1      // m.Route.Prefix.Address.Af
3030         size += 1 * 16 // m.Route.Prefix.Address.Un
3031         size += 1      // m.Route.Prefix.Len
3032         size += 1      // m.Route.NPaths
3033         size += 1      // m.Route.Src
3034         for j2 := 0; j2 < len(m.Route.Paths); j2++ {
3035                 var s2 fib_types.FibPath
3036                 _ = s2
3037                 if j2 < len(m.Route.Paths) {
3038                         s2 = m.Route.Paths[j2]
3039                 }
3040                 size += 4      // s2.SwIfIndex
3041                 size += 4      // s2.TableID
3042                 size += 4      // s2.RpfID
3043                 size += 1      // s2.Weight
3044                 size += 1      // s2.Preference
3045                 size += 4      // s2.Type
3046                 size += 4      // s2.Flags
3047                 size += 4      // s2.Proto
3048                 size += 1 * 16 // s2.Nh.Address
3049                 size += 4      // s2.Nh.ViaLabel
3050                 size += 4      // s2.Nh.ObjID
3051                 size += 4      // s2.Nh.ClassifyTableIndex
3052                 size += 1      // s2.NLabels
3053                 for j3 := 0; j3 < 16; j3++ {
3054                         size += 1 // s2.LabelStack[j3].IsUniform
3055                         size += 4 // s2.LabelStack[j3].Label
3056                         size += 1 // s2.LabelStack[j3].TTL
3057                         size += 1 // s2.LabelStack[j3].Exp
3058                 }
3059         }
3060         return size
3061 }
3062 func (m *IPRouteV2Details) Marshal(b []byte) ([]byte, error) {
3063         if b == nil {
3064                 b = make([]byte, m.Size())
3065         }
3066         buf := codec.NewBuffer(b)
3067         buf.EncodeUint32(m.Route.TableID)
3068         buf.EncodeUint32(m.Route.StatsIndex)
3069         buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
3070         buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
3071         buf.EncodeUint8(m.Route.Prefix.Len)
3072         buf.EncodeUint8(uint8(len(m.Route.Paths)))
3073         buf.EncodeUint8(m.Route.Src)
3074         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
3075                 var v1 fib_types.FibPath // Paths
3076                 if j1 < len(m.Route.Paths) {
3077                         v1 = m.Route.Paths[j1]
3078                 }
3079                 buf.EncodeUint32(v1.SwIfIndex)
3080                 buf.EncodeUint32(v1.TableID)
3081                 buf.EncodeUint32(v1.RpfID)
3082                 buf.EncodeUint8(v1.Weight)
3083                 buf.EncodeUint8(v1.Preference)
3084                 buf.EncodeUint32(uint32(v1.Type))
3085                 buf.EncodeUint32(uint32(v1.Flags))
3086                 buf.EncodeUint32(uint32(v1.Proto))
3087                 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
3088                 buf.EncodeUint32(v1.Nh.ViaLabel)
3089                 buf.EncodeUint32(v1.Nh.ObjID)
3090                 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
3091                 buf.EncodeUint8(v1.NLabels)
3092                 for j2 := 0; j2 < 16; j2++ {
3093                         buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
3094                         buf.EncodeUint32(v1.LabelStack[j2].Label)
3095                         buf.EncodeUint8(v1.LabelStack[j2].TTL)
3096                         buf.EncodeUint8(v1.LabelStack[j2].Exp)
3097                 }
3098         }
3099         return buf.Bytes(), nil
3100 }
3101 func (m *IPRouteV2Details) Unmarshal(b []byte) error {
3102         buf := codec.NewBuffer(b)
3103         m.Route.TableID = buf.DecodeUint32()
3104         m.Route.StatsIndex = buf.DecodeUint32()
3105         m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
3106         copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
3107         m.Route.Prefix.Len = buf.DecodeUint8()
3108         m.Route.NPaths = buf.DecodeUint8()
3109         m.Route.Src = buf.DecodeUint8()
3110         m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
3111         for j1 := 0; j1 < len(m.Route.Paths); j1++ {
3112                 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
3113                 m.Route.Paths[j1].TableID = buf.DecodeUint32()
3114                 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
3115                 m.Route.Paths[j1].Weight = buf.DecodeUint8()
3116                 m.Route.Paths[j1].Preference = buf.DecodeUint8()
3117                 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
3118                 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
3119                 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
3120                 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
3121                 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
3122                 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
3123                 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
3124                 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
3125                 for j2 := 0; j2 < 16; j2++ {
3126                         m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
3127                         m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
3128                         m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
3129                         m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
3130                 }
3131         }
3132         return nil
3133 }
3134
3135 // IPRouteV2Dump defines message 'ip_route_v2_dump'.
3136 // InProgress: the message form may change in the future versions
3137 type IPRouteV2Dump struct {
3138         Src   uint8   `binapi:"u8,name=src" json:"src,omitempty"`
3139         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3140 }
3141
3142 func (m *IPRouteV2Dump) Reset()               { *m = IPRouteV2Dump{} }
3143 func (*IPRouteV2Dump) GetMessageName() string { return "ip_route_v2_dump" }
3144 func (*IPRouteV2Dump) GetCrcString() string   { return "d16f72e6" }
3145 func (*IPRouteV2Dump) GetMessageType() api.MessageType {
3146         return api.RequestMessage
3147 }
3148
3149 func (m *IPRouteV2Dump) Size() (size int) {
3150         if m == nil {
3151                 return 0
3152         }
3153         size += 1  // m.Src
3154         size += 4  // m.Table.TableID
3155         size += 1  // m.Table.IsIP6
3156         size += 64 // m.Table.Name
3157         return size
3158 }
3159 func (m *IPRouteV2Dump) Marshal(b []byte) ([]byte, error) {
3160         if b == nil {
3161                 b = make([]byte, m.Size())
3162         }
3163         buf := codec.NewBuffer(b)
3164         buf.EncodeUint8(m.Src)
3165         buf.EncodeUint32(m.Table.TableID)
3166         buf.EncodeBool(m.Table.IsIP6)
3167         buf.EncodeString(m.Table.Name, 64)
3168         return buf.Bytes(), nil
3169 }
3170 func (m *IPRouteV2Dump) Unmarshal(b []byte) error {
3171         buf := codec.NewBuffer(b)
3172         m.Src = buf.DecodeUint8()
3173         m.Table.TableID = buf.DecodeUint32()
3174         m.Table.IsIP6 = buf.DecodeBool()
3175         m.Table.Name = buf.DecodeString(64)
3176         return nil
3177 }
3178
3179 // IPSourceAndPortRangeCheckAddDel defines message 'ip_source_and_port_range_check_add_del'.
3180 type IPSourceAndPortRangeCheckAddDel struct {
3181         IsAdd          bool            `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
3182         Prefix         ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
3183         NumberOfRanges uint8           `binapi:"u8,name=number_of_ranges" json:"number_of_ranges,omitempty"`
3184         LowPorts       []uint16        `binapi:"u16[32],name=low_ports" json:"low_ports,omitempty"`
3185         HighPorts      []uint16        `binapi:"u16[32],name=high_ports" json:"high_ports,omitempty"`
3186         VrfID          uint32          `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3187 }
3188
3189 func (m *IPSourceAndPortRangeCheckAddDel) Reset() { *m = IPSourceAndPortRangeCheckAddDel{} }
3190 func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string {
3191         return "ip_source_and_port_range_check_add_del"
3192 }
3193 func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "92a067e3" }
3194 func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType {
3195         return api.RequestMessage
3196 }
3197
3198 func (m *IPSourceAndPortRangeCheckAddDel) Size() (size int) {
3199         if m == nil {
3200                 return 0
3201         }
3202         size += 1      // m.IsAdd
3203         size += 1      // m.Prefix.Address.Af
3204         size += 1 * 16 // m.Prefix.Address.Un
3205         size += 1      // m.Prefix.Len
3206         size += 1      // m.NumberOfRanges
3207         size += 2 * 32 // m.LowPorts
3208         size += 2 * 32 // m.HighPorts
3209         size += 4      // m.VrfID
3210         return size
3211 }
3212 func (m *IPSourceAndPortRangeCheckAddDel) Marshal(b []byte) ([]byte, error) {
3213         if b == nil {
3214                 b = make([]byte, m.Size())
3215         }
3216         buf := codec.NewBuffer(b)
3217         buf.EncodeBool(m.IsAdd)
3218         buf.EncodeUint8(uint8(m.Prefix.Address.Af))
3219         buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
3220         buf.EncodeUint8(m.Prefix.Len)
3221         buf.EncodeUint8(m.NumberOfRanges)
3222         for i := 0; i < 32; i++ {
3223                 var x uint16
3224                 if i < len(m.LowPorts) {
3225                         x = uint16(m.LowPorts[i])
3226                 }
3227                 buf.EncodeUint16(x)
3228         }
3229         for i := 0; i < 32; i++ {
3230                 var x uint16
3231                 if i < len(m.HighPorts) {
3232                         x = uint16(m.HighPorts[i])
3233                 }
3234                 buf.EncodeUint16(x)
3235         }
3236         buf.EncodeUint32(m.VrfID)
3237         return buf.Bytes(), nil
3238 }
3239 func (m *IPSourceAndPortRangeCheckAddDel) Unmarshal(b []byte) error {
3240         buf := codec.NewBuffer(b)
3241         m.IsAdd = buf.DecodeBool()
3242         m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
3243         copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
3244         m.Prefix.Len = buf.DecodeUint8()
3245         m.NumberOfRanges = buf.DecodeUint8()
3246         m.LowPorts = make([]uint16, 32)
3247         for i := 0; i < len(m.LowPorts); i++ {
3248                 m.LowPorts[i] = buf.DecodeUint16()
3249         }
3250         m.HighPorts = make([]uint16, 32)
3251         for i := 0; i < len(m.HighPorts); i++ {
3252                 m.HighPorts[i] = buf.DecodeUint16()
3253         }
3254         m.VrfID = buf.DecodeUint32()
3255         return nil
3256 }
3257
3258 // IPSourceAndPortRangeCheckAddDelReply defines message 'ip_source_and_port_range_check_add_del_reply'.
3259 type IPSourceAndPortRangeCheckAddDelReply struct {
3260         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3261 }
3262
3263 func (m *IPSourceAndPortRangeCheckAddDelReply) Reset() { *m = IPSourceAndPortRangeCheckAddDelReply{} }
3264 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string {
3265         return "ip_source_and_port_range_check_add_del_reply"
3266 }
3267 func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { return "e8d4e804" }
3268 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType {
3269         return api.ReplyMessage
3270 }
3271
3272 func (m *IPSourceAndPortRangeCheckAddDelReply) Size() (size int) {
3273         if m == nil {
3274                 return 0
3275         }
3276         size += 4 // m.Retval
3277         return size
3278 }
3279 func (m *IPSourceAndPortRangeCheckAddDelReply) Marshal(b []byte) ([]byte, error) {
3280         if b == nil {
3281                 b = make([]byte, m.Size())
3282         }
3283         buf := codec.NewBuffer(b)
3284         buf.EncodeInt32(m.Retval)
3285         return buf.Bytes(), nil
3286 }
3287 func (m *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(b []byte) error {
3288         buf := codec.NewBuffer(b)
3289         m.Retval = buf.DecodeInt32()
3290         return nil
3291 }
3292
3293 // IPSourceAndPortRangeCheckInterfaceAddDel defines message 'ip_source_and_port_range_check_interface_add_del'.
3294 type IPSourceAndPortRangeCheckInterfaceAddDel struct {
3295         IsAdd       bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
3296         SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3297         TCPInVrfID  uint32                         `binapi:"u32,name=tcp_in_vrf_id" json:"tcp_in_vrf_id,omitempty"`
3298         TCPOutVrfID uint32                         `binapi:"u32,name=tcp_out_vrf_id" json:"tcp_out_vrf_id,omitempty"`
3299         UDPInVrfID  uint32                         `binapi:"u32,name=udp_in_vrf_id" json:"udp_in_vrf_id,omitempty"`
3300         UDPOutVrfID uint32                         `binapi:"u32,name=udp_out_vrf_id" json:"udp_out_vrf_id,omitempty"`
3301 }
3302
3303 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Reset() {
3304         *m = IPSourceAndPortRangeCheckInterfaceAddDel{}
3305 }
3306 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string {
3307         return "ip_source_and_port_range_check_interface_add_del"
3308 }
3309 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { return "e1ba8987" }
3310 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType {
3311         return api.RequestMessage
3312 }
3313
3314 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() (size int) {
3315         if m == nil {
3316                 return 0
3317         }
3318         size += 1 // m.IsAdd
3319         size += 4 // m.SwIfIndex
3320         size += 4 // m.TCPInVrfID
3321         size += 4 // m.TCPOutVrfID
3322         size += 4 // m.UDPInVrfID
3323         size += 4 // m.UDPOutVrfID
3324         return size
3325 }
3326 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
3327         if b == nil {
3328                 b = make([]byte, m.Size())
3329         }
3330         buf := codec.NewBuffer(b)
3331         buf.EncodeBool(m.IsAdd)
3332         buf.EncodeUint32(uint32(m.SwIfIndex))
3333         buf.EncodeUint32(m.TCPInVrfID)
3334         buf.EncodeUint32(m.TCPOutVrfID)
3335         buf.EncodeUint32(m.UDPInVrfID)
3336         buf.EncodeUint32(m.UDPOutVrfID)
3337         return buf.Bytes(), nil
3338 }
3339 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Unmarshal(b []byte) error {
3340         buf := codec.NewBuffer(b)
3341         m.IsAdd = buf.DecodeBool()
3342         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3343         m.TCPInVrfID = buf.DecodeUint32()
3344         m.TCPOutVrfID = buf.DecodeUint32()
3345         m.UDPInVrfID = buf.DecodeUint32()
3346         m.UDPOutVrfID = buf.DecodeUint32()
3347         return nil
3348 }
3349
3350 // IPSourceAndPortRangeCheckInterfaceAddDelReply defines message 'ip_source_and_port_range_check_interface_add_del_reply'.
3351 type IPSourceAndPortRangeCheckInterfaceAddDelReply struct {
3352         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3353 }
3354
3355 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Reset() {
3356         *m = IPSourceAndPortRangeCheckInterfaceAddDelReply{}
3357 }
3358 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string {
3359         return "ip_source_and_port_range_check_interface_add_del_reply"
3360 }
3361 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
3362 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType {
3363         return api.ReplyMessage
3364 }
3365
3366 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Size() (size int) {
3367         if m == nil {
3368                 return 0
3369         }
3370         size += 4 // m.Retval
3371         return size
3372 }
3373 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
3374         if b == nil {
3375                 b = make([]byte, m.Size())
3376         }
3377         buf := codec.NewBuffer(b)
3378         buf.EncodeInt32(m.Retval)
3379         return buf.Bytes(), nil
3380 }
3381 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(b []byte) error {
3382         buf := codec.NewBuffer(b)
3383         m.Retval = buf.DecodeInt32()
3384         return nil
3385 }
3386
3387 // IPTableAddDel defines message 'ip_table_add_del'.
3388 type IPTableAddDel struct {
3389         IsAdd bool    `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
3390         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3391 }
3392
3393 func (m *IPTableAddDel) Reset()               { *m = IPTableAddDel{} }
3394 func (*IPTableAddDel) GetMessageName() string { return "ip_table_add_del" }
3395 func (*IPTableAddDel) GetCrcString() string   { return "0ffdaec0" }
3396 func (*IPTableAddDel) GetMessageType() api.MessageType {
3397         return api.RequestMessage
3398 }
3399
3400 func (m *IPTableAddDel) Size() (size int) {
3401         if m == nil {
3402                 return 0
3403         }
3404         size += 1  // m.IsAdd
3405         size += 4  // m.Table.TableID
3406         size += 1  // m.Table.IsIP6
3407         size += 64 // m.Table.Name
3408         return size
3409 }
3410 func (m *IPTableAddDel) Marshal(b []byte) ([]byte, error) {
3411         if b == nil {
3412                 b = make([]byte, m.Size())
3413         }
3414         buf := codec.NewBuffer(b)
3415         buf.EncodeBool(m.IsAdd)
3416         buf.EncodeUint32(m.Table.TableID)
3417         buf.EncodeBool(m.Table.IsIP6)
3418         buf.EncodeString(m.Table.Name, 64)
3419         return buf.Bytes(), nil
3420 }
3421 func (m *IPTableAddDel) Unmarshal(b []byte) error {
3422         buf := codec.NewBuffer(b)
3423         m.IsAdd = buf.DecodeBool()
3424         m.Table.TableID = buf.DecodeUint32()
3425         m.Table.IsIP6 = buf.DecodeBool()
3426         m.Table.Name = buf.DecodeString(64)
3427         return nil
3428 }
3429
3430 // IPTableAddDelReply defines message 'ip_table_add_del_reply'.
3431 type IPTableAddDelReply struct {
3432         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3433 }
3434
3435 func (m *IPTableAddDelReply) Reset()               { *m = IPTableAddDelReply{} }
3436 func (*IPTableAddDelReply) GetMessageName() string { return "ip_table_add_del_reply" }
3437 func (*IPTableAddDelReply) GetCrcString() string   { return "e8d4e804" }
3438 func (*IPTableAddDelReply) GetMessageType() api.MessageType {
3439         return api.ReplyMessage
3440 }
3441
3442 func (m *IPTableAddDelReply) Size() (size int) {
3443         if m == nil {
3444                 return 0
3445         }
3446         size += 4 // m.Retval
3447         return size
3448 }
3449 func (m *IPTableAddDelReply) Marshal(b []byte) ([]byte, error) {
3450         if b == nil {
3451                 b = make([]byte, m.Size())
3452         }
3453         buf := codec.NewBuffer(b)
3454         buf.EncodeInt32(m.Retval)
3455         return buf.Bytes(), nil
3456 }
3457 func (m *IPTableAddDelReply) Unmarshal(b []byte) error {
3458         buf := codec.NewBuffer(b)
3459         m.Retval = buf.DecodeInt32()
3460         return nil
3461 }
3462
3463 // IPTableAllocate defines message 'ip_table_allocate'.
3464 type IPTableAllocate struct {
3465         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3466 }
3467
3468 func (m *IPTableAllocate) Reset()               { *m = IPTableAllocate{} }
3469 func (*IPTableAllocate) GetMessageName() string { return "ip_table_allocate" }
3470 func (*IPTableAllocate) GetCrcString() string   { return "b9d2e09e" }
3471 func (*IPTableAllocate) GetMessageType() api.MessageType {
3472         return api.RequestMessage
3473 }
3474
3475 func (m *IPTableAllocate) Size() (size int) {
3476         if m == nil {
3477                 return 0
3478         }
3479         size += 4  // m.Table.TableID
3480         size += 1  // m.Table.IsIP6
3481         size += 64 // m.Table.Name
3482         return size
3483 }
3484 func (m *IPTableAllocate) Marshal(b []byte) ([]byte, error) {
3485         if b == nil {
3486                 b = make([]byte, m.Size())
3487         }
3488         buf := codec.NewBuffer(b)
3489         buf.EncodeUint32(m.Table.TableID)
3490         buf.EncodeBool(m.Table.IsIP6)
3491         buf.EncodeString(m.Table.Name, 64)
3492         return buf.Bytes(), nil
3493 }
3494 func (m *IPTableAllocate) Unmarshal(b []byte) error {
3495         buf := codec.NewBuffer(b)
3496         m.Table.TableID = buf.DecodeUint32()
3497         m.Table.IsIP6 = buf.DecodeBool()
3498         m.Table.Name = buf.DecodeString(64)
3499         return nil
3500 }
3501
3502 // IPTableAllocateReply defines message 'ip_table_allocate_reply'.
3503 type IPTableAllocateReply struct {
3504         Retval int32   `binapi:"i32,name=retval" json:"retval,omitempty"`
3505         Table  IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3506 }
3507
3508 func (m *IPTableAllocateReply) Reset()               { *m = IPTableAllocateReply{} }
3509 func (*IPTableAllocateReply) GetMessageName() string { return "ip_table_allocate_reply" }
3510 func (*IPTableAllocateReply) GetCrcString() string   { return "1728303a" }
3511 func (*IPTableAllocateReply) GetMessageType() api.MessageType {
3512         return api.ReplyMessage
3513 }
3514
3515 func (m *IPTableAllocateReply) Size() (size int) {
3516         if m == nil {
3517                 return 0
3518         }
3519         size += 4  // m.Retval
3520         size += 4  // m.Table.TableID
3521         size += 1  // m.Table.IsIP6
3522         size += 64 // m.Table.Name
3523         return size
3524 }
3525 func (m *IPTableAllocateReply) Marshal(b []byte) ([]byte, error) {
3526         if b == nil {
3527                 b = make([]byte, m.Size())
3528         }
3529         buf := codec.NewBuffer(b)
3530         buf.EncodeInt32(m.Retval)
3531         buf.EncodeUint32(m.Table.TableID)
3532         buf.EncodeBool(m.Table.IsIP6)
3533         buf.EncodeString(m.Table.Name, 64)
3534         return buf.Bytes(), nil
3535 }
3536 func (m *IPTableAllocateReply) Unmarshal(b []byte) error {
3537         buf := codec.NewBuffer(b)
3538         m.Retval = buf.DecodeInt32()
3539         m.Table.TableID = buf.DecodeUint32()
3540         m.Table.IsIP6 = buf.DecodeBool()
3541         m.Table.Name = buf.DecodeString(64)
3542         return nil
3543 }
3544
3545 // IPTableDetails defines message 'ip_table_details'.
3546 type IPTableDetails struct {
3547         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3548 }
3549
3550 func (m *IPTableDetails) Reset()               { *m = IPTableDetails{} }
3551 func (*IPTableDetails) GetMessageName() string { return "ip_table_details" }
3552 func (*IPTableDetails) GetCrcString() string   { return "c79fca0f" }
3553 func (*IPTableDetails) GetMessageType() api.MessageType {
3554         return api.ReplyMessage
3555 }
3556
3557 func (m *IPTableDetails) Size() (size int) {
3558         if m == nil {
3559                 return 0
3560         }
3561         size += 4  // m.Table.TableID
3562         size += 1  // m.Table.IsIP6
3563         size += 64 // m.Table.Name
3564         return size
3565 }
3566 func (m *IPTableDetails) Marshal(b []byte) ([]byte, error) {
3567         if b == nil {
3568                 b = make([]byte, m.Size())
3569         }
3570         buf := codec.NewBuffer(b)
3571         buf.EncodeUint32(m.Table.TableID)
3572         buf.EncodeBool(m.Table.IsIP6)
3573         buf.EncodeString(m.Table.Name, 64)
3574         return buf.Bytes(), nil
3575 }
3576 func (m *IPTableDetails) Unmarshal(b []byte) error {
3577         buf := codec.NewBuffer(b)
3578         m.Table.TableID = buf.DecodeUint32()
3579         m.Table.IsIP6 = buf.DecodeBool()
3580         m.Table.Name = buf.DecodeString(64)
3581         return nil
3582 }
3583
3584 // IPTableDump defines message 'ip_table_dump'.
3585 type IPTableDump struct{}
3586
3587 func (m *IPTableDump) Reset()               { *m = IPTableDump{} }
3588 func (*IPTableDump) GetMessageName() string { return "ip_table_dump" }
3589 func (*IPTableDump) GetCrcString() string   { return "51077d14" }
3590 func (*IPTableDump) GetMessageType() api.MessageType {
3591         return api.RequestMessage
3592 }
3593
3594 func (m *IPTableDump) Size() (size int) {
3595         if m == nil {
3596                 return 0
3597         }
3598         return size
3599 }
3600 func (m *IPTableDump) Marshal(b []byte) ([]byte, error) {
3601         if b == nil {
3602                 b = make([]byte, m.Size())
3603         }
3604         buf := codec.NewBuffer(b)
3605         return buf.Bytes(), nil
3606 }
3607 func (m *IPTableDump) Unmarshal(b []byte) error {
3608         return nil
3609 }
3610
3611 // IPTableFlush defines message 'ip_table_flush'.
3612 type IPTableFlush struct {
3613         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3614 }
3615
3616 func (m *IPTableFlush) Reset()               { *m = IPTableFlush{} }
3617 func (*IPTableFlush) GetMessageName() string { return "ip_table_flush" }
3618 func (*IPTableFlush) GetCrcString() string   { return "b9d2e09e" }
3619 func (*IPTableFlush) GetMessageType() api.MessageType {
3620         return api.RequestMessage
3621 }
3622
3623 func (m *IPTableFlush) Size() (size int) {
3624         if m == nil {
3625                 return 0
3626         }
3627         size += 4  // m.Table.TableID
3628         size += 1  // m.Table.IsIP6
3629         size += 64 // m.Table.Name
3630         return size
3631 }
3632 func (m *IPTableFlush) Marshal(b []byte) ([]byte, error) {
3633         if b == nil {
3634                 b = make([]byte, m.Size())
3635         }
3636         buf := codec.NewBuffer(b)
3637         buf.EncodeUint32(m.Table.TableID)
3638         buf.EncodeBool(m.Table.IsIP6)
3639         buf.EncodeString(m.Table.Name, 64)
3640         return buf.Bytes(), nil
3641 }
3642 func (m *IPTableFlush) Unmarshal(b []byte) error {
3643         buf := codec.NewBuffer(b)
3644         m.Table.TableID = buf.DecodeUint32()
3645         m.Table.IsIP6 = buf.DecodeBool()
3646         m.Table.Name = buf.DecodeString(64)
3647         return nil
3648 }
3649
3650 // IPTableFlushReply defines message 'ip_table_flush_reply'.
3651 type IPTableFlushReply struct {
3652         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3653 }
3654
3655 func (m *IPTableFlushReply) Reset()               { *m = IPTableFlushReply{} }
3656 func (*IPTableFlushReply) GetMessageName() string { return "ip_table_flush_reply" }
3657 func (*IPTableFlushReply) GetCrcString() string   { return "e8d4e804" }
3658 func (*IPTableFlushReply) GetMessageType() api.MessageType {
3659         return api.ReplyMessage
3660 }
3661
3662 func (m *IPTableFlushReply) Size() (size int) {
3663         if m == nil {
3664                 return 0
3665         }
3666         size += 4 // m.Retval
3667         return size
3668 }
3669 func (m *IPTableFlushReply) Marshal(b []byte) ([]byte, error) {
3670         if b == nil {
3671                 b = make([]byte, m.Size())
3672         }
3673         buf := codec.NewBuffer(b)
3674         buf.EncodeInt32(m.Retval)
3675         return buf.Bytes(), nil
3676 }
3677 func (m *IPTableFlushReply) Unmarshal(b []byte) error {
3678         buf := codec.NewBuffer(b)
3679         m.Retval = buf.DecodeInt32()
3680         return nil
3681 }
3682
3683 // IPTableReplaceBegin defines message 'ip_table_replace_begin'.
3684 type IPTableReplaceBegin struct {
3685         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3686 }
3687
3688 func (m *IPTableReplaceBegin) Reset()               { *m = IPTableReplaceBegin{} }
3689 func (*IPTableReplaceBegin) GetMessageName() string { return "ip_table_replace_begin" }
3690 func (*IPTableReplaceBegin) GetCrcString() string   { return "b9d2e09e" }
3691 func (*IPTableReplaceBegin) GetMessageType() api.MessageType {
3692         return api.RequestMessage
3693 }
3694
3695 func (m *IPTableReplaceBegin) Size() (size int) {
3696         if m == nil {
3697                 return 0
3698         }
3699         size += 4  // m.Table.TableID
3700         size += 1  // m.Table.IsIP6
3701         size += 64 // m.Table.Name
3702         return size
3703 }
3704 func (m *IPTableReplaceBegin) Marshal(b []byte) ([]byte, error) {
3705         if b == nil {
3706                 b = make([]byte, m.Size())
3707         }
3708         buf := codec.NewBuffer(b)
3709         buf.EncodeUint32(m.Table.TableID)
3710         buf.EncodeBool(m.Table.IsIP6)
3711         buf.EncodeString(m.Table.Name, 64)
3712         return buf.Bytes(), nil
3713 }
3714 func (m *IPTableReplaceBegin) Unmarshal(b []byte) error {
3715         buf := codec.NewBuffer(b)
3716         m.Table.TableID = buf.DecodeUint32()
3717         m.Table.IsIP6 = buf.DecodeBool()
3718         m.Table.Name = buf.DecodeString(64)
3719         return nil
3720 }
3721
3722 // IPTableReplaceBeginReply defines message 'ip_table_replace_begin_reply'.
3723 type IPTableReplaceBeginReply struct {
3724         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3725 }
3726
3727 func (m *IPTableReplaceBeginReply) Reset()               { *m = IPTableReplaceBeginReply{} }
3728 func (*IPTableReplaceBeginReply) GetMessageName() string { return "ip_table_replace_begin_reply" }
3729 func (*IPTableReplaceBeginReply) GetCrcString() string   { return "e8d4e804" }
3730 func (*IPTableReplaceBeginReply) GetMessageType() api.MessageType {
3731         return api.ReplyMessage
3732 }
3733
3734 func (m *IPTableReplaceBeginReply) Size() (size int) {
3735         if m == nil {
3736                 return 0
3737         }
3738         size += 4 // m.Retval
3739         return size
3740 }
3741 func (m *IPTableReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
3742         if b == nil {
3743                 b = make([]byte, m.Size())
3744         }
3745         buf := codec.NewBuffer(b)
3746         buf.EncodeInt32(m.Retval)
3747         return buf.Bytes(), nil
3748 }
3749 func (m *IPTableReplaceBeginReply) Unmarshal(b []byte) error {
3750         buf := codec.NewBuffer(b)
3751         m.Retval = buf.DecodeInt32()
3752         return nil
3753 }
3754
3755 // IPTableReplaceEnd defines message 'ip_table_replace_end'.
3756 type IPTableReplaceEnd struct {
3757         Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3758 }
3759
3760 func (m *IPTableReplaceEnd) Reset()               { *m = IPTableReplaceEnd{} }
3761 func (*IPTableReplaceEnd) GetMessageName() string { return "ip_table_replace_end" }
3762 func (*IPTableReplaceEnd) GetCrcString() string   { return "b9d2e09e" }
3763 func (*IPTableReplaceEnd) GetMessageType() api.MessageType {
3764         return api.RequestMessage
3765 }
3766
3767 func (m *IPTableReplaceEnd) Size() (size int) {
3768         if m == nil {
3769                 return 0
3770         }
3771         size += 4  // m.Table.TableID
3772         size += 1  // m.Table.IsIP6
3773         size += 64 // m.Table.Name
3774         return size
3775 }
3776 func (m *IPTableReplaceEnd) Marshal(b []byte) ([]byte, error) {
3777         if b == nil {
3778                 b = make([]byte, m.Size())
3779         }
3780         buf := codec.NewBuffer(b)
3781         buf.EncodeUint32(m.Table.TableID)
3782         buf.EncodeBool(m.Table.IsIP6)
3783         buf.EncodeString(m.Table.Name, 64)
3784         return buf.Bytes(), nil
3785 }
3786 func (m *IPTableReplaceEnd) Unmarshal(b []byte) error {
3787         buf := codec.NewBuffer(b)
3788         m.Table.TableID = buf.DecodeUint32()
3789         m.Table.IsIP6 = buf.DecodeBool()
3790         m.Table.Name = buf.DecodeString(64)
3791         return nil
3792 }
3793
3794 // IPTableReplaceEndReply defines message 'ip_table_replace_end_reply'.
3795 type IPTableReplaceEndReply struct {
3796         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3797 }
3798
3799 func (m *IPTableReplaceEndReply) Reset()               { *m = IPTableReplaceEndReply{} }
3800 func (*IPTableReplaceEndReply) GetMessageName() string { return "ip_table_replace_end_reply" }
3801 func (*IPTableReplaceEndReply) GetCrcString() string   { return "e8d4e804" }
3802 func (*IPTableReplaceEndReply) GetMessageType() api.MessageType {
3803         return api.ReplyMessage
3804 }
3805
3806 func (m *IPTableReplaceEndReply) Size() (size int) {
3807         if m == nil {
3808                 return 0
3809         }
3810         size += 4 // m.Retval
3811         return size
3812 }
3813 func (m *IPTableReplaceEndReply) Marshal(b []byte) ([]byte, error) {
3814         if b == nil {
3815                 b = make([]byte, m.Size())
3816         }
3817         buf := codec.NewBuffer(b)
3818         buf.EncodeInt32(m.Retval)
3819         return buf.Bytes(), nil
3820 }
3821 func (m *IPTableReplaceEndReply) Unmarshal(b []byte) error {
3822         buf := codec.NewBuffer(b)
3823         m.Retval = buf.DecodeInt32()
3824         return nil
3825 }
3826
3827 // IPUnnumberedDetails defines message 'ip_unnumbered_details'.
3828 type IPUnnumberedDetails struct {
3829         SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3830         IPSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip_sw_if_index" json:"ip_sw_if_index,omitempty"`
3831 }
3832
3833 func (m *IPUnnumberedDetails) Reset()               { *m = IPUnnumberedDetails{} }
3834 func (*IPUnnumberedDetails) GetMessageName() string { return "ip_unnumbered_details" }
3835 func (*IPUnnumberedDetails) GetCrcString() string   { return "cc59bd42" }
3836 func (*IPUnnumberedDetails) GetMessageType() api.MessageType {
3837         return api.ReplyMessage
3838 }
3839
3840 func (m *IPUnnumberedDetails) Size() (size int) {
3841         if m == nil {
3842                 return 0
3843         }
3844         size += 4 // m.SwIfIndex
3845         size += 4 // m.IPSwIfIndex
3846         return size
3847 }
3848 func (m *IPUnnumberedDetails) Marshal(b []byte) ([]byte, error) {
3849         if b == nil {
3850                 b = make([]byte, m.Size())
3851         }
3852         buf := codec.NewBuffer(b)
3853         buf.EncodeUint32(uint32(m.SwIfIndex))
3854         buf.EncodeUint32(uint32(m.IPSwIfIndex))
3855         return buf.Bytes(), nil
3856 }
3857 func (m *IPUnnumberedDetails) Unmarshal(b []byte) error {
3858         buf := codec.NewBuffer(b)
3859         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3860         m.IPSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3861         return nil
3862 }
3863
3864 // IPUnnumberedDump defines message 'ip_unnumbered_dump'.
3865 type IPUnnumberedDump struct {
3866         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
3867 }
3868
3869 func (m *IPUnnumberedDump) Reset()               { *m = IPUnnumberedDump{} }
3870 func (*IPUnnumberedDump) GetMessageName() string { return "ip_unnumbered_dump" }
3871 func (*IPUnnumberedDump) GetCrcString() string   { return "f9e6675e" }
3872 func (*IPUnnumberedDump) GetMessageType() api.MessageType {
3873         return api.RequestMessage
3874 }
3875
3876 func (m *IPUnnumberedDump) Size() (size int) {
3877         if m == nil {
3878                 return 0
3879         }
3880         size += 4 // m.SwIfIndex
3881         return size
3882 }
3883 func (m *IPUnnumberedDump) Marshal(b []byte) ([]byte, error) {
3884         if b == nil {
3885                 b = make([]byte, m.Size())
3886         }
3887         buf := codec.NewBuffer(b)
3888         buf.EncodeUint32(uint32(m.SwIfIndex))
3889         return buf.Bytes(), nil
3890 }
3891 func (m *IPUnnumberedDump) Unmarshal(b []byte) error {
3892         buf := codec.NewBuffer(b)
3893         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3894         return nil
3895 }
3896
3897 // MfibSignalDetails defines message 'mfib_signal_details'.
3898 type MfibSignalDetails struct {
3899         SwIfIndex    interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3900         TableID      uint32                         `binapi:"u32,name=table_id" json:"table_id,omitempty"`
3901         Prefix       ip_types.Mprefix               `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
3902         IPPacketLen  uint16                         `binapi:"u16,name=ip_packet_len" json:"ip_packet_len,omitempty"`
3903         IPPacketData []byte                         `binapi:"u8[256],name=ip_packet_data" json:"ip_packet_data,omitempty"`
3904 }
3905
3906 func (m *MfibSignalDetails) Reset()               { *m = MfibSignalDetails{} }
3907 func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" }
3908 func (*MfibSignalDetails) GetCrcString() string   { return "6f4a4cfb" }
3909 func (*MfibSignalDetails) GetMessageType() api.MessageType {
3910         return api.ReplyMessage
3911 }
3912
3913 func (m *MfibSignalDetails) Size() (size int) {
3914         if m == nil {
3915                 return 0
3916         }
3917         size += 4       // m.SwIfIndex
3918         size += 4       // m.TableID
3919         size += 1       // m.Prefix.Af
3920         size += 2       // m.Prefix.GrpAddressLength
3921         size += 1 * 16  // m.Prefix.GrpAddress
3922         size += 1 * 16  // m.Prefix.SrcAddress
3923         size += 2       // m.IPPacketLen
3924         size += 1 * 256 // m.IPPacketData
3925         return size
3926 }
3927 func (m *MfibSignalDetails) Marshal(b []byte) ([]byte, error) {
3928         if b == nil {
3929                 b = make([]byte, m.Size())
3930         }
3931         buf := codec.NewBuffer(b)
3932         buf.EncodeUint32(uint32(m.SwIfIndex))
3933         buf.EncodeUint32(m.TableID)
3934         buf.EncodeUint8(uint8(m.Prefix.Af))
3935         buf.EncodeUint16(m.Prefix.GrpAddressLength)
3936         buf.EncodeBytes(m.Prefix.GrpAddress.XXX_UnionData[:], 16)
3937         buf.EncodeBytes(m.Prefix.SrcAddress.XXX_UnionData[:], 16)
3938         buf.EncodeUint16(m.IPPacketLen)
3939         buf.EncodeBytes(m.IPPacketData, 256)
3940         return buf.Bytes(), nil
3941 }
3942 func (m *MfibSignalDetails) Unmarshal(b []byte) error {
3943         buf := codec.NewBuffer(b)
3944         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3945         m.TableID = buf.DecodeUint32()
3946         m.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
3947         m.Prefix.GrpAddressLength = buf.DecodeUint16()
3948         copy(m.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
3949         copy(m.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
3950         m.IPPacketLen = buf.DecodeUint16()
3951         m.IPPacketData = make([]byte, 256)
3952         copy(m.IPPacketData, buf.DecodeBytes(len(m.IPPacketData)))
3953         return nil
3954 }
3955
3956 // MfibSignalDump defines message 'mfib_signal_dump'.
3957 type MfibSignalDump struct{}
3958
3959 func (m *MfibSignalDump) Reset()               { *m = MfibSignalDump{} }
3960 func (*MfibSignalDump) GetMessageName() string { return "mfib_signal_dump" }
3961 func (*MfibSignalDump) GetCrcString() string   { return "51077d14" }
3962 func (*MfibSignalDump) GetMessageType() api.MessageType {
3963         return api.RequestMessage
3964 }
3965
3966 func (m *MfibSignalDump) Size() (size int) {
3967         if m == nil {
3968                 return 0
3969         }
3970         return size
3971 }
3972 func (m *MfibSignalDump) Marshal(b []byte) ([]byte, error) {
3973         if b == nil {
3974                 b = make([]byte, m.Size())
3975         }
3976         buf := codec.NewBuffer(b)
3977         return buf.Bytes(), nil
3978 }
3979 func (m *MfibSignalDump) Unmarshal(b []byte) error {
3980         return nil
3981 }
3982
3983 // SetIPFlowHash defines message 'set_ip_flow_hash'.
3984 // Deprecated: the message will be removed in the future versions
3985 type SetIPFlowHash struct {
3986         VrfID     uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3987         IsIPv6    bool   `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
3988         Src       bool   `binapi:"bool,name=src" json:"src,omitempty"`
3989         Dst       bool   `binapi:"bool,name=dst" json:"dst,omitempty"`
3990         Sport     bool   `binapi:"bool,name=sport" json:"sport,omitempty"`
3991         Dport     bool   `binapi:"bool,name=dport" json:"dport,omitempty"`
3992         Proto     bool   `binapi:"bool,name=proto" json:"proto,omitempty"`
3993         Reverse   bool   `binapi:"bool,name=reverse" json:"reverse,omitempty"`
3994         Symmetric bool   `binapi:"bool,name=symmetric" json:"symmetric,omitempty"`
3995 }
3996
3997 func (m *SetIPFlowHash) Reset()               { *m = SetIPFlowHash{} }
3998 func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" }
3999 func (*SetIPFlowHash) GetCrcString() string   { return "084ee09e" }
4000 func (*SetIPFlowHash) GetMessageType() api.MessageType {
4001         return api.RequestMessage
4002 }
4003
4004 func (m *SetIPFlowHash) Size() (size int) {
4005         if m == nil {
4006                 return 0
4007         }
4008         size += 4 // m.VrfID
4009         size += 1 // m.IsIPv6
4010         size += 1 // m.Src
4011         size += 1 // m.Dst
4012         size += 1 // m.Sport
4013         size += 1 // m.Dport
4014         size += 1 // m.Proto
4015         size += 1 // m.Reverse
4016         size += 1 // m.Symmetric
4017         return size
4018 }
4019 func (m *SetIPFlowHash) Marshal(b []byte) ([]byte, error) {
4020         if b == nil {
4021                 b = make([]byte, m.Size())
4022         }
4023         buf := codec.NewBuffer(b)
4024         buf.EncodeUint32(m.VrfID)
4025         buf.EncodeBool(m.IsIPv6)
4026         buf.EncodeBool(m.Src)
4027         buf.EncodeBool(m.Dst)
4028         buf.EncodeBool(m.Sport)
4029         buf.EncodeBool(m.Dport)
4030         buf.EncodeBool(m.Proto)
4031         buf.EncodeBool(m.Reverse)
4032         buf.EncodeBool(m.Symmetric)
4033         return buf.Bytes(), nil
4034 }
4035 func (m *SetIPFlowHash) Unmarshal(b []byte) error {
4036         buf := codec.NewBuffer(b)
4037         m.VrfID = buf.DecodeUint32()
4038         m.IsIPv6 = buf.DecodeBool()
4039         m.Src = buf.DecodeBool()
4040         m.Dst = buf.DecodeBool()
4041         m.Sport = buf.DecodeBool()
4042         m.Dport = buf.DecodeBool()
4043         m.Proto = buf.DecodeBool()
4044         m.Reverse = buf.DecodeBool()
4045         m.Symmetric = buf.DecodeBool()
4046         return nil
4047 }
4048
4049 // SetIPFlowHashReply defines message 'set_ip_flow_hash_reply'.
4050 // Deprecated: the message will be removed in the future versions
4051 type SetIPFlowHashReply struct {
4052         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4053 }
4054
4055 func (m *SetIPFlowHashReply) Reset()               { *m = SetIPFlowHashReply{} }
4056 func (*SetIPFlowHashReply) GetMessageName() string { return "set_ip_flow_hash_reply" }
4057 func (*SetIPFlowHashReply) GetCrcString() string   { return "e8d4e804" }
4058 func (*SetIPFlowHashReply) GetMessageType() api.MessageType {
4059         return api.ReplyMessage
4060 }
4061
4062 func (m *SetIPFlowHashReply) Size() (size int) {
4063         if m == nil {
4064                 return 0
4065         }
4066         size += 4 // m.Retval
4067         return size
4068 }
4069 func (m *SetIPFlowHashReply) Marshal(b []byte) ([]byte, error) {
4070         if b == nil {
4071                 b = make([]byte, m.Size())
4072         }
4073         buf := codec.NewBuffer(b)
4074         buf.EncodeInt32(m.Retval)
4075         return buf.Bytes(), nil
4076 }
4077 func (m *SetIPFlowHashReply) Unmarshal(b []byte) error {
4078         buf := codec.NewBuffer(b)
4079         m.Retval = buf.DecodeInt32()
4080         return nil
4081 }
4082
4083 // SetIPFlowHashRouterID defines message 'set_ip_flow_hash_router_id'.
4084 type SetIPFlowHashRouterID struct {
4085         RouterID uint32 `binapi:"u32,name=router_id" json:"router_id,omitempty"`
4086 }
4087
4088 func (m *SetIPFlowHashRouterID) Reset()               { *m = SetIPFlowHashRouterID{} }
4089 func (*SetIPFlowHashRouterID) GetMessageName() string { return "set_ip_flow_hash_router_id" }
4090 func (*SetIPFlowHashRouterID) GetCrcString() string   { return "03e4f48e" }
4091 func (*SetIPFlowHashRouterID) GetMessageType() api.MessageType {
4092         return api.RequestMessage
4093 }
4094
4095 func (m *SetIPFlowHashRouterID) Size() (size int) {
4096         if m == nil {
4097                 return 0
4098         }
4099         size += 4 // m.RouterID
4100         return size
4101 }
4102 func (m *SetIPFlowHashRouterID) Marshal(b []byte) ([]byte, error) {
4103         if b == nil {
4104                 b = make([]byte, m.Size())
4105         }
4106         buf := codec.NewBuffer(b)
4107         buf.EncodeUint32(m.RouterID)
4108         return buf.Bytes(), nil
4109 }
4110 func (m *SetIPFlowHashRouterID) Unmarshal(b []byte) error {
4111         buf := codec.NewBuffer(b)
4112         m.RouterID = buf.DecodeUint32()
4113         return nil
4114 }
4115
4116 // SetIPFlowHashRouterIDReply defines message 'set_ip_flow_hash_router_id_reply'.
4117 type SetIPFlowHashRouterIDReply struct {
4118         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4119 }
4120
4121 func (m *SetIPFlowHashRouterIDReply) Reset()               { *m = SetIPFlowHashRouterIDReply{} }
4122 func (*SetIPFlowHashRouterIDReply) GetMessageName() string { return "set_ip_flow_hash_router_id_reply" }
4123 func (*SetIPFlowHashRouterIDReply) GetCrcString() string   { return "e8d4e804" }
4124 func (*SetIPFlowHashRouterIDReply) GetMessageType() api.MessageType {
4125         return api.ReplyMessage
4126 }
4127
4128 func (m *SetIPFlowHashRouterIDReply) Size() (size int) {
4129         if m == nil {
4130                 return 0
4131         }
4132         size += 4 // m.Retval
4133         return size
4134 }
4135 func (m *SetIPFlowHashRouterIDReply) Marshal(b []byte) ([]byte, error) {
4136         if b == nil {
4137                 b = make([]byte, m.Size())
4138         }
4139         buf := codec.NewBuffer(b)
4140         buf.EncodeInt32(m.Retval)
4141         return buf.Bytes(), nil
4142 }
4143 func (m *SetIPFlowHashRouterIDReply) Unmarshal(b []byte) error {
4144         buf := codec.NewBuffer(b)
4145         m.Retval = buf.DecodeInt32()
4146         return nil
4147 }
4148
4149 // SetIPFlowHashV2 defines message 'set_ip_flow_hash_v2'.
4150 type SetIPFlowHashV2 struct {
4151         TableID        uint32                 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
4152         Af             ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
4153         FlowHashConfig IPFlowHashConfig       `binapi:"ip_flow_hash_config,name=flow_hash_config" json:"flow_hash_config,omitempty"`
4154 }
4155
4156 func (m *SetIPFlowHashV2) Reset()               { *m = SetIPFlowHashV2{} }
4157 func (*SetIPFlowHashV2) GetMessageName() string { return "set_ip_flow_hash_v2" }
4158 func (*SetIPFlowHashV2) GetCrcString() string   { return "6d132100" }
4159 func (*SetIPFlowHashV2) GetMessageType() api.MessageType {
4160         return api.RequestMessage
4161 }
4162
4163 func (m *SetIPFlowHashV2) Size() (size int) {
4164         if m == nil {
4165                 return 0
4166         }
4167         size += 4 // m.TableID
4168         size += 1 // m.Af
4169         size += 4 // m.FlowHashConfig
4170         return size
4171 }
4172 func (m *SetIPFlowHashV2) Marshal(b []byte) ([]byte, error) {
4173         if b == nil {
4174                 b = make([]byte, m.Size())
4175         }
4176         buf := codec.NewBuffer(b)
4177         buf.EncodeUint32(m.TableID)
4178         buf.EncodeUint8(uint8(m.Af))
4179         buf.EncodeUint32(uint32(m.FlowHashConfig))
4180         return buf.Bytes(), nil
4181 }
4182 func (m *SetIPFlowHashV2) Unmarshal(b []byte) error {
4183         buf := codec.NewBuffer(b)
4184         m.TableID = buf.DecodeUint32()
4185         m.Af = ip_types.AddressFamily(buf.DecodeUint8())
4186         m.FlowHashConfig = IPFlowHashConfig(buf.DecodeUint32())
4187         return nil
4188 }
4189
4190 // SetIPFlowHashV2Reply defines message 'set_ip_flow_hash_v2_reply'.
4191 type SetIPFlowHashV2Reply struct {
4192         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4193 }
4194
4195 func (m *SetIPFlowHashV2Reply) Reset()               { *m = SetIPFlowHashV2Reply{} }
4196 func (*SetIPFlowHashV2Reply) GetMessageName() string { return "set_ip_flow_hash_v2_reply" }
4197 func (*SetIPFlowHashV2Reply) GetCrcString() string   { return "e8d4e804" }
4198 func (*SetIPFlowHashV2Reply) GetMessageType() api.MessageType {
4199         return api.ReplyMessage
4200 }
4201
4202 func (m *SetIPFlowHashV2Reply) Size() (size int) {
4203         if m == nil {
4204                 return 0
4205         }
4206         size += 4 // m.Retval
4207         return size
4208 }
4209 func (m *SetIPFlowHashV2Reply) Marshal(b []byte) ([]byte, error) {
4210         if b == nil {
4211                 b = make([]byte, m.Size())
4212         }
4213         buf := codec.NewBuffer(b)
4214         buf.EncodeInt32(m.Retval)
4215         return buf.Bytes(), nil
4216 }
4217 func (m *SetIPFlowHashV2Reply) Unmarshal(b []byte) error {
4218         buf := codec.NewBuffer(b)
4219         m.Retval = buf.DecodeInt32()
4220         return nil
4221 }
4222
4223 // SwInterfaceIP6EnableDisable defines message 'sw_interface_ip6_enable_disable'.
4224 type SwInterfaceIP6EnableDisable struct {
4225         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
4226         Enable    bool                           `binapi:"bool,name=enable" json:"enable,omitempty"`
4227 }
4228
4229 func (m *SwInterfaceIP6EnableDisable) Reset()               { *m = SwInterfaceIP6EnableDisable{} }
4230 func (*SwInterfaceIP6EnableDisable) GetMessageName() string { return "sw_interface_ip6_enable_disable" }
4231 func (*SwInterfaceIP6EnableDisable) GetCrcString() string   { return "ae6cfcfb" }
4232 func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType {
4233         return api.RequestMessage
4234 }
4235
4236 func (m *SwInterfaceIP6EnableDisable) Size() (size int) {
4237         if m == nil {
4238                 return 0
4239         }
4240         size += 4 // m.SwIfIndex
4241         size += 1 // m.Enable
4242         return size
4243 }
4244 func (m *SwInterfaceIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
4245         if b == nil {
4246                 b = make([]byte, m.Size())
4247         }
4248         buf := codec.NewBuffer(b)
4249         buf.EncodeUint32(uint32(m.SwIfIndex))
4250         buf.EncodeBool(m.Enable)
4251         return buf.Bytes(), nil
4252 }
4253 func (m *SwInterfaceIP6EnableDisable) Unmarshal(b []byte) error {
4254         buf := codec.NewBuffer(b)
4255         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
4256         m.Enable = buf.DecodeBool()
4257         return nil
4258 }
4259
4260 // SwInterfaceIP6EnableDisableReply defines message 'sw_interface_ip6_enable_disable_reply'.
4261 type SwInterfaceIP6EnableDisableReply struct {
4262         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4263 }
4264
4265 func (m *SwInterfaceIP6EnableDisableReply) Reset() { *m = SwInterfaceIP6EnableDisableReply{} }
4266 func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string {
4267         return "sw_interface_ip6_enable_disable_reply"
4268 }
4269 func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
4270 func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType {
4271         return api.ReplyMessage
4272 }
4273
4274 func (m *SwInterfaceIP6EnableDisableReply) Size() (size int) {
4275         if m == nil {
4276                 return 0
4277         }
4278         size += 4 // m.Retval
4279         return size
4280 }
4281 func (m *SwInterfaceIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) {
4282         if b == nil {
4283                 b = make([]byte, m.Size())
4284         }
4285         buf := codec.NewBuffer(b)
4286         buf.EncodeInt32(m.Retval)
4287         return buf.Bytes(), nil
4288 }
4289 func (m *SwInterfaceIP6EnableDisableReply) Unmarshal(b []byte) error {
4290         buf := codec.NewBuffer(b)
4291         m.Retval = buf.DecodeInt32()
4292         return nil
4293 }
4294
4295 // SwInterfaceIP6GetLinkLocalAddress defines message 'sw_interface_ip6_get_link_local_address'.
4296 type SwInterfaceIP6GetLinkLocalAddress struct {
4297         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
4298 }
4299
4300 func (m *SwInterfaceIP6GetLinkLocalAddress) Reset() { *m = SwInterfaceIP6GetLinkLocalAddress{} }
4301 func (*SwInterfaceIP6GetLinkLocalAddress) GetMessageName() string {
4302         return "sw_interface_ip6_get_link_local_address"
4303 }
4304 func (*SwInterfaceIP6GetLinkLocalAddress) GetCrcString() string { return "f9e6675e" }
4305 func (*SwInterfaceIP6GetLinkLocalAddress) GetMessageType() api.MessageType {
4306         return api.RequestMessage
4307 }
4308
4309 func (m *SwInterfaceIP6GetLinkLocalAddress) Size() (size int) {
4310         if m == nil {
4311                 return 0
4312         }
4313         size += 4 // m.SwIfIndex
4314         return size
4315 }
4316 func (m *SwInterfaceIP6GetLinkLocalAddress) Marshal(b []byte) ([]byte, error) {
4317         if b == nil {
4318                 b = make([]byte, m.Size())
4319         }
4320         buf := codec.NewBuffer(b)
4321         buf.EncodeUint32(uint32(m.SwIfIndex))
4322         return buf.Bytes(), nil
4323 }
4324 func (m *SwInterfaceIP6GetLinkLocalAddress) Unmarshal(b []byte) error {
4325         buf := codec.NewBuffer(b)
4326         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
4327         return nil
4328 }
4329
4330 // SwInterfaceIP6GetLinkLocalAddressReply defines message 'sw_interface_ip6_get_link_local_address_reply'.
4331 type SwInterfaceIP6GetLinkLocalAddressReply struct {
4332         Retval int32               `binapi:"i32,name=retval" json:"retval,omitempty"`
4333         IP     ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
4334 }
4335
4336 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Reset() {
4337         *m = SwInterfaceIP6GetLinkLocalAddressReply{}
4338 }
4339 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetMessageName() string {
4340         return "sw_interface_ip6_get_link_local_address_reply"
4341 }
4342 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetCrcString() string { return "d16b7130" }
4343 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetMessageType() api.MessageType {
4344         return api.ReplyMessage
4345 }
4346
4347 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Size() (size int) {
4348         if m == nil {
4349                 return 0
4350         }
4351         size += 4      // m.Retval
4352         size += 1 * 16 // m.IP
4353         return size
4354 }
4355 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) {
4356         if b == nil {
4357                 b = make([]byte, m.Size())
4358         }
4359         buf := codec.NewBuffer(b)
4360         buf.EncodeInt32(m.Retval)
4361         buf.EncodeBytes(m.IP[:], 16)
4362         return buf.Bytes(), nil
4363 }
4364 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Unmarshal(b []byte) error {
4365         buf := codec.NewBuffer(b)
4366         m.Retval = buf.DecodeInt32()
4367         copy(m.IP[:], buf.DecodeBytes(16))
4368         return nil
4369 }
4370
4371 // SwInterfaceIP6SetLinkLocalAddress defines message 'sw_interface_ip6_set_link_local_address'.
4372 type SwInterfaceIP6SetLinkLocalAddress struct {
4373         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
4374         IP        ip_types.IP6Address            `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
4375 }
4376
4377 func (m *SwInterfaceIP6SetLinkLocalAddress) Reset() { *m = SwInterfaceIP6SetLinkLocalAddress{} }
4378 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string {
4379         return "sw_interface_ip6_set_link_local_address"
4380 }
4381 func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "1c10f15f" }
4382 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType {
4383         return api.RequestMessage
4384 }
4385
4386 func (m *SwInterfaceIP6SetLinkLocalAddress) Size() (size int) {
4387         if m == nil {
4388                 return 0
4389         }
4390         size += 4      // m.SwIfIndex
4391         size += 1 * 16 // m.IP
4392         return size
4393 }
4394 func (m *SwInterfaceIP6SetLinkLocalAddress) Marshal(b []byte) ([]byte, error) {
4395         if b == nil {
4396                 b = make([]byte, m.Size())
4397         }
4398         buf := codec.NewBuffer(b)
4399         buf.EncodeUint32(uint32(m.SwIfIndex))
4400         buf.EncodeBytes(m.IP[:], 16)
4401         return buf.Bytes(), nil
4402 }
4403 func (m *SwInterfaceIP6SetLinkLocalAddress) Unmarshal(b []byte) error {
4404         buf := codec.NewBuffer(b)
4405         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
4406         copy(m.IP[:], buf.DecodeBytes(16))
4407         return nil
4408 }
4409
4410 // SwInterfaceIP6SetLinkLocalAddressReply defines message 'sw_interface_ip6_set_link_local_address_reply'.
4411 type SwInterfaceIP6SetLinkLocalAddressReply struct {
4412         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4413 }
4414
4415 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Reset() {
4416         *m = SwInterfaceIP6SetLinkLocalAddressReply{}
4417 }
4418 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string {
4419         return "sw_interface_ip6_set_link_local_address_reply"
4420 }
4421 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { return "e8d4e804" }
4422 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType {
4423         return api.ReplyMessage
4424 }
4425
4426 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Size() (size int) {
4427         if m == nil {
4428                 return 0
4429         }
4430         size += 4 // m.Retval
4431         return size
4432 }
4433 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) {
4434         if b == nil {
4435                 b = make([]byte, m.Size())
4436         }
4437         buf := codec.NewBuffer(b)
4438         buf.EncodeInt32(m.Retval)
4439         return buf.Bytes(), nil
4440 }
4441 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error {
4442         buf := codec.NewBuffer(b)
4443         m.Retval = buf.DecodeInt32()
4444         return nil
4445 }
4446
4447 func init() { file_ip_binapi_init() }
4448 func file_ip_binapi_init() {
4449         api.RegisterMessage((*AddDelIPPuntRedirectV2)(nil), "add_del_ip_punt_redirect_v2_9e804227")
4450         api.RegisterMessage((*AddDelIPPuntRedirectV2Reply)(nil), "add_del_ip_punt_redirect_v2_reply_e8d4e804")
4451         api.RegisterMessage((*IoamDisable)(nil), "ioam_disable_6b16a45e")
4452         api.RegisterMessage((*IoamDisableReply)(nil), "ioam_disable_reply_e8d4e804")
4453         api.RegisterMessage((*IoamEnable)(nil), "ioam_enable_51ccd868")
4454         api.RegisterMessage((*IoamEnableReply)(nil), "ioam_enable_reply_e8d4e804")
4455         api.RegisterMessage((*IPAddressDetails)(nil), "ip_address_details_ee29b797")
4456         api.RegisterMessage((*IPAddressDump)(nil), "ip_address_dump_2d033de4")
4457         api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip_container_proxy_add_del_7df1dff1")
4458         api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip_container_proxy_add_del_reply_e8d4e804")
4459         api.RegisterMessage((*IPContainerProxyDetails)(nil), "ip_container_proxy_details_a8085523")
4460         api.RegisterMessage((*IPContainerProxyDump)(nil), "ip_container_proxy_dump_51077d14")
4461         api.RegisterMessage((*IPDetails)(nil), "ip_details_eb152d07")
4462         api.RegisterMessage((*IPDump)(nil), "ip_dump_98d231ca")
4463         api.RegisterMessage((*IPMrouteAddDel)(nil), "ip_mroute_add_del_0dd7e790")
4464         api.RegisterMessage((*IPMrouteAddDelReply)(nil), "ip_mroute_add_del_reply_1992deab")
4465         api.RegisterMessage((*IPMrouteDetails)(nil), "ip_mroute_details_c5cb23fc")
4466         api.RegisterMessage((*IPMrouteDump)(nil), "ip_mroute_dump_b9d2e09e")
4467         api.RegisterMessage((*IPMtableDetails)(nil), "ip_mtable_details_b9d2e09e")
4468         api.RegisterMessage((*IPMtableDump)(nil), "ip_mtable_dump_51077d14")
4469         api.RegisterMessage((*IPPathMtuDetails)(nil), "ip_path_mtu_details_ac9539a7")
4470         api.RegisterMessage((*IPPathMtuGet)(nil), "ip_path_mtu_get_f75ba505")
4471         api.RegisterMessage((*IPPathMtuGetReply)(nil), "ip_path_mtu_get_reply_53b48f5d")
4472         api.RegisterMessage((*IPPathMtuReplaceBegin)(nil), "ip_path_mtu_replace_begin_51077d14")
4473         api.RegisterMessage((*IPPathMtuReplaceBeginReply)(nil), "ip_path_mtu_replace_begin_reply_e8d4e804")
4474         api.RegisterMessage((*IPPathMtuReplaceEnd)(nil), "ip_path_mtu_replace_end_51077d14")
4475         api.RegisterMessage((*IPPathMtuReplaceEndReply)(nil), "ip_path_mtu_replace_end_reply_e8d4e804")
4476         api.RegisterMessage((*IPPathMtuUpdate)(nil), "ip_path_mtu_update_10bbe5cb")
4477         api.RegisterMessage((*IPPathMtuUpdateReply)(nil), "ip_path_mtu_update_reply_e8d4e804")
4478         api.RegisterMessage((*IPPuntPolice)(nil), "ip_punt_police_db867cea")
4479         api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip_punt_police_reply_e8d4e804")
4480         api.RegisterMessage((*IPPuntRedirect)(nil), "ip_punt_redirect_6580f635")
4481         api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_2cef63e7")
4482         api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip_punt_redirect_dump_2d033de4")
4483         api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip_punt_redirect_reply_e8d4e804")
4484         api.RegisterMessage((*IPPuntRedirectV2Details)(nil), "ip_punt_redirect_v2_details_7ba42e1d")
4485         api.RegisterMessage((*IPPuntRedirectV2Dump)(nil), "ip_punt_redirect_v2_dump_d817a484")
4486         api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_eb77968d")
4487         api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip_reassembly_enable_disable_reply_e8d4e804")
4488         api.RegisterMessage((*IPReassemblyGet)(nil), "ip_reassembly_get_ea13ff63")
4489         api.RegisterMessage((*IPReassemblyGetReply)(nil), "ip_reassembly_get_reply_d5eb8d34")
4490         api.RegisterMessage((*IPReassemblySet)(nil), "ip_reassembly_set_16467d25")
4491         api.RegisterMessage((*IPReassemblySetReply)(nil), "ip_reassembly_set_reply_e8d4e804")
4492         api.RegisterMessage((*IPRouteAddDel)(nil), "ip_route_add_del_b8ecfe0d")
4493         api.RegisterMessage((*IPRouteAddDelReply)(nil), "ip_route_add_del_reply_1992deab")
4494         api.RegisterMessage((*IPRouteAddDelV2)(nil), "ip_route_add_del_v2_521ef330")
4495         api.RegisterMessage((*IPRouteAddDelV2Reply)(nil), "ip_route_add_del_v2_reply_1992deab")
4496         api.RegisterMessage((*IPRouteDetails)(nil), "ip_route_details_bda8f315")
4497         api.RegisterMessage((*IPRouteDump)(nil), "ip_route_dump_b9d2e09e")
4498         api.RegisterMessage((*IPRouteLookup)(nil), "ip_route_lookup_710d6471")
4499         api.RegisterMessage((*IPRouteLookupReply)(nil), "ip_route_lookup_reply_5d8febcb")
4500         api.RegisterMessage((*IPRouteLookupV2)(nil), "ip_route_lookup_v2_710d6471")
4501         api.RegisterMessage((*IPRouteLookupV2Reply)(nil), "ip_route_lookup_v2_reply_84cc9e03")
4502         api.RegisterMessage((*IPRouteV2Details)(nil), "ip_route_v2_details_b09aa6c0")
4503         api.RegisterMessage((*IPRouteV2Dump)(nil), "ip_route_v2_dump_d16f72e6")
4504         api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip_source_and_port_range_check_add_del_92a067e3")
4505         api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip_source_and_port_range_check_add_del_reply_e8d4e804")
4506         api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip_source_and_port_range_check_interface_add_del_e1ba8987")
4507         api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip_source_and_port_range_check_interface_add_del_reply_e8d4e804")
4508         api.RegisterMessage((*IPTableAddDel)(nil), "ip_table_add_del_0ffdaec0")
4509         api.RegisterMessage((*IPTableAddDelReply)(nil), "ip_table_add_del_reply_e8d4e804")
4510         api.RegisterMessage((*IPTableAllocate)(nil), "ip_table_allocate_b9d2e09e")
4511         api.RegisterMessage((*IPTableAllocateReply)(nil), "ip_table_allocate_reply_1728303a")
4512         api.RegisterMessage((*IPTableDetails)(nil), "ip_table_details_c79fca0f")
4513         api.RegisterMessage((*IPTableDump)(nil), "ip_table_dump_51077d14")
4514         api.RegisterMessage((*IPTableFlush)(nil), "ip_table_flush_b9d2e09e")
4515         api.RegisterMessage((*IPTableFlushReply)(nil), "ip_table_flush_reply_e8d4e804")
4516         api.RegisterMessage((*IPTableReplaceBegin)(nil), "ip_table_replace_begin_b9d2e09e")
4517         api.RegisterMessage((*IPTableReplaceBeginReply)(nil), "ip_table_replace_begin_reply_e8d4e804")
4518         api.RegisterMessage((*IPTableReplaceEnd)(nil), "ip_table_replace_end_b9d2e09e")
4519         api.RegisterMessage((*IPTableReplaceEndReply)(nil), "ip_table_replace_end_reply_e8d4e804")
4520         api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip_unnumbered_details_cc59bd42")
4521         api.RegisterMessage((*IPUnnumberedDump)(nil), "ip_unnumbered_dump_f9e6675e")
4522         api.RegisterMessage((*MfibSignalDetails)(nil), "mfib_signal_details_6f4a4cfb")
4523         api.RegisterMessage((*MfibSignalDump)(nil), "mfib_signal_dump_51077d14")
4524         api.RegisterMessage((*SetIPFlowHash)(nil), "set_ip_flow_hash_084ee09e")
4525         api.RegisterMessage((*SetIPFlowHashReply)(nil), "set_ip_flow_hash_reply_e8d4e804")
4526         api.RegisterMessage((*SetIPFlowHashRouterID)(nil), "set_ip_flow_hash_router_id_03e4f48e")
4527         api.RegisterMessage((*SetIPFlowHashRouterIDReply)(nil), "set_ip_flow_hash_router_id_reply_e8d4e804")
4528         api.RegisterMessage((*SetIPFlowHashV2)(nil), "set_ip_flow_hash_v2_6d132100")
4529         api.RegisterMessage((*SetIPFlowHashV2Reply)(nil), "set_ip_flow_hash_v2_reply_e8d4e804")
4530         api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "sw_interface_ip6_enable_disable_ae6cfcfb")
4531         api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "sw_interface_ip6_enable_disable_reply_e8d4e804")
4532         api.RegisterMessage((*SwInterfaceIP6GetLinkLocalAddress)(nil), "sw_interface_ip6_get_link_local_address_f9e6675e")
4533         api.RegisterMessage((*SwInterfaceIP6GetLinkLocalAddressReply)(nil), "sw_interface_ip6_get_link_local_address_reply_d16b7130")
4534         api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "sw_interface_ip6_set_link_local_address_1c10f15f")
4535         api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "sw_interface_ip6_set_link_local_address_reply_e8d4e804")
4536 }
4537
4538 // Messages returns list of all messages in this module.
4539 func AllMessages() []api.Message {
4540         return []api.Message{
4541                 (*AddDelIPPuntRedirectV2)(nil),
4542                 (*AddDelIPPuntRedirectV2Reply)(nil),
4543                 (*IoamDisable)(nil),
4544                 (*IoamDisableReply)(nil),
4545                 (*IoamEnable)(nil),
4546                 (*IoamEnableReply)(nil),
4547                 (*IPAddressDetails)(nil),
4548                 (*IPAddressDump)(nil),
4549                 (*IPContainerProxyAddDel)(nil),
4550                 (*IPContainerProxyAddDelReply)(nil),
4551                 (*IPContainerProxyDetails)(nil),
4552                 (*IPContainerProxyDump)(nil),
4553                 (*IPDetails)(nil),
4554                 (*IPDump)(nil),
4555                 (*IPMrouteAddDel)(nil),
4556                 (*IPMrouteAddDelReply)(nil),
4557                 (*IPMrouteDetails)(nil),
4558                 (*IPMrouteDump)(nil),
4559                 (*IPMtableDetails)(nil),
4560                 (*IPMtableDump)(nil),
4561                 (*IPPathMtuDetails)(nil),
4562                 (*IPPathMtuGet)(nil),
4563                 (*IPPathMtuGetReply)(nil),
4564                 (*IPPathMtuReplaceBegin)(nil),
4565                 (*IPPathMtuReplaceBeginReply)(nil),
4566                 (*IPPathMtuReplaceEnd)(nil),
4567                 (*IPPathMtuReplaceEndReply)(nil),
4568                 (*IPPathMtuUpdate)(nil),
4569                 (*IPPathMtuUpdateReply)(nil),
4570                 (*IPPuntPolice)(nil),
4571                 (*IPPuntPoliceReply)(nil),
4572                 (*IPPuntRedirect)(nil),
4573                 (*IPPuntRedirectDetails)(nil),
4574                 (*IPPuntRedirectDump)(nil),
4575                 (*IPPuntRedirectReply)(nil),
4576                 (*IPPuntRedirectV2Details)(nil),
4577                 (*IPPuntRedirectV2Dump)(nil),
4578                 (*IPReassemblyEnableDisable)(nil),
4579                 (*IPReassemblyEnableDisableReply)(nil),
4580                 (*IPReassemblyGet)(nil),
4581                 (*IPReassemblyGetReply)(nil),
4582                 (*IPReassemblySet)(nil),
4583                 (*IPReassemblySetReply)(nil),
4584                 (*IPRouteAddDel)(nil),
4585                 (*IPRouteAddDelReply)(nil),
4586                 (*IPRouteAddDelV2)(nil),
4587                 (*IPRouteAddDelV2Reply)(nil),
4588                 (*IPRouteDetails)(nil),
4589                 (*IPRouteDump)(nil),
4590                 (*IPRouteLookup)(nil),
4591                 (*IPRouteLookupReply)(nil),
4592                 (*IPRouteLookupV2)(nil),
4593                 (*IPRouteLookupV2Reply)(nil),
4594                 (*IPRouteV2Details)(nil),
4595                 (*IPRouteV2Dump)(nil),
4596                 (*IPSourceAndPortRangeCheckAddDel)(nil),
4597                 (*IPSourceAndPortRangeCheckAddDelReply)(nil),
4598                 (*IPSourceAndPortRangeCheckInterfaceAddDel)(nil),
4599                 (*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil),
4600                 (*IPTableAddDel)(nil),
4601                 (*IPTableAddDelReply)(nil),
4602                 (*IPTableAllocate)(nil),
4603                 (*IPTableAllocateReply)(nil),
4604                 (*IPTableDetails)(nil),
4605                 (*IPTableDump)(nil),
4606                 (*IPTableFlush)(nil),
4607                 (*IPTableFlushReply)(nil),
4608                 (*IPTableReplaceBegin)(nil),
4609                 (*IPTableReplaceBeginReply)(nil),
4610                 (*IPTableReplaceEnd)(nil),
4611                 (*IPTableReplaceEndReply)(nil),
4612                 (*IPUnnumberedDetails)(nil),
4613                 (*IPUnnumberedDump)(nil),
4614                 (*MfibSignalDetails)(nil),
4615                 (*MfibSignalDump)(nil),
4616                 (*SetIPFlowHash)(nil),
4617                 (*SetIPFlowHashReply)(nil),
4618                 (*SetIPFlowHashRouterID)(nil),
4619                 (*SetIPFlowHashRouterIDReply)(nil),
4620                 (*SetIPFlowHashV2)(nil),
4621                 (*SetIPFlowHashV2Reply)(nil),
4622                 (*SwInterfaceIP6EnableDisable)(nil),
4623                 (*SwInterfaceIP6EnableDisableReply)(nil),
4624                 (*SwInterfaceIP6GetLinkLocalAddress)(nil),
4625                 (*SwInterfaceIP6GetLinkLocalAddressReply)(nil),
4626                 (*SwInterfaceIP6SetLinkLocalAddress)(nil),
4627                 (*SwInterfaceIP6SetLinkLocalAddressReply)(nil),
4628         }
4629 }