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