1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0
4 // VPP: 20.05.1-release
5 // source: /usr/share/vpp/api/core/ip.api.json
7 // Package ip contains generated bindings for API file ip.api.
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"
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
37 VersionCrc = 0x765d74b1
40 // IPReassType defines enum 'ip_reass_type'.
41 type IPReassType uint32
44 IP_REASS_TYPE_FULL IPReassType = 0
45 IP_REASS_TYPE_SHALLOW_VIRTUAL IPReassType = 1
49 IPReassType_name = map[uint32]string{
50 0: "IP_REASS_TYPE_FULL",
51 1: "IP_REASS_TYPE_SHALLOW_VIRTUAL",
53 IPReassType_value = map[string]uint32{
54 "IP_REASS_TYPE_FULL": 0,
55 "IP_REASS_TYPE_SHALLOW_VIRTUAL": 1,
59 func (x IPReassType) String() string {
60 s, ok := IPReassType_name[uint32(x)]
64 return "IPReassType(" + strconv.Itoa(int(x)) + ")"
67 // IPMroute defines type 'ip_mroute'.
68 type IPMroute struct {
69 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
70 EntryFlags uint32 `binapi:"u32,name=entry_flags" json:"entry_flags,omitempty"`
71 RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
72 Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
73 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"`
74 Paths []mfib_types.MfibPath `binapi:"mfib_path[n_paths],name=paths" json:"paths,omitempty"`
77 // IPRoute defines type 'ip_route'.
79 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
80 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
81 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
82 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"`
83 Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
86 // IPTable defines type 'ip_table'.
88 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
89 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
90 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
93 // PuntRedirect defines type 'punt_redirect'.
94 type PuntRedirect struct {
95 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
96 TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
97 Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"`
100 // IoamDisable defines message 'ioam_disable'.
101 type IoamDisable struct {
102 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
105 func (m *IoamDisable) Reset() { *m = IoamDisable{} }
106 func (*IoamDisable) GetMessageName() string { return "ioam_disable" }
107 func (*IoamDisable) GetCrcString() string { return "6b16a45e" }
108 func (*IoamDisable) GetMessageType() api.MessageType {
109 return api.RequestMessage
112 func (m *IoamDisable) Size() (size int) {
119 func (m *IoamDisable) Marshal(b []byte) ([]byte, error) {
121 b = make([]byte, m.Size())
123 buf := codec.NewBuffer(b)
124 buf.EncodeUint16(m.ID)
125 return buf.Bytes(), nil
127 func (m *IoamDisable) Unmarshal(b []byte) error {
128 buf := codec.NewBuffer(b)
129 m.ID = buf.DecodeUint16()
133 // IoamDisableReply defines message 'ioam_disable_reply'.
134 type IoamDisableReply struct {
135 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
138 func (m *IoamDisableReply) Reset() { *m = IoamDisableReply{} }
139 func (*IoamDisableReply) GetMessageName() string { return "ioam_disable_reply" }
140 func (*IoamDisableReply) GetCrcString() string { return "e8d4e804" }
141 func (*IoamDisableReply) GetMessageType() api.MessageType {
142 return api.ReplyMessage
145 func (m *IoamDisableReply) Size() (size int) {
149 size += 4 // m.Retval
152 func (m *IoamDisableReply) Marshal(b []byte) ([]byte, error) {
154 b = make([]byte, m.Size())
156 buf := codec.NewBuffer(b)
157 buf.EncodeInt32(m.Retval)
158 return buf.Bytes(), nil
160 func (m *IoamDisableReply) Unmarshal(b []byte) error {
161 buf := codec.NewBuffer(b)
162 m.Retval = buf.DecodeInt32()
166 // IoamEnable defines message 'ioam_enable'.
167 type IoamEnable struct {
168 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
169 Seqno bool `binapi:"bool,name=seqno" json:"seqno,omitempty"`
170 Analyse bool `binapi:"bool,name=analyse" json:"analyse,omitempty"`
171 PotEnable bool `binapi:"bool,name=pot_enable" json:"pot_enable,omitempty"`
172 TraceEnable bool `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"`
173 NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
176 func (m *IoamEnable) Reset() { *m = IoamEnable{} }
177 func (*IoamEnable) GetMessageName() string { return "ioam_enable" }
178 func (*IoamEnable) GetCrcString() string { return "51ccd868" }
179 func (*IoamEnable) GetMessageType() api.MessageType {
180 return api.RequestMessage
183 func (m *IoamEnable) Size() (size int) {
189 size += 1 // m.Analyse
190 size += 1 // m.PotEnable
191 size += 1 // m.TraceEnable
192 size += 4 // m.NodeID
195 func (m *IoamEnable) Marshal(b []byte) ([]byte, error) {
197 b = make([]byte, m.Size())
199 buf := codec.NewBuffer(b)
200 buf.EncodeUint16(m.ID)
201 buf.EncodeBool(m.Seqno)
202 buf.EncodeBool(m.Analyse)
203 buf.EncodeBool(m.PotEnable)
204 buf.EncodeBool(m.TraceEnable)
205 buf.EncodeUint32(m.NodeID)
206 return buf.Bytes(), nil
208 func (m *IoamEnable) Unmarshal(b []byte) error {
209 buf := codec.NewBuffer(b)
210 m.ID = buf.DecodeUint16()
211 m.Seqno = buf.DecodeBool()
212 m.Analyse = buf.DecodeBool()
213 m.PotEnable = buf.DecodeBool()
214 m.TraceEnable = buf.DecodeBool()
215 m.NodeID = buf.DecodeUint32()
219 // IoamEnableReply defines message 'ioam_enable_reply'.
220 type IoamEnableReply struct {
221 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
224 func (m *IoamEnableReply) Reset() { *m = IoamEnableReply{} }
225 func (*IoamEnableReply) GetMessageName() string { return "ioam_enable_reply" }
226 func (*IoamEnableReply) GetCrcString() string { return "e8d4e804" }
227 func (*IoamEnableReply) GetMessageType() api.MessageType {
228 return api.ReplyMessage
231 func (m *IoamEnableReply) Size() (size int) {
235 size += 4 // m.Retval
238 func (m *IoamEnableReply) Marshal(b []byte) ([]byte, error) {
240 b = make([]byte, m.Size())
242 buf := codec.NewBuffer(b)
243 buf.EncodeInt32(m.Retval)
244 return buf.Bytes(), nil
246 func (m *IoamEnableReply) Unmarshal(b []byte) error {
247 buf := codec.NewBuffer(b)
248 m.Retval = buf.DecodeInt32()
252 // IPAddressDetails defines message 'ip_address_details'.
253 type IPAddressDetails struct {
254 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
255 Prefix ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
258 func (m *IPAddressDetails) Reset() { *m = IPAddressDetails{} }
259 func (*IPAddressDetails) GetMessageName() string { return "ip_address_details" }
260 func (*IPAddressDetails) GetCrcString() string { return "b1199745" }
261 func (*IPAddressDetails) GetMessageType() api.MessageType {
262 return api.ReplyMessage
265 func (m *IPAddressDetails) Size() (size int) {
269 size += 4 // m.SwIfIndex
270 size += 1 // m.Prefix.Address.Af
271 size += 1 * 16 // m.Prefix.Address.Un
272 size += 1 // m.Prefix.Len
275 func (m *IPAddressDetails) Marshal(b []byte) ([]byte, error) {
277 b = make([]byte, m.Size())
279 buf := codec.NewBuffer(b)
280 buf.EncodeUint32(uint32(m.SwIfIndex))
281 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
282 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
283 buf.EncodeUint8(m.Prefix.Len)
284 return buf.Bytes(), nil
286 func (m *IPAddressDetails) Unmarshal(b []byte) error {
287 buf := codec.NewBuffer(b)
288 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
289 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
290 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
291 m.Prefix.Len = buf.DecodeUint8()
295 // IPAddressDump defines message 'ip_address_dump'.
296 type IPAddressDump struct {
297 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
298 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
301 func (m *IPAddressDump) Reset() { *m = IPAddressDump{} }
302 func (*IPAddressDump) GetMessageName() string { return "ip_address_dump" }
303 func (*IPAddressDump) GetCrcString() string { return "2d033de4" }
304 func (*IPAddressDump) GetMessageType() api.MessageType {
305 return api.RequestMessage
308 func (m *IPAddressDump) Size() (size int) {
312 size += 4 // m.SwIfIndex
313 size += 1 // m.IsIPv6
316 func (m *IPAddressDump) Marshal(b []byte) ([]byte, error) {
318 b = make([]byte, m.Size())
320 buf := codec.NewBuffer(b)
321 buf.EncodeUint32(uint32(m.SwIfIndex))
322 buf.EncodeBool(m.IsIPv6)
323 return buf.Bytes(), nil
325 func (m *IPAddressDump) Unmarshal(b []byte) error {
326 buf := codec.NewBuffer(b)
327 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
328 m.IsIPv6 = buf.DecodeBool()
332 // IPContainerProxyAddDel defines message 'ip_container_proxy_add_del'.
333 type IPContainerProxyAddDel struct {
334 Pfx ip_types.Prefix `binapi:"prefix,name=pfx" json:"pfx,omitempty"`
335 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
336 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
339 func (m *IPContainerProxyAddDel) Reset() { *m = IPContainerProxyAddDel{} }
340 func (*IPContainerProxyAddDel) GetMessageName() string { return "ip_container_proxy_add_del" }
341 func (*IPContainerProxyAddDel) GetCrcString() string { return "91189f40" }
342 func (*IPContainerProxyAddDel) GetMessageType() api.MessageType {
343 return api.RequestMessage
346 func (m *IPContainerProxyAddDel) Size() (size int) {
350 size += 1 // m.Pfx.Address.Af
351 size += 1 * 16 // m.Pfx.Address.Un
352 size += 1 // m.Pfx.Len
353 size += 4 // m.SwIfIndex
357 func (m *IPContainerProxyAddDel) Marshal(b []byte) ([]byte, error) {
359 b = make([]byte, m.Size())
361 buf := codec.NewBuffer(b)
362 buf.EncodeUint8(uint8(m.Pfx.Address.Af))
363 buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
364 buf.EncodeUint8(m.Pfx.Len)
365 buf.EncodeUint32(uint32(m.SwIfIndex))
366 buf.EncodeBool(m.IsAdd)
367 return buf.Bytes(), nil
369 func (m *IPContainerProxyAddDel) Unmarshal(b []byte) error {
370 buf := codec.NewBuffer(b)
371 m.Pfx.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
372 copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
373 m.Pfx.Len = buf.DecodeUint8()
374 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
375 m.IsAdd = buf.DecodeBool()
379 // IPContainerProxyAddDelReply defines message 'ip_container_proxy_add_del_reply'.
380 type IPContainerProxyAddDelReply struct {
381 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
384 func (m *IPContainerProxyAddDelReply) Reset() { *m = IPContainerProxyAddDelReply{} }
385 func (*IPContainerProxyAddDelReply) GetMessageName() string {
386 return "ip_container_proxy_add_del_reply"
388 func (*IPContainerProxyAddDelReply) GetCrcString() string { return "e8d4e804" }
389 func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType {
390 return api.ReplyMessage
393 func (m *IPContainerProxyAddDelReply) Size() (size int) {
397 size += 4 // m.Retval
400 func (m *IPContainerProxyAddDelReply) Marshal(b []byte) ([]byte, error) {
402 b = make([]byte, m.Size())
404 buf := codec.NewBuffer(b)
405 buf.EncodeInt32(m.Retval)
406 return buf.Bytes(), nil
408 func (m *IPContainerProxyAddDelReply) Unmarshal(b []byte) error {
409 buf := codec.NewBuffer(b)
410 m.Retval = buf.DecodeInt32()
414 // IPContainerProxyDetails defines message 'ip_container_proxy_details'.
415 type IPContainerProxyDetails struct {
416 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
417 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
420 func (m *IPContainerProxyDetails) Reset() { *m = IPContainerProxyDetails{} }
421 func (*IPContainerProxyDetails) GetMessageName() string { return "ip_container_proxy_details" }
422 func (*IPContainerProxyDetails) GetCrcString() string { return "0ee460e8" }
423 func (*IPContainerProxyDetails) GetMessageType() api.MessageType {
424 return api.ReplyMessage
427 func (m *IPContainerProxyDetails) Size() (size int) {
431 size += 4 // m.SwIfIndex
432 size += 1 // m.Prefix.Address.Af
433 size += 1 * 16 // m.Prefix.Address.Un
434 size += 1 // m.Prefix.Len
437 func (m *IPContainerProxyDetails) Marshal(b []byte) ([]byte, error) {
439 b = make([]byte, m.Size())
441 buf := codec.NewBuffer(b)
442 buf.EncodeUint32(uint32(m.SwIfIndex))
443 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
444 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
445 buf.EncodeUint8(m.Prefix.Len)
446 return buf.Bytes(), nil
448 func (m *IPContainerProxyDetails) Unmarshal(b []byte) error {
449 buf := codec.NewBuffer(b)
450 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
451 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
452 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
453 m.Prefix.Len = buf.DecodeUint8()
457 // IPContainerProxyDump defines message 'ip_container_proxy_dump'.
458 type IPContainerProxyDump struct{}
460 func (m *IPContainerProxyDump) Reset() { *m = IPContainerProxyDump{} }
461 func (*IPContainerProxyDump) GetMessageName() string { return "ip_container_proxy_dump" }
462 func (*IPContainerProxyDump) GetCrcString() string { return "51077d14" }
463 func (*IPContainerProxyDump) GetMessageType() api.MessageType {
464 return api.RequestMessage
467 func (m *IPContainerProxyDump) Size() (size int) {
473 func (m *IPContainerProxyDump) Marshal(b []byte) ([]byte, error) {
475 b = make([]byte, m.Size())
477 buf := codec.NewBuffer(b)
478 return buf.Bytes(), nil
480 func (m *IPContainerProxyDump) Unmarshal(b []byte) error {
484 // IPDetails defines message 'ip_details'.
485 type IPDetails struct {
486 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
487 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
490 func (m *IPDetails) Reset() { *m = IPDetails{} }
491 func (*IPDetails) GetMessageName() string { return "ip_details" }
492 func (*IPDetails) GetCrcString() string { return "eb152d07" }
493 func (*IPDetails) GetMessageType() api.MessageType {
494 return api.ReplyMessage
497 func (m *IPDetails) Size() (size int) {
501 size += 4 // m.SwIfIndex
502 size += 1 // m.IsIPv6
505 func (m *IPDetails) Marshal(b []byte) ([]byte, error) {
507 b = make([]byte, m.Size())
509 buf := codec.NewBuffer(b)
510 buf.EncodeUint32(uint32(m.SwIfIndex))
511 buf.EncodeBool(m.IsIPv6)
512 return buf.Bytes(), nil
514 func (m *IPDetails) Unmarshal(b []byte) error {
515 buf := codec.NewBuffer(b)
516 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
517 m.IsIPv6 = buf.DecodeBool()
521 // IPDump defines message 'ip_dump'.
523 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
526 func (m *IPDump) Reset() { *m = IPDump{} }
527 func (*IPDump) GetMessageName() string { return "ip_dump" }
528 func (*IPDump) GetCrcString() string { return "98d231ca" }
529 func (*IPDump) GetMessageType() api.MessageType {
530 return api.RequestMessage
533 func (m *IPDump) Size() (size int) {
537 size += 1 // m.IsIPv6
540 func (m *IPDump) Marshal(b []byte) ([]byte, error) {
542 b = make([]byte, m.Size())
544 buf := codec.NewBuffer(b)
545 buf.EncodeBool(m.IsIPv6)
546 return buf.Bytes(), nil
548 func (m *IPDump) Unmarshal(b []byte) error {
549 buf := codec.NewBuffer(b)
550 m.IsIPv6 = buf.DecodeBool()
554 // IPMrouteAddDel defines message 'ip_mroute_add_del'.
555 type IPMrouteAddDel struct {
556 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
557 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
558 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
561 func (m *IPMrouteAddDel) Reset() { *m = IPMrouteAddDel{} }
562 func (*IPMrouteAddDel) GetMessageName() string { return "ip_mroute_add_del" }
563 func (*IPMrouteAddDel) GetCrcString() string { return "f6627d17" }
564 func (*IPMrouteAddDel) GetMessageType() api.MessageType {
565 return api.RequestMessage
568 func (m *IPMrouteAddDel) Size() (size int) {
573 size += 1 // m.IsMultipath
574 size += 4 // m.Route.TableID
575 size += 4 // m.Route.EntryFlags
576 size += 4 // m.Route.RpfID
577 size += 1 // m.Route.Prefix.Af
578 size += 2 // m.Route.Prefix.GrpAddressLength
579 size += 1 * 16 // m.Route.Prefix.GrpAddress
580 size += 1 * 16 // m.Route.Prefix.SrcAddress
581 size += 1 // m.Route.NPaths
582 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
583 var s2 mfib_types.MfibPath
585 if j2 < len(m.Route.Paths) {
586 s2 = m.Route.Paths[j2]
588 size += 4 // s2.ItfFlags
589 size += 4 // s2.Path.SwIfIndex
590 size += 4 // s2.Path.TableID
591 size += 4 // s2.Path.RpfID
592 size += 1 // s2.Path.Weight
593 size += 1 // s2.Path.Preference
594 size += 4 // s2.Path.Type
595 size += 4 // s2.Path.Flags
596 size += 4 // s2.Path.Proto
597 size += 1 * 16 // s2.Path.Nh.Address
598 size += 4 // s2.Path.Nh.ViaLabel
599 size += 4 // s2.Path.Nh.ObjID
600 size += 4 // s2.Path.Nh.ClassifyTableIndex
601 size += 1 // s2.Path.NLabels
602 for j4 := 0; j4 < 16; j4++ {
603 size += 1 // s2.Path.LabelStack[j4].IsUniform
604 size += 4 // s2.Path.LabelStack[j4].Label
605 size += 1 // s2.Path.LabelStack[j4].TTL
606 size += 1 // s2.Path.LabelStack[j4].Exp
611 func (m *IPMrouteAddDel) Marshal(b []byte) ([]byte, error) {
613 b = make([]byte, m.Size())
615 buf := codec.NewBuffer(b)
616 buf.EncodeBool(m.IsAdd)
617 buf.EncodeBool(m.IsMultipath)
618 buf.EncodeUint32(m.Route.TableID)
619 buf.EncodeUint32(m.Route.EntryFlags)
620 buf.EncodeUint32(m.Route.RpfID)
621 buf.EncodeUint8(uint8(m.Route.Prefix.Af))
622 buf.EncodeUint16(m.Route.Prefix.GrpAddressLength)
623 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16)
624 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16)
625 buf.EncodeUint8(uint8(len(m.Route.Paths)))
626 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
627 var v1 mfib_types.MfibPath // Paths
628 if j1 < len(m.Route.Paths) {
629 v1 = m.Route.Paths[j1]
631 buf.EncodeUint32(uint32(v1.ItfFlags))
632 buf.EncodeUint32(v1.Path.SwIfIndex)
633 buf.EncodeUint32(v1.Path.TableID)
634 buf.EncodeUint32(v1.Path.RpfID)
635 buf.EncodeUint8(v1.Path.Weight)
636 buf.EncodeUint8(v1.Path.Preference)
637 buf.EncodeUint32(uint32(v1.Path.Type))
638 buf.EncodeUint32(uint32(v1.Path.Flags))
639 buf.EncodeUint32(uint32(v1.Path.Proto))
640 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16)
641 buf.EncodeUint32(v1.Path.Nh.ViaLabel)
642 buf.EncodeUint32(v1.Path.Nh.ObjID)
643 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex)
644 buf.EncodeUint8(v1.Path.NLabels)
645 for j3 := 0; j3 < 16; j3++ {
646 buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform)
647 buf.EncodeUint32(v1.Path.LabelStack[j3].Label)
648 buf.EncodeUint8(v1.Path.LabelStack[j3].TTL)
649 buf.EncodeUint8(v1.Path.LabelStack[j3].Exp)
652 return buf.Bytes(), nil
654 func (m *IPMrouteAddDel) Unmarshal(b []byte) error {
655 buf := codec.NewBuffer(b)
656 m.IsAdd = buf.DecodeBool()
657 m.IsMultipath = buf.DecodeBool()
658 m.Route.TableID = buf.DecodeUint32()
659 m.Route.EntryFlags = buf.DecodeUint32()
660 m.Route.RpfID = buf.DecodeUint32()
661 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
662 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
663 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
664 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
665 m.Route.NPaths = buf.DecodeUint8()
666 m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths)
667 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
668 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
669 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
670 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
671 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
672 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
673 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
674 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32())
675 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32())
676 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
677 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
678 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
679 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
680 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
681 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
682 for j3 := 0; j3 < 16; j3++ {
683 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
684 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
685 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
686 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
692 // IPMrouteAddDelReply defines message 'ip_mroute_add_del_reply'.
693 type IPMrouteAddDelReply struct {
694 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
695 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
698 func (m *IPMrouteAddDelReply) Reset() { *m = IPMrouteAddDelReply{} }
699 func (*IPMrouteAddDelReply) GetMessageName() string { return "ip_mroute_add_del_reply" }
700 func (*IPMrouteAddDelReply) GetCrcString() string { return "1992deab" }
701 func (*IPMrouteAddDelReply) GetMessageType() api.MessageType {
702 return api.ReplyMessage
705 func (m *IPMrouteAddDelReply) Size() (size int) {
709 size += 4 // m.Retval
710 size += 4 // m.StatsIndex
713 func (m *IPMrouteAddDelReply) Marshal(b []byte) ([]byte, error) {
715 b = make([]byte, m.Size())
717 buf := codec.NewBuffer(b)
718 buf.EncodeInt32(m.Retval)
719 buf.EncodeUint32(m.StatsIndex)
720 return buf.Bytes(), nil
722 func (m *IPMrouteAddDelReply) Unmarshal(b []byte) error {
723 buf := codec.NewBuffer(b)
724 m.Retval = buf.DecodeInt32()
725 m.StatsIndex = buf.DecodeUint32()
729 // IPMrouteDetails defines message 'ip_mroute_details'.
730 type IPMrouteDetails struct {
731 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
734 func (m *IPMrouteDetails) Reset() { *m = IPMrouteDetails{} }
735 func (*IPMrouteDetails) GetMessageName() string { return "ip_mroute_details" }
736 func (*IPMrouteDetails) GetCrcString() string { return "c1cb4b44" }
737 func (*IPMrouteDetails) GetMessageType() api.MessageType {
738 return api.ReplyMessage
741 func (m *IPMrouteDetails) Size() (size int) {
745 size += 4 // m.Route.TableID
746 size += 4 // m.Route.EntryFlags
747 size += 4 // m.Route.RpfID
748 size += 1 // m.Route.Prefix.Af
749 size += 2 // m.Route.Prefix.GrpAddressLength
750 size += 1 * 16 // m.Route.Prefix.GrpAddress
751 size += 1 * 16 // m.Route.Prefix.SrcAddress
752 size += 1 // m.Route.NPaths
753 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
754 var s2 mfib_types.MfibPath
756 if j2 < len(m.Route.Paths) {
757 s2 = m.Route.Paths[j2]
759 size += 4 // s2.ItfFlags
760 size += 4 // s2.Path.SwIfIndex
761 size += 4 // s2.Path.TableID
762 size += 4 // s2.Path.RpfID
763 size += 1 // s2.Path.Weight
764 size += 1 // s2.Path.Preference
765 size += 4 // s2.Path.Type
766 size += 4 // s2.Path.Flags
767 size += 4 // s2.Path.Proto
768 size += 1 * 16 // s2.Path.Nh.Address
769 size += 4 // s2.Path.Nh.ViaLabel
770 size += 4 // s2.Path.Nh.ObjID
771 size += 4 // s2.Path.Nh.ClassifyTableIndex
772 size += 1 // s2.Path.NLabels
773 for j4 := 0; j4 < 16; j4++ {
774 size += 1 // s2.Path.LabelStack[j4].IsUniform
775 size += 4 // s2.Path.LabelStack[j4].Label
776 size += 1 // s2.Path.LabelStack[j4].TTL
777 size += 1 // s2.Path.LabelStack[j4].Exp
782 func (m *IPMrouteDetails) Marshal(b []byte) ([]byte, error) {
784 b = make([]byte, m.Size())
786 buf := codec.NewBuffer(b)
787 buf.EncodeUint32(m.Route.TableID)
788 buf.EncodeUint32(m.Route.EntryFlags)
789 buf.EncodeUint32(m.Route.RpfID)
790 buf.EncodeUint8(uint8(m.Route.Prefix.Af))
791 buf.EncodeUint16(m.Route.Prefix.GrpAddressLength)
792 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16)
793 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16)
794 buf.EncodeUint8(uint8(len(m.Route.Paths)))
795 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
796 var v1 mfib_types.MfibPath // Paths
797 if j1 < len(m.Route.Paths) {
798 v1 = m.Route.Paths[j1]
800 buf.EncodeUint32(uint32(v1.ItfFlags))
801 buf.EncodeUint32(v1.Path.SwIfIndex)
802 buf.EncodeUint32(v1.Path.TableID)
803 buf.EncodeUint32(v1.Path.RpfID)
804 buf.EncodeUint8(v1.Path.Weight)
805 buf.EncodeUint8(v1.Path.Preference)
806 buf.EncodeUint32(uint32(v1.Path.Type))
807 buf.EncodeUint32(uint32(v1.Path.Flags))
808 buf.EncodeUint32(uint32(v1.Path.Proto))
809 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16)
810 buf.EncodeUint32(v1.Path.Nh.ViaLabel)
811 buf.EncodeUint32(v1.Path.Nh.ObjID)
812 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex)
813 buf.EncodeUint8(v1.Path.NLabels)
814 for j3 := 0; j3 < 16; j3++ {
815 buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform)
816 buf.EncodeUint32(v1.Path.LabelStack[j3].Label)
817 buf.EncodeUint8(v1.Path.LabelStack[j3].TTL)
818 buf.EncodeUint8(v1.Path.LabelStack[j3].Exp)
821 return buf.Bytes(), nil
823 func (m *IPMrouteDetails) Unmarshal(b []byte) error {
824 buf := codec.NewBuffer(b)
825 m.Route.TableID = buf.DecodeUint32()
826 m.Route.EntryFlags = buf.DecodeUint32()
827 m.Route.RpfID = buf.DecodeUint32()
828 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
829 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
830 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
831 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
832 m.Route.NPaths = buf.DecodeUint8()
833 m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths)
834 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
835 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
836 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
837 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
838 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
839 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
840 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
841 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32())
842 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32())
843 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
844 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
845 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
846 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
847 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
848 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
849 for j3 := 0; j3 < 16; j3++ {
850 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
851 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
852 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
853 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
859 // IPMrouteDump defines message 'ip_mroute_dump'.
860 type IPMrouteDump struct {
861 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
864 func (m *IPMrouteDump) Reset() { *m = IPMrouteDump{} }
865 func (*IPMrouteDump) GetMessageName() string { return "ip_mroute_dump" }
866 func (*IPMrouteDump) GetCrcString() string { return "b9d2e09e" }
867 func (*IPMrouteDump) GetMessageType() api.MessageType {
868 return api.RequestMessage
871 func (m *IPMrouteDump) Size() (size int) {
875 size += 4 // m.Table.TableID
876 size += 1 // m.Table.IsIP6
877 size += 64 // m.Table.Name
880 func (m *IPMrouteDump) Marshal(b []byte) ([]byte, error) {
882 b = make([]byte, m.Size())
884 buf := codec.NewBuffer(b)
885 buf.EncodeUint32(m.Table.TableID)
886 buf.EncodeBool(m.Table.IsIP6)
887 buf.EncodeString(m.Table.Name, 64)
888 return buf.Bytes(), nil
890 func (m *IPMrouteDump) Unmarshal(b []byte) error {
891 buf := codec.NewBuffer(b)
892 m.Table.TableID = buf.DecodeUint32()
893 m.Table.IsIP6 = buf.DecodeBool()
894 m.Table.Name = buf.DecodeString(64)
898 // IPMtableDetails defines message 'ip_mtable_details'.
899 type IPMtableDetails struct {
900 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
903 func (m *IPMtableDetails) Reset() { *m = IPMtableDetails{} }
904 func (*IPMtableDetails) GetMessageName() string { return "ip_mtable_details" }
905 func (*IPMtableDetails) GetCrcString() string { return "b9d2e09e" }
906 func (*IPMtableDetails) GetMessageType() api.MessageType {
907 return api.RequestMessage
910 func (m *IPMtableDetails) Size() (size int) {
914 size += 4 // m.Table.TableID
915 size += 1 // m.Table.IsIP6
916 size += 64 // m.Table.Name
919 func (m *IPMtableDetails) Marshal(b []byte) ([]byte, error) {
921 b = make([]byte, m.Size())
923 buf := codec.NewBuffer(b)
924 buf.EncodeUint32(m.Table.TableID)
925 buf.EncodeBool(m.Table.IsIP6)
926 buf.EncodeString(m.Table.Name, 64)
927 return buf.Bytes(), nil
929 func (m *IPMtableDetails) Unmarshal(b []byte) error {
930 buf := codec.NewBuffer(b)
931 m.Table.TableID = buf.DecodeUint32()
932 m.Table.IsIP6 = buf.DecodeBool()
933 m.Table.Name = buf.DecodeString(64)
937 // IPMtableDump defines message 'ip_mtable_dump'.
938 type IPMtableDump struct{}
940 func (m *IPMtableDump) Reset() { *m = IPMtableDump{} }
941 func (*IPMtableDump) GetMessageName() string { return "ip_mtable_dump" }
942 func (*IPMtableDump) GetCrcString() string { return "51077d14" }
943 func (*IPMtableDump) GetMessageType() api.MessageType {
944 return api.RequestMessage
947 func (m *IPMtableDump) Size() (size int) {
953 func (m *IPMtableDump) Marshal(b []byte) ([]byte, error) {
955 b = make([]byte, m.Size())
957 buf := codec.NewBuffer(b)
958 return buf.Bytes(), nil
960 func (m *IPMtableDump) Unmarshal(b []byte) error {
964 // IPPuntPolice defines message 'ip_punt_police'.
965 type IPPuntPolice struct {
966 PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"`
967 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
968 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
971 func (m *IPPuntPolice) Reset() { *m = IPPuntPolice{} }
972 func (*IPPuntPolice) GetMessageName() string { return "ip_punt_police" }
973 func (*IPPuntPolice) GetCrcString() string { return "db867cea" }
974 func (*IPPuntPolice) GetMessageType() api.MessageType {
975 return api.RequestMessage
978 func (m *IPPuntPolice) Size() (size int) {
982 size += 4 // m.PolicerIndex
987 func (m *IPPuntPolice) Marshal(b []byte) ([]byte, error) {
989 b = make([]byte, m.Size())
991 buf := codec.NewBuffer(b)
992 buf.EncodeUint32(m.PolicerIndex)
993 buf.EncodeBool(m.IsAdd)
994 buf.EncodeBool(m.IsIP6)
995 return buf.Bytes(), nil
997 func (m *IPPuntPolice) Unmarshal(b []byte) error {
998 buf := codec.NewBuffer(b)
999 m.PolicerIndex = buf.DecodeUint32()
1000 m.IsAdd = buf.DecodeBool()
1001 m.IsIP6 = buf.DecodeBool()
1005 // IPPuntPoliceReply defines message 'ip_punt_police_reply'.
1006 type IPPuntPoliceReply struct {
1007 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1010 func (m *IPPuntPoliceReply) Reset() { *m = IPPuntPoliceReply{} }
1011 func (*IPPuntPoliceReply) GetMessageName() string { return "ip_punt_police_reply" }
1012 func (*IPPuntPoliceReply) GetCrcString() string { return "e8d4e804" }
1013 func (*IPPuntPoliceReply) GetMessageType() api.MessageType {
1014 return api.ReplyMessage
1017 func (m *IPPuntPoliceReply) Size() (size int) {
1021 size += 4 // m.Retval
1024 func (m *IPPuntPoliceReply) Marshal(b []byte) ([]byte, error) {
1026 b = make([]byte, m.Size())
1028 buf := codec.NewBuffer(b)
1029 buf.EncodeInt32(m.Retval)
1030 return buf.Bytes(), nil
1032 func (m *IPPuntPoliceReply) Unmarshal(b []byte) error {
1033 buf := codec.NewBuffer(b)
1034 m.Retval = buf.DecodeInt32()
1038 // IPPuntRedirect defines message 'ip_punt_redirect'.
1039 type IPPuntRedirect struct {
1040 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
1041 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1044 func (m *IPPuntRedirect) Reset() { *m = IPPuntRedirect{} }
1045 func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" }
1046 func (*IPPuntRedirect) GetCrcString() string { return "a9a5592c" }
1047 func (*IPPuntRedirect) GetMessageType() api.MessageType {
1048 return api.RequestMessage
1051 func (m *IPPuntRedirect) Size() (size int) {
1055 size += 4 // m.Punt.RxSwIfIndex
1056 size += 4 // m.Punt.TxSwIfIndex
1057 size += 1 // m.Punt.Nh.Af
1058 size += 1 * 16 // m.Punt.Nh.Un
1059 size += 1 // m.IsAdd
1062 func (m *IPPuntRedirect) Marshal(b []byte) ([]byte, error) {
1064 b = make([]byte, m.Size())
1066 buf := codec.NewBuffer(b)
1067 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1068 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
1069 buf.EncodeUint8(uint8(m.Punt.Nh.Af))
1070 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16)
1071 buf.EncodeBool(m.IsAdd)
1072 return buf.Bytes(), nil
1074 func (m *IPPuntRedirect) Unmarshal(b []byte) error {
1075 buf := codec.NewBuffer(b)
1076 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1077 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1078 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1079 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1080 m.IsAdd = buf.DecodeBool()
1084 // IPPuntRedirectDetails defines message 'ip_punt_redirect_details'.
1085 type IPPuntRedirectDetails struct {
1086 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
1089 func (m *IPPuntRedirectDetails) Reset() { *m = IPPuntRedirectDetails{} }
1090 func (*IPPuntRedirectDetails) GetMessageName() string { return "ip_punt_redirect_details" }
1091 func (*IPPuntRedirectDetails) GetCrcString() string { return "3924f5d3" }
1092 func (*IPPuntRedirectDetails) GetMessageType() api.MessageType {
1093 return api.ReplyMessage
1096 func (m *IPPuntRedirectDetails) Size() (size int) {
1100 size += 4 // m.Punt.RxSwIfIndex
1101 size += 4 // m.Punt.TxSwIfIndex
1102 size += 1 // m.Punt.Nh.Af
1103 size += 1 * 16 // m.Punt.Nh.Un
1106 func (m *IPPuntRedirectDetails) Marshal(b []byte) ([]byte, error) {
1108 b = make([]byte, m.Size())
1110 buf := codec.NewBuffer(b)
1111 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1112 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
1113 buf.EncodeUint8(uint8(m.Punt.Nh.Af))
1114 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16)
1115 return buf.Bytes(), nil
1117 func (m *IPPuntRedirectDetails) Unmarshal(b []byte) error {
1118 buf := codec.NewBuffer(b)
1119 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1120 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1121 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1122 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1126 // IPPuntRedirectDump defines message 'ip_punt_redirect_dump'.
1127 type IPPuntRedirectDump struct {
1128 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1129 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
1132 func (m *IPPuntRedirectDump) Reset() { *m = IPPuntRedirectDump{} }
1133 func (*IPPuntRedirectDump) GetMessageName() string { return "ip_punt_redirect_dump" }
1134 func (*IPPuntRedirectDump) GetCrcString() string { return "2d033de4" }
1135 func (*IPPuntRedirectDump) GetMessageType() api.MessageType {
1136 return api.RequestMessage
1139 func (m *IPPuntRedirectDump) Size() (size int) {
1143 size += 4 // m.SwIfIndex
1144 size += 1 // m.IsIPv6
1147 func (m *IPPuntRedirectDump) Marshal(b []byte) ([]byte, error) {
1149 b = make([]byte, m.Size())
1151 buf := codec.NewBuffer(b)
1152 buf.EncodeUint32(uint32(m.SwIfIndex))
1153 buf.EncodeBool(m.IsIPv6)
1154 return buf.Bytes(), nil
1156 func (m *IPPuntRedirectDump) Unmarshal(b []byte) error {
1157 buf := codec.NewBuffer(b)
1158 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1159 m.IsIPv6 = buf.DecodeBool()
1163 // IPPuntRedirectReply defines message 'ip_punt_redirect_reply'.
1164 type IPPuntRedirectReply struct {
1165 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1168 func (m *IPPuntRedirectReply) Reset() { *m = IPPuntRedirectReply{} }
1169 func (*IPPuntRedirectReply) GetMessageName() string { return "ip_punt_redirect_reply" }
1170 func (*IPPuntRedirectReply) GetCrcString() string { return "e8d4e804" }
1171 func (*IPPuntRedirectReply) GetMessageType() api.MessageType {
1172 return api.ReplyMessage
1175 func (m *IPPuntRedirectReply) Size() (size int) {
1179 size += 4 // m.Retval
1182 func (m *IPPuntRedirectReply) Marshal(b []byte) ([]byte, error) {
1184 b = make([]byte, m.Size())
1186 buf := codec.NewBuffer(b)
1187 buf.EncodeInt32(m.Retval)
1188 return buf.Bytes(), nil
1190 func (m *IPPuntRedirectReply) Unmarshal(b []byte) error {
1191 buf := codec.NewBuffer(b)
1192 m.Retval = buf.DecodeInt32()
1196 // IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'.
1197 type IPReassemblyEnableDisable struct {
1198 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1199 EnableIP4 bool `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"`
1200 EnableIP6 bool `binapi:"bool,name=enable_ip6" json:"enable_ip6,omitempty"`
1201 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1204 func (m *IPReassemblyEnableDisable) Reset() { *m = IPReassemblyEnableDisable{} }
1205 func (*IPReassemblyEnableDisable) GetMessageName() string { return "ip_reassembly_enable_disable" }
1206 func (*IPReassemblyEnableDisable) GetCrcString() string { return "885c85a6" }
1207 func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType {
1208 return api.RequestMessage
1211 func (m *IPReassemblyEnableDisable) Size() (size int) {
1215 size += 4 // m.SwIfIndex
1216 size += 1 // m.EnableIP4
1217 size += 1 // m.EnableIP6
1221 func (m *IPReassemblyEnableDisable) Marshal(b []byte) ([]byte, error) {
1223 b = make([]byte, m.Size())
1225 buf := codec.NewBuffer(b)
1226 buf.EncodeUint32(uint32(m.SwIfIndex))
1227 buf.EncodeBool(m.EnableIP4)
1228 buf.EncodeBool(m.EnableIP6)
1229 buf.EncodeUint32(uint32(m.Type))
1230 return buf.Bytes(), nil
1232 func (m *IPReassemblyEnableDisable) Unmarshal(b []byte) error {
1233 buf := codec.NewBuffer(b)
1234 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1235 m.EnableIP4 = buf.DecodeBool()
1236 m.EnableIP6 = buf.DecodeBool()
1237 m.Type = IPReassType(buf.DecodeUint32())
1241 // IPReassemblyEnableDisableReply defines message 'ip_reassembly_enable_disable_reply'.
1242 type IPReassemblyEnableDisableReply struct {
1243 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1246 func (m *IPReassemblyEnableDisableReply) Reset() { *m = IPReassemblyEnableDisableReply{} }
1247 func (*IPReassemblyEnableDisableReply) GetMessageName() string {
1248 return "ip_reassembly_enable_disable_reply"
1250 func (*IPReassemblyEnableDisableReply) GetCrcString() string { return "e8d4e804" }
1251 func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType {
1252 return api.ReplyMessage
1255 func (m *IPReassemblyEnableDisableReply) Size() (size int) {
1259 size += 4 // m.Retval
1262 func (m *IPReassemblyEnableDisableReply) Marshal(b []byte) ([]byte, error) {
1264 b = make([]byte, m.Size())
1266 buf := codec.NewBuffer(b)
1267 buf.EncodeInt32(m.Retval)
1268 return buf.Bytes(), nil
1270 func (m *IPReassemblyEnableDisableReply) Unmarshal(b []byte) error {
1271 buf := codec.NewBuffer(b)
1272 m.Retval = buf.DecodeInt32()
1276 // IPReassemblyGet defines message 'ip_reassembly_get'.
1277 type IPReassemblyGet struct {
1278 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1279 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1282 func (m *IPReassemblyGet) Reset() { *m = IPReassemblyGet{} }
1283 func (*IPReassemblyGet) GetMessageName() string { return "ip_reassembly_get" }
1284 func (*IPReassemblyGet) GetCrcString() string { return "ea13ff63" }
1285 func (*IPReassemblyGet) GetMessageType() api.MessageType {
1286 return api.RequestMessage
1289 func (m *IPReassemblyGet) Size() (size int) {
1293 size += 1 // m.IsIP6
1297 func (m *IPReassemblyGet) Marshal(b []byte) ([]byte, error) {
1299 b = make([]byte, m.Size())
1301 buf := codec.NewBuffer(b)
1302 buf.EncodeBool(m.IsIP6)
1303 buf.EncodeUint32(uint32(m.Type))
1304 return buf.Bytes(), nil
1306 func (m *IPReassemblyGet) Unmarshal(b []byte) error {
1307 buf := codec.NewBuffer(b)
1308 m.IsIP6 = buf.DecodeBool()
1309 m.Type = IPReassType(buf.DecodeUint32())
1313 // IPReassemblyGetReply defines message 'ip_reassembly_get_reply'.
1314 type IPReassemblyGetReply struct {
1315 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1316 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
1317 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
1318 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
1319 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
1320 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1323 func (m *IPReassemblyGetReply) Reset() { *m = IPReassemblyGetReply{} }
1324 func (*IPReassemblyGetReply) GetMessageName() string { return "ip_reassembly_get_reply" }
1325 func (*IPReassemblyGetReply) GetCrcString() string { return "d5eb8d34" }
1326 func (*IPReassemblyGetReply) GetMessageType() api.MessageType {
1327 return api.ReplyMessage
1330 func (m *IPReassemblyGetReply) Size() (size int) {
1334 size += 4 // m.Retval
1335 size += 4 // m.TimeoutMs
1336 size += 4 // m.MaxReassemblies
1337 size += 4 // m.MaxReassemblyLength
1338 size += 4 // m.ExpireWalkIntervalMs
1339 size += 1 // m.IsIP6
1342 func (m *IPReassemblyGetReply) Marshal(b []byte) ([]byte, error) {
1344 b = make([]byte, m.Size())
1346 buf := codec.NewBuffer(b)
1347 buf.EncodeInt32(m.Retval)
1348 buf.EncodeUint32(m.TimeoutMs)
1349 buf.EncodeUint32(m.MaxReassemblies)
1350 buf.EncodeUint32(m.MaxReassemblyLength)
1351 buf.EncodeUint32(m.ExpireWalkIntervalMs)
1352 buf.EncodeBool(m.IsIP6)
1353 return buf.Bytes(), nil
1355 func (m *IPReassemblyGetReply) Unmarshal(b []byte) error {
1356 buf := codec.NewBuffer(b)
1357 m.Retval = buf.DecodeInt32()
1358 m.TimeoutMs = buf.DecodeUint32()
1359 m.MaxReassemblies = buf.DecodeUint32()
1360 m.MaxReassemblyLength = buf.DecodeUint32()
1361 m.ExpireWalkIntervalMs = buf.DecodeUint32()
1362 m.IsIP6 = buf.DecodeBool()
1366 // IPReassemblySet defines message 'ip_reassembly_set'.
1367 type IPReassemblySet struct {
1368 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
1369 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
1370 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
1371 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
1372 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1373 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1376 func (m *IPReassemblySet) Reset() { *m = IPReassemblySet{} }
1377 func (*IPReassemblySet) GetMessageName() string { return "ip_reassembly_set" }
1378 func (*IPReassemblySet) GetCrcString() string { return "16467d25" }
1379 func (*IPReassemblySet) GetMessageType() api.MessageType {
1380 return api.RequestMessage
1383 func (m *IPReassemblySet) Size() (size int) {
1387 size += 4 // m.TimeoutMs
1388 size += 4 // m.MaxReassemblies
1389 size += 4 // m.MaxReassemblyLength
1390 size += 4 // m.ExpireWalkIntervalMs
1391 size += 1 // m.IsIP6
1395 func (m *IPReassemblySet) Marshal(b []byte) ([]byte, error) {
1397 b = make([]byte, m.Size())
1399 buf := codec.NewBuffer(b)
1400 buf.EncodeUint32(m.TimeoutMs)
1401 buf.EncodeUint32(m.MaxReassemblies)
1402 buf.EncodeUint32(m.MaxReassemblyLength)
1403 buf.EncodeUint32(m.ExpireWalkIntervalMs)
1404 buf.EncodeBool(m.IsIP6)
1405 buf.EncodeUint32(uint32(m.Type))
1406 return buf.Bytes(), nil
1408 func (m *IPReassemblySet) Unmarshal(b []byte) error {
1409 buf := codec.NewBuffer(b)
1410 m.TimeoutMs = buf.DecodeUint32()
1411 m.MaxReassemblies = buf.DecodeUint32()
1412 m.MaxReassemblyLength = buf.DecodeUint32()
1413 m.ExpireWalkIntervalMs = buf.DecodeUint32()
1414 m.IsIP6 = buf.DecodeBool()
1415 m.Type = IPReassType(buf.DecodeUint32())
1419 // IPReassemblySetReply defines message 'ip_reassembly_set_reply'.
1420 type IPReassemblySetReply struct {
1421 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1424 func (m *IPReassemblySetReply) Reset() { *m = IPReassemblySetReply{} }
1425 func (*IPReassemblySetReply) GetMessageName() string { return "ip_reassembly_set_reply" }
1426 func (*IPReassemblySetReply) GetCrcString() string { return "e8d4e804" }
1427 func (*IPReassemblySetReply) GetMessageType() api.MessageType {
1428 return api.ReplyMessage
1431 func (m *IPReassemblySetReply) Size() (size int) {
1435 size += 4 // m.Retval
1438 func (m *IPReassemblySetReply) Marshal(b []byte) ([]byte, error) {
1440 b = make([]byte, m.Size())
1442 buf := codec.NewBuffer(b)
1443 buf.EncodeInt32(m.Retval)
1444 return buf.Bytes(), nil
1446 func (m *IPReassemblySetReply) Unmarshal(b []byte) error {
1447 buf := codec.NewBuffer(b)
1448 m.Retval = buf.DecodeInt32()
1452 // IPRouteAddDel defines message 'ip_route_add_del'.
1453 type IPRouteAddDel struct {
1454 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1455 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
1456 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
1459 func (m *IPRouteAddDel) Reset() { *m = IPRouteAddDel{} }
1460 func (*IPRouteAddDel) GetMessageName() string { return "ip_route_add_del" }
1461 func (*IPRouteAddDel) GetCrcString() string { return "c1ff832d" }
1462 func (*IPRouteAddDel) GetMessageType() api.MessageType {
1463 return api.RequestMessage
1466 func (m *IPRouteAddDel) Size() (size int) {
1470 size += 1 // m.IsAdd
1471 size += 1 // m.IsMultipath
1472 size += 4 // m.Route.TableID
1473 size += 4 // m.Route.StatsIndex
1474 size += 1 // m.Route.Prefix.Address.Af
1475 size += 1 * 16 // m.Route.Prefix.Address.Un
1476 size += 1 // m.Route.Prefix.Len
1477 size += 1 // m.Route.NPaths
1478 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
1479 var s2 fib_types.FibPath
1481 if j2 < len(m.Route.Paths) {
1482 s2 = m.Route.Paths[j2]
1484 size += 4 // s2.SwIfIndex
1485 size += 4 // s2.TableID
1486 size += 4 // s2.RpfID
1487 size += 1 // s2.Weight
1488 size += 1 // s2.Preference
1489 size += 4 // s2.Type
1490 size += 4 // s2.Flags
1491 size += 4 // s2.Proto
1492 size += 1 * 16 // s2.Nh.Address
1493 size += 4 // s2.Nh.ViaLabel
1494 size += 4 // s2.Nh.ObjID
1495 size += 4 // s2.Nh.ClassifyTableIndex
1496 size += 1 // s2.NLabels
1497 for j3 := 0; j3 < 16; j3++ {
1498 size += 1 // s2.LabelStack[j3].IsUniform
1499 size += 4 // s2.LabelStack[j3].Label
1500 size += 1 // s2.LabelStack[j3].TTL
1501 size += 1 // s2.LabelStack[j3].Exp
1506 func (m *IPRouteAddDel) Marshal(b []byte) ([]byte, error) {
1508 b = make([]byte, m.Size())
1510 buf := codec.NewBuffer(b)
1511 buf.EncodeBool(m.IsAdd)
1512 buf.EncodeBool(m.IsMultipath)
1513 buf.EncodeUint32(m.Route.TableID)
1514 buf.EncodeUint32(m.Route.StatsIndex)
1515 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
1516 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
1517 buf.EncodeUint8(m.Route.Prefix.Len)
1518 buf.EncodeUint8(uint8(len(m.Route.Paths)))
1519 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1520 var v1 fib_types.FibPath // Paths
1521 if j1 < len(m.Route.Paths) {
1522 v1 = m.Route.Paths[j1]
1524 buf.EncodeUint32(v1.SwIfIndex)
1525 buf.EncodeUint32(v1.TableID)
1526 buf.EncodeUint32(v1.RpfID)
1527 buf.EncodeUint8(v1.Weight)
1528 buf.EncodeUint8(v1.Preference)
1529 buf.EncodeUint32(uint32(v1.Type))
1530 buf.EncodeUint32(uint32(v1.Flags))
1531 buf.EncodeUint32(uint32(v1.Proto))
1532 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
1533 buf.EncodeUint32(v1.Nh.ViaLabel)
1534 buf.EncodeUint32(v1.Nh.ObjID)
1535 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
1536 buf.EncodeUint8(v1.NLabels)
1537 for j2 := 0; j2 < 16; j2++ {
1538 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
1539 buf.EncodeUint32(v1.LabelStack[j2].Label)
1540 buf.EncodeUint8(v1.LabelStack[j2].TTL)
1541 buf.EncodeUint8(v1.LabelStack[j2].Exp)
1544 return buf.Bytes(), nil
1546 func (m *IPRouteAddDel) Unmarshal(b []byte) error {
1547 buf := codec.NewBuffer(b)
1548 m.IsAdd = buf.DecodeBool()
1549 m.IsMultipath = buf.DecodeBool()
1550 m.Route.TableID = buf.DecodeUint32()
1551 m.Route.StatsIndex = buf.DecodeUint32()
1552 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1553 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1554 m.Route.Prefix.Len = buf.DecodeUint8()
1555 m.Route.NPaths = buf.DecodeUint8()
1556 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
1557 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1558 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
1559 m.Route.Paths[j1].TableID = buf.DecodeUint32()
1560 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
1561 m.Route.Paths[j1].Weight = buf.DecodeUint8()
1562 m.Route.Paths[j1].Preference = buf.DecodeUint8()
1563 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
1564 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1565 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1566 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1567 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
1568 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
1569 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
1570 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
1571 for j2 := 0; j2 < 16; j2++ {
1572 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
1573 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
1574 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
1575 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1581 // IPRouteAddDelReply defines message 'ip_route_add_del_reply'.
1582 type IPRouteAddDelReply struct {
1583 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1584 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
1587 func (m *IPRouteAddDelReply) Reset() { *m = IPRouteAddDelReply{} }
1588 func (*IPRouteAddDelReply) GetMessageName() string { return "ip_route_add_del_reply" }
1589 func (*IPRouteAddDelReply) GetCrcString() string { return "1992deab" }
1590 func (*IPRouteAddDelReply) GetMessageType() api.MessageType {
1591 return api.ReplyMessage
1594 func (m *IPRouteAddDelReply) Size() (size int) {
1598 size += 4 // m.Retval
1599 size += 4 // m.StatsIndex
1602 func (m *IPRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
1604 b = make([]byte, m.Size())
1606 buf := codec.NewBuffer(b)
1607 buf.EncodeInt32(m.Retval)
1608 buf.EncodeUint32(m.StatsIndex)
1609 return buf.Bytes(), nil
1611 func (m *IPRouteAddDelReply) Unmarshal(b []byte) error {
1612 buf := codec.NewBuffer(b)
1613 m.Retval = buf.DecodeInt32()
1614 m.StatsIndex = buf.DecodeUint32()
1618 // IPRouteDetails defines message 'ip_route_details'.
1619 type IPRouteDetails struct {
1620 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
1623 func (m *IPRouteDetails) Reset() { *m = IPRouteDetails{} }
1624 func (*IPRouteDetails) GetMessageName() string { return "ip_route_details" }
1625 func (*IPRouteDetails) GetCrcString() string { return "d1ffaae1" }
1626 func (*IPRouteDetails) GetMessageType() api.MessageType {
1627 return api.ReplyMessage
1630 func (m *IPRouteDetails) Size() (size int) {
1634 size += 4 // m.Route.TableID
1635 size += 4 // m.Route.StatsIndex
1636 size += 1 // m.Route.Prefix.Address.Af
1637 size += 1 * 16 // m.Route.Prefix.Address.Un
1638 size += 1 // m.Route.Prefix.Len
1639 size += 1 // m.Route.NPaths
1640 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
1641 var s2 fib_types.FibPath
1643 if j2 < len(m.Route.Paths) {
1644 s2 = m.Route.Paths[j2]
1646 size += 4 // s2.SwIfIndex
1647 size += 4 // s2.TableID
1648 size += 4 // s2.RpfID
1649 size += 1 // s2.Weight
1650 size += 1 // s2.Preference
1651 size += 4 // s2.Type
1652 size += 4 // s2.Flags
1653 size += 4 // s2.Proto
1654 size += 1 * 16 // s2.Nh.Address
1655 size += 4 // s2.Nh.ViaLabel
1656 size += 4 // s2.Nh.ObjID
1657 size += 4 // s2.Nh.ClassifyTableIndex
1658 size += 1 // s2.NLabels
1659 for j3 := 0; j3 < 16; j3++ {
1660 size += 1 // s2.LabelStack[j3].IsUniform
1661 size += 4 // s2.LabelStack[j3].Label
1662 size += 1 // s2.LabelStack[j3].TTL
1663 size += 1 // s2.LabelStack[j3].Exp
1668 func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) {
1670 b = make([]byte, m.Size())
1672 buf := codec.NewBuffer(b)
1673 buf.EncodeUint32(m.Route.TableID)
1674 buf.EncodeUint32(m.Route.StatsIndex)
1675 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
1676 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
1677 buf.EncodeUint8(m.Route.Prefix.Len)
1678 buf.EncodeUint8(uint8(len(m.Route.Paths)))
1679 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1680 var v1 fib_types.FibPath // Paths
1681 if j1 < len(m.Route.Paths) {
1682 v1 = m.Route.Paths[j1]
1684 buf.EncodeUint32(v1.SwIfIndex)
1685 buf.EncodeUint32(v1.TableID)
1686 buf.EncodeUint32(v1.RpfID)
1687 buf.EncodeUint8(v1.Weight)
1688 buf.EncodeUint8(v1.Preference)
1689 buf.EncodeUint32(uint32(v1.Type))
1690 buf.EncodeUint32(uint32(v1.Flags))
1691 buf.EncodeUint32(uint32(v1.Proto))
1692 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
1693 buf.EncodeUint32(v1.Nh.ViaLabel)
1694 buf.EncodeUint32(v1.Nh.ObjID)
1695 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
1696 buf.EncodeUint8(v1.NLabels)
1697 for j2 := 0; j2 < 16; j2++ {
1698 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
1699 buf.EncodeUint32(v1.LabelStack[j2].Label)
1700 buf.EncodeUint8(v1.LabelStack[j2].TTL)
1701 buf.EncodeUint8(v1.LabelStack[j2].Exp)
1704 return buf.Bytes(), nil
1706 func (m *IPRouteDetails) Unmarshal(b []byte) error {
1707 buf := codec.NewBuffer(b)
1708 m.Route.TableID = buf.DecodeUint32()
1709 m.Route.StatsIndex = buf.DecodeUint32()
1710 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1711 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1712 m.Route.Prefix.Len = buf.DecodeUint8()
1713 m.Route.NPaths = buf.DecodeUint8()
1714 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
1715 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1716 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
1717 m.Route.Paths[j1].TableID = buf.DecodeUint32()
1718 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
1719 m.Route.Paths[j1].Weight = buf.DecodeUint8()
1720 m.Route.Paths[j1].Preference = buf.DecodeUint8()
1721 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
1722 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1723 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1724 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1725 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
1726 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
1727 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
1728 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
1729 for j2 := 0; j2 < 16; j2++ {
1730 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
1731 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
1732 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
1733 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1739 // IPRouteDump defines message 'ip_route_dump'.
1740 type IPRouteDump struct {
1741 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
1744 func (m *IPRouteDump) Reset() { *m = IPRouteDump{} }
1745 func (*IPRouteDump) GetMessageName() string { return "ip_route_dump" }
1746 func (*IPRouteDump) GetCrcString() string { return "b9d2e09e" }
1747 func (*IPRouteDump) GetMessageType() api.MessageType {
1748 return api.RequestMessage
1751 func (m *IPRouteDump) Size() (size int) {
1755 size += 4 // m.Table.TableID
1756 size += 1 // m.Table.IsIP6
1757 size += 64 // m.Table.Name
1760 func (m *IPRouteDump) Marshal(b []byte) ([]byte, error) {
1762 b = make([]byte, m.Size())
1764 buf := codec.NewBuffer(b)
1765 buf.EncodeUint32(m.Table.TableID)
1766 buf.EncodeBool(m.Table.IsIP6)
1767 buf.EncodeString(m.Table.Name, 64)
1768 return buf.Bytes(), nil
1770 func (m *IPRouteDump) Unmarshal(b []byte) error {
1771 buf := codec.NewBuffer(b)
1772 m.Table.TableID = buf.DecodeUint32()
1773 m.Table.IsIP6 = buf.DecodeBool()
1774 m.Table.Name = buf.DecodeString(64)
1778 // IPRouteLookup defines message 'ip_route_lookup'.
1779 type IPRouteLookup struct {
1780 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
1781 Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"`
1782 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
1785 func (m *IPRouteLookup) Reset() { *m = IPRouteLookup{} }
1786 func (*IPRouteLookup) GetMessageName() string { return "ip_route_lookup" }
1787 func (*IPRouteLookup) GetCrcString() string { return "e2986185" }
1788 func (*IPRouteLookup) GetMessageType() api.MessageType {
1789 return api.RequestMessage
1792 func (m *IPRouteLookup) Size() (size int) {
1796 size += 4 // m.TableID
1797 size += 1 // m.Exact
1798 size += 1 // m.Prefix.Address.Af
1799 size += 1 * 16 // m.Prefix.Address.Un
1800 size += 1 // m.Prefix.Len
1803 func (m *IPRouteLookup) Marshal(b []byte) ([]byte, error) {
1805 b = make([]byte, m.Size())
1807 buf := codec.NewBuffer(b)
1808 buf.EncodeUint32(m.TableID)
1809 buf.EncodeUint8(m.Exact)
1810 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
1811 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
1812 buf.EncodeUint8(m.Prefix.Len)
1813 return buf.Bytes(), nil
1815 func (m *IPRouteLookup) Unmarshal(b []byte) error {
1816 buf := codec.NewBuffer(b)
1817 m.TableID = buf.DecodeUint32()
1818 m.Exact = buf.DecodeUint8()
1819 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1820 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1821 m.Prefix.Len = buf.DecodeUint8()
1825 // IPRouteLookupReply defines message 'ip_route_lookup_reply'.
1826 type IPRouteLookupReply struct {
1827 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1828 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
1831 func (m *IPRouteLookupReply) Reset() { *m = IPRouteLookupReply{} }
1832 func (*IPRouteLookupReply) GetMessageName() string { return "ip_route_lookup_reply" }
1833 func (*IPRouteLookupReply) GetCrcString() string { return "ae99de8e" }
1834 func (*IPRouteLookupReply) GetMessageType() api.MessageType {
1835 return api.ReplyMessage
1838 func (m *IPRouteLookupReply) Size() (size int) {
1842 size += 4 // m.Retval
1843 size += 4 // m.Route.TableID
1844 size += 4 // m.Route.StatsIndex
1845 size += 1 // m.Route.Prefix.Address.Af
1846 size += 1 * 16 // m.Route.Prefix.Address.Un
1847 size += 1 // m.Route.Prefix.Len
1848 size += 1 // m.Route.NPaths
1849 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
1850 var s2 fib_types.FibPath
1852 if j2 < len(m.Route.Paths) {
1853 s2 = m.Route.Paths[j2]
1855 size += 4 // s2.SwIfIndex
1856 size += 4 // s2.TableID
1857 size += 4 // s2.RpfID
1858 size += 1 // s2.Weight
1859 size += 1 // s2.Preference
1860 size += 4 // s2.Type
1861 size += 4 // s2.Flags
1862 size += 4 // s2.Proto
1863 size += 1 * 16 // s2.Nh.Address
1864 size += 4 // s2.Nh.ViaLabel
1865 size += 4 // s2.Nh.ObjID
1866 size += 4 // s2.Nh.ClassifyTableIndex
1867 size += 1 // s2.NLabels
1868 for j3 := 0; j3 < 16; j3++ {
1869 size += 1 // s2.LabelStack[j3].IsUniform
1870 size += 4 // s2.LabelStack[j3].Label
1871 size += 1 // s2.LabelStack[j3].TTL
1872 size += 1 // s2.LabelStack[j3].Exp
1877 func (m *IPRouteLookupReply) Marshal(b []byte) ([]byte, error) {
1879 b = make([]byte, m.Size())
1881 buf := codec.NewBuffer(b)
1882 buf.EncodeInt32(m.Retval)
1883 buf.EncodeUint32(m.Route.TableID)
1884 buf.EncodeUint32(m.Route.StatsIndex)
1885 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
1886 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
1887 buf.EncodeUint8(m.Route.Prefix.Len)
1888 buf.EncodeUint8(uint8(len(m.Route.Paths)))
1889 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1890 var v1 fib_types.FibPath // Paths
1891 if j1 < len(m.Route.Paths) {
1892 v1 = m.Route.Paths[j1]
1894 buf.EncodeUint32(v1.SwIfIndex)
1895 buf.EncodeUint32(v1.TableID)
1896 buf.EncodeUint32(v1.RpfID)
1897 buf.EncodeUint8(v1.Weight)
1898 buf.EncodeUint8(v1.Preference)
1899 buf.EncodeUint32(uint32(v1.Type))
1900 buf.EncodeUint32(uint32(v1.Flags))
1901 buf.EncodeUint32(uint32(v1.Proto))
1902 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
1903 buf.EncodeUint32(v1.Nh.ViaLabel)
1904 buf.EncodeUint32(v1.Nh.ObjID)
1905 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
1906 buf.EncodeUint8(v1.NLabels)
1907 for j2 := 0; j2 < 16; j2++ {
1908 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
1909 buf.EncodeUint32(v1.LabelStack[j2].Label)
1910 buf.EncodeUint8(v1.LabelStack[j2].TTL)
1911 buf.EncodeUint8(v1.LabelStack[j2].Exp)
1914 return buf.Bytes(), nil
1916 func (m *IPRouteLookupReply) Unmarshal(b []byte) error {
1917 buf := codec.NewBuffer(b)
1918 m.Retval = buf.DecodeInt32()
1919 m.Route.TableID = buf.DecodeUint32()
1920 m.Route.StatsIndex = buf.DecodeUint32()
1921 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1922 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1923 m.Route.Prefix.Len = buf.DecodeUint8()
1924 m.Route.NPaths = buf.DecodeUint8()
1925 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
1926 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1927 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
1928 m.Route.Paths[j1].TableID = buf.DecodeUint32()
1929 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
1930 m.Route.Paths[j1].Weight = buf.DecodeUint8()
1931 m.Route.Paths[j1].Preference = buf.DecodeUint8()
1932 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
1933 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1934 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1935 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1936 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
1937 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
1938 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
1939 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
1940 for j2 := 0; j2 < 16; j2++ {
1941 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
1942 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
1943 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
1944 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1950 // IPSourceAndPortRangeCheckAddDel defines message 'ip_source_and_port_range_check_add_del'.
1951 type IPSourceAndPortRangeCheckAddDel struct {
1952 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1953 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
1954 NumberOfRanges uint8 `binapi:"u8,name=number_of_ranges" json:"number_of_ranges,omitempty"`
1955 LowPorts []uint16 `binapi:"u16[32],name=low_ports" json:"low_ports,omitempty"`
1956 HighPorts []uint16 `binapi:"u16[32],name=high_ports" json:"high_ports,omitempty"`
1957 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
1960 func (m *IPSourceAndPortRangeCheckAddDel) Reset() { *m = IPSourceAndPortRangeCheckAddDel{} }
1961 func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string {
1962 return "ip_source_and_port_range_check_add_del"
1964 func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "8bfc76f2" }
1965 func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType {
1966 return api.RequestMessage
1969 func (m *IPSourceAndPortRangeCheckAddDel) Size() (size int) {
1973 size += 1 // m.IsAdd
1974 size += 1 // m.Prefix.Address.Af
1975 size += 1 * 16 // m.Prefix.Address.Un
1976 size += 1 // m.Prefix.Len
1977 size += 1 // m.NumberOfRanges
1978 size += 2 * 32 // m.LowPorts
1979 size += 2 * 32 // m.HighPorts
1980 size += 4 // m.VrfID
1983 func (m *IPSourceAndPortRangeCheckAddDel) Marshal(b []byte) ([]byte, error) {
1985 b = make([]byte, m.Size())
1987 buf := codec.NewBuffer(b)
1988 buf.EncodeBool(m.IsAdd)
1989 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
1990 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
1991 buf.EncodeUint8(m.Prefix.Len)
1992 buf.EncodeUint8(m.NumberOfRanges)
1993 for i := 0; i < 32; i++ {
1995 if i < len(m.LowPorts) {
1996 x = uint16(m.LowPorts[i])
2000 for i := 0; i < 32; i++ {
2002 if i < len(m.HighPorts) {
2003 x = uint16(m.HighPorts[i])
2007 buf.EncodeUint32(m.VrfID)
2008 return buf.Bytes(), nil
2010 func (m *IPSourceAndPortRangeCheckAddDel) Unmarshal(b []byte) error {
2011 buf := codec.NewBuffer(b)
2012 m.IsAdd = buf.DecodeBool()
2013 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2014 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2015 m.Prefix.Len = buf.DecodeUint8()
2016 m.NumberOfRanges = buf.DecodeUint8()
2017 m.LowPorts = make([]uint16, 32)
2018 for i := 0; i < len(m.LowPorts); i++ {
2019 m.LowPorts[i] = buf.DecodeUint16()
2021 m.HighPorts = make([]uint16, 32)
2022 for i := 0; i < len(m.HighPorts); i++ {
2023 m.HighPorts[i] = buf.DecodeUint16()
2025 m.VrfID = buf.DecodeUint32()
2029 // IPSourceAndPortRangeCheckAddDelReply defines message 'ip_source_and_port_range_check_add_del_reply'.
2030 type IPSourceAndPortRangeCheckAddDelReply struct {
2031 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2034 func (m *IPSourceAndPortRangeCheckAddDelReply) Reset() { *m = IPSourceAndPortRangeCheckAddDelReply{} }
2035 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string {
2036 return "ip_source_and_port_range_check_add_del_reply"
2038 func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { return "e8d4e804" }
2039 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType {
2040 return api.ReplyMessage
2043 func (m *IPSourceAndPortRangeCheckAddDelReply) Size() (size int) {
2047 size += 4 // m.Retval
2050 func (m *IPSourceAndPortRangeCheckAddDelReply) Marshal(b []byte) ([]byte, error) {
2052 b = make([]byte, m.Size())
2054 buf := codec.NewBuffer(b)
2055 buf.EncodeInt32(m.Retval)
2056 return buf.Bytes(), nil
2058 func (m *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(b []byte) error {
2059 buf := codec.NewBuffer(b)
2060 m.Retval = buf.DecodeInt32()
2064 // IPSourceAndPortRangeCheckInterfaceAddDel defines message 'ip_source_and_port_range_check_interface_add_del'.
2065 type IPSourceAndPortRangeCheckInterfaceAddDel struct {
2066 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2067 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2068 TCPInVrfID uint32 `binapi:"u32,name=tcp_in_vrf_id" json:"tcp_in_vrf_id,omitempty"`
2069 TCPOutVrfID uint32 `binapi:"u32,name=tcp_out_vrf_id" json:"tcp_out_vrf_id,omitempty"`
2070 UDPInVrfID uint32 `binapi:"u32,name=udp_in_vrf_id" json:"udp_in_vrf_id,omitempty"`
2071 UDPOutVrfID uint32 `binapi:"u32,name=udp_out_vrf_id" json:"udp_out_vrf_id,omitempty"`
2074 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Reset() {
2075 *m = IPSourceAndPortRangeCheckInterfaceAddDel{}
2077 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string {
2078 return "ip_source_and_port_range_check_interface_add_del"
2080 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { return "e1ba8987" }
2081 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType {
2082 return api.RequestMessage
2085 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() (size int) {
2089 size += 1 // m.IsAdd
2090 size += 4 // m.SwIfIndex
2091 size += 4 // m.TCPInVrfID
2092 size += 4 // m.TCPOutVrfID
2093 size += 4 // m.UDPInVrfID
2094 size += 4 // m.UDPOutVrfID
2097 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
2099 b = make([]byte, m.Size())
2101 buf := codec.NewBuffer(b)
2102 buf.EncodeBool(m.IsAdd)
2103 buf.EncodeUint32(uint32(m.SwIfIndex))
2104 buf.EncodeUint32(m.TCPInVrfID)
2105 buf.EncodeUint32(m.TCPOutVrfID)
2106 buf.EncodeUint32(m.UDPInVrfID)
2107 buf.EncodeUint32(m.UDPOutVrfID)
2108 return buf.Bytes(), nil
2110 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Unmarshal(b []byte) error {
2111 buf := codec.NewBuffer(b)
2112 m.IsAdd = buf.DecodeBool()
2113 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2114 m.TCPInVrfID = buf.DecodeUint32()
2115 m.TCPOutVrfID = buf.DecodeUint32()
2116 m.UDPInVrfID = buf.DecodeUint32()
2117 m.UDPOutVrfID = buf.DecodeUint32()
2121 // IPSourceAndPortRangeCheckInterfaceAddDelReply defines message 'ip_source_and_port_range_check_interface_add_del_reply'.
2122 type IPSourceAndPortRangeCheckInterfaceAddDelReply struct {
2123 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2126 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Reset() {
2127 *m = IPSourceAndPortRangeCheckInterfaceAddDelReply{}
2129 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string {
2130 return "ip_source_and_port_range_check_interface_add_del_reply"
2132 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
2133 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType {
2134 return api.ReplyMessage
2137 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Size() (size int) {
2141 size += 4 // m.Retval
2144 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
2146 b = make([]byte, m.Size())
2148 buf := codec.NewBuffer(b)
2149 buf.EncodeInt32(m.Retval)
2150 return buf.Bytes(), nil
2152 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(b []byte) error {
2153 buf := codec.NewBuffer(b)
2154 m.Retval = buf.DecodeInt32()
2158 // IPTableAddDel defines message 'ip_table_add_del'.
2159 type IPTableAddDel struct {
2160 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2161 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2164 func (m *IPTableAddDel) Reset() { *m = IPTableAddDel{} }
2165 func (*IPTableAddDel) GetMessageName() string { return "ip_table_add_del" }
2166 func (*IPTableAddDel) GetCrcString() string { return "0ffdaec0" }
2167 func (*IPTableAddDel) GetMessageType() api.MessageType {
2168 return api.RequestMessage
2171 func (m *IPTableAddDel) Size() (size int) {
2175 size += 1 // m.IsAdd
2176 size += 4 // m.Table.TableID
2177 size += 1 // m.Table.IsIP6
2178 size += 64 // m.Table.Name
2181 func (m *IPTableAddDel) Marshal(b []byte) ([]byte, error) {
2183 b = make([]byte, m.Size())
2185 buf := codec.NewBuffer(b)
2186 buf.EncodeBool(m.IsAdd)
2187 buf.EncodeUint32(m.Table.TableID)
2188 buf.EncodeBool(m.Table.IsIP6)
2189 buf.EncodeString(m.Table.Name, 64)
2190 return buf.Bytes(), nil
2192 func (m *IPTableAddDel) Unmarshal(b []byte) error {
2193 buf := codec.NewBuffer(b)
2194 m.IsAdd = buf.DecodeBool()
2195 m.Table.TableID = buf.DecodeUint32()
2196 m.Table.IsIP6 = buf.DecodeBool()
2197 m.Table.Name = buf.DecodeString(64)
2201 // IPTableAddDelReply defines message 'ip_table_add_del_reply'.
2202 type IPTableAddDelReply struct {
2203 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2206 func (m *IPTableAddDelReply) Reset() { *m = IPTableAddDelReply{} }
2207 func (*IPTableAddDelReply) GetMessageName() string { return "ip_table_add_del_reply" }
2208 func (*IPTableAddDelReply) GetCrcString() string { return "e8d4e804" }
2209 func (*IPTableAddDelReply) GetMessageType() api.MessageType {
2210 return api.ReplyMessage
2213 func (m *IPTableAddDelReply) Size() (size int) {
2217 size += 4 // m.Retval
2220 func (m *IPTableAddDelReply) Marshal(b []byte) ([]byte, error) {
2222 b = make([]byte, m.Size())
2224 buf := codec.NewBuffer(b)
2225 buf.EncodeInt32(m.Retval)
2226 return buf.Bytes(), nil
2228 func (m *IPTableAddDelReply) Unmarshal(b []byte) error {
2229 buf := codec.NewBuffer(b)
2230 m.Retval = buf.DecodeInt32()
2234 // IPTableDetails defines message 'ip_table_details'.
2235 type IPTableDetails struct {
2236 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2239 func (m *IPTableDetails) Reset() { *m = IPTableDetails{} }
2240 func (*IPTableDetails) GetMessageName() string { return "ip_table_details" }
2241 func (*IPTableDetails) GetCrcString() string { return "c79fca0f" }
2242 func (*IPTableDetails) GetMessageType() api.MessageType {
2243 return api.ReplyMessage
2246 func (m *IPTableDetails) Size() (size int) {
2250 size += 4 // m.Table.TableID
2251 size += 1 // m.Table.IsIP6
2252 size += 64 // m.Table.Name
2255 func (m *IPTableDetails) Marshal(b []byte) ([]byte, error) {
2257 b = make([]byte, m.Size())
2259 buf := codec.NewBuffer(b)
2260 buf.EncodeUint32(m.Table.TableID)
2261 buf.EncodeBool(m.Table.IsIP6)
2262 buf.EncodeString(m.Table.Name, 64)
2263 return buf.Bytes(), nil
2265 func (m *IPTableDetails) Unmarshal(b []byte) error {
2266 buf := codec.NewBuffer(b)
2267 m.Table.TableID = buf.DecodeUint32()
2268 m.Table.IsIP6 = buf.DecodeBool()
2269 m.Table.Name = buf.DecodeString(64)
2273 // IPTableDump defines message 'ip_table_dump'.
2274 type IPTableDump struct{}
2276 func (m *IPTableDump) Reset() { *m = IPTableDump{} }
2277 func (*IPTableDump) GetMessageName() string { return "ip_table_dump" }
2278 func (*IPTableDump) GetCrcString() string { return "51077d14" }
2279 func (*IPTableDump) GetMessageType() api.MessageType {
2280 return api.RequestMessage
2283 func (m *IPTableDump) Size() (size int) {
2289 func (m *IPTableDump) Marshal(b []byte) ([]byte, error) {
2291 b = make([]byte, m.Size())
2293 buf := codec.NewBuffer(b)
2294 return buf.Bytes(), nil
2296 func (m *IPTableDump) Unmarshal(b []byte) error {
2300 // IPTableFlush defines message 'ip_table_flush'.
2301 type IPTableFlush struct {
2302 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2305 func (m *IPTableFlush) Reset() { *m = IPTableFlush{} }
2306 func (*IPTableFlush) GetMessageName() string { return "ip_table_flush" }
2307 func (*IPTableFlush) GetCrcString() string { return "b9d2e09e" }
2308 func (*IPTableFlush) GetMessageType() api.MessageType {
2309 return api.RequestMessage
2312 func (m *IPTableFlush) Size() (size int) {
2316 size += 4 // m.Table.TableID
2317 size += 1 // m.Table.IsIP6
2318 size += 64 // m.Table.Name
2321 func (m *IPTableFlush) Marshal(b []byte) ([]byte, error) {
2323 b = make([]byte, m.Size())
2325 buf := codec.NewBuffer(b)
2326 buf.EncodeUint32(m.Table.TableID)
2327 buf.EncodeBool(m.Table.IsIP6)
2328 buf.EncodeString(m.Table.Name, 64)
2329 return buf.Bytes(), nil
2331 func (m *IPTableFlush) Unmarshal(b []byte) error {
2332 buf := codec.NewBuffer(b)
2333 m.Table.TableID = buf.DecodeUint32()
2334 m.Table.IsIP6 = buf.DecodeBool()
2335 m.Table.Name = buf.DecodeString(64)
2339 // IPTableFlushReply defines message 'ip_table_flush_reply'.
2340 type IPTableFlushReply struct {
2341 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2344 func (m *IPTableFlushReply) Reset() { *m = IPTableFlushReply{} }
2345 func (*IPTableFlushReply) GetMessageName() string { return "ip_table_flush_reply" }
2346 func (*IPTableFlushReply) GetCrcString() string { return "e8d4e804" }
2347 func (*IPTableFlushReply) GetMessageType() api.MessageType {
2348 return api.ReplyMessage
2351 func (m *IPTableFlushReply) Size() (size int) {
2355 size += 4 // m.Retval
2358 func (m *IPTableFlushReply) Marshal(b []byte) ([]byte, error) {
2360 b = make([]byte, m.Size())
2362 buf := codec.NewBuffer(b)
2363 buf.EncodeInt32(m.Retval)
2364 return buf.Bytes(), nil
2366 func (m *IPTableFlushReply) Unmarshal(b []byte) error {
2367 buf := codec.NewBuffer(b)
2368 m.Retval = buf.DecodeInt32()
2372 // IPTableReplaceBegin defines message 'ip_table_replace_begin'.
2373 type IPTableReplaceBegin struct {
2374 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2377 func (m *IPTableReplaceBegin) Reset() { *m = IPTableReplaceBegin{} }
2378 func (*IPTableReplaceBegin) GetMessageName() string { return "ip_table_replace_begin" }
2379 func (*IPTableReplaceBegin) GetCrcString() string { return "b9d2e09e" }
2380 func (*IPTableReplaceBegin) GetMessageType() api.MessageType {
2381 return api.RequestMessage
2384 func (m *IPTableReplaceBegin) Size() (size int) {
2388 size += 4 // m.Table.TableID
2389 size += 1 // m.Table.IsIP6
2390 size += 64 // m.Table.Name
2393 func (m *IPTableReplaceBegin) Marshal(b []byte) ([]byte, error) {
2395 b = make([]byte, m.Size())
2397 buf := codec.NewBuffer(b)
2398 buf.EncodeUint32(m.Table.TableID)
2399 buf.EncodeBool(m.Table.IsIP6)
2400 buf.EncodeString(m.Table.Name, 64)
2401 return buf.Bytes(), nil
2403 func (m *IPTableReplaceBegin) Unmarshal(b []byte) error {
2404 buf := codec.NewBuffer(b)
2405 m.Table.TableID = buf.DecodeUint32()
2406 m.Table.IsIP6 = buf.DecodeBool()
2407 m.Table.Name = buf.DecodeString(64)
2411 // IPTableReplaceBeginReply defines message 'ip_table_replace_begin_reply'.
2412 type IPTableReplaceBeginReply struct {
2413 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2416 func (m *IPTableReplaceBeginReply) Reset() { *m = IPTableReplaceBeginReply{} }
2417 func (*IPTableReplaceBeginReply) GetMessageName() string { return "ip_table_replace_begin_reply" }
2418 func (*IPTableReplaceBeginReply) GetCrcString() string { return "e8d4e804" }
2419 func (*IPTableReplaceBeginReply) GetMessageType() api.MessageType {
2420 return api.ReplyMessage
2423 func (m *IPTableReplaceBeginReply) Size() (size int) {
2427 size += 4 // m.Retval
2430 func (m *IPTableReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
2432 b = make([]byte, m.Size())
2434 buf := codec.NewBuffer(b)
2435 buf.EncodeInt32(m.Retval)
2436 return buf.Bytes(), nil
2438 func (m *IPTableReplaceBeginReply) Unmarshal(b []byte) error {
2439 buf := codec.NewBuffer(b)
2440 m.Retval = buf.DecodeInt32()
2444 // IPTableReplaceEnd defines message 'ip_table_replace_end'.
2445 type IPTableReplaceEnd struct {
2446 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2449 func (m *IPTableReplaceEnd) Reset() { *m = IPTableReplaceEnd{} }
2450 func (*IPTableReplaceEnd) GetMessageName() string { return "ip_table_replace_end" }
2451 func (*IPTableReplaceEnd) GetCrcString() string { return "b9d2e09e" }
2452 func (*IPTableReplaceEnd) GetMessageType() api.MessageType {
2453 return api.RequestMessage
2456 func (m *IPTableReplaceEnd) Size() (size int) {
2460 size += 4 // m.Table.TableID
2461 size += 1 // m.Table.IsIP6
2462 size += 64 // m.Table.Name
2465 func (m *IPTableReplaceEnd) Marshal(b []byte) ([]byte, error) {
2467 b = make([]byte, m.Size())
2469 buf := codec.NewBuffer(b)
2470 buf.EncodeUint32(m.Table.TableID)
2471 buf.EncodeBool(m.Table.IsIP6)
2472 buf.EncodeString(m.Table.Name, 64)
2473 return buf.Bytes(), nil
2475 func (m *IPTableReplaceEnd) Unmarshal(b []byte) error {
2476 buf := codec.NewBuffer(b)
2477 m.Table.TableID = buf.DecodeUint32()
2478 m.Table.IsIP6 = buf.DecodeBool()
2479 m.Table.Name = buf.DecodeString(64)
2483 // IPTableReplaceEndReply defines message 'ip_table_replace_end_reply'.
2484 type IPTableReplaceEndReply struct {
2485 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2488 func (m *IPTableReplaceEndReply) Reset() { *m = IPTableReplaceEndReply{} }
2489 func (*IPTableReplaceEndReply) GetMessageName() string { return "ip_table_replace_end_reply" }
2490 func (*IPTableReplaceEndReply) GetCrcString() string { return "e8d4e804" }
2491 func (*IPTableReplaceEndReply) GetMessageType() api.MessageType {
2492 return api.ReplyMessage
2495 func (m *IPTableReplaceEndReply) Size() (size int) {
2499 size += 4 // m.Retval
2502 func (m *IPTableReplaceEndReply) Marshal(b []byte) ([]byte, error) {
2504 b = make([]byte, m.Size())
2506 buf := codec.NewBuffer(b)
2507 buf.EncodeInt32(m.Retval)
2508 return buf.Bytes(), nil
2510 func (m *IPTableReplaceEndReply) Unmarshal(b []byte) error {
2511 buf := codec.NewBuffer(b)
2512 m.Retval = buf.DecodeInt32()
2516 // IPUnnumberedDetails defines message 'ip_unnumbered_details'.
2517 type IPUnnumberedDetails struct {
2518 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2519 IPSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip_sw_if_index" json:"ip_sw_if_index,omitempty"`
2522 func (m *IPUnnumberedDetails) Reset() { *m = IPUnnumberedDetails{} }
2523 func (*IPUnnumberedDetails) GetMessageName() string { return "ip_unnumbered_details" }
2524 func (*IPUnnumberedDetails) GetCrcString() string { return "aa12a483" }
2525 func (*IPUnnumberedDetails) GetMessageType() api.MessageType {
2526 return api.ReplyMessage
2529 func (m *IPUnnumberedDetails) Size() (size int) {
2533 size += 4 // m.SwIfIndex
2534 size += 4 // m.IPSwIfIndex
2537 func (m *IPUnnumberedDetails) Marshal(b []byte) ([]byte, error) {
2539 b = make([]byte, m.Size())
2541 buf := codec.NewBuffer(b)
2542 buf.EncodeUint32(uint32(m.SwIfIndex))
2543 buf.EncodeUint32(uint32(m.IPSwIfIndex))
2544 return buf.Bytes(), nil
2546 func (m *IPUnnumberedDetails) Unmarshal(b []byte) error {
2547 buf := codec.NewBuffer(b)
2548 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2549 m.IPSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2553 // IPUnnumberedDump defines message 'ip_unnumbered_dump'.
2554 type IPUnnumberedDump struct {
2555 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
2558 func (m *IPUnnumberedDump) Reset() { *m = IPUnnumberedDump{} }
2559 func (*IPUnnumberedDump) GetMessageName() string { return "ip_unnumbered_dump" }
2560 func (*IPUnnumberedDump) GetCrcString() string { return "f9e6675e" }
2561 func (*IPUnnumberedDump) GetMessageType() api.MessageType {
2562 return api.RequestMessage
2565 func (m *IPUnnumberedDump) Size() (size int) {
2569 size += 4 // m.SwIfIndex
2572 func (m *IPUnnumberedDump) Marshal(b []byte) ([]byte, error) {
2574 b = make([]byte, m.Size())
2576 buf := codec.NewBuffer(b)
2577 buf.EncodeUint32(uint32(m.SwIfIndex))
2578 return buf.Bytes(), nil
2580 func (m *IPUnnumberedDump) Unmarshal(b []byte) error {
2581 buf := codec.NewBuffer(b)
2582 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2586 // MfibSignalDetails defines message 'mfib_signal_details'.
2587 type MfibSignalDetails struct {
2588 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2589 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
2590 Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
2591 IPPacketLen uint16 `binapi:"u16,name=ip_packet_len" json:"ip_packet_len,omitempty"`
2592 IPPacketData []byte `binapi:"u8[256],name=ip_packet_data" json:"ip_packet_data,omitempty"`
2595 func (m *MfibSignalDetails) Reset() { *m = MfibSignalDetails{} }
2596 func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" }
2597 func (*MfibSignalDetails) GetCrcString() string { return "64398a9a" }
2598 func (*MfibSignalDetails) GetMessageType() api.MessageType {
2599 return api.ReplyMessage
2602 func (m *MfibSignalDetails) Size() (size int) {
2606 size += 4 // m.SwIfIndex
2607 size += 4 // m.TableID
2608 size += 1 // m.Prefix.Af
2609 size += 2 // m.Prefix.GrpAddressLength
2610 size += 1 * 16 // m.Prefix.GrpAddress
2611 size += 1 * 16 // m.Prefix.SrcAddress
2612 size += 2 // m.IPPacketLen
2613 size += 1 * 256 // m.IPPacketData
2616 func (m *MfibSignalDetails) Marshal(b []byte) ([]byte, error) {
2618 b = make([]byte, m.Size())
2620 buf := codec.NewBuffer(b)
2621 buf.EncodeUint32(uint32(m.SwIfIndex))
2622 buf.EncodeUint32(m.TableID)
2623 buf.EncodeUint8(uint8(m.Prefix.Af))
2624 buf.EncodeUint16(m.Prefix.GrpAddressLength)
2625 buf.EncodeBytes(m.Prefix.GrpAddress.XXX_UnionData[:], 16)
2626 buf.EncodeBytes(m.Prefix.SrcAddress.XXX_UnionData[:], 16)
2627 buf.EncodeUint16(m.IPPacketLen)
2628 buf.EncodeBytes(m.IPPacketData, 256)
2629 return buf.Bytes(), nil
2631 func (m *MfibSignalDetails) Unmarshal(b []byte) error {
2632 buf := codec.NewBuffer(b)
2633 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2634 m.TableID = buf.DecodeUint32()
2635 m.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
2636 m.Prefix.GrpAddressLength = buf.DecodeUint16()
2637 copy(m.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
2638 copy(m.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
2639 m.IPPacketLen = buf.DecodeUint16()
2640 m.IPPacketData = make([]byte, 256)
2641 copy(m.IPPacketData, buf.DecodeBytes(len(m.IPPacketData)))
2645 // MfibSignalDump defines message 'mfib_signal_dump'.
2646 type MfibSignalDump struct{}
2648 func (m *MfibSignalDump) Reset() { *m = MfibSignalDump{} }
2649 func (*MfibSignalDump) GetMessageName() string { return "mfib_signal_dump" }
2650 func (*MfibSignalDump) GetCrcString() string { return "51077d14" }
2651 func (*MfibSignalDump) GetMessageType() api.MessageType {
2652 return api.RequestMessage
2655 func (m *MfibSignalDump) Size() (size int) {
2661 func (m *MfibSignalDump) Marshal(b []byte) ([]byte, error) {
2663 b = make([]byte, m.Size())
2665 buf := codec.NewBuffer(b)
2666 return buf.Bytes(), nil
2668 func (m *MfibSignalDump) Unmarshal(b []byte) error {
2672 // SetIPFlowHash defines message 'set_ip_flow_hash'.
2673 type SetIPFlowHash struct {
2674 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2675 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
2676 Src bool `binapi:"bool,name=src" json:"src,omitempty"`
2677 Dst bool `binapi:"bool,name=dst" json:"dst,omitempty"`
2678 Sport bool `binapi:"bool,name=sport" json:"sport,omitempty"`
2679 Dport bool `binapi:"bool,name=dport" json:"dport,omitempty"`
2680 Proto bool `binapi:"bool,name=proto" json:"proto,omitempty"`
2681 Reverse bool `binapi:"bool,name=reverse" json:"reverse,omitempty"`
2682 Symmetric bool `binapi:"bool,name=symmetric" json:"symmetric,omitempty"`
2685 func (m *SetIPFlowHash) Reset() { *m = SetIPFlowHash{} }
2686 func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" }
2687 func (*SetIPFlowHash) GetCrcString() string { return "084ee09e" }
2688 func (*SetIPFlowHash) GetMessageType() api.MessageType {
2689 return api.RequestMessage
2692 func (m *SetIPFlowHash) Size() (size int) {
2696 size += 4 // m.VrfID
2697 size += 1 // m.IsIPv6
2700 size += 1 // m.Sport
2701 size += 1 // m.Dport
2702 size += 1 // m.Proto
2703 size += 1 // m.Reverse
2704 size += 1 // m.Symmetric
2707 func (m *SetIPFlowHash) Marshal(b []byte) ([]byte, error) {
2709 b = make([]byte, m.Size())
2711 buf := codec.NewBuffer(b)
2712 buf.EncodeUint32(m.VrfID)
2713 buf.EncodeBool(m.IsIPv6)
2714 buf.EncodeBool(m.Src)
2715 buf.EncodeBool(m.Dst)
2716 buf.EncodeBool(m.Sport)
2717 buf.EncodeBool(m.Dport)
2718 buf.EncodeBool(m.Proto)
2719 buf.EncodeBool(m.Reverse)
2720 buf.EncodeBool(m.Symmetric)
2721 return buf.Bytes(), nil
2723 func (m *SetIPFlowHash) Unmarshal(b []byte) error {
2724 buf := codec.NewBuffer(b)
2725 m.VrfID = buf.DecodeUint32()
2726 m.IsIPv6 = buf.DecodeBool()
2727 m.Src = buf.DecodeBool()
2728 m.Dst = buf.DecodeBool()
2729 m.Sport = buf.DecodeBool()
2730 m.Dport = buf.DecodeBool()
2731 m.Proto = buf.DecodeBool()
2732 m.Reverse = buf.DecodeBool()
2733 m.Symmetric = buf.DecodeBool()
2737 // SetIPFlowHashReply defines message 'set_ip_flow_hash_reply'.
2738 type SetIPFlowHashReply struct {
2739 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2742 func (m *SetIPFlowHashReply) Reset() { *m = SetIPFlowHashReply{} }
2743 func (*SetIPFlowHashReply) GetMessageName() string { return "set_ip_flow_hash_reply" }
2744 func (*SetIPFlowHashReply) GetCrcString() string { return "e8d4e804" }
2745 func (*SetIPFlowHashReply) GetMessageType() api.MessageType {
2746 return api.ReplyMessage
2749 func (m *SetIPFlowHashReply) Size() (size int) {
2753 size += 4 // m.Retval
2756 func (m *SetIPFlowHashReply) Marshal(b []byte) ([]byte, error) {
2758 b = make([]byte, m.Size())
2760 buf := codec.NewBuffer(b)
2761 buf.EncodeInt32(m.Retval)
2762 return buf.Bytes(), nil
2764 func (m *SetIPFlowHashReply) Unmarshal(b []byte) error {
2765 buf := codec.NewBuffer(b)
2766 m.Retval = buf.DecodeInt32()
2770 // SwInterfaceIP6EnableDisable defines message 'sw_interface_ip6_enable_disable'.
2771 type SwInterfaceIP6EnableDisable struct {
2772 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2773 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
2776 func (m *SwInterfaceIP6EnableDisable) Reset() { *m = SwInterfaceIP6EnableDisable{} }
2777 func (*SwInterfaceIP6EnableDisable) GetMessageName() string { return "sw_interface_ip6_enable_disable" }
2778 func (*SwInterfaceIP6EnableDisable) GetCrcString() string { return "ae6cfcfb" }
2779 func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType {
2780 return api.RequestMessage
2783 func (m *SwInterfaceIP6EnableDisable) Size() (size int) {
2787 size += 4 // m.SwIfIndex
2788 size += 1 // m.Enable
2791 func (m *SwInterfaceIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
2793 b = make([]byte, m.Size())
2795 buf := codec.NewBuffer(b)
2796 buf.EncodeUint32(uint32(m.SwIfIndex))
2797 buf.EncodeBool(m.Enable)
2798 return buf.Bytes(), nil
2800 func (m *SwInterfaceIP6EnableDisable) Unmarshal(b []byte) error {
2801 buf := codec.NewBuffer(b)
2802 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2803 m.Enable = buf.DecodeBool()
2807 // SwInterfaceIP6EnableDisableReply defines message 'sw_interface_ip6_enable_disable_reply'.
2808 type SwInterfaceIP6EnableDisableReply struct {
2809 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2812 func (m *SwInterfaceIP6EnableDisableReply) Reset() { *m = SwInterfaceIP6EnableDisableReply{} }
2813 func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string {
2814 return "sw_interface_ip6_enable_disable_reply"
2816 func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
2817 func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType {
2818 return api.ReplyMessage
2821 func (m *SwInterfaceIP6EnableDisableReply) Size() (size int) {
2825 size += 4 // m.Retval
2828 func (m *SwInterfaceIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) {
2830 b = make([]byte, m.Size())
2832 buf := codec.NewBuffer(b)
2833 buf.EncodeInt32(m.Retval)
2834 return buf.Bytes(), nil
2836 func (m *SwInterfaceIP6EnableDisableReply) Unmarshal(b []byte) error {
2837 buf := codec.NewBuffer(b)
2838 m.Retval = buf.DecodeInt32()
2842 // SwInterfaceIP6SetLinkLocalAddress defines message 'sw_interface_ip6_set_link_local_address'.
2843 type SwInterfaceIP6SetLinkLocalAddress struct {
2844 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2845 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
2848 func (m *SwInterfaceIP6SetLinkLocalAddress) Reset() { *m = SwInterfaceIP6SetLinkLocalAddress{} }
2849 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string {
2850 return "sw_interface_ip6_set_link_local_address"
2852 func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "2931d9fa" }
2853 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType {
2854 return api.RequestMessage
2857 func (m *SwInterfaceIP6SetLinkLocalAddress) Size() (size int) {
2861 size += 4 // m.SwIfIndex
2862 size += 1 * 16 // m.IP
2865 func (m *SwInterfaceIP6SetLinkLocalAddress) Marshal(b []byte) ([]byte, error) {
2867 b = make([]byte, m.Size())
2869 buf := codec.NewBuffer(b)
2870 buf.EncodeUint32(uint32(m.SwIfIndex))
2871 buf.EncodeBytes(m.IP[:], 16)
2872 return buf.Bytes(), nil
2874 func (m *SwInterfaceIP6SetLinkLocalAddress) Unmarshal(b []byte) error {
2875 buf := codec.NewBuffer(b)
2876 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2877 copy(m.IP[:], buf.DecodeBytes(16))
2881 // SwInterfaceIP6SetLinkLocalAddressReply defines message 'sw_interface_ip6_set_link_local_address_reply'.
2882 type SwInterfaceIP6SetLinkLocalAddressReply struct {
2883 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2886 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Reset() {
2887 *m = SwInterfaceIP6SetLinkLocalAddressReply{}
2889 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string {
2890 return "sw_interface_ip6_set_link_local_address_reply"
2892 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { return "e8d4e804" }
2893 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType {
2894 return api.ReplyMessage
2897 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Size() (size int) {
2901 size += 4 // m.Retval
2904 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) {
2906 b = make([]byte, m.Size())
2908 buf := codec.NewBuffer(b)
2909 buf.EncodeInt32(m.Retval)
2910 return buf.Bytes(), nil
2912 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error {
2913 buf := codec.NewBuffer(b)
2914 m.Retval = buf.DecodeInt32()
2918 func init() { file_ip_binapi_init() }
2919 func file_ip_binapi_init() {
2920 api.RegisterMessage((*IoamDisable)(nil), "ioam_disable_6b16a45e")
2921 api.RegisterMessage((*IoamDisableReply)(nil), "ioam_disable_reply_e8d4e804")
2922 api.RegisterMessage((*IoamEnable)(nil), "ioam_enable_51ccd868")
2923 api.RegisterMessage((*IoamEnableReply)(nil), "ioam_enable_reply_e8d4e804")
2924 api.RegisterMessage((*IPAddressDetails)(nil), "ip_address_details_b1199745")
2925 api.RegisterMessage((*IPAddressDump)(nil), "ip_address_dump_2d033de4")
2926 api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip_container_proxy_add_del_91189f40")
2927 api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip_container_proxy_add_del_reply_e8d4e804")
2928 api.RegisterMessage((*IPContainerProxyDetails)(nil), "ip_container_proxy_details_0ee460e8")
2929 api.RegisterMessage((*IPContainerProxyDump)(nil), "ip_container_proxy_dump_51077d14")
2930 api.RegisterMessage((*IPDetails)(nil), "ip_details_eb152d07")
2931 api.RegisterMessage((*IPDump)(nil), "ip_dump_98d231ca")
2932 api.RegisterMessage((*IPMrouteAddDel)(nil), "ip_mroute_add_del_f6627d17")
2933 api.RegisterMessage((*IPMrouteAddDelReply)(nil), "ip_mroute_add_del_reply_1992deab")
2934 api.RegisterMessage((*IPMrouteDetails)(nil), "ip_mroute_details_c1cb4b44")
2935 api.RegisterMessage((*IPMrouteDump)(nil), "ip_mroute_dump_b9d2e09e")
2936 api.RegisterMessage((*IPMtableDetails)(nil), "ip_mtable_details_b9d2e09e")
2937 api.RegisterMessage((*IPMtableDump)(nil), "ip_mtable_dump_51077d14")
2938 api.RegisterMessage((*IPPuntPolice)(nil), "ip_punt_police_db867cea")
2939 api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip_punt_police_reply_e8d4e804")
2940 api.RegisterMessage((*IPPuntRedirect)(nil), "ip_punt_redirect_a9a5592c")
2941 api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_3924f5d3")
2942 api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip_punt_redirect_dump_2d033de4")
2943 api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip_punt_redirect_reply_e8d4e804")
2944 api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_885c85a6")
2945 api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip_reassembly_enable_disable_reply_e8d4e804")
2946 api.RegisterMessage((*IPReassemblyGet)(nil), "ip_reassembly_get_ea13ff63")
2947 api.RegisterMessage((*IPReassemblyGetReply)(nil), "ip_reassembly_get_reply_d5eb8d34")
2948 api.RegisterMessage((*IPReassemblySet)(nil), "ip_reassembly_set_16467d25")
2949 api.RegisterMessage((*IPReassemblySetReply)(nil), "ip_reassembly_set_reply_e8d4e804")
2950 api.RegisterMessage((*IPRouteAddDel)(nil), "ip_route_add_del_c1ff832d")
2951 api.RegisterMessage((*IPRouteAddDelReply)(nil), "ip_route_add_del_reply_1992deab")
2952 api.RegisterMessage((*IPRouteDetails)(nil), "ip_route_details_d1ffaae1")
2953 api.RegisterMessage((*IPRouteDump)(nil), "ip_route_dump_b9d2e09e")
2954 api.RegisterMessage((*IPRouteLookup)(nil), "ip_route_lookup_e2986185")
2955 api.RegisterMessage((*IPRouteLookupReply)(nil), "ip_route_lookup_reply_ae99de8e")
2956 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip_source_and_port_range_check_add_del_8bfc76f2")
2957 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip_source_and_port_range_check_add_del_reply_e8d4e804")
2958 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip_source_and_port_range_check_interface_add_del_e1ba8987")
2959 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip_source_and_port_range_check_interface_add_del_reply_e8d4e804")
2960 api.RegisterMessage((*IPTableAddDel)(nil), "ip_table_add_del_0ffdaec0")
2961 api.RegisterMessage((*IPTableAddDelReply)(nil), "ip_table_add_del_reply_e8d4e804")
2962 api.RegisterMessage((*IPTableDetails)(nil), "ip_table_details_c79fca0f")
2963 api.RegisterMessage((*IPTableDump)(nil), "ip_table_dump_51077d14")
2964 api.RegisterMessage((*IPTableFlush)(nil), "ip_table_flush_b9d2e09e")
2965 api.RegisterMessage((*IPTableFlushReply)(nil), "ip_table_flush_reply_e8d4e804")
2966 api.RegisterMessage((*IPTableReplaceBegin)(nil), "ip_table_replace_begin_b9d2e09e")
2967 api.RegisterMessage((*IPTableReplaceBeginReply)(nil), "ip_table_replace_begin_reply_e8d4e804")
2968 api.RegisterMessage((*IPTableReplaceEnd)(nil), "ip_table_replace_end_b9d2e09e")
2969 api.RegisterMessage((*IPTableReplaceEndReply)(nil), "ip_table_replace_end_reply_e8d4e804")
2970 api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip_unnumbered_details_aa12a483")
2971 api.RegisterMessage((*IPUnnumberedDump)(nil), "ip_unnumbered_dump_f9e6675e")
2972 api.RegisterMessage((*MfibSignalDetails)(nil), "mfib_signal_details_64398a9a")
2973 api.RegisterMessage((*MfibSignalDump)(nil), "mfib_signal_dump_51077d14")
2974 api.RegisterMessage((*SetIPFlowHash)(nil), "set_ip_flow_hash_084ee09e")
2975 api.RegisterMessage((*SetIPFlowHashReply)(nil), "set_ip_flow_hash_reply_e8d4e804")
2976 api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "sw_interface_ip6_enable_disable_ae6cfcfb")
2977 api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "sw_interface_ip6_enable_disable_reply_e8d4e804")
2978 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "sw_interface_ip6_set_link_local_address_2931d9fa")
2979 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "sw_interface_ip6_set_link_local_address_reply_e8d4e804")
2982 // Messages returns list of all messages in this module.
2983 func AllMessages() []api.Message {
2984 return []api.Message{
2985 (*IoamDisable)(nil),
2986 (*IoamDisableReply)(nil),
2988 (*IoamEnableReply)(nil),
2989 (*IPAddressDetails)(nil),
2990 (*IPAddressDump)(nil),
2991 (*IPContainerProxyAddDel)(nil),
2992 (*IPContainerProxyAddDelReply)(nil),
2993 (*IPContainerProxyDetails)(nil),
2994 (*IPContainerProxyDump)(nil),
2997 (*IPMrouteAddDel)(nil),
2998 (*IPMrouteAddDelReply)(nil),
2999 (*IPMrouteDetails)(nil),
3000 (*IPMrouteDump)(nil),
3001 (*IPMtableDetails)(nil),
3002 (*IPMtableDump)(nil),
3003 (*IPPuntPolice)(nil),
3004 (*IPPuntPoliceReply)(nil),
3005 (*IPPuntRedirect)(nil),
3006 (*IPPuntRedirectDetails)(nil),
3007 (*IPPuntRedirectDump)(nil),
3008 (*IPPuntRedirectReply)(nil),
3009 (*IPReassemblyEnableDisable)(nil),
3010 (*IPReassemblyEnableDisableReply)(nil),
3011 (*IPReassemblyGet)(nil),
3012 (*IPReassemblyGetReply)(nil),
3013 (*IPReassemblySet)(nil),
3014 (*IPReassemblySetReply)(nil),
3015 (*IPRouteAddDel)(nil),
3016 (*IPRouteAddDelReply)(nil),
3017 (*IPRouteDetails)(nil),
3018 (*IPRouteDump)(nil),
3019 (*IPRouteLookup)(nil),
3020 (*IPRouteLookupReply)(nil),
3021 (*IPSourceAndPortRangeCheckAddDel)(nil),
3022 (*IPSourceAndPortRangeCheckAddDelReply)(nil),
3023 (*IPSourceAndPortRangeCheckInterfaceAddDel)(nil),
3024 (*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil),
3025 (*IPTableAddDel)(nil),
3026 (*IPTableAddDelReply)(nil),
3027 (*IPTableDetails)(nil),
3028 (*IPTableDump)(nil),
3029 (*IPTableFlush)(nil),
3030 (*IPTableFlushReply)(nil),
3031 (*IPTableReplaceBegin)(nil),
3032 (*IPTableReplaceBeginReply)(nil),
3033 (*IPTableReplaceEnd)(nil),
3034 (*IPTableReplaceEndReply)(nil),
3035 (*IPUnnumberedDetails)(nil),
3036 (*IPUnnumberedDump)(nil),
3037 (*MfibSignalDetails)(nil),
3038 (*MfibSignalDump)(nil),
3039 (*SetIPFlowHash)(nil),
3040 (*SetIPFlowHashReply)(nil),
3041 (*SwInterfaceIP6EnableDisable)(nil),
3042 (*SwInterfaceIP6EnableDisableReply)(nil),
3043 (*SwInterfaceIP6SetLinkLocalAddress)(nil),
3044 (*SwInterfaceIP6SetLinkLocalAddressReply)(nil),