1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
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 = 0x972432b4
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 // IoamDisable defines message 'ioam_disable'.
184 type IoamDisable struct {
185 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
188 func (m *IoamDisable) Reset() { *m = IoamDisable{} }
189 func (*IoamDisable) GetMessageName() string { return "ioam_disable" }
190 func (*IoamDisable) GetCrcString() string { return "6b16a45e" }
191 func (*IoamDisable) GetMessageType() api.MessageType {
192 return api.RequestMessage
195 func (m *IoamDisable) Size() (size int) {
202 func (m *IoamDisable) Marshal(b []byte) ([]byte, error) {
204 b = make([]byte, m.Size())
206 buf := codec.NewBuffer(b)
207 buf.EncodeUint16(m.ID)
208 return buf.Bytes(), nil
210 func (m *IoamDisable) Unmarshal(b []byte) error {
211 buf := codec.NewBuffer(b)
212 m.ID = buf.DecodeUint16()
216 // IoamDisableReply defines message 'ioam_disable_reply'.
217 type IoamDisableReply struct {
218 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
221 func (m *IoamDisableReply) Reset() { *m = IoamDisableReply{} }
222 func (*IoamDisableReply) GetMessageName() string { return "ioam_disable_reply" }
223 func (*IoamDisableReply) GetCrcString() string { return "e8d4e804" }
224 func (*IoamDisableReply) GetMessageType() api.MessageType {
225 return api.ReplyMessage
228 func (m *IoamDisableReply) Size() (size int) {
232 size += 4 // m.Retval
235 func (m *IoamDisableReply) Marshal(b []byte) ([]byte, error) {
237 b = make([]byte, m.Size())
239 buf := codec.NewBuffer(b)
240 buf.EncodeInt32(m.Retval)
241 return buf.Bytes(), nil
243 func (m *IoamDisableReply) Unmarshal(b []byte) error {
244 buf := codec.NewBuffer(b)
245 m.Retval = buf.DecodeInt32()
249 // IoamEnable defines message 'ioam_enable'.
250 type IoamEnable struct {
251 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
252 Seqno bool `binapi:"bool,name=seqno" json:"seqno,omitempty"`
253 Analyse bool `binapi:"bool,name=analyse" json:"analyse,omitempty"`
254 PotEnable bool `binapi:"bool,name=pot_enable" json:"pot_enable,omitempty"`
255 TraceEnable bool `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"`
256 NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
259 func (m *IoamEnable) Reset() { *m = IoamEnable{} }
260 func (*IoamEnable) GetMessageName() string { return "ioam_enable" }
261 func (*IoamEnable) GetCrcString() string { return "51ccd868" }
262 func (*IoamEnable) GetMessageType() api.MessageType {
263 return api.RequestMessage
266 func (m *IoamEnable) Size() (size int) {
272 size += 1 // m.Analyse
273 size += 1 // m.PotEnable
274 size += 1 // m.TraceEnable
275 size += 4 // m.NodeID
278 func (m *IoamEnable) Marshal(b []byte) ([]byte, error) {
280 b = make([]byte, m.Size())
282 buf := codec.NewBuffer(b)
283 buf.EncodeUint16(m.ID)
284 buf.EncodeBool(m.Seqno)
285 buf.EncodeBool(m.Analyse)
286 buf.EncodeBool(m.PotEnable)
287 buf.EncodeBool(m.TraceEnable)
288 buf.EncodeUint32(m.NodeID)
289 return buf.Bytes(), nil
291 func (m *IoamEnable) Unmarshal(b []byte) error {
292 buf := codec.NewBuffer(b)
293 m.ID = buf.DecodeUint16()
294 m.Seqno = buf.DecodeBool()
295 m.Analyse = buf.DecodeBool()
296 m.PotEnable = buf.DecodeBool()
297 m.TraceEnable = buf.DecodeBool()
298 m.NodeID = buf.DecodeUint32()
302 // IoamEnableReply defines message 'ioam_enable_reply'.
303 type IoamEnableReply struct {
304 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
307 func (m *IoamEnableReply) Reset() { *m = IoamEnableReply{} }
308 func (*IoamEnableReply) GetMessageName() string { return "ioam_enable_reply" }
309 func (*IoamEnableReply) GetCrcString() string { return "e8d4e804" }
310 func (*IoamEnableReply) GetMessageType() api.MessageType {
311 return api.ReplyMessage
314 func (m *IoamEnableReply) Size() (size int) {
318 size += 4 // m.Retval
321 func (m *IoamEnableReply) Marshal(b []byte) ([]byte, error) {
323 b = make([]byte, m.Size())
325 buf := codec.NewBuffer(b)
326 buf.EncodeInt32(m.Retval)
327 return buf.Bytes(), nil
329 func (m *IoamEnableReply) Unmarshal(b []byte) error {
330 buf := codec.NewBuffer(b)
331 m.Retval = buf.DecodeInt32()
335 // IPAddressDetails defines message 'ip_address_details'.
336 type IPAddressDetails struct {
337 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
338 Prefix ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
341 func (m *IPAddressDetails) Reset() { *m = IPAddressDetails{} }
342 func (*IPAddressDetails) GetMessageName() string { return "ip_address_details" }
343 func (*IPAddressDetails) GetCrcString() string { return "ee29b797" }
344 func (*IPAddressDetails) GetMessageType() api.MessageType {
345 return api.ReplyMessage
348 func (m *IPAddressDetails) Size() (size int) {
352 size += 4 // m.SwIfIndex
353 size += 1 // m.Prefix.Address.Af
354 size += 1 * 16 // m.Prefix.Address.Un
355 size += 1 // m.Prefix.Len
358 func (m *IPAddressDetails) Marshal(b []byte) ([]byte, error) {
360 b = make([]byte, m.Size())
362 buf := codec.NewBuffer(b)
363 buf.EncodeUint32(uint32(m.SwIfIndex))
364 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
365 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
366 buf.EncodeUint8(m.Prefix.Len)
367 return buf.Bytes(), nil
369 func (m *IPAddressDetails) Unmarshal(b []byte) error {
370 buf := codec.NewBuffer(b)
371 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
372 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
373 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
374 m.Prefix.Len = buf.DecodeUint8()
378 // IPAddressDump defines message 'ip_address_dump'.
379 type IPAddressDump struct {
380 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
381 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
384 func (m *IPAddressDump) Reset() { *m = IPAddressDump{} }
385 func (*IPAddressDump) GetMessageName() string { return "ip_address_dump" }
386 func (*IPAddressDump) GetCrcString() string { return "2d033de4" }
387 func (*IPAddressDump) GetMessageType() api.MessageType {
388 return api.RequestMessage
391 func (m *IPAddressDump) Size() (size int) {
395 size += 4 // m.SwIfIndex
396 size += 1 // m.IsIPv6
399 func (m *IPAddressDump) Marshal(b []byte) ([]byte, error) {
401 b = make([]byte, m.Size())
403 buf := codec.NewBuffer(b)
404 buf.EncodeUint32(uint32(m.SwIfIndex))
405 buf.EncodeBool(m.IsIPv6)
406 return buf.Bytes(), nil
408 func (m *IPAddressDump) Unmarshal(b []byte) error {
409 buf := codec.NewBuffer(b)
410 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
411 m.IsIPv6 = buf.DecodeBool()
415 // IPContainerProxyAddDel defines message 'ip_container_proxy_add_del'.
416 type IPContainerProxyAddDel struct {
417 Pfx ip_types.Prefix `binapi:"prefix,name=pfx" json:"pfx,omitempty"`
418 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
419 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
422 func (m *IPContainerProxyAddDel) Reset() { *m = IPContainerProxyAddDel{} }
423 func (*IPContainerProxyAddDel) GetMessageName() string { return "ip_container_proxy_add_del" }
424 func (*IPContainerProxyAddDel) GetCrcString() string { return "7df1dff1" }
425 func (*IPContainerProxyAddDel) GetMessageType() api.MessageType {
426 return api.RequestMessage
429 func (m *IPContainerProxyAddDel) Size() (size int) {
433 size += 1 // m.Pfx.Address.Af
434 size += 1 * 16 // m.Pfx.Address.Un
435 size += 1 // m.Pfx.Len
436 size += 4 // m.SwIfIndex
440 func (m *IPContainerProxyAddDel) Marshal(b []byte) ([]byte, error) {
442 b = make([]byte, m.Size())
444 buf := codec.NewBuffer(b)
445 buf.EncodeUint8(uint8(m.Pfx.Address.Af))
446 buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
447 buf.EncodeUint8(m.Pfx.Len)
448 buf.EncodeUint32(uint32(m.SwIfIndex))
449 buf.EncodeBool(m.IsAdd)
450 return buf.Bytes(), nil
452 func (m *IPContainerProxyAddDel) Unmarshal(b []byte) error {
453 buf := codec.NewBuffer(b)
454 m.Pfx.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
455 copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
456 m.Pfx.Len = buf.DecodeUint8()
457 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
458 m.IsAdd = buf.DecodeBool()
462 // IPContainerProxyAddDelReply defines message 'ip_container_proxy_add_del_reply'.
463 type IPContainerProxyAddDelReply struct {
464 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
467 func (m *IPContainerProxyAddDelReply) Reset() { *m = IPContainerProxyAddDelReply{} }
468 func (*IPContainerProxyAddDelReply) GetMessageName() string {
469 return "ip_container_proxy_add_del_reply"
471 func (*IPContainerProxyAddDelReply) GetCrcString() string { return "e8d4e804" }
472 func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType {
473 return api.ReplyMessage
476 func (m *IPContainerProxyAddDelReply) Size() (size int) {
480 size += 4 // m.Retval
483 func (m *IPContainerProxyAddDelReply) Marshal(b []byte) ([]byte, error) {
485 b = make([]byte, m.Size())
487 buf := codec.NewBuffer(b)
488 buf.EncodeInt32(m.Retval)
489 return buf.Bytes(), nil
491 func (m *IPContainerProxyAddDelReply) Unmarshal(b []byte) error {
492 buf := codec.NewBuffer(b)
493 m.Retval = buf.DecodeInt32()
497 // IPContainerProxyDetails defines message 'ip_container_proxy_details'.
498 type IPContainerProxyDetails struct {
499 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
500 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
503 func (m *IPContainerProxyDetails) Reset() { *m = IPContainerProxyDetails{} }
504 func (*IPContainerProxyDetails) GetMessageName() string { return "ip_container_proxy_details" }
505 func (*IPContainerProxyDetails) GetCrcString() string { return "a8085523" }
506 func (*IPContainerProxyDetails) GetMessageType() api.MessageType {
507 return api.ReplyMessage
510 func (m *IPContainerProxyDetails) Size() (size int) {
514 size += 4 // m.SwIfIndex
515 size += 1 // m.Prefix.Address.Af
516 size += 1 * 16 // m.Prefix.Address.Un
517 size += 1 // m.Prefix.Len
520 func (m *IPContainerProxyDetails) Marshal(b []byte) ([]byte, error) {
522 b = make([]byte, m.Size())
524 buf := codec.NewBuffer(b)
525 buf.EncodeUint32(uint32(m.SwIfIndex))
526 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
527 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
528 buf.EncodeUint8(m.Prefix.Len)
529 return buf.Bytes(), nil
531 func (m *IPContainerProxyDetails) Unmarshal(b []byte) error {
532 buf := codec.NewBuffer(b)
533 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
534 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
535 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
536 m.Prefix.Len = buf.DecodeUint8()
540 // IPContainerProxyDump defines message 'ip_container_proxy_dump'.
541 type IPContainerProxyDump struct{}
543 func (m *IPContainerProxyDump) Reset() { *m = IPContainerProxyDump{} }
544 func (*IPContainerProxyDump) GetMessageName() string { return "ip_container_proxy_dump" }
545 func (*IPContainerProxyDump) GetCrcString() string { return "51077d14" }
546 func (*IPContainerProxyDump) GetMessageType() api.MessageType {
547 return api.RequestMessage
550 func (m *IPContainerProxyDump) Size() (size int) {
556 func (m *IPContainerProxyDump) Marshal(b []byte) ([]byte, error) {
558 b = make([]byte, m.Size())
560 buf := codec.NewBuffer(b)
561 return buf.Bytes(), nil
563 func (m *IPContainerProxyDump) Unmarshal(b []byte) error {
567 // IPDetails defines message 'ip_details'.
568 type IPDetails struct {
569 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
570 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
573 func (m *IPDetails) Reset() { *m = IPDetails{} }
574 func (*IPDetails) GetMessageName() string { return "ip_details" }
575 func (*IPDetails) GetCrcString() string { return "eb152d07" }
576 func (*IPDetails) GetMessageType() api.MessageType {
577 return api.ReplyMessage
580 func (m *IPDetails) Size() (size int) {
584 size += 4 // m.SwIfIndex
585 size += 1 // m.IsIPv6
588 func (m *IPDetails) Marshal(b []byte) ([]byte, error) {
590 b = make([]byte, m.Size())
592 buf := codec.NewBuffer(b)
593 buf.EncodeUint32(uint32(m.SwIfIndex))
594 buf.EncodeBool(m.IsIPv6)
595 return buf.Bytes(), nil
597 func (m *IPDetails) Unmarshal(b []byte) error {
598 buf := codec.NewBuffer(b)
599 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
600 m.IsIPv6 = buf.DecodeBool()
604 // IPDump defines message 'ip_dump'.
606 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
609 func (m *IPDump) Reset() { *m = IPDump{} }
610 func (*IPDump) GetMessageName() string { return "ip_dump" }
611 func (*IPDump) GetCrcString() string { return "98d231ca" }
612 func (*IPDump) GetMessageType() api.MessageType {
613 return api.RequestMessage
616 func (m *IPDump) Size() (size int) {
620 size += 1 // m.IsIPv6
623 func (m *IPDump) Marshal(b []byte) ([]byte, error) {
625 b = make([]byte, m.Size())
627 buf := codec.NewBuffer(b)
628 buf.EncodeBool(m.IsIPv6)
629 return buf.Bytes(), nil
631 func (m *IPDump) Unmarshal(b []byte) error {
632 buf := codec.NewBuffer(b)
633 m.IsIPv6 = buf.DecodeBool()
637 // IPMrouteAddDel defines message 'ip_mroute_add_del'.
638 type IPMrouteAddDel struct {
639 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
640 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
641 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
644 func (m *IPMrouteAddDel) Reset() { *m = IPMrouteAddDel{} }
645 func (*IPMrouteAddDel) GetMessageName() string { return "ip_mroute_add_del" }
646 func (*IPMrouteAddDel) GetCrcString() string { return "0dd7e790" }
647 func (*IPMrouteAddDel) GetMessageType() api.MessageType {
648 return api.RequestMessage
651 func (m *IPMrouteAddDel) Size() (size int) {
656 size += 1 // m.IsMultipath
657 size += 4 // m.Route.TableID
658 size += 4 // m.Route.EntryFlags
659 size += 4 // m.Route.RpfID
660 size += 1 // m.Route.Prefix.Af
661 size += 2 // m.Route.Prefix.GrpAddressLength
662 size += 1 * 16 // m.Route.Prefix.GrpAddress
663 size += 1 * 16 // m.Route.Prefix.SrcAddress
664 size += 1 // m.Route.NPaths
665 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
666 var s2 mfib_types.MfibPath
668 if j2 < len(m.Route.Paths) {
669 s2 = m.Route.Paths[j2]
671 size += 4 // s2.ItfFlags
672 size += 4 // s2.Path.SwIfIndex
673 size += 4 // s2.Path.TableID
674 size += 4 // s2.Path.RpfID
675 size += 1 // s2.Path.Weight
676 size += 1 // s2.Path.Preference
677 size += 4 // s2.Path.Type
678 size += 4 // s2.Path.Flags
679 size += 4 // s2.Path.Proto
680 size += 1 * 16 // s2.Path.Nh.Address
681 size += 4 // s2.Path.Nh.ViaLabel
682 size += 4 // s2.Path.Nh.ObjID
683 size += 4 // s2.Path.Nh.ClassifyTableIndex
684 size += 1 // s2.Path.NLabels
685 for j4 := 0; j4 < 16; j4++ {
686 size += 1 // s2.Path.LabelStack[j4].IsUniform
687 size += 4 // s2.Path.LabelStack[j4].Label
688 size += 1 // s2.Path.LabelStack[j4].TTL
689 size += 1 // s2.Path.LabelStack[j4].Exp
694 func (m *IPMrouteAddDel) Marshal(b []byte) ([]byte, error) {
696 b = make([]byte, m.Size())
698 buf := codec.NewBuffer(b)
699 buf.EncodeBool(m.IsAdd)
700 buf.EncodeBool(m.IsMultipath)
701 buf.EncodeUint32(m.Route.TableID)
702 buf.EncodeUint32(uint32(m.Route.EntryFlags))
703 buf.EncodeUint32(m.Route.RpfID)
704 buf.EncodeUint8(uint8(m.Route.Prefix.Af))
705 buf.EncodeUint16(m.Route.Prefix.GrpAddressLength)
706 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16)
707 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16)
708 buf.EncodeUint8(uint8(len(m.Route.Paths)))
709 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
710 var v1 mfib_types.MfibPath // Paths
711 if j1 < len(m.Route.Paths) {
712 v1 = m.Route.Paths[j1]
714 buf.EncodeUint32(uint32(v1.ItfFlags))
715 buf.EncodeUint32(v1.Path.SwIfIndex)
716 buf.EncodeUint32(v1.Path.TableID)
717 buf.EncodeUint32(v1.Path.RpfID)
718 buf.EncodeUint8(v1.Path.Weight)
719 buf.EncodeUint8(v1.Path.Preference)
720 buf.EncodeUint32(uint32(v1.Path.Type))
721 buf.EncodeUint32(uint32(v1.Path.Flags))
722 buf.EncodeUint32(uint32(v1.Path.Proto))
723 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16)
724 buf.EncodeUint32(v1.Path.Nh.ViaLabel)
725 buf.EncodeUint32(v1.Path.Nh.ObjID)
726 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex)
727 buf.EncodeUint8(v1.Path.NLabels)
728 for j3 := 0; j3 < 16; j3++ {
729 buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform)
730 buf.EncodeUint32(v1.Path.LabelStack[j3].Label)
731 buf.EncodeUint8(v1.Path.LabelStack[j3].TTL)
732 buf.EncodeUint8(v1.Path.LabelStack[j3].Exp)
735 return buf.Bytes(), nil
737 func (m *IPMrouteAddDel) Unmarshal(b []byte) error {
738 buf := codec.NewBuffer(b)
739 m.IsAdd = buf.DecodeBool()
740 m.IsMultipath = buf.DecodeBool()
741 m.Route.TableID = buf.DecodeUint32()
742 m.Route.EntryFlags = mfib_types.MfibEntryFlags(buf.DecodeUint32())
743 m.Route.RpfID = buf.DecodeUint32()
744 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
745 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
746 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
747 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
748 m.Route.NPaths = buf.DecodeUint8()
749 m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths)
750 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
751 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
752 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
753 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
754 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
755 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
756 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
757 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32())
758 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32())
759 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
760 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
761 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
762 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
763 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
764 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
765 for j3 := 0; j3 < 16; j3++ {
766 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
767 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
768 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
769 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
775 // IPMrouteAddDelReply defines message 'ip_mroute_add_del_reply'.
776 type IPMrouteAddDelReply struct {
777 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
778 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
781 func (m *IPMrouteAddDelReply) Reset() { *m = IPMrouteAddDelReply{} }
782 func (*IPMrouteAddDelReply) GetMessageName() string { return "ip_mroute_add_del_reply" }
783 func (*IPMrouteAddDelReply) GetCrcString() string { return "1992deab" }
784 func (*IPMrouteAddDelReply) GetMessageType() api.MessageType {
785 return api.ReplyMessage
788 func (m *IPMrouteAddDelReply) Size() (size int) {
792 size += 4 // m.Retval
793 size += 4 // m.StatsIndex
796 func (m *IPMrouteAddDelReply) Marshal(b []byte) ([]byte, error) {
798 b = make([]byte, m.Size())
800 buf := codec.NewBuffer(b)
801 buf.EncodeInt32(m.Retval)
802 buf.EncodeUint32(m.StatsIndex)
803 return buf.Bytes(), nil
805 func (m *IPMrouteAddDelReply) Unmarshal(b []byte) error {
806 buf := codec.NewBuffer(b)
807 m.Retval = buf.DecodeInt32()
808 m.StatsIndex = buf.DecodeUint32()
812 // IPMrouteDetails defines message 'ip_mroute_details'.
813 type IPMrouteDetails struct {
814 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
817 func (m *IPMrouteDetails) Reset() { *m = IPMrouteDetails{} }
818 func (*IPMrouteDetails) GetMessageName() string { return "ip_mroute_details" }
819 func (*IPMrouteDetails) GetCrcString() string { return "c5cb23fc" }
820 func (*IPMrouteDetails) GetMessageType() api.MessageType {
821 return api.ReplyMessage
824 func (m *IPMrouteDetails) Size() (size int) {
828 size += 4 // m.Route.TableID
829 size += 4 // m.Route.EntryFlags
830 size += 4 // m.Route.RpfID
831 size += 1 // m.Route.Prefix.Af
832 size += 2 // m.Route.Prefix.GrpAddressLength
833 size += 1 * 16 // m.Route.Prefix.GrpAddress
834 size += 1 * 16 // m.Route.Prefix.SrcAddress
835 size += 1 // m.Route.NPaths
836 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
837 var s2 mfib_types.MfibPath
839 if j2 < len(m.Route.Paths) {
840 s2 = m.Route.Paths[j2]
842 size += 4 // s2.ItfFlags
843 size += 4 // s2.Path.SwIfIndex
844 size += 4 // s2.Path.TableID
845 size += 4 // s2.Path.RpfID
846 size += 1 // s2.Path.Weight
847 size += 1 // s2.Path.Preference
848 size += 4 // s2.Path.Type
849 size += 4 // s2.Path.Flags
850 size += 4 // s2.Path.Proto
851 size += 1 * 16 // s2.Path.Nh.Address
852 size += 4 // s2.Path.Nh.ViaLabel
853 size += 4 // s2.Path.Nh.ObjID
854 size += 4 // s2.Path.Nh.ClassifyTableIndex
855 size += 1 // s2.Path.NLabels
856 for j4 := 0; j4 < 16; j4++ {
857 size += 1 // s2.Path.LabelStack[j4].IsUniform
858 size += 4 // s2.Path.LabelStack[j4].Label
859 size += 1 // s2.Path.LabelStack[j4].TTL
860 size += 1 // s2.Path.LabelStack[j4].Exp
865 func (m *IPMrouteDetails) Marshal(b []byte) ([]byte, error) {
867 b = make([]byte, m.Size())
869 buf := codec.NewBuffer(b)
870 buf.EncodeUint32(m.Route.TableID)
871 buf.EncodeUint32(uint32(m.Route.EntryFlags))
872 buf.EncodeUint32(m.Route.RpfID)
873 buf.EncodeUint8(uint8(m.Route.Prefix.Af))
874 buf.EncodeUint16(m.Route.Prefix.GrpAddressLength)
875 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16)
876 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16)
877 buf.EncodeUint8(uint8(len(m.Route.Paths)))
878 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
879 var v1 mfib_types.MfibPath // Paths
880 if j1 < len(m.Route.Paths) {
881 v1 = m.Route.Paths[j1]
883 buf.EncodeUint32(uint32(v1.ItfFlags))
884 buf.EncodeUint32(v1.Path.SwIfIndex)
885 buf.EncodeUint32(v1.Path.TableID)
886 buf.EncodeUint32(v1.Path.RpfID)
887 buf.EncodeUint8(v1.Path.Weight)
888 buf.EncodeUint8(v1.Path.Preference)
889 buf.EncodeUint32(uint32(v1.Path.Type))
890 buf.EncodeUint32(uint32(v1.Path.Flags))
891 buf.EncodeUint32(uint32(v1.Path.Proto))
892 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16)
893 buf.EncodeUint32(v1.Path.Nh.ViaLabel)
894 buf.EncodeUint32(v1.Path.Nh.ObjID)
895 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex)
896 buf.EncodeUint8(v1.Path.NLabels)
897 for j3 := 0; j3 < 16; j3++ {
898 buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform)
899 buf.EncodeUint32(v1.Path.LabelStack[j3].Label)
900 buf.EncodeUint8(v1.Path.LabelStack[j3].TTL)
901 buf.EncodeUint8(v1.Path.LabelStack[j3].Exp)
904 return buf.Bytes(), nil
906 func (m *IPMrouteDetails) Unmarshal(b []byte) error {
907 buf := codec.NewBuffer(b)
908 m.Route.TableID = buf.DecodeUint32()
909 m.Route.EntryFlags = mfib_types.MfibEntryFlags(buf.DecodeUint32())
910 m.Route.RpfID = buf.DecodeUint32()
911 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
912 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
913 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
914 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
915 m.Route.NPaths = buf.DecodeUint8()
916 m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths)
917 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
918 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32())
919 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
920 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
921 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
922 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
923 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
924 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32())
925 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32())
926 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
927 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
928 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
929 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
930 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
931 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
932 for j3 := 0; j3 < 16; j3++ {
933 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
934 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
935 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
936 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
942 // IPMrouteDump defines message 'ip_mroute_dump'.
943 type IPMrouteDump struct {
944 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
947 func (m *IPMrouteDump) Reset() { *m = IPMrouteDump{} }
948 func (*IPMrouteDump) GetMessageName() string { return "ip_mroute_dump" }
949 func (*IPMrouteDump) GetCrcString() string { return "b9d2e09e" }
950 func (*IPMrouteDump) GetMessageType() api.MessageType {
951 return api.RequestMessage
954 func (m *IPMrouteDump) Size() (size int) {
958 size += 4 // m.Table.TableID
959 size += 1 // m.Table.IsIP6
960 size += 64 // m.Table.Name
963 func (m *IPMrouteDump) Marshal(b []byte) ([]byte, error) {
965 b = make([]byte, m.Size())
967 buf := codec.NewBuffer(b)
968 buf.EncodeUint32(m.Table.TableID)
969 buf.EncodeBool(m.Table.IsIP6)
970 buf.EncodeString(m.Table.Name, 64)
971 return buf.Bytes(), nil
973 func (m *IPMrouteDump) Unmarshal(b []byte) error {
974 buf := codec.NewBuffer(b)
975 m.Table.TableID = buf.DecodeUint32()
976 m.Table.IsIP6 = buf.DecodeBool()
977 m.Table.Name = buf.DecodeString(64)
981 // IPMtableDetails defines message 'ip_mtable_details'.
982 type IPMtableDetails struct {
983 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
986 func (m *IPMtableDetails) Reset() { *m = IPMtableDetails{} }
987 func (*IPMtableDetails) GetMessageName() string { return "ip_mtable_details" }
988 func (*IPMtableDetails) GetCrcString() string { return "b9d2e09e" }
989 func (*IPMtableDetails) GetMessageType() api.MessageType {
990 return api.RequestMessage
993 func (m *IPMtableDetails) Size() (size int) {
997 size += 4 // m.Table.TableID
998 size += 1 // m.Table.IsIP6
999 size += 64 // m.Table.Name
1002 func (m *IPMtableDetails) Marshal(b []byte) ([]byte, error) {
1004 b = make([]byte, m.Size())
1006 buf := codec.NewBuffer(b)
1007 buf.EncodeUint32(m.Table.TableID)
1008 buf.EncodeBool(m.Table.IsIP6)
1009 buf.EncodeString(m.Table.Name, 64)
1010 return buf.Bytes(), nil
1012 func (m *IPMtableDetails) Unmarshal(b []byte) error {
1013 buf := codec.NewBuffer(b)
1014 m.Table.TableID = buf.DecodeUint32()
1015 m.Table.IsIP6 = buf.DecodeBool()
1016 m.Table.Name = buf.DecodeString(64)
1020 // IPMtableDump defines message 'ip_mtable_dump'.
1021 type IPMtableDump struct{}
1023 func (m *IPMtableDump) Reset() { *m = IPMtableDump{} }
1024 func (*IPMtableDump) GetMessageName() string { return "ip_mtable_dump" }
1025 func (*IPMtableDump) GetCrcString() string { return "51077d14" }
1026 func (*IPMtableDump) GetMessageType() api.MessageType {
1027 return api.RequestMessage
1030 func (m *IPMtableDump) Size() (size int) {
1036 func (m *IPMtableDump) Marshal(b []byte) ([]byte, error) {
1038 b = make([]byte, m.Size())
1040 buf := codec.NewBuffer(b)
1041 return buf.Bytes(), nil
1043 func (m *IPMtableDump) Unmarshal(b []byte) error {
1047 // IPPathMtuDetails defines message 'ip_path_mtu_details'.
1048 type IPPathMtuDetails struct {
1049 Pmtu IPPathMtu `binapi:"ip_path_mtu,name=pmtu" json:"pmtu,omitempty"`
1052 func (m *IPPathMtuDetails) Reset() { *m = IPPathMtuDetails{} }
1053 func (*IPPathMtuDetails) GetMessageName() string { return "ip_path_mtu_details" }
1054 func (*IPPathMtuDetails) GetCrcString() string { return "ac9539a7" }
1055 func (*IPPathMtuDetails) GetMessageType() api.MessageType {
1056 return api.ReplyMessage
1059 func (m *IPPathMtuDetails) Size() (size int) {
1063 size += 4 // m.Pmtu.ClientIndex
1064 size += 4 // m.Pmtu.Context
1065 size += 4 // m.Pmtu.TableID
1066 size += 1 // m.Pmtu.Nh.Af
1067 size += 1 * 16 // m.Pmtu.Nh.Un
1068 size += 2 // m.Pmtu.PathMtu
1071 func (m *IPPathMtuDetails) Marshal(b []byte) ([]byte, error) {
1073 b = make([]byte, m.Size())
1075 buf := codec.NewBuffer(b)
1076 buf.EncodeUint32(m.Pmtu.ClientIndex)
1077 buf.EncodeUint32(m.Pmtu.Context)
1078 buf.EncodeUint32(m.Pmtu.TableID)
1079 buf.EncodeUint8(uint8(m.Pmtu.Nh.Af))
1080 buf.EncodeBytes(m.Pmtu.Nh.Un.XXX_UnionData[:], 16)
1081 buf.EncodeUint16(m.Pmtu.PathMtu)
1082 return buf.Bytes(), nil
1084 func (m *IPPathMtuDetails) Unmarshal(b []byte) error {
1085 buf := codec.NewBuffer(b)
1086 m.Pmtu.ClientIndex = buf.DecodeUint32()
1087 m.Pmtu.Context = buf.DecodeUint32()
1088 m.Pmtu.TableID = buf.DecodeUint32()
1089 m.Pmtu.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1090 copy(m.Pmtu.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1091 m.Pmtu.PathMtu = buf.DecodeUint16()
1095 // IPPathMtuGet defines message 'ip_path_mtu_get'.
1096 type IPPathMtuGet struct {
1097 Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
1100 func (m *IPPathMtuGet) Reset() { *m = IPPathMtuGet{} }
1101 func (*IPPathMtuGet) GetMessageName() string { return "ip_path_mtu_get" }
1102 func (*IPPathMtuGet) GetCrcString() string { return "f75ba505" }
1103 func (*IPPathMtuGet) GetMessageType() api.MessageType {
1104 return api.RequestMessage
1107 func (m *IPPathMtuGet) Size() (size int) {
1111 size += 4 // m.Cursor
1114 func (m *IPPathMtuGet) Marshal(b []byte) ([]byte, error) {
1116 b = make([]byte, m.Size())
1118 buf := codec.NewBuffer(b)
1119 buf.EncodeUint32(m.Cursor)
1120 return buf.Bytes(), nil
1122 func (m *IPPathMtuGet) Unmarshal(b []byte) error {
1123 buf := codec.NewBuffer(b)
1124 m.Cursor = buf.DecodeUint32()
1128 // IPPathMtuGetReply defines message 'ip_path_mtu_get_reply'.
1129 type IPPathMtuGetReply struct {
1130 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1131 Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
1134 func (m *IPPathMtuGetReply) Reset() { *m = IPPathMtuGetReply{} }
1135 func (*IPPathMtuGetReply) GetMessageName() string { return "ip_path_mtu_get_reply" }
1136 func (*IPPathMtuGetReply) GetCrcString() string { return "53b48f5d" }
1137 func (*IPPathMtuGetReply) GetMessageType() api.MessageType {
1138 return api.ReplyMessage
1141 func (m *IPPathMtuGetReply) Size() (size int) {
1145 size += 4 // m.Retval
1146 size += 4 // m.Cursor
1149 func (m *IPPathMtuGetReply) Marshal(b []byte) ([]byte, error) {
1151 b = make([]byte, m.Size())
1153 buf := codec.NewBuffer(b)
1154 buf.EncodeInt32(m.Retval)
1155 buf.EncodeUint32(m.Cursor)
1156 return buf.Bytes(), nil
1158 func (m *IPPathMtuGetReply) Unmarshal(b []byte) error {
1159 buf := codec.NewBuffer(b)
1160 m.Retval = buf.DecodeInt32()
1161 m.Cursor = buf.DecodeUint32()
1165 // IPPathMtuReplaceBegin defines message 'ip_path_mtu_replace_begin'.
1166 type IPPathMtuReplaceBegin struct{}
1168 func (m *IPPathMtuReplaceBegin) Reset() { *m = IPPathMtuReplaceBegin{} }
1169 func (*IPPathMtuReplaceBegin) GetMessageName() string { return "ip_path_mtu_replace_begin" }
1170 func (*IPPathMtuReplaceBegin) GetCrcString() string { return "51077d14" }
1171 func (*IPPathMtuReplaceBegin) GetMessageType() api.MessageType {
1172 return api.RequestMessage
1175 func (m *IPPathMtuReplaceBegin) Size() (size int) {
1181 func (m *IPPathMtuReplaceBegin) Marshal(b []byte) ([]byte, error) {
1183 b = make([]byte, m.Size())
1185 buf := codec.NewBuffer(b)
1186 return buf.Bytes(), nil
1188 func (m *IPPathMtuReplaceBegin) Unmarshal(b []byte) error {
1192 // IPPathMtuReplaceBeginReply defines message 'ip_path_mtu_replace_begin_reply'.
1193 type IPPathMtuReplaceBeginReply struct {
1194 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1197 func (m *IPPathMtuReplaceBeginReply) Reset() { *m = IPPathMtuReplaceBeginReply{} }
1198 func (*IPPathMtuReplaceBeginReply) GetMessageName() string { return "ip_path_mtu_replace_begin_reply" }
1199 func (*IPPathMtuReplaceBeginReply) GetCrcString() string { return "e8d4e804" }
1200 func (*IPPathMtuReplaceBeginReply) GetMessageType() api.MessageType {
1201 return api.ReplyMessage
1204 func (m *IPPathMtuReplaceBeginReply) Size() (size int) {
1208 size += 4 // m.Retval
1211 func (m *IPPathMtuReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
1213 b = make([]byte, m.Size())
1215 buf := codec.NewBuffer(b)
1216 buf.EncodeInt32(m.Retval)
1217 return buf.Bytes(), nil
1219 func (m *IPPathMtuReplaceBeginReply) Unmarshal(b []byte) error {
1220 buf := codec.NewBuffer(b)
1221 m.Retval = buf.DecodeInt32()
1225 // IPPathMtuReplaceEnd defines message 'ip_path_mtu_replace_end'.
1226 type IPPathMtuReplaceEnd struct{}
1228 func (m *IPPathMtuReplaceEnd) Reset() { *m = IPPathMtuReplaceEnd{} }
1229 func (*IPPathMtuReplaceEnd) GetMessageName() string { return "ip_path_mtu_replace_end" }
1230 func (*IPPathMtuReplaceEnd) GetCrcString() string { return "51077d14" }
1231 func (*IPPathMtuReplaceEnd) GetMessageType() api.MessageType {
1232 return api.RequestMessage
1235 func (m *IPPathMtuReplaceEnd) Size() (size int) {
1241 func (m *IPPathMtuReplaceEnd) Marshal(b []byte) ([]byte, error) {
1243 b = make([]byte, m.Size())
1245 buf := codec.NewBuffer(b)
1246 return buf.Bytes(), nil
1248 func (m *IPPathMtuReplaceEnd) Unmarshal(b []byte) error {
1252 // IPPathMtuReplaceEndReply defines message 'ip_path_mtu_replace_end_reply'.
1253 type IPPathMtuReplaceEndReply struct {
1254 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1257 func (m *IPPathMtuReplaceEndReply) Reset() { *m = IPPathMtuReplaceEndReply{} }
1258 func (*IPPathMtuReplaceEndReply) GetMessageName() string { return "ip_path_mtu_replace_end_reply" }
1259 func (*IPPathMtuReplaceEndReply) GetCrcString() string { return "e8d4e804" }
1260 func (*IPPathMtuReplaceEndReply) GetMessageType() api.MessageType {
1261 return api.ReplyMessage
1264 func (m *IPPathMtuReplaceEndReply) Size() (size int) {
1268 size += 4 // m.Retval
1271 func (m *IPPathMtuReplaceEndReply) Marshal(b []byte) ([]byte, error) {
1273 b = make([]byte, m.Size())
1275 buf := codec.NewBuffer(b)
1276 buf.EncodeInt32(m.Retval)
1277 return buf.Bytes(), nil
1279 func (m *IPPathMtuReplaceEndReply) Unmarshal(b []byte) error {
1280 buf := codec.NewBuffer(b)
1281 m.Retval = buf.DecodeInt32()
1285 // IPPathMtuUpdate defines message 'ip_path_mtu_update'.
1286 type IPPathMtuUpdate struct {
1287 Pmtu IPPathMtu `binapi:"ip_path_mtu,name=pmtu" json:"pmtu,omitempty"`
1290 func (m *IPPathMtuUpdate) Reset() { *m = IPPathMtuUpdate{} }
1291 func (*IPPathMtuUpdate) GetMessageName() string { return "ip_path_mtu_update" }
1292 func (*IPPathMtuUpdate) GetCrcString() string { return "10bbe5cb" }
1293 func (*IPPathMtuUpdate) GetMessageType() api.MessageType {
1294 return api.RequestMessage
1297 func (m *IPPathMtuUpdate) Size() (size int) {
1301 size += 4 // m.Pmtu.ClientIndex
1302 size += 4 // m.Pmtu.Context
1303 size += 4 // m.Pmtu.TableID
1304 size += 1 // m.Pmtu.Nh.Af
1305 size += 1 * 16 // m.Pmtu.Nh.Un
1306 size += 2 // m.Pmtu.PathMtu
1309 func (m *IPPathMtuUpdate) Marshal(b []byte) ([]byte, error) {
1311 b = make([]byte, m.Size())
1313 buf := codec.NewBuffer(b)
1314 buf.EncodeUint32(m.Pmtu.ClientIndex)
1315 buf.EncodeUint32(m.Pmtu.Context)
1316 buf.EncodeUint32(m.Pmtu.TableID)
1317 buf.EncodeUint8(uint8(m.Pmtu.Nh.Af))
1318 buf.EncodeBytes(m.Pmtu.Nh.Un.XXX_UnionData[:], 16)
1319 buf.EncodeUint16(m.Pmtu.PathMtu)
1320 return buf.Bytes(), nil
1322 func (m *IPPathMtuUpdate) Unmarshal(b []byte) error {
1323 buf := codec.NewBuffer(b)
1324 m.Pmtu.ClientIndex = buf.DecodeUint32()
1325 m.Pmtu.Context = buf.DecodeUint32()
1326 m.Pmtu.TableID = buf.DecodeUint32()
1327 m.Pmtu.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1328 copy(m.Pmtu.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1329 m.Pmtu.PathMtu = buf.DecodeUint16()
1333 // IPPathMtuUpdateReply defines message 'ip_path_mtu_update_reply'.
1334 type IPPathMtuUpdateReply struct {
1335 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1338 func (m *IPPathMtuUpdateReply) Reset() { *m = IPPathMtuUpdateReply{} }
1339 func (*IPPathMtuUpdateReply) GetMessageName() string { return "ip_path_mtu_update_reply" }
1340 func (*IPPathMtuUpdateReply) GetCrcString() string { return "e8d4e804" }
1341 func (*IPPathMtuUpdateReply) GetMessageType() api.MessageType {
1342 return api.ReplyMessage
1345 func (m *IPPathMtuUpdateReply) Size() (size int) {
1349 size += 4 // m.Retval
1352 func (m *IPPathMtuUpdateReply) Marshal(b []byte) ([]byte, error) {
1354 b = make([]byte, m.Size())
1356 buf := codec.NewBuffer(b)
1357 buf.EncodeInt32(m.Retval)
1358 return buf.Bytes(), nil
1360 func (m *IPPathMtuUpdateReply) Unmarshal(b []byte) error {
1361 buf := codec.NewBuffer(b)
1362 m.Retval = buf.DecodeInt32()
1366 // IPPuntPolice defines message 'ip_punt_police'.
1367 type IPPuntPolice struct {
1368 PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"`
1369 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1370 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1373 func (m *IPPuntPolice) Reset() { *m = IPPuntPolice{} }
1374 func (*IPPuntPolice) GetMessageName() string { return "ip_punt_police" }
1375 func (*IPPuntPolice) GetCrcString() string { return "db867cea" }
1376 func (*IPPuntPolice) GetMessageType() api.MessageType {
1377 return api.RequestMessage
1380 func (m *IPPuntPolice) Size() (size int) {
1384 size += 4 // m.PolicerIndex
1385 size += 1 // m.IsAdd
1386 size += 1 // m.IsIP6
1389 func (m *IPPuntPolice) Marshal(b []byte) ([]byte, error) {
1391 b = make([]byte, m.Size())
1393 buf := codec.NewBuffer(b)
1394 buf.EncodeUint32(m.PolicerIndex)
1395 buf.EncodeBool(m.IsAdd)
1396 buf.EncodeBool(m.IsIP6)
1397 return buf.Bytes(), nil
1399 func (m *IPPuntPolice) Unmarshal(b []byte) error {
1400 buf := codec.NewBuffer(b)
1401 m.PolicerIndex = buf.DecodeUint32()
1402 m.IsAdd = buf.DecodeBool()
1403 m.IsIP6 = buf.DecodeBool()
1407 // IPPuntPoliceReply defines message 'ip_punt_police_reply'.
1408 type IPPuntPoliceReply struct {
1409 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1412 func (m *IPPuntPoliceReply) Reset() { *m = IPPuntPoliceReply{} }
1413 func (*IPPuntPoliceReply) GetMessageName() string { return "ip_punt_police_reply" }
1414 func (*IPPuntPoliceReply) GetCrcString() string { return "e8d4e804" }
1415 func (*IPPuntPoliceReply) GetMessageType() api.MessageType {
1416 return api.ReplyMessage
1419 func (m *IPPuntPoliceReply) Size() (size int) {
1423 size += 4 // m.Retval
1426 func (m *IPPuntPoliceReply) Marshal(b []byte) ([]byte, error) {
1428 b = make([]byte, m.Size())
1430 buf := codec.NewBuffer(b)
1431 buf.EncodeInt32(m.Retval)
1432 return buf.Bytes(), nil
1434 func (m *IPPuntPoliceReply) Unmarshal(b []byte) error {
1435 buf := codec.NewBuffer(b)
1436 m.Retval = buf.DecodeInt32()
1440 // IPPuntRedirect defines message 'ip_punt_redirect'.
1441 type IPPuntRedirect struct {
1442 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
1443 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1446 func (m *IPPuntRedirect) Reset() { *m = IPPuntRedirect{} }
1447 func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" }
1448 func (*IPPuntRedirect) GetCrcString() string { return "6580f635" }
1449 func (*IPPuntRedirect) GetMessageType() api.MessageType {
1450 return api.RequestMessage
1453 func (m *IPPuntRedirect) Size() (size int) {
1457 size += 4 // m.Punt.RxSwIfIndex
1458 size += 4 // m.Punt.TxSwIfIndex
1459 size += 1 // m.Punt.Nh.Af
1460 size += 1 * 16 // m.Punt.Nh.Un
1461 size += 1 // m.IsAdd
1464 func (m *IPPuntRedirect) Marshal(b []byte) ([]byte, error) {
1466 b = make([]byte, m.Size())
1468 buf := codec.NewBuffer(b)
1469 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1470 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
1471 buf.EncodeUint8(uint8(m.Punt.Nh.Af))
1472 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16)
1473 buf.EncodeBool(m.IsAdd)
1474 return buf.Bytes(), nil
1476 func (m *IPPuntRedirect) Unmarshal(b []byte) error {
1477 buf := codec.NewBuffer(b)
1478 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1479 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1480 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1481 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1482 m.IsAdd = buf.DecodeBool()
1486 // IPPuntRedirectDetails defines message 'ip_punt_redirect_details'.
1487 type IPPuntRedirectDetails struct {
1488 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
1491 func (m *IPPuntRedirectDetails) Reset() { *m = IPPuntRedirectDetails{} }
1492 func (*IPPuntRedirectDetails) GetMessageName() string { return "ip_punt_redirect_details" }
1493 func (*IPPuntRedirectDetails) GetCrcString() string { return "2cef63e7" }
1494 func (*IPPuntRedirectDetails) GetMessageType() api.MessageType {
1495 return api.ReplyMessage
1498 func (m *IPPuntRedirectDetails) Size() (size int) {
1502 size += 4 // m.Punt.RxSwIfIndex
1503 size += 4 // m.Punt.TxSwIfIndex
1504 size += 1 // m.Punt.Nh.Af
1505 size += 1 * 16 // m.Punt.Nh.Un
1508 func (m *IPPuntRedirectDetails) Marshal(b []byte) ([]byte, error) {
1510 b = make([]byte, m.Size())
1512 buf := codec.NewBuffer(b)
1513 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
1514 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
1515 buf.EncodeUint8(uint8(m.Punt.Nh.Af))
1516 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16)
1517 return buf.Bytes(), nil
1519 func (m *IPPuntRedirectDetails) Unmarshal(b []byte) error {
1520 buf := codec.NewBuffer(b)
1521 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1522 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1523 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
1524 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1528 // IPPuntRedirectDump defines message 'ip_punt_redirect_dump'.
1529 type IPPuntRedirectDump struct {
1530 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1531 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
1534 func (m *IPPuntRedirectDump) Reset() { *m = IPPuntRedirectDump{} }
1535 func (*IPPuntRedirectDump) GetMessageName() string { return "ip_punt_redirect_dump" }
1536 func (*IPPuntRedirectDump) GetCrcString() string { return "2d033de4" }
1537 func (*IPPuntRedirectDump) GetMessageType() api.MessageType {
1538 return api.RequestMessage
1541 func (m *IPPuntRedirectDump) Size() (size int) {
1545 size += 4 // m.SwIfIndex
1546 size += 1 // m.IsIPv6
1549 func (m *IPPuntRedirectDump) Marshal(b []byte) ([]byte, error) {
1551 b = make([]byte, m.Size())
1553 buf := codec.NewBuffer(b)
1554 buf.EncodeUint32(uint32(m.SwIfIndex))
1555 buf.EncodeBool(m.IsIPv6)
1556 return buf.Bytes(), nil
1558 func (m *IPPuntRedirectDump) Unmarshal(b []byte) error {
1559 buf := codec.NewBuffer(b)
1560 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1561 m.IsIPv6 = buf.DecodeBool()
1565 // IPPuntRedirectReply defines message 'ip_punt_redirect_reply'.
1566 type IPPuntRedirectReply struct {
1567 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1570 func (m *IPPuntRedirectReply) Reset() { *m = IPPuntRedirectReply{} }
1571 func (*IPPuntRedirectReply) GetMessageName() string { return "ip_punt_redirect_reply" }
1572 func (*IPPuntRedirectReply) GetCrcString() string { return "e8d4e804" }
1573 func (*IPPuntRedirectReply) GetMessageType() api.MessageType {
1574 return api.ReplyMessage
1577 func (m *IPPuntRedirectReply) Size() (size int) {
1581 size += 4 // m.Retval
1584 func (m *IPPuntRedirectReply) Marshal(b []byte) ([]byte, error) {
1586 b = make([]byte, m.Size())
1588 buf := codec.NewBuffer(b)
1589 buf.EncodeInt32(m.Retval)
1590 return buf.Bytes(), nil
1592 func (m *IPPuntRedirectReply) Unmarshal(b []byte) error {
1593 buf := codec.NewBuffer(b)
1594 m.Retval = buf.DecodeInt32()
1598 // IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'.
1599 type IPReassemblyEnableDisable struct {
1600 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1601 EnableIP4 bool `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"`
1602 EnableIP6 bool `binapi:"bool,name=enable_ip6" json:"enable_ip6,omitempty"`
1603 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1606 func (m *IPReassemblyEnableDisable) Reset() { *m = IPReassemblyEnableDisable{} }
1607 func (*IPReassemblyEnableDisable) GetMessageName() string { return "ip_reassembly_enable_disable" }
1608 func (*IPReassemblyEnableDisable) GetCrcString() string { return "eb77968d" }
1609 func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType {
1610 return api.RequestMessage
1613 func (m *IPReassemblyEnableDisable) Size() (size int) {
1617 size += 4 // m.SwIfIndex
1618 size += 1 // m.EnableIP4
1619 size += 1 // m.EnableIP6
1623 func (m *IPReassemblyEnableDisable) Marshal(b []byte) ([]byte, error) {
1625 b = make([]byte, m.Size())
1627 buf := codec.NewBuffer(b)
1628 buf.EncodeUint32(uint32(m.SwIfIndex))
1629 buf.EncodeBool(m.EnableIP4)
1630 buf.EncodeBool(m.EnableIP6)
1631 buf.EncodeUint32(uint32(m.Type))
1632 return buf.Bytes(), nil
1634 func (m *IPReassemblyEnableDisable) Unmarshal(b []byte) error {
1635 buf := codec.NewBuffer(b)
1636 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1637 m.EnableIP4 = buf.DecodeBool()
1638 m.EnableIP6 = buf.DecodeBool()
1639 m.Type = IPReassType(buf.DecodeUint32())
1643 // IPReassemblyEnableDisableReply defines message 'ip_reassembly_enable_disable_reply'.
1644 type IPReassemblyEnableDisableReply struct {
1645 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1648 func (m *IPReassemblyEnableDisableReply) Reset() { *m = IPReassemblyEnableDisableReply{} }
1649 func (*IPReassemblyEnableDisableReply) GetMessageName() string {
1650 return "ip_reassembly_enable_disable_reply"
1652 func (*IPReassemblyEnableDisableReply) GetCrcString() string { return "e8d4e804" }
1653 func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType {
1654 return api.ReplyMessage
1657 func (m *IPReassemblyEnableDisableReply) Size() (size int) {
1661 size += 4 // m.Retval
1664 func (m *IPReassemblyEnableDisableReply) Marshal(b []byte) ([]byte, error) {
1666 b = make([]byte, m.Size())
1668 buf := codec.NewBuffer(b)
1669 buf.EncodeInt32(m.Retval)
1670 return buf.Bytes(), nil
1672 func (m *IPReassemblyEnableDisableReply) Unmarshal(b []byte) error {
1673 buf := codec.NewBuffer(b)
1674 m.Retval = buf.DecodeInt32()
1678 // IPReassemblyGet defines message 'ip_reassembly_get'.
1679 type IPReassemblyGet struct {
1680 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1681 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1684 func (m *IPReassemblyGet) Reset() { *m = IPReassemblyGet{} }
1685 func (*IPReassemblyGet) GetMessageName() string { return "ip_reassembly_get" }
1686 func (*IPReassemblyGet) GetCrcString() string { return "ea13ff63" }
1687 func (*IPReassemblyGet) GetMessageType() api.MessageType {
1688 return api.RequestMessage
1691 func (m *IPReassemblyGet) Size() (size int) {
1695 size += 1 // m.IsIP6
1699 func (m *IPReassemblyGet) Marshal(b []byte) ([]byte, error) {
1701 b = make([]byte, m.Size())
1703 buf := codec.NewBuffer(b)
1704 buf.EncodeBool(m.IsIP6)
1705 buf.EncodeUint32(uint32(m.Type))
1706 return buf.Bytes(), nil
1708 func (m *IPReassemblyGet) Unmarshal(b []byte) error {
1709 buf := codec.NewBuffer(b)
1710 m.IsIP6 = buf.DecodeBool()
1711 m.Type = IPReassType(buf.DecodeUint32())
1715 // IPReassemblyGetReply defines message 'ip_reassembly_get_reply'.
1716 type IPReassemblyGetReply struct {
1717 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1718 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
1719 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
1720 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
1721 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
1722 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1725 func (m *IPReassemblyGetReply) Reset() { *m = IPReassemblyGetReply{} }
1726 func (*IPReassemblyGetReply) GetMessageName() string { return "ip_reassembly_get_reply" }
1727 func (*IPReassemblyGetReply) GetCrcString() string { return "d5eb8d34" }
1728 func (*IPReassemblyGetReply) GetMessageType() api.MessageType {
1729 return api.ReplyMessage
1732 func (m *IPReassemblyGetReply) Size() (size int) {
1736 size += 4 // m.Retval
1737 size += 4 // m.TimeoutMs
1738 size += 4 // m.MaxReassemblies
1739 size += 4 // m.MaxReassemblyLength
1740 size += 4 // m.ExpireWalkIntervalMs
1741 size += 1 // m.IsIP6
1744 func (m *IPReassemblyGetReply) Marshal(b []byte) ([]byte, error) {
1746 b = make([]byte, m.Size())
1748 buf := codec.NewBuffer(b)
1749 buf.EncodeInt32(m.Retval)
1750 buf.EncodeUint32(m.TimeoutMs)
1751 buf.EncodeUint32(m.MaxReassemblies)
1752 buf.EncodeUint32(m.MaxReassemblyLength)
1753 buf.EncodeUint32(m.ExpireWalkIntervalMs)
1754 buf.EncodeBool(m.IsIP6)
1755 return buf.Bytes(), nil
1757 func (m *IPReassemblyGetReply) Unmarshal(b []byte) error {
1758 buf := codec.NewBuffer(b)
1759 m.Retval = buf.DecodeInt32()
1760 m.TimeoutMs = buf.DecodeUint32()
1761 m.MaxReassemblies = buf.DecodeUint32()
1762 m.MaxReassemblyLength = buf.DecodeUint32()
1763 m.ExpireWalkIntervalMs = buf.DecodeUint32()
1764 m.IsIP6 = buf.DecodeBool()
1768 // IPReassemblySet defines message 'ip_reassembly_set'.
1769 type IPReassemblySet struct {
1770 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
1771 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
1772 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
1773 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
1774 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
1775 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
1778 func (m *IPReassemblySet) Reset() { *m = IPReassemblySet{} }
1779 func (*IPReassemblySet) GetMessageName() string { return "ip_reassembly_set" }
1780 func (*IPReassemblySet) GetCrcString() string { return "16467d25" }
1781 func (*IPReassemblySet) GetMessageType() api.MessageType {
1782 return api.RequestMessage
1785 func (m *IPReassemblySet) Size() (size int) {
1789 size += 4 // m.TimeoutMs
1790 size += 4 // m.MaxReassemblies
1791 size += 4 // m.MaxReassemblyLength
1792 size += 4 // m.ExpireWalkIntervalMs
1793 size += 1 // m.IsIP6
1797 func (m *IPReassemblySet) Marshal(b []byte) ([]byte, error) {
1799 b = make([]byte, m.Size())
1801 buf := codec.NewBuffer(b)
1802 buf.EncodeUint32(m.TimeoutMs)
1803 buf.EncodeUint32(m.MaxReassemblies)
1804 buf.EncodeUint32(m.MaxReassemblyLength)
1805 buf.EncodeUint32(m.ExpireWalkIntervalMs)
1806 buf.EncodeBool(m.IsIP6)
1807 buf.EncodeUint32(uint32(m.Type))
1808 return buf.Bytes(), nil
1810 func (m *IPReassemblySet) Unmarshal(b []byte) error {
1811 buf := codec.NewBuffer(b)
1812 m.TimeoutMs = buf.DecodeUint32()
1813 m.MaxReassemblies = buf.DecodeUint32()
1814 m.MaxReassemblyLength = buf.DecodeUint32()
1815 m.ExpireWalkIntervalMs = buf.DecodeUint32()
1816 m.IsIP6 = buf.DecodeBool()
1817 m.Type = IPReassType(buf.DecodeUint32())
1821 // IPReassemblySetReply defines message 'ip_reassembly_set_reply'.
1822 type IPReassemblySetReply struct {
1823 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1826 func (m *IPReassemblySetReply) Reset() { *m = IPReassemblySetReply{} }
1827 func (*IPReassemblySetReply) GetMessageName() string { return "ip_reassembly_set_reply" }
1828 func (*IPReassemblySetReply) GetCrcString() string { return "e8d4e804" }
1829 func (*IPReassemblySetReply) GetMessageType() api.MessageType {
1830 return api.ReplyMessage
1833 func (m *IPReassemblySetReply) Size() (size int) {
1837 size += 4 // m.Retval
1840 func (m *IPReassemblySetReply) Marshal(b []byte) ([]byte, error) {
1842 b = make([]byte, m.Size())
1844 buf := codec.NewBuffer(b)
1845 buf.EncodeInt32(m.Retval)
1846 return buf.Bytes(), nil
1848 func (m *IPReassemblySetReply) Unmarshal(b []byte) error {
1849 buf := codec.NewBuffer(b)
1850 m.Retval = buf.DecodeInt32()
1854 // IPRouteAddDel defines message 'ip_route_add_del'.
1855 type IPRouteAddDel struct {
1856 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
1857 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
1858 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
1861 func (m *IPRouteAddDel) Reset() { *m = IPRouteAddDel{} }
1862 func (*IPRouteAddDel) GetMessageName() string { return "ip_route_add_del" }
1863 func (*IPRouteAddDel) GetCrcString() string { return "b8ecfe0d" }
1864 func (*IPRouteAddDel) GetMessageType() api.MessageType {
1865 return api.RequestMessage
1868 func (m *IPRouteAddDel) Size() (size int) {
1872 size += 1 // m.IsAdd
1873 size += 1 // m.IsMultipath
1874 size += 4 // m.Route.TableID
1875 size += 4 // m.Route.StatsIndex
1876 size += 1 // m.Route.Prefix.Address.Af
1877 size += 1 * 16 // m.Route.Prefix.Address.Un
1878 size += 1 // m.Route.Prefix.Len
1879 size += 1 // m.Route.NPaths
1880 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
1881 var s2 fib_types.FibPath
1883 if j2 < len(m.Route.Paths) {
1884 s2 = m.Route.Paths[j2]
1886 size += 4 // s2.SwIfIndex
1887 size += 4 // s2.TableID
1888 size += 4 // s2.RpfID
1889 size += 1 // s2.Weight
1890 size += 1 // s2.Preference
1891 size += 4 // s2.Type
1892 size += 4 // s2.Flags
1893 size += 4 // s2.Proto
1894 size += 1 * 16 // s2.Nh.Address
1895 size += 4 // s2.Nh.ViaLabel
1896 size += 4 // s2.Nh.ObjID
1897 size += 4 // s2.Nh.ClassifyTableIndex
1898 size += 1 // s2.NLabels
1899 for j3 := 0; j3 < 16; j3++ {
1900 size += 1 // s2.LabelStack[j3].IsUniform
1901 size += 4 // s2.LabelStack[j3].Label
1902 size += 1 // s2.LabelStack[j3].TTL
1903 size += 1 // s2.LabelStack[j3].Exp
1908 func (m *IPRouteAddDel) Marshal(b []byte) ([]byte, error) {
1910 b = make([]byte, m.Size())
1912 buf := codec.NewBuffer(b)
1913 buf.EncodeBool(m.IsAdd)
1914 buf.EncodeBool(m.IsMultipath)
1915 buf.EncodeUint32(m.Route.TableID)
1916 buf.EncodeUint32(m.Route.StatsIndex)
1917 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
1918 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
1919 buf.EncodeUint8(m.Route.Prefix.Len)
1920 buf.EncodeUint8(uint8(len(m.Route.Paths)))
1921 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1922 var v1 fib_types.FibPath // Paths
1923 if j1 < len(m.Route.Paths) {
1924 v1 = m.Route.Paths[j1]
1926 buf.EncodeUint32(v1.SwIfIndex)
1927 buf.EncodeUint32(v1.TableID)
1928 buf.EncodeUint32(v1.RpfID)
1929 buf.EncodeUint8(v1.Weight)
1930 buf.EncodeUint8(v1.Preference)
1931 buf.EncodeUint32(uint32(v1.Type))
1932 buf.EncodeUint32(uint32(v1.Flags))
1933 buf.EncodeUint32(uint32(v1.Proto))
1934 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
1935 buf.EncodeUint32(v1.Nh.ViaLabel)
1936 buf.EncodeUint32(v1.Nh.ObjID)
1937 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
1938 buf.EncodeUint8(v1.NLabels)
1939 for j2 := 0; j2 < 16; j2++ {
1940 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
1941 buf.EncodeUint32(v1.LabelStack[j2].Label)
1942 buf.EncodeUint8(v1.LabelStack[j2].TTL)
1943 buf.EncodeUint8(v1.LabelStack[j2].Exp)
1946 return buf.Bytes(), nil
1948 func (m *IPRouteAddDel) Unmarshal(b []byte) error {
1949 buf := codec.NewBuffer(b)
1950 m.IsAdd = buf.DecodeBool()
1951 m.IsMultipath = buf.DecodeBool()
1952 m.Route.TableID = buf.DecodeUint32()
1953 m.Route.StatsIndex = buf.DecodeUint32()
1954 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
1955 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1956 m.Route.Prefix.Len = buf.DecodeUint8()
1957 m.Route.NPaths = buf.DecodeUint8()
1958 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
1959 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
1960 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
1961 m.Route.Paths[j1].TableID = buf.DecodeUint32()
1962 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
1963 m.Route.Paths[j1].Weight = buf.DecodeUint8()
1964 m.Route.Paths[j1].Preference = buf.DecodeUint8()
1965 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
1966 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
1967 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
1968 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
1969 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
1970 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
1971 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
1972 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
1973 for j2 := 0; j2 < 16; j2++ {
1974 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
1975 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
1976 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
1977 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
1983 // IPRouteAddDelReply defines message 'ip_route_add_del_reply'.
1984 type IPRouteAddDelReply struct {
1985 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1986 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
1989 func (m *IPRouteAddDelReply) Reset() { *m = IPRouteAddDelReply{} }
1990 func (*IPRouteAddDelReply) GetMessageName() string { return "ip_route_add_del_reply" }
1991 func (*IPRouteAddDelReply) GetCrcString() string { return "1992deab" }
1992 func (*IPRouteAddDelReply) GetMessageType() api.MessageType {
1993 return api.ReplyMessage
1996 func (m *IPRouteAddDelReply) Size() (size int) {
2000 size += 4 // m.Retval
2001 size += 4 // m.StatsIndex
2004 func (m *IPRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
2006 b = make([]byte, m.Size())
2008 buf := codec.NewBuffer(b)
2009 buf.EncodeInt32(m.Retval)
2010 buf.EncodeUint32(m.StatsIndex)
2011 return buf.Bytes(), nil
2013 func (m *IPRouteAddDelReply) Unmarshal(b []byte) error {
2014 buf := codec.NewBuffer(b)
2015 m.Retval = buf.DecodeInt32()
2016 m.StatsIndex = buf.DecodeUint32()
2020 // IPRouteAddDelV2 defines message 'ip_route_add_del_v2'.
2021 // InProgress: the message form may change in the future versions
2022 type IPRouteAddDelV2 struct {
2023 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2024 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
2025 Route IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"`
2028 func (m *IPRouteAddDelV2) Reset() { *m = IPRouteAddDelV2{} }
2029 func (*IPRouteAddDelV2) GetMessageName() string { return "ip_route_add_del_v2" }
2030 func (*IPRouteAddDelV2) GetCrcString() string { return "521ef330" }
2031 func (*IPRouteAddDelV2) GetMessageType() api.MessageType {
2032 return api.RequestMessage
2035 func (m *IPRouteAddDelV2) Size() (size int) {
2039 size += 1 // m.IsAdd
2040 size += 1 // m.IsMultipath
2041 size += 4 // m.Route.TableID
2042 size += 4 // m.Route.StatsIndex
2043 size += 1 // m.Route.Prefix.Address.Af
2044 size += 1 * 16 // m.Route.Prefix.Address.Un
2045 size += 1 // m.Route.Prefix.Len
2046 size += 1 // m.Route.NPaths
2047 size += 1 // m.Route.Src
2048 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2049 var s2 fib_types.FibPath
2051 if j2 < len(m.Route.Paths) {
2052 s2 = m.Route.Paths[j2]
2054 size += 4 // s2.SwIfIndex
2055 size += 4 // s2.TableID
2056 size += 4 // s2.RpfID
2057 size += 1 // s2.Weight
2058 size += 1 // s2.Preference
2059 size += 4 // s2.Type
2060 size += 4 // s2.Flags
2061 size += 4 // s2.Proto
2062 size += 1 * 16 // s2.Nh.Address
2063 size += 4 // s2.Nh.ViaLabel
2064 size += 4 // s2.Nh.ObjID
2065 size += 4 // s2.Nh.ClassifyTableIndex
2066 size += 1 // s2.NLabels
2067 for j3 := 0; j3 < 16; j3++ {
2068 size += 1 // s2.LabelStack[j3].IsUniform
2069 size += 4 // s2.LabelStack[j3].Label
2070 size += 1 // s2.LabelStack[j3].TTL
2071 size += 1 // s2.LabelStack[j3].Exp
2076 func (m *IPRouteAddDelV2) Marshal(b []byte) ([]byte, error) {
2078 b = make([]byte, m.Size())
2080 buf := codec.NewBuffer(b)
2081 buf.EncodeBool(m.IsAdd)
2082 buf.EncodeBool(m.IsMultipath)
2083 buf.EncodeUint32(m.Route.TableID)
2084 buf.EncodeUint32(m.Route.StatsIndex)
2085 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2086 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2087 buf.EncodeUint8(m.Route.Prefix.Len)
2088 buf.EncodeUint8(uint8(len(m.Route.Paths)))
2089 buf.EncodeUint8(m.Route.Src)
2090 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2091 var v1 fib_types.FibPath // Paths
2092 if j1 < len(m.Route.Paths) {
2093 v1 = m.Route.Paths[j1]
2095 buf.EncodeUint32(v1.SwIfIndex)
2096 buf.EncodeUint32(v1.TableID)
2097 buf.EncodeUint32(v1.RpfID)
2098 buf.EncodeUint8(v1.Weight)
2099 buf.EncodeUint8(v1.Preference)
2100 buf.EncodeUint32(uint32(v1.Type))
2101 buf.EncodeUint32(uint32(v1.Flags))
2102 buf.EncodeUint32(uint32(v1.Proto))
2103 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2104 buf.EncodeUint32(v1.Nh.ViaLabel)
2105 buf.EncodeUint32(v1.Nh.ObjID)
2106 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2107 buf.EncodeUint8(v1.NLabels)
2108 for j2 := 0; j2 < 16; j2++ {
2109 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2110 buf.EncodeUint32(v1.LabelStack[j2].Label)
2111 buf.EncodeUint8(v1.LabelStack[j2].TTL)
2112 buf.EncodeUint8(v1.LabelStack[j2].Exp)
2115 return buf.Bytes(), nil
2117 func (m *IPRouteAddDelV2) Unmarshal(b []byte) error {
2118 buf := codec.NewBuffer(b)
2119 m.IsAdd = buf.DecodeBool()
2120 m.IsMultipath = buf.DecodeBool()
2121 m.Route.TableID = buf.DecodeUint32()
2122 m.Route.StatsIndex = buf.DecodeUint32()
2123 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2124 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2125 m.Route.Prefix.Len = buf.DecodeUint8()
2126 m.Route.NPaths = buf.DecodeUint8()
2127 m.Route.Src = buf.DecodeUint8()
2128 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2129 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2130 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2131 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2132 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2133 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2134 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2135 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2136 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2137 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2138 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2139 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2140 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2141 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2142 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2143 for j2 := 0; j2 < 16; j2++ {
2144 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2145 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2146 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2147 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2153 // IPRouteAddDelV2Reply defines message 'ip_route_add_del_v2_reply'.
2154 // InProgress: the message form may change in the future versions
2155 type IPRouteAddDelV2Reply struct {
2156 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2157 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
2160 func (m *IPRouteAddDelV2Reply) Reset() { *m = IPRouteAddDelV2Reply{} }
2161 func (*IPRouteAddDelV2Reply) GetMessageName() string { return "ip_route_add_del_v2_reply" }
2162 func (*IPRouteAddDelV2Reply) GetCrcString() string { return "1992deab" }
2163 func (*IPRouteAddDelV2Reply) GetMessageType() api.MessageType {
2164 return api.ReplyMessage
2167 func (m *IPRouteAddDelV2Reply) Size() (size int) {
2171 size += 4 // m.Retval
2172 size += 4 // m.StatsIndex
2175 func (m *IPRouteAddDelV2Reply) Marshal(b []byte) ([]byte, error) {
2177 b = make([]byte, m.Size())
2179 buf := codec.NewBuffer(b)
2180 buf.EncodeInt32(m.Retval)
2181 buf.EncodeUint32(m.StatsIndex)
2182 return buf.Bytes(), nil
2184 func (m *IPRouteAddDelV2Reply) Unmarshal(b []byte) error {
2185 buf := codec.NewBuffer(b)
2186 m.Retval = buf.DecodeInt32()
2187 m.StatsIndex = buf.DecodeUint32()
2191 // IPRouteDetails defines message 'ip_route_details'.
2192 type IPRouteDetails struct {
2193 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
2196 func (m *IPRouteDetails) Reset() { *m = IPRouteDetails{} }
2197 func (*IPRouteDetails) GetMessageName() string { return "ip_route_details" }
2198 func (*IPRouteDetails) GetCrcString() string { return "bda8f315" }
2199 func (*IPRouteDetails) GetMessageType() api.MessageType {
2200 return api.ReplyMessage
2203 func (m *IPRouteDetails) Size() (size int) {
2207 size += 4 // m.Route.TableID
2208 size += 4 // m.Route.StatsIndex
2209 size += 1 // m.Route.Prefix.Address.Af
2210 size += 1 * 16 // m.Route.Prefix.Address.Un
2211 size += 1 // m.Route.Prefix.Len
2212 size += 1 // m.Route.NPaths
2213 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2214 var s2 fib_types.FibPath
2216 if j2 < len(m.Route.Paths) {
2217 s2 = m.Route.Paths[j2]
2219 size += 4 // s2.SwIfIndex
2220 size += 4 // s2.TableID
2221 size += 4 // s2.RpfID
2222 size += 1 // s2.Weight
2223 size += 1 // s2.Preference
2224 size += 4 // s2.Type
2225 size += 4 // s2.Flags
2226 size += 4 // s2.Proto
2227 size += 1 * 16 // s2.Nh.Address
2228 size += 4 // s2.Nh.ViaLabel
2229 size += 4 // s2.Nh.ObjID
2230 size += 4 // s2.Nh.ClassifyTableIndex
2231 size += 1 // s2.NLabels
2232 for j3 := 0; j3 < 16; j3++ {
2233 size += 1 // s2.LabelStack[j3].IsUniform
2234 size += 4 // s2.LabelStack[j3].Label
2235 size += 1 // s2.LabelStack[j3].TTL
2236 size += 1 // s2.LabelStack[j3].Exp
2241 func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) {
2243 b = make([]byte, m.Size())
2245 buf := codec.NewBuffer(b)
2246 buf.EncodeUint32(m.Route.TableID)
2247 buf.EncodeUint32(m.Route.StatsIndex)
2248 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2249 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2250 buf.EncodeUint8(m.Route.Prefix.Len)
2251 buf.EncodeUint8(uint8(len(m.Route.Paths)))
2252 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2253 var v1 fib_types.FibPath // Paths
2254 if j1 < len(m.Route.Paths) {
2255 v1 = m.Route.Paths[j1]
2257 buf.EncodeUint32(v1.SwIfIndex)
2258 buf.EncodeUint32(v1.TableID)
2259 buf.EncodeUint32(v1.RpfID)
2260 buf.EncodeUint8(v1.Weight)
2261 buf.EncodeUint8(v1.Preference)
2262 buf.EncodeUint32(uint32(v1.Type))
2263 buf.EncodeUint32(uint32(v1.Flags))
2264 buf.EncodeUint32(uint32(v1.Proto))
2265 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2266 buf.EncodeUint32(v1.Nh.ViaLabel)
2267 buf.EncodeUint32(v1.Nh.ObjID)
2268 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2269 buf.EncodeUint8(v1.NLabels)
2270 for j2 := 0; j2 < 16; j2++ {
2271 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2272 buf.EncodeUint32(v1.LabelStack[j2].Label)
2273 buf.EncodeUint8(v1.LabelStack[j2].TTL)
2274 buf.EncodeUint8(v1.LabelStack[j2].Exp)
2277 return buf.Bytes(), nil
2279 func (m *IPRouteDetails) Unmarshal(b []byte) error {
2280 buf := codec.NewBuffer(b)
2281 m.Route.TableID = buf.DecodeUint32()
2282 m.Route.StatsIndex = buf.DecodeUint32()
2283 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2284 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2285 m.Route.Prefix.Len = buf.DecodeUint8()
2286 m.Route.NPaths = buf.DecodeUint8()
2287 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2288 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2289 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2290 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2291 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2292 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2293 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2294 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2295 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2296 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2297 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2298 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2299 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2300 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2301 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2302 for j2 := 0; j2 < 16; j2++ {
2303 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2304 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2305 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2306 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2312 // IPRouteDump defines message 'ip_route_dump'.
2313 type IPRouteDump struct {
2314 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2317 func (m *IPRouteDump) Reset() { *m = IPRouteDump{} }
2318 func (*IPRouteDump) GetMessageName() string { return "ip_route_dump" }
2319 func (*IPRouteDump) GetCrcString() string { return "b9d2e09e" }
2320 func (*IPRouteDump) GetMessageType() api.MessageType {
2321 return api.RequestMessage
2324 func (m *IPRouteDump) Size() (size int) {
2328 size += 4 // m.Table.TableID
2329 size += 1 // m.Table.IsIP6
2330 size += 64 // m.Table.Name
2333 func (m *IPRouteDump) Marshal(b []byte) ([]byte, error) {
2335 b = make([]byte, m.Size())
2337 buf := codec.NewBuffer(b)
2338 buf.EncodeUint32(m.Table.TableID)
2339 buf.EncodeBool(m.Table.IsIP6)
2340 buf.EncodeString(m.Table.Name, 64)
2341 return buf.Bytes(), nil
2343 func (m *IPRouteDump) Unmarshal(b []byte) error {
2344 buf := codec.NewBuffer(b)
2345 m.Table.TableID = buf.DecodeUint32()
2346 m.Table.IsIP6 = buf.DecodeBool()
2347 m.Table.Name = buf.DecodeString(64)
2351 // IPRouteLookup defines message 'ip_route_lookup'.
2352 type IPRouteLookup struct {
2353 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
2354 Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"`
2355 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
2358 func (m *IPRouteLookup) Reset() { *m = IPRouteLookup{} }
2359 func (*IPRouteLookup) GetMessageName() string { return "ip_route_lookup" }
2360 func (*IPRouteLookup) GetCrcString() string { return "710d6471" }
2361 func (*IPRouteLookup) GetMessageType() api.MessageType {
2362 return api.RequestMessage
2365 func (m *IPRouteLookup) Size() (size int) {
2369 size += 4 // m.TableID
2370 size += 1 // m.Exact
2371 size += 1 // m.Prefix.Address.Af
2372 size += 1 * 16 // m.Prefix.Address.Un
2373 size += 1 // m.Prefix.Len
2376 func (m *IPRouteLookup) Marshal(b []byte) ([]byte, error) {
2378 b = make([]byte, m.Size())
2380 buf := codec.NewBuffer(b)
2381 buf.EncodeUint32(m.TableID)
2382 buf.EncodeUint8(m.Exact)
2383 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
2384 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
2385 buf.EncodeUint8(m.Prefix.Len)
2386 return buf.Bytes(), nil
2388 func (m *IPRouteLookup) Unmarshal(b []byte) error {
2389 buf := codec.NewBuffer(b)
2390 m.TableID = buf.DecodeUint32()
2391 m.Exact = buf.DecodeUint8()
2392 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2393 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2394 m.Prefix.Len = buf.DecodeUint8()
2398 // IPRouteLookupReply defines message 'ip_route_lookup_reply'.
2399 type IPRouteLookupReply struct {
2400 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2401 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
2404 func (m *IPRouteLookupReply) Reset() { *m = IPRouteLookupReply{} }
2405 func (*IPRouteLookupReply) GetMessageName() string { return "ip_route_lookup_reply" }
2406 func (*IPRouteLookupReply) GetCrcString() string { return "5d8febcb" }
2407 func (*IPRouteLookupReply) GetMessageType() api.MessageType {
2408 return api.ReplyMessage
2411 func (m *IPRouteLookupReply) Size() (size int) {
2415 size += 4 // m.Retval
2416 size += 4 // m.Route.TableID
2417 size += 4 // m.Route.StatsIndex
2418 size += 1 // m.Route.Prefix.Address.Af
2419 size += 1 * 16 // m.Route.Prefix.Address.Un
2420 size += 1 // m.Route.Prefix.Len
2421 size += 1 // m.Route.NPaths
2422 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2423 var s2 fib_types.FibPath
2425 if j2 < len(m.Route.Paths) {
2426 s2 = m.Route.Paths[j2]
2428 size += 4 // s2.SwIfIndex
2429 size += 4 // s2.TableID
2430 size += 4 // s2.RpfID
2431 size += 1 // s2.Weight
2432 size += 1 // s2.Preference
2433 size += 4 // s2.Type
2434 size += 4 // s2.Flags
2435 size += 4 // s2.Proto
2436 size += 1 * 16 // s2.Nh.Address
2437 size += 4 // s2.Nh.ViaLabel
2438 size += 4 // s2.Nh.ObjID
2439 size += 4 // s2.Nh.ClassifyTableIndex
2440 size += 1 // s2.NLabels
2441 for j3 := 0; j3 < 16; j3++ {
2442 size += 1 // s2.LabelStack[j3].IsUniform
2443 size += 4 // s2.LabelStack[j3].Label
2444 size += 1 // s2.LabelStack[j3].TTL
2445 size += 1 // s2.LabelStack[j3].Exp
2450 func (m *IPRouteLookupReply) Marshal(b []byte) ([]byte, error) {
2452 b = make([]byte, m.Size())
2454 buf := codec.NewBuffer(b)
2455 buf.EncodeInt32(m.Retval)
2456 buf.EncodeUint32(m.Route.TableID)
2457 buf.EncodeUint32(m.Route.StatsIndex)
2458 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2459 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2460 buf.EncodeUint8(m.Route.Prefix.Len)
2461 buf.EncodeUint8(uint8(len(m.Route.Paths)))
2462 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2463 var v1 fib_types.FibPath // Paths
2464 if j1 < len(m.Route.Paths) {
2465 v1 = m.Route.Paths[j1]
2467 buf.EncodeUint32(v1.SwIfIndex)
2468 buf.EncodeUint32(v1.TableID)
2469 buf.EncodeUint32(v1.RpfID)
2470 buf.EncodeUint8(v1.Weight)
2471 buf.EncodeUint8(v1.Preference)
2472 buf.EncodeUint32(uint32(v1.Type))
2473 buf.EncodeUint32(uint32(v1.Flags))
2474 buf.EncodeUint32(uint32(v1.Proto))
2475 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2476 buf.EncodeUint32(v1.Nh.ViaLabel)
2477 buf.EncodeUint32(v1.Nh.ObjID)
2478 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2479 buf.EncodeUint8(v1.NLabels)
2480 for j2 := 0; j2 < 16; j2++ {
2481 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2482 buf.EncodeUint32(v1.LabelStack[j2].Label)
2483 buf.EncodeUint8(v1.LabelStack[j2].TTL)
2484 buf.EncodeUint8(v1.LabelStack[j2].Exp)
2487 return buf.Bytes(), nil
2489 func (m *IPRouteLookupReply) Unmarshal(b []byte) error {
2490 buf := codec.NewBuffer(b)
2491 m.Retval = buf.DecodeInt32()
2492 m.Route.TableID = buf.DecodeUint32()
2493 m.Route.StatsIndex = buf.DecodeUint32()
2494 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2495 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2496 m.Route.Prefix.Len = buf.DecodeUint8()
2497 m.Route.NPaths = buf.DecodeUint8()
2498 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2499 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2500 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2501 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2502 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2503 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2504 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2505 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2506 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2507 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2508 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2509 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2510 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2511 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2512 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2513 for j2 := 0; j2 < 16; j2++ {
2514 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2515 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2516 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2517 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2523 // IPRouteLookupV2 defines message 'ip_route_lookup_v2'.
2524 // InProgress: the message form may change in the future versions
2525 type IPRouteLookupV2 struct {
2526 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
2527 Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"`
2528 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
2531 func (m *IPRouteLookupV2) Reset() { *m = IPRouteLookupV2{} }
2532 func (*IPRouteLookupV2) GetMessageName() string { return "ip_route_lookup_v2" }
2533 func (*IPRouteLookupV2) GetCrcString() string { return "710d6471" }
2534 func (*IPRouteLookupV2) GetMessageType() api.MessageType {
2535 return api.RequestMessage
2538 func (m *IPRouteLookupV2) Size() (size int) {
2542 size += 4 // m.TableID
2543 size += 1 // m.Exact
2544 size += 1 // m.Prefix.Address.Af
2545 size += 1 * 16 // m.Prefix.Address.Un
2546 size += 1 // m.Prefix.Len
2549 func (m *IPRouteLookupV2) Marshal(b []byte) ([]byte, error) {
2551 b = make([]byte, m.Size())
2553 buf := codec.NewBuffer(b)
2554 buf.EncodeUint32(m.TableID)
2555 buf.EncodeUint8(m.Exact)
2556 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
2557 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
2558 buf.EncodeUint8(m.Prefix.Len)
2559 return buf.Bytes(), nil
2561 func (m *IPRouteLookupV2) Unmarshal(b []byte) error {
2562 buf := codec.NewBuffer(b)
2563 m.TableID = buf.DecodeUint32()
2564 m.Exact = buf.DecodeUint8()
2565 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2566 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2567 m.Prefix.Len = buf.DecodeUint8()
2571 // IPRouteLookupV2Reply defines message 'ip_route_lookup_v2_reply'.
2572 // InProgress: the message form may change in the future versions
2573 type IPRouteLookupV2Reply struct {
2574 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2575 Route IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"`
2578 func (m *IPRouteLookupV2Reply) Reset() { *m = IPRouteLookupV2Reply{} }
2579 func (*IPRouteLookupV2Reply) GetMessageName() string { return "ip_route_lookup_v2_reply" }
2580 func (*IPRouteLookupV2Reply) GetCrcString() string { return "84cc9e03" }
2581 func (*IPRouteLookupV2Reply) GetMessageType() api.MessageType {
2582 return api.ReplyMessage
2585 func (m *IPRouteLookupV2Reply) Size() (size int) {
2589 size += 4 // m.Retval
2590 size += 4 // m.Route.TableID
2591 size += 4 // m.Route.StatsIndex
2592 size += 1 // m.Route.Prefix.Address.Af
2593 size += 1 * 16 // m.Route.Prefix.Address.Un
2594 size += 1 // m.Route.Prefix.Len
2595 size += 1 // m.Route.NPaths
2596 size += 1 // m.Route.Src
2597 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2598 var s2 fib_types.FibPath
2600 if j2 < len(m.Route.Paths) {
2601 s2 = m.Route.Paths[j2]
2603 size += 4 // s2.SwIfIndex
2604 size += 4 // s2.TableID
2605 size += 4 // s2.RpfID
2606 size += 1 // s2.Weight
2607 size += 1 // s2.Preference
2608 size += 4 // s2.Type
2609 size += 4 // s2.Flags
2610 size += 4 // s2.Proto
2611 size += 1 * 16 // s2.Nh.Address
2612 size += 4 // s2.Nh.ViaLabel
2613 size += 4 // s2.Nh.ObjID
2614 size += 4 // s2.Nh.ClassifyTableIndex
2615 size += 1 // s2.NLabels
2616 for j3 := 0; j3 < 16; j3++ {
2617 size += 1 // s2.LabelStack[j3].IsUniform
2618 size += 4 // s2.LabelStack[j3].Label
2619 size += 1 // s2.LabelStack[j3].TTL
2620 size += 1 // s2.LabelStack[j3].Exp
2625 func (m *IPRouteLookupV2Reply) Marshal(b []byte) ([]byte, error) {
2627 b = make([]byte, m.Size())
2629 buf := codec.NewBuffer(b)
2630 buf.EncodeInt32(m.Retval)
2631 buf.EncodeUint32(m.Route.TableID)
2632 buf.EncodeUint32(m.Route.StatsIndex)
2633 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2634 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2635 buf.EncodeUint8(m.Route.Prefix.Len)
2636 buf.EncodeUint8(uint8(len(m.Route.Paths)))
2637 buf.EncodeUint8(m.Route.Src)
2638 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2639 var v1 fib_types.FibPath // Paths
2640 if j1 < len(m.Route.Paths) {
2641 v1 = m.Route.Paths[j1]
2643 buf.EncodeUint32(v1.SwIfIndex)
2644 buf.EncodeUint32(v1.TableID)
2645 buf.EncodeUint32(v1.RpfID)
2646 buf.EncodeUint8(v1.Weight)
2647 buf.EncodeUint8(v1.Preference)
2648 buf.EncodeUint32(uint32(v1.Type))
2649 buf.EncodeUint32(uint32(v1.Flags))
2650 buf.EncodeUint32(uint32(v1.Proto))
2651 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2652 buf.EncodeUint32(v1.Nh.ViaLabel)
2653 buf.EncodeUint32(v1.Nh.ObjID)
2654 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2655 buf.EncodeUint8(v1.NLabels)
2656 for j2 := 0; j2 < 16; j2++ {
2657 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2658 buf.EncodeUint32(v1.LabelStack[j2].Label)
2659 buf.EncodeUint8(v1.LabelStack[j2].TTL)
2660 buf.EncodeUint8(v1.LabelStack[j2].Exp)
2663 return buf.Bytes(), nil
2665 func (m *IPRouteLookupV2Reply) Unmarshal(b []byte) error {
2666 buf := codec.NewBuffer(b)
2667 m.Retval = buf.DecodeInt32()
2668 m.Route.TableID = buf.DecodeUint32()
2669 m.Route.StatsIndex = buf.DecodeUint32()
2670 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2671 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2672 m.Route.Prefix.Len = buf.DecodeUint8()
2673 m.Route.NPaths = buf.DecodeUint8()
2674 m.Route.Src = buf.DecodeUint8()
2675 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2676 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2677 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2678 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2679 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2680 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2681 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2682 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2683 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2684 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2685 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2686 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2687 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2688 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2689 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2690 for j2 := 0; j2 < 16; j2++ {
2691 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2692 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2693 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2694 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2700 // IPRouteV2Details defines message 'ip_route_v2_details'.
2701 // InProgress: the message form may change in the future versions
2702 type IPRouteV2Details struct {
2703 Route IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"`
2706 func (m *IPRouteV2Details) Reset() { *m = IPRouteV2Details{} }
2707 func (*IPRouteV2Details) GetMessageName() string { return "ip_route_v2_details" }
2708 func (*IPRouteV2Details) GetCrcString() string { return "b09aa6c0" }
2709 func (*IPRouteV2Details) GetMessageType() api.MessageType {
2710 return api.ReplyMessage
2713 func (m *IPRouteV2Details) Size() (size int) {
2717 size += 4 // m.Route.TableID
2718 size += 4 // m.Route.StatsIndex
2719 size += 1 // m.Route.Prefix.Address.Af
2720 size += 1 * 16 // m.Route.Prefix.Address.Un
2721 size += 1 // m.Route.Prefix.Len
2722 size += 1 // m.Route.NPaths
2723 size += 1 // m.Route.Src
2724 for j2 := 0; j2 < len(m.Route.Paths); j2++ {
2725 var s2 fib_types.FibPath
2727 if j2 < len(m.Route.Paths) {
2728 s2 = m.Route.Paths[j2]
2730 size += 4 // s2.SwIfIndex
2731 size += 4 // s2.TableID
2732 size += 4 // s2.RpfID
2733 size += 1 // s2.Weight
2734 size += 1 // s2.Preference
2735 size += 4 // s2.Type
2736 size += 4 // s2.Flags
2737 size += 4 // s2.Proto
2738 size += 1 * 16 // s2.Nh.Address
2739 size += 4 // s2.Nh.ViaLabel
2740 size += 4 // s2.Nh.ObjID
2741 size += 4 // s2.Nh.ClassifyTableIndex
2742 size += 1 // s2.NLabels
2743 for j3 := 0; j3 < 16; j3++ {
2744 size += 1 // s2.LabelStack[j3].IsUniform
2745 size += 4 // s2.LabelStack[j3].Label
2746 size += 1 // s2.LabelStack[j3].TTL
2747 size += 1 // s2.LabelStack[j3].Exp
2752 func (m *IPRouteV2Details) Marshal(b []byte) ([]byte, error) {
2754 b = make([]byte, m.Size())
2756 buf := codec.NewBuffer(b)
2757 buf.EncodeUint32(m.Route.TableID)
2758 buf.EncodeUint32(m.Route.StatsIndex)
2759 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af))
2760 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
2761 buf.EncodeUint8(m.Route.Prefix.Len)
2762 buf.EncodeUint8(uint8(len(m.Route.Paths)))
2763 buf.EncodeUint8(m.Route.Src)
2764 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2765 var v1 fib_types.FibPath // Paths
2766 if j1 < len(m.Route.Paths) {
2767 v1 = m.Route.Paths[j1]
2769 buf.EncodeUint32(v1.SwIfIndex)
2770 buf.EncodeUint32(v1.TableID)
2771 buf.EncodeUint32(v1.RpfID)
2772 buf.EncodeUint8(v1.Weight)
2773 buf.EncodeUint8(v1.Preference)
2774 buf.EncodeUint32(uint32(v1.Type))
2775 buf.EncodeUint32(uint32(v1.Flags))
2776 buf.EncodeUint32(uint32(v1.Proto))
2777 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
2778 buf.EncodeUint32(v1.Nh.ViaLabel)
2779 buf.EncodeUint32(v1.Nh.ObjID)
2780 buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
2781 buf.EncodeUint8(v1.NLabels)
2782 for j2 := 0; j2 < 16; j2++ {
2783 buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
2784 buf.EncodeUint32(v1.LabelStack[j2].Label)
2785 buf.EncodeUint8(v1.LabelStack[j2].TTL)
2786 buf.EncodeUint8(v1.LabelStack[j2].Exp)
2789 return buf.Bytes(), nil
2791 func (m *IPRouteV2Details) Unmarshal(b []byte) error {
2792 buf := codec.NewBuffer(b)
2793 m.Route.TableID = buf.DecodeUint32()
2794 m.Route.StatsIndex = buf.DecodeUint32()
2795 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2796 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2797 m.Route.Prefix.Len = buf.DecodeUint8()
2798 m.Route.NPaths = buf.DecodeUint8()
2799 m.Route.Src = buf.DecodeUint8()
2800 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths)
2801 for j1 := 0; j1 < len(m.Route.Paths); j1++ {
2802 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
2803 m.Route.Paths[j1].TableID = buf.DecodeUint32()
2804 m.Route.Paths[j1].RpfID = buf.DecodeUint32()
2805 m.Route.Paths[j1].Weight = buf.DecodeUint8()
2806 m.Route.Paths[j1].Preference = buf.DecodeUint8()
2807 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
2808 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
2809 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
2810 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
2811 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
2812 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
2813 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
2814 m.Route.Paths[j1].NLabels = buf.DecodeUint8()
2815 for j2 := 0; j2 < 16; j2++ {
2816 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
2817 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
2818 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
2819 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
2825 // IPRouteV2Dump defines message 'ip_route_v2_dump'.
2826 // InProgress: the message form may change in the future versions
2827 type IPRouteV2Dump struct {
2828 Src uint8 `binapi:"u8,name=src" json:"src,omitempty"`
2829 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
2832 func (m *IPRouteV2Dump) Reset() { *m = IPRouteV2Dump{} }
2833 func (*IPRouteV2Dump) GetMessageName() string { return "ip_route_v2_dump" }
2834 func (*IPRouteV2Dump) GetCrcString() string { return "d16f72e6" }
2835 func (*IPRouteV2Dump) GetMessageType() api.MessageType {
2836 return api.RequestMessage
2839 func (m *IPRouteV2Dump) Size() (size int) {
2844 size += 4 // m.Table.TableID
2845 size += 1 // m.Table.IsIP6
2846 size += 64 // m.Table.Name
2849 func (m *IPRouteV2Dump) Marshal(b []byte) ([]byte, error) {
2851 b = make([]byte, m.Size())
2853 buf := codec.NewBuffer(b)
2854 buf.EncodeUint8(m.Src)
2855 buf.EncodeUint32(m.Table.TableID)
2856 buf.EncodeBool(m.Table.IsIP6)
2857 buf.EncodeString(m.Table.Name, 64)
2858 return buf.Bytes(), nil
2860 func (m *IPRouteV2Dump) Unmarshal(b []byte) error {
2861 buf := codec.NewBuffer(b)
2862 m.Src = buf.DecodeUint8()
2863 m.Table.TableID = buf.DecodeUint32()
2864 m.Table.IsIP6 = buf.DecodeBool()
2865 m.Table.Name = buf.DecodeString(64)
2869 // IPSourceAndPortRangeCheckAddDel defines message 'ip_source_and_port_range_check_add_del'.
2870 type IPSourceAndPortRangeCheckAddDel struct {
2871 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2872 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
2873 NumberOfRanges uint8 `binapi:"u8,name=number_of_ranges" json:"number_of_ranges,omitempty"`
2874 LowPorts []uint16 `binapi:"u16[32],name=low_ports" json:"low_ports,omitempty"`
2875 HighPorts []uint16 `binapi:"u16[32],name=high_ports" json:"high_ports,omitempty"`
2876 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
2879 func (m *IPSourceAndPortRangeCheckAddDel) Reset() { *m = IPSourceAndPortRangeCheckAddDel{} }
2880 func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string {
2881 return "ip_source_and_port_range_check_add_del"
2883 func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "92a067e3" }
2884 func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType {
2885 return api.RequestMessage
2888 func (m *IPSourceAndPortRangeCheckAddDel) Size() (size int) {
2892 size += 1 // m.IsAdd
2893 size += 1 // m.Prefix.Address.Af
2894 size += 1 * 16 // m.Prefix.Address.Un
2895 size += 1 // m.Prefix.Len
2896 size += 1 // m.NumberOfRanges
2897 size += 2 * 32 // m.LowPorts
2898 size += 2 * 32 // m.HighPorts
2899 size += 4 // m.VrfID
2902 func (m *IPSourceAndPortRangeCheckAddDel) Marshal(b []byte) ([]byte, error) {
2904 b = make([]byte, m.Size())
2906 buf := codec.NewBuffer(b)
2907 buf.EncodeBool(m.IsAdd)
2908 buf.EncodeUint8(uint8(m.Prefix.Address.Af))
2909 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
2910 buf.EncodeUint8(m.Prefix.Len)
2911 buf.EncodeUint8(m.NumberOfRanges)
2912 for i := 0; i < 32; i++ {
2914 if i < len(m.LowPorts) {
2915 x = uint16(m.LowPorts[i])
2919 for i := 0; i < 32; i++ {
2921 if i < len(m.HighPorts) {
2922 x = uint16(m.HighPorts[i])
2926 buf.EncodeUint32(m.VrfID)
2927 return buf.Bytes(), nil
2929 func (m *IPSourceAndPortRangeCheckAddDel) Unmarshal(b []byte) error {
2930 buf := codec.NewBuffer(b)
2931 m.IsAdd = buf.DecodeBool()
2932 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
2933 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2934 m.Prefix.Len = buf.DecodeUint8()
2935 m.NumberOfRanges = buf.DecodeUint8()
2936 m.LowPorts = make([]uint16, 32)
2937 for i := 0; i < len(m.LowPorts); i++ {
2938 m.LowPorts[i] = buf.DecodeUint16()
2940 m.HighPorts = make([]uint16, 32)
2941 for i := 0; i < len(m.HighPorts); i++ {
2942 m.HighPorts[i] = buf.DecodeUint16()
2944 m.VrfID = buf.DecodeUint32()
2948 // IPSourceAndPortRangeCheckAddDelReply defines message 'ip_source_and_port_range_check_add_del_reply'.
2949 type IPSourceAndPortRangeCheckAddDelReply struct {
2950 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2953 func (m *IPSourceAndPortRangeCheckAddDelReply) Reset() { *m = IPSourceAndPortRangeCheckAddDelReply{} }
2954 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string {
2955 return "ip_source_and_port_range_check_add_del_reply"
2957 func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { return "e8d4e804" }
2958 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType {
2959 return api.ReplyMessage
2962 func (m *IPSourceAndPortRangeCheckAddDelReply) Size() (size int) {
2966 size += 4 // m.Retval
2969 func (m *IPSourceAndPortRangeCheckAddDelReply) Marshal(b []byte) ([]byte, error) {
2971 b = make([]byte, m.Size())
2973 buf := codec.NewBuffer(b)
2974 buf.EncodeInt32(m.Retval)
2975 return buf.Bytes(), nil
2977 func (m *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(b []byte) error {
2978 buf := codec.NewBuffer(b)
2979 m.Retval = buf.DecodeInt32()
2983 // IPSourceAndPortRangeCheckInterfaceAddDel defines message 'ip_source_and_port_range_check_interface_add_del'.
2984 type IPSourceAndPortRangeCheckInterfaceAddDel struct {
2985 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
2986 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2987 TCPInVrfID uint32 `binapi:"u32,name=tcp_in_vrf_id" json:"tcp_in_vrf_id,omitempty"`
2988 TCPOutVrfID uint32 `binapi:"u32,name=tcp_out_vrf_id" json:"tcp_out_vrf_id,omitempty"`
2989 UDPInVrfID uint32 `binapi:"u32,name=udp_in_vrf_id" json:"udp_in_vrf_id,omitempty"`
2990 UDPOutVrfID uint32 `binapi:"u32,name=udp_out_vrf_id" json:"udp_out_vrf_id,omitempty"`
2993 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Reset() {
2994 *m = IPSourceAndPortRangeCheckInterfaceAddDel{}
2996 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string {
2997 return "ip_source_and_port_range_check_interface_add_del"
2999 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { return "e1ba8987" }
3000 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType {
3001 return api.RequestMessage
3004 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() (size int) {
3008 size += 1 // m.IsAdd
3009 size += 4 // m.SwIfIndex
3010 size += 4 // m.TCPInVrfID
3011 size += 4 // m.TCPOutVrfID
3012 size += 4 // m.UDPInVrfID
3013 size += 4 // m.UDPOutVrfID
3016 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
3018 b = make([]byte, m.Size())
3020 buf := codec.NewBuffer(b)
3021 buf.EncodeBool(m.IsAdd)
3022 buf.EncodeUint32(uint32(m.SwIfIndex))
3023 buf.EncodeUint32(m.TCPInVrfID)
3024 buf.EncodeUint32(m.TCPOutVrfID)
3025 buf.EncodeUint32(m.UDPInVrfID)
3026 buf.EncodeUint32(m.UDPOutVrfID)
3027 return buf.Bytes(), nil
3029 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Unmarshal(b []byte) error {
3030 buf := codec.NewBuffer(b)
3031 m.IsAdd = buf.DecodeBool()
3032 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3033 m.TCPInVrfID = buf.DecodeUint32()
3034 m.TCPOutVrfID = buf.DecodeUint32()
3035 m.UDPInVrfID = buf.DecodeUint32()
3036 m.UDPOutVrfID = buf.DecodeUint32()
3040 // IPSourceAndPortRangeCheckInterfaceAddDelReply defines message 'ip_source_and_port_range_check_interface_add_del_reply'.
3041 type IPSourceAndPortRangeCheckInterfaceAddDelReply struct {
3042 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3045 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Reset() {
3046 *m = IPSourceAndPortRangeCheckInterfaceAddDelReply{}
3048 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string {
3049 return "ip_source_and_port_range_check_interface_add_del_reply"
3051 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
3052 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType {
3053 return api.ReplyMessage
3056 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Size() (size int) {
3060 size += 4 // m.Retval
3063 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) {
3065 b = make([]byte, m.Size())
3067 buf := codec.NewBuffer(b)
3068 buf.EncodeInt32(m.Retval)
3069 return buf.Bytes(), nil
3071 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(b []byte) error {
3072 buf := codec.NewBuffer(b)
3073 m.Retval = buf.DecodeInt32()
3077 // IPTableAddDel defines message 'ip_table_add_del'.
3078 type IPTableAddDel struct {
3079 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
3080 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3083 func (m *IPTableAddDel) Reset() { *m = IPTableAddDel{} }
3084 func (*IPTableAddDel) GetMessageName() string { return "ip_table_add_del" }
3085 func (*IPTableAddDel) GetCrcString() string { return "0ffdaec0" }
3086 func (*IPTableAddDel) GetMessageType() api.MessageType {
3087 return api.RequestMessage
3090 func (m *IPTableAddDel) Size() (size int) {
3094 size += 1 // m.IsAdd
3095 size += 4 // m.Table.TableID
3096 size += 1 // m.Table.IsIP6
3097 size += 64 // m.Table.Name
3100 func (m *IPTableAddDel) Marshal(b []byte) ([]byte, error) {
3102 b = make([]byte, m.Size())
3104 buf := codec.NewBuffer(b)
3105 buf.EncodeBool(m.IsAdd)
3106 buf.EncodeUint32(m.Table.TableID)
3107 buf.EncodeBool(m.Table.IsIP6)
3108 buf.EncodeString(m.Table.Name, 64)
3109 return buf.Bytes(), nil
3111 func (m *IPTableAddDel) Unmarshal(b []byte) error {
3112 buf := codec.NewBuffer(b)
3113 m.IsAdd = buf.DecodeBool()
3114 m.Table.TableID = buf.DecodeUint32()
3115 m.Table.IsIP6 = buf.DecodeBool()
3116 m.Table.Name = buf.DecodeString(64)
3120 // IPTableAddDelReply defines message 'ip_table_add_del_reply'.
3121 type IPTableAddDelReply struct {
3122 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3125 func (m *IPTableAddDelReply) Reset() { *m = IPTableAddDelReply{} }
3126 func (*IPTableAddDelReply) GetMessageName() string { return "ip_table_add_del_reply" }
3127 func (*IPTableAddDelReply) GetCrcString() string { return "e8d4e804" }
3128 func (*IPTableAddDelReply) GetMessageType() api.MessageType {
3129 return api.ReplyMessage
3132 func (m *IPTableAddDelReply) Size() (size int) {
3136 size += 4 // m.Retval
3139 func (m *IPTableAddDelReply) Marshal(b []byte) ([]byte, error) {
3141 b = make([]byte, m.Size())
3143 buf := codec.NewBuffer(b)
3144 buf.EncodeInt32(m.Retval)
3145 return buf.Bytes(), nil
3147 func (m *IPTableAddDelReply) Unmarshal(b []byte) error {
3148 buf := codec.NewBuffer(b)
3149 m.Retval = buf.DecodeInt32()
3153 // IPTableDetails defines message 'ip_table_details'.
3154 type IPTableDetails struct {
3155 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3158 func (m *IPTableDetails) Reset() { *m = IPTableDetails{} }
3159 func (*IPTableDetails) GetMessageName() string { return "ip_table_details" }
3160 func (*IPTableDetails) GetCrcString() string { return "c79fca0f" }
3161 func (*IPTableDetails) GetMessageType() api.MessageType {
3162 return api.ReplyMessage
3165 func (m *IPTableDetails) Size() (size int) {
3169 size += 4 // m.Table.TableID
3170 size += 1 // m.Table.IsIP6
3171 size += 64 // m.Table.Name
3174 func (m *IPTableDetails) Marshal(b []byte) ([]byte, error) {
3176 b = make([]byte, m.Size())
3178 buf := codec.NewBuffer(b)
3179 buf.EncodeUint32(m.Table.TableID)
3180 buf.EncodeBool(m.Table.IsIP6)
3181 buf.EncodeString(m.Table.Name, 64)
3182 return buf.Bytes(), nil
3184 func (m *IPTableDetails) Unmarshal(b []byte) error {
3185 buf := codec.NewBuffer(b)
3186 m.Table.TableID = buf.DecodeUint32()
3187 m.Table.IsIP6 = buf.DecodeBool()
3188 m.Table.Name = buf.DecodeString(64)
3192 // IPTableDump defines message 'ip_table_dump'.
3193 type IPTableDump struct{}
3195 func (m *IPTableDump) Reset() { *m = IPTableDump{} }
3196 func (*IPTableDump) GetMessageName() string { return "ip_table_dump" }
3197 func (*IPTableDump) GetCrcString() string { return "51077d14" }
3198 func (*IPTableDump) GetMessageType() api.MessageType {
3199 return api.RequestMessage
3202 func (m *IPTableDump) Size() (size int) {
3208 func (m *IPTableDump) Marshal(b []byte) ([]byte, error) {
3210 b = make([]byte, m.Size())
3212 buf := codec.NewBuffer(b)
3213 return buf.Bytes(), nil
3215 func (m *IPTableDump) Unmarshal(b []byte) error {
3219 // IPTableFlush defines message 'ip_table_flush'.
3220 type IPTableFlush struct {
3221 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3224 func (m *IPTableFlush) Reset() { *m = IPTableFlush{} }
3225 func (*IPTableFlush) GetMessageName() string { return "ip_table_flush" }
3226 func (*IPTableFlush) GetCrcString() string { return "b9d2e09e" }
3227 func (*IPTableFlush) GetMessageType() api.MessageType {
3228 return api.RequestMessage
3231 func (m *IPTableFlush) Size() (size int) {
3235 size += 4 // m.Table.TableID
3236 size += 1 // m.Table.IsIP6
3237 size += 64 // m.Table.Name
3240 func (m *IPTableFlush) Marshal(b []byte) ([]byte, error) {
3242 b = make([]byte, m.Size())
3244 buf := codec.NewBuffer(b)
3245 buf.EncodeUint32(m.Table.TableID)
3246 buf.EncodeBool(m.Table.IsIP6)
3247 buf.EncodeString(m.Table.Name, 64)
3248 return buf.Bytes(), nil
3250 func (m *IPTableFlush) Unmarshal(b []byte) error {
3251 buf := codec.NewBuffer(b)
3252 m.Table.TableID = buf.DecodeUint32()
3253 m.Table.IsIP6 = buf.DecodeBool()
3254 m.Table.Name = buf.DecodeString(64)
3258 // IPTableFlushReply defines message 'ip_table_flush_reply'.
3259 type IPTableFlushReply struct {
3260 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3263 func (m *IPTableFlushReply) Reset() { *m = IPTableFlushReply{} }
3264 func (*IPTableFlushReply) GetMessageName() string { return "ip_table_flush_reply" }
3265 func (*IPTableFlushReply) GetCrcString() string { return "e8d4e804" }
3266 func (*IPTableFlushReply) GetMessageType() api.MessageType {
3267 return api.ReplyMessage
3270 func (m *IPTableFlushReply) Size() (size int) {
3274 size += 4 // m.Retval
3277 func (m *IPTableFlushReply) Marshal(b []byte) ([]byte, error) {
3279 b = make([]byte, m.Size())
3281 buf := codec.NewBuffer(b)
3282 buf.EncodeInt32(m.Retval)
3283 return buf.Bytes(), nil
3285 func (m *IPTableFlushReply) Unmarshal(b []byte) error {
3286 buf := codec.NewBuffer(b)
3287 m.Retval = buf.DecodeInt32()
3291 // IPTableReplaceBegin defines message 'ip_table_replace_begin'.
3292 type IPTableReplaceBegin struct {
3293 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3296 func (m *IPTableReplaceBegin) Reset() { *m = IPTableReplaceBegin{} }
3297 func (*IPTableReplaceBegin) GetMessageName() string { return "ip_table_replace_begin" }
3298 func (*IPTableReplaceBegin) GetCrcString() string { return "b9d2e09e" }
3299 func (*IPTableReplaceBegin) GetMessageType() api.MessageType {
3300 return api.RequestMessage
3303 func (m *IPTableReplaceBegin) Size() (size int) {
3307 size += 4 // m.Table.TableID
3308 size += 1 // m.Table.IsIP6
3309 size += 64 // m.Table.Name
3312 func (m *IPTableReplaceBegin) Marshal(b []byte) ([]byte, error) {
3314 b = make([]byte, m.Size())
3316 buf := codec.NewBuffer(b)
3317 buf.EncodeUint32(m.Table.TableID)
3318 buf.EncodeBool(m.Table.IsIP6)
3319 buf.EncodeString(m.Table.Name, 64)
3320 return buf.Bytes(), nil
3322 func (m *IPTableReplaceBegin) Unmarshal(b []byte) error {
3323 buf := codec.NewBuffer(b)
3324 m.Table.TableID = buf.DecodeUint32()
3325 m.Table.IsIP6 = buf.DecodeBool()
3326 m.Table.Name = buf.DecodeString(64)
3330 // IPTableReplaceBeginReply defines message 'ip_table_replace_begin_reply'.
3331 type IPTableReplaceBeginReply struct {
3332 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3335 func (m *IPTableReplaceBeginReply) Reset() { *m = IPTableReplaceBeginReply{} }
3336 func (*IPTableReplaceBeginReply) GetMessageName() string { return "ip_table_replace_begin_reply" }
3337 func (*IPTableReplaceBeginReply) GetCrcString() string { return "e8d4e804" }
3338 func (*IPTableReplaceBeginReply) GetMessageType() api.MessageType {
3339 return api.ReplyMessage
3342 func (m *IPTableReplaceBeginReply) Size() (size int) {
3346 size += 4 // m.Retval
3349 func (m *IPTableReplaceBeginReply) Marshal(b []byte) ([]byte, error) {
3351 b = make([]byte, m.Size())
3353 buf := codec.NewBuffer(b)
3354 buf.EncodeInt32(m.Retval)
3355 return buf.Bytes(), nil
3357 func (m *IPTableReplaceBeginReply) Unmarshal(b []byte) error {
3358 buf := codec.NewBuffer(b)
3359 m.Retval = buf.DecodeInt32()
3363 // IPTableReplaceEnd defines message 'ip_table_replace_end'.
3364 type IPTableReplaceEnd struct {
3365 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
3368 func (m *IPTableReplaceEnd) Reset() { *m = IPTableReplaceEnd{} }
3369 func (*IPTableReplaceEnd) GetMessageName() string { return "ip_table_replace_end" }
3370 func (*IPTableReplaceEnd) GetCrcString() string { return "b9d2e09e" }
3371 func (*IPTableReplaceEnd) GetMessageType() api.MessageType {
3372 return api.RequestMessage
3375 func (m *IPTableReplaceEnd) Size() (size int) {
3379 size += 4 // m.Table.TableID
3380 size += 1 // m.Table.IsIP6
3381 size += 64 // m.Table.Name
3384 func (m *IPTableReplaceEnd) Marshal(b []byte) ([]byte, error) {
3386 b = make([]byte, m.Size())
3388 buf := codec.NewBuffer(b)
3389 buf.EncodeUint32(m.Table.TableID)
3390 buf.EncodeBool(m.Table.IsIP6)
3391 buf.EncodeString(m.Table.Name, 64)
3392 return buf.Bytes(), nil
3394 func (m *IPTableReplaceEnd) Unmarshal(b []byte) error {
3395 buf := codec.NewBuffer(b)
3396 m.Table.TableID = buf.DecodeUint32()
3397 m.Table.IsIP6 = buf.DecodeBool()
3398 m.Table.Name = buf.DecodeString(64)
3402 // IPTableReplaceEndReply defines message 'ip_table_replace_end_reply'.
3403 type IPTableReplaceEndReply struct {
3404 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3407 func (m *IPTableReplaceEndReply) Reset() { *m = IPTableReplaceEndReply{} }
3408 func (*IPTableReplaceEndReply) GetMessageName() string { return "ip_table_replace_end_reply" }
3409 func (*IPTableReplaceEndReply) GetCrcString() string { return "e8d4e804" }
3410 func (*IPTableReplaceEndReply) GetMessageType() api.MessageType {
3411 return api.ReplyMessage
3414 func (m *IPTableReplaceEndReply) Size() (size int) {
3418 size += 4 // m.Retval
3421 func (m *IPTableReplaceEndReply) Marshal(b []byte) ([]byte, error) {
3423 b = make([]byte, m.Size())
3425 buf := codec.NewBuffer(b)
3426 buf.EncodeInt32(m.Retval)
3427 return buf.Bytes(), nil
3429 func (m *IPTableReplaceEndReply) Unmarshal(b []byte) error {
3430 buf := codec.NewBuffer(b)
3431 m.Retval = buf.DecodeInt32()
3435 // IPUnnumberedDetails defines message 'ip_unnumbered_details'.
3436 type IPUnnumberedDetails struct {
3437 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3438 IPSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip_sw_if_index" json:"ip_sw_if_index,omitempty"`
3441 func (m *IPUnnumberedDetails) Reset() { *m = IPUnnumberedDetails{} }
3442 func (*IPUnnumberedDetails) GetMessageName() string { return "ip_unnumbered_details" }
3443 func (*IPUnnumberedDetails) GetCrcString() string { return "cc59bd42" }
3444 func (*IPUnnumberedDetails) GetMessageType() api.MessageType {
3445 return api.ReplyMessage
3448 func (m *IPUnnumberedDetails) Size() (size int) {
3452 size += 4 // m.SwIfIndex
3453 size += 4 // m.IPSwIfIndex
3456 func (m *IPUnnumberedDetails) Marshal(b []byte) ([]byte, error) {
3458 b = make([]byte, m.Size())
3460 buf := codec.NewBuffer(b)
3461 buf.EncodeUint32(uint32(m.SwIfIndex))
3462 buf.EncodeUint32(uint32(m.IPSwIfIndex))
3463 return buf.Bytes(), nil
3465 func (m *IPUnnumberedDetails) Unmarshal(b []byte) error {
3466 buf := codec.NewBuffer(b)
3467 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3468 m.IPSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3472 // IPUnnumberedDump defines message 'ip_unnumbered_dump'.
3473 type IPUnnumberedDump struct {
3474 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
3477 func (m *IPUnnumberedDump) Reset() { *m = IPUnnumberedDump{} }
3478 func (*IPUnnumberedDump) GetMessageName() string { return "ip_unnumbered_dump" }
3479 func (*IPUnnumberedDump) GetCrcString() string { return "f9e6675e" }
3480 func (*IPUnnumberedDump) GetMessageType() api.MessageType {
3481 return api.RequestMessage
3484 func (m *IPUnnumberedDump) Size() (size int) {
3488 size += 4 // m.SwIfIndex
3491 func (m *IPUnnumberedDump) Marshal(b []byte) ([]byte, error) {
3493 b = make([]byte, m.Size())
3495 buf := codec.NewBuffer(b)
3496 buf.EncodeUint32(uint32(m.SwIfIndex))
3497 return buf.Bytes(), nil
3499 func (m *IPUnnumberedDump) Unmarshal(b []byte) error {
3500 buf := codec.NewBuffer(b)
3501 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3505 // MfibSignalDetails defines message 'mfib_signal_details'.
3506 type MfibSignalDetails struct {
3507 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3508 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
3509 Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
3510 IPPacketLen uint16 `binapi:"u16,name=ip_packet_len" json:"ip_packet_len,omitempty"`
3511 IPPacketData []byte `binapi:"u8[256],name=ip_packet_data" json:"ip_packet_data,omitempty"`
3514 func (m *MfibSignalDetails) Reset() { *m = MfibSignalDetails{} }
3515 func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" }
3516 func (*MfibSignalDetails) GetCrcString() string { return "6f4a4cfb" }
3517 func (*MfibSignalDetails) GetMessageType() api.MessageType {
3518 return api.ReplyMessage
3521 func (m *MfibSignalDetails) Size() (size int) {
3525 size += 4 // m.SwIfIndex
3526 size += 4 // m.TableID
3527 size += 1 // m.Prefix.Af
3528 size += 2 // m.Prefix.GrpAddressLength
3529 size += 1 * 16 // m.Prefix.GrpAddress
3530 size += 1 * 16 // m.Prefix.SrcAddress
3531 size += 2 // m.IPPacketLen
3532 size += 1 * 256 // m.IPPacketData
3535 func (m *MfibSignalDetails) Marshal(b []byte) ([]byte, error) {
3537 b = make([]byte, m.Size())
3539 buf := codec.NewBuffer(b)
3540 buf.EncodeUint32(uint32(m.SwIfIndex))
3541 buf.EncodeUint32(m.TableID)
3542 buf.EncodeUint8(uint8(m.Prefix.Af))
3543 buf.EncodeUint16(m.Prefix.GrpAddressLength)
3544 buf.EncodeBytes(m.Prefix.GrpAddress.XXX_UnionData[:], 16)
3545 buf.EncodeBytes(m.Prefix.SrcAddress.XXX_UnionData[:], 16)
3546 buf.EncodeUint16(m.IPPacketLen)
3547 buf.EncodeBytes(m.IPPacketData, 256)
3548 return buf.Bytes(), nil
3550 func (m *MfibSignalDetails) Unmarshal(b []byte) error {
3551 buf := codec.NewBuffer(b)
3552 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3553 m.TableID = buf.DecodeUint32()
3554 m.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8())
3555 m.Prefix.GrpAddressLength = buf.DecodeUint16()
3556 copy(m.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
3557 copy(m.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
3558 m.IPPacketLen = buf.DecodeUint16()
3559 m.IPPacketData = make([]byte, 256)
3560 copy(m.IPPacketData, buf.DecodeBytes(len(m.IPPacketData)))
3564 // MfibSignalDump defines message 'mfib_signal_dump'.
3565 type MfibSignalDump struct{}
3567 func (m *MfibSignalDump) Reset() { *m = MfibSignalDump{} }
3568 func (*MfibSignalDump) GetMessageName() string { return "mfib_signal_dump" }
3569 func (*MfibSignalDump) GetCrcString() string { return "51077d14" }
3570 func (*MfibSignalDump) GetMessageType() api.MessageType {
3571 return api.RequestMessage
3574 func (m *MfibSignalDump) Size() (size int) {
3580 func (m *MfibSignalDump) Marshal(b []byte) ([]byte, error) {
3582 b = make([]byte, m.Size())
3584 buf := codec.NewBuffer(b)
3585 return buf.Bytes(), nil
3587 func (m *MfibSignalDump) Unmarshal(b []byte) error {
3591 // SetIPFlowHash defines message 'set_ip_flow_hash'.
3592 // Deprecated: the message will be removed in the future versions
3593 type SetIPFlowHash struct {
3594 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
3595 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
3596 Src bool `binapi:"bool,name=src" json:"src,omitempty"`
3597 Dst bool `binapi:"bool,name=dst" json:"dst,omitempty"`
3598 Sport bool `binapi:"bool,name=sport" json:"sport,omitempty"`
3599 Dport bool `binapi:"bool,name=dport" json:"dport,omitempty"`
3600 Proto bool `binapi:"bool,name=proto" json:"proto,omitempty"`
3601 Reverse bool `binapi:"bool,name=reverse" json:"reverse,omitempty"`
3602 Symmetric bool `binapi:"bool,name=symmetric" json:"symmetric,omitempty"`
3605 func (m *SetIPFlowHash) Reset() { *m = SetIPFlowHash{} }
3606 func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" }
3607 func (*SetIPFlowHash) GetCrcString() string { return "084ee09e" }
3608 func (*SetIPFlowHash) GetMessageType() api.MessageType {
3609 return api.RequestMessage
3612 func (m *SetIPFlowHash) Size() (size int) {
3616 size += 4 // m.VrfID
3617 size += 1 // m.IsIPv6
3620 size += 1 // m.Sport
3621 size += 1 // m.Dport
3622 size += 1 // m.Proto
3623 size += 1 // m.Reverse
3624 size += 1 // m.Symmetric
3627 func (m *SetIPFlowHash) Marshal(b []byte) ([]byte, error) {
3629 b = make([]byte, m.Size())
3631 buf := codec.NewBuffer(b)
3632 buf.EncodeUint32(m.VrfID)
3633 buf.EncodeBool(m.IsIPv6)
3634 buf.EncodeBool(m.Src)
3635 buf.EncodeBool(m.Dst)
3636 buf.EncodeBool(m.Sport)
3637 buf.EncodeBool(m.Dport)
3638 buf.EncodeBool(m.Proto)
3639 buf.EncodeBool(m.Reverse)
3640 buf.EncodeBool(m.Symmetric)
3641 return buf.Bytes(), nil
3643 func (m *SetIPFlowHash) Unmarshal(b []byte) error {
3644 buf := codec.NewBuffer(b)
3645 m.VrfID = buf.DecodeUint32()
3646 m.IsIPv6 = buf.DecodeBool()
3647 m.Src = buf.DecodeBool()
3648 m.Dst = buf.DecodeBool()
3649 m.Sport = buf.DecodeBool()
3650 m.Dport = buf.DecodeBool()
3651 m.Proto = buf.DecodeBool()
3652 m.Reverse = buf.DecodeBool()
3653 m.Symmetric = buf.DecodeBool()
3657 // SetIPFlowHashReply defines message 'set_ip_flow_hash_reply'.
3658 // Deprecated: the message will be removed in the future versions
3659 type SetIPFlowHashReply struct {
3660 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3663 func (m *SetIPFlowHashReply) Reset() { *m = SetIPFlowHashReply{} }
3664 func (*SetIPFlowHashReply) GetMessageName() string { return "set_ip_flow_hash_reply" }
3665 func (*SetIPFlowHashReply) GetCrcString() string { return "e8d4e804" }
3666 func (*SetIPFlowHashReply) GetMessageType() api.MessageType {
3667 return api.ReplyMessage
3670 func (m *SetIPFlowHashReply) Size() (size int) {
3674 size += 4 // m.Retval
3677 func (m *SetIPFlowHashReply) Marshal(b []byte) ([]byte, error) {
3679 b = make([]byte, m.Size())
3681 buf := codec.NewBuffer(b)
3682 buf.EncodeInt32(m.Retval)
3683 return buf.Bytes(), nil
3685 func (m *SetIPFlowHashReply) Unmarshal(b []byte) error {
3686 buf := codec.NewBuffer(b)
3687 m.Retval = buf.DecodeInt32()
3691 // SetIPFlowHashRouterID defines message 'set_ip_flow_hash_router_id'.
3692 type SetIPFlowHashRouterID struct {
3693 RouterID uint32 `binapi:"u32,name=router_id" json:"router_id,omitempty"`
3696 func (m *SetIPFlowHashRouterID) Reset() { *m = SetIPFlowHashRouterID{} }
3697 func (*SetIPFlowHashRouterID) GetMessageName() string { return "set_ip_flow_hash_router_id" }
3698 func (*SetIPFlowHashRouterID) GetCrcString() string { return "03e4f48e" }
3699 func (*SetIPFlowHashRouterID) GetMessageType() api.MessageType {
3700 return api.RequestMessage
3703 func (m *SetIPFlowHashRouterID) Size() (size int) {
3707 size += 4 // m.RouterID
3710 func (m *SetIPFlowHashRouterID) Marshal(b []byte) ([]byte, error) {
3712 b = make([]byte, m.Size())
3714 buf := codec.NewBuffer(b)
3715 buf.EncodeUint32(m.RouterID)
3716 return buf.Bytes(), nil
3718 func (m *SetIPFlowHashRouterID) Unmarshal(b []byte) error {
3719 buf := codec.NewBuffer(b)
3720 m.RouterID = buf.DecodeUint32()
3724 // SetIPFlowHashRouterIDReply defines message 'set_ip_flow_hash_router_id_reply'.
3725 type SetIPFlowHashRouterIDReply struct {
3726 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3729 func (m *SetIPFlowHashRouterIDReply) Reset() { *m = SetIPFlowHashRouterIDReply{} }
3730 func (*SetIPFlowHashRouterIDReply) GetMessageName() string { return "set_ip_flow_hash_router_id_reply" }
3731 func (*SetIPFlowHashRouterIDReply) GetCrcString() string { return "e8d4e804" }
3732 func (*SetIPFlowHashRouterIDReply) GetMessageType() api.MessageType {
3733 return api.ReplyMessage
3736 func (m *SetIPFlowHashRouterIDReply) Size() (size int) {
3740 size += 4 // m.Retval
3743 func (m *SetIPFlowHashRouterIDReply) Marshal(b []byte) ([]byte, error) {
3745 b = make([]byte, m.Size())
3747 buf := codec.NewBuffer(b)
3748 buf.EncodeInt32(m.Retval)
3749 return buf.Bytes(), nil
3751 func (m *SetIPFlowHashRouterIDReply) Unmarshal(b []byte) error {
3752 buf := codec.NewBuffer(b)
3753 m.Retval = buf.DecodeInt32()
3757 // SetIPFlowHashV2 defines message 'set_ip_flow_hash_v2'.
3758 type SetIPFlowHashV2 struct {
3759 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
3760 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
3761 FlowHashConfig IPFlowHashConfig `binapi:"ip_flow_hash_config,name=flow_hash_config" json:"flow_hash_config,omitempty"`
3764 func (m *SetIPFlowHashV2) Reset() { *m = SetIPFlowHashV2{} }
3765 func (*SetIPFlowHashV2) GetMessageName() string { return "set_ip_flow_hash_v2" }
3766 func (*SetIPFlowHashV2) GetCrcString() string { return "6d132100" }
3767 func (*SetIPFlowHashV2) GetMessageType() api.MessageType {
3768 return api.RequestMessage
3771 func (m *SetIPFlowHashV2) Size() (size int) {
3775 size += 4 // m.TableID
3777 size += 4 // m.FlowHashConfig
3780 func (m *SetIPFlowHashV2) Marshal(b []byte) ([]byte, error) {
3782 b = make([]byte, m.Size())
3784 buf := codec.NewBuffer(b)
3785 buf.EncodeUint32(m.TableID)
3786 buf.EncodeUint8(uint8(m.Af))
3787 buf.EncodeUint32(uint32(m.FlowHashConfig))
3788 return buf.Bytes(), nil
3790 func (m *SetIPFlowHashV2) Unmarshal(b []byte) error {
3791 buf := codec.NewBuffer(b)
3792 m.TableID = buf.DecodeUint32()
3793 m.Af = ip_types.AddressFamily(buf.DecodeUint8())
3794 m.FlowHashConfig = IPFlowHashConfig(buf.DecodeUint32())
3798 // SetIPFlowHashV2Reply defines message 'set_ip_flow_hash_v2_reply'.
3799 type SetIPFlowHashV2Reply struct {
3800 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3803 func (m *SetIPFlowHashV2Reply) Reset() { *m = SetIPFlowHashV2Reply{} }
3804 func (*SetIPFlowHashV2Reply) GetMessageName() string { return "set_ip_flow_hash_v2_reply" }
3805 func (*SetIPFlowHashV2Reply) GetCrcString() string { return "e8d4e804" }
3806 func (*SetIPFlowHashV2Reply) GetMessageType() api.MessageType {
3807 return api.ReplyMessage
3810 func (m *SetIPFlowHashV2Reply) Size() (size int) {
3814 size += 4 // m.Retval
3817 func (m *SetIPFlowHashV2Reply) Marshal(b []byte) ([]byte, error) {
3819 b = make([]byte, m.Size())
3821 buf := codec.NewBuffer(b)
3822 buf.EncodeInt32(m.Retval)
3823 return buf.Bytes(), nil
3825 func (m *SetIPFlowHashV2Reply) Unmarshal(b []byte) error {
3826 buf := codec.NewBuffer(b)
3827 m.Retval = buf.DecodeInt32()
3831 // SwInterfaceIP6EnableDisable defines message 'sw_interface_ip6_enable_disable'.
3832 type SwInterfaceIP6EnableDisable struct {
3833 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3834 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
3837 func (m *SwInterfaceIP6EnableDisable) Reset() { *m = SwInterfaceIP6EnableDisable{} }
3838 func (*SwInterfaceIP6EnableDisable) GetMessageName() string { return "sw_interface_ip6_enable_disable" }
3839 func (*SwInterfaceIP6EnableDisable) GetCrcString() string { return "ae6cfcfb" }
3840 func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType {
3841 return api.RequestMessage
3844 func (m *SwInterfaceIP6EnableDisable) Size() (size int) {
3848 size += 4 // m.SwIfIndex
3849 size += 1 // m.Enable
3852 func (m *SwInterfaceIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
3854 b = make([]byte, m.Size())
3856 buf := codec.NewBuffer(b)
3857 buf.EncodeUint32(uint32(m.SwIfIndex))
3858 buf.EncodeBool(m.Enable)
3859 return buf.Bytes(), nil
3861 func (m *SwInterfaceIP6EnableDisable) Unmarshal(b []byte) error {
3862 buf := codec.NewBuffer(b)
3863 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3864 m.Enable = buf.DecodeBool()
3868 // SwInterfaceIP6EnableDisableReply defines message 'sw_interface_ip6_enable_disable_reply'.
3869 type SwInterfaceIP6EnableDisableReply struct {
3870 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3873 func (m *SwInterfaceIP6EnableDisableReply) Reset() { *m = SwInterfaceIP6EnableDisableReply{} }
3874 func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string {
3875 return "sw_interface_ip6_enable_disable_reply"
3877 func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
3878 func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType {
3879 return api.ReplyMessage
3882 func (m *SwInterfaceIP6EnableDisableReply) Size() (size int) {
3886 size += 4 // m.Retval
3889 func (m *SwInterfaceIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) {
3891 b = make([]byte, m.Size())
3893 buf := codec.NewBuffer(b)
3894 buf.EncodeInt32(m.Retval)
3895 return buf.Bytes(), nil
3897 func (m *SwInterfaceIP6EnableDisableReply) Unmarshal(b []byte) error {
3898 buf := codec.NewBuffer(b)
3899 m.Retval = buf.DecodeInt32()
3903 // SwInterfaceIP6GetLinkLocalAddress defines message 'sw_interface_ip6_get_link_local_address'.
3904 type SwInterfaceIP6GetLinkLocalAddress struct {
3905 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3908 func (m *SwInterfaceIP6GetLinkLocalAddress) Reset() { *m = SwInterfaceIP6GetLinkLocalAddress{} }
3909 func (*SwInterfaceIP6GetLinkLocalAddress) GetMessageName() string {
3910 return "sw_interface_ip6_get_link_local_address"
3912 func (*SwInterfaceIP6GetLinkLocalAddress) GetCrcString() string { return "f9e6675e" }
3913 func (*SwInterfaceIP6GetLinkLocalAddress) GetMessageType() api.MessageType {
3914 return api.RequestMessage
3917 func (m *SwInterfaceIP6GetLinkLocalAddress) Size() (size int) {
3921 size += 4 // m.SwIfIndex
3924 func (m *SwInterfaceIP6GetLinkLocalAddress) Marshal(b []byte) ([]byte, error) {
3926 b = make([]byte, m.Size())
3928 buf := codec.NewBuffer(b)
3929 buf.EncodeUint32(uint32(m.SwIfIndex))
3930 return buf.Bytes(), nil
3932 func (m *SwInterfaceIP6GetLinkLocalAddress) Unmarshal(b []byte) error {
3933 buf := codec.NewBuffer(b)
3934 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
3938 // SwInterfaceIP6GetLinkLocalAddressReply defines message 'sw_interface_ip6_get_link_local_address_reply'.
3939 type SwInterfaceIP6GetLinkLocalAddressReply struct {
3940 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3941 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
3944 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Reset() {
3945 *m = SwInterfaceIP6GetLinkLocalAddressReply{}
3947 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetMessageName() string {
3948 return "sw_interface_ip6_get_link_local_address_reply"
3950 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetCrcString() string { return "d16b7130" }
3951 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetMessageType() api.MessageType {
3952 return api.ReplyMessage
3955 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Size() (size int) {
3959 size += 4 // m.Retval
3960 size += 1 * 16 // m.IP
3963 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) {
3965 b = make([]byte, m.Size())
3967 buf := codec.NewBuffer(b)
3968 buf.EncodeInt32(m.Retval)
3969 buf.EncodeBytes(m.IP[:], 16)
3970 return buf.Bytes(), nil
3972 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Unmarshal(b []byte) error {
3973 buf := codec.NewBuffer(b)
3974 m.Retval = buf.DecodeInt32()
3975 copy(m.IP[:], buf.DecodeBytes(16))
3979 // SwInterfaceIP6SetLinkLocalAddress defines message 'sw_interface_ip6_set_link_local_address'.
3980 type SwInterfaceIP6SetLinkLocalAddress struct {
3981 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3982 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
3985 func (m *SwInterfaceIP6SetLinkLocalAddress) Reset() { *m = SwInterfaceIP6SetLinkLocalAddress{} }
3986 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string {
3987 return "sw_interface_ip6_set_link_local_address"
3989 func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "1c10f15f" }
3990 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType {
3991 return api.RequestMessage
3994 func (m *SwInterfaceIP6SetLinkLocalAddress) Size() (size int) {
3998 size += 4 // m.SwIfIndex
3999 size += 1 * 16 // m.IP
4002 func (m *SwInterfaceIP6SetLinkLocalAddress) Marshal(b []byte) ([]byte, error) {
4004 b = make([]byte, m.Size())
4006 buf := codec.NewBuffer(b)
4007 buf.EncodeUint32(uint32(m.SwIfIndex))
4008 buf.EncodeBytes(m.IP[:], 16)
4009 return buf.Bytes(), nil
4011 func (m *SwInterfaceIP6SetLinkLocalAddress) Unmarshal(b []byte) error {
4012 buf := codec.NewBuffer(b)
4013 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
4014 copy(m.IP[:], buf.DecodeBytes(16))
4018 // SwInterfaceIP6SetLinkLocalAddressReply defines message 'sw_interface_ip6_set_link_local_address_reply'.
4019 type SwInterfaceIP6SetLinkLocalAddressReply struct {
4020 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
4023 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Reset() {
4024 *m = SwInterfaceIP6SetLinkLocalAddressReply{}
4026 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string {
4027 return "sw_interface_ip6_set_link_local_address_reply"
4029 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { return "e8d4e804" }
4030 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType {
4031 return api.ReplyMessage
4034 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Size() (size int) {
4038 size += 4 // m.Retval
4041 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) {
4043 b = make([]byte, m.Size())
4045 buf := codec.NewBuffer(b)
4046 buf.EncodeInt32(m.Retval)
4047 return buf.Bytes(), nil
4049 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error {
4050 buf := codec.NewBuffer(b)
4051 m.Retval = buf.DecodeInt32()
4055 func init() { file_ip_binapi_init() }
4056 func file_ip_binapi_init() {
4057 api.RegisterMessage((*IoamDisable)(nil), "ioam_disable_6b16a45e")
4058 api.RegisterMessage((*IoamDisableReply)(nil), "ioam_disable_reply_e8d4e804")
4059 api.RegisterMessage((*IoamEnable)(nil), "ioam_enable_51ccd868")
4060 api.RegisterMessage((*IoamEnableReply)(nil), "ioam_enable_reply_e8d4e804")
4061 api.RegisterMessage((*IPAddressDetails)(nil), "ip_address_details_ee29b797")
4062 api.RegisterMessage((*IPAddressDump)(nil), "ip_address_dump_2d033de4")
4063 api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip_container_proxy_add_del_7df1dff1")
4064 api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip_container_proxy_add_del_reply_e8d4e804")
4065 api.RegisterMessage((*IPContainerProxyDetails)(nil), "ip_container_proxy_details_a8085523")
4066 api.RegisterMessage((*IPContainerProxyDump)(nil), "ip_container_proxy_dump_51077d14")
4067 api.RegisterMessage((*IPDetails)(nil), "ip_details_eb152d07")
4068 api.RegisterMessage((*IPDump)(nil), "ip_dump_98d231ca")
4069 api.RegisterMessage((*IPMrouteAddDel)(nil), "ip_mroute_add_del_0dd7e790")
4070 api.RegisterMessage((*IPMrouteAddDelReply)(nil), "ip_mroute_add_del_reply_1992deab")
4071 api.RegisterMessage((*IPMrouteDetails)(nil), "ip_mroute_details_c5cb23fc")
4072 api.RegisterMessage((*IPMrouteDump)(nil), "ip_mroute_dump_b9d2e09e")
4073 api.RegisterMessage((*IPMtableDetails)(nil), "ip_mtable_details_b9d2e09e")
4074 api.RegisterMessage((*IPMtableDump)(nil), "ip_mtable_dump_51077d14")
4075 api.RegisterMessage((*IPPathMtuDetails)(nil), "ip_path_mtu_details_ac9539a7")
4076 api.RegisterMessage((*IPPathMtuGet)(nil), "ip_path_mtu_get_f75ba505")
4077 api.RegisterMessage((*IPPathMtuGetReply)(nil), "ip_path_mtu_get_reply_53b48f5d")
4078 api.RegisterMessage((*IPPathMtuReplaceBegin)(nil), "ip_path_mtu_replace_begin_51077d14")
4079 api.RegisterMessage((*IPPathMtuReplaceBeginReply)(nil), "ip_path_mtu_replace_begin_reply_e8d4e804")
4080 api.RegisterMessage((*IPPathMtuReplaceEnd)(nil), "ip_path_mtu_replace_end_51077d14")
4081 api.RegisterMessage((*IPPathMtuReplaceEndReply)(nil), "ip_path_mtu_replace_end_reply_e8d4e804")
4082 api.RegisterMessage((*IPPathMtuUpdate)(nil), "ip_path_mtu_update_10bbe5cb")
4083 api.RegisterMessage((*IPPathMtuUpdateReply)(nil), "ip_path_mtu_update_reply_e8d4e804")
4084 api.RegisterMessage((*IPPuntPolice)(nil), "ip_punt_police_db867cea")
4085 api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip_punt_police_reply_e8d4e804")
4086 api.RegisterMessage((*IPPuntRedirect)(nil), "ip_punt_redirect_6580f635")
4087 api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_2cef63e7")
4088 api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip_punt_redirect_dump_2d033de4")
4089 api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip_punt_redirect_reply_e8d4e804")
4090 api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_eb77968d")
4091 api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip_reassembly_enable_disable_reply_e8d4e804")
4092 api.RegisterMessage((*IPReassemblyGet)(nil), "ip_reassembly_get_ea13ff63")
4093 api.RegisterMessage((*IPReassemblyGetReply)(nil), "ip_reassembly_get_reply_d5eb8d34")
4094 api.RegisterMessage((*IPReassemblySet)(nil), "ip_reassembly_set_16467d25")
4095 api.RegisterMessage((*IPReassemblySetReply)(nil), "ip_reassembly_set_reply_e8d4e804")
4096 api.RegisterMessage((*IPRouteAddDel)(nil), "ip_route_add_del_b8ecfe0d")
4097 api.RegisterMessage((*IPRouteAddDelReply)(nil), "ip_route_add_del_reply_1992deab")
4098 api.RegisterMessage((*IPRouteAddDelV2)(nil), "ip_route_add_del_v2_521ef330")
4099 api.RegisterMessage((*IPRouteAddDelV2Reply)(nil), "ip_route_add_del_v2_reply_1992deab")
4100 api.RegisterMessage((*IPRouteDetails)(nil), "ip_route_details_bda8f315")
4101 api.RegisterMessage((*IPRouteDump)(nil), "ip_route_dump_b9d2e09e")
4102 api.RegisterMessage((*IPRouteLookup)(nil), "ip_route_lookup_710d6471")
4103 api.RegisterMessage((*IPRouteLookupReply)(nil), "ip_route_lookup_reply_5d8febcb")
4104 api.RegisterMessage((*IPRouteLookupV2)(nil), "ip_route_lookup_v2_710d6471")
4105 api.RegisterMessage((*IPRouteLookupV2Reply)(nil), "ip_route_lookup_v2_reply_84cc9e03")
4106 api.RegisterMessage((*IPRouteV2Details)(nil), "ip_route_v2_details_b09aa6c0")
4107 api.RegisterMessage((*IPRouteV2Dump)(nil), "ip_route_v2_dump_d16f72e6")
4108 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip_source_and_port_range_check_add_del_92a067e3")
4109 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip_source_and_port_range_check_add_del_reply_e8d4e804")
4110 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip_source_and_port_range_check_interface_add_del_e1ba8987")
4111 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip_source_and_port_range_check_interface_add_del_reply_e8d4e804")
4112 api.RegisterMessage((*IPTableAddDel)(nil), "ip_table_add_del_0ffdaec0")
4113 api.RegisterMessage((*IPTableAddDelReply)(nil), "ip_table_add_del_reply_e8d4e804")
4114 api.RegisterMessage((*IPTableDetails)(nil), "ip_table_details_c79fca0f")
4115 api.RegisterMessage((*IPTableDump)(nil), "ip_table_dump_51077d14")
4116 api.RegisterMessage((*IPTableFlush)(nil), "ip_table_flush_b9d2e09e")
4117 api.RegisterMessage((*IPTableFlushReply)(nil), "ip_table_flush_reply_e8d4e804")
4118 api.RegisterMessage((*IPTableReplaceBegin)(nil), "ip_table_replace_begin_b9d2e09e")
4119 api.RegisterMessage((*IPTableReplaceBeginReply)(nil), "ip_table_replace_begin_reply_e8d4e804")
4120 api.RegisterMessage((*IPTableReplaceEnd)(nil), "ip_table_replace_end_b9d2e09e")
4121 api.RegisterMessage((*IPTableReplaceEndReply)(nil), "ip_table_replace_end_reply_e8d4e804")
4122 api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip_unnumbered_details_cc59bd42")
4123 api.RegisterMessage((*IPUnnumberedDump)(nil), "ip_unnumbered_dump_f9e6675e")
4124 api.RegisterMessage((*MfibSignalDetails)(nil), "mfib_signal_details_6f4a4cfb")
4125 api.RegisterMessage((*MfibSignalDump)(nil), "mfib_signal_dump_51077d14")
4126 api.RegisterMessage((*SetIPFlowHash)(nil), "set_ip_flow_hash_084ee09e")
4127 api.RegisterMessage((*SetIPFlowHashReply)(nil), "set_ip_flow_hash_reply_e8d4e804")
4128 api.RegisterMessage((*SetIPFlowHashRouterID)(nil), "set_ip_flow_hash_router_id_03e4f48e")
4129 api.RegisterMessage((*SetIPFlowHashRouterIDReply)(nil), "set_ip_flow_hash_router_id_reply_e8d4e804")
4130 api.RegisterMessage((*SetIPFlowHashV2)(nil), "set_ip_flow_hash_v2_6d132100")
4131 api.RegisterMessage((*SetIPFlowHashV2Reply)(nil), "set_ip_flow_hash_v2_reply_e8d4e804")
4132 api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "sw_interface_ip6_enable_disable_ae6cfcfb")
4133 api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "sw_interface_ip6_enable_disable_reply_e8d4e804")
4134 api.RegisterMessage((*SwInterfaceIP6GetLinkLocalAddress)(nil), "sw_interface_ip6_get_link_local_address_f9e6675e")
4135 api.RegisterMessage((*SwInterfaceIP6GetLinkLocalAddressReply)(nil), "sw_interface_ip6_get_link_local_address_reply_d16b7130")
4136 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "sw_interface_ip6_set_link_local_address_1c10f15f")
4137 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "sw_interface_ip6_set_link_local_address_reply_e8d4e804")
4140 // Messages returns list of all messages in this module.
4141 func AllMessages() []api.Message {
4142 return []api.Message{
4143 (*IoamDisable)(nil),
4144 (*IoamDisableReply)(nil),
4146 (*IoamEnableReply)(nil),
4147 (*IPAddressDetails)(nil),
4148 (*IPAddressDump)(nil),
4149 (*IPContainerProxyAddDel)(nil),
4150 (*IPContainerProxyAddDelReply)(nil),
4151 (*IPContainerProxyDetails)(nil),
4152 (*IPContainerProxyDump)(nil),
4155 (*IPMrouteAddDel)(nil),
4156 (*IPMrouteAddDelReply)(nil),
4157 (*IPMrouteDetails)(nil),
4158 (*IPMrouteDump)(nil),
4159 (*IPMtableDetails)(nil),
4160 (*IPMtableDump)(nil),
4161 (*IPPathMtuDetails)(nil),
4162 (*IPPathMtuGet)(nil),
4163 (*IPPathMtuGetReply)(nil),
4164 (*IPPathMtuReplaceBegin)(nil),
4165 (*IPPathMtuReplaceBeginReply)(nil),
4166 (*IPPathMtuReplaceEnd)(nil),
4167 (*IPPathMtuReplaceEndReply)(nil),
4168 (*IPPathMtuUpdate)(nil),
4169 (*IPPathMtuUpdateReply)(nil),
4170 (*IPPuntPolice)(nil),
4171 (*IPPuntPoliceReply)(nil),
4172 (*IPPuntRedirect)(nil),
4173 (*IPPuntRedirectDetails)(nil),
4174 (*IPPuntRedirectDump)(nil),
4175 (*IPPuntRedirectReply)(nil),
4176 (*IPReassemblyEnableDisable)(nil),
4177 (*IPReassemblyEnableDisableReply)(nil),
4178 (*IPReassemblyGet)(nil),
4179 (*IPReassemblyGetReply)(nil),
4180 (*IPReassemblySet)(nil),
4181 (*IPReassemblySetReply)(nil),
4182 (*IPRouteAddDel)(nil),
4183 (*IPRouteAddDelReply)(nil),
4184 (*IPRouteAddDelV2)(nil),
4185 (*IPRouteAddDelV2Reply)(nil),
4186 (*IPRouteDetails)(nil),
4187 (*IPRouteDump)(nil),
4188 (*IPRouteLookup)(nil),
4189 (*IPRouteLookupReply)(nil),
4190 (*IPRouteLookupV2)(nil),
4191 (*IPRouteLookupV2Reply)(nil),
4192 (*IPRouteV2Details)(nil),
4193 (*IPRouteV2Dump)(nil),
4194 (*IPSourceAndPortRangeCheckAddDel)(nil),
4195 (*IPSourceAndPortRangeCheckAddDelReply)(nil),
4196 (*IPSourceAndPortRangeCheckInterfaceAddDel)(nil),
4197 (*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil),
4198 (*IPTableAddDel)(nil),
4199 (*IPTableAddDelReply)(nil),
4200 (*IPTableDetails)(nil),
4201 (*IPTableDump)(nil),
4202 (*IPTableFlush)(nil),
4203 (*IPTableFlushReply)(nil),
4204 (*IPTableReplaceBegin)(nil),
4205 (*IPTableReplaceBeginReply)(nil),
4206 (*IPTableReplaceEnd)(nil),
4207 (*IPTableReplaceEndReply)(nil),
4208 (*IPUnnumberedDetails)(nil),
4209 (*IPUnnumberedDump)(nil),
4210 (*MfibSignalDetails)(nil),
4211 (*MfibSignalDump)(nil),
4212 (*SetIPFlowHash)(nil),
4213 (*SetIPFlowHashReply)(nil),
4214 (*SetIPFlowHashRouterID)(nil),
4215 (*SetIPFlowHashRouterIDReply)(nil),
4216 (*SetIPFlowHashV2)(nil),
4217 (*SetIPFlowHashV2Reply)(nil),
4218 (*SwInterfaceIP6EnableDisable)(nil),
4219 (*SwInterfaceIP6EnableDisableReply)(nil),
4220 (*SwInterfaceIP6GetLinkLocalAddress)(nil),
4221 (*SwInterfaceIP6GetLinkLocalAddressReply)(nil),
4222 (*SwInterfaceIP6SetLinkLocalAddress)(nil),
4223 (*SwInterfaceIP6SetLinkLocalAddressReply)(nil),