1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0
5 // source: /usr/share/vpp/api/core/ip.api.json
7 // Package ip contains generated bindings for API file ip.api.
19 api "git.fd.io/govpp.git/api"
20 _ "git.fd.io/govpp.git/binapi/ethernet_types"
21 fib_types "git.fd.io/govpp.git/binapi/fib_types"
22 interface_types "git.fd.io/govpp.git/binapi/interface_types"
23 ip_types "git.fd.io/govpp.git/binapi/ip_types"
24 mfib_types "git.fd.io/govpp.git/binapi/mfib_types"
25 codec "git.fd.io/govpp.git/codec"
28 // This is a compile-time assertion to ensure that this generated file
29 // is compatible with the GoVPP api package it is being compiled against.
30 // A compilation error at this line likely means your copy of the
31 // GoVPP api package needs to be updated.
32 const _ = api.GoVppAPIPackageIsVersion2
37 VersionCrc = 0x557b5866
40 // IPReassType defines enum 'ip_reass_type'.
41 type IPReassType uint32
44 IP_REASS_TYPE_FULL IPReassType = 0
45 IP_REASS_TYPE_SHALLOW_VIRTUAL IPReassType = 1
49 IPReassType_name = map[uint32]string{
50 0: "IP_REASS_TYPE_FULL",
51 1: "IP_REASS_TYPE_SHALLOW_VIRTUAL",
53 IPReassType_value = map[string]uint32{
54 "IP_REASS_TYPE_FULL": 0,
55 "IP_REASS_TYPE_SHALLOW_VIRTUAL": 1,
59 func (x IPReassType) String() string {
60 s, ok := IPReassType_name[uint32(x)]
64 return "IPReassType(" + strconv.Itoa(int(x)) + ")"
67 // IPFlowHashConfig defines enum 'ip_flow_hash_config'.
68 type IPFlowHashConfig uint32
71 IP_API_FLOW_HASH_SRC_IP IPFlowHashConfig = 1
72 IP_API_FLOW_HASH_DST_IP IPFlowHashConfig = 2
73 IP_API_FLOW_HASH_SRC_PORT IPFlowHashConfig = 4
74 IP_API_FLOW_HASH_DST_PORT IPFlowHashConfig = 8
75 IP_API_FLOW_HASH_PROTO IPFlowHashConfig = 16
76 IP_API_FLOW_HASH_REVERSE IPFlowHashConfig = 32
77 IP_API_FLOW_HASH_SYMETRIC IPFlowHashConfig = 64
78 IP_API_FLOW_HASH_FLOW_LABEL IPFlowHashConfig = 128
82 IPFlowHashConfig_name = map[uint32]string{
83 1: "IP_API_FLOW_HASH_SRC_IP",
84 2: "IP_API_FLOW_HASH_DST_IP",
85 4: "IP_API_FLOW_HASH_SRC_PORT",
86 8: "IP_API_FLOW_HASH_DST_PORT",
87 16: "IP_API_FLOW_HASH_PROTO",
88 32: "IP_API_FLOW_HASH_REVERSE",
89 64: "IP_API_FLOW_HASH_SYMETRIC",
90 128: "IP_API_FLOW_HASH_FLOW_LABEL",
92 IPFlowHashConfig_value = map[string]uint32{
93 "IP_API_FLOW_HASH_SRC_IP": 1,
94 "IP_API_FLOW_HASH_DST_IP": 2,
95 "IP_API_FLOW_HASH_SRC_PORT": 4,
96 "IP_API_FLOW_HASH_DST_PORT": 8,
97 "IP_API_FLOW_HASH_PROTO": 16,
98 "IP_API_FLOW_HASH_REVERSE": 32,
99 "IP_API_FLOW_HASH_SYMETRIC": 64,
100 "IP_API_FLOW_HASH_FLOW_LABEL": 128,
104 func (x IPFlowHashConfig) String() string {
105 s, ok := IPFlowHashConfig_name[uint32(x)]
109 str := func(n uint32) string {
110 s, ok := IPFlowHashConfig_name[uint32(n)]
114 return "IPFlowHashConfig(" + strconv.Itoa(int(n)) + ")"
116 for i := uint32(0); i <= 32; i++ {
126 return str(uint32(x))
131 // IPMroute defines type 'ip_mroute'.
132 type IPMroute struct {
133 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
134 EntryFlags mfib_types.MfibEntryFlags `binapi:"mfib_entry_flags,name=entry_flags" json:"entry_flags,omitempty"`
135 RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
136 Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
137 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"`
138 Paths []mfib_types.MfibPath `binapi:"mfib_path[n_paths],name=paths" json:"paths,omitempty"`
141 // IPPathMtu defines type 'ip_path_mtu'.
142 type IPPathMtu struct {
143 ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
144 Context uint32 `binapi:"u32,name=context" json:"context,omitempty"`
145 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
146 Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"`
147 PathMtu uint16 `binapi:"u16,name=path_mtu" json:"path_mtu,omitempty"`
150 // IPRoute defines type 'ip_route'.
151 type IPRoute struct {
152 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
153 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
154 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
155 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"`
156 Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
159 // IPRouteV2 defines type 'ip_route_v2'.
160 type IPRouteV2 struct {
161 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
162 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
163 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
164 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"`
165 Src uint8 `binapi:"u8,name=src" json:"src,omitempty"`
166 Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
169 // IPTable defines type 'ip_table'.
170 type IPTable struct {
171 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
172 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
173 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
176 // PuntRedirect defines type 'punt_redirect'.
177 type PuntRedirect struct {
178 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
179 TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
180 Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"`
183 // PuntRedirectV2 defines type 'punt_redirect_v2'.
184 type PuntRedirectV2 struct {
185 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index,default=4294967295" json:"rx_sw_if_index,omitempty"`
186 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
187 NPaths uint32 `binapi:"u32,name=n_paths" json:"-"`
188 Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
191 // AddDelIPPuntRedirectV2 defines message 'add_del_ip_punt_redirect_v2'.
192 type AddDelIPPuntRedirectV2 struct {
193 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
194 Punt PuntRedirectV2 `binapi:"punt_redirect_v2,name=punt" json:"punt,omitempty"`
197 func (m *AddDelIPPuntRedirectV2) Reset() { *m = AddDelIPPuntRedirectV2{} }
198 func (*AddDelIPPuntRedirectV2) GetMessageName() string { return "add_del_ip_punt_redirect_v2" }
199 func (*AddDelIPPuntRedirectV2) GetCrcString() string { return "9e804227" }
200 func (*AddDelIPPuntRedirectV2) GetMessageType() api.MessageType {
201 return api.RequestMessage
204 func (m *AddDelIPPuntRedirectV2) Size() (size int) {
209 size += 4 // m.Punt.RxSwIfIndex
210 size += 1 // m.Punt.Af
211 size += 4 // m.Punt.NPaths
212 for j2 := 0; j2 < len(m.Punt.Paths); j2++ {
213 var s2 fib_types.FibPath
215 if j2 < len(m.Punt.Paths) {
216 s2 = m.Punt.Paths[j2]
218 size += 4 // s2.SwIfIndex
219 size += 4 // s2.TableID
220 size += 4 // s2.RpfID
221 size += 1 // s2.Weight
222 size += 1 // s2.Preference
224 size += 4 // s2.Flags
225 size += 4 // s2.Proto
226 size += 1 * 16 // s2.Nh.Address
227 size += 4 // s2.Nh.ViaLabel
228 size += 4 // s2.Nh.ObjID
229 size += 4 // s2.Nh.ClassifyTableIndex
230 size += 1 // s2.NLabels
231 for j3 := 0; j3 < 16; j3++ {
232 size += 1 // s2.LabelStack[j3].IsUniform
233 size += 4 // s2.LabelStack[j3].Label
234 size += 1 // s2.LabelStack[j3].TTL
235 size += 1 // s2.LabelStack[j3].Exp
240 func (m *AddDelIPPuntRedirectV2) Marshal(b []byte) ([]byte, error) {
242 b = make([]byte, m.Size())
244 buf := codec.NewBuffer(b)
245 buf.EncodeBool(m.IsAdd)
246 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
247 buf.EncodeUint8(uint8(m.Punt.Af))
248 buf.EncodeUint32(uint32(len(m.Punt.Paths)))
249 for j1 := 0; j1 < len(m.Punt.Paths); j1++ {
250 var v1 fib_types.FibPath // Paths
251 if j1 < len(m.Punt.Paths) {
252 v1 = m.Punt.Paths[j1]
254 buf.EncodeUint32(v1.SwIfIndex)
255 buf.EncodeUint32(v1.TableID)
256 buf.EncodeUint32(v1.RpfID)
257 buf.EncodeUint8(v1.Weight)
258 buf.EncodeUint8(v1.Preference)
259 buf.EncodeUint32(uint32(v1.Type))
260 buf.EncodeUint32(uint32(v1.Flags))
261 buf.EncodeUint32(uint32(v1.Proto))
262 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
263 buf.EncodeUint32(v1.Nh.ViaLabel)
264 buf.EncodeUint32(v1.Nh.ObjID)
265 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
266 buf.EncodeUint8(v1.NLabels)
267 for j2 := 0; j2 < 16; j2++ {
268 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
269 buf.EncodeUint32(v1.LabelStack[j2].Label)
270 buf.EncodeUint8(v1.LabelStack[j2].TTL)
271 buf.EncodeUint8(v1.LabelStack[j2].Exp)
274 return buf.Bytes(), nil
276 func (m *AddDelIPPuntRedirectV2) Unmarshal(b []byte) error {
277 buf := codec.NewBuffer(b)
278 m.IsAdd = buf.DecodeBool()
279 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
280 m.Punt.Af = ip_types.AddressFamily(buf.DecodeUint8())
281 m.Punt.NPaths = buf.DecodeUint32()
282 m.Punt.Paths = make([]fib_types.FibPath, m.Punt.NPaths)
283 for j1 := 0; j1 < len(m.Punt.Paths); j1++ {
284 m.Punt.Paths[j1].SwIfIndex = buf.DecodeUint32()
285 m.Punt.Paths[j1].TableID = buf.DecodeUint32()
286 m.Punt.Paths[j1].RpfID = buf.DecodeUint32()
287 m.Punt.Paths[j1].Weight = buf.DecodeUint8()
288 m.Punt.Paths[j1].Preference = buf.DecodeUint8()
289 m.Punt.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
290 m.Punt.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
291 m.Punt.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
292 copy(m.Punt.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
293 m.Punt.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
294 m.Punt.Paths[j1].Nh.ObjID = buf.DecodeUint32()
295 m.Punt.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
296 m.Punt.Paths[j1].NLabels = buf.DecodeUint8()
297 for j2 := 0; j2 < 16; j2++ {
298 m.Punt.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
299 m.Punt.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
300 m.Punt.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
301 m.Punt.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
307 // AddDelIPPuntRedirectV2Reply defines message 'add_del_ip_punt_redirect_v2_reply'.
308 type AddDelIPPuntRedirectV2Reply struct {
309 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
312 func (m *AddDelIPPuntRedirectV2Reply) Reset() { *m = AddDelIPPuntRedirectV2Reply{} }
313 func (*AddDelIPPuntRedirectV2Reply) GetMessageName() string {
314 return "add_del_ip_punt_redirect_v2_reply"
316 func (*AddDelIPPuntRedirectV2Reply) GetCrcString() string { return "e8d4e804" }
317 func (*AddDelIPPuntRedirectV2Reply) GetMessageType() api.MessageType {
318 return api.ReplyMessage
321 func (m *AddDelIPPuntRedirectV2Reply) Size() (size int) {
325 size += 4 // m.Retval
328 func (m *AddDelIPPuntRedirectV2Reply) Marshal(b []byte) ([]byte, error) {
330 b = make([]byte, m.Size())
332 buf := codec.NewBuffer(b)
333 buf.EncodeInt32(m.Retval)
334 return buf.Bytes(), nil
336 func (m *AddDelIPPuntRedirectV2Reply) Unmarshal(b []byte) error {
337 buf := codec.NewBuffer(b)
338 m.Retval = buf.DecodeInt32()
342 // IoamDisable defines message 'ioam_disable'.
343 type IoamDisable struct {
344 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
347 func (m *IoamDisable) Reset() { *m = IoamDisable{} }
348 func (*IoamDisable) GetMessageName() string { return "ioam_disable" }
349 func (*IoamDisable) GetCrcString() string { return "6b16a45e" }
350 func (*IoamDisable) GetMessageType() api.MessageType {
351 return api.RequestMessage
354 func (m *IoamDisable) Size() (size int) {
361 func (m *IoamDisable) Marshal(b []byte) ([]byte, error) {
363 b = make([]byte, m.Size())
365 buf := codec.NewBuffer(b)
366 buf.EncodeUint16(m.ID)
367 return buf.Bytes(), nil
369 func (m *IoamDisable) Unmarshal(b []byte) error {
370 buf := codec.NewBuffer(b)
371 m.ID = buf.DecodeUint16()
375 // IoamDisableReply defines message 'ioam_disable_reply'.
376 type IoamDisableReply struct {
377 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
380 func (m *IoamDisableReply) Reset() { *m = IoamDisableReply{} }
381 func (*IoamDisableReply) GetMessageName() string { return "ioam_disable_reply" }
382 func (*IoamDisableReply) GetCrcString() string { return "e8d4e804" }
383 func (*IoamDisableReply) GetMessageType() api.MessageType {
384 return api.ReplyMessage
387 func (m *IoamDisableReply) Size() (size int) {
391 size += 4 // m.Retval
394 func (m *IoamDisableReply) Marshal(b []byte) ([]byte, error) {
396 b = make([]byte, m.Size())
398 buf := codec.NewBuffer(b)
399 buf.EncodeInt32(m.Retval)
400 return buf.Bytes(), nil
402 func (m *IoamDisableReply) Unmarshal(b []byte) error {
403 buf := codec.NewBuffer(b)
404 m.Retval = buf.DecodeInt32()
408 // IoamEnable defines message 'ioam_enable'.
409 type IoamEnable struct {
410 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
411 Seqno bool `binapi:"bool,name=seqno" json:"seqno,omitempty"`
412 Analyse bool `binapi:"bool,name=analyse" json:"analyse,omitempty"`
413 PotEnable bool `binapi:"bool,name=pot_enable" json:"pot_enable,omitempty"`
414 TraceEnable bool `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"`
415 NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
418 func (m *IoamEnable) Reset() { *m = IoamEnable{} }
419 func (*IoamEnable) GetMessageName() string { return "ioam_enable" }
420 func (*IoamEnable) GetCrcString() string { return "51ccd868" }
421 func (*IoamEnable) GetMessageType() api.MessageType {
422 return api.RequestMessage
425 func (m *IoamEnable) Size() (size int) {
431 size += 1 // m.Analyse
432 size += 1 // m.PotEnable
433 size += 1 // m.TraceEnable
434 size += 4 // m.NodeID
437 func (m *IoamEnable) Marshal(b []byte) ([]byte, error) {
439 b = make([]byte, m.Size())
441 buf := codec.NewBuffer(b)
442 buf.EncodeUint16(m.ID)
443 buf.EncodeBool(m.Seqno)
444 buf.EncodeBool(m.Analyse)
445 buf.EncodeBool(m.PotEnable)
446 buf.EncodeBool(m.TraceEnable)
447 buf.EncodeUint32(m.NodeID)
448 return buf.Bytes(), nil
450 func (m *IoamEnable) Unmarshal(b []byte) error {
451 buf := codec.NewBuffer(b)
452 m.ID = buf.DecodeUint16()
453 m.Seqno = buf.DecodeBool()
454 m.Analyse = buf.DecodeBool()
455 m.PotEnable = buf.DecodeBool()
456 m.TraceEnable = buf.DecodeBool()
457 m.NodeID = buf.DecodeUint32()
461 // IoamEnableReply defines message 'ioam_enable_reply'.
462 type IoamEnableReply struct {
463 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
466 func (m *IoamEnableReply) Reset() { *m = IoamEnableReply{} }
467 func (*IoamEnableReply) GetMessageName() string { return "ioam_enable_reply" }
468 func (*IoamEnableReply) GetCrcString() string { return "e8d4e804" }
469 func (*IoamEnableReply) GetMessageType() api.MessageType {
470 return api.ReplyMessage
473 func (m *IoamEnableReply) Size() (size int) {
477 size += 4 // m.Retval
480 func (m *IoamEnableReply) Marshal(b []byte) ([]byte, error) {
482 b = make([]byte, m.Size())
484 buf := codec.NewBuffer(b)
485 buf.EncodeInt32(m.Retval)
486 return buf.Bytes(), nil
488 func (m *IoamEnableReply) Unmarshal(b []byte) error {
489 buf := codec.NewBuffer(b)
490 m.Retval = buf.DecodeInt32()
494 // IPAddressDetails defines message 'ip_address_details'.
495 type IPAddressDetails struct {
496 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
497 Prefix ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
500 func (m *IPAddressDetails) Reset() { *m = IPAddressDetails{} }
501 func (*IPAddressDetails) GetMessageName() string { return "ip_address_details" }
502 func (*IPAddressDetails) GetCrcString() string { return "ee29b797" }
503 func (*IPAddressDetails) GetMessageType() api.MessageType {
504 return api.ReplyMessage
507 func (m *IPAddressDetails) Size() (size int) {
511 size += 4 // m.SwIfIndex
512 size += 1 // m.Prefix.Address.Af
513 size += 1 * 16 // m.Prefix.Address.Un
514 size += 1 // m.Prefix.Len
517 func (m *IPAddressDetails) Marshal(b []byte) ([]byte, error) {
519 b = make([]byte, m.Size())
521 buf := codec.NewBuffer(b)
522 buf.EncodeUint32(uint32(m.SwIfIndex))
523 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
524 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
525 buf.EncodeUint8(m.Prefix.Len)
526 return buf.Bytes(), nil
528 func (m *IPAddressDetails) Unmarshal(b []byte) error {
529 buf := codec.NewBuffer(b)
530 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
531 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
532 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
533 m.Prefix.Len = buf.DecodeUint8()
537 // IPAddressDump defines message 'ip_address_dump'.
538 type IPAddressDump struct {
539 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
540 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
543 func (m *IPAddressDump) Reset() { *m = IPAddressDump{} }
544 func (*IPAddressDump) GetMessageName() string { return "ip_address_dump" }
545 func (*IPAddressDump) GetCrcString() string { return "2d033de4" }
546 func (*IPAddressDump) GetMessageType() api.MessageType {
547 return api.RequestMessage
550 func (m *IPAddressDump) Size() (size int) {
554 size += 4 // m.SwIfIndex
555 size += 1 // m.IsIPv6
558 func (m *IPAddressDump) Marshal(b []byte) ([]byte, error) {
560 b = make([]byte, m.Size())
562 buf := codec.NewBuffer(b)
563 buf.EncodeUint32(uint32(m.SwIfIndex))
564 buf.EncodeBool(m.IsIPv6)
565 return buf.Bytes(), nil
567 func (m *IPAddressDump) Unmarshal(b []byte) error {
568 buf := codec.NewBuffer(b)
569 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
570 m.IsIPv6 = buf.DecodeBool()
574 // IPContainerProxyAddDel defines message 'ip_container_proxy_add_del'.
575 type IPContainerProxyAddDel struct {
576 Pfx ip_types.Prefix `binapi:"prefix,name=pfx" json:"pfx,omitempty"`
577 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
578 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
581 func (m *IPContainerProxyAddDel) Reset() { *m = IPContainerProxyAddDel{} }
582 func (*IPContainerProxyAddDel) GetMessageName() string { return "ip_container_proxy_add_del" }
583 func (*IPContainerProxyAddDel) GetCrcString() string { return "7df1dff1" }
584 func (*IPContainerProxyAddDel) GetMessageType() api.MessageType {
585 return api.RequestMessage
588 func (m *IPContainerProxyAddDel) Size() (size int) {
592 size += 1 // m.Pfx.Address.Af
593 size += 1 * 16 // m.Pfx.Address.Un
594 size += 1 // m.Pfx.Len
595 size += 4 // m.SwIfIndex
599 func (m *IPContainerProxyAddDel) Marshal(b []byte) ([]byte, error) {
601 b = make([]byte, m.Size())
603 buf := codec.NewBuffer(b)
604 buf.EncodeUint8(uint8(m.Pfx.Address.Af))
605 buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
606 buf.EncodeUint8(m.Pfx.Len)
607 buf.EncodeUint32(uint32(m.SwIfIndex))
608 buf.EncodeBool(m.IsAdd)
609 return buf.Bytes(), nil
611 func (m *IPContainerProxyAddDel) Unmarshal(b []byte) error {
612 buf := codec.NewBuffer(b)
613 m.Pfx.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
614 copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
615 m.Pfx.Len = buf.DecodeUint8()
616 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
617 m.IsAdd = buf.DecodeBool()
621 // IPContainerProxyAddDelReply defines message 'ip_container_proxy_add_del_reply'.
622 type IPContainerProxyAddDelReply struct {
623 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
626 func (m *IPContainerProxyAddDelReply) Reset() { *m = IPContainerProxyAddDelReply{} }
627 func (*IPContainerProxyAddDelReply) GetMessageName() string {
628 return "ip_container_proxy_add_del_reply"
630 func (*IPContainerProxyAddDelReply) GetCrcString() string { return "e8d4e804" }
631 func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType {
632 return api.ReplyMessage
635 func (m *IPContainerProxyAddDelReply) Size() (size int) {
639 size += 4 // m.Retval
642 func (m *IPContainerProxyAddDelReply) Marshal(b []byte) ([]byte, error) {
644 b = make([]byte, m.Size())
646 buf := codec.NewBuffer(b)
647 buf.EncodeInt32(m.Retval)
648 return buf.Bytes(), nil
650 func (m *IPContainerProxyAddDelReply) Unmarshal(b []byte) error {
651 buf := codec.NewBuffer(b)
652 m.Retval = buf.DecodeInt32()
656 // IPContainerProxyDetails defines message 'ip_container_proxy_details'.
657 type IPContainerProxyDetails struct {
658 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
659 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
662 func (m *IPContainerProxyDetails) Reset() { *m = IPContainerProxyDetails{} }
663 func (*IPContainerProxyDetails) GetMessageName() string { return "ip_container_proxy_details" }
664 func (*IPContainerProxyDetails) GetCrcString() string { return "a8085523" }
665 func (*IPContainerProxyDetails) GetMessageType() api.MessageType {
666 return api.ReplyMessage
669 func (m *IPContainerProxyDetails) Size() (size int) {
673 size += 4 // m.SwIfIndex
674 size += 1 // m.Prefix.Address.Af
675 size += 1 * 16 // m.Prefix.Address.Un
676 size += 1 // m.Prefix.Len
679 func (m *IPContainerProxyDetails) Marshal(b []byte) ([]byte, error) {
681 b = make([]byte, m.Size())
683 buf := codec.NewBuffer(b)
684 buf.EncodeUint32(uint32(m.SwIfIndex))
685 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
686 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
687 buf.EncodeUint8(m.Prefix.Len)
688 return buf.Bytes(), nil
690 func (m *IPContainerProxyDetails) Unmarshal(b []byte) error {
691 buf := codec.NewBuffer(b)
692 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
693 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
694 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
695 m.Prefix.Len = buf.DecodeUint8()
699 // IPContainerProxyDump defines message 'ip_container_proxy_dump'.
700 type IPContainerProxyDump struct{}
702 func (m *IPContainerProxyDump) Reset() { *m = IPContainerProxyDump{} }
703 func (*IPContainerProxyDump) GetMessageName() string { return "ip_container_proxy_dump" }
704 func (*IPContainerProxyDump) GetCrcString() string { return "51077d14" }
705 func (*IPContainerProxyDump) GetMessageType() api.MessageType {
706 return api.RequestMessage
709 func (m *IPContainerProxyDump) Size() (size int) {
715 func (m *IPContainerProxyDump) Marshal(b []byte) ([]byte, error) {
717 b = make([]byte, m.Size())
719 buf := codec.NewBuffer(b)
720 return buf.Bytes(), nil
722 func (m *IPContainerProxyDump) Unmarshal(b []byte) error {
726 // IPDetails defines message 'ip_details'.
727 type IPDetails struct {
728 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
729 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
732 func (m *IPDetails) Reset() { *m = IPDetails{} }
733 func (*IPDetails) GetMessageName() string { return "ip_details" }
734 func (*IPDetails) GetCrcString() string { return "eb152d07" }
735 func (*IPDetails) GetMessageType() api.MessageType {
736 return api.ReplyMessage
739 func (m *IPDetails) Size() (size int) {
743 size += 4 // m.SwIfIndex
744 size += 1 // m.IsIPv6
747 func (m *IPDetails) Marshal(b []byte) ([]byte, error) {
749 b = make([]byte, m.Size())
751 buf := codec.NewBuffer(b)
752 buf.EncodeUint32(uint32(m.SwIfIndex))
753 buf.EncodeBool(m.IsIPv6)
754 return buf.Bytes(), nil
756 func (m *IPDetails) Unmarshal(b []byte) error {
757 buf := codec.NewBuffer(b)
758 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
759 m.IsIPv6 = buf.DecodeBool()
763 // IPDump defines message 'ip_dump'.
765 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
768 func (m *IPDump) Reset() { *m = IPDump{} }
769 func (*IPDump) GetMessageName() string { return "ip_dump" }
770 func (*IPDump) GetCrcString() string { return "98d231ca" }
771 func (*IPDump) GetMessageType() api.MessageType {
772 return api.RequestMessage
775 func (m *IPDump) Size() (size int) {
779 size += 1 // m.IsIPv6
782 func (m *IPDump) Marshal(b []byte) ([]byte, error) {
784 b = make([]byte, m.Size())
786 buf := codec.NewBuffer(b)
787 buf.EncodeBool(m.IsIPv6)
788 return buf.Bytes(), nil
790 func (m *IPDump) Unmarshal(b []byte) error {
791 buf := codec.NewBuffer(b)
792 m.IsIPv6 = buf.DecodeBool()
796 // IPMrouteAddDel defines message 'ip_mroute_add_del'.
797 type IPMrouteAddDel struct {
798 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
799 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
800 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
803 func (m *IPMrouteAddDel) Reset() { *m = IPMrouteAddDel{} }
804 func (*IPMrouteAddDel) GetMessageName() string { return "ip_mroute_add_del" }
805 func (*IPMrouteAddDel) GetCrcString() string { return "0dd7e790" }
806 func (*IPMrouteAddDel) GetMessageType() api.MessageType {
807 return api.RequestMessage
810 func (m *IPMrouteAddDel) Size() (size int) {
815 size += 1 // m.IsMultipath
816 size += 4 // m.Route.TableID
817 size += 4 // m.Route.EntryFlags
818 size += 4 // m.Route.RpfID
819 size += 1 // m.Route.Prefix.Af
820 size += 2 // m.Route.Prefix.GrpAddressLength
821 size += 1 * 16 // m.Route.Prefix.GrpAddress
822 size += 1 * 16 // m.Route.Prefix.SrcAddress
823 size += 1 // m.Route.NPaths
824 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
825 var s2 mfib_types.MfibPath
827 if j2 < len(m.Route.Paths) {
828 s2 = m.Route.Paths[j2]
830 size += 4 // s2.ItfFlags
831 size += 4 // s2.Path.SwIfIndex
832 size += 4 // s2.Path.TableID
833 size += 4 // s2.Path.RpfID
834 size += 1 // s2.Path.Weight
835 size += 1 // s2.Path.Preference
836 size += 4 // s2.Path.Type
837 size += 4 // s2.Path.Flags
838 size += 4 // s2.Path.Proto
839 size += 1 * 16 // s2.Path.Nh.Address
840 size += 4 // s2.Path.Nh.ViaLabel
841 size += 4 // s2.Path.Nh.ObjID
842 size += 4 // s2.Path.Nh.ClassifyTableIndex
843 size += 1 // s2.Path.NLabels
844 for j4 := 0; j4 < 16; j4++ {
845 size += 1 // s2.Path.LabelStack[j4].IsUniform
846 size += 4 // s2.Path.LabelStack[j4].Label
847 size += 1 // s2.Path.LabelStack[j4].TTL
848 size += 1 // s2.Path.LabelStack[j4].Exp
853 func (m *IPMrouteAddDel) Marshal(b []byte) ([]byte, error) {
855 b = make([]byte, m.Size())
857 buf := codec.NewBuffer(b)
858 buf.EncodeBool(m.IsAdd)
859 buf.EncodeBool(m.IsMultipath)
860 buf.EncodeUint32(m.Route.TableID)
861 buf.EncodeUint32(uint32(m.Route.EntryFlags))
862 buf.EncodeUint32(m.Route.RpfID)
863 buf.EncodeUint8(uint8(m.Route.Prefix.Af))
864 buf.EncodeUint16(m.Route.Prefix.GrpAddressLength)
865 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16)
866 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16)
867 buf.EncodeUint8(uint8(len(m.Route.Paths)))
868 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
869 var v1 mfib_types.MfibPath // Paths
870 if j1 < len(m.Route.Paths) {
871 v1 = m.Route.Paths[j1]
873 buf.EncodeUint32(uint32(v1.ItfFlags))
874 buf.EncodeUint32(v1.Path.SwIfIndex)
875 buf.EncodeUint32(v1.Path.TableID)
876 buf.EncodeUint32(v1.Path.RpfID)
877 buf.EncodeUint8(v1.Path.Weight)
878 buf.EncodeUint8(v1.Path.Preference)
879 buf.EncodeUint32(uint32(v1.Path.Type))
880 buf.EncodeUint32(uint32(v1.Path.Flags))
881 buf.EncodeUint32(uint32(v1.Path.Proto))
882 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16)
883 buf.EncodeUint32(v1.Path.Nh.ViaLabel)
884 buf.EncodeUint32(v1.Path.Nh.ObjID)
885 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex)
886 buf.EncodeUint8(v1.Path.NLabels)
887 for j3 := 0; j3 < 16; j3++ {
888 buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform)
889 buf.EncodeUint32(v1.Path.LabelStack[j3].Label)
890 buf.EncodeUint8(v1.Path.LabelStack[j3].TTL)
891 buf.EncodeUint8(v1.Path.LabelStack[j3].Exp)
894 return buf.Bytes(), nil
896 func (m *IPMrouteAddDel) Unmarshal(b []byte) error {
897 buf := codec.NewBuffer(b)
898 m.IsAdd = buf.DecodeBool()
899 m.IsMultipath = buf.DecodeBool()
900 m.Route.TableID = buf.DecodeUint32()
901 m.Route.EntryFlags = mfib_types.MfibEntryFlags(buf.DecodeUint32())
902 m.Route.RpfID = buf.DecodeUint32()
903 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
904 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
905 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
906 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
907 m.Route.NPaths = buf.DecodeUint8()
908 m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths)
909 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
910 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
911 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
912 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
913 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
914 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
915 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
916 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32())
917 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32())
918 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
919 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
920 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
921 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
922 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
923 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
924 for j3 := 0; j3 < 16; j3++ {
925 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
926 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
927 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
928 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
934 // IPMrouteAddDelReply defines message 'ip_mroute_add_del_reply'.
935 type IPMrouteAddDelReply struct {
936 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
937 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
940 func (m *IPMrouteAddDelReply) Reset() { *m = IPMrouteAddDelReply{} }
941 func (*IPMrouteAddDelReply) GetMessageName() string { return "ip_mroute_add_del_reply" }
942 func (*IPMrouteAddDelReply) GetCrcString() string { return "1992deab" }
943 func (*IPMrouteAddDelReply) GetMessageType() api.MessageType {
944 return api.ReplyMessage
947 func (m *IPMrouteAddDelReply) Size() (size int) {
951 size += 4 // m.Retval
952 size += 4 // m.StatsIndex
955 func (m *IPMrouteAddDelReply) Marshal(b []byte) ([]byte, error) {
957 b = make([]byte, m.Size())
959 buf := codec.NewBuffer(b)
960 buf.EncodeInt32(m.Retval)
961 buf.EncodeUint32(m.StatsIndex)
962 return buf.Bytes(), nil
964 func (m *IPMrouteAddDelReply) Unmarshal(b []byte) error {
965 buf := codec.NewBuffer(b)
966 m.Retval = buf.DecodeInt32()
967 m.StatsIndex = buf.DecodeUint32()
971 // IPMrouteDetails defines message 'ip_mroute_details'.
972 type IPMrouteDetails struct {
973 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
976 func (m *IPMrouteDetails) Reset() { *m = IPMrouteDetails{} }
977 func (*IPMrouteDetails) GetMessageName() string { return "ip_mroute_details" }
978 func (*IPMrouteDetails) GetCrcString() string { return "c5cb23fc" }
979 func (*IPMrouteDetails) GetMessageType() api.MessageType {
980 return api.ReplyMessage
983 func (m *IPMrouteDetails) Size() (size int) {
987 size += 4 // m.Route.TableID
988 size += 4 // m.Route.EntryFlags
989 size += 4 // m.Route.RpfID
990 size += 1 // m.Route.Prefix.Af
991 size += 2 // m.Route.Prefix.GrpAddressLength
992 size += 1 * 16 // m.Route.Prefix.GrpAddress
993 size += 1 * 16 // m.Route.Prefix.SrcAddress
994 size += 1 // m.Route.NPaths
995 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
996 var s2 mfib_types.MfibPath
998 if j2 < len(m.Route.Paths) {
999 s2 = m.Route.Paths[j2]
1001 size += 4 // s2.ItfFlags
1002 size += 4 // s2.Path.SwIfIndex
1003 size += 4 // s2.Path.TableID
1004 size += 4 // s2.Path.RpfID
1005 size += 1 // s2.Path.Weight
1006 size += 1 // s2.Path.Preference
1007 size += 4 // s2.Path.Type
1008 size += 4 // s2.Path.Flags
1009 size += 4 // s2.Path.Proto
1010 size += 1 * 16 // s2.Path.Nh.Address
1011 size += 4 // s2.Path.Nh.ViaLabel
1012 size += 4 // s2.Path.Nh.ObjID
1013 size += 4 // s2.Path.Nh.ClassifyTableIndex
1014 size += 1 // s2.Path.NLabels
1015 for j4 := 0; j4 < 16; j4++ {
1016 size += 1 // s2.Path.LabelStack[j4].IsUniform
1017 size += 4 // s2.Path.LabelStack[j4].Label
1018 size += 1 // s2.Path.LabelStack[j4].TTL
1019 size += 1 // s2.Path.LabelStack[j4].Exp
1024 func (m *IPMrouteDetails) Marshal(b []byte) ([]byte, error) {
1026 b = make([]byte, m.Size())
1028 buf := codec.NewBuffer(b)
1029 buf.EncodeUint32(m.Route.TableID)
1030 buf.EncodeUint32(uint32(m.Route.EntryFlags))
1031 buf.EncodeUint32(m.Route.RpfID)
1032 buf.EncodeUint8(uint8(m.Route.Prefix.Af))
1033 buf.EncodeUint16(m.Route.Prefix.GrpAddressLength)
1034 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16)
1035 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16)
1036 buf.EncodeUint8(uint8(len(m.Route.Paths)))
1037 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1038 var v1 mfib_types.MfibPath // Paths
1039 if j1 < len(m.Route.Paths) {
1040 v1 = m.Route.Paths[j1]
1042 buf.EncodeUint32(uint32(v1.ItfFlags))
1043 buf.EncodeUint32(v1.Path.SwIfIndex)
1044 buf.EncodeUint32(v1.Path.TableID)
1045 buf.EncodeUint32(v1.Path.RpfID)
1046 buf.EncodeUint8(v1.Path.Weight)
1047 buf.EncodeUint8(v1.Path.Preference)
1048 buf.EncodeUint32(uint32(v1.Path.Type))
1049 buf.EncodeUint32(uint32(v1.Path.Flags))
1050 buf.EncodeUint32(uint32(v1.Path.Proto))
1051 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16)
1052 buf.EncodeUint32(v1.Path.Nh.ViaLabel)
1053 buf.EncodeUint32(v1.Path.Nh.ObjID)
1054 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex)
1055 buf.EncodeUint8(v1.Path.NLabels)
1056 for j3 := 0; j3 < 16; j3++ {
1057 buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform)
1058 buf.EncodeUint32(v1.Path.LabelStack[j3].Label)
1059 buf.EncodeUint8(v1.Path.LabelStack[j3].TTL)
1060 buf.EncodeUint8(v1.Path.LabelStack[j3].Exp)
1063 return buf.Bytes(), nil
1065 func (m *IPMrouteDetails) Unmarshal(b []byte) error {
1066 buf := codec.NewBuffer(b)
1067 m.Route.TableID = buf.DecodeUint32()
1068 m.Route.EntryFlags = mfib_types.MfibEntryFlags(buf.DecodeUint32())
1069 m.Route.RpfID = buf.DecodeUint32()
1070 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
1071 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
1072 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
1073 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
1074 m.Route.NPaths = buf.DecodeUint8()
1075 m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths)
1076 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1077 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
1078 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
1079 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
1080 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
1081 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
1082 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
1083 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32())
1084 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1085 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1086 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1087 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
1088 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
1089 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
1090 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
1091 for j3 := 0; j3 < 16; j3++ {
1092 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
1093 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
1094 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
1095 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
1101 // IPMrouteDump defines message 'ip_mroute_dump'.
1102 type IPMrouteDump struct {
1103 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
1106 func (m *IPMrouteDump) Reset() { *m = IPMrouteDump{} }
1107 func (*IPMrouteDump) GetMessageName() string { return "ip_mroute_dump" }
1108 func (*IPMrouteDump) GetCrcString() string { return "b9d2e09e" }
1109 func (*IPMrouteDump) GetMessageType() api.MessageType {
1110 return api.RequestMessage
1113 func (m *IPMrouteDump) Size() (size int) {
1117 size += 4 // m.Table.TableID
1118 size += 1 // m.Table.IsIP6
1119 size += 64 // m.Table.Name
1122 func (m *IPMrouteDump) Marshal(b []byte) ([]byte, error) {
1124 b = make([]byte, m.Size())
1126 buf := codec.NewBuffer(b)
1127 buf.EncodeUint32(m.Table.TableID)
1128 buf.EncodeBool(m.Table.IsIP6)
1129 buf.EncodeString(m.Table.Name, 64)
1130 return buf.Bytes(), nil
1132 func (m *IPMrouteDump) Unmarshal(b []byte) error {
1133 buf := codec.NewBuffer(b)
1134 m.Table.TableID = buf.DecodeUint32()
1135 m.Table.IsIP6 = buf.DecodeBool()
1136 m.Table.Name = buf.DecodeString(64)
1140 // IPMtableDetails defines message 'ip_mtable_details'.
1141 type IPMtableDetails struct {
1142 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
1145 func (m *IPMtableDetails) Reset() { *m = IPMtableDetails{} }
1146 func (*IPMtableDetails) GetMessageName() string { return "ip_mtable_details" }
1147 func (*IPMtableDetails) GetCrcString() string { return "b9d2e09e" }
1148 func (*IPMtableDetails) GetMessageType() api.MessageType {
1149 return api.RequestMessage
1152 func (m *IPMtableDetails) Size() (size int) {
1156 size += 4 // m.Table.TableID
1157 size += 1 // m.Table.IsIP6
1158 size += 64 // m.Table.Name
1161 func (m *IPMtableDetails) Marshal(b []byte) ([]byte, error) {
1163 b = make([]byte, m.Size())
1165 buf := codec.NewBuffer(b)
1166 buf.EncodeUint32(m.Table.TableID)
1167 buf.EncodeBool(m.Table.IsIP6)
1168 buf.EncodeString(m.Table.Name, 64)
1169 return buf.Bytes(), nil
1171 func (m *IPMtableDetails) Unmarshal(b []byte) error {
1172 buf := codec.NewBuffer(b)
1173 m.Table.TableID = buf.DecodeUint32()
1174 m.Table.IsIP6 = buf.DecodeBool()
1175 m.Table.Name = buf.DecodeString(64)
1179 // IPMtableDump defines message 'ip_mtable_dump'.
1180 type IPMtableDump struct{}
1182 func (m *IPMtableDump) Reset() { *m = IPMtableDump{} }
1183 func (*IPMtableDump) GetMessageName() string { return "ip_mtable_dump" }
1184 func (*IPMtableDump) GetCrcString() string { return "51077d14" }
1185 func (*IPMtableDump) GetMessageType() api.MessageType {
1186 return api.RequestMessage
1189 func (m *IPMtableDump) Size() (size int) {
1195 func (m *IPMtableDump) Marshal(b []byte) ([]byte, error) {
1197 b = make([]byte, m.Size())
1199 buf := codec.NewBuffer(b)
1200 return buf.Bytes(), nil
1202 func (m *IPMtableDump) Unmarshal(b []byte) error {
1206 // IPPathMtuDetails defines message 'ip_path_mtu_details'.
1207 type IPPathMtuDetails struct {
1208 Pmtu IPPathMtu `binapi:"ip_path_mtu,name=pmtu" json:"pmtu,omitempty"`
1211 func (m *IPPathMtuDetails) Reset() { *m = IPPathMtuDetails{} }
1212 func (*IPPathMtuDetails) GetMessageName() string { return "ip_path_mtu_details" }
1213 func (*IPPathMtuDetails) GetCrcString() string { return "ac9539a7" }
1214 func (*IPPathMtuDetails) GetMessageType() api.MessageType {
1215 return api.ReplyMessage
1218 func (m *IPPathMtuDetails) Size() (size int) {
1222 size += 4 // m.Pmtu.ClientIndex
1223 size += 4 // m.Pmtu.Context
1224 size += 4 // m.Pmtu.TableID
1225 size += 1 // m.Pmtu.Nh.Af
1226 size += 1 * 16 // m.Pmtu.Nh.Un
1227 size += 2 // m.Pmtu.PathMtu
1230 func (m *IPPathMtuDetails) Marshal(b []byte) ([]byte, error) {
1232 b = make([]byte, m.Size())
1234 buf := codec.NewBuffer(b)
1235 buf.EncodeUint32(m.Pmtu.ClientIndex)
1236 buf.EncodeUint32(m.Pmtu.Context)
1237 buf.EncodeUint32(m.Pmtu.TableID)
1238 buf.EncodeUint8(uint8(m.Pmtu.Nh.Af))
1239 buf.EncodeBytes(m.Pmtu.Nh.Un.XXX_UnionData[:], 16)
1240 buf.EncodeUint16(m.Pmtu.PathMtu)
1241 return buf.Bytes(), nil
1243 func (m *IPPathMtuDetails) Unmarshal(b []byte) error {
1244 buf := codec.NewBuffer(b)
1245 m.Pmtu.ClientIndex = buf.DecodeUint32()
1246 m.Pmtu.Context = buf.DecodeUint32()
1247 m.Pmtu.TableID = buf.DecodeUint32()
1248 m.Pmtu.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1249 copy(m.Pmtu.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1250 m.Pmtu.PathMtu = buf.DecodeUint16()
1254 // IPPathMtuGet defines message 'ip_path_mtu_get'.
1255 type IPPathMtuGet struct {
1256 Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
1259 func (m *IPPathMtuGet) Reset() { *m = IPPathMtuGet{} }
1260 func (*IPPathMtuGet) GetMessageName() string { return "ip_path_mtu_get" }
1261 func (*IPPathMtuGet) GetCrcString() string { return "f75ba505" }
1262 func (*IPPathMtuGet) GetMessageType() api.MessageType {
1263 return api.RequestMessage
1266 func (m *IPPathMtuGet) Size() (size int) {
1270 size += 4 // m.Cursor
1273 func (m *IPPathMtuGet) Marshal(b []byte) ([]byte, error) {
1275 b = make([]byte, m.Size())
1277 buf := codec.NewBuffer(b)
1278 buf.EncodeUint32(m.Cursor)
1279 return buf.Bytes(), nil
1281 func (m *IPPathMtuGet) Unmarshal(b []byte) error {
1282 buf := codec.NewBuffer(b)
1283 m.Cursor = buf.DecodeUint32()
1287 // IPPathMtuGetReply defines message 'ip_path_mtu_get_reply'.
1288 type IPPathMtuGetReply struct {
1289 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1290 Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
1293 func (m *IPPathMtuGetReply) Reset() { *m = IPPathMtuGetReply{} }
1294 func (*IPPathMtuGetReply) GetMessageName() string { return "ip_path_mtu_get_reply" }
1295 func (*IPPathMtuGetReply) GetCrcString() string { return "53b48f5d" }
1296 func (*IPPathMtuGetReply) GetMessageType() api.MessageType {
1297 return api.ReplyMessage
1300 func (m *IPPathMtuGetReply) Size() (size int) {
1304 size += 4 // m.Retval
1305 size += 4 // m.Cursor
1308 func (m *IPPathMtuGetReply) Marshal(b []byte) ([]byte, error) {
1310 b = make([]byte, m.Size())
1312 buf := codec.NewBuffer(b)
1313 buf.EncodeInt32(m.Retval)
1314 buf.EncodeUint32(m.Cursor)
1315 return buf.Bytes(), nil
1317 func (m *IPPathMtuGetReply) Unmarshal(b []byte) error {
1318 buf := codec.NewBuffer(b)
1319 m.Retval = buf.DecodeInt32()
1320 m.Cursor = buf.DecodeUint32()
1324 // IPPathMtuReplaceBegin defines message 'ip_path_mtu_replace_begin'.
1325 type IPPathMtuReplaceBegin struct{}
1327 func (m *IPPathMtuReplaceBegin) Reset() { *m = IPPathMtuReplaceBegin{} }
1328 func (*IPPathMtuReplaceBegin) GetMessageName() string { return "ip_path_mtu_replace_begin" }
1329 func (*IPPathMtuReplaceBegin) GetCrcString() string { return "51077d14" }
1330 func (*IPPathMtuReplaceBegin) GetMessageType() api.MessageType {
1331 return api.RequestMessage
1334 func (m *IPPathMtuReplaceBegin) Size() (size int) {
1340 func (m *IPPathMtuReplaceBegin) Marshal(b []byte) ([]byte, error) {
1342 b = make([]byte, m.Size())
1344 buf := codec.NewBuffer(b)
1345 return buf.Bytes(), nil
1347 func (m *IPPathMtuReplaceBegin) Unmarshal(b []byte) error {
1351 // IPPathMtuReplaceBeginReply defines message 'ip_path_mtu_replace_begin_reply'.
1352 type IPPathMtuReplaceBeginReply struct {
1353 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1356 func (m *IPPathMtuReplaceBeginReply) Reset() { *m = IPPathMtuReplaceBeginReply{} }
1357 func (*IPPathMtuReplaceBeginReply) GetMessageName() string { return "ip_path_mtu_replace_begin_reply" }
1358 func (*IPPathMtuReplaceBeginReply) GetCrcString() string { return "e8d4e804" }
1359 func (*IPPathMtuReplaceBeginReply) GetMessageType() api.MessageType {
1360 return api.ReplyMessage
1363 func (m *IPPathMtuReplaceBeginReply) Size() (size int) {
1367 size += 4 // m.Retval
1370 func (m *IPPathMtuReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
1372 b = make([]byte, m.Size())
1374 buf := codec.NewBuffer(b)
1375 buf.EncodeInt32(m.Retval)
1376 return buf.Bytes(), nil
1378 func (m *IPPathMtuReplaceBeginReply) Unmarshal(b []byte) error {
1379 buf := codec.NewBuffer(b)
1380 m.Retval = buf.DecodeInt32()
1384 // IPPathMtuReplaceEnd defines message 'ip_path_mtu_replace_end'.
1385 type IPPathMtuReplaceEnd struct{}
1387 func (m *IPPathMtuReplaceEnd) Reset() { *m = IPPathMtuReplaceEnd{} }
1388 func (*IPPathMtuReplaceEnd) GetMessageName() string { return "ip_path_mtu_replace_end" }
1389 func (*IPPathMtuReplaceEnd) GetCrcString() string { return "51077d14" }
1390 func (*IPPathMtuReplaceEnd) GetMessageType() api.MessageType {
1391 return api.RequestMessage
1394 func (m *IPPathMtuReplaceEnd) Size() (size int) {
1400 func (m *IPPathMtuReplaceEnd) Marshal(b []byte) ([]byte, error) {
1402 b = make([]byte, m.Size())
1404 buf := codec.NewBuffer(b)
1405 return buf.Bytes(), nil
1407 func (m *IPPathMtuReplaceEnd) Unmarshal(b []byte) error {
1411 // IPPathMtuReplaceEndReply defines message 'ip_path_mtu_replace_end_reply'.
1412 type IPPathMtuReplaceEndReply struct {
1413 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1416 func (m *IPPathMtuReplaceEndReply) Reset() { *m = IPPathMtuReplaceEndReply{} }
1417 func (*IPPathMtuReplaceEndReply) GetMessageName() string { return "ip_path_mtu_replace_end_reply" }
1418 func (*IPPathMtuReplaceEndReply) GetCrcString() string { return "e8d4e804" }
1419 func (*IPPathMtuReplaceEndReply) GetMessageType() api.MessageType {
1420 return api.ReplyMessage
1423 func (m *IPPathMtuReplaceEndReply) Size() (size int) {
1427 size += 4 // m.Retval
1430 func (m *IPPathMtuReplaceEndReply) Marshal(b []byte) ([]byte, error) {
1432 b = make([]byte, m.Size())
1434 buf := codec.NewBuffer(b)
1435 buf.EncodeInt32(m.Retval)
1436 return buf.Bytes(), nil
1438 func (m *IPPathMtuReplaceEndReply) Unmarshal(b []byte) error {
1439 buf := codec.NewBuffer(b)
1440 m.Retval = buf.DecodeInt32()
1444 // IPPathMtuUpdate defines message 'ip_path_mtu_update'.
1445 type IPPathMtuUpdate struct {
1446 Pmtu IPPathMtu `binapi:"ip_path_mtu,name=pmtu" json:"pmtu,omitempty"`
1449 func (m *IPPathMtuUpdate) Reset() { *m = IPPathMtuUpdate{} }
1450 func (*IPPathMtuUpdate) GetMessageName() string { return "ip_path_mtu_update" }
1451 func (*IPPathMtuUpdate) GetCrcString() string { return "10bbe5cb" }
1452 func (*IPPathMtuUpdate) GetMessageType() api.MessageType {
1453 return api.RequestMessage
1456 func (m *IPPathMtuUpdate) Size() (size int) {
1460 size += 4 // m.Pmtu.ClientIndex
1461 size += 4 // m.Pmtu.Context
1462 size += 4 // m.Pmtu.TableID
1463 size += 1 // m.Pmtu.Nh.Af
1464 size += 1 * 16 // m.Pmtu.Nh.Un
1465 size += 2 // m.Pmtu.PathMtu
1468 func (m *IPPathMtuUpdate) Marshal(b []byte) ([]byte, error) {
1470 b = make([]byte, m.Size())
1472 buf := codec.NewBuffer(b)
1473 buf.EncodeUint32(m.Pmtu.ClientIndex)
1474 buf.EncodeUint32(m.Pmtu.Context)
1475 buf.EncodeUint32(m.Pmtu.TableID)
1476 buf.EncodeUint8(uint8(m.Pmtu.Nh.Af))
1477 buf.EncodeBytes(m.Pmtu.Nh.Un.XXX_UnionData[:], 16)
1478 buf.EncodeUint16(m.Pmtu.PathMtu)
1479 return buf.Bytes(), nil
1481 func (m *IPPathMtuUpdate) Unmarshal(b []byte) error {
1482 buf := codec.NewBuffer(b)
1483 m.Pmtu.ClientIndex = buf.DecodeUint32()
1484 m.Pmtu.Context = buf.DecodeUint32()
1485 m.Pmtu.TableID = buf.DecodeUint32()
1486 m.Pmtu.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1487 copy(m.Pmtu.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1488 m.Pmtu.PathMtu = buf.DecodeUint16()
1492 // IPPathMtuUpdateReply defines message 'ip_path_mtu_update_reply'.
1493 type IPPathMtuUpdateReply struct {
1494 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1497 func (m *IPPathMtuUpdateReply) Reset() { *m = IPPathMtuUpdateReply{} }
1498 func (*IPPathMtuUpdateReply) GetMessageName() string { return "ip_path_mtu_update_reply" }
1499 func (*IPPathMtuUpdateReply) GetCrcString() string { return "e8d4e804" }
1500 func (*IPPathMtuUpdateReply) GetMessageType() api.MessageType {
1501 return api.ReplyMessage
1504 func (m *IPPathMtuUpdateReply) Size() (size int) {
1508 size += 4 // m.Retval
1511 func (m *IPPathMtuUpdateReply) Marshal(b []byte) ([]byte, error) {
1513 b = make([]byte, m.Size())
1515 buf := codec.NewBuffer(b)
1516 buf.EncodeInt32(m.Retval)
1517 return buf.Bytes(), nil
1519 func (m *IPPathMtuUpdateReply) Unmarshal(b []byte) error {
1520 buf := codec.NewBuffer(b)
1521 m.Retval = buf.DecodeInt32()
1525 // IPPuntPolice defines message 'ip_punt_police'.
1526 type IPPuntPolice struct {
1527 PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"`
1528 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1529 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1532 func (m *IPPuntPolice) Reset() { *m = IPPuntPolice{} }
1533 func (*IPPuntPolice) GetMessageName() string { return "ip_punt_police" }
1534 func (*IPPuntPolice) GetCrcString() string { return "db867cea" }
1535 func (*IPPuntPolice) GetMessageType() api.MessageType {
1536 return api.RequestMessage
1539 func (m *IPPuntPolice) Size() (size int) {
1543 size += 4 // m.PolicerIndex
1544 size += 1 // m.IsAdd
1545 size += 1 // m.IsIP6
1548 func (m *IPPuntPolice) Marshal(b []byte) ([]byte, error) {
1550 b = make([]byte, m.Size())
1552 buf := codec.NewBuffer(b)
1553 buf.EncodeUint32(m.PolicerIndex)
1554 buf.EncodeBool(m.IsAdd)
1555 buf.EncodeBool(m.IsIP6)
1556 return buf.Bytes(), nil
1558 func (m *IPPuntPolice) Unmarshal(b []byte) error {
1559 buf := codec.NewBuffer(b)
1560 m.PolicerIndex = buf.DecodeUint32()
1561 m.IsAdd = buf.DecodeBool()
1562 m.IsIP6 = buf.DecodeBool()
1566 // IPPuntPoliceReply defines message 'ip_punt_police_reply'.
1567 type IPPuntPoliceReply struct {
1568 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1571 func (m *IPPuntPoliceReply) Reset() { *m = IPPuntPoliceReply{} }
1572 func (*IPPuntPoliceReply) GetMessageName() string { return "ip_punt_police_reply" }
1573 func (*IPPuntPoliceReply) GetCrcString() string { return "e8d4e804" }
1574 func (*IPPuntPoliceReply) GetMessageType() api.MessageType {
1575 return api.ReplyMessage
1578 func (m *IPPuntPoliceReply) Size() (size int) {
1582 size += 4 // m.Retval
1585 func (m *IPPuntPoliceReply) Marshal(b []byte) ([]byte, error) {
1587 b = make([]byte, m.Size())
1589 buf := codec.NewBuffer(b)
1590 buf.EncodeInt32(m.Retval)
1591 return buf.Bytes(), nil
1593 func (m *IPPuntPoliceReply) Unmarshal(b []byte) error {
1594 buf := codec.NewBuffer(b)
1595 m.Retval = buf.DecodeInt32()
1599 // IPPuntRedirect defines message 'ip_punt_redirect'.
1600 // Deprecated: the message will be removed in the future versions
1601 type IPPuntRedirect struct {
1602 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
1603 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1606 func (m *IPPuntRedirect) Reset() { *m = IPPuntRedirect{} }
1607 func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" }
1608 func (*IPPuntRedirect) GetCrcString() string { return "6580f635" }
1609 func (*IPPuntRedirect) GetMessageType() api.MessageType {
1610 return api.RequestMessage
1613 func (m *IPPuntRedirect) Size() (size int) {
1617 size += 4 // m.Punt.RxSwIfIndex
1618 size += 4 // m.Punt.TxSwIfIndex
1619 size += 1 // m.Punt.Nh.Af
1620 size += 1 * 16 // m.Punt.Nh.Un
1621 size += 1 // m.IsAdd
1624 func (m *IPPuntRedirect) Marshal(b []byte) ([]byte, error) {
1626 b = make([]byte, m.Size())
1628 buf := codec.NewBuffer(b)
1629 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1630 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
1631 buf.EncodeUint8(uint8(m.Punt.Nh.Af))
1632 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16)
1633 buf.EncodeBool(m.IsAdd)
1634 return buf.Bytes(), nil
1636 func (m *IPPuntRedirect) Unmarshal(b []byte) error {
1637 buf := codec.NewBuffer(b)
1638 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1639 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1640 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1641 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1642 m.IsAdd = buf.DecodeBool()
1646 // IPPuntRedirectDetails defines message 'ip_punt_redirect_details'.
1647 type IPPuntRedirectDetails struct {
1648 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
1651 func (m *IPPuntRedirectDetails) Reset() { *m = IPPuntRedirectDetails{} }
1652 func (*IPPuntRedirectDetails) GetMessageName() string { return "ip_punt_redirect_details" }
1653 func (*IPPuntRedirectDetails) GetCrcString() string { return "2cef63e7" }
1654 func (*IPPuntRedirectDetails) GetMessageType() api.MessageType {
1655 return api.ReplyMessage
1658 func (m *IPPuntRedirectDetails) Size() (size int) {
1662 size += 4 // m.Punt.RxSwIfIndex
1663 size += 4 // m.Punt.TxSwIfIndex
1664 size += 1 // m.Punt.Nh.Af
1665 size += 1 * 16 // m.Punt.Nh.Un
1668 func (m *IPPuntRedirectDetails) Marshal(b []byte) ([]byte, error) {
1670 b = make([]byte, m.Size())
1672 buf := codec.NewBuffer(b)
1673 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1674 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
1675 buf.EncodeUint8(uint8(m.Punt.Nh.Af))
1676 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16)
1677 return buf.Bytes(), nil
1679 func (m *IPPuntRedirectDetails) Unmarshal(b []byte) error {
1680 buf := codec.NewBuffer(b)
1681 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1682 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1683 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1684 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1688 // IPPuntRedirectDump defines message 'ip_punt_redirect_dump'.
1689 type IPPuntRedirectDump struct {
1690 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1691 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
1694 func (m *IPPuntRedirectDump) Reset() { *m = IPPuntRedirectDump{} }
1695 func (*IPPuntRedirectDump) GetMessageName() string { return "ip_punt_redirect_dump" }
1696 func (*IPPuntRedirectDump) GetCrcString() string { return "2d033de4" }
1697 func (*IPPuntRedirectDump) GetMessageType() api.MessageType {
1698 return api.RequestMessage
1701 func (m *IPPuntRedirectDump) Size() (size int) {
1705 size += 4 // m.SwIfIndex
1706 size += 1 // m.IsIPv6
1709 func (m *IPPuntRedirectDump) Marshal(b []byte) ([]byte, error) {
1711 b = make([]byte, m.Size())
1713 buf := codec.NewBuffer(b)
1714 buf.EncodeUint32(uint32(m.SwIfIndex))
1715 buf.EncodeBool(m.IsIPv6)
1716 return buf.Bytes(), nil
1718 func (m *IPPuntRedirectDump) Unmarshal(b []byte) error {
1719 buf := codec.NewBuffer(b)
1720 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1721 m.IsIPv6 = buf.DecodeBool()
1725 // IPPuntRedirectReply defines message 'ip_punt_redirect_reply'.
1726 // Deprecated: the message will be removed in the future versions
1727 type IPPuntRedirectReply struct {
1728 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1731 func (m *IPPuntRedirectReply) Reset() { *m = IPPuntRedirectReply{} }
1732 func (*IPPuntRedirectReply) GetMessageName() string { return "ip_punt_redirect_reply" }
1733 func (*IPPuntRedirectReply) GetCrcString() string { return "e8d4e804" }
1734 func (*IPPuntRedirectReply) GetMessageType() api.MessageType {
1735 return api.ReplyMessage
1738 func (m *IPPuntRedirectReply) Size() (size int) {
1742 size += 4 // m.Retval
1745 func (m *IPPuntRedirectReply) Marshal(b []byte) ([]byte, error) {
1747 b = make([]byte, m.Size())
1749 buf := codec.NewBuffer(b)
1750 buf.EncodeInt32(m.Retval)
1751 return buf.Bytes(), nil
1753 func (m *IPPuntRedirectReply) Unmarshal(b []byte) error {
1754 buf := codec.NewBuffer(b)
1755 m.Retval = buf.DecodeInt32()
1759 // IPPuntRedirectV2Details defines message 'ip_punt_redirect_v2_details'.
1760 type IPPuntRedirectV2Details struct {
1761 Punt PuntRedirectV2 `binapi:"punt_redirect_v2,name=punt" json:"punt,omitempty"`
1764 func (m *IPPuntRedirectV2Details) Reset() { *m = IPPuntRedirectV2Details{} }
1765 func (*IPPuntRedirectV2Details) GetMessageName() string { return "ip_punt_redirect_v2_details" }
1766 func (*IPPuntRedirectV2Details) GetCrcString() string { return "7ba42e1d" }
1767 func (*IPPuntRedirectV2Details) GetMessageType() api.MessageType {
1768 return api.ReplyMessage
1771 func (m *IPPuntRedirectV2Details) Size() (size int) {
1775 size += 4 // m.Punt.RxSwIfIndex
1776 size += 1 // m.Punt.Af
1777 size += 4 // m.Punt.NPaths
1778 for j2 := 0; j2 < len(m.Punt.Paths); j2++ {
1779 var s2 fib_types.FibPath
1781 if j2 < len(m.Punt.Paths) {
1782 s2 = m.Punt.Paths[j2]
1784 size += 4 // s2.SwIfIndex
1785 size += 4 // s2.TableID
1786 size += 4 // s2.RpfID
1787 size += 1 // s2.Weight
1788 size += 1 // s2.Preference
1789 size += 4 // s2.Type
1790 size += 4 // s2.Flags
1791 size += 4 // s2.Proto
1792 size += 1 * 16 // s2.Nh.Address
1793 size += 4 // s2.Nh.ViaLabel
1794 size += 4 // s2.Nh.ObjID
1795 size += 4 // s2.Nh.ClassifyTableIndex
1796 size += 1 // s2.NLabels
1797 for j3 := 0; j3 < 16; j3++ {
1798 size += 1 // s2.LabelStack[j3].IsUniform
1799 size += 4 // s2.LabelStack[j3].Label
1800 size += 1 // s2.LabelStack[j3].TTL
1801 size += 1 // s2.LabelStack[j3].Exp
1806 func (m *IPPuntRedirectV2Details) Marshal(b []byte) ([]byte, error) {
1808 b = make([]byte, m.Size())
1810 buf := codec.NewBuffer(b)
1811 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1812 buf.EncodeUint8(uint8(m.Punt.Af))
1813 buf.EncodeUint32(uint32(len(m.Punt.Paths)))
1814 for j1 := 0; j1 < len(m.Punt.Paths); j1++ {
1815 var v1 fib_types.FibPath // Paths
1816 if j1 < len(m.Punt.Paths) {
1817 v1 = m.Punt.Paths[j1]
1819 buf.EncodeUint32(v1.SwIfIndex)
1820 buf.EncodeUint32(v1.TableID)
1821 buf.EncodeUint32(v1.RpfID)
1822 buf.EncodeUint8(v1.Weight)
1823 buf.EncodeUint8(v1.Preference)
1824 buf.EncodeUint32(uint32(v1.Type))
1825 buf.EncodeUint32(uint32(v1.Flags))
1826 buf.EncodeUint32(uint32(v1.Proto))
1827 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
1828 buf.EncodeUint32(v1.Nh.ViaLabel)
1829 buf.EncodeUint32(v1.Nh.ObjID)
1830 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
1831 buf.EncodeUint8(v1.NLabels)
1832 for j2 := 0; j2 < 16; j2++ {
1833 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
1834 buf.EncodeUint32(v1.LabelStack[j2].Label)
1835 buf.EncodeUint8(v1.LabelStack[j2].TTL)
1836 buf.EncodeUint8(v1.LabelStack[j2].Exp)
1839 return buf.Bytes(), nil
1841 func (m *IPPuntRedirectV2Details) Unmarshal(b []byte) error {
1842 buf := codec.NewBuffer(b)
1843 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1844 m.Punt.Af = ip_types.AddressFamily(buf.DecodeUint8())
1845 m.Punt.NPaths = buf.DecodeUint32()
1846 m.Punt.Paths = make([]fib_types.FibPath, m.Punt.NPaths)
1847 for j1 := 0; j1 < len(m.Punt.Paths); j1++ {
1848 m.Punt.Paths[j1].SwIfIndex = buf.DecodeUint32()
1849 m.Punt.Paths[j1].TableID = buf.DecodeUint32()
1850 m.Punt.Paths[j1].RpfID = buf.DecodeUint32()
1851 m.Punt.Paths[j1].Weight = buf.DecodeUint8()
1852 m.Punt.Paths[j1].Preference = buf.DecodeUint8()
1853 m.Punt.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
1854 m.Punt.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1855 m.Punt.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1856 copy(m.Punt.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1857 m.Punt.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
1858 m.Punt.Paths[j1].Nh.ObjID = buf.DecodeUint32()
1859 m.Punt.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
1860 m.Punt.Paths[j1].NLabels = buf.DecodeUint8()
1861 for j2 := 0; j2 < 16; j2++ {
1862 m.Punt.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
1863 m.Punt.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
1864 m.Punt.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
1865 m.Punt.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1871 // IPPuntRedirectV2Dump defines message 'ip_punt_redirect_v2_dump'.
1872 type IPPuntRedirectV2Dump struct {
1873 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1874 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
1877 func (m *IPPuntRedirectV2Dump) Reset() { *m = IPPuntRedirectV2Dump{} }
1878 func (*IPPuntRedirectV2Dump) GetMessageName() string { return "ip_punt_redirect_v2_dump" }
1879 func (*IPPuntRedirectV2Dump) GetCrcString() string { return "d817a484" }
1880 func (*IPPuntRedirectV2Dump) GetMessageType() api.MessageType {
1881 return api.RequestMessage
1884 func (m *IPPuntRedirectV2Dump) Size() (size int) {
1888 size += 4 // m.SwIfIndex
1892 func (m *IPPuntRedirectV2Dump) Marshal(b []byte) ([]byte, error) {
1894 b = make([]byte, m.Size())
1896 buf := codec.NewBuffer(b)
1897 buf.EncodeUint32(uint32(m.SwIfIndex))
1898 buf.EncodeUint8(uint8(m.Af))
1899 return buf.Bytes(), nil
1901 func (m *IPPuntRedirectV2Dump) Unmarshal(b []byte) error {
1902 buf := codec.NewBuffer(b)
1903 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1904 m.Af = ip_types.AddressFamily(buf.DecodeUint8())
1908 // IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'.
1909 type IPReassemblyEnableDisable struct {
1910 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1911 EnableIP4 bool `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"`
1912 EnableIP6 bool `binapi:"bool,name=enable_ip6" json:"enable_ip6,omitempty"`
1913 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1916 func (m *IPReassemblyEnableDisable) Reset() { *m = IPReassemblyEnableDisable{} }
1917 func (*IPReassemblyEnableDisable) GetMessageName() string { return "ip_reassembly_enable_disable" }
1918 func (*IPReassemblyEnableDisable) GetCrcString() string { return "eb77968d" }
1919 func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType {
1920 return api.RequestMessage
1923 func (m *IPReassemblyEnableDisable) Size() (size int) {
1927 size += 4 // m.SwIfIndex
1928 size += 1 // m.EnableIP4
1929 size += 1 // m.EnableIP6
1933 func (m *IPReassemblyEnableDisable) Marshal(b []byte) ([]byte, error) {
1935 b = make([]byte, m.Size())
1937 buf := codec.NewBuffer(b)
1938 buf.EncodeUint32(uint32(m.SwIfIndex))
1939 buf.EncodeBool(m.EnableIP4)
1940 buf.EncodeBool(m.EnableIP6)
1941 buf.EncodeUint32(uint32(m.Type))
1942 return buf.Bytes(), nil
1944 func (m *IPReassemblyEnableDisable) Unmarshal(b []byte) error {
1945 buf := codec.NewBuffer(b)
1946 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1947 m.EnableIP4 = buf.DecodeBool()
1948 m.EnableIP6 = buf.DecodeBool()
1949 m.Type = IPReassType(buf.DecodeUint32())
1953 // IPReassemblyEnableDisableReply defines message 'ip_reassembly_enable_disable_reply'.
1954 type IPReassemblyEnableDisableReply struct {
1955 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1958 func (m *IPReassemblyEnableDisableReply) Reset() { *m = IPReassemblyEnableDisableReply{} }
1959 func (*IPReassemblyEnableDisableReply) GetMessageName() string {
1960 return "ip_reassembly_enable_disable_reply"
1962 func (*IPReassemblyEnableDisableReply) GetCrcString() string { return "e8d4e804" }
1963 func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType {
1964 return api.ReplyMessage
1967 func (m *IPReassemblyEnableDisableReply) Size() (size int) {
1971 size += 4 // m.Retval
1974 func (m *IPReassemblyEnableDisableReply) Marshal(b []byte) ([]byte, error) {
1976 b = make([]byte, m.Size())
1978 buf := codec.NewBuffer(b)
1979 buf.EncodeInt32(m.Retval)
1980 return buf.Bytes(), nil
1982 func (m *IPReassemblyEnableDisableReply) Unmarshal(b []byte) error {
1983 buf := codec.NewBuffer(b)
1984 m.Retval = buf.DecodeInt32()
1988 // IPReassemblyGet defines message 'ip_reassembly_get'.
1989 type IPReassemblyGet struct {
1990 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1991 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1994 func (m *IPReassemblyGet) Reset() { *m = IPReassemblyGet{} }
1995 func (*IPReassemblyGet) GetMessageName() string { return "ip_reassembly_get" }
1996 func (*IPReassemblyGet) GetCrcString() string { return "ea13ff63" }
1997 func (*IPReassemblyGet) GetMessageType() api.MessageType {
1998 return api.RequestMessage
2001 func (m *IPReassemblyGet) Size() (size int) {
2005 size += 1 // m.IsIP6
2009 func (m *IPReassemblyGet) Marshal(b []byte) ([]byte, error) {
2011 b = make([]byte, m.Size())
2013 buf := codec.NewBuffer(b)
2014 buf.EncodeBool(m.IsIP6)
2015 buf.EncodeUint32(uint32(m.Type))
2016 return buf.Bytes(), nil
2018 func (m *IPReassemblyGet) Unmarshal(b []byte) error {
2019 buf := codec.NewBuffer(b)
2020 m.IsIP6 = buf.DecodeBool()
2021 m.Type = IPReassType(buf.DecodeUint32())
2025 // IPReassemblyGetReply defines message 'ip_reassembly_get_reply'.
2026 type IPReassemblyGetReply struct {
2027 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2028 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
2029 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
2030 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
2031 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
2032 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
2035 func (m *IPReassemblyGetReply) Reset() { *m = IPReassemblyGetReply{} }
2036 func (*IPReassemblyGetReply) GetMessageName() string { return "ip_reassembly_get_reply" }
2037 func (*IPReassemblyGetReply) GetCrcString() string { return "d5eb8d34" }
2038 func (*IPReassemblyGetReply) GetMessageType() api.MessageType {
2039 return api.ReplyMessage
2042 func (m *IPReassemblyGetReply) Size() (size int) {
2046 size += 4 // m.Retval
2047 size += 4 // m.TimeoutMs
2048 size += 4 // m.MaxReassemblies
2049 size += 4 // m.MaxReassemblyLength
2050 size += 4 // m.ExpireWalkIntervalMs
2051 size += 1 // m.IsIP6
2054 func (m *IPReassemblyGetReply) Marshal(b []byte) ([]byte, error) {
2056 b = make([]byte, m.Size())
2058 buf := codec.NewBuffer(b)
2059 buf.EncodeInt32(m.Retval)
2060 buf.EncodeUint32(m.TimeoutMs)
2061 buf.EncodeUint32(m.MaxReassemblies)
2062 buf.EncodeUint32(m.MaxReassemblyLength)
2063 buf.EncodeUint32(m.ExpireWalkIntervalMs)
2064 buf.EncodeBool(m.IsIP6)
2065 return buf.Bytes(), nil
2067 func (m *IPReassemblyGetReply) Unmarshal(b []byte) error {
2068 buf := codec.NewBuffer(b)
2069 m.Retval = buf.DecodeInt32()
2070 m.TimeoutMs = buf.DecodeUint32()
2071 m.MaxReassemblies = buf.DecodeUint32()
2072 m.MaxReassemblyLength = buf.DecodeUint32()
2073 m.ExpireWalkIntervalMs = buf.DecodeUint32()
2074 m.IsIP6 = buf.DecodeBool()
2078 // IPReassemblySet defines message 'ip_reassembly_set'.
2079 type IPReassemblySet struct {
2080 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
2081 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
2082 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
2083 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
2084 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
2085 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
2088 func (m *IPReassemblySet) Reset() { *m = IPReassemblySet{} }
2089 func (*IPReassemblySet) GetMessageName() string { return "ip_reassembly_set" }
2090 func (*IPReassemblySet) GetCrcString() string { return "16467d25" }
2091 func (*IPReassemblySet) GetMessageType() api.MessageType {
2092 return api.RequestMessage
2095 func (m *IPReassemblySet) Size() (size int) {
2099 size += 4 // m.TimeoutMs
2100 size += 4 // m.MaxReassemblies
2101 size += 4 // m.MaxReassemblyLength
2102 size += 4 // m.ExpireWalkIntervalMs
2103 size += 1 // m.IsIP6
2107 func (m *IPReassemblySet) Marshal(b []byte) ([]byte, error) {
2109 b = make([]byte, m.Size())
2111 buf := codec.NewBuffer(b)
2112 buf.EncodeUint32(m.TimeoutMs)
2113 buf.EncodeUint32(m.MaxReassemblies)
2114 buf.EncodeUint32(m.MaxReassemblyLength)
2115 buf.EncodeUint32(m.ExpireWalkIntervalMs)
2116 buf.EncodeBool(m.IsIP6)
2117 buf.EncodeUint32(uint32(m.Type))
2118 return buf.Bytes(), nil
2120 func (m *IPReassemblySet) Unmarshal(b []byte) error {
2121 buf := codec.NewBuffer(b)
2122 m.TimeoutMs = buf.DecodeUint32()
2123 m.MaxReassemblies = buf.DecodeUint32()
2124 m.MaxReassemblyLength = buf.DecodeUint32()
2125 m.ExpireWalkIntervalMs = buf.DecodeUint32()
2126 m.IsIP6 = buf.DecodeBool()
2127 m.Type = IPReassType(buf.DecodeUint32())
2131 // IPReassemblySetReply defines message 'ip_reassembly_set_reply'.
2132 type IPReassemblySetReply struct {
2133 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2136 func (m *IPReassemblySetReply) Reset() { *m = IPReassemblySetReply{} }
2137 func (*IPReassemblySetReply) GetMessageName() string { return "ip_reassembly_set_reply" }
2138 func (*IPReassemblySetReply) GetCrcString() string { return "e8d4e804" }
2139 func (*IPReassemblySetReply) GetMessageType() api.MessageType {
2140 return api.ReplyMessage
2143 func (m *IPReassemblySetReply) Size() (size int) {
2147 size += 4 // m.Retval
2150 func (m *IPReassemblySetReply) Marshal(b []byte) ([]byte, error) {
2152 b = make([]byte, m.Size())
2154 buf := codec.NewBuffer(b)
2155 buf.EncodeInt32(m.Retval)
2156 return buf.Bytes(), nil
2158 func (m *IPReassemblySetReply) Unmarshal(b []byte) error {
2159 buf := codec.NewBuffer(b)
2160 m.Retval = buf.DecodeInt32()
2164 // IPRouteAddDel defines message 'ip_route_add_del'.
2165 type IPRouteAddDel struct {
2166 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2167 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
2168 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
2171 func (m *IPRouteAddDel) Reset() { *m = IPRouteAddDel{} }
2172 func (*IPRouteAddDel) GetMessageName() string { return "ip_route_add_del" }
2173 func (*IPRouteAddDel) GetCrcString() string { return "b8ecfe0d" }
2174 func (*IPRouteAddDel) GetMessageType() api.MessageType {
2175 return api.RequestMessage
2178 func (m *IPRouteAddDel) Size() (size int) {
2182 size += 1 // m.IsAdd
2183 size += 1 // m.IsMultipath
2184 size += 4 // m.Route.TableID
2185 size += 4 // m.Route.StatsIndex
2186 size += 1 // m.Route.Prefix.Address.Af
2187 size += 1 * 16 // m.Route.Prefix.Address.Un
2188 size += 1 // m.Route.Prefix.Len
2189 size += 1 // m.Route.NPaths
2190 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2191 var s2 fib_types.FibPath
2193 if j2 < len(m.Route.Paths) {
2194 s2 = m.Route.Paths[j2]
2196 size += 4 // s2.SwIfIndex
2197 size += 4 // s2.TableID
2198 size += 4 // s2.RpfID
2199 size += 1 // s2.Weight
2200 size += 1 // s2.Preference
2201 size += 4 // s2.Type
2202 size += 4 // s2.Flags
2203 size += 4 // s2.Proto
2204 size += 1 * 16 // s2.Nh.Address
2205 size += 4 // s2.Nh.ViaLabel
2206 size += 4 // s2.Nh.ObjID
2207 size += 4 // s2.Nh.ClassifyTableIndex
2208 size += 1 // s2.NLabels
2209 for j3 := 0; j3 < 16; j3++ {
2210 size += 1 // s2.LabelStack[j3].IsUniform
2211 size += 4 // s2.LabelStack[j3].Label
2212 size += 1 // s2.LabelStack[j3].TTL
2213 size += 1 // s2.LabelStack[j3].Exp
2218 func (m *IPRouteAddDel) Marshal(b []byte) ([]byte, error) {
2220 b = make([]byte, m.Size())
2222 buf := codec.NewBuffer(b)
2223 buf.EncodeBool(m.IsAdd)
2224 buf.EncodeBool(m.IsMultipath)
2225 buf.EncodeUint32(m.Route.TableID)
2226 buf.EncodeUint32(m.Route.StatsIndex)
2227 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2228 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2229 buf.EncodeUint8(m.Route.Prefix.Len)
2230 buf.EncodeUint8(uint8(len(m.Route.Paths)))
2231 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2232 var v1 fib_types.FibPath // Paths
2233 if j1 < len(m.Route.Paths) {
2234 v1 = m.Route.Paths[j1]
2236 buf.EncodeUint32(v1.SwIfIndex)
2237 buf.EncodeUint32(v1.TableID)
2238 buf.EncodeUint32(v1.RpfID)
2239 buf.EncodeUint8(v1.Weight)
2240 buf.EncodeUint8(v1.Preference)
2241 buf.EncodeUint32(uint32(v1.Type))
2242 buf.EncodeUint32(uint32(v1.Flags))
2243 buf.EncodeUint32(uint32(v1.Proto))
2244 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2245 buf.EncodeUint32(v1.Nh.ViaLabel)
2246 buf.EncodeUint32(v1.Nh.ObjID)
2247 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2248 buf.EncodeUint8(v1.NLabels)
2249 for j2 := 0; j2 < 16; j2++ {
2250 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2251 buf.EncodeUint32(v1.LabelStack[j2].Label)
2252 buf.EncodeUint8(v1.LabelStack[j2].TTL)
2253 buf.EncodeUint8(v1.LabelStack[j2].Exp)
2256 return buf.Bytes(), nil
2258 func (m *IPRouteAddDel) Unmarshal(b []byte) error {
2259 buf := codec.NewBuffer(b)
2260 m.IsAdd = buf.DecodeBool()
2261 m.IsMultipath = buf.DecodeBool()
2262 m.Route.TableID = buf.DecodeUint32()
2263 m.Route.StatsIndex = buf.DecodeUint32()
2264 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2265 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2266 m.Route.Prefix.Len = buf.DecodeUint8()
2267 m.Route.NPaths = buf.DecodeUint8()
2268 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2269 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2270 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2271 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2272 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2273 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2274 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2275 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2276 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2277 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2278 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2279 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2280 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2281 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2282 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2283 for j2 := 0; j2 < 16; j2++ {
2284 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2285 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2286 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2287 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2293 // IPRouteAddDelReply defines message 'ip_route_add_del_reply'.
2294 type IPRouteAddDelReply struct {
2295 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2296 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
2299 func (m *IPRouteAddDelReply) Reset() { *m = IPRouteAddDelReply{} }
2300 func (*IPRouteAddDelReply) GetMessageName() string { return "ip_route_add_del_reply" }
2301 func (*IPRouteAddDelReply) GetCrcString() string { return "1992deab" }
2302 func (*IPRouteAddDelReply) GetMessageType() api.MessageType {
2303 return api.ReplyMessage
2306 func (m *IPRouteAddDelReply) Size() (size int) {
2310 size += 4 // m.Retval
2311 size += 4 // m.StatsIndex
2314 func (m *IPRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
2316 b = make([]byte, m.Size())
2318 buf := codec.NewBuffer(b)
2319 buf.EncodeInt32(m.Retval)
2320 buf.EncodeUint32(m.StatsIndex)
2321 return buf.Bytes(), nil
2323 func (m *IPRouteAddDelReply) Unmarshal(b []byte) error {
2324 buf := codec.NewBuffer(b)
2325 m.Retval = buf.DecodeInt32()
2326 m.StatsIndex = buf.DecodeUint32()
2330 // IPRouteAddDelV2 defines message 'ip_route_add_del_v2'.
2331 // InProgress: the message form may change in the future versions
2332 type IPRouteAddDelV2 struct {
2333 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2334 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
2335 Route IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"`
2338 func (m *IPRouteAddDelV2) Reset() { *m = IPRouteAddDelV2{} }
2339 func (*IPRouteAddDelV2) GetMessageName() string { return "ip_route_add_del_v2" }
2340 func (*IPRouteAddDelV2) GetCrcString() string { return "521ef330" }
2341 func (*IPRouteAddDelV2) GetMessageType() api.MessageType {
2342 return api.RequestMessage
2345 func (m *IPRouteAddDelV2) Size() (size int) {
2349 size += 1 // m.IsAdd
2350 size += 1 // m.IsMultipath
2351 size += 4 // m.Route.TableID
2352 size += 4 // m.Route.StatsIndex
2353 size += 1 // m.Route.Prefix.Address.Af
2354 size += 1 * 16 // m.Route.Prefix.Address.Un
2355 size += 1 // m.Route.Prefix.Len
2356 size += 1 // m.Route.NPaths
2357 size += 1 // m.Route.Src
2358 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2359 var s2 fib_types.FibPath
2361 if j2 < len(m.Route.Paths) {
2362 s2 = m.Route.Paths[j2]
2364 size += 4 // s2.SwIfIndex
2365 size += 4 // s2.TableID
2366 size += 4 // s2.RpfID
2367 size += 1 // s2.Weight
2368 size += 1 // s2.Preference
2369 size += 4 // s2.Type
2370 size += 4 // s2.Flags
2371 size += 4 // s2.Proto
2372 size += 1 * 16 // s2.Nh.Address
2373 size += 4 // s2.Nh.ViaLabel
2374 size += 4 // s2.Nh.ObjID
2375 size += 4 // s2.Nh.ClassifyTableIndex
2376 size += 1 // s2.NLabels
2377 for j3 := 0; j3 < 16; j3++ {
2378 size += 1 // s2.LabelStack[j3].IsUniform
2379 size += 4 // s2.LabelStack[j3].Label
2380 size += 1 // s2.LabelStack[j3].TTL
2381 size += 1 // s2.LabelStack[j3].Exp
2386 func (m *IPRouteAddDelV2) Marshal(b []byte) ([]byte, error) {
2388 b = make([]byte, m.Size())
2390 buf := codec.NewBuffer(b)
2391 buf.EncodeBool(m.IsAdd)
2392 buf.EncodeBool(m.IsMultipath)
2393 buf.EncodeUint32(m.Route.TableID)
2394 buf.EncodeUint32(m.Route.StatsIndex)
2395 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2396 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2397 buf.EncodeUint8(m.Route.Prefix.Len)
2398 buf.EncodeUint8(uint8(len(m.Route.Paths)))
2399 buf.EncodeUint8(m.Route.Src)
2400 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2401 var v1 fib_types.FibPath // Paths
2402 if j1 < len(m.Route.Paths) {
2403 v1 = m.Route.Paths[j1]
2405 buf.EncodeUint32(v1.SwIfIndex)
2406 buf.EncodeUint32(v1.TableID)
2407 buf.EncodeUint32(v1.RpfID)
2408 buf.EncodeUint8(v1.Weight)
2409 buf.EncodeUint8(v1.Preference)
2410 buf.EncodeUint32(uint32(v1.Type))
2411 buf.EncodeUint32(uint32(v1.Flags))
2412 buf.EncodeUint32(uint32(v1.Proto))
2413 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2414 buf.EncodeUint32(v1.Nh.ViaLabel)
2415 buf.EncodeUint32(v1.Nh.ObjID)
2416 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2417 buf.EncodeUint8(v1.NLabels)
2418 for j2 := 0; j2 < 16; j2++ {
2419 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2420 buf.EncodeUint32(v1.LabelStack[j2].Label)
2421 buf.EncodeUint8(v1.LabelStack[j2].TTL)
2422 buf.EncodeUint8(v1.LabelStack[j2].Exp)
2425 return buf.Bytes(), nil
2427 func (m *IPRouteAddDelV2) Unmarshal(b []byte) error {
2428 buf := codec.NewBuffer(b)
2429 m.IsAdd = buf.DecodeBool()
2430 m.IsMultipath = buf.DecodeBool()
2431 m.Route.TableID = buf.DecodeUint32()
2432 m.Route.StatsIndex = buf.DecodeUint32()
2433 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2434 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2435 m.Route.Prefix.Len = buf.DecodeUint8()
2436 m.Route.NPaths = buf.DecodeUint8()
2437 m.Route.Src = buf.DecodeUint8()
2438 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2439 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2440 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2441 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2442 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2443 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2444 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2445 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2446 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2447 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2448 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2449 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2450 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2451 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2452 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2453 for j2 := 0; j2 < 16; j2++ {
2454 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2455 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2456 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2457 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2463 // IPRouteAddDelV2Reply defines message 'ip_route_add_del_v2_reply'.
2464 // InProgress: the message form may change in the future versions
2465 type IPRouteAddDelV2Reply struct {
2466 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2467 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
2470 func (m *IPRouteAddDelV2Reply) Reset() { *m = IPRouteAddDelV2Reply{} }
2471 func (*IPRouteAddDelV2Reply) GetMessageName() string { return "ip_route_add_del_v2_reply" }
2472 func (*IPRouteAddDelV2Reply) GetCrcString() string { return "1992deab" }
2473 func (*IPRouteAddDelV2Reply) GetMessageType() api.MessageType {
2474 return api.ReplyMessage
2477 func (m *IPRouteAddDelV2Reply) Size() (size int) {
2481 size += 4 // m.Retval
2482 size += 4 // m.StatsIndex
2485 func (m *IPRouteAddDelV2Reply) Marshal(b []byte) ([]byte, error) {
2487 b = make([]byte, m.Size())
2489 buf := codec.NewBuffer(b)
2490 buf.EncodeInt32(m.Retval)
2491 buf.EncodeUint32(m.StatsIndex)
2492 return buf.Bytes(), nil
2494 func (m *IPRouteAddDelV2Reply) Unmarshal(b []byte) error {
2495 buf := codec.NewBuffer(b)
2496 m.Retval = buf.DecodeInt32()
2497 m.StatsIndex = buf.DecodeUint32()
2501 // IPRouteDetails defines message 'ip_route_details'.
2502 type IPRouteDetails struct {
2503 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
2506 func (m *IPRouteDetails) Reset() { *m = IPRouteDetails{} }
2507 func (*IPRouteDetails) GetMessageName() string { return "ip_route_details" }
2508 func (*IPRouteDetails) GetCrcString() string { return "bda8f315" }
2509 func (*IPRouteDetails) GetMessageType() api.MessageType {
2510 return api.ReplyMessage
2513 func (m *IPRouteDetails) Size() (size int) {
2517 size += 4 // m.Route.TableID
2518 size += 4 // m.Route.StatsIndex
2519 size += 1 // m.Route.Prefix.Address.Af
2520 size += 1 * 16 // m.Route.Prefix.Address.Un
2521 size += 1 // m.Route.Prefix.Len
2522 size += 1 // m.Route.NPaths
2523 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2524 var s2 fib_types.FibPath
2526 if j2 < len(m.Route.Paths) {
2527 s2 = m.Route.Paths[j2]
2529 size += 4 // s2.SwIfIndex
2530 size += 4 // s2.TableID
2531 size += 4 // s2.RpfID
2532 size += 1 // s2.Weight
2533 size += 1 // s2.Preference
2534 size += 4 // s2.Type
2535 size += 4 // s2.Flags
2536 size += 4 // s2.Proto
2537 size += 1 * 16 // s2.Nh.Address
2538 size += 4 // s2.Nh.ViaLabel
2539 size += 4 // s2.Nh.ObjID
2540 size += 4 // s2.Nh.ClassifyTableIndex
2541 size += 1 // s2.NLabels
2542 for j3 := 0; j3 < 16; j3++ {
2543 size += 1 // s2.LabelStack[j3].IsUniform
2544 size += 4 // s2.LabelStack[j3].Label
2545 size += 1 // s2.LabelStack[j3].TTL
2546 size += 1 // s2.LabelStack[j3].Exp
2551 func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) {
2553 b = make([]byte, m.Size())
2555 buf := codec.NewBuffer(b)
2556 buf.EncodeUint32(m.Route.TableID)
2557 buf.EncodeUint32(m.Route.StatsIndex)
2558 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2559 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2560 buf.EncodeUint8(m.Route.Prefix.Len)
2561 buf.EncodeUint8(uint8(len(m.Route.Paths)))
2562 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2563 var v1 fib_types.FibPath // Paths
2564 if j1 < len(m.Route.Paths) {
2565 v1 = m.Route.Paths[j1]
2567 buf.EncodeUint32(v1.SwIfIndex)
2568 buf.EncodeUint32(v1.TableID)
2569 buf.EncodeUint32(v1.RpfID)
2570 buf.EncodeUint8(v1.Weight)
2571 buf.EncodeUint8(v1.Preference)
2572 buf.EncodeUint32(uint32(v1.Type))
2573 buf.EncodeUint32(uint32(v1.Flags))
2574 buf.EncodeUint32(uint32(v1.Proto))
2575 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2576 buf.EncodeUint32(v1.Nh.ViaLabel)
2577 buf.EncodeUint32(v1.Nh.ObjID)
2578 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2579 buf.EncodeUint8(v1.NLabels)
2580 for j2 := 0; j2 < 16; j2++ {
2581 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2582 buf.EncodeUint32(v1.LabelStack[j2].Label)
2583 buf.EncodeUint8(v1.LabelStack[j2].TTL)
2584 buf.EncodeUint8(v1.LabelStack[j2].Exp)
2587 return buf.Bytes(), nil
2589 func (m *IPRouteDetails) Unmarshal(b []byte) error {
2590 buf := codec.NewBuffer(b)
2591 m.Route.TableID = buf.DecodeUint32()
2592 m.Route.StatsIndex = buf.DecodeUint32()
2593 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2594 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2595 m.Route.Prefix.Len = buf.DecodeUint8()
2596 m.Route.NPaths = buf.DecodeUint8()
2597 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2598 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2599 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2600 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2601 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2602 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2603 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2604 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2605 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2606 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2607 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2608 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2609 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2610 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2611 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2612 for j2 := 0; j2 < 16; j2++ {
2613 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2614 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2615 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2616 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2622 // IPRouteDump defines message 'ip_route_dump'.
2623 type IPRouteDump struct {
2624 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2627 func (m *IPRouteDump) Reset() { *m = IPRouteDump{} }
2628 func (*IPRouteDump) GetMessageName() string { return "ip_route_dump" }
2629 func (*IPRouteDump) GetCrcString() string { return "b9d2e09e" }
2630 func (*IPRouteDump) GetMessageType() api.MessageType {
2631 return api.RequestMessage
2634 func (m *IPRouteDump) Size() (size int) {
2638 size += 4 // m.Table.TableID
2639 size += 1 // m.Table.IsIP6
2640 size += 64 // m.Table.Name
2643 func (m *IPRouteDump) Marshal(b []byte) ([]byte, error) {
2645 b = make([]byte, m.Size())
2647 buf := codec.NewBuffer(b)
2648 buf.EncodeUint32(m.Table.TableID)
2649 buf.EncodeBool(m.Table.IsIP6)
2650 buf.EncodeString(m.Table.Name, 64)
2651 return buf.Bytes(), nil
2653 func (m *IPRouteDump) Unmarshal(b []byte) error {
2654 buf := codec.NewBuffer(b)
2655 m.Table.TableID = buf.DecodeUint32()
2656 m.Table.IsIP6 = buf.DecodeBool()
2657 m.Table.Name = buf.DecodeString(64)
2661 // IPRouteLookup defines message 'ip_route_lookup'.
2662 type IPRouteLookup struct {
2663 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
2664 Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"`
2665 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
2668 func (m *IPRouteLookup) Reset() { *m = IPRouteLookup{} }
2669 func (*IPRouteLookup) GetMessageName() string { return "ip_route_lookup" }
2670 func (*IPRouteLookup) GetCrcString() string { return "710d6471" }
2671 func (*IPRouteLookup) GetMessageType() api.MessageType {
2672 return api.RequestMessage
2675 func (m *IPRouteLookup) Size() (size int) {
2679 size += 4 // m.TableID
2680 size += 1 // m.Exact
2681 size += 1 // m.Prefix.Address.Af
2682 size += 1 * 16 // m.Prefix.Address.Un
2683 size += 1 // m.Prefix.Len
2686 func (m *IPRouteLookup) Marshal(b []byte) ([]byte, error) {
2688 b = make([]byte, m.Size())
2690 buf := codec.NewBuffer(b)
2691 buf.EncodeUint32(m.TableID)
2692 buf.EncodeUint8(m.Exact)
2693 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
2694 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
2695 buf.EncodeUint8(m.Prefix.Len)
2696 return buf.Bytes(), nil
2698 func (m *IPRouteLookup) Unmarshal(b []byte) error {
2699 buf := codec.NewBuffer(b)
2700 m.TableID = buf.DecodeUint32()
2701 m.Exact = buf.DecodeUint8()
2702 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2703 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2704 m.Prefix.Len = buf.DecodeUint8()
2708 // IPRouteLookupReply defines message 'ip_route_lookup_reply'.
2709 type IPRouteLookupReply struct {
2710 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2711 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
2714 func (m *IPRouteLookupReply) Reset() { *m = IPRouteLookupReply{} }
2715 func (*IPRouteLookupReply) GetMessageName() string { return "ip_route_lookup_reply" }
2716 func (*IPRouteLookupReply) GetCrcString() string { return "5d8febcb" }
2717 func (*IPRouteLookupReply) GetMessageType() api.MessageType {
2718 return api.ReplyMessage
2721 func (m *IPRouteLookupReply) Size() (size int) {
2725 size += 4 // m.Retval
2726 size += 4 // m.Route.TableID
2727 size += 4 // m.Route.StatsIndex
2728 size += 1 // m.Route.Prefix.Address.Af
2729 size += 1 * 16 // m.Route.Prefix.Address.Un
2730 size += 1 // m.Route.Prefix.Len
2731 size += 1 // m.Route.NPaths
2732 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2733 var s2 fib_types.FibPath
2735 if j2 < len(m.Route.Paths) {
2736 s2 = m.Route.Paths[j2]
2738 size += 4 // s2.SwIfIndex
2739 size += 4 // s2.TableID
2740 size += 4 // s2.RpfID
2741 size += 1 // s2.Weight
2742 size += 1 // s2.Preference
2743 size += 4 // s2.Type
2744 size += 4 // s2.Flags
2745 size += 4 // s2.Proto
2746 size += 1 * 16 // s2.Nh.Address
2747 size += 4 // s2.Nh.ViaLabel
2748 size += 4 // s2.Nh.ObjID
2749 size += 4 // s2.Nh.ClassifyTableIndex
2750 size += 1 // s2.NLabels
2751 for j3 := 0; j3 < 16; j3++ {
2752 size += 1 // s2.LabelStack[j3].IsUniform
2753 size += 4 // s2.LabelStack[j3].Label
2754 size += 1 // s2.LabelStack[j3].TTL
2755 size += 1 // s2.LabelStack[j3].Exp
2760 func (m *IPRouteLookupReply) Marshal(b []byte) ([]byte, error) {
2762 b = make([]byte, m.Size())
2764 buf := codec.NewBuffer(b)
2765 buf.EncodeInt32(m.Retval)
2766 buf.EncodeUint32(m.Route.TableID)
2767 buf.EncodeUint32(m.Route.StatsIndex)
2768 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2769 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2770 buf.EncodeUint8(m.Route.Prefix.Len)
2771 buf.EncodeUint8(uint8(len(m.Route.Paths)))
2772 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2773 var v1 fib_types.FibPath // Paths
2774 if j1 < len(m.Route.Paths) {
2775 v1 = m.Route.Paths[j1]
2777 buf.EncodeUint32(v1.SwIfIndex)
2778 buf.EncodeUint32(v1.TableID)
2779 buf.EncodeUint32(v1.RpfID)
2780 buf.EncodeUint8(v1.Weight)
2781 buf.EncodeUint8(v1.Preference)
2782 buf.EncodeUint32(uint32(v1.Type))
2783 buf.EncodeUint32(uint32(v1.Flags))
2784 buf.EncodeUint32(uint32(v1.Proto))
2785 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2786 buf.EncodeUint32(v1.Nh.ViaLabel)
2787 buf.EncodeUint32(v1.Nh.ObjID)
2788 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2789 buf.EncodeUint8(v1.NLabels)
2790 for j2 := 0; j2 < 16; j2++ {
2791 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2792 buf.EncodeUint32(v1.LabelStack[j2].Label)
2793 buf.EncodeUint8(v1.LabelStack[j2].TTL)
2794 buf.EncodeUint8(v1.LabelStack[j2].Exp)
2797 return buf.Bytes(), nil
2799 func (m *IPRouteLookupReply) Unmarshal(b []byte) error {
2800 buf := codec.NewBuffer(b)
2801 m.Retval = buf.DecodeInt32()
2802 m.Route.TableID = buf.DecodeUint32()
2803 m.Route.StatsIndex = buf.DecodeUint32()
2804 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2805 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2806 m.Route.Prefix.Len = buf.DecodeUint8()
2807 m.Route.NPaths = buf.DecodeUint8()
2808 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2809 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2810 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2811 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2812 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2813 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2814 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2815 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2816 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2817 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2818 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2819 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2820 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2821 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2822 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2823 for j2 := 0; j2 < 16; j2++ {
2824 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2825 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2826 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2827 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2833 // IPRouteLookupV2 defines message 'ip_route_lookup_v2'.
2834 // InProgress: the message form may change in the future versions
2835 type IPRouteLookupV2 struct {
2836 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
2837 Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"`
2838 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
2841 func (m *IPRouteLookupV2) Reset() { *m = IPRouteLookupV2{} }
2842 func (*IPRouteLookupV2) GetMessageName() string { return "ip_route_lookup_v2" }
2843 func (*IPRouteLookupV2) GetCrcString() string { return "710d6471" }
2844 func (*IPRouteLookupV2) GetMessageType() api.MessageType {
2845 return api.RequestMessage
2848 func (m *IPRouteLookupV2) Size() (size int) {
2852 size += 4 // m.TableID
2853 size += 1 // m.Exact
2854 size += 1 // m.Prefix.Address.Af
2855 size += 1 * 16 // m.Prefix.Address.Un
2856 size += 1 // m.Prefix.Len
2859 func (m *IPRouteLookupV2) Marshal(b []byte) ([]byte, error) {
2861 b = make([]byte, m.Size())
2863 buf := codec.NewBuffer(b)
2864 buf.EncodeUint32(m.TableID)
2865 buf.EncodeUint8(m.Exact)
2866 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
2867 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
2868 buf.EncodeUint8(m.Prefix.Len)
2869 return buf.Bytes(), nil
2871 func (m *IPRouteLookupV2) Unmarshal(b []byte) error {
2872 buf := codec.NewBuffer(b)
2873 m.TableID = buf.DecodeUint32()
2874 m.Exact = buf.DecodeUint8()
2875 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2876 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2877 m.Prefix.Len = buf.DecodeUint8()
2881 // IPRouteLookupV2Reply defines message 'ip_route_lookup_v2_reply'.
2882 // InProgress: the message form may change in the future versions
2883 type IPRouteLookupV2Reply struct {
2884 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2885 Route IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"`
2888 func (m *IPRouteLookupV2Reply) Reset() { *m = IPRouteLookupV2Reply{} }
2889 func (*IPRouteLookupV2Reply) GetMessageName() string { return "ip_route_lookup_v2_reply" }
2890 func (*IPRouteLookupV2Reply) GetCrcString() string { return "84cc9e03" }
2891 func (*IPRouteLookupV2Reply) GetMessageType() api.MessageType {
2892 return api.ReplyMessage
2895 func (m *IPRouteLookupV2Reply) Size() (size int) {
2899 size += 4 // m.Retval
2900 size += 4 // m.Route.TableID
2901 size += 4 // m.Route.StatsIndex
2902 size += 1 // m.Route.Prefix.Address.Af
2903 size += 1 * 16 // m.Route.Prefix.Address.Un
2904 size += 1 // m.Route.Prefix.Len
2905 size += 1 // m.Route.NPaths
2906 size += 1 // m.Route.Src
2907 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2908 var s2 fib_types.FibPath
2910 if j2 < len(m.Route.Paths) {
2911 s2 = m.Route.Paths[j2]
2913 size += 4 // s2.SwIfIndex
2914 size += 4 // s2.TableID
2915 size += 4 // s2.RpfID
2916 size += 1 // s2.Weight
2917 size += 1 // s2.Preference
2918 size += 4 // s2.Type
2919 size += 4 // s2.Flags
2920 size += 4 // s2.Proto
2921 size += 1 * 16 // s2.Nh.Address
2922 size += 4 // s2.Nh.ViaLabel
2923 size += 4 // s2.Nh.ObjID
2924 size += 4 // s2.Nh.ClassifyTableIndex
2925 size += 1 // s2.NLabels
2926 for j3 := 0; j3 < 16; j3++ {
2927 size += 1 // s2.LabelStack[j3].IsUniform
2928 size += 4 // s2.LabelStack[j3].Label
2929 size += 1 // s2.LabelStack[j3].TTL
2930 size += 1 // s2.LabelStack[j3].Exp
2935 func (m *IPRouteLookupV2Reply) Marshal(b []byte) ([]byte, error) {
2937 b = make([]byte, m.Size())
2939 buf := codec.NewBuffer(b)
2940 buf.EncodeInt32(m.Retval)
2941 buf.EncodeUint32(m.Route.TableID)
2942 buf.EncodeUint32(m.Route.StatsIndex)
2943 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2944 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2945 buf.EncodeUint8(m.Route.Prefix.Len)
2946 buf.EncodeUint8(uint8(len(m.Route.Paths)))
2947 buf.EncodeUint8(m.Route.Src)
2948 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2949 var v1 fib_types.FibPath // Paths
2950 if j1 < len(m.Route.Paths) {
2951 v1 = m.Route.Paths[j1]
2953 buf.EncodeUint32(v1.SwIfIndex)
2954 buf.EncodeUint32(v1.TableID)
2955 buf.EncodeUint32(v1.RpfID)
2956 buf.EncodeUint8(v1.Weight)
2957 buf.EncodeUint8(v1.Preference)
2958 buf.EncodeUint32(uint32(v1.Type))
2959 buf.EncodeUint32(uint32(v1.Flags))
2960 buf.EncodeUint32(uint32(v1.Proto))
2961 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2962 buf.EncodeUint32(v1.Nh.ViaLabel)
2963 buf.EncodeUint32(v1.Nh.ObjID)
2964 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2965 buf.EncodeUint8(v1.NLabels)
2966 for j2 := 0; j2 < 16; j2++ {
2967 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2968 buf.EncodeUint32(v1.LabelStack[j2].Label)
2969 buf.EncodeUint8(v1.LabelStack[j2].TTL)
2970 buf.EncodeUint8(v1.LabelStack[j2].Exp)
2973 return buf.Bytes(), nil
2975 func (m *IPRouteLookupV2Reply) Unmarshal(b []byte) error {
2976 buf := codec.NewBuffer(b)
2977 m.Retval = buf.DecodeInt32()
2978 m.Route.TableID = buf.DecodeUint32()
2979 m.Route.StatsIndex = buf.DecodeUint32()
2980 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2981 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2982 m.Route.Prefix.Len = buf.DecodeUint8()
2983 m.Route.NPaths = buf.DecodeUint8()
2984 m.Route.Src = buf.DecodeUint8()
2985 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2986 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2987 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2988 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2989 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2990 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2991 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2992 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2993 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2994 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2995 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2996 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2997 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2998 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2999 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
3000 for j2 := 0; j2 < 16; j2++ {
3001 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
3002 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
3003 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
3004 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
3010 // IPRouteV2Details defines message 'ip_route_v2_details'.
3011 // InProgress: the message form may change in the future versions
3012 type IPRouteV2Details struct {
3013 Route IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"`
3016 func (m *IPRouteV2Details) Reset() { *m = IPRouteV2Details{} }
3017 func (*IPRouteV2Details) GetMessageName() string { return "ip_route_v2_details" }
3018 func (*IPRouteV2Details) GetCrcString() string { return "b09aa6c0" }
3019 func (*IPRouteV2Details) GetMessageType() api.MessageType {
3020 return api.ReplyMessage
3023 func (m *IPRouteV2Details) Size() (size int) {
3027 size += 4 // m.Route.TableID
3028 size += 4 // m.Route.StatsIndex
3029 size += 1 // m.Route.Prefix.Address.Af
3030 size += 1 * 16 // m.Route.Prefix.Address.Un
3031 size += 1 // m.Route.Prefix.Len
3032 size += 1 // m.Route.NPaths
3033 size += 1 // m.Route.Src
3034 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
3035 var s2 fib_types.FibPath
3037 if j2 < len(m.Route.Paths) {
3038 s2 = m.Route.Paths[j2]
3040 size += 4 // s2.SwIfIndex
3041 size += 4 // s2.TableID
3042 size += 4 // s2.RpfID
3043 size += 1 // s2.Weight
3044 size += 1 // s2.Preference
3045 size += 4 // s2.Type
3046 size += 4 // s2.Flags
3047 size += 4 // s2.Proto
3048 size += 1 * 16 // s2.Nh.Address
3049 size += 4 // s2.Nh.ViaLabel
3050 size += 4 // s2.Nh.ObjID
3051 size += 4 // s2.Nh.ClassifyTableIndex
3052 size += 1 // s2.NLabels
3053 for j3 := 0; j3 < 16; j3++ {
3054 size += 1 // s2.LabelStack[j3].IsUniform
3055 size += 4 // s2.LabelStack[j3].Label
3056 size += 1 // s2.LabelStack[j3].TTL
3057 size += 1 // s2.LabelStack[j3].Exp
3062 func (m *IPRouteV2Details) Marshal(b []byte) ([]byte, error) {
3064 b = make([]byte, m.Size())
3066 buf := codec.NewBuffer(b)
3067 buf.EncodeUint32(m.Route.TableID)
3068 buf.EncodeUint32(m.Route.StatsIndex)
3069 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
3070 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
3071 buf.EncodeUint8(m.Route.Prefix.Len)
3072 buf.EncodeUint8(uint8(len(m.Route.Paths)))
3073 buf.EncodeUint8(m.Route.Src)
3074 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
3075 var v1 fib_types.FibPath // Paths
3076 if j1 < len(m.Route.Paths) {
3077 v1 = m.Route.Paths[j1]
3079 buf.EncodeUint32(v1.SwIfIndex)
3080 buf.EncodeUint32(v1.TableID)
3081 buf.EncodeUint32(v1.RpfID)
3082 buf.EncodeUint8(v1.Weight)
3083 buf.EncodeUint8(v1.Preference)
3084 buf.EncodeUint32(uint32(v1.Type))
3085 buf.EncodeUint32(uint32(v1.Flags))
3086 buf.EncodeUint32(uint32(v1.Proto))
3087 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
3088 buf.EncodeUint32(v1.Nh.ViaLabel)
3089 buf.EncodeUint32(v1.Nh.ObjID)
3090 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
3091 buf.EncodeUint8(v1.NLabels)
3092 for j2 := 0; j2 < 16; j2++ {
3093 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
3094 buf.EncodeUint32(v1.LabelStack[j2].Label)
3095 buf.EncodeUint8(v1.LabelStack[j2].TTL)
3096 buf.EncodeUint8(v1.LabelStack[j2].Exp)
3099 return buf.Bytes(), nil
3101 func (m *IPRouteV2Details) Unmarshal(b []byte) error {
3102 buf := codec.NewBuffer(b)
3103 m.Route.TableID = buf.DecodeUint32()
3104 m.Route.StatsIndex = buf.DecodeUint32()
3105 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
3106 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
3107 m.Route.Prefix.Len = buf.DecodeUint8()
3108 m.Route.NPaths = buf.DecodeUint8()
3109 m.Route.Src = buf.DecodeUint8()
3110 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
3111 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
3112 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
3113 m.Route.Paths[j1].TableID = buf.DecodeUint32()
3114 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
3115 m.Route.Paths[j1].Weight = buf.DecodeUint8()
3116 m.Route.Paths[j1].Preference = buf.DecodeUint8()
3117 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
3118 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
3119 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
3120 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
3121 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
3122 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
3123 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
3124 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
3125 for j2 := 0; j2 < 16; j2++ {
3126 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
3127 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
3128 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
3129 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
3135 // IPRouteV2Dump defines message 'ip_route_v2_dump'.
3136 // InProgress: the message form may change in the future versions
3137 type IPRouteV2Dump struct {
3138 Src uint8 `binapi:"u8,name=src" json:"src,omitempty"`
3139 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3142 func (m *IPRouteV2Dump) Reset() { *m = IPRouteV2Dump{} }
3143 func (*IPRouteV2Dump) GetMessageName() string { return "ip_route_v2_dump" }
3144 func (*IPRouteV2Dump) GetCrcString() string { return "d16f72e6" }
3145 func (*IPRouteV2Dump) GetMessageType() api.MessageType {
3146 return api.RequestMessage
3149 func (m *IPRouteV2Dump) Size() (size int) {
3154 size += 4 // m.Table.TableID
3155 size += 1 // m.Table.IsIP6
3156 size += 64 // m.Table.Name
3159 func (m *IPRouteV2Dump) Marshal(b []byte) ([]byte, error) {
3161 b = make([]byte, m.Size())
3163 buf := codec.NewBuffer(b)
3164 buf.EncodeUint8(m.Src)
3165 buf.EncodeUint32(m.Table.TableID)
3166 buf.EncodeBool(m.Table.IsIP6)
3167 buf.EncodeString(m.Table.Name, 64)
3168 return buf.Bytes(), nil
3170 func (m *IPRouteV2Dump) Unmarshal(b []byte) error {
3171 buf := codec.NewBuffer(b)
3172 m.Src = buf.DecodeUint8()
3173 m.Table.TableID = buf.DecodeUint32()
3174 m.Table.IsIP6 = buf.DecodeBool()
3175 m.Table.Name = buf.DecodeString(64)
3179 // IPSourceAndPortRangeCheckAddDel defines message 'ip_source_and_port_range_check_add_del'.
3180 type IPSourceAndPortRangeCheckAddDel struct {
3181 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
3182 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
3183 NumberOfRanges uint8 `binapi:"u8,name=number_of_ranges" json:"number_of_ranges,omitempty"`
3184 LowPorts []uint16 `binapi:"u16[32],name=low_ports" json:"low_ports,omitempty"`
3185 HighPorts []uint16 `binapi:"u16[32],name=high_ports" json:"high_ports,omitempty"`
3186 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3189 func (m *IPSourceAndPortRangeCheckAddDel) Reset() { *m = IPSourceAndPortRangeCheckAddDel{} }
3190 func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string {
3191 return "ip_source_and_port_range_check_add_del"
3193 func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "92a067e3" }
3194 func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType {
3195 return api.RequestMessage
3198 func (m *IPSourceAndPortRangeCheckAddDel) Size() (size int) {
3202 size += 1 // m.IsAdd
3203 size += 1 // m.Prefix.Address.Af
3204 size += 1 * 16 // m.Prefix.Address.Un
3205 size += 1 // m.Prefix.Len
3206 size += 1 // m.NumberOfRanges
3207 size += 2 * 32 // m.LowPorts
3208 size += 2 * 32 // m.HighPorts
3209 size += 4 // m.VrfID
3212 func (m *IPSourceAndPortRangeCheckAddDel) Marshal(b []byte) ([]byte, error) {
3214 b = make([]byte, m.Size())
3216 buf := codec.NewBuffer(b)
3217 buf.EncodeBool(m.IsAdd)
3218 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
3219 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
3220 buf.EncodeUint8(m.Prefix.Len)
3221 buf.EncodeUint8(m.NumberOfRanges)
3222 for i := 0; i < 32; i++ {
3224 if i < len(m.LowPorts) {
3225 x = uint16(m.LowPorts[i])
3229 for i := 0; i < 32; i++ {
3231 if i < len(m.HighPorts) {
3232 x = uint16(m.HighPorts[i])
3236 buf.EncodeUint32(m.VrfID)
3237 return buf.Bytes(), nil
3239 func (m *IPSourceAndPortRangeCheckAddDel) Unmarshal(b []byte) error {
3240 buf := codec.NewBuffer(b)
3241 m.IsAdd = buf.DecodeBool()
3242 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
3243 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
3244 m.Prefix.Len = buf.DecodeUint8()
3245 m.NumberOfRanges = buf.DecodeUint8()
3246 m.LowPorts = make([]uint16, 32)
3247 for i := 0; i < len(m.LowPorts); i++ {
3248 m.LowPorts[i] = buf.DecodeUint16()
3250 m.HighPorts = make([]uint16, 32)
3251 for i := 0; i < len(m.HighPorts); i++ {
3252 m.HighPorts[i] = buf.DecodeUint16()
3254 m.VrfID = buf.DecodeUint32()
3258 // IPSourceAndPortRangeCheckAddDelReply defines message 'ip_source_and_port_range_check_add_del_reply'.
3259 type IPSourceAndPortRangeCheckAddDelReply struct {
3260 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3263 func (m *IPSourceAndPortRangeCheckAddDelReply) Reset() { *m = IPSourceAndPortRangeCheckAddDelReply{} }
3264 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string {
3265 return "ip_source_and_port_range_check_add_del_reply"
3267 func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { return "e8d4e804" }
3268 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType {
3269 return api.ReplyMessage
3272 func (m *IPSourceAndPortRangeCheckAddDelReply) Size() (size int) {
3276 size += 4 // m.Retval
3279 func (m *IPSourceAndPortRangeCheckAddDelReply) Marshal(b []byte) ([]byte, error) {
3281 b = make([]byte, m.Size())
3283 buf := codec.NewBuffer(b)
3284 buf.EncodeInt32(m.Retval)
3285 return buf.Bytes(), nil
3287 func (m *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(b []byte) error {
3288 buf := codec.NewBuffer(b)
3289 m.Retval = buf.DecodeInt32()
3293 // IPSourceAndPortRangeCheckInterfaceAddDel defines message 'ip_source_and_port_range_check_interface_add_del'.
3294 type IPSourceAndPortRangeCheckInterfaceAddDel struct {
3295 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
3296 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3297 TCPInVrfID uint32 `binapi:"u32,name=tcp_in_vrf_id" json:"tcp_in_vrf_id,omitempty"`
3298 TCPOutVrfID uint32 `binapi:"u32,name=tcp_out_vrf_id" json:"tcp_out_vrf_id,omitempty"`
3299 UDPInVrfID uint32 `binapi:"u32,name=udp_in_vrf_id" json:"udp_in_vrf_id,omitempty"`
3300 UDPOutVrfID uint32 `binapi:"u32,name=udp_out_vrf_id" json:"udp_out_vrf_id,omitempty"`
3303 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Reset() {
3304 *m = IPSourceAndPortRangeCheckInterfaceAddDel{}
3306 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string {
3307 return "ip_source_and_port_range_check_interface_add_del"
3309 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { return "e1ba8987" }
3310 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType {
3311 return api.RequestMessage
3314 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() (size int) {
3318 size += 1 // m.IsAdd
3319 size += 4 // m.SwIfIndex
3320 size += 4 // m.TCPInVrfID
3321 size += 4 // m.TCPOutVrfID
3322 size += 4 // m.UDPInVrfID
3323 size += 4 // m.UDPOutVrfID
3326 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
3328 b = make([]byte, m.Size())
3330 buf := codec.NewBuffer(b)
3331 buf.EncodeBool(m.IsAdd)
3332 buf.EncodeUint32(uint32(m.SwIfIndex))
3333 buf.EncodeUint32(m.TCPInVrfID)
3334 buf.EncodeUint32(m.TCPOutVrfID)
3335 buf.EncodeUint32(m.UDPInVrfID)
3336 buf.EncodeUint32(m.UDPOutVrfID)
3337 return buf.Bytes(), nil
3339 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Unmarshal(b []byte) error {
3340 buf := codec.NewBuffer(b)
3341 m.IsAdd = buf.DecodeBool()
3342 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3343 m.TCPInVrfID = buf.DecodeUint32()
3344 m.TCPOutVrfID = buf.DecodeUint32()
3345 m.UDPInVrfID = buf.DecodeUint32()
3346 m.UDPOutVrfID = buf.DecodeUint32()
3350 // IPSourceAndPortRangeCheckInterfaceAddDelReply defines message 'ip_source_and_port_range_check_interface_add_del_reply'.
3351 type IPSourceAndPortRangeCheckInterfaceAddDelReply struct {
3352 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3355 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Reset() {
3356 *m = IPSourceAndPortRangeCheckInterfaceAddDelReply{}
3358 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string {
3359 return "ip_source_and_port_range_check_interface_add_del_reply"
3361 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
3362 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType {
3363 return api.ReplyMessage
3366 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Size() (size int) {
3370 size += 4 // m.Retval
3373 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
3375 b = make([]byte, m.Size())
3377 buf := codec.NewBuffer(b)
3378 buf.EncodeInt32(m.Retval)
3379 return buf.Bytes(), nil
3381 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(b []byte) error {
3382 buf := codec.NewBuffer(b)
3383 m.Retval = buf.DecodeInt32()
3387 // IPTableAddDel defines message 'ip_table_add_del'.
3388 type IPTableAddDel struct {
3389 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
3390 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3393 func (m *IPTableAddDel) Reset() { *m = IPTableAddDel{} }
3394 func (*IPTableAddDel) GetMessageName() string { return "ip_table_add_del" }
3395 func (*IPTableAddDel) GetCrcString() string { return "0ffdaec0" }
3396 func (*IPTableAddDel) GetMessageType() api.MessageType {
3397 return api.RequestMessage
3400 func (m *IPTableAddDel) Size() (size int) {
3404 size += 1 // m.IsAdd
3405 size += 4 // m.Table.TableID
3406 size += 1 // m.Table.IsIP6
3407 size += 64 // m.Table.Name
3410 func (m *IPTableAddDel) Marshal(b []byte) ([]byte, error) {
3412 b = make([]byte, m.Size())
3414 buf := codec.NewBuffer(b)
3415 buf.EncodeBool(m.IsAdd)
3416 buf.EncodeUint32(m.Table.TableID)
3417 buf.EncodeBool(m.Table.IsIP6)
3418 buf.EncodeString(m.Table.Name, 64)
3419 return buf.Bytes(), nil
3421 func (m *IPTableAddDel) Unmarshal(b []byte) error {
3422 buf := codec.NewBuffer(b)
3423 m.IsAdd = buf.DecodeBool()
3424 m.Table.TableID = buf.DecodeUint32()
3425 m.Table.IsIP6 = buf.DecodeBool()
3426 m.Table.Name = buf.DecodeString(64)
3430 // IPTableAddDelReply defines message 'ip_table_add_del_reply'.
3431 type IPTableAddDelReply struct {
3432 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3435 func (m *IPTableAddDelReply) Reset() { *m = IPTableAddDelReply{} }
3436 func (*IPTableAddDelReply) GetMessageName() string { return "ip_table_add_del_reply" }
3437 func (*IPTableAddDelReply) GetCrcString() string { return "e8d4e804" }
3438 func (*IPTableAddDelReply) GetMessageType() api.MessageType {
3439 return api.ReplyMessage
3442 func (m *IPTableAddDelReply) Size() (size int) {
3446 size += 4 // m.Retval
3449 func (m *IPTableAddDelReply) Marshal(b []byte) ([]byte, error) {
3451 b = make([]byte, m.Size())
3453 buf := codec.NewBuffer(b)
3454 buf.EncodeInt32(m.Retval)
3455 return buf.Bytes(), nil
3457 func (m *IPTableAddDelReply) Unmarshal(b []byte) error {
3458 buf := codec.NewBuffer(b)
3459 m.Retval = buf.DecodeInt32()
3463 // IPTableAllocate defines message 'ip_table_allocate'.
3464 type IPTableAllocate struct {
3465 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3468 func (m *IPTableAllocate) Reset() { *m = IPTableAllocate{} }
3469 func (*IPTableAllocate) GetMessageName() string { return "ip_table_allocate" }
3470 func (*IPTableAllocate) GetCrcString() string { return "b9d2e09e" }
3471 func (*IPTableAllocate) GetMessageType() api.MessageType {
3472 return api.RequestMessage
3475 func (m *IPTableAllocate) Size() (size int) {
3479 size += 4 // m.Table.TableID
3480 size += 1 // m.Table.IsIP6
3481 size += 64 // m.Table.Name
3484 func (m *IPTableAllocate) Marshal(b []byte) ([]byte, error) {
3486 b = make([]byte, m.Size())
3488 buf := codec.NewBuffer(b)
3489 buf.EncodeUint32(m.Table.TableID)
3490 buf.EncodeBool(m.Table.IsIP6)
3491 buf.EncodeString(m.Table.Name, 64)
3492 return buf.Bytes(), nil
3494 func (m *IPTableAllocate) Unmarshal(b []byte) error {
3495 buf := codec.NewBuffer(b)
3496 m.Table.TableID = buf.DecodeUint32()
3497 m.Table.IsIP6 = buf.DecodeBool()
3498 m.Table.Name = buf.DecodeString(64)
3502 // IPTableAllocateReply defines message 'ip_table_allocate_reply'.
3503 type IPTableAllocateReply struct {
3504 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3505 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3508 func (m *IPTableAllocateReply) Reset() { *m = IPTableAllocateReply{} }
3509 func (*IPTableAllocateReply) GetMessageName() string { return "ip_table_allocate_reply" }
3510 func (*IPTableAllocateReply) GetCrcString() string { return "1728303a" }
3511 func (*IPTableAllocateReply) GetMessageType() api.MessageType {
3512 return api.ReplyMessage
3515 func (m *IPTableAllocateReply) Size() (size int) {
3519 size += 4 // m.Retval
3520 size += 4 // m.Table.TableID
3521 size += 1 // m.Table.IsIP6
3522 size += 64 // m.Table.Name
3525 func (m *IPTableAllocateReply) Marshal(b []byte) ([]byte, error) {
3527 b = make([]byte, m.Size())
3529 buf := codec.NewBuffer(b)
3530 buf.EncodeInt32(m.Retval)
3531 buf.EncodeUint32(m.Table.TableID)
3532 buf.EncodeBool(m.Table.IsIP6)
3533 buf.EncodeString(m.Table.Name, 64)
3534 return buf.Bytes(), nil
3536 func (m *IPTableAllocateReply) Unmarshal(b []byte) error {
3537 buf := codec.NewBuffer(b)
3538 m.Retval = buf.DecodeInt32()
3539 m.Table.TableID = buf.DecodeUint32()
3540 m.Table.IsIP6 = buf.DecodeBool()
3541 m.Table.Name = buf.DecodeString(64)
3545 // IPTableDetails defines message 'ip_table_details'.
3546 type IPTableDetails struct {
3547 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3550 func (m *IPTableDetails) Reset() { *m = IPTableDetails{} }
3551 func (*IPTableDetails) GetMessageName() string { return "ip_table_details" }
3552 func (*IPTableDetails) GetCrcString() string { return "c79fca0f" }
3553 func (*IPTableDetails) GetMessageType() api.MessageType {
3554 return api.ReplyMessage
3557 func (m *IPTableDetails) Size() (size int) {
3561 size += 4 // m.Table.TableID
3562 size += 1 // m.Table.IsIP6
3563 size += 64 // m.Table.Name
3566 func (m *IPTableDetails) Marshal(b []byte) ([]byte, error) {
3568 b = make([]byte, m.Size())
3570 buf := codec.NewBuffer(b)
3571 buf.EncodeUint32(m.Table.TableID)
3572 buf.EncodeBool(m.Table.IsIP6)
3573 buf.EncodeString(m.Table.Name, 64)
3574 return buf.Bytes(), nil
3576 func (m *IPTableDetails) Unmarshal(b []byte) error {
3577 buf := codec.NewBuffer(b)
3578 m.Table.TableID = buf.DecodeUint32()
3579 m.Table.IsIP6 = buf.DecodeBool()
3580 m.Table.Name = buf.DecodeString(64)
3584 // IPTableDump defines message 'ip_table_dump'.
3585 type IPTableDump struct{}
3587 func (m *IPTableDump) Reset() { *m = IPTableDump{} }
3588 func (*IPTableDump) GetMessageName() string { return "ip_table_dump" }
3589 func (*IPTableDump) GetCrcString() string { return "51077d14" }
3590 func (*IPTableDump) GetMessageType() api.MessageType {
3591 return api.RequestMessage
3594 func (m *IPTableDump) Size() (size int) {
3600 func (m *IPTableDump) Marshal(b []byte) ([]byte, error) {
3602 b = make([]byte, m.Size())
3604 buf := codec.NewBuffer(b)
3605 return buf.Bytes(), nil
3607 func (m *IPTableDump) Unmarshal(b []byte) error {
3611 // IPTableFlush defines message 'ip_table_flush'.
3612 type IPTableFlush struct {
3613 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3616 func (m *IPTableFlush) Reset() { *m = IPTableFlush{} }
3617 func (*IPTableFlush) GetMessageName() string { return "ip_table_flush" }
3618 func (*IPTableFlush) GetCrcString() string { return "b9d2e09e" }
3619 func (*IPTableFlush) GetMessageType() api.MessageType {
3620 return api.RequestMessage
3623 func (m *IPTableFlush) Size() (size int) {
3627 size += 4 // m.Table.TableID
3628 size += 1 // m.Table.IsIP6
3629 size += 64 // m.Table.Name
3632 func (m *IPTableFlush) Marshal(b []byte) ([]byte, error) {
3634 b = make([]byte, m.Size())
3636 buf := codec.NewBuffer(b)
3637 buf.EncodeUint32(m.Table.TableID)
3638 buf.EncodeBool(m.Table.IsIP6)
3639 buf.EncodeString(m.Table.Name, 64)
3640 return buf.Bytes(), nil
3642 func (m *IPTableFlush) Unmarshal(b []byte) error {
3643 buf := codec.NewBuffer(b)
3644 m.Table.TableID = buf.DecodeUint32()
3645 m.Table.IsIP6 = buf.DecodeBool()
3646 m.Table.Name = buf.DecodeString(64)
3650 // IPTableFlushReply defines message 'ip_table_flush_reply'.
3651 type IPTableFlushReply struct {
3652 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3655 func (m *IPTableFlushReply) Reset() { *m = IPTableFlushReply{} }
3656 func (*IPTableFlushReply) GetMessageName() string { return "ip_table_flush_reply" }
3657 func (*IPTableFlushReply) GetCrcString() string { return "e8d4e804" }
3658 func (*IPTableFlushReply) GetMessageType() api.MessageType {
3659 return api.ReplyMessage
3662 func (m *IPTableFlushReply) Size() (size int) {
3666 size += 4 // m.Retval
3669 func (m *IPTableFlushReply) Marshal(b []byte) ([]byte, error) {
3671 b = make([]byte, m.Size())
3673 buf := codec.NewBuffer(b)
3674 buf.EncodeInt32(m.Retval)
3675 return buf.Bytes(), nil
3677 func (m *IPTableFlushReply) Unmarshal(b []byte) error {
3678 buf := codec.NewBuffer(b)
3679 m.Retval = buf.DecodeInt32()
3683 // IPTableReplaceBegin defines message 'ip_table_replace_begin'.
3684 type IPTableReplaceBegin struct {
3685 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3688 func (m *IPTableReplaceBegin) Reset() { *m = IPTableReplaceBegin{} }
3689 func (*IPTableReplaceBegin) GetMessageName() string { return "ip_table_replace_begin" }
3690 func (*IPTableReplaceBegin) GetCrcString() string { return "b9d2e09e" }
3691 func (*IPTableReplaceBegin) GetMessageType() api.MessageType {
3692 return api.RequestMessage
3695 func (m *IPTableReplaceBegin) Size() (size int) {
3699 size += 4 // m.Table.TableID
3700 size += 1 // m.Table.IsIP6
3701 size += 64 // m.Table.Name
3704 func (m *IPTableReplaceBegin) Marshal(b []byte) ([]byte, error) {
3706 b = make([]byte, m.Size())
3708 buf := codec.NewBuffer(b)
3709 buf.EncodeUint32(m.Table.TableID)
3710 buf.EncodeBool(m.Table.IsIP6)
3711 buf.EncodeString(m.Table.Name, 64)
3712 return buf.Bytes(), nil
3714 func (m *IPTableReplaceBegin) Unmarshal(b []byte) error {
3715 buf := codec.NewBuffer(b)
3716 m.Table.TableID = buf.DecodeUint32()
3717 m.Table.IsIP6 = buf.DecodeBool()
3718 m.Table.Name = buf.DecodeString(64)
3722 // IPTableReplaceBeginReply defines message 'ip_table_replace_begin_reply'.
3723 type IPTableReplaceBeginReply struct {
3724 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3727 func (m *IPTableReplaceBeginReply) Reset() { *m = IPTableReplaceBeginReply{} }
3728 func (*IPTableReplaceBeginReply) GetMessageName() string { return "ip_table_replace_begin_reply" }
3729 func (*IPTableReplaceBeginReply) GetCrcString() string { return "e8d4e804" }
3730 func (*IPTableReplaceBeginReply) GetMessageType() api.MessageType {
3731 return api.ReplyMessage
3734 func (m *IPTableReplaceBeginReply) Size() (size int) {
3738 size += 4 // m.Retval
3741 func (m *IPTableReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
3743 b = make([]byte, m.Size())
3745 buf := codec.NewBuffer(b)
3746 buf.EncodeInt32(m.Retval)
3747 return buf.Bytes(), nil
3749 func (m *IPTableReplaceBeginReply) Unmarshal(b []byte) error {
3750 buf := codec.NewBuffer(b)
3751 m.Retval = buf.DecodeInt32()
3755 // IPTableReplaceEnd defines message 'ip_table_replace_end'.
3756 type IPTableReplaceEnd struct {
3757 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3760 func (m *IPTableReplaceEnd) Reset() { *m = IPTableReplaceEnd{} }
3761 func (*IPTableReplaceEnd) GetMessageName() string { return "ip_table_replace_end" }
3762 func (*IPTableReplaceEnd) GetCrcString() string { return "b9d2e09e" }
3763 func (*IPTableReplaceEnd) GetMessageType() api.MessageType {
3764 return api.RequestMessage
3767 func (m *IPTableReplaceEnd) Size() (size int) {
3771 size += 4 // m.Table.TableID
3772 size += 1 // m.Table.IsIP6
3773 size += 64 // m.Table.Name
3776 func (m *IPTableReplaceEnd) Marshal(b []byte) ([]byte, error) {
3778 b = make([]byte, m.Size())
3780 buf := codec.NewBuffer(b)
3781 buf.EncodeUint32(m.Table.TableID)
3782 buf.EncodeBool(m.Table.IsIP6)
3783 buf.EncodeString(m.Table.Name, 64)
3784 return buf.Bytes(), nil
3786 func (m *IPTableReplaceEnd) Unmarshal(b []byte) error {
3787 buf := codec.NewBuffer(b)
3788 m.Table.TableID = buf.DecodeUint32()
3789 m.Table.IsIP6 = buf.DecodeBool()
3790 m.Table.Name = buf.DecodeString(64)
3794 // IPTableReplaceEndReply defines message 'ip_table_replace_end_reply'.
3795 type IPTableReplaceEndReply struct {
3796 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3799 func (m *IPTableReplaceEndReply) Reset() { *m = IPTableReplaceEndReply{} }
3800 func (*IPTableReplaceEndReply) GetMessageName() string { return "ip_table_replace_end_reply" }
3801 func (*IPTableReplaceEndReply) GetCrcString() string { return "e8d4e804" }
3802 func (*IPTableReplaceEndReply) GetMessageType() api.MessageType {
3803 return api.ReplyMessage
3806 func (m *IPTableReplaceEndReply) Size() (size int) {
3810 size += 4 // m.Retval
3813 func (m *IPTableReplaceEndReply) Marshal(b []byte) ([]byte, error) {
3815 b = make([]byte, m.Size())
3817 buf := codec.NewBuffer(b)
3818 buf.EncodeInt32(m.Retval)
3819 return buf.Bytes(), nil
3821 func (m *IPTableReplaceEndReply) Unmarshal(b []byte) error {
3822 buf := codec.NewBuffer(b)
3823 m.Retval = buf.DecodeInt32()
3827 // IPUnnumberedDetails defines message 'ip_unnumbered_details'.
3828 type IPUnnumberedDetails struct {
3829 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3830 IPSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip_sw_if_index" json:"ip_sw_if_index,omitempty"`
3833 func (m *IPUnnumberedDetails) Reset() { *m = IPUnnumberedDetails{} }
3834 func (*IPUnnumberedDetails) GetMessageName() string { return "ip_unnumbered_details" }
3835 func (*IPUnnumberedDetails) GetCrcString() string { return "cc59bd42" }
3836 func (*IPUnnumberedDetails) GetMessageType() api.MessageType {
3837 return api.ReplyMessage
3840 func (m *IPUnnumberedDetails) Size() (size int) {
3844 size += 4 // m.SwIfIndex
3845 size += 4 // m.IPSwIfIndex
3848 func (m *IPUnnumberedDetails) Marshal(b []byte) ([]byte, error) {
3850 b = make([]byte, m.Size())
3852 buf := codec.NewBuffer(b)
3853 buf.EncodeUint32(uint32(m.SwIfIndex))
3854 buf.EncodeUint32(uint32(m.IPSwIfIndex))
3855 return buf.Bytes(), nil
3857 func (m *IPUnnumberedDetails) Unmarshal(b []byte) error {
3858 buf := codec.NewBuffer(b)
3859 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3860 m.IPSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3864 // IPUnnumberedDump defines message 'ip_unnumbered_dump'.
3865 type IPUnnumberedDump struct {
3866 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
3869 func (m *IPUnnumberedDump) Reset() { *m = IPUnnumberedDump{} }
3870 func (*IPUnnumberedDump) GetMessageName() string { return "ip_unnumbered_dump" }
3871 func (*IPUnnumberedDump) GetCrcString() string { return "f9e6675e" }
3872 func (*IPUnnumberedDump) GetMessageType() api.MessageType {
3873 return api.RequestMessage
3876 func (m *IPUnnumberedDump) Size() (size int) {
3880 size += 4 // m.SwIfIndex
3883 func (m *IPUnnumberedDump) Marshal(b []byte) ([]byte, error) {
3885 b = make([]byte, m.Size())
3887 buf := codec.NewBuffer(b)
3888 buf.EncodeUint32(uint32(m.SwIfIndex))
3889 return buf.Bytes(), nil
3891 func (m *IPUnnumberedDump) Unmarshal(b []byte) error {
3892 buf := codec.NewBuffer(b)
3893 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3897 // MfibSignalDetails defines message 'mfib_signal_details'.
3898 type MfibSignalDetails struct {
3899 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3900 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
3901 Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
3902 IPPacketLen uint16 `binapi:"u16,name=ip_packet_len" json:"ip_packet_len,omitempty"`
3903 IPPacketData []byte `binapi:"u8[256],name=ip_packet_data" json:"ip_packet_data,omitempty"`
3906 func (m *MfibSignalDetails) Reset() { *m = MfibSignalDetails{} }
3907 func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" }
3908 func (*MfibSignalDetails) GetCrcString() string { return "6f4a4cfb" }
3909 func (*MfibSignalDetails) GetMessageType() api.MessageType {
3910 return api.ReplyMessage
3913 func (m *MfibSignalDetails) Size() (size int) {
3917 size += 4 // m.SwIfIndex
3918 size += 4 // m.TableID
3919 size += 1 // m.Prefix.Af
3920 size += 2 // m.Prefix.GrpAddressLength
3921 size += 1 * 16 // m.Prefix.GrpAddress
3922 size += 1 * 16 // m.Prefix.SrcAddress
3923 size += 2 // m.IPPacketLen
3924 size += 1 * 256 // m.IPPacketData
3927 func (m *MfibSignalDetails) Marshal(b []byte) ([]byte, error) {
3929 b = make([]byte, m.Size())
3931 buf := codec.NewBuffer(b)
3932 buf.EncodeUint32(uint32(m.SwIfIndex))
3933 buf.EncodeUint32(m.TableID)
3934 buf.EncodeUint8(uint8(m.Prefix.Af))
3935 buf.EncodeUint16(m.Prefix.GrpAddressLength)
3936 buf.EncodeBytes(m.Prefix.GrpAddress.XXX_UnionData[:], 16)
3937 buf.EncodeBytes(m.Prefix.SrcAddress.XXX_UnionData[:], 16)
3938 buf.EncodeUint16(m.IPPacketLen)
3939 buf.EncodeBytes(m.IPPacketData, 256)
3940 return buf.Bytes(), nil
3942 func (m *MfibSignalDetails) Unmarshal(b []byte) error {
3943 buf := codec.NewBuffer(b)
3944 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3945 m.TableID = buf.DecodeUint32()
3946 m.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
3947 m.Prefix.GrpAddressLength = buf.DecodeUint16()
3948 copy(m.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
3949 copy(m.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
3950 m.IPPacketLen = buf.DecodeUint16()
3951 m.IPPacketData = make([]byte, 256)
3952 copy(m.IPPacketData, buf.DecodeBytes(len(m.IPPacketData)))
3956 // MfibSignalDump defines message 'mfib_signal_dump'.
3957 type MfibSignalDump struct{}
3959 func (m *MfibSignalDump) Reset() { *m = MfibSignalDump{} }
3960 func (*MfibSignalDump) GetMessageName() string { return "mfib_signal_dump" }
3961 func (*MfibSignalDump) GetCrcString() string { return "51077d14" }
3962 func (*MfibSignalDump) GetMessageType() api.MessageType {
3963 return api.RequestMessage
3966 func (m *MfibSignalDump) Size() (size int) {
3972 func (m *MfibSignalDump) Marshal(b []byte) ([]byte, error) {
3974 b = make([]byte, m.Size())
3976 buf := codec.NewBuffer(b)
3977 return buf.Bytes(), nil
3979 func (m *MfibSignalDump) Unmarshal(b []byte) error {
3983 // SetIPFlowHash defines message 'set_ip_flow_hash'.
3984 // Deprecated: the message will be removed in the future versions
3985 type SetIPFlowHash struct {
3986 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3987 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
3988 Src bool `binapi:"bool,name=src" json:"src,omitempty"`
3989 Dst bool `binapi:"bool,name=dst" json:"dst,omitempty"`
3990 Sport bool `binapi:"bool,name=sport" json:"sport,omitempty"`
3991 Dport bool `binapi:"bool,name=dport" json:"dport,omitempty"`
3992 Proto bool `binapi:"bool,name=proto" json:"proto,omitempty"`
3993 Reverse bool `binapi:"bool,name=reverse" json:"reverse,omitempty"`
3994 Symmetric bool `binapi:"bool,name=symmetric" json:"symmetric,omitempty"`
3997 func (m *SetIPFlowHash) Reset() { *m = SetIPFlowHash{} }
3998 func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" }
3999 func (*SetIPFlowHash) GetCrcString() string { return "084ee09e" }
4000 func (*SetIPFlowHash) GetMessageType() api.MessageType {
4001 return api.RequestMessage
4004 func (m *SetIPFlowHash) Size() (size int) {
4008 size += 4 // m.VrfID
4009 size += 1 // m.IsIPv6
4012 size += 1 // m.Sport
4013 size += 1 // m.Dport
4014 size += 1 // m.Proto
4015 size += 1 // m.Reverse
4016 size += 1 // m.Symmetric
4019 func (m *SetIPFlowHash) Marshal(b []byte) ([]byte, error) {
4021 b = make([]byte, m.Size())
4023 buf := codec.NewBuffer(b)
4024 buf.EncodeUint32(m.VrfID)
4025 buf.EncodeBool(m.IsIPv6)
4026 buf.EncodeBool(m.Src)
4027 buf.EncodeBool(m.Dst)
4028 buf.EncodeBool(m.Sport)
4029 buf.EncodeBool(m.Dport)
4030 buf.EncodeBool(m.Proto)
4031 buf.EncodeBool(m.Reverse)
4032 buf.EncodeBool(m.Symmetric)
4033 return buf.Bytes(), nil
4035 func (m *SetIPFlowHash) Unmarshal(b []byte) error {
4036 buf := codec.NewBuffer(b)
4037 m.VrfID = buf.DecodeUint32()
4038 m.IsIPv6 = buf.DecodeBool()
4039 m.Src = buf.DecodeBool()
4040 m.Dst = buf.DecodeBool()
4041 m.Sport = buf.DecodeBool()
4042 m.Dport = buf.DecodeBool()
4043 m.Proto = buf.DecodeBool()
4044 m.Reverse = buf.DecodeBool()
4045 m.Symmetric = buf.DecodeBool()
4049 // SetIPFlowHashReply defines message 'set_ip_flow_hash_reply'.
4050 // Deprecated: the message will be removed in the future versions
4051 type SetIPFlowHashReply struct {
4052 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4055 func (m *SetIPFlowHashReply) Reset() { *m = SetIPFlowHashReply{} }
4056 func (*SetIPFlowHashReply) GetMessageName() string { return "set_ip_flow_hash_reply" }
4057 func (*SetIPFlowHashReply) GetCrcString() string { return "e8d4e804" }
4058 func (*SetIPFlowHashReply) GetMessageType() api.MessageType {
4059 return api.ReplyMessage
4062 func (m *SetIPFlowHashReply) Size() (size int) {
4066 size += 4 // m.Retval
4069 func (m *SetIPFlowHashReply) Marshal(b []byte) ([]byte, error) {
4071 b = make([]byte, m.Size())
4073 buf := codec.NewBuffer(b)
4074 buf.EncodeInt32(m.Retval)
4075 return buf.Bytes(), nil
4077 func (m *SetIPFlowHashReply) Unmarshal(b []byte) error {
4078 buf := codec.NewBuffer(b)
4079 m.Retval = buf.DecodeInt32()
4083 // SetIPFlowHashRouterID defines message 'set_ip_flow_hash_router_id'.
4084 type SetIPFlowHashRouterID struct {
4085 RouterID uint32 `binapi:"u32,name=router_id" json:"router_id,omitempty"`
4088 func (m *SetIPFlowHashRouterID) Reset() { *m = SetIPFlowHashRouterID{} }
4089 func (*SetIPFlowHashRouterID) GetMessageName() string { return "set_ip_flow_hash_router_id" }
4090 func (*SetIPFlowHashRouterID) GetCrcString() string { return "03e4f48e" }
4091 func (*SetIPFlowHashRouterID) GetMessageType() api.MessageType {
4092 return api.RequestMessage
4095 func (m *SetIPFlowHashRouterID) Size() (size int) {
4099 size += 4 // m.RouterID
4102 func (m *SetIPFlowHashRouterID) Marshal(b []byte) ([]byte, error) {
4104 b = make([]byte, m.Size())
4106 buf := codec.NewBuffer(b)
4107 buf.EncodeUint32(m.RouterID)
4108 return buf.Bytes(), nil
4110 func (m *SetIPFlowHashRouterID) Unmarshal(b []byte) error {
4111 buf := codec.NewBuffer(b)
4112 m.RouterID = buf.DecodeUint32()
4116 // SetIPFlowHashRouterIDReply defines message 'set_ip_flow_hash_router_id_reply'.
4117 type SetIPFlowHashRouterIDReply struct {
4118 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4121 func (m *SetIPFlowHashRouterIDReply) Reset() { *m = SetIPFlowHashRouterIDReply{} }
4122 func (*SetIPFlowHashRouterIDReply) GetMessageName() string { return "set_ip_flow_hash_router_id_reply" }
4123 func (*SetIPFlowHashRouterIDReply) GetCrcString() string { return "e8d4e804" }
4124 func (*SetIPFlowHashRouterIDReply) GetMessageType() api.MessageType {
4125 return api.ReplyMessage
4128 func (m *SetIPFlowHashRouterIDReply) Size() (size int) {
4132 size += 4 // m.Retval
4135 func (m *SetIPFlowHashRouterIDReply) Marshal(b []byte) ([]byte, error) {
4137 b = make([]byte, m.Size())
4139 buf := codec.NewBuffer(b)
4140 buf.EncodeInt32(m.Retval)
4141 return buf.Bytes(), nil
4143 func (m *SetIPFlowHashRouterIDReply) Unmarshal(b []byte) error {
4144 buf := codec.NewBuffer(b)
4145 m.Retval = buf.DecodeInt32()
4149 // SetIPFlowHashV2 defines message 'set_ip_flow_hash_v2'.
4150 type SetIPFlowHashV2 struct {
4151 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
4152 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
4153 FlowHashConfig IPFlowHashConfig `binapi:"ip_flow_hash_config,name=flow_hash_config" json:"flow_hash_config,omitempty"`
4156 func (m *SetIPFlowHashV2) Reset() { *m = SetIPFlowHashV2{} }
4157 func (*SetIPFlowHashV2) GetMessageName() string { return "set_ip_flow_hash_v2" }
4158 func (*SetIPFlowHashV2) GetCrcString() string { return "6d132100" }
4159 func (*SetIPFlowHashV2) GetMessageType() api.MessageType {
4160 return api.RequestMessage
4163 func (m *SetIPFlowHashV2) Size() (size int) {
4167 size += 4 // m.TableID
4169 size += 4 // m.FlowHashConfig
4172 func (m *SetIPFlowHashV2) Marshal(b []byte) ([]byte, error) {
4174 b = make([]byte, m.Size())
4176 buf := codec.NewBuffer(b)
4177 buf.EncodeUint32(m.TableID)
4178 buf.EncodeUint8(uint8(m.Af))
4179 buf.EncodeUint32(uint32(m.FlowHashConfig))
4180 return buf.Bytes(), nil
4182 func (m *SetIPFlowHashV2) Unmarshal(b []byte) error {
4183 buf := codec.NewBuffer(b)
4184 m.TableID = buf.DecodeUint32()
4185 m.Af = ip_types.AddressFamily(buf.DecodeUint8())
4186 m.FlowHashConfig = IPFlowHashConfig(buf.DecodeUint32())
4190 // SetIPFlowHashV2Reply defines message 'set_ip_flow_hash_v2_reply'.
4191 type SetIPFlowHashV2Reply struct {
4192 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4195 func (m *SetIPFlowHashV2Reply) Reset() { *m = SetIPFlowHashV2Reply{} }
4196 func (*SetIPFlowHashV2Reply) GetMessageName() string { return "set_ip_flow_hash_v2_reply" }
4197 func (*SetIPFlowHashV2Reply) GetCrcString() string { return "e8d4e804" }
4198 func (*SetIPFlowHashV2Reply) GetMessageType() api.MessageType {
4199 return api.ReplyMessage
4202 func (m *SetIPFlowHashV2Reply) Size() (size int) {
4206 size += 4 // m.Retval
4209 func (m *SetIPFlowHashV2Reply) Marshal(b []byte) ([]byte, error) {
4211 b = make([]byte, m.Size())
4213 buf := codec.NewBuffer(b)
4214 buf.EncodeInt32(m.Retval)
4215 return buf.Bytes(), nil
4217 func (m *SetIPFlowHashV2Reply) Unmarshal(b []byte) error {
4218 buf := codec.NewBuffer(b)
4219 m.Retval = buf.DecodeInt32()
4223 // SwInterfaceIP6EnableDisable defines message 'sw_interface_ip6_enable_disable'.
4224 type SwInterfaceIP6EnableDisable struct {
4225 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
4226 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
4229 func (m *SwInterfaceIP6EnableDisable) Reset() { *m = SwInterfaceIP6EnableDisable{} }
4230 func (*SwInterfaceIP6EnableDisable) GetMessageName() string { return "sw_interface_ip6_enable_disable" }
4231 func (*SwInterfaceIP6EnableDisable) GetCrcString() string { return "ae6cfcfb" }
4232 func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType {
4233 return api.RequestMessage
4236 func (m *SwInterfaceIP6EnableDisable) Size() (size int) {
4240 size += 4 // m.SwIfIndex
4241 size += 1 // m.Enable
4244 func (m *SwInterfaceIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
4246 b = make([]byte, m.Size())
4248 buf := codec.NewBuffer(b)
4249 buf.EncodeUint32(uint32(m.SwIfIndex))
4250 buf.EncodeBool(m.Enable)
4251 return buf.Bytes(), nil
4253 func (m *SwInterfaceIP6EnableDisable) Unmarshal(b []byte) error {
4254 buf := codec.NewBuffer(b)
4255 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
4256 m.Enable = buf.DecodeBool()
4260 // SwInterfaceIP6EnableDisableReply defines message 'sw_interface_ip6_enable_disable_reply'.
4261 type SwInterfaceIP6EnableDisableReply struct {
4262 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4265 func (m *SwInterfaceIP6EnableDisableReply) Reset() { *m = SwInterfaceIP6EnableDisableReply{} }
4266 func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string {
4267 return "sw_interface_ip6_enable_disable_reply"
4269 func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
4270 func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType {
4271 return api.ReplyMessage
4274 func (m *SwInterfaceIP6EnableDisableReply) Size() (size int) {
4278 size += 4 // m.Retval
4281 func (m *SwInterfaceIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) {
4283 b = make([]byte, m.Size())
4285 buf := codec.NewBuffer(b)
4286 buf.EncodeInt32(m.Retval)
4287 return buf.Bytes(), nil
4289 func (m *SwInterfaceIP6EnableDisableReply) Unmarshal(b []byte) error {
4290 buf := codec.NewBuffer(b)
4291 m.Retval = buf.DecodeInt32()
4295 // SwInterfaceIP6GetLinkLocalAddress defines message 'sw_interface_ip6_get_link_local_address'.
4296 type SwInterfaceIP6GetLinkLocalAddress struct {
4297 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
4300 func (m *SwInterfaceIP6GetLinkLocalAddress) Reset() { *m = SwInterfaceIP6GetLinkLocalAddress{} }
4301 func (*SwInterfaceIP6GetLinkLocalAddress) GetMessageName() string {
4302 return "sw_interface_ip6_get_link_local_address"
4304 func (*SwInterfaceIP6GetLinkLocalAddress) GetCrcString() string { return "f9e6675e" }
4305 func (*SwInterfaceIP6GetLinkLocalAddress) GetMessageType() api.MessageType {
4306 return api.RequestMessage
4309 func (m *SwInterfaceIP6GetLinkLocalAddress) Size() (size int) {
4313 size += 4 // m.SwIfIndex
4316 func (m *SwInterfaceIP6GetLinkLocalAddress) Marshal(b []byte) ([]byte, error) {
4318 b = make([]byte, m.Size())
4320 buf := codec.NewBuffer(b)
4321 buf.EncodeUint32(uint32(m.SwIfIndex))
4322 return buf.Bytes(), nil
4324 func (m *SwInterfaceIP6GetLinkLocalAddress) Unmarshal(b []byte) error {
4325 buf := codec.NewBuffer(b)
4326 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
4330 // SwInterfaceIP6GetLinkLocalAddressReply defines message 'sw_interface_ip6_get_link_local_address_reply'.
4331 type SwInterfaceIP6GetLinkLocalAddressReply struct {
4332 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4333 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
4336 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Reset() {
4337 *m = SwInterfaceIP6GetLinkLocalAddressReply{}
4339 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetMessageName() string {
4340 return "sw_interface_ip6_get_link_local_address_reply"
4342 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetCrcString() string { return "d16b7130" }
4343 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetMessageType() api.MessageType {
4344 return api.ReplyMessage
4347 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Size() (size int) {
4351 size += 4 // m.Retval
4352 size += 1 * 16 // m.IP
4355 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) {
4357 b = make([]byte, m.Size())
4359 buf := codec.NewBuffer(b)
4360 buf.EncodeInt32(m.Retval)
4361 buf.EncodeBytes(m.IP[:], 16)
4362 return buf.Bytes(), nil
4364 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Unmarshal(b []byte) error {
4365 buf := codec.NewBuffer(b)
4366 m.Retval = buf.DecodeInt32()
4367 copy(m.IP[:], buf.DecodeBytes(16))
4371 // SwInterfaceIP6SetLinkLocalAddress defines message 'sw_interface_ip6_set_link_local_address'.
4372 type SwInterfaceIP6SetLinkLocalAddress struct {
4373 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
4374 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
4377 func (m *SwInterfaceIP6SetLinkLocalAddress) Reset() { *m = SwInterfaceIP6SetLinkLocalAddress{} }
4378 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string {
4379 return "sw_interface_ip6_set_link_local_address"
4381 func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "1c10f15f" }
4382 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType {
4383 return api.RequestMessage
4386 func (m *SwInterfaceIP6SetLinkLocalAddress) Size() (size int) {
4390 size += 4 // m.SwIfIndex
4391 size += 1 * 16 // m.IP
4394 func (m *SwInterfaceIP6SetLinkLocalAddress) Marshal(b []byte) ([]byte, error) {
4396 b = make([]byte, m.Size())
4398 buf := codec.NewBuffer(b)
4399 buf.EncodeUint32(uint32(m.SwIfIndex))
4400 buf.EncodeBytes(m.IP[:], 16)
4401 return buf.Bytes(), nil
4403 func (m *SwInterfaceIP6SetLinkLocalAddress) Unmarshal(b []byte) error {
4404 buf := codec.NewBuffer(b)
4405 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
4406 copy(m.IP[:], buf.DecodeBytes(16))
4410 // SwInterfaceIP6SetLinkLocalAddressReply defines message 'sw_interface_ip6_set_link_local_address_reply'.
4411 type SwInterfaceIP6SetLinkLocalAddressReply struct {
4412 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4415 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Reset() {
4416 *m = SwInterfaceIP6SetLinkLocalAddressReply{}
4418 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string {
4419 return "sw_interface_ip6_set_link_local_address_reply"
4421 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { return "e8d4e804" }
4422 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType {
4423 return api.ReplyMessage
4426 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Size() (size int) {
4430 size += 4 // m.Retval
4433 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) {
4435 b = make([]byte, m.Size())
4437 buf := codec.NewBuffer(b)
4438 buf.EncodeInt32(m.Retval)
4439 return buf.Bytes(), nil
4441 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error {
4442 buf := codec.NewBuffer(b)
4443 m.Retval = buf.DecodeInt32()
4447 func init() { file_ip_binapi_init() }
4448 func file_ip_binapi_init() {
4449 api.RegisterMessage((*AddDelIPPuntRedirectV2)(nil), "add_del_ip_punt_redirect_v2_9e804227")
4450 api.RegisterMessage((*AddDelIPPuntRedirectV2Reply)(nil), "add_del_ip_punt_redirect_v2_reply_e8d4e804")
4451 api.RegisterMessage((*IoamDisable)(nil), "ioam_disable_6b16a45e")
4452 api.RegisterMessage((*IoamDisableReply)(nil), "ioam_disable_reply_e8d4e804")
4453 api.RegisterMessage((*IoamEnable)(nil), "ioam_enable_51ccd868")
4454 api.RegisterMessage((*IoamEnableReply)(nil), "ioam_enable_reply_e8d4e804")
4455 api.RegisterMessage((*IPAddressDetails)(nil), "ip_address_details_ee29b797")
4456 api.RegisterMessage((*IPAddressDump)(nil), "ip_address_dump_2d033de4")
4457 api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip_container_proxy_add_del_7df1dff1")
4458 api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip_container_proxy_add_del_reply_e8d4e804")
4459 api.RegisterMessage((*IPContainerProxyDetails)(nil), "ip_container_proxy_details_a8085523")
4460 api.RegisterMessage((*IPContainerProxyDump)(nil), "ip_container_proxy_dump_51077d14")
4461 api.RegisterMessage((*IPDetails)(nil), "ip_details_eb152d07")
4462 api.RegisterMessage((*IPDump)(nil), "ip_dump_98d231ca")
4463 api.RegisterMessage((*IPMrouteAddDel)(nil), "ip_mroute_add_del_0dd7e790")
4464 api.RegisterMessage((*IPMrouteAddDelReply)(nil), "ip_mroute_add_del_reply_1992deab")
4465 api.RegisterMessage((*IPMrouteDetails)(nil), "ip_mroute_details_c5cb23fc")
4466 api.RegisterMessage((*IPMrouteDump)(nil), "ip_mroute_dump_b9d2e09e")
4467 api.RegisterMessage((*IPMtableDetails)(nil), "ip_mtable_details_b9d2e09e")
4468 api.RegisterMessage((*IPMtableDump)(nil), "ip_mtable_dump_51077d14")
4469 api.RegisterMessage((*IPPathMtuDetails)(nil), "ip_path_mtu_details_ac9539a7")
4470 api.RegisterMessage((*IPPathMtuGet)(nil), "ip_path_mtu_get_f75ba505")
4471 api.RegisterMessage((*IPPathMtuGetReply)(nil), "ip_path_mtu_get_reply_53b48f5d")
4472 api.RegisterMessage((*IPPathMtuReplaceBegin)(nil), "ip_path_mtu_replace_begin_51077d14")
4473 api.RegisterMessage((*IPPathMtuReplaceBeginReply)(nil), "ip_path_mtu_replace_begin_reply_e8d4e804")
4474 api.RegisterMessage((*IPPathMtuReplaceEnd)(nil), "ip_path_mtu_replace_end_51077d14")
4475 api.RegisterMessage((*IPPathMtuReplaceEndReply)(nil), "ip_path_mtu_replace_end_reply_e8d4e804")
4476 api.RegisterMessage((*IPPathMtuUpdate)(nil), "ip_path_mtu_update_10bbe5cb")
4477 api.RegisterMessage((*IPPathMtuUpdateReply)(nil), "ip_path_mtu_update_reply_e8d4e804")
4478 api.RegisterMessage((*IPPuntPolice)(nil), "ip_punt_police_db867cea")
4479 api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip_punt_police_reply_e8d4e804")
4480 api.RegisterMessage((*IPPuntRedirect)(nil), "ip_punt_redirect_6580f635")
4481 api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_2cef63e7")
4482 api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip_punt_redirect_dump_2d033de4")
4483 api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip_punt_redirect_reply_e8d4e804")
4484 api.RegisterMessage((*IPPuntRedirectV2Details)(nil), "ip_punt_redirect_v2_details_7ba42e1d")
4485 api.RegisterMessage((*IPPuntRedirectV2Dump)(nil), "ip_punt_redirect_v2_dump_d817a484")
4486 api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_eb77968d")
4487 api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip_reassembly_enable_disable_reply_e8d4e804")
4488 api.RegisterMessage((*IPReassemblyGet)(nil), "ip_reassembly_get_ea13ff63")
4489 api.RegisterMessage((*IPReassemblyGetReply)(nil), "ip_reassembly_get_reply_d5eb8d34")
4490 api.RegisterMessage((*IPReassemblySet)(nil), "ip_reassembly_set_16467d25")
4491 api.RegisterMessage((*IPReassemblySetReply)(nil), "ip_reassembly_set_reply_e8d4e804")
4492 api.RegisterMessage((*IPRouteAddDel)(nil), "ip_route_add_del_b8ecfe0d")
4493 api.RegisterMessage((*IPRouteAddDelReply)(nil), "ip_route_add_del_reply_1992deab")
4494 api.RegisterMessage((*IPRouteAddDelV2)(nil), "ip_route_add_del_v2_521ef330")
4495 api.RegisterMessage((*IPRouteAddDelV2Reply)(nil), "ip_route_add_del_v2_reply_1992deab")
4496 api.RegisterMessage((*IPRouteDetails)(nil), "ip_route_details_bda8f315")
4497 api.RegisterMessage((*IPRouteDump)(nil), "ip_route_dump_b9d2e09e")
4498 api.RegisterMessage((*IPRouteLookup)(nil), "ip_route_lookup_710d6471")
4499 api.RegisterMessage((*IPRouteLookupReply)(nil), "ip_route_lookup_reply_5d8febcb")
4500 api.RegisterMessage((*IPRouteLookupV2)(nil), "ip_route_lookup_v2_710d6471")
4501 api.RegisterMessage((*IPRouteLookupV2Reply)(nil), "ip_route_lookup_v2_reply_84cc9e03")
4502 api.RegisterMessage((*IPRouteV2Details)(nil), "ip_route_v2_details_b09aa6c0")
4503 api.RegisterMessage((*IPRouteV2Dump)(nil), "ip_route_v2_dump_d16f72e6")
4504 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip_source_and_port_range_check_add_del_92a067e3")
4505 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip_source_and_port_range_check_add_del_reply_e8d4e804")
4506 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip_source_and_port_range_check_interface_add_del_e1ba8987")
4507 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip_source_and_port_range_check_interface_add_del_reply_e8d4e804")
4508 api.RegisterMessage((*IPTableAddDel)(nil), "ip_table_add_del_0ffdaec0")
4509 api.RegisterMessage((*IPTableAddDelReply)(nil), "ip_table_add_del_reply_e8d4e804")
4510 api.RegisterMessage((*IPTableAllocate)(nil), "ip_table_allocate_b9d2e09e")
4511 api.RegisterMessage((*IPTableAllocateReply)(nil), "ip_table_allocate_reply_1728303a")
4512 api.RegisterMessage((*IPTableDetails)(nil), "ip_table_details_c79fca0f")
4513 api.RegisterMessage((*IPTableDump)(nil), "ip_table_dump_51077d14")
4514 api.RegisterMessage((*IPTableFlush)(nil), "ip_table_flush_b9d2e09e")
4515 api.RegisterMessage((*IPTableFlushReply)(nil), "ip_table_flush_reply_e8d4e804")
4516 api.RegisterMessage((*IPTableReplaceBegin)(nil), "ip_table_replace_begin_b9d2e09e")
4517 api.RegisterMessage((*IPTableReplaceBeginReply)(nil), "ip_table_replace_begin_reply_e8d4e804")
4518 api.RegisterMessage((*IPTableReplaceEnd)(nil), "ip_table_replace_end_b9d2e09e")
4519 api.RegisterMessage((*IPTableReplaceEndReply)(nil), "ip_table_replace_end_reply_e8d4e804")
4520 api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip_unnumbered_details_cc59bd42")
4521 api.RegisterMessage((*IPUnnumberedDump)(nil), "ip_unnumbered_dump_f9e6675e")
4522 api.RegisterMessage((*MfibSignalDetails)(nil), "mfib_signal_details_6f4a4cfb")
4523 api.RegisterMessage((*MfibSignalDump)(nil), "mfib_signal_dump_51077d14")
4524 api.RegisterMessage((*SetIPFlowHash)(nil), "set_ip_flow_hash_084ee09e")
4525 api.RegisterMessage((*SetIPFlowHashReply)(nil), "set_ip_flow_hash_reply_e8d4e804")
4526 api.RegisterMessage((*SetIPFlowHashRouterID)(nil), "set_ip_flow_hash_router_id_03e4f48e")
4527 api.RegisterMessage((*SetIPFlowHashRouterIDReply)(nil), "set_ip_flow_hash_router_id_reply_e8d4e804")
4528 api.RegisterMessage((*SetIPFlowHashV2)(nil), "set_ip_flow_hash_v2_6d132100")
4529 api.RegisterMessage((*SetIPFlowHashV2Reply)(nil), "set_ip_flow_hash_v2_reply_e8d4e804")
4530 api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "sw_interface_ip6_enable_disable_ae6cfcfb")
4531 api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "sw_interface_ip6_enable_disable_reply_e8d4e804")
4532 api.RegisterMessage((*SwInterfaceIP6GetLinkLocalAddress)(nil), "sw_interface_ip6_get_link_local_address_f9e6675e")
4533 api.RegisterMessage((*SwInterfaceIP6GetLinkLocalAddressReply)(nil), "sw_interface_ip6_get_link_local_address_reply_d16b7130")
4534 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "sw_interface_ip6_set_link_local_address_1c10f15f")
4535 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "sw_interface_ip6_set_link_local_address_reply_e8d4e804")
4538 // Messages returns list of all messages in this module.
4539 func AllMessages() []api.Message {
4540 return []api.Message{
4541 (*AddDelIPPuntRedirectV2)(nil),
4542 (*AddDelIPPuntRedirectV2Reply)(nil),
4543 (*IoamDisable)(nil),
4544 (*IoamDisableReply)(nil),
4546 (*IoamEnableReply)(nil),
4547 (*IPAddressDetails)(nil),
4548 (*IPAddressDump)(nil),
4549 (*IPContainerProxyAddDel)(nil),
4550 (*IPContainerProxyAddDelReply)(nil),
4551 (*IPContainerProxyDetails)(nil),
4552 (*IPContainerProxyDump)(nil),
4555 (*IPMrouteAddDel)(nil),
4556 (*IPMrouteAddDelReply)(nil),
4557 (*IPMrouteDetails)(nil),
4558 (*IPMrouteDump)(nil),
4559 (*IPMtableDetails)(nil),
4560 (*IPMtableDump)(nil),
4561 (*IPPathMtuDetails)(nil),
4562 (*IPPathMtuGet)(nil),
4563 (*IPPathMtuGetReply)(nil),
4564 (*IPPathMtuReplaceBegin)(nil),
4565 (*IPPathMtuReplaceBeginReply)(nil),
4566 (*IPPathMtuReplaceEnd)(nil),
4567 (*IPPathMtuReplaceEndReply)(nil),
4568 (*IPPathMtuUpdate)(nil),
4569 (*IPPathMtuUpdateReply)(nil),
4570 (*IPPuntPolice)(nil),
4571 (*IPPuntPoliceReply)(nil),
4572 (*IPPuntRedirect)(nil),
4573 (*IPPuntRedirectDetails)(nil),
4574 (*IPPuntRedirectDump)(nil),
4575 (*IPPuntRedirectReply)(nil),
4576 (*IPPuntRedirectV2Details)(nil),
4577 (*IPPuntRedirectV2Dump)(nil),
4578 (*IPReassemblyEnableDisable)(nil),
4579 (*IPReassemblyEnableDisableReply)(nil),
4580 (*IPReassemblyGet)(nil),
4581 (*IPReassemblyGetReply)(nil),
4582 (*IPReassemblySet)(nil),
4583 (*IPReassemblySetReply)(nil),
4584 (*IPRouteAddDel)(nil),
4585 (*IPRouteAddDelReply)(nil),
4586 (*IPRouteAddDelV2)(nil),
4587 (*IPRouteAddDelV2Reply)(nil),
4588 (*IPRouteDetails)(nil),
4589 (*IPRouteDump)(nil),
4590 (*IPRouteLookup)(nil),
4591 (*IPRouteLookupReply)(nil),
4592 (*IPRouteLookupV2)(nil),
4593 (*IPRouteLookupV2Reply)(nil),
4594 (*IPRouteV2Details)(nil),
4595 (*IPRouteV2Dump)(nil),
4596 (*IPSourceAndPortRangeCheckAddDel)(nil),
4597 (*IPSourceAndPortRangeCheckAddDelReply)(nil),
4598 (*IPSourceAndPortRangeCheckInterfaceAddDel)(nil),
4599 (*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil),
4600 (*IPTableAddDel)(nil),
4601 (*IPTableAddDelReply)(nil),
4602 (*IPTableAllocate)(nil),
4603 (*IPTableAllocateReply)(nil),
4604 (*IPTableDetails)(nil),
4605 (*IPTableDump)(nil),
4606 (*IPTableFlush)(nil),
4607 (*IPTableFlushReply)(nil),
4608 (*IPTableReplaceBegin)(nil),
4609 (*IPTableReplaceBeginReply)(nil),
4610 (*IPTableReplaceEnd)(nil),
4611 (*IPTableReplaceEndReply)(nil),
4612 (*IPUnnumberedDetails)(nil),
4613 (*IPUnnumberedDump)(nil),
4614 (*MfibSignalDetails)(nil),
4615 (*MfibSignalDump)(nil),
4616 (*SetIPFlowHash)(nil),
4617 (*SetIPFlowHashReply)(nil),
4618 (*SetIPFlowHashRouterID)(nil),
4619 (*SetIPFlowHashRouterIDReply)(nil),
4620 (*SetIPFlowHashV2)(nil),
4621 (*SetIPFlowHashV2Reply)(nil),
4622 (*SwInterfaceIP6EnableDisable)(nil),
4623 (*SwInterfaceIP6EnableDisableReply)(nil),
4624 (*SwInterfaceIP6GetLinkLocalAddress)(nil),
4625 (*SwInterfaceIP6GetLinkLocalAddressReply)(nil),
4626 (*SwInterfaceIP6SetLinkLocalAddress)(nil),
4627 (*SwInterfaceIP6SetLinkLocalAddressReply)(nil),