1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/ip.api.json
7 // Package ip contains generated bindings for API file ip.api.
17 api "git.fd.io/govpp.git/api"
18 _ "git.fd.io/govpp.git/binapi/ethernet_types"
19 fib_types "git.fd.io/govpp.git/binapi/fib_types"
20 interface_types "git.fd.io/govpp.git/binapi/interface_types"
21 ip_types "git.fd.io/govpp.git/binapi/ip_types"
22 mfib_types "git.fd.io/govpp.git/binapi/mfib_types"
23 codec "git.fd.io/govpp.git/codec"
27 // This is a compile-time assertion to ensure that this generated file
28 // is compatible with the GoVPP api package it is being compiled against.
29 // A compilation error at this line likely means your copy of the
30 // GoVPP api package needs to be updated.
31 const _ = api.GoVppAPIPackageIsVersion2
36 VersionCrc = 0x765d74b1
39 // IPReassType defines enum 'ip_reass_type'.
40 type IPReassType uint32
43 IP_REASS_TYPE_FULL IPReassType = 0
44 IP_REASS_TYPE_SHALLOW_VIRTUAL IPReassType = 1
48 IPReassType_name = map[uint32]string{
49 0: "IP_REASS_TYPE_FULL",
50 1: "IP_REASS_TYPE_SHALLOW_VIRTUAL",
52 IPReassType_value = map[string]uint32{
53 "IP_REASS_TYPE_FULL": 0,
54 "IP_REASS_TYPE_SHALLOW_VIRTUAL": 1,
58 func (x IPReassType) String() string {
59 s, ok := IPReassType_name[uint32(x)]
63 return "IPReassType(" + strconv.Itoa(int(x)) + ")"
66 // IPMroute defines type 'ip_mroute'.
67 type IPMroute struct {
68 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
69 EntryFlags uint32 `binapi:"u32,name=entry_flags" json:"entry_flags,omitempty"`
70 RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
71 Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
72 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"`
73 Paths []mfib_types.MfibPath `binapi:"mfib_path[n_paths],name=paths" json:"paths,omitempty"`
76 // IPRoute defines type 'ip_route'.
78 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
79 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
80 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
81 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"`
82 Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
85 // IPTable defines type 'ip_table'.
87 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
88 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
89 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
92 // PuntRedirect defines type 'punt_redirect'.
93 type PuntRedirect struct {
94 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
95 TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
96 Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"`
99 // IoamDisable defines message 'ioam_disable'.
100 type IoamDisable struct {
101 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
104 func (m *IoamDisable) Reset() { *m = IoamDisable{} }
105 func (*IoamDisable) GetMessageName() string { return "ioam_disable" }
106 func (*IoamDisable) GetCrcString() string { return "6b16a45e" }
107 func (*IoamDisable) GetMessageType() api.MessageType {
108 return api.RequestMessage
111 func (m *IoamDisable) Size() int {
119 func (m *IoamDisable) Marshal(b []byte) ([]byte, error) {
120 var buf *codec.Buffer
122 buf = codec.NewBuffer(make([]byte, m.Size()))
124 buf = codec.NewBuffer(b)
126 buf.EncodeUint16(uint16(m.ID))
127 return buf.Bytes(), nil
129 func (m *IoamDisable) Unmarshal(b []byte) error {
130 buf := codec.NewBuffer(b)
131 m.ID = buf.DecodeUint16()
135 // IoamDisableReply defines message 'ioam_disable_reply'.
136 type IoamDisableReply struct {
137 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
140 func (m *IoamDisableReply) Reset() { *m = IoamDisableReply{} }
141 func (*IoamDisableReply) GetMessageName() string { return "ioam_disable_reply" }
142 func (*IoamDisableReply) GetCrcString() string { return "e8d4e804" }
143 func (*IoamDisableReply) GetMessageType() api.MessageType {
144 return api.ReplyMessage
147 func (m *IoamDisableReply) Size() int {
152 size += 4 // m.Retval
155 func (m *IoamDisableReply) Marshal(b []byte) ([]byte, error) {
156 var buf *codec.Buffer
158 buf = codec.NewBuffer(make([]byte, m.Size()))
160 buf = codec.NewBuffer(b)
162 buf.EncodeUint32(uint32(m.Retval))
163 return buf.Bytes(), nil
165 func (m *IoamDisableReply) Unmarshal(b []byte) error {
166 buf := codec.NewBuffer(b)
167 m.Retval = int32(buf.DecodeUint32())
171 // IoamEnable defines message 'ioam_enable'.
172 type IoamEnable struct {
173 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
174 Seqno bool `binapi:"bool,name=seqno" json:"seqno,omitempty"`
175 Analyse bool `binapi:"bool,name=analyse" json:"analyse,omitempty"`
176 PotEnable bool `binapi:"bool,name=pot_enable" json:"pot_enable,omitempty"`
177 TraceEnable bool `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"`
178 NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
181 func (m *IoamEnable) Reset() { *m = IoamEnable{} }
182 func (*IoamEnable) GetMessageName() string { return "ioam_enable" }
183 func (*IoamEnable) GetCrcString() string { return "51ccd868" }
184 func (*IoamEnable) GetMessageType() api.MessageType {
185 return api.RequestMessage
188 func (m *IoamEnable) Size() int {
195 size += 1 // m.Analyse
196 size += 1 // m.PotEnable
197 size += 1 // m.TraceEnable
198 size += 4 // m.NodeID
201 func (m *IoamEnable) Marshal(b []byte) ([]byte, error) {
202 var buf *codec.Buffer
204 buf = codec.NewBuffer(make([]byte, m.Size()))
206 buf = codec.NewBuffer(b)
208 buf.EncodeUint16(uint16(m.ID))
209 buf.EncodeBool(m.Seqno)
210 buf.EncodeBool(m.Analyse)
211 buf.EncodeBool(m.PotEnable)
212 buf.EncodeBool(m.TraceEnable)
213 buf.EncodeUint32(uint32(m.NodeID))
214 return buf.Bytes(), nil
216 func (m *IoamEnable) Unmarshal(b []byte) error {
217 buf := codec.NewBuffer(b)
218 m.ID = buf.DecodeUint16()
219 m.Seqno = buf.DecodeBool()
220 m.Analyse = buf.DecodeBool()
221 m.PotEnable = buf.DecodeBool()
222 m.TraceEnable = buf.DecodeBool()
223 m.NodeID = buf.DecodeUint32()
227 // IoamEnableReply defines message 'ioam_enable_reply'.
228 type IoamEnableReply struct {
229 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
232 func (m *IoamEnableReply) Reset() { *m = IoamEnableReply{} }
233 func (*IoamEnableReply) GetMessageName() string { return "ioam_enable_reply" }
234 func (*IoamEnableReply) GetCrcString() string { return "e8d4e804" }
235 func (*IoamEnableReply) GetMessageType() api.MessageType {
236 return api.ReplyMessage
239 func (m *IoamEnableReply) Size() int {
244 size += 4 // m.Retval
247 func (m *IoamEnableReply) Marshal(b []byte) ([]byte, error) {
248 var buf *codec.Buffer
250 buf = codec.NewBuffer(make([]byte, m.Size()))
252 buf = codec.NewBuffer(b)
254 buf.EncodeUint32(uint32(m.Retval))
255 return buf.Bytes(), nil
257 func (m *IoamEnableReply) Unmarshal(b []byte) error {
258 buf := codec.NewBuffer(b)
259 m.Retval = int32(buf.DecodeUint32())
263 // IPAddressDetails defines message 'ip_address_details'.
264 type IPAddressDetails struct {
265 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
266 Prefix ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
269 func (m *IPAddressDetails) Reset() { *m = IPAddressDetails{} }
270 func (*IPAddressDetails) GetMessageName() string { return "ip_address_details" }
271 func (*IPAddressDetails) GetCrcString() string { return "b1199745" }
272 func (*IPAddressDetails) GetMessageType() api.MessageType {
273 return api.ReplyMessage
276 func (m *IPAddressDetails) Size() int {
281 size += 4 // m.SwIfIndex
282 size += 1 // m.Prefix.Address.Af
283 size += 1 * 16 // m.Prefix.Address.Un
284 size += 1 // m.Prefix.Len
287 func (m *IPAddressDetails) Marshal(b []byte) ([]byte, error) {
288 var buf *codec.Buffer
290 buf = codec.NewBuffer(make([]byte, m.Size()))
292 buf = codec.NewBuffer(b)
294 buf.EncodeUint32(uint32(m.SwIfIndex))
295 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
296 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 0)
297 buf.EncodeUint8(uint8(m.Prefix.Len))
298 return buf.Bytes(), nil
300 func (m *IPAddressDetails) Unmarshal(b []byte) error {
301 buf := codec.NewBuffer(b)
302 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
303 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
304 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
305 m.Prefix.Len = buf.DecodeUint8()
309 // IPAddressDump defines message 'ip_address_dump'.
310 type IPAddressDump struct {
311 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
312 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
315 func (m *IPAddressDump) Reset() { *m = IPAddressDump{} }
316 func (*IPAddressDump) GetMessageName() string { return "ip_address_dump" }
317 func (*IPAddressDump) GetCrcString() string { return "2d033de4" }
318 func (*IPAddressDump) GetMessageType() api.MessageType {
319 return api.RequestMessage
322 func (m *IPAddressDump) Size() int {
327 size += 4 // m.SwIfIndex
328 size += 1 // m.IsIPv6
331 func (m *IPAddressDump) Marshal(b []byte) ([]byte, error) {
332 var buf *codec.Buffer
334 buf = codec.NewBuffer(make([]byte, m.Size()))
336 buf = codec.NewBuffer(b)
338 buf.EncodeUint32(uint32(m.SwIfIndex))
339 buf.EncodeBool(m.IsIPv6)
340 return buf.Bytes(), nil
342 func (m *IPAddressDump) Unmarshal(b []byte) error {
343 buf := codec.NewBuffer(b)
344 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
345 m.IsIPv6 = buf.DecodeBool()
349 // IPContainerProxyAddDel defines message 'ip_container_proxy_add_del'.
350 type IPContainerProxyAddDel struct {
351 Pfx ip_types.Prefix `binapi:"prefix,name=pfx" json:"pfx,omitempty"`
352 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
353 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
356 func (m *IPContainerProxyAddDel) Reset() { *m = IPContainerProxyAddDel{} }
357 func (*IPContainerProxyAddDel) GetMessageName() string { return "ip_container_proxy_add_del" }
358 func (*IPContainerProxyAddDel) GetCrcString() string { return "91189f40" }
359 func (*IPContainerProxyAddDel) GetMessageType() api.MessageType {
360 return api.RequestMessage
363 func (m *IPContainerProxyAddDel) Size() int {
368 size += 1 // m.Pfx.Address.Af
369 size += 1 * 16 // m.Pfx.Address.Un
370 size += 1 // m.Pfx.Len
371 size += 4 // m.SwIfIndex
375 func (m *IPContainerProxyAddDel) Marshal(b []byte) ([]byte, error) {
376 var buf *codec.Buffer
378 buf = codec.NewBuffer(make([]byte, m.Size()))
380 buf = codec.NewBuffer(b)
382 buf.EncodeUint8(uint8(m.Pfx.Address.Af))
383 buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 0)
384 buf.EncodeUint8(uint8(m.Pfx.Len))
385 buf.EncodeUint32(uint32(m.SwIfIndex))
386 buf.EncodeBool(m.IsAdd)
387 return buf.Bytes(), nil
389 func (m *IPContainerProxyAddDel) Unmarshal(b []byte) error {
390 buf := codec.NewBuffer(b)
391 m.Pfx.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
392 copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
393 m.Pfx.Len = buf.DecodeUint8()
394 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
395 m.IsAdd = buf.DecodeBool()
399 // IPContainerProxyAddDelReply defines message 'ip_container_proxy_add_del_reply'.
400 type IPContainerProxyAddDelReply struct {
401 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
404 func (m *IPContainerProxyAddDelReply) Reset() { *m = IPContainerProxyAddDelReply{} }
405 func (*IPContainerProxyAddDelReply) GetMessageName() string {
406 return "ip_container_proxy_add_del_reply"
408 func (*IPContainerProxyAddDelReply) GetCrcString() string { return "e8d4e804" }
409 func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType {
410 return api.ReplyMessage
413 func (m *IPContainerProxyAddDelReply) Size() int {
418 size += 4 // m.Retval
421 func (m *IPContainerProxyAddDelReply) Marshal(b []byte) ([]byte, error) {
422 var buf *codec.Buffer
424 buf = codec.NewBuffer(make([]byte, m.Size()))
426 buf = codec.NewBuffer(b)
428 buf.EncodeUint32(uint32(m.Retval))
429 return buf.Bytes(), nil
431 func (m *IPContainerProxyAddDelReply) Unmarshal(b []byte) error {
432 buf := codec.NewBuffer(b)
433 m.Retval = int32(buf.DecodeUint32())
437 // IPContainerProxyDetails defines message 'ip_container_proxy_details'.
438 type IPContainerProxyDetails struct {
439 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
440 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
443 func (m *IPContainerProxyDetails) Reset() { *m = IPContainerProxyDetails{} }
444 func (*IPContainerProxyDetails) GetMessageName() string { return "ip_container_proxy_details" }
445 func (*IPContainerProxyDetails) GetCrcString() string { return "0ee460e8" }
446 func (*IPContainerProxyDetails) GetMessageType() api.MessageType {
447 return api.ReplyMessage
450 func (m *IPContainerProxyDetails) Size() int {
455 size += 4 // m.SwIfIndex
456 size += 1 // m.Prefix.Address.Af
457 size += 1 * 16 // m.Prefix.Address.Un
458 size += 1 // m.Prefix.Len
461 func (m *IPContainerProxyDetails) Marshal(b []byte) ([]byte, error) {
462 var buf *codec.Buffer
464 buf = codec.NewBuffer(make([]byte, m.Size()))
466 buf = codec.NewBuffer(b)
468 buf.EncodeUint32(uint32(m.SwIfIndex))
469 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
470 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 0)
471 buf.EncodeUint8(uint8(m.Prefix.Len))
472 return buf.Bytes(), nil
474 func (m *IPContainerProxyDetails) Unmarshal(b []byte) error {
475 buf := codec.NewBuffer(b)
476 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
477 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
478 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
479 m.Prefix.Len = buf.DecodeUint8()
483 // IPContainerProxyDump defines message 'ip_container_proxy_dump'.
484 type IPContainerProxyDump struct{}
486 func (m *IPContainerProxyDump) Reset() { *m = IPContainerProxyDump{} }
487 func (*IPContainerProxyDump) GetMessageName() string { return "ip_container_proxy_dump" }
488 func (*IPContainerProxyDump) GetCrcString() string { return "51077d14" }
489 func (*IPContainerProxyDump) GetMessageType() api.MessageType {
490 return api.RequestMessage
493 func (m *IPContainerProxyDump) Size() int {
500 func (m *IPContainerProxyDump) Marshal(b []byte) ([]byte, error) {
501 var buf *codec.Buffer
503 buf = codec.NewBuffer(make([]byte, m.Size()))
505 buf = codec.NewBuffer(b)
507 return buf.Bytes(), nil
509 func (m *IPContainerProxyDump) Unmarshal(b []byte) error {
513 // IPDetails defines message 'ip_details'.
514 type IPDetails struct {
515 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
516 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
519 func (m *IPDetails) Reset() { *m = IPDetails{} }
520 func (*IPDetails) GetMessageName() string { return "ip_details" }
521 func (*IPDetails) GetCrcString() string { return "eb152d07" }
522 func (*IPDetails) GetMessageType() api.MessageType {
523 return api.ReplyMessage
526 func (m *IPDetails) Size() int {
531 size += 4 // m.SwIfIndex
532 size += 1 // m.IsIPv6
535 func (m *IPDetails) Marshal(b []byte) ([]byte, error) {
536 var buf *codec.Buffer
538 buf = codec.NewBuffer(make([]byte, m.Size()))
540 buf = codec.NewBuffer(b)
542 buf.EncodeUint32(uint32(m.SwIfIndex))
543 buf.EncodeBool(m.IsIPv6)
544 return buf.Bytes(), nil
546 func (m *IPDetails) Unmarshal(b []byte) error {
547 buf := codec.NewBuffer(b)
548 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
549 m.IsIPv6 = buf.DecodeBool()
553 // IPDump defines message 'ip_dump'.
555 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
558 func (m *IPDump) Reset() { *m = IPDump{} }
559 func (*IPDump) GetMessageName() string { return "ip_dump" }
560 func (*IPDump) GetCrcString() string { return "98d231ca" }
561 func (*IPDump) GetMessageType() api.MessageType {
562 return api.RequestMessage
565 func (m *IPDump) Size() int {
570 size += 1 // m.IsIPv6
573 func (m *IPDump) Marshal(b []byte) ([]byte, error) {
574 var buf *codec.Buffer
576 buf = codec.NewBuffer(make([]byte, m.Size()))
578 buf = codec.NewBuffer(b)
580 buf.EncodeBool(m.IsIPv6)
581 return buf.Bytes(), nil
583 func (m *IPDump) Unmarshal(b []byte) error {
584 buf := codec.NewBuffer(b)
585 m.IsIPv6 = buf.DecodeBool()
589 // IPMrouteAddDel defines message 'ip_mroute_add_del'.
590 type IPMrouteAddDel struct {
591 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
592 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
593 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
596 func (m *IPMrouteAddDel) Reset() { *m = IPMrouteAddDel{} }
597 func (*IPMrouteAddDel) GetMessageName() string { return "ip_mroute_add_del" }
598 func (*IPMrouteAddDel) GetCrcString() string { return "f6627d17" }
599 func (*IPMrouteAddDel) GetMessageType() api.MessageType {
600 return api.RequestMessage
603 func (m *IPMrouteAddDel) Size() int {
609 size += 1 // m.IsMultipath
610 size += 4 // m.Route.TableID
611 size += 4 // m.Route.EntryFlags
612 size += 4 // m.Route.RpfID
613 size += 1 // m.Route.Prefix.Af
614 size += 2 // m.Route.Prefix.GrpAddressLength
615 size += 1 * 16 // m.Route.Prefix.GrpAddress
616 size += 1 * 16 // m.Route.Prefix.SrcAddress
617 size += 1 // m.Route.NPaths
618 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
619 var s2 mfib_types.MfibPath
621 if j2 < len(m.Route.Paths) {
622 s2 = m.Route.Paths[j2]
624 size += 4 // s2.ItfFlags
625 size += 4 // s2.Path.SwIfIndex
626 size += 4 // s2.Path.TableID
627 size += 4 // s2.Path.RpfID
628 size += 1 // s2.Path.Weight
629 size += 1 // s2.Path.Preference
630 size += 4 // s2.Path.Type
631 size += 4 // s2.Path.Flags
632 size += 4 // s2.Path.Proto
633 size += 1 * 16 // s2.Path.Nh.Address
634 size += 4 // s2.Path.Nh.ViaLabel
635 size += 4 // s2.Path.Nh.ObjID
636 size += 4 // s2.Path.Nh.ClassifyTableIndex
637 size += 1 // s2.Path.NLabels
638 for j4 := 0; j4 < 16; j4++ {
639 var s4 fib_types.FibMplsLabel
641 if j4 < len(s2.Path.LabelStack) {
642 s4 = s2.Path.LabelStack[j4]
644 size += 1 // s4.IsUniform
645 size += 4 // s4.Label
652 func (m *IPMrouteAddDel) Marshal(b []byte) ([]byte, error) {
653 var buf *codec.Buffer
655 buf = codec.NewBuffer(make([]byte, m.Size()))
657 buf = codec.NewBuffer(b)
659 buf.EncodeBool(m.IsAdd)
660 buf.EncodeBool(m.IsMultipath)
661 buf.EncodeUint32(uint32(m.Route.TableID))
662 buf.EncodeUint32(uint32(m.Route.EntryFlags))
663 buf.EncodeUint32(uint32(m.Route.RpfID))
664 buf.EncodeUint8(uint8(m.Route.Prefix.Af))
665 buf.EncodeUint16(uint16(m.Route.Prefix.GrpAddressLength))
666 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 0)
667 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 0)
668 buf.EncodeUint8(uint8(len(m.Route.Paths)))
669 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
670 var v1 mfib_types.MfibPath
671 if j1 < len(m.Route.Paths) {
672 v1 = m.Route.Paths[j1]
674 buf.EncodeUint32(uint32(v1.ItfFlags))
675 buf.EncodeUint32(uint32(v1.Path.SwIfIndex))
676 buf.EncodeUint32(uint32(v1.Path.TableID))
677 buf.EncodeUint32(uint32(v1.Path.RpfID))
678 buf.EncodeUint8(uint8(v1.Path.Weight))
679 buf.EncodeUint8(uint8(v1.Path.Preference))
680 buf.EncodeUint32(uint32(v1.Path.Type))
681 buf.EncodeUint32(uint32(v1.Path.Flags))
682 buf.EncodeUint32(uint32(v1.Path.Proto))
683 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 0)
684 buf.EncodeUint32(uint32(v1.Path.Nh.ViaLabel))
685 buf.EncodeUint32(uint32(v1.Path.Nh.ObjID))
686 buf.EncodeUint32(uint32(v1.Path.Nh.ClassifyTableIndex))
687 buf.EncodeUint8(uint8(v1.Path.NLabels))
688 for j3 := 0; j3 < 16; j3++ {
689 var v3 fib_types.FibMplsLabel
690 if j3 < len(v1.Path.LabelStack) {
691 v3 = v1.Path.LabelStack[j3]
693 buf.EncodeUint8(uint8(v3.IsUniform))
694 buf.EncodeUint32(uint32(v3.Label))
695 buf.EncodeUint8(uint8(v3.TTL))
696 buf.EncodeUint8(uint8(v3.Exp))
699 return buf.Bytes(), nil
701 func (m *IPMrouteAddDel) Unmarshal(b []byte) error {
702 buf := codec.NewBuffer(b)
703 m.IsAdd = buf.DecodeBool()
704 m.IsMultipath = buf.DecodeBool()
705 m.Route.TableID = buf.DecodeUint32()
706 m.Route.EntryFlags = buf.DecodeUint32()
707 m.Route.RpfID = buf.DecodeUint32()
708 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
709 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
710 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
711 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
712 m.Route.NPaths = buf.DecodeUint8()
713 m.Route.Paths = make([]mfib_types.MfibPath, int(m.Route.NPaths))
714 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
715 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
716 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
717 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
718 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
719 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
720 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
721 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32())
722 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32())
723 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
724 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
725 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
726 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
727 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
728 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
729 for j3 := 0; j3 < 16; j3++ {
730 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
731 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
732 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
733 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
739 // IPMrouteAddDelReply defines message 'ip_mroute_add_del_reply'.
740 type IPMrouteAddDelReply struct {
741 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
742 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
745 func (m *IPMrouteAddDelReply) Reset() { *m = IPMrouteAddDelReply{} }
746 func (*IPMrouteAddDelReply) GetMessageName() string { return "ip_mroute_add_del_reply" }
747 func (*IPMrouteAddDelReply) GetCrcString() string { return "1992deab" }
748 func (*IPMrouteAddDelReply) GetMessageType() api.MessageType {
749 return api.ReplyMessage
752 func (m *IPMrouteAddDelReply) Size() int {
757 size += 4 // m.Retval
758 size += 4 // m.StatsIndex
761 func (m *IPMrouteAddDelReply) Marshal(b []byte) ([]byte, error) {
762 var buf *codec.Buffer
764 buf = codec.NewBuffer(make([]byte, m.Size()))
766 buf = codec.NewBuffer(b)
768 buf.EncodeUint32(uint32(m.Retval))
769 buf.EncodeUint32(uint32(m.StatsIndex))
770 return buf.Bytes(), nil
772 func (m *IPMrouteAddDelReply) Unmarshal(b []byte) error {
773 buf := codec.NewBuffer(b)
774 m.Retval = int32(buf.DecodeUint32())
775 m.StatsIndex = buf.DecodeUint32()
779 // IPMrouteDetails defines message 'ip_mroute_details'.
780 type IPMrouteDetails struct {
781 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
784 func (m *IPMrouteDetails) Reset() { *m = IPMrouteDetails{} }
785 func (*IPMrouteDetails) GetMessageName() string { return "ip_mroute_details" }
786 func (*IPMrouteDetails) GetCrcString() string { return "c1cb4b44" }
787 func (*IPMrouteDetails) GetMessageType() api.MessageType {
788 return api.ReplyMessage
791 func (m *IPMrouteDetails) Size() int {
796 size += 4 // m.Route.TableID
797 size += 4 // m.Route.EntryFlags
798 size += 4 // m.Route.RpfID
799 size += 1 // m.Route.Prefix.Af
800 size += 2 // m.Route.Prefix.GrpAddressLength
801 size += 1 * 16 // m.Route.Prefix.GrpAddress
802 size += 1 * 16 // m.Route.Prefix.SrcAddress
803 size += 1 // m.Route.NPaths
804 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
805 var s2 mfib_types.MfibPath
807 if j2 < len(m.Route.Paths) {
808 s2 = m.Route.Paths[j2]
810 size += 4 // s2.ItfFlags
811 size += 4 // s2.Path.SwIfIndex
812 size += 4 // s2.Path.TableID
813 size += 4 // s2.Path.RpfID
814 size += 1 // s2.Path.Weight
815 size += 1 // s2.Path.Preference
816 size += 4 // s2.Path.Type
817 size += 4 // s2.Path.Flags
818 size += 4 // s2.Path.Proto
819 size += 1 * 16 // s2.Path.Nh.Address
820 size += 4 // s2.Path.Nh.ViaLabel
821 size += 4 // s2.Path.Nh.ObjID
822 size += 4 // s2.Path.Nh.ClassifyTableIndex
823 size += 1 // s2.Path.NLabels
824 for j4 := 0; j4 < 16; j4++ {
825 var s4 fib_types.FibMplsLabel
827 if j4 < len(s2.Path.LabelStack) {
828 s4 = s2.Path.LabelStack[j4]
830 size += 1 // s4.IsUniform
831 size += 4 // s4.Label
838 func (m *IPMrouteDetails) Marshal(b []byte) ([]byte, error) {
839 var buf *codec.Buffer
841 buf = codec.NewBuffer(make([]byte, m.Size()))
843 buf = codec.NewBuffer(b)
845 buf.EncodeUint32(uint32(m.Route.TableID))
846 buf.EncodeUint32(uint32(m.Route.EntryFlags))
847 buf.EncodeUint32(uint32(m.Route.RpfID))
848 buf.EncodeUint8(uint8(m.Route.Prefix.Af))
849 buf.EncodeUint16(uint16(m.Route.Prefix.GrpAddressLength))
850 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 0)
851 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 0)
852 buf.EncodeUint8(uint8(len(m.Route.Paths)))
853 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
854 var v1 mfib_types.MfibPath
855 if j1 < len(m.Route.Paths) {
856 v1 = m.Route.Paths[j1]
858 buf.EncodeUint32(uint32(v1.ItfFlags))
859 buf.EncodeUint32(uint32(v1.Path.SwIfIndex))
860 buf.EncodeUint32(uint32(v1.Path.TableID))
861 buf.EncodeUint32(uint32(v1.Path.RpfID))
862 buf.EncodeUint8(uint8(v1.Path.Weight))
863 buf.EncodeUint8(uint8(v1.Path.Preference))
864 buf.EncodeUint32(uint32(v1.Path.Type))
865 buf.EncodeUint32(uint32(v1.Path.Flags))
866 buf.EncodeUint32(uint32(v1.Path.Proto))
867 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 0)
868 buf.EncodeUint32(uint32(v1.Path.Nh.ViaLabel))
869 buf.EncodeUint32(uint32(v1.Path.Nh.ObjID))
870 buf.EncodeUint32(uint32(v1.Path.Nh.ClassifyTableIndex))
871 buf.EncodeUint8(uint8(v1.Path.NLabels))
872 for j3 := 0; j3 < 16; j3++ {
873 var v3 fib_types.FibMplsLabel
874 if j3 < len(v1.Path.LabelStack) {
875 v3 = v1.Path.LabelStack[j3]
877 buf.EncodeUint8(uint8(v3.IsUniform))
878 buf.EncodeUint32(uint32(v3.Label))
879 buf.EncodeUint8(uint8(v3.TTL))
880 buf.EncodeUint8(uint8(v3.Exp))
883 return buf.Bytes(), nil
885 func (m *IPMrouteDetails) Unmarshal(b []byte) error {
886 buf := codec.NewBuffer(b)
887 m.Route.TableID = buf.DecodeUint32()
888 m.Route.EntryFlags = buf.DecodeUint32()
889 m.Route.RpfID = buf.DecodeUint32()
890 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
891 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
892 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
893 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
894 m.Route.NPaths = buf.DecodeUint8()
895 m.Route.Paths = make([]mfib_types.MfibPath, int(m.Route.NPaths))
896 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
897 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
898 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
899 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
900 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
901 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
902 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
903 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32())
904 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32())
905 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
906 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
907 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
908 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
909 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
910 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
911 for j3 := 0; j3 < 16; j3++ {
912 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
913 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
914 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
915 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
921 // IPMrouteDump defines message 'ip_mroute_dump'.
922 type IPMrouteDump struct {
923 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
926 func (m *IPMrouteDump) Reset() { *m = IPMrouteDump{} }
927 func (*IPMrouteDump) GetMessageName() string { return "ip_mroute_dump" }
928 func (*IPMrouteDump) GetCrcString() string { return "b9d2e09e" }
929 func (*IPMrouteDump) GetMessageType() api.MessageType {
930 return api.RequestMessage
933 func (m *IPMrouteDump) Size() int {
938 size += 4 // m.Table.TableID
939 size += 1 // m.Table.IsIP6
940 size += 64 // m.Table.Name
943 func (m *IPMrouteDump) Marshal(b []byte) ([]byte, error) {
944 var buf *codec.Buffer
946 buf = codec.NewBuffer(make([]byte, m.Size()))
948 buf = codec.NewBuffer(b)
950 buf.EncodeUint32(uint32(m.Table.TableID))
951 buf.EncodeBool(m.Table.IsIP6)
952 buf.EncodeString(m.Table.Name, 64)
953 return buf.Bytes(), nil
955 func (m *IPMrouteDump) Unmarshal(b []byte) error {
956 buf := codec.NewBuffer(b)
957 m.Table.TableID = buf.DecodeUint32()
958 m.Table.IsIP6 = buf.DecodeBool()
959 m.Table.Name = buf.DecodeString(64)
963 // IPMtableDetails defines message 'ip_mtable_details'.
964 type IPMtableDetails struct {
965 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
968 func (m *IPMtableDetails) Reset() { *m = IPMtableDetails{} }
969 func (*IPMtableDetails) GetMessageName() string { return "ip_mtable_details" }
970 func (*IPMtableDetails) GetCrcString() string { return "b9d2e09e" }
971 func (*IPMtableDetails) GetMessageType() api.MessageType {
972 return api.RequestMessage
975 func (m *IPMtableDetails) Size() int {
980 size += 4 // m.Table.TableID
981 size += 1 // m.Table.IsIP6
982 size += 64 // m.Table.Name
985 func (m *IPMtableDetails) Marshal(b []byte) ([]byte, error) {
986 var buf *codec.Buffer
988 buf = codec.NewBuffer(make([]byte, m.Size()))
990 buf = codec.NewBuffer(b)
992 buf.EncodeUint32(uint32(m.Table.TableID))
993 buf.EncodeBool(m.Table.IsIP6)
994 buf.EncodeString(m.Table.Name, 64)
995 return buf.Bytes(), nil
997 func (m *IPMtableDetails) Unmarshal(b []byte) error {
998 buf := codec.NewBuffer(b)
999 m.Table.TableID = buf.DecodeUint32()
1000 m.Table.IsIP6 = buf.DecodeBool()
1001 m.Table.Name = buf.DecodeString(64)
1005 // IPMtableDump defines message 'ip_mtable_dump'.
1006 type IPMtableDump struct{}
1008 func (m *IPMtableDump) Reset() { *m = IPMtableDump{} }
1009 func (*IPMtableDump) GetMessageName() string { return "ip_mtable_dump" }
1010 func (*IPMtableDump) GetCrcString() string { return "51077d14" }
1011 func (*IPMtableDump) GetMessageType() api.MessageType {
1012 return api.RequestMessage
1015 func (m *IPMtableDump) Size() int {
1022 func (m *IPMtableDump) Marshal(b []byte) ([]byte, error) {
1023 var buf *codec.Buffer
1025 buf = codec.NewBuffer(make([]byte, m.Size()))
1027 buf = codec.NewBuffer(b)
1029 return buf.Bytes(), nil
1031 func (m *IPMtableDump) Unmarshal(b []byte) error {
1035 // IPPuntPolice defines message 'ip_punt_police'.
1036 type IPPuntPolice struct {
1037 PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"`
1038 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1039 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1042 func (m *IPPuntPolice) Reset() { *m = IPPuntPolice{} }
1043 func (*IPPuntPolice) GetMessageName() string { return "ip_punt_police" }
1044 func (*IPPuntPolice) GetCrcString() string { return "db867cea" }
1045 func (*IPPuntPolice) GetMessageType() api.MessageType {
1046 return api.RequestMessage
1049 func (m *IPPuntPolice) Size() int {
1054 size += 4 // m.PolicerIndex
1055 size += 1 // m.IsAdd
1056 size += 1 // m.IsIP6
1059 func (m *IPPuntPolice) Marshal(b []byte) ([]byte, error) {
1060 var buf *codec.Buffer
1062 buf = codec.NewBuffer(make([]byte, m.Size()))
1064 buf = codec.NewBuffer(b)
1066 buf.EncodeUint32(uint32(m.PolicerIndex))
1067 buf.EncodeBool(m.IsAdd)
1068 buf.EncodeBool(m.IsIP6)
1069 return buf.Bytes(), nil
1071 func (m *IPPuntPolice) Unmarshal(b []byte) error {
1072 buf := codec.NewBuffer(b)
1073 m.PolicerIndex = buf.DecodeUint32()
1074 m.IsAdd = buf.DecodeBool()
1075 m.IsIP6 = buf.DecodeBool()
1079 // IPPuntPoliceReply defines message 'ip_punt_police_reply'.
1080 type IPPuntPoliceReply struct {
1081 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1084 func (m *IPPuntPoliceReply) Reset() { *m = IPPuntPoliceReply{} }
1085 func (*IPPuntPoliceReply) GetMessageName() string { return "ip_punt_police_reply" }
1086 func (*IPPuntPoliceReply) GetCrcString() string { return "e8d4e804" }
1087 func (*IPPuntPoliceReply) GetMessageType() api.MessageType {
1088 return api.ReplyMessage
1091 func (m *IPPuntPoliceReply) Size() int {
1096 size += 4 // m.Retval
1099 func (m *IPPuntPoliceReply) Marshal(b []byte) ([]byte, error) {
1100 var buf *codec.Buffer
1102 buf = codec.NewBuffer(make([]byte, m.Size()))
1104 buf = codec.NewBuffer(b)
1106 buf.EncodeUint32(uint32(m.Retval))
1107 return buf.Bytes(), nil
1109 func (m *IPPuntPoliceReply) Unmarshal(b []byte) error {
1110 buf := codec.NewBuffer(b)
1111 m.Retval = int32(buf.DecodeUint32())
1115 // IPPuntRedirect defines message 'ip_punt_redirect'.
1116 type IPPuntRedirect struct {
1117 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
1118 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1121 func (m *IPPuntRedirect) Reset() { *m = IPPuntRedirect{} }
1122 func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" }
1123 func (*IPPuntRedirect) GetCrcString() string { return "a9a5592c" }
1124 func (*IPPuntRedirect) GetMessageType() api.MessageType {
1125 return api.RequestMessage
1128 func (m *IPPuntRedirect) Size() int {
1133 size += 4 // m.Punt.RxSwIfIndex
1134 size += 4 // m.Punt.TxSwIfIndex
1135 size += 1 // m.Punt.Nh.Af
1136 size += 1 * 16 // m.Punt.Nh.Un
1137 size += 1 // m.IsAdd
1140 func (m *IPPuntRedirect) Marshal(b []byte) ([]byte, error) {
1141 var buf *codec.Buffer
1143 buf = codec.NewBuffer(make([]byte, m.Size()))
1145 buf = codec.NewBuffer(b)
1147 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1148 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
1149 buf.EncodeUint8(uint8(m.Punt.Nh.Af))
1150 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 0)
1151 buf.EncodeBool(m.IsAdd)
1152 return buf.Bytes(), nil
1154 func (m *IPPuntRedirect) Unmarshal(b []byte) error {
1155 buf := codec.NewBuffer(b)
1156 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1157 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1158 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1159 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1160 m.IsAdd = buf.DecodeBool()
1164 // IPPuntRedirectDetails defines message 'ip_punt_redirect_details'.
1165 type IPPuntRedirectDetails struct {
1166 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
1169 func (m *IPPuntRedirectDetails) Reset() { *m = IPPuntRedirectDetails{} }
1170 func (*IPPuntRedirectDetails) GetMessageName() string { return "ip_punt_redirect_details" }
1171 func (*IPPuntRedirectDetails) GetCrcString() string { return "3924f5d3" }
1172 func (*IPPuntRedirectDetails) GetMessageType() api.MessageType {
1173 return api.ReplyMessage
1176 func (m *IPPuntRedirectDetails) Size() int {
1181 size += 4 // m.Punt.RxSwIfIndex
1182 size += 4 // m.Punt.TxSwIfIndex
1183 size += 1 // m.Punt.Nh.Af
1184 size += 1 * 16 // m.Punt.Nh.Un
1187 func (m *IPPuntRedirectDetails) Marshal(b []byte) ([]byte, error) {
1188 var buf *codec.Buffer
1190 buf = codec.NewBuffer(make([]byte, m.Size()))
1192 buf = codec.NewBuffer(b)
1194 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1195 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
1196 buf.EncodeUint8(uint8(m.Punt.Nh.Af))
1197 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 0)
1198 return buf.Bytes(), nil
1200 func (m *IPPuntRedirectDetails) Unmarshal(b []byte) error {
1201 buf := codec.NewBuffer(b)
1202 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1203 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1204 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1205 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1209 // IPPuntRedirectDump defines message 'ip_punt_redirect_dump'.
1210 type IPPuntRedirectDump struct {
1211 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1212 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
1215 func (m *IPPuntRedirectDump) Reset() { *m = IPPuntRedirectDump{} }
1216 func (*IPPuntRedirectDump) GetMessageName() string { return "ip_punt_redirect_dump" }
1217 func (*IPPuntRedirectDump) GetCrcString() string { return "2d033de4" }
1218 func (*IPPuntRedirectDump) GetMessageType() api.MessageType {
1219 return api.RequestMessage
1222 func (m *IPPuntRedirectDump) Size() int {
1227 size += 4 // m.SwIfIndex
1228 size += 1 // m.IsIPv6
1231 func (m *IPPuntRedirectDump) Marshal(b []byte) ([]byte, error) {
1232 var buf *codec.Buffer
1234 buf = codec.NewBuffer(make([]byte, m.Size()))
1236 buf = codec.NewBuffer(b)
1238 buf.EncodeUint32(uint32(m.SwIfIndex))
1239 buf.EncodeBool(m.IsIPv6)
1240 return buf.Bytes(), nil
1242 func (m *IPPuntRedirectDump) Unmarshal(b []byte) error {
1243 buf := codec.NewBuffer(b)
1244 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1245 m.IsIPv6 = buf.DecodeBool()
1249 // IPPuntRedirectReply defines message 'ip_punt_redirect_reply'.
1250 type IPPuntRedirectReply struct {
1251 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1254 func (m *IPPuntRedirectReply) Reset() { *m = IPPuntRedirectReply{} }
1255 func (*IPPuntRedirectReply) GetMessageName() string { return "ip_punt_redirect_reply" }
1256 func (*IPPuntRedirectReply) GetCrcString() string { return "e8d4e804" }
1257 func (*IPPuntRedirectReply) GetMessageType() api.MessageType {
1258 return api.ReplyMessage
1261 func (m *IPPuntRedirectReply) Size() int {
1266 size += 4 // m.Retval
1269 func (m *IPPuntRedirectReply) Marshal(b []byte) ([]byte, error) {
1270 var buf *codec.Buffer
1272 buf = codec.NewBuffer(make([]byte, m.Size()))
1274 buf = codec.NewBuffer(b)
1276 buf.EncodeUint32(uint32(m.Retval))
1277 return buf.Bytes(), nil
1279 func (m *IPPuntRedirectReply) Unmarshal(b []byte) error {
1280 buf := codec.NewBuffer(b)
1281 m.Retval = int32(buf.DecodeUint32())
1285 // IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'.
1286 type IPReassemblyEnableDisable struct {
1287 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1288 EnableIP4 bool `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"`
1289 EnableIP6 bool `binapi:"bool,name=enable_ip6" json:"enable_ip6,omitempty"`
1290 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1293 func (m *IPReassemblyEnableDisable) Reset() { *m = IPReassemblyEnableDisable{} }
1294 func (*IPReassemblyEnableDisable) GetMessageName() string { return "ip_reassembly_enable_disable" }
1295 func (*IPReassemblyEnableDisable) GetCrcString() string { return "885c85a6" }
1296 func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType {
1297 return api.RequestMessage
1300 func (m *IPReassemblyEnableDisable) Size() int {
1305 size += 4 // m.SwIfIndex
1306 size += 1 // m.EnableIP4
1307 size += 1 // m.EnableIP6
1311 func (m *IPReassemblyEnableDisable) Marshal(b []byte) ([]byte, error) {
1312 var buf *codec.Buffer
1314 buf = codec.NewBuffer(make([]byte, m.Size()))
1316 buf = codec.NewBuffer(b)
1318 buf.EncodeUint32(uint32(m.SwIfIndex))
1319 buf.EncodeBool(m.EnableIP4)
1320 buf.EncodeBool(m.EnableIP6)
1321 buf.EncodeUint32(uint32(m.Type))
1322 return buf.Bytes(), nil
1324 func (m *IPReassemblyEnableDisable) Unmarshal(b []byte) error {
1325 buf := codec.NewBuffer(b)
1326 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1327 m.EnableIP4 = buf.DecodeBool()
1328 m.EnableIP6 = buf.DecodeBool()
1329 m.Type = IPReassType(buf.DecodeUint32())
1333 // IPReassemblyEnableDisableReply defines message 'ip_reassembly_enable_disable_reply'.
1334 type IPReassemblyEnableDisableReply struct {
1335 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1338 func (m *IPReassemblyEnableDisableReply) Reset() { *m = IPReassemblyEnableDisableReply{} }
1339 func (*IPReassemblyEnableDisableReply) GetMessageName() string {
1340 return "ip_reassembly_enable_disable_reply"
1342 func (*IPReassemblyEnableDisableReply) GetCrcString() string { return "e8d4e804" }
1343 func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType {
1344 return api.ReplyMessage
1347 func (m *IPReassemblyEnableDisableReply) Size() int {
1352 size += 4 // m.Retval
1355 func (m *IPReassemblyEnableDisableReply) Marshal(b []byte) ([]byte, error) {
1356 var buf *codec.Buffer
1358 buf = codec.NewBuffer(make([]byte, m.Size()))
1360 buf = codec.NewBuffer(b)
1362 buf.EncodeUint32(uint32(m.Retval))
1363 return buf.Bytes(), nil
1365 func (m *IPReassemblyEnableDisableReply) Unmarshal(b []byte) error {
1366 buf := codec.NewBuffer(b)
1367 m.Retval = int32(buf.DecodeUint32())
1371 // IPReassemblyGet defines message 'ip_reassembly_get'.
1372 type IPReassemblyGet struct {
1373 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1374 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1377 func (m *IPReassemblyGet) Reset() { *m = IPReassemblyGet{} }
1378 func (*IPReassemblyGet) GetMessageName() string { return "ip_reassembly_get" }
1379 func (*IPReassemblyGet) GetCrcString() string { return "ea13ff63" }
1380 func (*IPReassemblyGet) GetMessageType() api.MessageType {
1381 return api.RequestMessage
1384 func (m *IPReassemblyGet) Size() int {
1389 size += 1 // m.IsIP6
1393 func (m *IPReassemblyGet) Marshal(b []byte) ([]byte, error) {
1394 var buf *codec.Buffer
1396 buf = codec.NewBuffer(make([]byte, m.Size()))
1398 buf = codec.NewBuffer(b)
1400 buf.EncodeBool(m.IsIP6)
1401 buf.EncodeUint32(uint32(m.Type))
1402 return buf.Bytes(), nil
1404 func (m *IPReassemblyGet) Unmarshal(b []byte) error {
1405 buf := codec.NewBuffer(b)
1406 m.IsIP6 = buf.DecodeBool()
1407 m.Type = IPReassType(buf.DecodeUint32())
1411 // IPReassemblyGetReply defines message 'ip_reassembly_get_reply'.
1412 type IPReassemblyGetReply struct {
1413 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1414 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
1415 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
1416 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
1417 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
1418 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1421 func (m *IPReassemblyGetReply) Reset() { *m = IPReassemblyGetReply{} }
1422 func (*IPReassemblyGetReply) GetMessageName() string { return "ip_reassembly_get_reply" }
1423 func (*IPReassemblyGetReply) GetCrcString() string { return "d5eb8d34" }
1424 func (*IPReassemblyGetReply) GetMessageType() api.MessageType {
1425 return api.ReplyMessage
1428 func (m *IPReassemblyGetReply) Size() int {
1433 size += 4 // m.Retval
1434 size += 4 // m.TimeoutMs
1435 size += 4 // m.MaxReassemblies
1436 size += 4 // m.MaxReassemblyLength
1437 size += 4 // m.ExpireWalkIntervalMs
1438 size += 1 // m.IsIP6
1441 func (m *IPReassemblyGetReply) Marshal(b []byte) ([]byte, error) {
1442 var buf *codec.Buffer
1444 buf = codec.NewBuffer(make([]byte, m.Size()))
1446 buf = codec.NewBuffer(b)
1448 buf.EncodeUint32(uint32(m.Retval))
1449 buf.EncodeUint32(uint32(m.TimeoutMs))
1450 buf.EncodeUint32(uint32(m.MaxReassemblies))
1451 buf.EncodeUint32(uint32(m.MaxReassemblyLength))
1452 buf.EncodeUint32(uint32(m.ExpireWalkIntervalMs))
1453 buf.EncodeBool(m.IsIP6)
1454 return buf.Bytes(), nil
1456 func (m *IPReassemblyGetReply) Unmarshal(b []byte) error {
1457 buf := codec.NewBuffer(b)
1458 m.Retval = int32(buf.DecodeUint32())
1459 m.TimeoutMs = buf.DecodeUint32()
1460 m.MaxReassemblies = buf.DecodeUint32()
1461 m.MaxReassemblyLength = buf.DecodeUint32()
1462 m.ExpireWalkIntervalMs = buf.DecodeUint32()
1463 m.IsIP6 = buf.DecodeBool()
1467 // IPReassemblySet defines message 'ip_reassembly_set'.
1468 type IPReassemblySet struct {
1469 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
1470 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
1471 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
1472 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
1473 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1474 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1477 func (m *IPReassemblySet) Reset() { *m = IPReassemblySet{} }
1478 func (*IPReassemblySet) GetMessageName() string { return "ip_reassembly_set" }
1479 func (*IPReassemblySet) GetCrcString() string { return "16467d25" }
1480 func (*IPReassemblySet) GetMessageType() api.MessageType {
1481 return api.RequestMessage
1484 func (m *IPReassemblySet) Size() int {
1489 size += 4 // m.TimeoutMs
1490 size += 4 // m.MaxReassemblies
1491 size += 4 // m.MaxReassemblyLength
1492 size += 4 // m.ExpireWalkIntervalMs
1493 size += 1 // m.IsIP6
1497 func (m *IPReassemblySet) Marshal(b []byte) ([]byte, error) {
1498 var buf *codec.Buffer
1500 buf = codec.NewBuffer(make([]byte, m.Size()))
1502 buf = codec.NewBuffer(b)
1504 buf.EncodeUint32(uint32(m.TimeoutMs))
1505 buf.EncodeUint32(uint32(m.MaxReassemblies))
1506 buf.EncodeUint32(uint32(m.MaxReassemblyLength))
1507 buf.EncodeUint32(uint32(m.ExpireWalkIntervalMs))
1508 buf.EncodeBool(m.IsIP6)
1509 buf.EncodeUint32(uint32(m.Type))
1510 return buf.Bytes(), nil
1512 func (m *IPReassemblySet) Unmarshal(b []byte) error {
1513 buf := codec.NewBuffer(b)
1514 m.TimeoutMs = buf.DecodeUint32()
1515 m.MaxReassemblies = buf.DecodeUint32()
1516 m.MaxReassemblyLength = buf.DecodeUint32()
1517 m.ExpireWalkIntervalMs = buf.DecodeUint32()
1518 m.IsIP6 = buf.DecodeBool()
1519 m.Type = IPReassType(buf.DecodeUint32())
1523 // IPReassemblySetReply defines message 'ip_reassembly_set_reply'.
1524 type IPReassemblySetReply struct {
1525 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1528 func (m *IPReassemblySetReply) Reset() { *m = IPReassemblySetReply{} }
1529 func (*IPReassemblySetReply) GetMessageName() string { return "ip_reassembly_set_reply" }
1530 func (*IPReassemblySetReply) GetCrcString() string { return "e8d4e804" }
1531 func (*IPReassemblySetReply) GetMessageType() api.MessageType {
1532 return api.ReplyMessage
1535 func (m *IPReassemblySetReply) Size() int {
1540 size += 4 // m.Retval
1543 func (m *IPReassemblySetReply) Marshal(b []byte) ([]byte, error) {
1544 var buf *codec.Buffer
1546 buf = codec.NewBuffer(make([]byte, m.Size()))
1548 buf = codec.NewBuffer(b)
1550 buf.EncodeUint32(uint32(m.Retval))
1551 return buf.Bytes(), nil
1553 func (m *IPReassemblySetReply) Unmarshal(b []byte) error {
1554 buf := codec.NewBuffer(b)
1555 m.Retval = int32(buf.DecodeUint32())
1559 // IPRouteAddDel defines message 'ip_route_add_del'.
1560 type IPRouteAddDel struct {
1561 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1562 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
1563 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
1566 func (m *IPRouteAddDel) Reset() { *m = IPRouteAddDel{} }
1567 func (*IPRouteAddDel) GetMessageName() string { return "ip_route_add_del" }
1568 func (*IPRouteAddDel) GetCrcString() string { return "c1ff832d" }
1569 func (*IPRouteAddDel) GetMessageType() api.MessageType {
1570 return api.RequestMessage
1573 func (m *IPRouteAddDel) Size() int {
1578 size += 1 // m.IsAdd
1579 size += 1 // m.IsMultipath
1580 size += 4 // m.Route.TableID
1581 size += 4 // m.Route.StatsIndex
1582 size += 1 // m.Route.Prefix.Address.Af
1583 size += 1 * 16 // m.Route.Prefix.Address.Un
1584 size += 1 // m.Route.Prefix.Len
1585 size += 1 // m.Route.NPaths
1586 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
1587 var s2 fib_types.FibPath
1589 if j2 < len(m.Route.Paths) {
1590 s2 = m.Route.Paths[j2]
1592 size += 4 // s2.SwIfIndex
1593 size += 4 // s2.TableID
1594 size += 4 // s2.RpfID
1595 size += 1 // s2.Weight
1596 size += 1 // s2.Preference
1597 size += 4 // s2.Type
1598 size += 4 // s2.Flags
1599 size += 4 // s2.Proto
1600 size += 1 * 16 // s2.Nh.Address
1601 size += 4 // s2.Nh.ViaLabel
1602 size += 4 // s2.Nh.ObjID
1603 size += 4 // s2.Nh.ClassifyTableIndex
1604 size += 1 // s2.NLabels
1605 for j3 := 0; j3 < 16; j3++ {
1606 var s3 fib_types.FibMplsLabel
1608 if j3 < len(s2.LabelStack) {
1609 s3 = s2.LabelStack[j3]
1611 size += 1 // s3.IsUniform
1612 size += 4 // s3.Label
1619 func (m *IPRouteAddDel) Marshal(b []byte) ([]byte, error) {
1620 var buf *codec.Buffer
1622 buf = codec.NewBuffer(make([]byte, m.Size()))
1624 buf = codec.NewBuffer(b)
1626 buf.EncodeBool(m.IsAdd)
1627 buf.EncodeBool(m.IsMultipath)
1628 buf.EncodeUint32(uint32(m.Route.TableID))
1629 buf.EncodeUint32(uint32(m.Route.StatsIndex))
1630 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
1631 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 0)
1632 buf.EncodeUint8(uint8(m.Route.Prefix.Len))
1633 buf.EncodeUint8(uint8(len(m.Route.Paths)))
1634 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1635 var v1 fib_types.FibPath
1636 if j1 < len(m.Route.Paths) {
1637 v1 = m.Route.Paths[j1]
1639 buf.EncodeUint32(uint32(v1.SwIfIndex))
1640 buf.EncodeUint32(uint32(v1.TableID))
1641 buf.EncodeUint32(uint32(v1.RpfID))
1642 buf.EncodeUint8(uint8(v1.Weight))
1643 buf.EncodeUint8(uint8(v1.Preference))
1644 buf.EncodeUint32(uint32(v1.Type))
1645 buf.EncodeUint32(uint32(v1.Flags))
1646 buf.EncodeUint32(uint32(v1.Proto))
1647 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
1648 buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
1649 buf.EncodeUint32(uint32(v1.Nh.ObjID))
1650 buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
1651 buf.EncodeUint8(uint8(v1.NLabels))
1652 for j2 := 0; j2 < 16; j2++ {
1653 var v2 fib_types.FibMplsLabel
1654 if j2 < len(v1.LabelStack) {
1655 v2 = v1.LabelStack[j2]
1657 buf.EncodeUint8(uint8(v2.IsUniform))
1658 buf.EncodeUint32(uint32(v2.Label))
1659 buf.EncodeUint8(uint8(v2.TTL))
1660 buf.EncodeUint8(uint8(v2.Exp))
1663 return buf.Bytes(), nil
1665 func (m *IPRouteAddDel) Unmarshal(b []byte) error {
1666 buf := codec.NewBuffer(b)
1667 m.IsAdd = buf.DecodeBool()
1668 m.IsMultipath = buf.DecodeBool()
1669 m.Route.TableID = buf.DecodeUint32()
1670 m.Route.StatsIndex = buf.DecodeUint32()
1671 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1672 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1673 m.Route.Prefix.Len = buf.DecodeUint8()
1674 m.Route.NPaths = buf.DecodeUint8()
1675 m.Route.Paths = make([]fib_types.FibPath, int(m.Route.NPaths))
1676 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1677 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
1678 m.Route.Paths[j1].TableID = buf.DecodeUint32()
1679 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
1680 m.Route.Paths[j1].Weight = buf.DecodeUint8()
1681 m.Route.Paths[j1].Preference = buf.DecodeUint8()
1682 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
1683 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1684 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1685 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1686 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
1687 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
1688 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
1689 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
1690 for j2 := 0; j2 < 16; j2++ {
1691 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
1692 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
1693 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
1694 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1700 // IPRouteAddDelReply defines message 'ip_route_add_del_reply'.
1701 type IPRouteAddDelReply struct {
1702 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1703 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
1706 func (m *IPRouteAddDelReply) Reset() { *m = IPRouteAddDelReply{} }
1707 func (*IPRouteAddDelReply) GetMessageName() string { return "ip_route_add_del_reply" }
1708 func (*IPRouteAddDelReply) GetCrcString() string { return "1992deab" }
1709 func (*IPRouteAddDelReply) GetMessageType() api.MessageType {
1710 return api.ReplyMessage
1713 func (m *IPRouteAddDelReply) Size() int {
1718 size += 4 // m.Retval
1719 size += 4 // m.StatsIndex
1722 func (m *IPRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
1723 var buf *codec.Buffer
1725 buf = codec.NewBuffer(make([]byte, m.Size()))
1727 buf = codec.NewBuffer(b)
1729 buf.EncodeUint32(uint32(m.Retval))
1730 buf.EncodeUint32(uint32(m.StatsIndex))
1731 return buf.Bytes(), nil
1733 func (m *IPRouteAddDelReply) Unmarshal(b []byte) error {
1734 buf := codec.NewBuffer(b)
1735 m.Retval = int32(buf.DecodeUint32())
1736 m.StatsIndex = buf.DecodeUint32()
1740 // IPRouteDetails defines message 'ip_route_details'.
1741 type IPRouteDetails struct {
1742 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
1745 func (m *IPRouteDetails) Reset() { *m = IPRouteDetails{} }
1746 func (*IPRouteDetails) GetMessageName() string { return "ip_route_details" }
1747 func (*IPRouteDetails) GetCrcString() string { return "d1ffaae1" }
1748 func (*IPRouteDetails) GetMessageType() api.MessageType {
1749 return api.ReplyMessage
1752 func (m *IPRouteDetails) Size() int {
1757 size += 4 // m.Route.TableID
1758 size += 4 // m.Route.StatsIndex
1759 size += 1 // m.Route.Prefix.Address.Af
1760 size += 1 * 16 // m.Route.Prefix.Address.Un
1761 size += 1 // m.Route.Prefix.Len
1762 size += 1 // m.Route.NPaths
1763 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
1764 var s2 fib_types.FibPath
1766 if j2 < len(m.Route.Paths) {
1767 s2 = m.Route.Paths[j2]
1769 size += 4 // s2.SwIfIndex
1770 size += 4 // s2.TableID
1771 size += 4 // s2.RpfID
1772 size += 1 // s2.Weight
1773 size += 1 // s2.Preference
1774 size += 4 // s2.Type
1775 size += 4 // s2.Flags
1776 size += 4 // s2.Proto
1777 size += 1 * 16 // s2.Nh.Address
1778 size += 4 // s2.Nh.ViaLabel
1779 size += 4 // s2.Nh.ObjID
1780 size += 4 // s2.Nh.ClassifyTableIndex
1781 size += 1 // s2.NLabels
1782 for j3 := 0; j3 < 16; j3++ {
1783 var s3 fib_types.FibMplsLabel
1785 if j3 < len(s2.LabelStack) {
1786 s3 = s2.LabelStack[j3]
1788 size += 1 // s3.IsUniform
1789 size += 4 // s3.Label
1796 func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) {
1797 var buf *codec.Buffer
1799 buf = codec.NewBuffer(make([]byte, m.Size()))
1801 buf = codec.NewBuffer(b)
1803 buf.EncodeUint32(uint32(m.Route.TableID))
1804 buf.EncodeUint32(uint32(m.Route.StatsIndex))
1805 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
1806 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 0)
1807 buf.EncodeUint8(uint8(m.Route.Prefix.Len))
1808 buf.EncodeUint8(uint8(len(m.Route.Paths)))
1809 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1810 var v1 fib_types.FibPath
1811 if j1 < len(m.Route.Paths) {
1812 v1 = m.Route.Paths[j1]
1814 buf.EncodeUint32(uint32(v1.SwIfIndex))
1815 buf.EncodeUint32(uint32(v1.TableID))
1816 buf.EncodeUint32(uint32(v1.RpfID))
1817 buf.EncodeUint8(uint8(v1.Weight))
1818 buf.EncodeUint8(uint8(v1.Preference))
1819 buf.EncodeUint32(uint32(v1.Type))
1820 buf.EncodeUint32(uint32(v1.Flags))
1821 buf.EncodeUint32(uint32(v1.Proto))
1822 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
1823 buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
1824 buf.EncodeUint32(uint32(v1.Nh.ObjID))
1825 buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
1826 buf.EncodeUint8(uint8(v1.NLabels))
1827 for j2 := 0; j2 < 16; j2++ {
1828 var v2 fib_types.FibMplsLabel
1829 if j2 < len(v1.LabelStack) {
1830 v2 = v1.LabelStack[j2]
1832 buf.EncodeUint8(uint8(v2.IsUniform))
1833 buf.EncodeUint32(uint32(v2.Label))
1834 buf.EncodeUint8(uint8(v2.TTL))
1835 buf.EncodeUint8(uint8(v2.Exp))
1838 return buf.Bytes(), nil
1840 func (m *IPRouteDetails) Unmarshal(b []byte) error {
1841 buf := codec.NewBuffer(b)
1842 m.Route.TableID = buf.DecodeUint32()
1843 m.Route.StatsIndex = buf.DecodeUint32()
1844 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1845 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1846 m.Route.Prefix.Len = buf.DecodeUint8()
1847 m.Route.NPaths = buf.DecodeUint8()
1848 m.Route.Paths = make([]fib_types.FibPath, int(m.Route.NPaths))
1849 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1850 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
1851 m.Route.Paths[j1].TableID = buf.DecodeUint32()
1852 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
1853 m.Route.Paths[j1].Weight = buf.DecodeUint8()
1854 m.Route.Paths[j1].Preference = buf.DecodeUint8()
1855 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
1856 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1857 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1858 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1859 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
1860 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
1861 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
1862 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
1863 for j2 := 0; j2 < 16; j2++ {
1864 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
1865 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
1866 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
1867 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1873 // IPRouteDump defines message 'ip_route_dump'.
1874 type IPRouteDump struct {
1875 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
1878 func (m *IPRouteDump) Reset() { *m = IPRouteDump{} }
1879 func (*IPRouteDump) GetMessageName() string { return "ip_route_dump" }
1880 func (*IPRouteDump) GetCrcString() string { return "b9d2e09e" }
1881 func (*IPRouteDump) GetMessageType() api.MessageType {
1882 return api.RequestMessage
1885 func (m *IPRouteDump) Size() int {
1890 size += 4 // m.Table.TableID
1891 size += 1 // m.Table.IsIP6
1892 size += 64 // m.Table.Name
1895 func (m *IPRouteDump) Marshal(b []byte) ([]byte, error) {
1896 var buf *codec.Buffer
1898 buf = codec.NewBuffer(make([]byte, m.Size()))
1900 buf = codec.NewBuffer(b)
1902 buf.EncodeUint32(uint32(m.Table.TableID))
1903 buf.EncodeBool(m.Table.IsIP6)
1904 buf.EncodeString(m.Table.Name, 64)
1905 return buf.Bytes(), nil
1907 func (m *IPRouteDump) Unmarshal(b []byte) error {
1908 buf := codec.NewBuffer(b)
1909 m.Table.TableID = buf.DecodeUint32()
1910 m.Table.IsIP6 = buf.DecodeBool()
1911 m.Table.Name = buf.DecodeString(64)
1915 // IPRouteLookup defines message 'ip_route_lookup'.
1916 type IPRouteLookup struct {
1917 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
1918 Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"`
1919 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
1922 func (m *IPRouteLookup) Reset() { *m = IPRouteLookup{} }
1923 func (*IPRouteLookup) GetMessageName() string { return "ip_route_lookup" }
1924 func (*IPRouteLookup) GetCrcString() string { return "e2986185" }
1925 func (*IPRouteLookup) GetMessageType() api.MessageType {
1926 return api.RequestMessage
1929 func (m *IPRouteLookup) Size() int {
1934 size += 4 // m.TableID
1935 size += 1 // m.Exact
1936 size += 1 // m.Prefix.Address.Af
1937 size += 1 * 16 // m.Prefix.Address.Un
1938 size += 1 // m.Prefix.Len
1941 func (m *IPRouteLookup) Marshal(b []byte) ([]byte, error) {
1942 var buf *codec.Buffer
1944 buf = codec.NewBuffer(make([]byte, m.Size()))
1946 buf = codec.NewBuffer(b)
1948 buf.EncodeUint32(uint32(m.TableID))
1949 buf.EncodeUint8(uint8(m.Exact))
1950 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
1951 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 0)
1952 buf.EncodeUint8(uint8(m.Prefix.Len))
1953 return buf.Bytes(), nil
1955 func (m *IPRouteLookup) Unmarshal(b []byte) error {
1956 buf := codec.NewBuffer(b)
1957 m.TableID = buf.DecodeUint32()
1958 m.Exact = buf.DecodeUint8()
1959 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1960 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1961 m.Prefix.Len = buf.DecodeUint8()
1965 // IPRouteLookupReply defines message 'ip_route_lookup_reply'.
1966 type IPRouteLookupReply struct {
1967 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1968 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
1971 func (m *IPRouteLookupReply) Reset() { *m = IPRouteLookupReply{} }
1972 func (*IPRouteLookupReply) GetMessageName() string { return "ip_route_lookup_reply" }
1973 func (*IPRouteLookupReply) GetCrcString() string { return "ae99de8e" }
1974 func (*IPRouteLookupReply) GetMessageType() api.MessageType {
1975 return api.ReplyMessage
1978 func (m *IPRouteLookupReply) Size() int {
1983 size += 4 // m.Retval
1984 size += 4 // m.Route.TableID
1985 size += 4 // m.Route.StatsIndex
1986 size += 1 // m.Route.Prefix.Address.Af
1987 size += 1 * 16 // m.Route.Prefix.Address.Un
1988 size += 1 // m.Route.Prefix.Len
1989 size += 1 // m.Route.NPaths
1990 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
1991 var s2 fib_types.FibPath
1993 if j2 < len(m.Route.Paths) {
1994 s2 = m.Route.Paths[j2]
1996 size += 4 // s2.SwIfIndex
1997 size += 4 // s2.TableID
1998 size += 4 // s2.RpfID
1999 size += 1 // s2.Weight
2000 size += 1 // s2.Preference
2001 size += 4 // s2.Type
2002 size += 4 // s2.Flags
2003 size += 4 // s2.Proto
2004 size += 1 * 16 // s2.Nh.Address
2005 size += 4 // s2.Nh.ViaLabel
2006 size += 4 // s2.Nh.ObjID
2007 size += 4 // s2.Nh.ClassifyTableIndex
2008 size += 1 // s2.NLabels
2009 for j3 := 0; j3 < 16; j3++ {
2010 var s3 fib_types.FibMplsLabel
2012 if j3 < len(s2.LabelStack) {
2013 s3 = s2.LabelStack[j3]
2015 size += 1 // s3.IsUniform
2016 size += 4 // s3.Label
2023 func (m *IPRouteLookupReply) Marshal(b []byte) ([]byte, error) {
2024 var buf *codec.Buffer
2026 buf = codec.NewBuffer(make([]byte, m.Size()))
2028 buf = codec.NewBuffer(b)
2030 buf.EncodeUint32(uint32(m.Retval))
2031 buf.EncodeUint32(uint32(m.Route.TableID))
2032 buf.EncodeUint32(uint32(m.Route.StatsIndex))
2033 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2034 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 0)
2035 buf.EncodeUint8(uint8(m.Route.Prefix.Len))
2036 buf.EncodeUint8(uint8(len(m.Route.Paths)))
2037 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2038 var v1 fib_types.FibPath
2039 if j1 < len(m.Route.Paths) {
2040 v1 = m.Route.Paths[j1]
2042 buf.EncodeUint32(uint32(v1.SwIfIndex))
2043 buf.EncodeUint32(uint32(v1.TableID))
2044 buf.EncodeUint32(uint32(v1.RpfID))
2045 buf.EncodeUint8(uint8(v1.Weight))
2046 buf.EncodeUint8(uint8(v1.Preference))
2047 buf.EncodeUint32(uint32(v1.Type))
2048 buf.EncodeUint32(uint32(v1.Flags))
2049 buf.EncodeUint32(uint32(v1.Proto))
2050 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 0)
2051 buf.EncodeUint32(uint32(v1.Nh.ViaLabel))
2052 buf.EncodeUint32(uint32(v1.Nh.ObjID))
2053 buf.EncodeUint32(uint32(v1.Nh.ClassifyTableIndex))
2054 buf.EncodeUint8(uint8(v1.NLabels))
2055 for j2 := 0; j2 < 16; j2++ {
2056 var v2 fib_types.FibMplsLabel
2057 if j2 < len(v1.LabelStack) {
2058 v2 = v1.LabelStack[j2]
2060 buf.EncodeUint8(uint8(v2.IsUniform))
2061 buf.EncodeUint32(uint32(v2.Label))
2062 buf.EncodeUint8(uint8(v2.TTL))
2063 buf.EncodeUint8(uint8(v2.Exp))
2066 return buf.Bytes(), nil
2068 func (m *IPRouteLookupReply) Unmarshal(b []byte) error {
2069 buf := codec.NewBuffer(b)
2070 m.Retval = int32(buf.DecodeUint32())
2071 m.Route.TableID = buf.DecodeUint32()
2072 m.Route.StatsIndex = buf.DecodeUint32()
2073 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2074 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2075 m.Route.Prefix.Len = buf.DecodeUint8()
2076 m.Route.NPaths = buf.DecodeUint8()
2077 m.Route.Paths = make([]fib_types.FibPath, int(m.Route.NPaths))
2078 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2079 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2080 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2081 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2082 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2083 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2084 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2085 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2086 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2087 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2088 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2089 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2090 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2091 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2092 for j2 := 0; j2 < 16; j2++ {
2093 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2094 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2095 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2096 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2102 // IPSourceAndPortRangeCheckAddDel defines message 'ip_source_and_port_range_check_add_del'.
2103 type IPSourceAndPortRangeCheckAddDel struct {
2104 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2105 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
2106 NumberOfRanges uint8 `binapi:"u8,name=number_of_ranges" json:"number_of_ranges,omitempty"`
2107 LowPorts []uint16 `binapi:"u16[32],name=low_ports" json:"low_ports,omitempty"`
2108 HighPorts []uint16 `binapi:"u16[32],name=high_ports" json:"high_ports,omitempty"`
2109 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2112 func (m *IPSourceAndPortRangeCheckAddDel) Reset() { *m = IPSourceAndPortRangeCheckAddDel{} }
2113 func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string {
2114 return "ip_source_and_port_range_check_add_del"
2116 func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "8bfc76f2" }
2117 func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType {
2118 return api.RequestMessage
2121 func (m *IPSourceAndPortRangeCheckAddDel) Size() int {
2126 size += 1 // m.IsAdd
2127 size += 1 // m.Prefix.Address.Af
2128 size += 1 * 16 // m.Prefix.Address.Un
2129 size += 1 // m.Prefix.Len
2130 size += 1 // m.NumberOfRanges
2131 size += 2 * 32 // m.LowPorts
2132 size += 2 * 32 // m.HighPorts
2133 size += 4 // m.VrfID
2136 func (m *IPSourceAndPortRangeCheckAddDel) Marshal(b []byte) ([]byte, error) {
2137 var buf *codec.Buffer
2139 buf = codec.NewBuffer(make([]byte, m.Size()))
2141 buf = codec.NewBuffer(b)
2143 buf.EncodeBool(m.IsAdd)
2144 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
2145 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 0)
2146 buf.EncodeUint8(uint8(m.Prefix.Len))
2147 buf.EncodeUint8(uint8(m.NumberOfRanges))
2148 for i := 0; i < 32; i++ {
2150 if i < len(m.LowPorts) {
2151 x = uint16(m.LowPorts[i])
2153 buf.EncodeUint16(uint16(x))
2155 for i := 0; i < 32; i++ {
2157 if i < len(m.HighPorts) {
2158 x = uint16(m.HighPorts[i])
2160 buf.EncodeUint16(uint16(x))
2162 buf.EncodeUint32(uint32(m.VrfID))
2163 return buf.Bytes(), nil
2165 func (m *IPSourceAndPortRangeCheckAddDel) Unmarshal(b []byte) error {
2166 buf := codec.NewBuffer(b)
2167 m.IsAdd = buf.DecodeBool()
2168 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2169 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2170 m.Prefix.Len = buf.DecodeUint8()
2171 m.NumberOfRanges = buf.DecodeUint8()
2172 m.LowPorts = make([]uint16, 32)
2173 for i := 0; i < len(m.LowPorts); i++ {
2174 m.LowPorts[i] = buf.DecodeUint16()
2176 m.HighPorts = make([]uint16, 32)
2177 for i := 0; i < len(m.HighPorts); i++ {
2178 m.HighPorts[i] = buf.DecodeUint16()
2180 m.VrfID = buf.DecodeUint32()
2184 // IPSourceAndPortRangeCheckAddDelReply defines message 'ip_source_and_port_range_check_add_del_reply'.
2185 type IPSourceAndPortRangeCheckAddDelReply struct {
2186 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2189 func (m *IPSourceAndPortRangeCheckAddDelReply) Reset() { *m = IPSourceAndPortRangeCheckAddDelReply{} }
2190 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string {
2191 return "ip_source_and_port_range_check_add_del_reply"
2193 func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { return "e8d4e804" }
2194 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType {
2195 return api.ReplyMessage
2198 func (m *IPSourceAndPortRangeCheckAddDelReply) Size() int {
2203 size += 4 // m.Retval
2206 func (m *IPSourceAndPortRangeCheckAddDelReply) Marshal(b []byte) ([]byte, error) {
2207 var buf *codec.Buffer
2209 buf = codec.NewBuffer(make([]byte, m.Size()))
2211 buf = codec.NewBuffer(b)
2213 buf.EncodeUint32(uint32(m.Retval))
2214 return buf.Bytes(), nil
2216 func (m *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(b []byte) error {
2217 buf := codec.NewBuffer(b)
2218 m.Retval = int32(buf.DecodeUint32())
2222 // IPSourceAndPortRangeCheckInterfaceAddDel defines message 'ip_source_and_port_range_check_interface_add_del'.
2223 type IPSourceAndPortRangeCheckInterfaceAddDel struct {
2224 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2225 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2226 TCPInVrfID uint32 `binapi:"u32,name=tcp_in_vrf_id" json:"tcp_in_vrf_id,omitempty"`
2227 TCPOutVrfID uint32 `binapi:"u32,name=tcp_out_vrf_id" json:"tcp_out_vrf_id,omitempty"`
2228 UDPInVrfID uint32 `binapi:"u32,name=udp_in_vrf_id" json:"udp_in_vrf_id,omitempty"`
2229 UDPOutVrfID uint32 `binapi:"u32,name=udp_out_vrf_id" json:"udp_out_vrf_id,omitempty"`
2232 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Reset() {
2233 *m = IPSourceAndPortRangeCheckInterfaceAddDel{}
2235 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string {
2236 return "ip_source_and_port_range_check_interface_add_del"
2238 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { return "e1ba8987" }
2239 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType {
2240 return api.RequestMessage
2243 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() int {
2248 size += 1 // m.IsAdd
2249 size += 4 // m.SwIfIndex
2250 size += 4 // m.TCPInVrfID
2251 size += 4 // m.TCPOutVrfID
2252 size += 4 // m.UDPInVrfID
2253 size += 4 // m.UDPOutVrfID
2256 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
2257 var buf *codec.Buffer
2259 buf = codec.NewBuffer(make([]byte, m.Size()))
2261 buf = codec.NewBuffer(b)
2263 buf.EncodeBool(m.IsAdd)
2264 buf.EncodeUint32(uint32(m.SwIfIndex))
2265 buf.EncodeUint32(uint32(m.TCPInVrfID))
2266 buf.EncodeUint32(uint32(m.TCPOutVrfID))
2267 buf.EncodeUint32(uint32(m.UDPInVrfID))
2268 buf.EncodeUint32(uint32(m.UDPOutVrfID))
2269 return buf.Bytes(), nil
2271 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Unmarshal(b []byte) error {
2272 buf := codec.NewBuffer(b)
2273 m.IsAdd = buf.DecodeBool()
2274 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2275 m.TCPInVrfID = buf.DecodeUint32()
2276 m.TCPOutVrfID = buf.DecodeUint32()
2277 m.UDPInVrfID = buf.DecodeUint32()
2278 m.UDPOutVrfID = buf.DecodeUint32()
2282 // IPSourceAndPortRangeCheckInterfaceAddDelReply defines message 'ip_source_and_port_range_check_interface_add_del_reply'.
2283 type IPSourceAndPortRangeCheckInterfaceAddDelReply struct {
2284 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2287 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Reset() {
2288 *m = IPSourceAndPortRangeCheckInterfaceAddDelReply{}
2290 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string {
2291 return "ip_source_and_port_range_check_interface_add_del_reply"
2293 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
2294 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType {
2295 return api.ReplyMessage
2298 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Size() int {
2303 size += 4 // m.Retval
2306 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
2307 var buf *codec.Buffer
2309 buf = codec.NewBuffer(make([]byte, m.Size()))
2311 buf = codec.NewBuffer(b)
2313 buf.EncodeUint32(uint32(m.Retval))
2314 return buf.Bytes(), nil
2316 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(b []byte) error {
2317 buf := codec.NewBuffer(b)
2318 m.Retval = int32(buf.DecodeUint32())
2322 // IPTableAddDel defines message 'ip_table_add_del'.
2323 type IPTableAddDel struct {
2324 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2325 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2328 func (m *IPTableAddDel) Reset() { *m = IPTableAddDel{} }
2329 func (*IPTableAddDel) GetMessageName() string { return "ip_table_add_del" }
2330 func (*IPTableAddDel) GetCrcString() string { return "0ffdaec0" }
2331 func (*IPTableAddDel) GetMessageType() api.MessageType {
2332 return api.RequestMessage
2335 func (m *IPTableAddDel) Size() int {
2340 size += 1 // m.IsAdd
2341 size += 4 // m.Table.TableID
2342 size += 1 // m.Table.IsIP6
2343 size += 64 // m.Table.Name
2346 func (m *IPTableAddDel) Marshal(b []byte) ([]byte, error) {
2347 var buf *codec.Buffer
2349 buf = codec.NewBuffer(make([]byte, m.Size()))
2351 buf = codec.NewBuffer(b)
2353 buf.EncodeBool(m.IsAdd)
2354 buf.EncodeUint32(uint32(m.Table.TableID))
2355 buf.EncodeBool(m.Table.IsIP6)
2356 buf.EncodeString(m.Table.Name, 64)
2357 return buf.Bytes(), nil
2359 func (m *IPTableAddDel) Unmarshal(b []byte) error {
2360 buf := codec.NewBuffer(b)
2361 m.IsAdd = buf.DecodeBool()
2362 m.Table.TableID = buf.DecodeUint32()
2363 m.Table.IsIP6 = buf.DecodeBool()
2364 m.Table.Name = buf.DecodeString(64)
2368 // IPTableAddDelReply defines message 'ip_table_add_del_reply'.
2369 type IPTableAddDelReply struct {
2370 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2373 func (m *IPTableAddDelReply) Reset() { *m = IPTableAddDelReply{} }
2374 func (*IPTableAddDelReply) GetMessageName() string { return "ip_table_add_del_reply" }
2375 func (*IPTableAddDelReply) GetCrcString() string { return "e8d4e804" }
2376 func (*IPTableAddDelReply) GetMessageType() api.MessageType {
2377 return api.ReplyMessage
2380 func (m *IPTableAddDelReply) Size() int {
2385 size += 4 // m.Retval
2388 func (m *IPTableAddDelReply) Marshal(b []byte) ([]byte, error) {
2389 var buf *codec.Buffer
2391 buf = codec.NewBuffer(make([]byte, m.Size()))
2393 buf = codec.NewBuffer(b)
2395 buf.EncodeUint32(uint32(m.Retval))
2396 return buf.Bytes(), nil
2398 func (m *IPTableAddDelReply) Unmarshal(b []byte) error {
2399 buf := codec.NewBuffer(b)
2400 m.Retval = int32(buf.DecodeUint32())
2404 // IPTableDetails defines message 'ip_table_details'.
2405 type IPTableDetails struct {
2406 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2409 func (m *IPTableDetails) Reset() { *m = IPTableDetails{} }
2410 func (*IPTableDetails) GetMessageName() string { return "ip_table_details" }
2411 func (*IPTableDetails) GetCrcString() string { return "c79fca0f" }
2412 func (*IPTableDetails) GetMessageType() api.MessageType {
2413 return api.ReplyMessage
2416 func (m *IPTableDetails) Size() int {
2421 size += 4 // m.Table.TableID
2422 size += 1 // m.Table.IsIP6
2423 size += 64 // m.Table.Name
2426 func (m *IPTableDetails) Marshal(b []byte) ([]byte, error) {
2427 var buf *codec.Buffer
2429 buf = codec.NewBuffer(make([]byte, m.Size()))
2431 buf = codec.NewBuffer(b)
2433 buf.EncodeUint32(uint32(m.Table.TableID))
2434 buf.EncodeBool(m.Table.IsIP6)
2435 buf.EncodeString(m.Table.Name, 64)
2436 return buf.Bytes(), nil
2438 func (m *IPTableDetails) Unmarshal(b []byte) error {
2439 buf := codec.NewBuffer(b)
2440 m.Table.TableID = buf.DecodeUint32()
2441 m.Table.IsIP6 = buf.DecodeBool()
2442 m.Table.Name = buf.DecodeString(64)
2446 // IPTableDump defines message 'ip_table_dump'.
2447 type IPTableDump struct{}
2449 func (m *IPTableDump) Reset() { *m = IPTableDump{} }
2450 func (*IPTableDump) GetMessageName() string { return "ip_table_dump" }
2451 func (*IPTableDump) GetCrcString() string { return "51077d14" }
2452 func (*IPTableDump) GetMessageType() api.MessageType {
2453 return api.RequestMessage
2456 func (m *IPTableDump) Size() int {
2463 func (m *IPTableDump) Marshal(b []byte) ([]byte, error) {
2464 var buf *codec.Buffer
2466 buf = codec.NewBuffer(make([]byte, m.Size()))
2468 buf = codec.NewBuffer(b)
2470 return buf.Bytes(), nil
2472 func (m *IPTableDump) Unmarshal(b []byte) error {
2476 // IPTableFlush defines message 'ip_table_flush'.
2477 type IPTableFlush struct {
2478 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2481 func (m *IPTableFlush) Reset() { *m = IPTableFlush{} }
2482 func (*IPTableFlush) GetMessageName() string { return "ip_table_flush" }
2483 func (*IPTableFlush) GetCrcString() string { return "b9d2e09e" }
2484 func (*IPTableFlush) GetMessageType() api.MessageType {
2485 return api.RequestMessage
2488 func (m *IPTableFlush) Size() int {
2493 size += 4 // m.Table.TableID
2494 size += 1 // m.Table.IsIP6
2495 size += 64 // m.Table.Name
2498 func (m *IPTableFlush) Marshal(b []byte) ([]byte, error) {
2499 var buf *codec.Buffer
2501 buf = codec.NewBuffer(make([]byte, m.Size()))
2503 buf = codec.NewBuffer(b)
2505 buf.EncodeUint32(uint32(m.Table.TableID))
2506 buf.EncodeBool(m.Table.IsIP6)
2507 buf.EncodeString(m.Table.Name, 64)
2508 return buf.Bytes(), nil
2510 func (m *IPTableFlush) Unmarshal(b []byte) error {
2511 buf := codec.NewBuffer(b)
2512 m.Table.TableID = buf.DecodeUint32()
2513 m.Table.IsIP6 = buf.DecodeBool()
2514 m.Table.Name = buf.DecodeString(64)
2518 // IPTableFlushReply defines message 'ip_table_flush_reply'.
2519 type IPTableFlushReply struct {
2520 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2523 func (m *IPTableFlushReply) Reset() { *m = IPTableFlushReply{} }
2524 func (*IPTableFlushReply) GetMessageName() string { return "ip_table_flush_reply" }
2525 func (*IPTableFlushReply) GetCrcString() string { return "e8d4e804" }
2526 func (*IPTableFlushReply) GetMessageType() api.MessageType {
2527 return api.ReplyMessage
2530 func (m *IPTableFlushReply) Size() int {
2535 size += 4 // m.Retval
2538 func (m *IPTableFlushReply) Marshal(b []byte) ([]byte, error) {
2539 var buf *codec.Buffer
2541 buf = codec.NewBuffer(make([]byte, m.Size()))
2543 buf = codec.NewBuffer(b)
2545 buf.EncodeUint32(uint32(m.Retval))
2546 return buf.Bytes(), nil
2548 func (m *IPTableFlushReply) Unmarshal(b []byte) error {
2549 buf := codec.NewBuffer(b)
2550 m.Retval = int32(buf.DecodeUint32())
2554 // IPTableReplaceBegin defines message 'ip_table_replace_begin'.
2555 type IPTableReplaceBegin struct {
2556 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2559 func (m *IPTableReplaceBegin) Reset() { *m = IPTableReplaceBegin{} }
2560 func (*IPTableReplaceBegin) GetMessageName() string { return "ip_table_replace_begin" }
2561 func (*IPTableReplaceBegin) GetCrcString() string { return "b9d2e09e" }
2562 func (*IPTableReplaceBegin) GetMessageType() api.MessageType {
2563 return api.RequestMessage
2566 func (m *IPTableReplaceBegin) Size() int {
2571 size += 4 // m.Table.TableID
2572 size += 1 // m.Table.IsIP6
2573 size += 64 // m.Table.Name
2576 func (m *IPTableReplaceBegin) Marshal(b []byte) ([]byte, error) {
2577 var buf *codec.Buffer
2579 buf = codec.NewBuffer(make([]byte, m.Size()))
2581 buf = codec.NewBuffer(b)
2583 buf.EncodeUint32(uint32(m.Table.TableID))
2584 buf.EncodeBool(m.Table.IsIP6)
2585 buf.EncodeString(m.Table.Name, 64)
2586 return buf.Bytes(), nil
2588 func (m *IPTableReplaceBegin) Unmarshal(b []byte) error {
2589 buf := codec.NewBuffer(b)
2590 m.Table.TableID = buf.DecodeUint32()
2591 m.Table.IsIP6 = buf.DecodeBool()
2592 m.Table.Name = buf.DecodeString(64)
2596 // IPTableReplaceBeginReply defines message 'ip_table_replace_begin_reply'.
2597 type IPTableReplaceBeginReply struct {
2598 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2601 func (m *IPTableReplaceBeginReply) Reset() { *m = IPTableReplaceBeginReply{} }
2602 func (*IPTableReplaceBeginReply) GetMessageName() string { return "ip_table_replace_begin_reply" }
2603 func (*IPTableReplaceBeginReply) GetCrcString() string { return "e8d4e804" }
2604 func (*IPTableReplaceBeginReply) GetMessageType() api.MessageType {
2605 return api.ReplyMessage
2608 func (m *IPTableReplaceBeginReply) Size() int {
2613 size += 4 // m.Retval
2616 func (m *IPTableReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
2617 var buf *codec.Buffer
2619 buf = codec.NewBuffer(make([]byte, m.Size()))
2621 buf = codec.NewBuffer(b)
2623 buf.EncodeUint32(uint32(m.Retval))
2624 return buf.Bytes(), nil
2626 func (m *IPTableReplaceBeginReply) Unmarshal(b []byte) error {
2627 buf := codec.NewBuffer(b)
2628 m.Retval = int32(buf.DecodeUint32())
2632 // IPTableReplaceEnd defines message 'ip_table_replace_end'.
2633 type IPTableReplaceEnd struct {
2634 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2637 func (m *IPTableReplaceEnd) Reset() { *m = IPTableReplaceEnd{} }
2638 func (*IPTableReplaceEnd) GetMessageName() string { return "ip_table_replace_end" }
2639 func (*IPTableReplaceEnd) GetCrcString() string { return "b9d2e09e" }
2640 func (*IPTableReplaceEnd) GetMessageType() api.MessageType {
2641 return api.RequestMessage
2644 func (m *IPTableReplaceEnd) Size() int {
2649 size += 4 // m.Table.TableID
2650 size += 1 // m.Table.IsIP6
2651 size += 64 // m.Table.Name
2654 func (m *IPTableReplaceEnd) Marshal(b []byte) ([]byte, error) {
2655 var buf *codec.Buffer
2657 buf = codec.NewBuffer(make([]byte, m.Size()))
2659 buf = codec.NewBuffer(b)
2661 buf.EncodeUint32(uint32(m.Table.TableID))
2662 buf.EncodeBool(m.Table.IsIP6)
2663 buf.EncodeString(m.Table.Name, 64)
2664 return buf.Bytes(), nil
2666 func (m *IPTableReplaceEnd) Unmarshal(b []byte) error {
2667 buf := codec.NewBuffer(b)
2668 m.Table.TableID = buf.DecodeUint32()
2669 m.Table.IsIP6 = buf.DecodeBool()
2670 m.Table.Name = buf.DecodeString(64)
2674 // IPTableReplaceEndReply defines message 'ip_table_replace_end_reply'.
2675 type IPTableReplaceEndReply struct {
2676 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2679 func (m *IPTableReplaceEndReply) Reset() { *m = IPTableReplaceEndReply{} }
2680 func (*IPTableReplaceEndReply) GetMessageName() string { return "ip_table_replace_end_reply" }
2681 func (*IPTableReplaceEndReply) GetCrcString() string { return "e8d4e804" }
2682 func (*IPTableReplaceEndReply) GetMessageType() api.MessageType {
2683 return api.ReplyMessage
2686 func (m *IPTableReplaceEndReply) Size() int {
2691 size += 4 // m.Retval
2694 func (m *IPTableReplaceEndReply) Marshal(b []byte) ([]byte, error) {
2695 var buf *codec.Buffer
2697 buf = codec.NewBuffer(make([]byte, m.Size()))
2699 buf = codec.NewBuffer(b)
2701 buf.EncodeUint32(uint32(m.Retval))
2702 return buf.Bytes(), nil
2704 func (m *IPTableReplaceEndReply) Unmarshal(b []byte) error {
2705 buf := codec.NewBuffer(b)
2706 m.Retval = int32(buf.DecodeUint32())
2710 // IPUnnumberedDetails defines message 'ip_unnumbered_details'.
2711 type IPUnnumberedDetails struct {
2712 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2713 IPSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip_sw_if_index" json:"ip_sw_if_index,omitempty"`
2716 func (m *IPUnnumberedDetails) Reset() { *m = IPUnnumberedDetails{} }
2717 func (*IPUnnumberedDetails) GetMessageName() string { return "ip_unnumbered_details" }
2718 func (*IPUnnumberedDetails) GetCrcString() string { return "aa12a483" }
2719 func (*IPUnnumberedDetails) GetMessageType() api.MessageType {
2720 return api.ReplyMessage
2723 func (m *IPUnnumberedDetails) Size() int {
2728 size += 4 // m.SwIfIndex
2729 size += 4 // m.IPSwIfIndex
2732 func (m *IPUnnumberedDetails) Marshal(b []byte) ([]byte, error) {
2733 var buf *codec.Buffer
2735 buf = codec.NewBuffer(make([]byte, m.Size()))
2737 buf = codec.NewBuffer(b)
2739 buf.EncodeUint32(uint32(m.SwIfIndex))
2740 buf.EncodeUint32(uint32(m.IPSwIfIndex))
2741 return buf.Bytes(), nil
2743 func (m *IPUnnumberedDetails) Unmarshal(b []byte) error {
2744 buf := codec.NewBuffer(b)
2745 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2746 m.IPSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2750 // IPUnnumberedDump defines message 'ip_unnumbered_dump'.
2751 type IPUnnumberedDump struct {
2752 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=%!s(float64=4.294967295e+09)" json:"sw_if_index,omitempty"`
2755 func (m *IPUnnumberedDump) Reset() { *m = IPUnnumberedDump{} }
2756 func (*IPUnnumberedDump) GetMessageName() string { return "ip_unnumbered_dump" }
2757 func (*IPUnnumberedDump) GetCrcString() string { return "f9e6675e" }
2758 func (*IPUnnumberedDump) GetMessageType() api.MessageType {
2759 return api.RequestMessage
2762 func (m *IPUnnumberedDump) Size() int {
2767 size += 4 // m.SwIfIndex
2770 func (m *IPUnnumberedDump) Marshal(b []byte) ([]byte, error) {
2771 var buf *codec.Buffer
2773 buf = codec.NewBuffer(make([]byte, m.Size()))
2775 buf = codec.NewBuffer(b)
2777 buf.EncodeUint32(uint32(m.SwIfIndex))
2778 return buf.Bytes(), nil
2780 func (m *IPUnnumberedDump) Unmarshal(b []byte) error {
2781 buf := codec.NewBuffer(b)
2782 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2786 // MfibSignalDetails defines message 'mfib_signal_details'.
2787 type MfibSignalDetails struct {
2788 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2789 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
2790 Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
2791 IPPacketLen uint16 `binapi:"u16,name=ip_packet_len" json:"ip_packet_len,omitempty"`
2792 IPPacketData []byte `binapi:"u8[256],name=ip_packet_data" json:"ip_packet_data,omitempty"`
2795 func (m *MfibSignalDetails) Reset() { *m = MfibSignalDetails{} }
2796 func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" }
2797 func (*MfibSignalDetails) GetCrcString() string { return "64398a9a" }
2798 func (*MfibSignalDetails) GetMessageType() api.MessageType {
2799 return api.ReplyMessage
2802 func (m *MfibSignalDetails) Size() int {
2807 size += 4 // m.SwIfIndex
2808 size += 4 // m.TableID
2809 size += 1 // m.Prefix.Af
2810 size += 2 // m.Prefix.GrpAddressLength
2811 size += 1 * 16 // m.Prefix.GrpAddress
2812 size += 1 * 16 // m.Prefix.SrcAddress
2813 size += 2 // m.IPPacketLen
2814 size += 1 * 256 // m.IPPacketData
2817 func (m *MfibSignalDetails) Marshal(b []byte) ([]byte, error) {
2818 var buf *codec.Buffer
2820 buf = codec.NewBuffer(make([]byte, m.Size()))
2822 buf = codec.NewBuffer(b)
2824 buf.EncodeUint32(uint32(m.SwIfIndex))
2825 buf.EncodeUint32(uint32(m.TableID))
2826 buf.EncodeUint8(uint8(m.Prefix.Af))
2827 buf.EncodeUint16(uint16(m.Prefix.GrpAddressLength))
2828 buf.EncodeBytes(m.Prefix.GrpAddress.XXX_UnionData[:], 0)
2829 buf.EncodeBytes(m.Prefix.SrcAddress.XXX_UnionData[:], 0)
2830 buf.EncodeUint16(uint16(m.IPPacketLen))
2831 buf.EncodeBytes(m.IPPacketData[:], 256)
2832 return buf.Bytes(), nil
2834 func (m *MfibSignalDetails) Unmarshal(b []byte) error {
2835 buf := codec.NewBuffer(b)
2836 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2837 m.TableID = buf.DecodeUint32()
2838 m.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
2839 m.Prefix.GrpAddressLength = buf.DecodeUint16()
2840 copy(m.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
2841 copy(m.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
2842 m.IPPacketLen = buf.DecodeUint16()
2843 copy(m.IPPacketData[:], buf.DecodeBytes(256))
2847 // MfibSignalDump defines message 'mfib_signal_dump'.
2848 type MfibSignalDump struct{}
2850 func (m *MfibSignalDump) Reset() { *m = MfibSignalDump{} }
2851 func (*MfibSignalDump) GetMessageName() string { return "mfib_signal_dump" }
2852 func (*MfibSignalDump) GetCrcString() string { return "51077d14" }
2853 func (*MfibSignalDump) GetMessageType() api.MessageType {
2854 return api.RequestMessage
2857 func (m *MfibSignalDump) Size() int {
2864 func (m *MfibSignalDump) Marshal(b []byte) ([]byte, error) {
2865 var buf *codec.Buffer
2867 buf = codec.NewBuffer(make([]byte, m.Size()))
2869 buf = codec.NewBuffer(b)
2871 return buf.Bytes(), nil
2873 func (m *MfibSignalDump) Unmarshal(b []byte) error {
2877 // SetIPFlowHash defines message 'set_ip_flow_hash'.
2878 type SetIPFlowHash struct {
2879 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2880 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
2881 Src bool `binapi:"bool,name=src" json:"src,omitempty"`
2882 Dst bool `binapi:"bool,name=dst" json:"dst,omitempty"`
2883 Sport bool `binapi:"bool,name=sport" json:"sport,omitempty"`
2884 Dport bool `binapi:"bool,name=dport" json:"dport,omitempty"`
2885 Proto bool `binapi:"bool,name=proto" json:"proto,omitempty"`
2886 Reverse bool `binapi:"bool,name=reverse" json:"reverse,omitempty"`
2887 Symmetric bool `binapi:"bool,name=symmetric" json:"symmetric,omitempty"`
2890 func (m *SetIPFlowHash) Reset() { *m = SetIPFlowHash{} }
2891 func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" }
2892 func (*SetIPFlowHash) GetCrcString() string { return "084ee09e" }
2893 func (*SetIPFlowHash) GetMessageType() api.MessageType {
2894 return api.RequestMessage
2897 func (m *SetIPFlowHash) Size() int {
2902 size += 4 // m.VrfID
2903 size += 1 // m.IsIPv6
2906 size += 1 // m.Sport
2907 size += 1 // m.Dport
2908 size += 1 // m.Proto
2909 size += 1 // m.Reverse
2910 size += 1 // m.Symmetric
2913 func (m *SetIPFlowHash) Marshal(b []byte) ([]byte, error) {
2914 var buf *codec.Buffer
2916 buf = codec.NewBuffer(make([]byte, m.Size()))
2918 buf = codec.NewBuffer(b)
2920 buf.EncodeUint32(uint32(m.VrfID))
2921 buf.EncodeBool(m.IsIPv6)
2922 buf.EncodeBool(m.Src)
2923 buf.EncodeBool(m.Dst)
2924 buf.EncodeBool(m.Sport)
2925 buf.EncodeBool(m.Dport)
2926 buf.EncodeBool(m.Proto)
2927 buf.EncodeBool(m.Reverse)
2928 buf.EncodeBool(m.Symmetric)
2929 return buf.Bytes(), nil
2931 func (m *SetIPFlowHash) Unmarshal(b []byte) error {
2932 buf := codec.NewBuffer(b)
2933 m.VrfID = buf.DecodeUint32()
2934 m.IsIPv6 = buf.DecodeBool()
2935 m.Src = buf.DecodeBool()
2936 m.Dst = buf.DecodeBool()
2937 m.Sport = buf.DecodeBool()
2938 m.Dport = buf.DecodeBool()
2939 m.Proto = buf.DecodeBool()
2940 m.Reverse = buf.DecodeBool()
2941 m.Symmetric = buf.DecodeBool()
2945 // SetIPFlowHashReply defines message 'set_ip_flow_hash_reply'.
2946 type SetIPFlowHashReply struct {
2947 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2950 func (m *SetIPFlowHashReply) Reset() { *m = SetIPFlowHashReply{} }
2951 func (*SetIPFlowHashReply) GetMessageName() string { return "set_ip_flow_hash_reply" }
2952 func (*SetIPFlowHashReply) GetCrcString() string { return "e8d4e804" }
2953 func (*SetIPFlowHashReply) GetMessageType() api.MessageType {
2954 return api.ReplyMessage
2957 func (m *SetIPFlowHashReply) Size() int {
2962 size += 4 // m.Retval
2965 func (m *SetIPFlowHashReply) Marshal(b []byte) ([]byte, error) {
2966 var buf *codec.Buffer
2968 buf = codec.NewBuffer(make([]byte, m.Size()))
2970 buf = codec.NewBuffer(b)
2972 buf.EncodeUint32(uint32(m.Retval))
2973 return buf.Bytes(), nil
2975 func (m *SetIPFlowHashReply) Unmarshal(b []byte) error {
2976 buf := codec.NewBuffer(b)
2977 m.Retval = int32(buf.DecodeUint32())
2981 // SwInterfaceIP6EnableDisable defines message 'sw_interface_ip6_enable_disable'.
2982 type SwInterfaceIP6EnableDisable struct {
2983 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2984 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
2987 func (m *SwInterfaceIP6EnableDisable) Reset() { *m = SwInterfaceIP6EnableDisable{} }
2988 func (*SwInterfaceIP6EnableDisable) GetMessageName() string { return "sw_interface_ip6_enable_disable" }
2989 func (*SwInterfaceIP6EnableDisable) GetCrcString() string { return "ae6cfcfb" }
2990 func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType {
2991 return api.RequestMessage
2994 func (m *SwInterfaceIP6EnableDisable) Size() int {
2999 size += 4 // m.SwIfIndex
3000 size += 1 // m.Enable
3003 func (m *SwInterfaceIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
3004 var buf *codec.Buffer
3006 buf = codec.NewBuffer(make([]byte, m.Size()))
3008 buf = codec.NewBuffer(b)
3010 buf.EncodeUint32(uint32(m.SwIfIndex))
3011 buf.EncodeBool(m.Enable)
3012 return buf.Bytes(), nil
3014 func (m *SwInterfaceIP6EnableDisable) Unmarshal(b []byte) error {
3015 buf := codec.NewBuffer(b)
3016 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3017 m.Enable = buf.DecodeBool()
3021 // SwInterfaceIP6EnableDisableReply defines message 'sw_interface_ip6_enable_disable_reply'.
3022 type SwInterfaceIP6EnableDisableReply struct {
3023 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3026 func (m *SwInterfaceIP6EnableDisableReply) Reset() { *m = SwInterfaceIP6EnableDisableReply{} }
3027 func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string {
3028 return "sw_interface_ip6_enable_disable_reply"
3030 func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
3031 func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType {
3032 return api.ReplyMessage
3035 func (m *SwInterfaceIP6EnableDisableReply) Size() int {
3040 size += 4 // m.Retval
3043 func (m *SwInterfaceIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) {
3044 var buf *codec.Buffer
3046 buf = codec.NewBuffer(make([]byte, m.Size()))
3048 buf = codec.NewBuffer(b)
3050 buf.EncodeUint32(uint32(m.Retval))
3051 return buf.Bytes(), nil
3053 func (m *SwInterfaceIP6EnableDisableReply) Unmarshal(b []byte) error {
3054 buf := codec.NewBuffer(b)
3055 m.Retval = int32(buf.DecodeUint32())
3059 // SwInterfaceIP6SetLinkLocalAddress defines message 'sw_interface_ip6_set_link_local_address'.
3060 type SwInterfaceIP6SetLinkLocalAddress struct {
3061 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3062 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
3065 func (m *SwInterfaceIP6SetLinkLocalAddress) Reset() { *m = SwInterfaceIP6SetLinkLocalAddress{} }
3066 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string {
3067 return "sw_interface_ip6_set_link_local_address"
3069 func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "2931d9fa" }
3070 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType {
3071 return api.RequestMessage
3074 func (m *SwInterfaceIP6SetLinkLocalAddress) Size() int {
3079 size += 4 // m.SwIfIndex
3080 size += 1 * 16 // m.IP
3083 func (m *SwInterfaceIP6SetLinkLocalAddress) Marshal(b []byte) ([]byte, error) {
3084 var buf *codec.Buffer
3086 buf = codec.NewBuffer(make([]byte, m.Size()))
3088 buf = codec.NewBuffer(b)
3090 buf.EncodeUint32(uint32(m.SwIfIndex))
3091 buf.EncodeBytes(m.IP[:], 16)
3092 return buf.Bytes(), nil
3094 func (m *SwInterfaceIP6SetLinkLocalAddress) Unmarshal(b []byte) error {
3095 buf := codec.NewBuffer(b)
3096 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3097 copy(m.IP[:], buf.DecodeBytes(16))
3101 // SwInterfaceIP6SetLinkLocalAddressReply defines message 'sw_interface_ip6_set_link_local_address_reply'.
3102 type SwInterfaceIP6SetLinkLocalAddressReply struct {
3103 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3106 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Reset() {
3107 *m = SwInterfaceIP6SetLinkLocalAddressReply{}
3109 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string {
3110 return "sw_interface_ip6_set_link_local_address_reply"
3112 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { return "e8d4e804" }
3113 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType {
3114 return api.ReplyMessage
3117 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Size() int {
3122 size += 4 // m.Retval
3125 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) {
3126 var buf *codec.Buffer
3128 buf = codec.NewBuffer(make([]byte, m.Size()))
3130 buf = codec.NewBuffer(b)
3132 buf.EncodeUint32(uint32(m.Retval))
3133 return buf.Bytes(), nil
3135 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error {
3136 buf := codec.NewBuffer(b)
3137 m.Retval = int32(buf.DecodeUint32())
3141 func init() { file_ip_binapi_init() }
3142 func file_ip_binapi_init() {
3143 api.RegisterMessage((*IoamDisable)(nil), "ioam_disable_6b16a45e")
3144 api.RegisterMessage((*IoamDisableReply)(nil), "ioam_disable_reply_e8d4e804")
3145 api.RegisterMessage((*IoamEnable)(nil), "ioam_enable_51ccd868")
3146 api.RegisterMessage((*IoamEnableReply)(nil), "ioam_enable_reply_e8d4e804")
3147 api.RegisterMessage((*IPAddressDetails)(nil), "ip_address_details_b1199745")
3148 api.RegisterMessage((*IPAddressDump)(nil), "ip_address_dump_2d033de4")
3149 api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip_container_proxy_add_del_91189f40")
3150 api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip_container_proxy_add_del_reply_e8d4e804")
3151 api.RegisterMessage((*IPContainerProxyDetails)(nil), "ip_container_proxy_details_0ee460e8")
3152 api.RegisterMessage((*IPContainerProxyDump)(nil), "ip_container_proxy_dump_51077d14")
3153 api.RegisterMessage((*IPDetails)(nil), "ip_details_eb152d07")
3154 api.RegisterMessage((*IPDump)(nil), "ip_dump_98d231ca")
3155 api.RegisterMessage((*IPMrouteAddDel)(nil), "ip_mroute_add_del_f6627d17")
3156 api.RegisterMessage((*IPMrouteAddDelReply)(nil), "ip_mroute_add_del_reply_1992deab")
3157 api.RegisterMessage((*IPMrouteDetails)(nil), "ip_mroute_details_c1cb4b44")
3158 api.RegisterMessage((*IPMrouteDump)(nil), "ip_mroute_dump_b9d2e09e")
3159 api.RegisterMessage((*IPMtableDetails)(nil), "ip_mtable_details_b9d2e09e")
3160 api.RegisterMessage((*IPMtableDump)(nil), "ip_mtable_dump_51077d14")
3161 api.RegisterMessage((*IPPuntPolice)(nil), "ip_punt_police_db867cea")
3162 api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip_punt_police_reply_e8d4e804")
3163 api.RegisterMessage((*IPPuntRedirect)(nil), "ip_punt_redirect_a9a5592c")
3164 api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_3924f5d3")
3165 api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip_punt_redirect_dump_2d033de4")
3166 api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip_punt_redirect_reply_e8d4e804")
3167 api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_885c85a6")
3168 api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip_reassembly_enable_disable_reply_e8d4e804")
3169 api.RegisterMessage((*IPReassemblyGet)(nil), "ip_reassembly_get_ea13ff63")
3170 api.RegisterMessage((*IPReassemblyGetReply)(nil), "ip_reassembly_get_reply_d5eb8d34")
3171 api.RegisterMessage((*IPReassemblySet)(nil), "ip_reassembly_set_16467d25")
3172 api.RegisterMessage((*IPReassemblySetReply)(nil), "ip_reassembly_set_reply_e8d4e804")
3173 api.RegisterMessage((*IPRouteAddDel)(nil), "ip_route_add_del_c1ff832d")
3174 api.RegisterMessage((*IPRouteAddDelReply)(nil), "ip_route_add_del_reply_1992deab")
3175 api.RegisterMessage((*IPRouteDetails)(nil), "ip_route_details_d1ffaae1")
3176 api.RegisterMessage((*IPRouteDump)(nil), "ip_route_dump_b9d2e09e")
3177 api.RegisterMessage((*IPRouteLookup)(nil), "ip_route_lookup_e2986185")
3178 api.RegisterMessage((*IPRouteLookupReply)(nil), "ip_route_lookup_reply_ae99de8e")
3179 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip_source_and_port_range_check_add_del_8bfc76f2")
3180 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip_source_and_port_range_check_add_del_reply_e8d4e804")
3181 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip_source_and_port_range_check_interface_add_del_e1ba8987")
3182 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip_source_and_port_range_check_interface_add_del_reply_e8d4e804")
3183 api.RegisterMessage((*IPTableAddDel)(nil), "ip_table_add_del_0ffdaec0")
3184 api.RegisterMessage((*IPTableAddDelReply)(nil), "ip_table_add_del_reply_e8d4e804")
3185 api.RegisterMessage((*IPTableDetails)(nil), "ip_table_details_c79fca0f")
3186 api.RegisterMessage((*IPTableDump)(nil), "ip_table_dump_51077d14")
3187 api.RegisterMessage((*IPTableFlush)(nil), "ip_table_flush_b9d2e09e")
3188 api.RegisterMessage((*IPTableFlushReply)(nil), "ip_table_flush_reply_e8d4e804")
3189 api.RegisterMessage((*IPTableReplaceBegin)(nil), "ip_table_replace_begin_b9d2e09e")
3190 api.RegisterMessage((*IPTableReplaceBeginReply)(nil), "ip_table_replace_begin_reply_e8d4e804")
3191 api.RegisterMessage((*IPTableReplaceEnd)(nil), "ip_table_replace_end_b9d2e09e")
3192 api.RegisterMessage((*IPTableReplaceEndReply)(nil), "ip_table_replace_end_reply_e8d4e804")
3193 api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip_unnumbered_details_aa12a483")
3194 api.RegisterMessage((*IPUnnumberedDump)(nil), "ip_unnumbered_dump_f9e6675e")
3195 api.RegisterMessage((*MfibSignalDetails)(nil), "mfib_signal_details_64398a9a")
3196 api.RegisterMessage((*MfibSignalDump)(nil), "mfib_signal_dump_51077d14")
3197 api.RegisterMessage((*SetIPFlowHash)(nil), "set_ip_flow_hash_084ee09e")
3198 api.RegisterMessage((*SetIPFlowHashReply)(nil), "set_ip_flow_hash_reply_e8d4e804")
3199 api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "sw_interface_ip6_enable_disable_ae6cfcfb")
3200 api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "sw_interface_ip6_enable_disable_reply_e8d4e804")
3201 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "sw_interface_ip6_set_link_local_address_2931d9fa")
3202 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "sw_interface_ip6_set_link_local_address_reply_e8d4e804")
3205 // Messages returns list of all messages in this module.
3206 func AllMessages() []api.Message {
3207 return []api.Message{
3208 (*IoamDisable)(nil),
3209 (*IoamDisableReply)(nil),
3211 (*IoamEnableReply)(nil),
3212 (*IPAddressDetails)(nil),
3213 (*IPAddressDump)(nil),
3214 (*IPContainerProxyAddDel)(nil),
3215 (*IPContainerProxyAddDelReply)(nil),
3216 (*IPContainerProxyDetails)(nil),
3217 (*IPContainerProxyDump)(nil),
3220 (*IPMrouteAddDel)(nil),
3221 (*IPMrouteAddDelReply)(nil),
3222 (*IPMrouteDetails)(nil),
3223 (*IPMrouteDump)(nil),
3224 (*IPMtableDetails)(nil),
3225 (*IPMtableDump)(nil),
3226 (*IPPuntPolice)(nil),
3227 (*IPPuntPoliceReply)(nil),
3228 (*IPPuntRedirect)(nil),
3229 (*IPPuntRedirectDetails)(nil),
3230 (*IPPuntRedirectDump)(nil),
3231 (*IPPuntRedirectReply)(nil),
3232 (*IPReassemblyEnableDisable)(nil),
3233 (*IPReassemblyEnableDisableReply)(nil),
3234 (*IPReassemblyGet)(nil),
3235 (*IPReassemblyGetReply)(nil),
3236 (*IPReassemblySet)(nil),
3237 (*IPReassemblySetReply)(nil),
3238 (*IPRouteAddDel)(nil),
3239 (*IPRouteAddDelReply)(nil),
3240 (*IPRouteDetails)(nil),
3241 (*IPRouteDump)(nil),
3242 (*IPRouteLookup)(nil),
3243 (*IPRouteLookupReply)(nil),
3244 (*IPSourceAndPortRangeCheckAddDel)(nil),
3245 (*IPSourceAndPortRangeCheckAddDelReply)(nil),
3246 (*IPSourceAndPortRangeCheckInterfaceAddDel)(nil),
3247 (*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil),
3248 (*IPTableAddDel)(nil),
3249 (*IPTableAddDelReply)(nil),
3250 (*IPTableDetails)(nil),
3251 (*IPTableDump)(nil),
3252 (*IPTableFlush)(nil),
3253 (*IPTableFlushReply)(nil),
3254 (*IPTableReplaceBegin)(nil),
3255 (*IPTableReplaceBeginReply)(nil),
3256 (*IPTableReplaceEnd)(nil),
3257 (*IPTableReplaceEndReply)(nil),
3258 (*IPUnnumberedDetails)(nil),
3259 (*IPUnnumberedDump)(nil),
3260 (*MfibSignalDetails)(nil),
3261 (*MfibSignalDump)(nil),
3262 (*SetIPFlowHash)(nil),
3263 (*SetIPFlowHashReply)(nil),
3264 (*SwInterfaceIP6EnableDisable)(nil),
3265 (*SwInterfaceIP6EnableDisableReply)(nil),
3266 (*SwInterfaceIP6SetLinkLocalAddress)(nil),
3267 (*SwInterfaceIP6SetLinkLocalAddressReply)(nil),