1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package ip contains generated bindings for API file ip.api.
18 api "git.fd.io/govpp.git/api"
19 _ "git.fd.io/govpp.git/binapi/ethernet_types"
20 fib_types "git.fd.io/govpp.git/binapi/fib_types"
21 interface_types "git.fd.io/govpp.git/binapi/interface_types"
22 ip_types "git.fd.io/govpp.git/binapi/ip_types"
23 mfib_types "git.fd.io/govpp.git/binapi/mfib_types"
24 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() (size int) {
118 func (m *IoamDisable) Marshal(b []byte) ([]byte, error) {
120 b = make([]byte, m.Size())
122 buf := codec.NewBuffer(b)
123 buf.EncodeUint16(m.ID)
124 return buf.Bytes(), nil
126 func (m *IoamDisable) Unmarshal(b []byte) error {
127 buf := codec.NewBuffer(b)
128 m.ID = buf.DecodeUint16()
132 // IoamDisableReply defines message 'ioam_disable_reply'.
133 type IoamDisableReply struct {
134 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
137 func (m *IoamDisableReply) Reset() { *m = IoamDisableReply{} }
138 func (*IoamDisableReply) GetMessageName() string { return "ioam_disable_reply" }
139 func (*IoamDisableReply) GetCrcString() string { return "e8d4e804" }
140 func (*IoamDisableReply) GetMessageType() api.MessageType {
141 return api.ReplyMessage
144 func (m *IoamDisableReply) Size() (size int) {
148 size += 4 // m.Retval
151 func (m *IoamDisableReply) Marshal(b []byte) ([]byte, error) {
153 b = make([]byte, m.Size())
155 buf := codec.NewBuffer(b)
156 buf.EncodeInt32(m.Retval)
157 return buf.Bytes(), nil
159 func (m *IoamDisableReply) Unmarshal(b []byte) error {
160 buf := codec.NewBuffer(b)
161 m.Retval = buf.DecodeInt32()
165 // IoamEnable defines message 'ioam_enable'.
166 type IoamEnable struct {
167 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
168 Seqno bool `binapi:"bool,name=seqno" json:"seqno,omitempty"`
169 Analyse bool `binapi:"bool,name=analyse" json:"analyse,omitempty"`
170 PotEnable bool `binapi:"bool,name=pot_enable" json:"pot_enable,omitempty"`
171 TraceEnable bool `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"`
172 NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
175 func (m *IoamEnable) Reset() { *m = IoamEnable{} }
176 func (*IoamEnable) GetMessageName() string { return "ioam_enable" }
177 func (*IoamEnable) GetCrcString() string { return "51ccd868" }
178 func (*IoamEnable) GetMessageType() api.MessageType {
179 return api.RequestMessage
182 func (m *IoamEnable) Size() (size int) {
188 size += 1 // m.Analyse
189 size += 1 // m.PotEnable
190 size += 1 // m.TraceEnable
191 size += 4 // m.NodeID
194 func (m *IoamEnable) Marshal(b []byte) ([]byte, error) {
196 b = make([]byte, m.Size())
198 buf := codec.NewBuffer(b)
199 buf.EncodeUint16(m.ID)
200 buf.EncodeBool(m.Seqno)
201 buf.EncodeBool(m.Analyse)
202 buf.EncodeBool(m.PotEnable)
203 buf.EncodeBool(m.TraceEnable)
204 buf.EncodeUint32(m.NodeID)
205 return buf.Bytes(), nil
207 func (m *IoamEnable) Unmarshal(b []byte) error {
208 buf := codec.NewBuffer(b)
209 m.ID = buf.DecodeUint16()
210 m.Seqno = buf.DecodeBool()
211 m.Analyse = buf.DecodeBool()
212 m.PotEnable = buf.DecodeBool()
213 m.TraceEnable = buf.DecodeBool()
214 m.NodeID = buf.DecodeUint32()
218 // IoamEnableReply defines message 'ioam_enable_reply'.
219 type IoamEnableReply struct {
220 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
223 func (m *IoamEnableReply) Reset() { *m = IoamEnableReply{} }
224 func (*IoamEnableReply) GetMessageName() string { return "ioam_enable_reply" }
225 func (*IoamEnableReply) GetCrcString() string { return "e8d4e804" }
226 func (*IoamEnableReply) GetMessageType() api.MessageType {
227 return api.ReplyMessage
230 func (m *IoamEnableReply) Size() (size int) {
234 size += 4 // m.Retval
237 func (m *IoamEnableReply) Marshal(b []byte) ([]byte, error) {
239 b = make([]byte, m.Size())
241 buf := codec.NewBuffer(b)
242 buf.EncodeInt32(m.Retval)
243 return buf.Bytes(), nil
245 func (m *IoamEnableReply) Unmarshal(b []byte) error {
246 buf := codec.NewBuffer(b)
247 m.Retval = buf.DecodeInt32()
251 // IPAddressDetails defines message 'ip_address_details'.
252 type IPAddressDetails struct {
253 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
254 Prefix ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
257 func (m *IPAddressDetails) Reset() { *m = IPAddressDetails{} }
258 func (*IPAddressDetails) GetMessageName() string { return "ip_address_details" }
259 func (*IPAddressDetails) GetCrcString() string { return "b1199745" }
260 func (*IPAddressDetails) GetMessageType() api.MessageType {
261 return api.ReplyMessage
264 func (m *IPAddressDetails) Size() (size int) {
268 size += 4 // m.SwIfIndex
269 size += 1 // m.Prefix.Address.Af
270 size += 1 * 16 // m.Prefix.Address.Un
271 size += 1 // m.Prefix.Len
274 func (m *IPAddressDetails) Marshal(b []byte) ([]byte, error) {
276 b = make([]byte, m.Size())
278 buf := codec.NewBuffer(b)
279 buf.EncodeUint32(uint32(m.SwIfIndex))
280 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
281 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
282 buf.EncodeUint8(m.Prefix.Len)
283 return buf.Bytes(), nil
285 func (m *IPAddressDetails) Unmarshal(b []byte) error {
286 buf := codec.NewBuffer(b)
287 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
288 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
289 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
290 m.Prefix.Len = buf.DecodeUint8()
294 // IPAddressDump defines message 'ip_address_dump'.
295 type IPAddressDump struct {
296 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
297 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
300 func (m *IPAddressDump) Reset() { *m = IPAddressDump{} }
301 func (*IPAddressDump) GetMessageName() string { return "ip_address_dump" }
302 func (*IPAddressDump) GetCrcString() string { return "2d033de4" }
303 func (*IPAddressDump) GetMessageType() api.MessageType {
304 return api.RequestMessage
307 func (m *IPAddressDump) Size() (size int) {
311 size += 4 // m.SwIfIndex
312 size += 1 // m.IsIPv6
315 func (m *IPAddressDump) Marshal(b []byte) ([]byte, error) {
317 b = make([]byte, m.Size())
319 buf := codec.NewBuffer(b)
320 buf.EncodeUint32(uint32(m.SwIfIndex))
321 buf.EncodeBool(m.IsIPv6)
322 return buf.Bytes(), nil
324 func (m *IPAddressDump) Unmarshal(b []byte) error {
325 buf := codec.NewBuffer(b)
326 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
327 m.IsIPv6 = buf.DecodeBool()
331 // IPContainerProxyAddDel defines message 'ip_container_proxy_add_del'.
332 type IPContainerProxyAddDel struct {
333 Pfx ip_types.Prefix `binapi:"prefix,name=pfx" json:"pfx,omitempty"`
334 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
335 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
338 func (m *IPContainerProxyAddDel) Reset() { *m = IPContainerProxyAddDel{} }
339 func (*IPContainerProxyAddDel) GetMessageName() string { return "ip_container_proxy_add_del" }
340 func (*IPContainerProxyAddDel) GetCrcString() string { return "91189f40" }
341 func (*IPContainerProxyAddDel) GetMessageType() api.MessageType {
342 return api.RequestMessage
345 func (m *IPContainerProxyAddDel) Size() (size int) {
349 size += 1 // m.Pfx.Address.Af
350 size += 1 * 16 // m.Pfx.Address.Un
351 size += 1 // m.Pfx.Len
352 size += 4 // m.SwIfIndex
356 func (m *IPContainerProxyAddDel) Marshal(b []byte) ([]byte, error) {
358 b = make([]byte, m.Size())
360 buf := codec.NewBuffer(b)
361 buf.EncodeUint8(uint8(m.Pfx.Address.Af))
362 buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
363 buf.EncodeUint8(m.Pfx.Len)
364 buf.EncodeUint32(uint32(m.SwIfIndex))
365 buf.EncodeBool(m.IsAdd)
366 return buf.Bytes(), nil
368 func (m *IPContainerProxyAddDel) Unmarshal(b []byte) error {
369 buf := codec.NewBuffer(b)
370 m.Pfx.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
371 copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
372 m.Pfx.Len = buf.DecodeUint8()
373 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
374 m.IsAdd = buf.DecodeBool()
378 // IPContainerProxyAddDelReply defines message 'ip_container_proxy_add_del_reply'.
379 type IPContainerProxyAddDelReply struct {
380 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
383 func (m *IPContainerProxyAddDelReply) Reset() { *m = IPContainerProxyAddDelReply{} }
384 func (*IPContainerProxyAddDelReply) GetMessageName() string {
385 return "ip_container_proxy_add_del_reply"
387 func (*IPContainerProxyAddDelReply) GetCrcString() string { return "e8d4e804" }
388 func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType {
389 return api.ReplyMessage
392 func (m *IPContainerProxyAddDelReply) Size() (size int) {
396 size += 4 // m.Retval
399 func (m *IPContainerProxyAddDelReply) Marshal(b []byte) ([]byte, error) {
401 b = make([]byte, m.Size())
403 buf := codec.NewBuffer(b)
404 buf.EncodeInt32(m.Retval)
405 return buf.Bytes(), nil
407 func (m *IPContainerProxyAddDelReply) Unmarshal(b []byte) error {
408 buf := codec.NewBuffer(b)
409 m.Retval = buf.DecodeInt32()
413 // IPContainerProxyDetails defines message 'ip_container_proxy_details'.
414 type IPContainerProxyDetails struct {
415 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
416 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
419 func (m *IPContainerProxyDetails) Reset() { *m = IPContainerProxyDetails{} }
420 func (*IPContainerProxyDetails) GetMessageName() string { return "ip_container_proxy_details" }
421 func (*IPContainerProxyDetails) GetCrcString() string { return "0ee460e8" }
422 func (*IPContainerProxyDetails) GetMessageType() api.MessageType {
423 return api.ReplyMessage
426 func (m *IPContainerProxyDetails) Size() (size int) {
430 size += 4 // m.SwIfIndex
431 size += 1 // m.Prefix.Address.Af
432 size += 1 * 16 // m.Prefix.Address.Un
433 size += 1 // m.Prefix.Len
436 func (m *IPContainerProxyDetails) Marshal(b []byte) ([]byte, error) {
438 b = make([]byte, m.Size())
440 buf := codec.NewBuffer(b)
441 buf.EncodeUint32(uint32(m.SwIfIndex))
442 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
443 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
444 buf.EncodeUint8(m.Prefix.Len)
445 return buf.Bytes(), nil
447 func (m *IPContainerProxyDetails) Unmarshal(b []byte) error {
448 buf := codec.NewBuffer(b)
449 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
450 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
451 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
452 m.Prefix.Len = buf.DecodeUint8()
456 // IPContainerProxyDump defines message 'ip_container_proxy_dump'.
457 type IPContainerProxyDump struct{}
459 func (m *IPContainerProxyDump) Reset() { *m = IPContainerProxyDump{} }
460 func (*IPContainerProxyDump) GetMessageName() string { return "ip_container_proxy_dump" }
461 func (*IPContainerProxyDump) GetCrcString() string { return "51077d14" }
462 func (*IPContainerProxyDump) GetMessageType() api.MessageType {
463 return api.RequestMessage
466 func (m *IPContainerProxyDump) Size() (size int) {
472 func (m *IPContainerProxyDump) Marshal(b []byte) ([]byte, error) {
474 b = make([]byte, m.Size())
476 buf := codec.NewBuffer(b)
477 return buf.Bytes(), nil
479 func (m *IPContainerProxyDump) Unmarshal(b []byte) error {
483 // IPDetails defines message 'ip_details'.
484 type IPDetails struct {
485 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
486 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
489 func (m *IPDetails) Reset() { *m = IPDetails{} }
490 func (*IPDetails) GetMessageName() string { return "ip_details" }
491 func (*IPDetails) GetCrcString() string { return "eb152d07" }
492 func (*IPDetails) GetMessageType() api.MessageType {
493 return api.ReplyMessage
496 func (m *IPDetails) Size() (size int) {
500 size += 4 // m.SwIfIndex
501 size += 1 // m.IsIPv6
504 func (m *IPDetails) Marshal(b []byte) ([]byte, error) {
506 b = make([]byte, m.Size())
508 buf := codec.NewBuffer(b)
509 buf.EncodeUint32(uint32(m.SwIfIndex))
510 buf.EncodeBool(m.IsIPv6)
511 return buf.Bytes(), nil
513 func (m *IPDetails) Unmarshal(b []byte) error {
514 buf := codec.NewBuffer(b)
515 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
516 m.IsIPv6 = buf.DecodeBool()
520 // IPDump defines message 'ip_dump'.
522 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
525 func (m *IPDump) Reset() { *m = IPDump{} }
526 func (*IPDump) GetMessageName() string { return "ip_dump" }
527 func (*IPDump) GetCrcString() string { return "98d231ca" }
528 func (*IPDump) GetMessageType() api.MessageType {
529 return api.RequestMessage
532 func (m *IPDump) Size() (size int) {
536 size += 1 // m.IsIPv6
539 func (m *IPDump) Marshal(b []byte) ([]byte, error) {
541 b = make([]byte, m.Size())
543 buf := codec.NewBuffer(b)
544 buf.EncodeBool(m.IsIPv6)
545 return buf.Bytes(), nil
547 func (m *IPDump) Unmarshal(b []byte) error {
548 buf := codec.NewBuffer(b)
549 m.IsIPv6 = buf.DecodeBool()
553 // IPMrouteAddDel defines message 'ip_mroute_add_del'.
554 type IPMrouteAddDel struct {
555 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
556 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
557 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
560 func (m *IPMrouteAddDel) Reset() { *m = IPMrouteAddDel{} }
561 func (*IPMrouteAddDel) GetMessageName() string { return "ip_mroute_add_del" }
562 func (*IPMrouteAddDel) GetCrcString() string { return "f6627d17" }
563 func (*IPMrouteAddDel) GetMessageType() api.MessageType {
564 return api.RequestMessage
567 func (m *IPMrouteAddDel) Size() (size int) {
572 size += 1 // m.IsMultipath
573 size += 4 // m.Route.TableID
574 size += 4 // m.Route.EntryFlags
575 size += 4 // m.Route.RpfID
576 size += 1 // m.Route.Prefix.Af
577 size += 2 // m.Route.Prefix.GrpAddressLength
578 size += 1 * 16 // m.Route.Prefix.GrpAddress
579 size += 1 * 16 // m.Route.Prefix.SrcAddress
580 size += 1 // m.Route.NPaths
581 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
582 var s2 mfib_types.MfibPath
584 if j2 < len(m.Route.Paths) {
585 s2 = m.Route.Paths[j2]
587 size += 4 // s2.ItfFlags
588 size += 4 // s2.Path.SwIfIndex
589 size += 4 // s2.Path.TableID
590 size += 4 // s2.Path.RpfID
591 size += 1 // s2.Path.Weight
592 size += 1 // s2.Path.Preference
593 size += 4 // s2.Path.Type
594 size += 4 // s2.Path.Flags
595 size += 4 // s2.Path.Proto
596 size += 1 * 16 // s2.Path.Nh.Address
597 size += 4 // s2.Path.Nh.ViaLabel
598 size += 4 // s2.Path.Nh.ObjID
599 size += 4 // s2.Path.Nh.ClassifyTableIndex
600 size += 1 // s2.Path.NLabels
601 for j4 := 0; j4 < 16; j4++ {
602 size += 1 // s2.Path.LabelStack[j4].IsUniform
603 size += 4 // s2.Path.LabelStack[j4].Label
604 size += 1 // s2.Path.LabelStack[j4].TTL
605 size += 1 // s2.Path.LabelStack[j4].Exp
610 func (m *IPMrouteAddDel) Marshal(b []byte) ([]byte, error) {
612 b = make([]byte, m.Size())
614 buf := codec.NewBuffer(b)
615 buf.EncodeBool(m.IsAdd)
616 buf.EncodeBool(m.IsMultipath)
617 buf.EncodeUint32(m.Route.TableID)
618 buf.EncodeUint32(m.Route.EntryFlags)
619 buf.EncodeUint32(m.Route.RpfID)
620 buf.EncodeUint8(uint8(m.Route.Prefix.Af))
621 buf.EncodeUint16(m.Route.Prefix.GrpAddressLength)
622 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16)
623 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16)
624 buf.EncodeUint8(uint8(len(m.Route.Paths)))
625 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
626 var v1 mfib_types.MfibPath // Paths
627 if j1 < len(m.Route.Paths) {
628 v1 = m.Route.Paths[j1]
630 buf.EncodeUint32(uint32(v1.ItfFlags))
631 buf.EncodeUint32(v1.Path.SwIfIndex)
632 buf.EncodeUint32(v1.Path.TableID)
633 buf.EncodeUint32(v1.Path.RpfID)
634 buf.EncodeUint8(v1.Path.Weight)
635 buf.EncodeUint8(v1.Path.Preference)
636 buf.EncodeUint32(uint32(v1.Path.Type))
637 buf.EncodeUint32(uint32(v1.Path.Flags))
638 buf.EncodeUint32(uint32(v1.Path.Proto))
639 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16)
640 buf.EncodeUint32(v1.Path.Nh.ViaLabel)
641 buf.EncodeUint32(v1.Path.Nh.ObjID)
642 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex)
643 buf.EncodeUint8(v1.Path.NLabels)
644 for j3 := 0; j3 < 16; j3++ {
645 buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform)
646 buf.EncodeUint32(v1.Path.LabelStack[j3].Label)
647 buf.EncodeUint8(v1.Path.LabelStack[j3].TTL)
648 buf.EncodeUint8(v1.Path.LabelStack[j3].Exp)
651 return buf.Bytes(), nil
653 func (m *IPMrouteAddDel) Unmarshal(b []byte) error {
654 buf := codec.NewBuffer(b)
655 m.IsAdd = buf.DecodeBool()
656 m.IsMultipath = buf.DecodeBool()
657 m.Route.TableID = buf.DecodeUint32()
658 m.Route.EntryFlags = buf.DecodeUint32()
659 m.Route.RpfID = buf.DecodeUint32()
660 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
661 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
662 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
663 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
664 m.Route.NPaths = buf.DecodeUint8()
665 m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths)
666 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
667 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
668 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
669 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
670 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
671 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
672 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
673 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32())
674 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32())
675 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
676 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
677 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
678 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
679 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
680 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
681 for j3 := 0; j3 < 16; j3++ {
682 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
683 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
684 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
685 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
691 // IPMrouteAddDelReply defines message 'ip_mroute_add_del_reply'.
692 type IPMrouteAddDelReply struct {
693 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
694 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
697 func (m *IPMrouteAddDelReply) Reset() { *m = IPMrouteAddDelReply{} }
698 func (*IPMrouteAddDelReply) GetMessageName() string { return "ip_mroute_add_del_reply" }
699 func (*IPMrouteAddDelReply) GetCrcString() string { return "1992deab" }
700 func (*IPMrouteAddDelReply) GetMessageType() api.MessageType {
701 return api.ReplyMessage
704 func (m *IPMrouteAddDelReply) Size() (size int) {
708 size += 4 // m.Retval
709 size += 4 // m.StatsIndex
712 func (m *IPMrouteAddDelReply) Marshal(b []byte) ([]byte, error) {
714 b = make([]byte, m.Size())
716 buf := codec.NewBuffer(b)
717 buf.EncodeInt32(m.Retval)
718 buf.EncodeUint32(m.StatsIndex)
719 return buf.Bytes(), nil
721 func (m *IPMrouteAddDelReply) Unmarshal(b []byte) error {
722 buf := codec.NewBuffer(b)
723 m.Retval = buf.DecodeInt32()
724 m.StatsIndex = buf.DecodeUint32()
728 // IPMrouteDetails defines message 'ip_mroute_details'.
729 type IPMrouteDetails struct {
730 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
733 func (m *IPMrouteDetails) Reset() { *m = IPMrouteDetails{} }
734 func (*IPMrouteDetails) GetMessageName() string { return "ip_mroute_details" }
735 func (*IPMrouteDetails) GetCrcString() string { return "c1cb4b44" }
736 func (*IPMrouteDetails) GetMessageType() api.MessageType {
737 return api.ReplyMessage
740 func (m *IPMrouteDetails) Size() (size int) {
744 size += 4 // m.Route.TableID
745 size += 4 // m.Route.EntryFlags
746 size += 4 // m.Route.RpfID
747 size += 1 // m.Route.Prefix.Af
748 size += 2 // m.Route.Prefix.GrpAddressLength
749 size += 1 * 16 // m.Route.Prefix.GrpAddress
750 size += 1 * 16 // m.Route.Prefix.SrcAddress
751 size += 1 // m.Route.NPaths
752 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
753 var s2 mfib_types.MfibPath
755 if j2 < len(m.Route.Paths) {
756 s2 = m.Route.Paths[j2]
758 size += 4 // s2.ItfFlags
759 size += 4 // s2.Path.SwIfIndex
760 size += 4 // s2.Path.TableID
761 size += 4 // s2.Path.RpfID
762 size += 1 // s2.Path.Weight
763 size += 1 // s2.Path.Preference
764 size += 4 // s2.Path.Type
765 size += 4 // s2.Path.Flags
766 size += 4 // s2.Path.Proto
767 size += 1 * 16 // s2.Path.Nh.Address
768 size += 4 // s2.Path.Nh.ViaLabel
769 size += 4 // s2.Path.Nh.ObjID
770 size += 4 // s2.Path.Nh.ClassifyTableIndex
771 size += 1 // s2.Path.NLabels
772 for j4 := 0; j4 < 16; j4++ {
773 size += 1 // s2.Path.LabelStack[j4].IsUniform
774 size += 4 // s2.Path.LabelStack[j4].Label
775 size += 1 // s2.Path.LabelStack[j4].TTL
776 size += 1 // s2.Path.LabelStack[j4].Exp
781 func (m *IPMrouteDetails) Marshal(b []byte) ([]byte, error) {
783 b = make([]byte, m.Size())
785 buf := codec.NewBuffer(b)
786 buf.EncodeUint32(m.Route.TableID)
787 buf.EncodeUint32(m.Route.EntryFlags)
788 buf.EncodeUint32(m.Route.RpfID)
789 buf.EncodeUint8(uint8(m.Route.Prefix.Af))
790 buf.EncodeUint16(m.Route.Prefix.GrpAddressLength)
791 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16)
792 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16)
793 buf.EncodeUint8(uint8(len(m.Route.Paths)))
794 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
795 var v1 mfib_types.MfibPath // Paths
796 if j1 < len(m.Route.Paths) {
797 v1 = m.Route.Paths[j1]
799 buf.EncodeUint32(uint32(v1.ItfFlags))
800 buf.EncodeUint32(v1.Path.SwIfIndex)
801 buf.EncodeUint32(v1.Path.TableID)
802 buf.EncodeUint32(v1.Path.RpfID)
803 buf.EncodeUint8(v1.Path.Weight)
804 buf.EncodeUint8(v1.Path.Preference)
805 buf.EncodeUint32(uint32(v1.Path.Type))
806 buf.EncodeUint32(uint32(v1.Path.Flags))
807 buf.EncodeUint32(uint32(v1.Path.Proto))
808 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16)
809 buf.EncodeUint32(v1.Path.Nh.ViaLabel)
810 buf.EncodeUint32(v1.Path.Nh.ObjID)
811 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex)
812 buf.EncodeUint8(v1.Path.NLabels)
813 for j3 := 0; j3 < 16; j3++ {
814 buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform)
815 buf.EncodeUint32(v1.Path.LabelStack[j3].Label)
816 buf.EncodeUint8(v1.Path.LabelStack[j3].TTL)
817 buf.EncodeUint8(v1.Path.LabelStack[j3].Exp)
820 return buf.Bytes(), nil
822 func (m *IPMrouteDetails) Unmarshal(b []byte) error {
823 buf := codec.NewBuffer(b)
824 m.Route.TableID = buf.DecodeUint32()
825 m.Route.EntryFlags = buf.DecodeUint32()
826 m.Route.RpfID = buf.DecodeUint32()
827 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
828 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
829 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
830 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
831 m.Route.NPaths = buf.DecodeUint8()
832 m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths)
833 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
834 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
835 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
836 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
837 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
838 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
839 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
840 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32())
841 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32())
842 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
843 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
844 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
845 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
846 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
847 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
848 for j3 := 0; j3 < 16; j3++ {
849 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
850 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
851 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
852 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
858 // IPMrouteDump defines message 'ip_mroute_dump'.
859 type IPMrouteDump struct {
860 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
863 func (m *IPMrouteDump) Reset() { *m = IPMrouteDump{} }
864 func (*IPMrouteDump) GetMessageName() string { return "ip_mroute_dump" }
865 func (*IPMrouteDump) GetCrcString() string { return "b9d2e09e" }
866 func (*IPMrouteDump) GetMessageType() api.MessageType {
867 return api.RequestMessage
870 func (m *IPMrouteDump) Size() (size int) {
874 size += 4 // m.Table.TableID
875 size += 1 // m.Table.IsIP6
876 size += 64 // m.Table.Name
879 func (m *IPMrouteDump) Marshal(b []byte) ([]byte, error) {
881 b = make([]byte, m.Size())
883 buf := codec.NewBuffer(b)
884 buf.EncodeUint32(m.Table.TableID)
885 buf.EncodeBool(m.Table.IsIP6)
886 buf.EncodeString(m.Table.Name, 64)
887 return buf.Bytes(), nil
889 func (m *IPMrouteDump) Unmarshal(b []byte) error {
890 buf := codec.NewBuffer(b)
891 m.Table.TableID = buf.DecodeUint32()
892 m.Table.IsIP6 = buf.DecodeBool()
893 m.Table.Name = buf.DecodeString(64)
897 // IPMtableDetails defines message 'ip_mtable_details'.
898 type IPMtableDetails struct {
899 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
902 func (m *IPMtableDetails) Reset() { *m = IPMtableDetails{} }
903 func (*IPMtableDetails) GetMessageName() string { return "ip_mtable_details" }
904 func (*IPMtableDetails) GetCrcString() string { return "b9d2e09e" }
905 func (*IPMtableDetails) GetMessageType() api.MessageType {
906 return api.RequestMessage
909 func (m *IPMtableDetails) Size() (size int) {
913 size += 4 // m.Table.TableID
914 size += 1 // m.Table.IsIP6
915 size += 64 // m.Table.Name
918 func (m *IPMtableDetails) Marshal(b []byte) ([]byte, error) {
920 b = make([]byte, m.Size())
922 buf := codec.NewBuffer(b)
923 buf.EncodeUint32(m.Table.TableID)
924 buf.EncodeBool(m.Table.IsIP6)
925 buf.EncodeString(m.Table.Name, 64)
926 return buf.Bytes(), nil
928 func (m *IPMtableDetails) Unmarshal(b []byte) error {
929 buf := codec.NewBuffer(b)
930 m.Table.TableID = buf.DecodeUint32()
931 m.Table.IsIP6 = buf.DecodeBool()
932 m.Table.Name = buf.DecodeString(64)
936 // IPMtableDump defines message 'ip_mtable_dump'.
937 type IPMtableDump struct{}
939 func (m *IPMtableDump) Reset() { *m = IPMtableDump{} }
940 func (*IPMtableDump) GetMessageName() string { return "ip_mtable_dump" }
941 func (*IPMtableDump) GetCrcString() string { return "51077d14" }
942 func (*IPMtableDump) GetMessageType() api.MessageType {
943 return api.RequestMessage
946 func (m *IPMtableDump) Size() (size int) {
952 func (m *IPMtableDump) Marshal(b []byte) ([]byte, error) {
954 b = make([]byte, m.Size())
956 buf := codec.NewBuffer(b)
957 return buf.Bytes(), nil
959 func (m *IPMtableDump) Unmarshal(b []byte) error {
963 // IPPuntPolice defines message 'ip_punt_police'.
964 type IPPuntPolice struct {
965 PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"`
966 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
967 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
970 func (m *IPPuntPolice) Reset() { *m = IPPuntPolice{} }
971 func (*IPPuntPolice) GetMessageName() string { return "ip_punt_police" }
972 func (*IPPuntPolice) GetCrcString() string { return "db867cea" }
973 func (*IPPuntPolice) GetMessageType() api.MessageType {
974 return api.RequestMessage
977 func (m *IPPuntPolice) Size() (size int) {
981 size += 4 // m.PolicerIndex
986 func (m *IPPuntPolice) Marshal(b []byte) ([]byte, error) {
988 b = make([]byte, m.Size())
990 buf := codec.NewBuffer(b)
991 buf.EncodeUint32(m.PolicerIndex)
992 buf.EncodeBool(m.IsAdd)
993 buf.EncodeBool(m.IsIP6)
994 return buf.Bytes(), nil
996 func (m *IPPuntPolice) Unmarshal(b []byte) error {
997 buf := codec.NewBuffer(b)
998 m.PolicerIndex = buf.DecodeUint32()
999 m.IsAdd = buf.DecodeBool()
1000 m.IsIP6 = buf.DecodeBool()
1004 // IPPuntPoliceReply defines message 'ip_punt_police_reply'.
1005 type IPPuntPoliceReply struct {
1006 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1009 func (m *IPPuntPoliceReply) Reset() { *m = IPPuntPoliceReply{} }
1010 func (*IPPuntPoliceReply) GetMessageName() string { return "ip_punt_police_reply" }
1011 func (*IPPuntPoliceReply) GetCrcString() string { return "e8d4e804" }
1012 func (*IPPuntPoliceReply) GetMessageType() api.MessageType {
1013 return api.ReplyMessage
1016 func (m *IPPuntPoliceReply) Size() (size int) {
1020 size += 4 // m.Retval
1023 func (m *IPPuntPoliceReply) Marshal(b []byte) ([]byte, error) {
1025 b = make([]byte, m.Size())
1027 buf := codec.NewBuffer(b)
1028 buf.EncodeInt32(m.Retval)
1029 return buf.Bytes(), nil
1031 func (m *IPPuntPoliceReply) Unmarshal(b []byte) error {
1032 buf := codec.NewBuffer(b)
1033 m.Retval = buf.DecodeInt32()
1037 // IPPuntRedirect defines message 'ip_punt_redirect'.
1038 type IPPuntRedirect struct {
1039 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
1040 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1043 func (m *IPPuntRedirect) Reset() { *m = IPPuntRedirect{} }
1044 func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" }
1045 func (*IPPuntRedirect) GetCrcString() string { return "a9a5592c" }
1046 func (*IPPuntRedirect) GetMessageType() api.MessageType {
1047 return api.RequestMessage
1050 func (m *IPPuntRedirect) Size() (size int) {
1054 size += 4 // m.Punt.RxSwIfIndex
1055 size += 4 // m.Punt.TxSwIfIndex
1056 size += 1 // m.Punt.Nh.Af
1057 size += 1 * 16 // m.Punt.Nh.Un
1058 size += 1 // m.IsAdd
1061 func (m *IPPuntRedirect) Marshal(b []byte) ([]byte, error) {
1063 b = make([]byte, m.Size())
1065 buf := codec.NewBuffer(b)
1066 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1067 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
1068 buf.EncodeUint8(uint8(m.Punt.Nh.Af))
1069 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16)
1070 buf.EncodeBool(m.IsAdd)
1071 return buf.Bytes(), nil
1073 func (m *IPPuntRedirect) Unmarshal(b []byte) error {
1074 buf := codec.NewBuffer(b)
1075 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1076 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1077 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1078 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1079 m.IsAdd = buf.DecodeBool()
1083 // IPPuntRedirectDetails defines message 'ip_punt_redirect_details'.
1084 type IPPuntRedirectDetails struct {
1085 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
1088 func (m *IPPuntRedirectDetails) Reset() { *m = IPPuntRedirectDetails{} }
1089 func (*IPPuntRedirectDetails) GetMessageName() string { return "ip_punt_redirect_details" }
1090 func (*IPPuntRedirectDetails) GetCrcString() string { return "3924f5d3" }
1091 func (*IPPuntRedirectDetails) GetMessageType() api.MessageType {
1092 return api.ReplyMessage
1095 func (m *IPPuntRedirectDetails) Size() (size int) {
1099 size += 4 // m.Punt.RxSwIfIndex
1100 size += 4 // m.Punt.TxSwIfIndex
1101 size += 1 // m.Punt.Nh.Af
1102 size += 1 * 16 // m.Punt.Nh.Un
1105 func (m *IPPuntRedirectDetails) Marshal(b []byte) ([]byte, error) {
1107 b = make([]byte, m.Size())
1109 buf := codec.NewBuffer(b)
1110 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1111 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
1112 buf.EncodeUint8(uint8(m.Punt.Nh.Af))
1113 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16)
1114 return buf.Bytes(), nil
1116 func (m *IPPuntRedirectDetails) Unmarshal(b []byte) error {
1117 buf := codec.NewBuffer(b)
1118 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1119 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1120 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1121 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1125 // IPPuntRedirectDump defines message 'ip_punt_redirect_dump'.
1126 type IPPuntRedirectDump struct {
1127 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1128 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
1131 func (m *IPPuntRedirectDump) Reset() { *m = IPPuntRedirectDump{} }
1132 func (*IPPuntRedirectDump) GetMessageName() string { return "ip_punt_redirect_dump" }
1133 func (*IPPuntRedirectDump) GetCrcString() string { return "2d033de4" }
1134 func (*IPPuntRedirectDump) GetMessageType() api.MessageType {
1135 return api.RequestMessage
1138 func (m *IPPuntRedirectDump) Size() (size int) {
1142 size += 4 // m.SwIfIndex
1143 size += 1 // m.IsIPv6
1146 func (m *IPPuntRedirectDump) Marshal(b []byte) ([]byte, error) {
1148 b = make([]byte, m.Size())
1150 buf := codec.NewBuffer(b)
1151 buf.EncodeUint32(uint32(m.SwIfIndex))
1152 buf.EncodeBool(m.IsIPv6)
1153 return buf.Bytes(), nil
1155 func (m *IPPuntRedirectDump) Unmarshal(b []byte) error {
1156 buf := codec.NewBuffer(b)
1157 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1158 m.IsIPv6 = buf.DecodeBool()
1162 // IPPuntRedirectReply defines message 'ip_punt_redirect_reply'.
1163 type IPPuntRedirectReply struct {
1164 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1167 func (m *IPPuntRedirectReply) Reset() { *m = IPPuntRedirectReply{} }
1168 func (*IPPuntRedirectReply) GetMessageName() string { return "ip_punt_redirect_reply" }
1169 func (*IPPuntRedirectReply) GetCrcString() string { return "e8d4e804" }
1170 func (*IPPuntRedirectReply) GetMessageType() api.MessageType {
1171 return api.ReplyMessage
1174 func (m *IPPuntRedirectReply) Size() (size int) {
1178 size += 4 // m.Retval
1181 func (m *IPPuntRedirectReply) Marshal(b []byte) ([]byte, error) {
1183 b = make([]byte, m.Size())
1185 buf := codec.NewBuffer(b)
1186 buf.EncodeInt32(m.Retval)
1187 return buf.Bytes(), nil
1189 func (m *IPPuntRedirectReply) Unmarshal(b []byte) error {
1190 buf := codec.NewBuffer(b)
1191 m.Retval = buf.DecodeInt32()
1195 // IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'.
1196 type IPReassemblyEnableDisable struct {
1197 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1198 EnableIP4 bool `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"`
1199 EnableIP6 bool `binapi:"bool,name=enable_ip6" json:"enable_ip6,omitempty"`
1200 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1203 func (m *IPReassemblyEnableDisable) Reset() { *m = IPReassemblyEnableDisable{} }
1204 func (*IPReassemblyEnableDisable) GetMessageName() string { return "ip_reassembly_enable_disable" }
1205 func (*IPReassemblyEnableDisable) GetCrcString() string { return "885c85a6" }
1206 func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType {
1207 return api.RequestMessage
1210 func (m *IPReassemblyEnableDisable) Size() (size int) {
1214 size += 4 // m.SwIfIndex
1215 size += 1 // m.EnableIP4
1216 size += 1 // m.EnableIP6
1220 func (m *IPReassemblyEnableDisable) Marshal(b []byte) ([]byte, error) {
1222 b = make([]byte, m.Size())
1224 buf := codec.NewBuffer(b)
1225 buf.EncodeUint32(uint32(m.SwIfIndex))
1226 buf.EncodeBool(m.EnableIP4)
1227 buf.EncodeBool(m.EnableIP6)
1228 buf.EncodeUint32(uint32(m.Type))
1229 return buf.Bytes(), nil
1231 func (m *IPReassemblyEnableDisable) Unmarshal(b []byte) error {
1232 buf := codec.NewBuffer(b)
1233 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1234 m.EnableIP4 = buf.DecodeBool()
1235 m.EnableIP6 = buf.DecodeBool()
1236 m.Type = IPReassType(buf.DecodeUint32())
1240 // IPReassemblyEnableDisableReply defines message 'ip_reassembly_enable_disable_reply'.
1241 type IPReassemblyEnableDisableReply struct {
1242 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1245 func (m *IPReassemblyEnableDisableReply) Reset() { *m = IPReassemblyEnableDisableReply{} }
1246 func (*IPReassemblyEnableDisableReply) GetMessageName() string {
1247 return "ip_reassembly_enable_disable_reply"
1249 func (*IPReassemblyEnableDisableReply) GetCrcString() string { return "e8d4e804" }
1250 func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType {
1251 return api.ReplyMessage
1254 func (m *IPReassemblyEnableDisableReply) Size() (size int) {
1258 size += 4 // m.Retval
1261 func (m *IPReassemblyEnableDisableReply) Marshal(b []byte) ([]byte, error) {
1263 b = make([]byte, m.Size())
1265 buf := codec.NewBuffer(b)
1266 buf.EncodeInt32(m.Retval)
1267 return buf.Bytes(), nil
1269 func (m *IPReassemblyEnableDisableReply) Unmarshal(b []byte) error {
1270 buf := codec.NewBuffer(b)
1271 m.Retval = buf.DecodeInt32()
1275 // IPReassemblyGet defines message 'ip_reassembly_get'.
1276 type IPReassemblyGet struct {
1277 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1278 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1281 func (m *IPReassemblyGet) Reset() { *m = IPReassemblyGet{} }
1282 func (*IPReassemblyGet) GetMessageName() string { return "ip_reassembly_get" }
1283 func (*IPReassemblyGet) GetCrcString() string { return "ea13ff63" }
1284 func (*IPReassemblyGet) GetMessageType() api.MessageType {
1285 return api.RequestMessage
1288 func (m *IPReassemblyGet) Size() (size int) {
1292 size += 1 // m.IsIP6
1296 func (m *IPReassemblyGet) Marshal(b []byte) ([]byte, error) {
1298 b = make([]byte, m.Size())
1300 buf := codec.NewBuffer(b)
1301 buf.EncodeBool(m.IsIP6)
1302 buf.EncodeUint32(uint32(m.Type))
1303 return buf.Bytes(), nil
1305 func (m *IPReassemblyGet) Unmarshal(b []byte) error {
1306 buf := codec.NewBuffer(b)
1307 m.IsIP6 = buf.DecodeBool()
1308 m.Type = IPReassType(buf.DecodeUint32())
1312 // IPReassemblyGetReply defines message 'ip_reassembly_get_reply'.
1313 type IPReassemblyGetReply struct {
1314 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1315 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
1316 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
1317 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
1318 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
1319 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1322 func (m *IPReassemblyGetReply) Reset() { *m = IPReassemblyGetReply{} }
1323 func (*IPReassemblyGetReply) GetMessageName() string { return "ip_reassembly_get_reply" }
1324 func (*IPReassemblyGetReply) GetCrcString() string { return "d5eb8d34" }
1325 func (*IPReassemblyGetReply) GetMessageType() api.MessageType {
1326 return api.ReplyMessage
1329 func (m *IPReassemblyGetReply) Size() (size int) {
1333 size += 4 // m.Retval
1334 size += 4 // m.TimeoutMs
1335 size += 4 // m.MaxReassemblies
1336 size += 4 // m.MaxReassemblyLength
1337 size += 4 // m.ExpireWalkIntervalMs
1338 size += 1 // m.IsIP6
1341 func (m *IPReassemblyGetReply) Marshal(b []byte) ([]byte, error) {
1343 b = make([]byte, m.Size())
1345 buf := codec.NewBuffer(b)
1346 buf.EncodeInt32(m.Retval)
1347 buf.EncodeUint32(m.TimeoutMs)
1348 buf.EncodeUint32(m.MaxReassemblies)
1349 buf.EncodeUint32(m.MaxReassemblyLength)
1350 buf.EncodeUint32(m.ExpireWalkIntervalMs)
1351 buf.EncodeBool(m.IsIP6)
1352 return buf.Bytes(), nil
1354 func (m *IPReassemblyGetReply) Unmarshal(b []byte) error {
1355 buf := codec.NewBuffer(b)
1356 m.Retval = buf.DecodeInt32()
1357 m.TimeoutMs = buf.DecodeUint32()
1358 m.MaxReassemblies = buf.DecodeUint32()
1359 m.MaxReassemblyLength = buf.DecodeUint32()
1360 m.ExpireWalkIntervalMs = buf.DecodeUint32()
1361 m.IsIP6 = buf.DecodeBool()
1365 // IPReassemblySet defines message 'ip_reassembly_set'.
1366 type IPReassemblySet struct {
1367 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
1368 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
1369 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
1370 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
1371 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1372 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1375 func (m *IPReassemblySet) Reset() { *m = IPReassemblySet{} }
1376 func (*IPReassemblySet) GetMessageName() string { return "ip_reassembly_set" }
1377 func (*IPReassemblySet) GetCrcString() string { return "16467d25" }
1378 func (*IPReassemblySet) GetMessageType() api.MessageType {
1379 return api.RequestMessage
1382 func (m *IPReassemblySet) Size() (size int) {
1386 size += 4 // m.TimeoutMs
1387 size += 4 // m.MaxReassemblies
1388 size += 4 // m.MaxReassemblyLength
1389 size += 4 // m.ExpireWalkIntervalMs
1390 size += 1 // m.IsIP6
1394 func (m *IPReassemblySet) Marshal(b []byte) ([]byte, error) {
1396 b = make([]byte, m.Size())
1398 buf := codec.NewBuffer(b)
1399 buf.EncodeUint32(m.TimeoutMs)
1400 buf.EncodeUint32(m.MaxReassemblies)
1401 buf.EncodeUint32(m.MaxReassemblyLength)
1402 buf.EncodeUint32(m.ExpireWalkIntervalMs)
1403 buf.EncodeBool(m.IsIP6)
1404 buf.EncodeUint32(uint32(m.Type))
1405 return buf.Bytes(), nil
1407 func (m *IPReassemblySet) Unmarshal(b []byte) error {
1408 buf := codec.NewBuffer(b)
1409 m.TimeoutMs = buf.DecodeUint32()
1410 m.MaxReassemblies = buf.DecodeUint32()
1411 m.MaxReassemblyLength = buf.DecodeUint32()
1412 m.ExpireWalkIntervalMs = buf.DecodeUint32()
1413 m.IsIP6 = buf.DecodeBool()
1414 m.Type = IPReassType(buf.DecodeUint32())
1418 // IPReassemblySetReply defines message 'ip_reassembly_set_reply'.
1419 type IPReassemblySetReply struct {
1420 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1423 func (m *IPReassemblySetReply) Reset() { *m = IPReassemblySetReply{} }
1424 func (*IPReassemblySetReply) GetMessageName() string { return "ip_reassembly_set_reply" }
1425 func (*IPReassemblySetReply) GetCrcString() string { return "e8d4e804" }
1426 func (*IPReassemblySetReply) GetMessageType() api.MessageType {
1427 return api.ReplyMessage
1430 func (m *IPReassemblySetReply) Size() (size int) {
1434 size += 4 // m.Retval
1437 func (m *IPReassemblySetReply) Marshal(b []byte) ([]byte, error) {
1439 b = make([]byte, m.Size())
1441 buf := codec.NewBuffer(b)
1442 buf.EncodeInt32(m.Retval)
1443 return buf.Bytes(), nil
1445 func (m *IPReassemblySetReply) Unmarshal(b []byte) error {
1446 buf := codec.NewBuffer(b)
1447 m.Retval = buf.DecodeInt32()
1451 // IPRouteAddDel defines message 'ip_route_add_del'.
1452 type IPRouteAddDel struct {
1453 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1454 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
1455 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
1458 func (m *IPRouteAddDel) Reset() { *m = IPRouteAddDel{} }
1459 func (*IPRouteAddDel) GetMessageName() string { return "ip_route_add_del" }
1460 func (*IPRouteAddDel) GetCrcString() string { return "c1ff832d" }
1461 func (*IPRouteAddDel) GetMessageType() api.MessageType {
1462 return api.RequestMessage
1465 func (m *IPRouteAddDel) Size() (size int) {
1469 size += 1 // m.IsAdd
1470 size += 1 // m.IsMultipath
1471 size += 4 // m.Route.TableID
1472 size += 4 // m.Route.StatsIndex
1473 size += 1 // m.Route.Prefix.Address.Af
1474 size += 1 * 16 // m.Route.Prefix.Address.Un
1475 size += 1 // m.Route.Prefix.Len
1476 size += 1 // m.Route.NPaths
1477 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
1478 var s2 fib_types.FibPath
1480 if j2 < len(m.Route.Paths) {
1481 s2 = m.Route.Paths[j2]
1483 size += 4 // s2.SwIfIndex
1484 size += 4 // s2.TableID
1485 size += 4 // s2.RpfID
1486 size += 1 // s2.Weight
1487 size += 1 // s2.Preference
1488 size += 4 // s2.Type
1489 size += 4 // s2.Flags
1490 size += 4 // s2.Proto
1491 size += 1 * 16 // s2.Nh.Address
1492 size += 4 // s2.Nh.ViaLabel
1493 size += 4 // s2.Nh.ObjID
1494 size += 4 // s2.Nh.ClassifyTableIndex
1495 size += 1 // s2.NLabels
1496 for j3 := 0; j3 < 16; j3++ {
1497 size += 1 // s2.LabelStack[j3].IsUniform
1498 size += 4 // s2.LabelStack[j3].Label
1499 size += 1 // s2.LabelStack[j3].TTL
1500 size += 1 // s2.LabelStack[j3].Exp
1505 func (m *IPRouteAddDel) Marshal(b []byte) ([]byte, error) {
1507 b = make([]byte, m.Size())
1509 buf := codec.NewBuffer(b)
1510 buf.EncodeBool(m.IsAdd)
1511 buf.EncodeBool(m.IsMultipath)
1512 buf.EncodeUint32(m.Route.TableID)
1513 buf.EncodeUint32(m.Route.StatsIndex)
1514 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
1515 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
1516 buf.EncodeUint8(m.Route.Prefix.Len)
1517 buf.EncodeUint8(uint8(len(m.Route.Paths)))
1518 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1519 var v1 fib_types.FibPath // Paths
1520 if j1 < len(m.Route.Paths) {
1521 v1 = m.Route.Paths[j1]
1523 buf.EncodeUint32(v1.SwIfIndex)
1524 buf.EncodeUint32(v1.TableID)
1525 buf.EncodeUint32(v1.RpfID)
1526 buf.EncodeUint8(v1.Weight)
1527 buf.EncodeUint8(v1.Preference)
1528 buf.EncodeUint32(uint32(v1.Type))
1529 buf.EncodeUint32(uint32(v1.Flags))
1530 buf.EncodeUint32(uint32(v1.Proto))
1531 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
1532 buf.EncodeUint32(v1.Nh.ViaLabel)
1533 buf.EncodeUint32(v1.Nh.ObjID)
1534 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
1535 buf.EncodeUint8(v1.NLabels)
1536 for j2 := 0; j2 < 16; j2++ {
1537 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
1538 buf.EncodeUint32(v1.LabelStack[j2].Label)
1539 buf.EncodeUint8(v1.LabelStack[j2].TTL)
1540 buf.EncodeUint8(v1.LabelStack[j2].Exp)
1543 return buf.Bytes(), nil
1545 func (m *IPRouteAddDel) Unmarshal(b []byte) error {
1546 buf := codec.NewBuffer(b)
1547 m.IsAdd = buf.DecodeBool()
1548 m.IsMultipath = buf.DecodeBool()
1549 m.Route.TableID = buf.DecodeUint32()
1550 m.Route.StatsIndex = buf.DecodeUint32()
1551 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1552 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1553 m.Route.Prefix.Len = buf.DecodeUint8()
1554 m.Route.NPaths = buf.DecodeUint8()
1555 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
1556 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1557 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
1558 m.Route.Paths[j1].TableID = buf.DecodeUint32()
1559 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
1560 m.Route.Paths[j1].Weight = buf.DecodeUint8()
1561 m.Route.Paths[j1].Preference = buf.DecodeUint8()
1562 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
1563 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1564 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1565 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1566 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
1567 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
1568 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
1569 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
1570 for j2 := 0; j2 < 16; j2++ {
1571 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
1572 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
1573 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
1574 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1580 // IPRouteAddDelReply defines message 'ip_route_add_del_reply'.
1581 type IPRouteAddDelReply struct {
1582 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1583 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
1586 func (m *IPRouteAddDelReply) Reset() { *m = IPRouteAddDelReply{} }
1587 func (*IPRouteAddDelReply) GetMessageName() string { return "ip_route_add_del_reply" }
1588 func (*IPRouteAddDelReply) GetCrcString() string { return "1992deab" }
1589 func (*IPRouteAddDelReply) GetMessageType() api.MessageType {
1590 return api.ReplyMessage
1593 func (m *IPRouteAddDelReply) Size() (size int) {
1597 size += 4 // m.Retval
1598 size += 4 // m.StatsIndex
1601 func (m *IPRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
1603 b = make([]byte, m.Size())
1605 buf := codec.NewBuffer(b)
1606 buf.EncodeInt32(m.Retval)
1607 buf.EncodeUint32(m.StatsIndex)
1608 return buf.Bytes(), nil
1610 func (m *IPRouteAddDelReply) Unmarshal(b []byte) error {
1611 buf := codec.NewBuffer(b)
1612 m.Retval = buf.DecodeInt32()
1613 m.StatsIndex = buf.DecodeUint32()
1617 // IPRouteDetails defines message 'ip_route_details'.
1618 type IPRouteDetails struct {
1619 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
1622 func (m *IPRouteDetails) Reset() { *m = IPRouteDetails{} }
1623 func (*IPRouteDetails) GetMessageName() string { return "ip_route_details" }
1624 func (*IPRouteDetails) GetCrcString() string { return "d1ffaae1" }
1625 func (*IPRouteDetails) GetMessageType() api.MessageType {
1626 return api.ReplyMessage
1629 func (m *IPRouteDetails) Size() (size int) {
1633 size += 4 // m.Route.TableID
1634 size += 4 // m.Route.StatsIndex
1635 size += 1 // m.Route.Prefix.Address.Af
1636 size += 1 * 16 // m.Route.Prefix.Address.Un
1637 size += 1 // m.Route.Prefix.Len
1638 size += 1 // m.Route.NPaths
1639 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
1640 var s2 fib_types.FibPath
1642 if j2 < len(m.Route.Paths) {
1643 s2 = m.Route.Paths[j2]
1645 size += 4 // s2.SwIfIndex
1646 size += 4 // s2.TableID
1647 size += 4 // s2.RpfID
1648 size += 1 // s2.Weight
1649 size += 1 // s2.Preference
1650 size += 4 // s2.Type
1651 size += 4 // s2.Flags
1652 size += 4 // s2.Proto
1653 size += 1 * 16 // s2.Nh.Address
1654 size += 4 // s2.Nh.ViaLabel
1655 size += 4 // s2.Nh.ObjID
1656 size += 4 // s2.Nh.ClassifyTableIndex
1657 size += 1 // s2.NLabels
1658 for j3 := 0; j3 < 16; j3++ {
1659 size += 1 // s2.LabelStack[j3].IsUniform
1660 size += 4 // s2.LabelStack[j3].Label
1661 size += 1 // s2.LabelStack[j3].TTL
1662 size += 1 // s2.LabelStack[j3].Exp
1667 func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) {
1669 b = make([]byte, m.Size())
1671 buf := codec.NewBuffer(b)
1672 buf.EncodeUint32(m.Route.TableID)
1673 buf.EncodeUint32(m.Route.StatsIndex)
1674 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
1675 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
1676 buf.EncodeUint8(m.Route.Prefix.Len)
1677 buf.EncodeUint8(uint8(len(m.Route.Paths)))
1678 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1679 var v1 fib_types.FibPath // Paths
1680 if j1 < len(m.Route.Paths) {
1681 v1 = m.Route.Paths[j1]
1683 buf.EncodeUint32(v1.SwIfIndex)
1684 buf.EncodeUint32(v1.TableID)
1685 buf.EncodeUint32(v1.RpfID)
1686 buf.EncodeUint8(v1.Weight)
1687 buf.EncodeUint8(v1.Preference)
1688 buf.EncodeUint32(uint32(v1.Type))
1689 buf.EncodeUint32(uint32(v1.Flags))
1690 buf.EncodeUint32(uint32(v1.Proto))
1691 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
1692 buf.EncodeUint32(v1.Nh.ViaLabel)
1693 buf.EncodeUint32(v1.Nh.ObjID)
1694 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
1695 buf.EncodeUint8(v1.NLabels)
1696 for j2 := 0; j2 < 16; j2++ {
1697 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
1698 buf.EncodeUint32(v1.LabelStack[j2].Label)
1699 buf.EncodeUint8(v1.LabelStack[j2].TTL)
1700 buf.EncodeUint8(v1.LabelStack[j2].Exp)
1703 return buf.Bytes(), nil
1705 func (m *IPRouteDetails) Unmarshal(b []byte) error {
1706 buf := codec.NewBuffer(b)
1707 m.Route.TableID = buf.DecodeUint32()
1708 m.Route.StatsIndex = buf.DecodeUint32()
1709 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1710 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1711 m.Route.Prefix.Len = buf.DecodeUint8()
1712 m.Route.NPaths = buf.DecodeUint8()
1713 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
1714 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1715 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
1716 m.Route.Paths[j1].TableID = buf.DecodeUint32()
1717 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
1718 m.Route.Paths[j1].Weight = buf.DecodeUint8()
1719 m.Route.Paths[j1].Preference = buf.DecodeUint8()
1720 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
1721 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1722 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1723 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1724 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
1725 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
1726 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
1727 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
1728 for j2 := 0; j2 < 16; j2++ {
1729 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
1730 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
1731 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
1732 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1738 // IPRouteDump defines message 'ip_route_dump'.
1739 type IPRouteDump struct {
1740 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
1743 func (m *IPRouteDump) Reset() { *m = IPRouteDump{} }
1744 func (*IPRouteDump) GetMessageName() string { return "ip_route_dump" }
1745 func (*IPRouteDump) GetCrcString() string { return "b9d2e09e" }
1746 func (*IPRouteDump) GetMessageType() api.MessageType {
1747 return api.RequestMessage
1750 func (m *IPRouteDump) Size() (size int) {
1754 size += 4 // m.Table.TableID
1755 size += 1 // m.Table.IsIP6
1756 size += 64 // m.Table.Name
1759 func (m *IPRouteDump) Marshal(b []byte) ([]byte, error) {
1761 b = make([]byte, m.Size())
1763 buf := codec.NewBuffer(b)
1764 buf.EncodeUint32(m.Table.TableID)
1765 buf.EncodeBool(m.Table.IsIP6)
1766 buf.EncodeString(m.Table.Name, 64)
1767 return buf.Bytes(), nil
1769 func (m *IPRouteDump) Unmarshal(b []byte) error {
1770 buf := codec.NewBuffer(b)
1771 m.Table.TableID = buf.DecodeUint32()
1772 m.Table.IsIP6 = buf.DecodeBool()
1773 m.Table.Name = buf.DecodeString(64)
1777 // IPRouteLookup defines message 'ip_route_lookup'.
1778 type IPRouteLookup struct {
1779 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
1780 Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"`
1781 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
1784 func (m *IPRouteLookup) Reset() { *m = IPRouteLookup{} }
1785 func (*IPRouteLookup) GetMessageName() string { return "ip_route_lookup" }
1786 func (*IPRouteLookup) GetCrcString() string { return "e2986185" }
1787 func (*IPRouteLookup) GetMessageType() api.MessageType {
1788 return api.RequestMessage
1791 func (m *IPRouteLookup) Size() (size int) {
1795 size += 4 // m.TableID
1796 size += 1 // m.Exact
1797 size += 1 // m.Prefix.Address.Af
1798 size += 1 * 16 // m.Prefix.Address.Un
1799 size += 1 // m.Prefix.Len
1802 func (m *IPRouteLookup) Marshal(b []byte) ([]byte, error) {
1804 b = make([]byte, m.Size())
1806 buf := codec.NewBuffer(b)
1807 buf.EncodeUint32(m.TableID)
1808 buf.EncodeUint8(m.Exact)
1809 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
1810 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
1811 buf.EncodeUint8(m.Prefix.Len)
1812 return buf.Bytes(), nil
1814 func (m *IPRouteLookup) Unmarshal(b []byte) error {
1815 buf := codec.NewBuffer(b)
1816 m.TableID = buf.DecodeUint32()
1817 m.Exact = buf.DecodeUint8()
1818 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1819 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1820 m.Prefix.Len = buf.DecodeUint8()
1824 // IPRouteLookupReply defines message 'ip_route_lookup_reply'.
1825 type IPRouteLookupReply struct {
1826 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1827 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
1830 func (m *IPRouteLookupReply) Reset() { *m = IPRouteLookupReply{} }
1831 func (*IPRouteLookupReply) GetMessageName() string { return "ip_route_lookup_reply" }
1832 func (*IPRouteLookupReply) GetCrcString() string { return "ae99de8e" }
1833 func (*IPRouteLookupReply) GetMessageType() api.MessageType {
1834 return api.ReplyMessage
1837 func (m *IPRouteLookupReply) Size() (size int) {
1841 size += 4 // m.Retval
1842 size += 4 // m.Route.TableID
1843 size += 4 // m.Route.StatsIndex
1844 size += 1 // m.Route.Prefix.Address.Af
1845 size += 1 * 16 // m.Route.Prefix.Address.Un
1846 size += 1 // m.Route.Prefix.Len
1847 size += 1 // m.Route.NPaths
1848 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
1849 var s2 fib_types.FibPath
1851 if j2 < len(m.Route.Paths) {
1852 s2 = m.Route.Paths[j2]
1854 size += 4 // s2.SwIfIndex
1855 size += 4 // s2.TableID
1856 size += 4 // s2.RpfID
1857 size += 1 // s2.Weight
1858 size += 1 // s2.Preference
1859 size += 4 // s2.Type
1860 size += 4 // s2.Flags
1861 size += 4 // s2.Proto
1862 size += 1 * 16 // s2.Nh.Address
1863 size += 4 // s2.Nh.ViaLabel
1864 size += 4 // s2.Nh.ObjID
1865 size += 4 // s2.Nh.ClassifyTableIndex
1866 size += 1 // s2.NLabels
1867 for j3 := 0; j3 < 16; j3++ {
1868 size += 1 // s2.LabelStack[j3].IsUniform
1869 size += 4 // s2.LabelStack[j3].Label
1870 size += 1 // s2.LabelStack[j3].TTL
1871 size += 1 // s2.LabelStack[j3].Exp
1876 func (m *IPRouteLookupReply) Marshal(b []byte) ([]byte, error) {
1878 b = make([]byte, m.Size())
1880 buf := codec.NewBuffer(b)
1881 buf.EncodeInt32(m.Retval)
1882 buf.EncodeUint32(m.Route.TableID)
1883 buf.EncodeUint32(m.Route.StatsIndex)
1884 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
1885 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
1886 buf.EncodeUint8(m.Route.Prefix.Len)
1887 buf.EncodeUint8(uint8(len(m.Route.Paths)))
1888 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1889 var v1 fib_types.FibPath // Paths
1890 if j1 < len(m.Route.Paths) {
1891 v1 = m.Route.Paths[j1]
1893 buf.EncodeUint32(v1.SwIfIndex)
1894 buf.EncodeUint32(v1.TableID)
1895 buf.EncodeUint32(v1.RpfID)
1896 buf.EncodeUint8(v1.Weight)
1897 buf.EncodeUint8(v1.Preference)
1898 buf.EncodeUint32(uint32(v1.Type))
1899 buf.EncodeUint32(uint32(v1.Flags))
1900 buf.EncodeUint32(uint32(v1.Proto))
1901 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
1902 buf.EncodeUint32(v1.Nh.ViaLabel)
1903 buf.EncodeUint32(v1.Nh.ObjID)
1904 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
1905 buf.EncodeUint8(v1.NLabels)
1906 for j2 := 0; j2 < 16; j2++ {
1907 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
1908 buf.EncodeUint32(v1.LabelStack[j2].Label)
1909 buf.EncodeUint8(v1.LabelStack[j2].TTL)
1910 buf.EncodeUint8(v1.LabelStack[j2].Exp)
1913 return buf.Bytes(), nil
1915 func (m *IPRouteLookupReply) Unmarshal(b []byte) error {
1916 buf := codec.NewBuffer(b)
1917 m.Retval = buf.DecodeInt32()
1918 m.Route.TableID = buf.DecodeUint32()
1919 m.Route.StatsIndex = buf.DecodeUint32()
1920 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1921 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1922 m.Route.Prefix.Len = buf.DecodeUint8()
1923 m.Route.NPaths = buf.DecodeUint8()
1924 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
1925 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1926 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
1927 m.Route.Paths[j1].TableID = buf.DecodeUint32()
1928 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
1929 m.Route.Paths[j1].Weight = buf.DecodeUint8()
1930 m.Route.Paths[j1].Preference = buf.DecodeUint8()
1931 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
1932 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1933 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1934 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1935 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
1936 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
1937 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
1938 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
1939 for j2 := 0; j2 < 16; j2++ {
1940 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
1941 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
1942 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
1943 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1949 // IPSourceAndPortRangeCheckAddDel defines message 'ip_source_and_port_range_check_add_del'.
1950 type IPSourceAndPortRangeCheckAddDel struct {
1951 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1952 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
1953 NumberOfRanges uint8 `binapi:"u8,name=number_of_ranges" json:"number_of_ranges,omitempty"`
1954 LowPorts []uint16 `binapi:"u16[32],name=low_ports" json:"low_ports,omitempty"`
1955 HighPorts []uint16 `binapi:"u16[32],name=high_ports" json:"high_ports,omitempty"`
1956 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
1959 func (m *IPSourceAndPortRangeCheckAddDel) Reset() { *m = IPSourceAndPortRangeCheckAddDel{} }
1960 func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string {
1961 return "ip_source_and_port_range_check_add_del"
1963 func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "8bfc76f2" }
1964 func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType {
1965 return api.RequestMessage
1968 func (m *IPSourceAndPortRangeCheckAddDel) Size() (size int) {
1972 size += 1 // m.IsAdd
1973 size += 1 // m.Prefix.Address.Af
1974 size += 1 * 16 // m.Prefix.Address.Un
1975 size += 1 // m.Prefix.Len
1976 size += 1 // m.NumberOfRanges
1977 size += 2 * 32 // m.LowPorts
1978 size += 2 * 32 // m.HighPorts
1979 size += 4 // m.VrfID
1982 func (m *IPSourceAndPortRangeCheckAddDel) Marshal(b []byte) ([]byte, error) {
1984 b = make([]byte, m.Size())
1986 buf := codec.NewBuffer(b)
1987 buf.EncodeBool(m.IsAdd)
1988 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
1989 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
1990 buf.EncodeUint8(m.Prefix.Len)
1991 buf.EncodeUint8(m.NumberOfRanges)
1992 for i := 0; i < 32; i++ {
1994 if i < len(m.LowPorts) {
1995 x = uint16(m.LowPorts[i])
1999 for i := 0; i < 32; i++ {
2001 if i < len(m.HighPorts) {
2002 x = uint16(m.HighPorts[i])
2006 buf.EncodeUint32(m.VrfID)
2007 return buf.Bytes(), nil
2009 func (m *IPSourceAndPortRangeCheckAddDel) Unmarshal(b []byte) error {
2010 buf := codec.NewBuffer(b)
2011 m.IsAdd = buf.DecodeBool()
2012 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2013 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2014 m.Prefix.Len = buf.DecodeUint8()
2015 m.NumberOfRanges = buf.DecodeUint8()
2016 m.LowPorts = make([]uint16, 32)
2017 for i := 0; i < len(m.LowPorts); i++ {
2018 m.LowPorts[i] = buf.DecodeUint16()
2020 m.HighPorts = make([]uint16, 32)
2021 for i := 0; i < len(m.HighPorts); i++ {
2022 m.HighPorts[i] = buf.DecodeUint16()
2024 m.VrfID = buf.DecodeUint32()
2028 // IPSourceAndPortRangeCheckAddDelReply defines message 'ip_source_and_port_range_check_add_del_reply'.
2029 type IPSourceAndPortRangeCheckAddDelReply struct {
2030 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2033 func (m *IPSourceAndPortRangeCheckAddDelReply) Reset() { *m = IPSourceAndPortRangeCheckAddDelReply{} }
2034 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string {
2035 return "ip_source_and_port_range_check_add_del_reply"
2037 func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { return "e8d4e804" }
2038 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType {
2039 return api.ReplyMessage
2042 func (m *IPSourceAndPortRangeCheckAddDelReply) Size() (size int) {
2046 size += 4 // m.Retval
2049 func (m *IPSourceAndPortRangeCheckAddDelReply) Marshal(b []byte) ([]byte, error) {
2051 b = make([]byte, m.Size())
2053 buf := codec.NewBuffer(b)
2054 buf.EncodeInt32(m.Retval)
2055 return buf.Bytes(), nil
2057 func (m *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(b []byte) error {
2058 buf := codec.NewBuffer(b)
2059 m.Retval = buf.DecodeInt32()
2063 // IPSourceAndPortRangeCheckInterfaceAddDel defines message 'ip_source_and_port_range_check_interface_add_del'.
2064 type IPSourceAndPortRangeCheckInterfaceAddDel struct {
2065 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2066 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2067 TCPInVrfID uint32 `binapi:"u32,name=tcp_in_vrf_id" json:"tcp_in_vrf_id,omitempty"`
2068 TCPOutVrfID uint32 `binapi:"u32,name=tcp_out_vrf_id" json:"tcp_out_vrf_id,omitempty"`
2069 UDPInVrfID uint32 `binapi:"u32,name=udp_in_vrf_id" json:"udp_in_vrf_id,omitempty"`
2070 UDPOutVrfID uint32 `binapi:"u32,name=udp_out_vrf_id" json:"udp_out_vrf_id,omitempty"`
2073 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Reset() {
2074 *m = IPSourceAndPortRangeCheckInterfaceAddDel{}
2076 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string {
2077 return "ip_source_and_port_range_check_interface_add_del"
2079 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { return "e1ba8987" }
2080 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType {
2081 return api.RequestMessage
2084 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() (size int) {
2088 size += 1 // m.IsAdd
2089 size += 4 // m.SwIfIndex
2090 size += 4 // m.TCPInVrfID
2091 size += 4 // m.TCPOutVrfID
2092 size += 4 // m.UDPInVrfID
2093 size += 4 // m.UDPOutVrfID
2096 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
2098 b = make([]byte, m.Size())
2100 buf := codec.NewBuffer(b)
2101 buf.EncodeBool(m.IsAdd)
2102 buf.EncodeUint32(uint32(m.SwIfIndex))
2103 buf.EncodeUint32(m.TCPInVrfID)
2104 buf.EncodeUint32(m.TCPOutVrfID)
2105 buf.EncodeUint32(m.UDPInVrfID)
2106 buf.EncodeUint32(m.UDPOutVrfID)
2107 return buf.Bytes(), nil
2109 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Unmarshal(b []byte) error {
2110 buf := codec.NewBuffer(b)
2111 m.IsAdd = buf.DecodeBool()
2112 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2113 m.TCPInVrfID = buf.DecodeUint32()
2114 m.TCPOutVrfID = buf.DecodeUint32()
2115 m.UDPInVrfID = buf.DecodeUint32()
2116 m.UDPOutVrfID = buf.DecodeUint32()
2120 // IPSourceAndPortRangeCheckInterfaceAddDelReply defines message 'ip_source_and_port_range_check_interface_add_del_reply'.
2121 type IPSourceAndPortRangeCheckInterfaceAddDelReply struct {
2122 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2125 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Reset() {
2126 *m = IPSourceAndPortRangeCheckInterfaceAddDelReply{}
2128 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string {
2129 return "ip_source_and_port_range_check_interface_add_del_reply"
2131 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
2132 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType {
2133 return api.ReplyMessage
2136 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Size() (size int) {
2140 size += 4 // m.Retval
2143 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
2145 b = make([]byte, m.Size())
2147 buf := codec.NewBuffer(b)
2148 buf.EncodeInt32(m.Retval)
2149 return buf.Bytes(), nil
2151 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(b []byte) error {
2152 buf := codec.NewBuffer(b)
2153 m.Retval = buf.DecodeInt32()
2157 // IPTableAddDel defines message 'ip_table_add_del'.
2158 type IPTableAddDel struct {
2159 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2160 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2163 func (m *IPTableAddDel) Reset() { *m = IPTableAddDel{} }
2164 func (*IPTableAddDel) GetMessageName() string { return "ip_table_add_del" }
2165 func (*IPTableAddDel) GetCrcString() string { return "0ffdaec0" }
2166 func (*IPTableAddDel) GetMessageType() api.MessageType {
2167 return api.RequestMessage
2170 func (m *IPTableAddDel) Size() (size int) {
2174 size += 1 // m.IsAdd
2175 size += 4 // m.Table.TableID
2176 size += 1 // m.Table.IsIP6
2177 size += 64 // m.Table.Name
2180 func (m *IPTableAddDel) Marshal(b []byte) ([]byte, error) {
2182 b = make([]byte, m.Size())
2184 buf := codec.NewBuffer(b)
2185 buf.EncodeBool(m.IsAdd)
2186 buf.EncodeUint32(m.Table.TableID)
2187 buf.EncodeBool(m.Table.IsIP6)
2188 buf.EncodeString(m.Table.Name, 64)
2189 return buf.Bytes(), nil
2191 func (m *IPTableAddDel) Unmarshal(b []byte) error {
2192 buf := codec.NewBuffer(b)
2193 m.IsAdd = buf.DecodeBool()
2194 m.Table.TableID = buf.DecodeUint32()
2195 m.Table.IsIP6 = buf.DecodeBool()
2196 m.Table.Name = buf.DecodeString(64)
2200 // IPTableAddDelReply defines message 'ip_table_add_del_reply'.
2201 type IPTableAddDelReply struct {
2202 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2205 func (m *IPTableAddDelReply) Reset() { *m = IPTableAddDelReply{} }
2206 func (*IPTableAddDelReply) GetMessageName() string { return "ip_table_add_del_reply" }
2207 func (*IPTableAddDelReply) GetCrcString() string { return "e8d4e804" }
2208 func (*IPTableAddDelReply) GetMessageType() api.MessageType {
2209 return api.ReplyMessage
2212 func (m *IPTableAddDelReply) Size() (size int) {
2216 size += 4 // m.Retval
2219 func (m *IPTableAddDelReply) Marshal(b []byte) ([]byte, error) {
2221 b = make([]byte, m.Size())
2223 buf := codec.NewBuffer(b)
2224 buf.EncodeInt32(m.Retval)
2225 return buf.Bytes(), nil
2227 func (m *IPTableAddDelReply) Unmarshal(b []byte) error {
2228 buf := codec.NewBuffer(b)
2229 m.Retval = buf.DecodeInt32()
2233 // IPTableDetails defines message 'ip_table_details'.
2234 type IPTableDetails struct {
2235 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2238 func (m *IPTableDetails) Reset() { *m = IPTableDetails{} }
2239 func (*IPTableDetails) GetMessageName() string { return "ip_table_details" }
2240 func (*IPTableDetails) GetCrcString() string { return "c79fca0f" }
2241 func (*IPTableDetails) GetMessageType() api.MessageType {
2242 return api.ReplyMessage
2245 func (m *IPTableDetails) Size() (size int) {
2249 size += 4 // m.Table.TableID
2250 size += 1 // m.Table.IsIP6
2251 size += 64 // m.Table.Name
2254 func (m *IPTableDetails) Marshal(b []byte) ([]byte, error) {
2256 b = make([]byte, m.Size())
2258 buf := codec.NewBuffer(b)
2259 buf.EncodeUint32(m.Table.TableID)
2260 buf.EncodeBool(m.Table.IsIP6)
2261 buf.EncodeString(m.Table.Name, 64)
2262 return buf.Bytes(), nil
2264 func (m *IPTableDetails) Unmarshal(b []byte) error {
2265 buf := codec.NewBuffer(b)
2266 m.Table.TableID = buf.DecodeUint32()
2267 m.Table.IsIP6 = buf.DecodeBool()
2268 m.Table.Name = buf.DecodeString(64)
2272 // IPTableDump defines message 'ip_table_dump'.
2273 type IPTableDump struct{}
2275 func (m *IPTableDump) Reset() { *m = IPTableDump{} }
2276 func (*IPTableDump) GetMessageName() string { return "ip_table_dump" }
2277 func (*IPTableDump) GetCrcString() string { return "51077d14" }
2278 func (*IPTableDump) GetMessageType() api.MessageType {
2279 return api.RequestMessage
2282 func (m *IPTableDump) Size() (size int) {
2288 func (m *IPTableDump) Marshal(b []byte) ([]byte, error) {
2290 b = make([]byte, m.Size())
2292 buf := codec.NewBuffer(b)
2293 return buf.Bytes(), nil
2295 func (m *IPTableDump) Unmarshal(b []byte) error {
2299 // IPTableFlush defines message 'ip_table_flush'.
2300 type IPTableFlush struct {
2301 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2304 func (m *IPTableFlush) Reset() { *m = IPTableFlush{} }
2305 func (*IPTableFlush) GetMessageName() string { return "ip_table_flush" }
2306 func (*IPTableFlush) GetCrcString() string { return "b9d2e09e" }
2307 func (*IPTableFlush) GetMessageType() api.MessageType {
2308 return api.RequestMessage
2311 func (m *IPTableFlush) Size() (size int) {
2315 size += 4 // m.Table.TableID
2316 size += 1 // m.Table.IsIP6
2317 size += 64 // m.Table.Name
2320 func (m *IPTableFlush) Marshal(b []byte) ([]byte, error) {
2322 b = make([]byte, m.Size())
2324 buf := codec.NewBuffer(b)
2325 buf.EncodeUint32(m.Table.TableID)
2326 buf.EncodeBool(m.Table.IsIP6)
2327 buf.EncodeString(m.Table.Name, 64)
2328 return buf.Bytes(), nil
2330 func (m *IPTableFlush) Unmarshal(b []byte) error {
2331 buf := codec.NewBuffer(b)
2332 m.Table.TableID = buf.DecodeUint32()
2333 m.Table.IsIP6 = buf.DecodeBool()
2334 m.Table.Name = buf.DecodeString(64)
2338 // IPTableFlushReply defines message 'ip_table_flush_reply'.
2339 type IPTableFlushReply struct {
2340 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2343 func (m *IPTableFlushReply) Reset() { *m = IPTableFlushReply{} }
2344 func (*IPTableFlushReply) GetMessageName() string { return "ip_table_flush_reply" }
2345 func (*IPTableFlushReply) GetCrcString() string { return "e8d4e804" }
2346 func (*IPTableFlushReply) GetMessageType() api.MessageType {
2347 return api.ReplyMessage
2350 func (m *IPTableFlushReply) Size() (size int) {
2354 size += 4 // m.Retval
2357 func (m *IPTableFlushReply) Marshal(b []byte) ([]byte, error) {
2359 b = make([]byte, m.Size())
2361 buf := codec.NewBuffer(b)
2362 buf.EncodeInt32(m.Retval)
2363 return buf.Bytes(), nil
2365 func (m *IPTableFlushReply) Unmarshal(b []byte) error {
2366 buf := codec.NewBuffer(b)
2367 m.Retval = buf.DecodeInt32()
2371 // IPTableReplaceBegin defines message 'ip_table_replace_begin'.
2372 type IPTableReplaceBegin struct {
2373 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2376 func (m *IPTableReplaceBegin) Reset() { *m = IPTableReplaceBegin{} }
2377 func (*IPTableReplaceBegin) GetMessageName() string { return "ip_table_replace_begin" }
2378 func (*IPTableReplaceBegin) GetCrcString() string { return "b9d2e09e" }
2379 func (*IPTableReplaceBegin) GetMessageType() api.MessageType {
2380 return api.RequestMessage
2383 func (m *IPTableReplaceBegin) Size() (size int) {
2387 size += 4 // m.Table.TableID
2388 size += 1 // m.Table.IsIP6
2389 size += 64 // m.Table.Name
2392 func (m *IPTableReplaceBegin) Marshal(b []byte) ([]byte, error) {
2394 b = make([]byte, m.Size())
2396 buf := codec.NewBuffer(b)
2397 buf.EncodeUint32(m.Table.TableID)
2398 buf.EncodeBool(m.Table.IsIP6)
2399 buf.EncodeString(m.Table.Name, 64)
2400 return buf.Bytes(), nil
2402 func (m *IPTableReplaceBegin) Unmarshal(b []byte) error {
2403 buf := codec.NewBuffer(b)
2404 m.Table.TableID = buf.DecodeUint32()
2405 m.Table.IsIP6 = buf.DecodeBool()
2406 m.Table.Name = buf.DecodeString(64)
2410 // IPTableReplaceBeginReply defines message 'ip_table_replace_begin_reply'.
2411 type IPTableReplaceBeginReply struct {
2412 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2415 func (m *IPTableReplaceBeginReply) Reset() { *m = IPTableReplaceBeginReply{} }
2416 func (*IPTableReplaceBeginReply) GetMessageName() string { return "ip_table_replace_begin_reply" }
2417 func (*IPTableReplaceBeginReply) GetCrcString() string { return "e8d4e804" }
2418 func (*IPTableReplaceBeginReply) GetMessageType() api.MessageType {
2419 return api.ReplyMessage
2422 func (m *IPTableReplaceBeginReply) Size() (size int) {
2426 size += 4 // m.Retval
2429 func (m *IPTableReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
2431 b = make([]byte, m.Size())
2433 buf := codec.NewBuffer(b)
2434 buf.EncodeInt32(m.Retval)
2435 return buf.Bytes(), nil
2437 func (m *IPTableReplaceBeginReply) Unmarshal(b []byte) error {
2438 buf := codec.NewBuffer(b)
2439 m.Retval = buf.DecodeInt32()
2443 // IPTableReplaceEnd defines message 'ip_table_replace_end'.
2444 type IPTableReplaceEnd struct {
2445 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2448 func (m *IPTableReplaceEnd) Reset() { *m = IPTableReplaceEnd{} }
2449 func (*IPTableReplaceEnd) GetMessageName() string { return "ip_table_replace_end" }
2450 func (*IPTableReplaceEnd) GetCrcString() string { return "b9d2e09e" }
2451 func (*IPTableReplaceEnd) GetMessageType() api.MessageType {
2452 return api.RequestMessage
2455 func (m *IPTableReplaceEnd) Size() (size int) {
2459 size += 4 // m.Table.TableID
2460 size += 1 // m.Table.IsIP6
2461 size += 64 // m.Table.Name
2464 func (m *IPTableReplaceEnd) Marshal(b []byte) ([]byte, error) {
2466 b = make([]byte, m.Size())
2468 buf := codec.NewBuffer(b)
2469 buf.EncodeUint32(m.Table.TableID)
2470 buf.EncodeBool(m.Table.IsIP6)
2471 buf.EncodeString(m.Table.Name, 64)
2472 return buf.Bytes(), nil
2474 func (m *IPTableReplaceEnd) Unmarshal(b []byte) error {
2475 buf := codec.NewBuffer(b)
2476 m.Table.TableID = buf.DecodeUint32()
2477 m.Table.IsIP6 = buf.DecodeBool()
2478 m.Table.Name = buf.DecodeString(64)
2482 // IPTableReplaceEndReply defines message 'ip_table_replace_end_reply'.
2483 type IPTableReplaceEndReply struct {
2484 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2487 func (m *IPTableReplaceEndReply) Reset() { *m = IPTableReplaceEndReply{} }
2488 func (*IPTableReplaceEndReply) GetMessageName() string { return "ip_table_replace_end_reply" }
2489 func (*IPTableReplaceEndReply) GetCrcString() string { return "e8d4e804" }
2490 func (*IPTableReplaceEndReply) GetMessageType() api.MessageType {
2491 return api.ReplyMessage
2494 func (m *IPTableReplaceEndReply) Size() (size int) {
2498 size += 4 // m.Retval
2501 func (m *IPTableReplaceEndReply) Marshal(b []byte) ([]byte, error) {
2503 b = make([]byte, m.Size())
2505 buf := codec.NewBuffer(b)
2506 buf.EncodeInt32(m.Retval)
2507 return buf.Bytes(), nil
2509 func (m *IPTableReplaceEndReply) Unmarshal(b []byte) error {
2510 buf := codec.NewBuffer(b)
2511 m.Retval = buf.DecodeInt32()
2515 // IPUnnumberedDetails defines message 'ip_unnumbered_details'.
2516 type IPUnnumberedDetails struct {
2517 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2518 IPSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip_sw_if_index" json:"ip_sw_if_index,omitempty"`
2521 func (m *IPUnnumberedDetails) Reset() { *m = IPUnnumberedDetails{} }
2522 func (*IPUnnumberedDetails) GetMessageName() string { return "ip_unnumbered_details" }
2523 func (*IPUnnumberedDetails) GetCrcString() string { return "aa12a483" }
2524 func (*IPUnnumberedDetails) GetMessageType() api.MessageType {
2525 return api.ReplyMessage
2528 func (m *IPUnnumberedDetails) Size() (size int) {
2532 size += 4 // m.SwIfIndex
2533 size += 4 // m.IPSwIfIndex
2536 func (m *IPUnnumberedDetails) Marshal(b []byte) ([]byte, error) {
2538 b = make([]byte, m.Size())
2540 buf := codec.NewBuffer(b)
2541 buf.EncodeUint32(uint32(m.SwIfIndex))
2542 buf.EncodeUint32(uint32(m.IPSwIfIndex))
2543 return buf.Bytes(), nil
2545 func (m *IPUnnumberedDetails) Unmarshal(b []byte) error {
2546 buf := codec.NewBuffer(b)
2547 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2548 m.IPSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2552 // IPUnnumberedDump defines message 'ip_unnumbered_dump'.
2553 type IPUnnumberedDump struct {
2554 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
2557 func (m *IPUnnumberedDump) Reset() { *m = IPUnnumberedDump{} }
2558 func (*IPUnnumberedDump) GetMessageName() string { return "ip_unnumbered_dump" }
2559 func (*IPUnnumberedDump) GetCrcString() string { return "f9e6675e" }
2560 func (*IPUnnumberedDump) GetMessageType() api.MessageType {
2561 return api.RequestMessage
2564 func (m *IPUnnumberedDump) Size() (size int) {
2568 size += 4 // m.SwIfIndex
2571 func (m *IPUnnumberedDump) Marshal(b []byte) ([]byte, error) {
2573 b = make([]byte, m.Size())
2575 buf := codec.NewBuffer(b)
2576 buf.EncodeUint32(uint32(m.SwIfIndex))
2577 return buf.Bytes(), nil
2579 func (m *IPUnnumberedDump) Unmarshal(b []byte) error {
2580 buf := codec.NewBuffer(b)
2581 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2585 // MfibSignalDetails defines message 'mfib_signal_details'.
2586 type MfibSignalDetails struct {
2587 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2588 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
2589 Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
2590 IPPacketLen uint16 `binapi:"u16,name=ip_packet_len" json:"ip_packet_len,omitempty"`
2591 IPPacketData []byte `binapi:"u8[256],name=ip_packet_data" json:"ip_packet_data,omitempty"`
2594 func (m *MfibSignalDetails) Reset() { *m = MfibSignalDetails{} }
2595 func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" }
2596 func (*MfibSignalDetails) GetCrcString() string { return "64398a9a" }
2597 func (*MfibSignalDetails) GetMessageType() api.MessageType {
2598 return api.ReplyMessage
2601 func (m *MfibSignalDetails) Size() (size int) {
2605 size += 4 // m.SwIfIndex
2606 size += 4 // m.TableID
2607 size += 1 // m.Prefix.Af
2608 size += 2 // m.Prefix.GrpAddressLength
2609 size += 1 * 16 // m.Prefix.GrpAddress
2610 size += 1 * 16 // m.Prefix.SrcAddress
2611 size += 2 // m.IPPacketLen
2612 size += 1 * 256 // m.IPPacketData
2615 func (m *MfibSignalDetails) Marshal(b []byte) ([]byte, error) {
2617 b = make([]byte, m.Size())
2619 buf := codec.NewBuffer(b)
2620 buf.EncodeUint32(uint32(m.SwIfIndex))
2621 buf.EncodeUint32(m.TableID)
2622 buf.EncodeUint8(uint8(m.Prefix.Af))
2623 buf.EncodeUint16(m.Prefix.GrpAddressLength)
2624 buf.EncodeBytes(m.Prefix.GrpAddress.XXX_UnionData[:], 16)
2625 buf.EncodeBytes(m.Prefix.SrcAddress.XXX_UnionData[:], 16)
2626 buf.EncodeUint16(m.IPPacketLen)
2627 buf.EncodeBytes(m.IPPacketData, 256)
2628 return buf.Bytes(), nil
2630 func (m *MfibSignalDetails) Unmarshal(b []byte) error {
2631 buf := codec.NewBuffer(b)
2632 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2633 m.TableID = buf.DecodeUint32()
2634 m.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
2635 m.Prefix.GrpAddressLength = buf.DecodeUint16()
2636 copy(m.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
2637 copy(m.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
2638 m.IPPacketLen = buf.DecodeUint16()
2639 m.IPPacketData = make([]byte, 256)
2640 copy(m.IPPacketData, buf.DecodeBytes(len(m.IPPacketData)))
2644 // MfibSignalDump defines message 'mfib_signal_dump'.
2645 type MfibSignalDump struct{}
2647 func (m *MfibSignalDump) Reset() { *m = MfibSignalDump{} }
2648 func (*MfibSignalDump) GetMessageName() string { return "mfib_signal_dump" }
2649 func (*MfibSignalDump) GetCrcString() string { return "51077d14" }
2650 func (*MfibSignalDump) GetMessageType() api.MessageType {
2651 return api.RequestMessage
2654 func (m *MfibSignalDump) Size() (size int) {
2660 func (m *MfibSignalDump) Marshal(b []byte) ([]byte, error) {
2662 b = make([]byte, m.Size())
2664 buf := codec.NewBuffer(b)
2665 return buf.Bytes(), nil
2667 func (m *MfibSignalDump) Unmarshal(b []byte) error {
2671 // SetIPFlowHash defines message 'set_ip_flow_hash'.
2672 type SetIPFlowHash struct {
2673 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2674 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
2675 Src bool `binapi:"bool,name=src" json:"src,omitempty"`
2676 Dst bool `binapi:"bool,name=dst" json:"dst,omitempty"`
2677 Sport bool `binapi:"bool,name=sport" json:"sport,omitempty"`
2678 Dport bool `binapi:"bool,name=dport" json:"dport,omitempty"`
2679 Proto bool `binapi:"bool,name=proto" json:"proto,omitempty"`
2680 Reverse bool `binapi:"bool,name=reverse" json:"reverse,omitempty"`
2681 Symmetric bool `binapi:"bool,name=symmetric" json:"symmetric,omitempty"`
2684 func (m *SetIPFlowHash) Reset() { *m = SetIPFlowHash{} }
2685 func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" }
2686 func (*SetIPFlowHash) GetCrcString() string { return "084ee09e" }
2687 func (*SetIPFlowHash) GetMessageType() api.MessageType {
2688 return api.RequestMessage
2691 func (m *SetIPFlowHash) Size() (size int) {
2695 size += 4 // m.VrfID
2696 size += 1 // m.IsIPv6
2699 size += 1 // m.Sport
2700 size += 1 // m.Dport
2701 size += 1 // m.Proto
2702 size += 1 // m.Reverse
2703 size += 1 // m.Symmetric
2706 func (m *SetIPFlowHash) Marshal(b []byte) ([]byte, error) {
2708 b = make([]byte, m.Size())
2710 buf := codec.NewBuffer(b)
2711 buf.EncodeUint32(m.VrfID)
2712 buf.EncodeBool(m.IsIPv6)
2713 buf.EncodeBool(m.Src)
2714 buf.EncodeBool(m.Dst)
2715 buf.EncodeBool(m.Sport)
2716 buf.EncodeBool(m.Dport)
2717 buf.EncodeBool(m.Proto)
2718 buf.EncodeBool(m.Reverse)
2719 buf.EncodeBool(m.Symmetric)
2720 return buf.Bytes(), nil
2722 func (m *SetIPFlowHash) Unmarshal(b []byte) error {
2723 buf := codec.NewBuffer(b)
2724 m.VrfID = buf.DecodeUint32()
2725 m.IsIPv6 = buf.DecodeBool()
2726 m.Src = buf.DecodeBool()
2727 m.Dst = buf.DecodeBool()
2728 m.Sport = buf.DecodeBool()
2729 m.Dport = buf.DecodeBool()
2730 m.Proto = buf.DecodeBool()
2731 m.Reverse = buf.DecodeBool()
2732 m.Symmetric = buf.DecodeBool()
2736 // SetIPFlowHashReply defines message 'set_ip_flow_hash_reply'.
2737 type SetIPFlowHashReply struct {
2738 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2741 func (m *SetIPFlowHashReply) Reset() { *m = SetIPFlowHashReply{} }
2742 func (*SetIPFlowHashReply) GetMessageName() string { return "set_ip_flow_hash_reply" }
2743 func (*SetIPFlowHashReply) GetCrcString() string { return "e8d4e804" }
2744 func (*SetIPFlowHashReply) GetMessageType() api.MessageType {
2745 return api.ReplyMessage
2748 func (m *SetIPFlowHashReply) Size() (size int) {
2752 size += 4 // m.Retval
2755 func (m *SetIPFlowHashReply) Marshal(b []byte) ([]byte, error) {
2757 b = make([]byte, m.Size())
2759 buf := codec.NewBuffer(b)
2760 buf.EncodeInt32(m.Retval)
2761 return buf.Bytes(), nil
2763 func (m *SetIPFlowHashReply) Unmarshal(b []byte) error {
2764 buf := codec.NewBuffer(b)
2765 m.Retval = buf.DecodeInt32()
2769 // SwInterfaceIP6EnableDisable defines message 'sw_interface_ip6_enable_disable'.
2770 type SwInterfaceIP6EnableDisable struct {
2771 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2772 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
2775 func (m *SwInterfaceIP6EnableDisable) Reset() { *m = SwInterfaceIP6EnableDisable{} }
2776 func (*SwInterfaceIP6EnableDisable) GetMessageName() string { return "sw_interface_ip6_enable_disable" }
2777 func (*SwInterfaceIP6EnableDisable) GetCrcString() string { return "ae6cfcfb" }
2778 func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType {
2779 return api.RequestMessage
2782 func (m *SwInterfaceIP6EnableDisable) Size() (size int) {
2786 size += 4 // m.SwIfIndex
2787 size += 1 // m.Enable
2790 func (m *SwInterfaceIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
2792 b = make([]byte, m.Size())
2794 buf := codec.NewBuffer(b)
2795 buf.EncodeUint32(uint32(m.SwIfIndex))
2796 buf.EncodeBool(m.Enable)
2797 return buf.Bytes(), nil
2799 func (m *SwInterfaceIP6EnableDisable) Unmarshal(b []byte) error {
2800 buf := codec.NewBuffer(b)
2801 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2802 m.Enable = buf.DecodeBool()
2806 // SwInterfaceIP6EnableDisableReply defines message 'sw_interface_ip6_enable_disable_reply'.
2807 type SwInterfaceIP6EnableDisableReply struct {
2808 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2811 func (m *SwInterfaceIP6EnableDisableReply) Reset() { *m = SwInterfaceIP6EnableDisableReply{} }
2812 func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string {
2813 return "sw_interface_ip6_enable_disable_reply"
2815 func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
2816 func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType {
2817 return api.ReplyMessage
2820 func (m *SwInterfaceIP6EnableDisableReply) Size() (size int) {
2824 size += 4 // m.Retval
2827 func (m *SwInterfaceIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) {
2829 b = make([]byte, m.Size())
2831 buf := codec.NewBuffer(b)
2832 buf.EncodeInt32(m.Retval)
2833 return buf.Bytes(), nil
2835 func (m *SwInterfaceIP6EnableDisableReply) Unmarshal(b []byte) error {
2836 buf := codec.NewBuffer(b)
2837 m.Retval = buf.DecodeInt32()
2841 // SwInterfaceIP6SetLinkLocalAddress defines message 'sw_interface_ip6_set_link_local_address'.
2842 type SwInterfaceIP6SetLinkLocalAddress struct {
2843 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2844 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
2847 func (m *SwInterfaceIP6SetLinkLocalAddress) Reset() { *m = SwInterfaceIP6SetLinkLocalAddress{} }
2848 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string {
2849 return "sw_interface_ip6_set_link_local_address"
2851 func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "2931d9fa" }
2852 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType {
2853 return api.RequestMessage
2856 func (m *SwInterfaceIP6SetLinkLocalAddress) Size() (size int) {
2860 size += 4 // m.SwIfIndex
2861 size += 1 * 16 // m.IP
2864 func (m *SwInterfaceIP6SetLinkLocalAddress) Marshal(b []byte) ([]byte, error) {
2866 b = make([]byte, m.Size())
2868 buf := codec.NewBuffer(b)
2869 buf.EncodeUint32(uint32(m.SwIfIndex))
2870 buf.EncodeBytes(m.IP[:], 16)
2871 return buf.Bytes(), nil
2873 func (m *SwInterfaceIP6SetLinkLocalAddress) Unmarshal(b []byte) error {
2874 buf := codec.NewBuffer(b)
2875 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2876 copy(m.IP[:], buf.DecodeBytes(16))
2880 // SwInterfaceIP6SetLinkLocalAddressReply defines message 'sw_interface_ip6_set_link_local_address_reply'.
2881 type SwInterfaceIP6SetLinkLocalAddressReply struct {
2882 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2885 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Reset() {
2886 *m = SwInterfaceIP6SetLinkLocalAddressReply{}
2888 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string {
2889 return "sw_interface_ip6_set_link_local_address_reply"
2891 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { return "e8d4e804" }
2892 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType {
2893 return api.ReplyMessage
2896 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Size() (size int) {
2900 size += 4 // m.Retval
2903 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) {
2905 b = make([]byte, m.Size())
2907 buf := codec.NewBuffer(b)
2908 buf.EncodeInt32(m.Retval)
2909 return buf.Bytes(), nil
2911 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error {
2912 buf := codec.NewBuffer(b)
2913 m.Retval = buf.DecodeInt32()
2917 func init() { file_ip_binapi_init() }
2918 func file_ip_binapi_init() {
2919 api.RegisterMessage((*IoamDisable)(nil), "ioam_disable_6b16a45e")
2920 api.RegisterMessage((*IoamDisableReply)(nil), "ioam_disable_reply_e8d4e804")
2921 api.RegisterMessage((*IoamEnable)(nil), "ioam_enable_51ccd868")
2922 api.RegisterMessage((*IoamEnableReply)(nil), "ioam_enable_reply_e8d4e804")
2923 api.RegisterMessage((*IPAddressDetails)(nil), "ip_address_details_b1199745")
2924 api.RegisterMessage((*IPAddressDump)(nil), "ip_address_dump_2d033de4")
2925 api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip_container_proxy_add_del_91189f40")
2926 api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip_container_proxy_add_del_reply_e8d4e804")
2927 api.RegisterMessage((*IPContainerProxyDetails)(nil), "ip_container_proxy_details_0ee460e8")
2928 api.RegisterMessage((*IPContainerProxyDump)(nil), "ip_container_proxy_dump_51077d14")
2929 api.RegisterMessage((*IPDetails)(nil), "ip_details_eb152d07")
2930 api.RegisterMessage((*IPDump)(nil), "ip_dump_98d231ca")
2931 api.RegisterMessage((*IPMrouteAddDel)(nil), "ip_mroute_add_del_f6627d17")
2932 api.RegisterMessage((*IPMrouteAddDelReply)(nil), "ip_mroute_add_del_reply_1992deab")
2933 api.RegisterMessage((*IPMrouteDetails)(nil), "ip_mroute_details_c1cb4b44")
2934 api.RegisterMessage((*IPMrouteDump)(nil), "ip_mroute_dump_b9d2e09e")
2935 api.RegisterMessage((*IPMtableDetails)(nil), "ip_mtable_details_b9d2e09e")
2936 api.RegisterMessage((*IPMtableDump)(nil), "ip_mtable_dump_51077d14")
2937 api.RegisterMessage((*IPPuntPolice)(nil), "ip_punt_police_db867cea")
2938 api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip_punt_police_reply_e8d4e804")
2939 api.RegisterMessage((*IPPuntRedirect)(nil), "ip_punt_redirect_a9a5592c")
2940 api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_3924f5d3")
2941 api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip_punt_redirect_dump_2d033de4")
2942 api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip_punt_redirect_reply_e8d4e804")
2943 api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_885c85a6")
2944 api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip_reassembly_enable_disable_reply_e8d4e804")
2945 api.RegisterMessage((*IPReassemblyGet)(nil), "ip_reassembly_get_ea13ff63")
2946 api.RegisterMessage((*IPReassemblyGetReply)(nil), "ip_reassembly_get_reply_d5eb8d34")
2947 api.RegisterMessage((*IPReassemblySet)(nil), "ip_reassembly_set_16467d25")
2948 api.RegisterMessage((*IPReassemblySetReply)(nil), "ip_reassembly_set_reply_e8d4e804")
2949 api.RegisterMessage((*IPRouteAddDel)(nil), "ip_route_add_del_c1ff832d")
2950 api.RegisterMessage((*IPRouteAddDelReply)(nil), "ip_route_add_del_reply_1992deab")
2951 api.RegisterMessage((*IPRouteDetails)(nil), "ip_route_details_d1ffaae1")
2952 api.RegisterMessage((*IPRouteDump)(nil), "ip_route_dump_b9d2e09e")
2953 api.RegisterMessage((*IPRouteLookup)(nil), "ip_route_lookup_e2986185")
2954 api.RegisterMessage((*IPRouteLookupReply)(nil), "ip_route_lookup_reply_ae99de8e")
2955 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip_source_and_port_range_check_add_del_8bfc76f2")
2956 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip_source_and_port_range_check_add_del_reply_e8d4e804")
2957 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip_source_and_port_range_check_interface_add_del_e1ba8987")
2958 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip_source_and_port_range_check_interface_add_del_reply_e8d4e804")
2959 api.RegisterMessage((*IPTableAddDel)(nil), "ip_table_add_del_0ffdaec0")
2960 api.RegisterMessage((*IPTableAddDelReply)(nil), "ip_table_add_del_reply_e8d4e804")
2961 api.RegisterMessage((*IPTableDetails)(nil), "ip_table_details_c79fca0f")
2962 api.RegisterMessage((*IPTableDump)(nil), "ip_table_dump_51077d14")
2963 api.RegisterMessage((*IPTableFlush)(nil), "ip_table_flush_b9d2e09e")
2964 api.RegisterMessage((*IPTableFlushReply)(nil), "ip_table_flush_reply_e8d4e804")
2965 api.RegisterMessage((*IPTableReplaceBegin)(nil), "ip_table_replace_begin_b9d2e09e")
2966 api.RegisterMessage((*IPTableReplaceBeginReply)(nil), "ip_table_replace_begin_reply_e8d4e804")
2967 api.RegisterMessage((*IPTableReplaceEnd)(nil), "ip_table_replace_end_b9d2e09e")
2968 api.RegisterMessage((*IPTableReplaceEndReply)(nil), "ip_table_replace_end_reply_e8d4e804")
2969 api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip_unnumbered_details_aa12a483")
2970 api.RegisterMessage((*IPUnnumberedDump)(nil), "ip_unnumbered_dump_f9e6675e")
2971 api.RegisterMessage((*MfibSignalDetails)(nil), "mfib_signal_details_64398a9a")
2972 api.RegisterMessage((*MfibSignalDump)(nil), "mfib_signal_dump_51077d14")
2973 api.RegisterMessage((*SetIPFlowHash)(nil), "set_ip_flow_hash_084ee09e")
2974 api.RegisterMessage((*SetIPFlowHashReply)(nil), "set_ip_flow_hash_reply_e8d4e804")
2975 api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "sw_interface_ip6_enable_disable_ae6cfcfb")
2976 api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "sw_interface_ip6_enable_disable_reply_e8d4e804")
2977 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "sw_interface_ip6_set_link_local_address_2931d9fa")
2978 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "sw_interface_ip6_set_link_local_address_reply_e8d4e804")
2981 // Messages returns list of all messages in this module.
2982 func AllMessages() []api.Message {
2983 return []api.Message{
2984 (*IoamDisable)(nil),
2985 (*IoamDisableReply)(nil),
2987 (*IoamEnableReply)(nil),
2988 (*IPAddressDetails)(nil),
2989 (*IPAddressDump)(nil),
2990 (*IPContainerProxyAddDel)(nil),
2991 (*IPContainerProxyAddDelReply)(nil),
2992 (*IPContainerProxyDetails)(nil),
2993 (*IPContainerProxyDump)(nil),
2996 (*IPMrouteAddDel)(nil),
2997 (*IPMrouteAddDelReply)(nil),
2998 (*IPMrouteDetails)(nil),
2999 (*IPMrouteDump)(nil),
3000 (*IPMtableDetails)(nil),
3001 (*IPMtableDump)(nil),
3002 (*IPPuntPolice)(nil),
3003 (*IPPuntPoliceReply)(nil),
3004 (*IPPuntRedirect)(nil),
3005 (*IPPuntRedirectDetails)(nil),
3006 (*IPPuntRedirectDump)(nil),
3007 (*IPPuntRedirectReply)(nil),
3008 (*IPReassemblyEnableDisable)(nil),
3009 (*IPReassemblyEnableDisableReply)(nil),
3010 (*IPReassemblyGet)(nil),
3011 (*IPReassemblyGetReply)(nil),
3012 (*IPReassemblySet)(nil),
3013 (*IPReassemblySetReply)(nil),
3014 (*IPRouteAddDel)(nil),
3015 (*IPRouteAddDelReply)(nil),
3016 (*IPRouteDetails)(nil),
3017 (*IPRouteDump)(nil),
3018 (*IPRouteLookup)(nil),
3019 (*IPRouteLookupReply)(nil),
3020 (*IPSourceAndPortRangeCheckAddDel)(nil),
3021 (*IPSourceAndPortRangeCheckAddDelReply)(nil),
3022 (*IPSourceAndPortRangeCheckInterfaceAddDel)(nil),
3023 (*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil),
3024 (*IPTableAddDel)(nil),
3025 (*IPTableAddDelReply)(nil),
3026 (*IPTableDetails)(nil),
3027 (*IPTableDump)(nil),
3028 (*IPTableFlush)(nil),
3029 (*IPTableFlushReply)(nil),
3030 (*IPTableReplaceBegin)(nil),
3031 (*IPTableReplaceBeginReply)(nil),
3032 (*IPTableReplaceEnd)(nil),
3033 (*IPTableReplaceEndReply)(nil),
3034 (*IPUnnumberedDetails)(nil),
3035 (*IPUnnumberedDump)(nil),
3036 (*MfibSignalDetails)(nil),
3037 (*MfibSignalDump)(nil),
3038 (*SetIPFlowHash)(nil),
3039 (*SetIPFlowHashReply)(nil),
3040 (*SwInterfaceIP6EnableDisable)(nil),
3041 (*SwInterfaceIP6EnableDisableReply)(nil),
3042 (*SwInterfaceIP6SetLinkLocalAddress)(nil),
3043 (*SwInterfaceIP6SetLinkLocalAddressReply)(nil),