go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2106/ip/ip.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 3 // Package ip contains generated bindings for API file ip.api. 4 // 5 // Contents: 6 // - 2 enums 7 // - 6 structs 8 // - 81 messages 9 package ip 10 11 import ( 12 "strconv" 13 14 api "go.fd.io/govpp/api" 15 codec "go.fd.io/govpp/codec" 16 _ "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/ethernet_types" 17 fib_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/fib_types" 18 interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/interface_types" 19 ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/ip_types" 20 mfib_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/mfib_types" 21 ) 22 23 // This is a compile-time assertion to ensure that this generated file 24 // is compatible with the GoVPP api package it is being compiled against. 25 // A compilation error at this line likely means your copy of the 26 // GoVPP api package needs to be updated. 27 const _ = api.GoVppAPIPackageIsVersion2 28 29 const ( 30 APIFile = "ip" 31 APIVersion = "3.1.0" 32 VersionCrc = 0x972432b4 33 ) 34 35 // IPReassType defines enum 'ip_reass_type'. 36 type IPReassType uint32 37 38 const ( 39 IP_REASS_TYPE_FULL IPReassType = 0 40 IP_REASS_TYPE_SHALLOW_VIRTUAL IPReassType = 1 41 ) 42 43 var ( 44 IPReassType_name = map[uint32]string{ 45 0: "IP_REASS_TYPE_FULL", 46 1: "IP_REASS_TYPE_SHALLOW_VIRTUAL", 47 } 48 IPReassType_value = map[string]uint32{ 49 "IP_REASS_TYPE_FULL": 0, 50 "IP_REASS_TYPE_SHALLOW_VIRTUAL": 1, 51 } 52 ) 53 54 func (x IPReassType) String() string { 55 s, ok := IPReassType_name[uint32(x)] 56 if ok { 57 return s 58 } 59 return "IPReassType(" + strconv.Itoa(int(x)) + ")" 60 } 61 62 // IPFlowHashConfig defines enum 'ip_flow_hash_config'. 63 type IPFlowHashConfig uint32 64 65 const ( 66 IP_API_FLOW_HASH_SRC_IP IPFlowHashConfig = 1 67 IP_API_FLOW_HASH_DST_IP IPFlowHashConfig = 2 68 IP_API_FLOW_HASH_SRC_PORT IPFlowHashConfig = 4 69 IP_API_FLOW_HASH_DST_PORT IPFlowHashConfig = 8 70 IP_API_FLOW_HASH_PROTO IPFlowHashConfig = 16 71 IP_API_FLOW_HASH_REVERSE IPFlowHashConfig = 32 72 IP_API_FLOW_HASH_SYMETRIC IPFlowHashConfig = 64 73 IP_API_FLOW_HASH_FLOW_LABEL IPFlowHashConfig = 128 74 ) 75 76 var ( 77 IPFlowHashConfig_name = map[uint32]string{ 78 1: "IP_API_FLOW_HASH_SRC_IP", 79 2: "IP_API_FLOW_HASH_DST_IP", 80 4: "IP_API_FLOW_HASH_SRC_PORT", 81 8: "IP_API_FLOW_HASH_DST_PORT", 82 16: "IP_API_FLOW_HASH_PROTO", 83 32: "IP_API_FLOW_HASH_REVERSE", 84 64: "IP_API_FLOW_HASH_SYMETRIC", 85 128: "IP_API_FLOW_HASH_FLOW_LABEL", 86 } 87 IPFlowHashConfig_value = map[string]uint32{ 88 "IP_API_FLOW_HASH_SRC_IP": 1, 89 "IP_API_FLOW_HASH_DST_IP": 2, 90 "IP_API_FLOW_HASH_SRC_PORT": 4, 91 "IP_API_FLOW_HASH_DST_PORT": 8, 92 "IP_API_FLOW_HASH_PROTO": 16, 93 "IP_API_FLOW_HASH_REVERSE": 32, 94 "IP_API_FLOW_HASH_SYMETRIC": 64, 95 "IP_API_FLOW_HASH_FLOW_LABEL": 128, 96 } 97 ) 98 99 func (x IPFlowHashConfig) String() string { 100 s, ok := IPFlowHashConfig_name[uint32(x)] 101 if ok { 102 return s 103 } 104 str := func(n uint32) string { 105 s, ok := IPFlowHashConfig_name[uint32(n)] 106 if ok { 107 return s 108 } 109 return "IPFlowHashConfig(" + strconv.Itoa(int(n)) + ")" 110 } 111 for i := uint32(0); i <= 32; i++ { 112 val := uint32(x) 113 if val&(1<<i) != 0 { 114 if s != "" { 115 s += "|" 116 } 117 s += str(1 << i) 118 } 119 } 120 if s == "" { 121 return str(uint32(x)) 122 } 123 return s 124 } 125 126 // IPMroute defines type 'ip_mroute'. 127 type IPMroute struct { 128 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 129 EntryFlags mfib_types.MfibEntryFlags `binapi:"mfib_entry_flags,name=entry_flags" json:"entry_flags,omitempty"` 130 RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"` 131 Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"` 132 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"` 133 Paths []mfib_types.MfibPath `binapi:"mfib_path[n_paths],name=paths" json:"paths,omitempty"` 134 } 135 136 // IPPathMtu defines type 'ip_path_mtu'. 137 type IPPathMtu struct { 138 ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"` 139 Context uint32 `binapi:"u32,name=context" json:"context,omitempty"` 140 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 141 Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"` 142 PathMtu uint16 `binapi:"u16,name=path_mtu" json:"path_mtu,omitempty"` 143 } 144 145 // IPRoute defines type 'ip_route'. 146 type IPRoute struct { 147 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 148 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` 149 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 150 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"` 151 Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"` 152 } 153 154 // IPRouteV2 defines type 'ip_route_v2'. 155 type IPRouteV2 struct { 156 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 157 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` 158 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 159 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"` 160 Src uint8 `binapi:"u8,name=src" json:"src,omitempty"` 161 Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"` 162 } 163 164 // IPTable defines type 'ip_table'. 165 type IPTable struct { 166 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 167 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 168 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 169 } 170 171 // PuntRedirect defines type 'punt_redirect'. 172 type PuntRedirect struct { 173 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` 174 TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"` 175 Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"` 176 } 177 178 // IoamDisable defines message 'ioam_disable'. 179 type IoamDisable struct { 180 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"` 181 } 182 183 func (m *IoamDisable) Reset() { *m = IoamDisable{} } 184 func (*IoamDisable) GetMessageName() string { return "ioam_disable" } 185 func (*IoamDisable) GetCrcString() string { return "6b16a45e" } 186 func (*IoamDisable) GetMessageType() api.MessageType { 187 return api.RequestMessage 188 } 189 190 func (m *IoamDisable) Size() (size int) { 191 if m == nil { 192 return 0 193 } 194 size += 2 // m.ID 195 return size 196 } 197 func (m *IoamDisable) Marshal(b []byte) ([]byte, error) { 198 if b == nil { 199 b = make([]byte, m.Size()) 200 } 201 buf := codec.NewBuffer(b) 202 buf.EncodeUint16(m.ID) 203 return buf.Bytes(), nil 204 } 205 func (m *IoamDisable) Unmarshal(b []byte) error { 206 buf := codec.NewBuffer(b) 207 m.ID = buf.DecodeUint16() 208 return nil 209 } 210 211 // IoamDisableReply defines message 'ioam_disable_reply'. 212 type IoamDisableReply struct { 213 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 214 } 215 216 func (m *IoamDisableReply) Reset() { *m = IoamDisableReply{} } 217 func (*IoamDisableReply) GetMessageName() string { return "ioam_disable_reply" } 218 func (*IoamDisableReply) GetCrcString() string { return "e8d4e804" } 219 func (*IoamDisableReply) GetMessageType() api.MessageType { 220 return api.ReplyMessage 221 } 222 223 func (m *IoamDisableReply) Size() (size int) { 224 if m == nil { 225 return 0 226 } 227 size += 4 // m.Retval 228 return size 229 } 230 func (m *IoamDisableReply) Marshal(b []byte) ([]byte, error) { 231 if b == nil { 232 b = make([]byte, m.Size()) 233 } 234 buf := codec.NewBuffer(b) 235 buf.EncodeInt32(m.Retval) 236 return buf.Bytes(), nil 237 } 238 func (m *IoamDisableReply) Unmarshal(b []byte) error { 239 buf := codec.NewBuffer(b) 240 m.Retval = buf.DecodeInt32() 241 return nil 242 } 243 244 // IoamEnable defines message 'ioam_enable'. 245 type IoamEnable struct { 246 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"` 247 Seqno bool `binapi:"bool,name=seqno" json:"seqno,omitempty"` 248 Analyse bool `binapi:"bool,name=analyse" json:"analyse,omitempty"` 249 PotEnable bool `binapi:"bool,name=pot_enable" json:"pot_enable,omitempty"` 250 TraceEnable bool `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"` 251 NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"` 252 } 253 254 func (m *IoamEnable) Reset() { *m = IoamEnable{} } 255 func (*IoamEnable) GetMessageName() string { return "ioam_enable" } 256 func (*IoamEnable) GetCrcString() string { return "51ccd868" } 257 func (*IoamEnable) GetMessageType() api.MessageType { 258 return api.RequestMessage 259 } 260 261 func (m *IoamEnable) Size() (size int) { 262 if m == nil { 263 return 0 264 } 265 size += 2 // m.ID 266 size += 1 // m.Seqno 267 size += 1 // m.Analyse 268 size += 1 // m.PotEnable 269 size += 1 // m.TraceEnable 270 size += 4 // m.NodeID 271 return size 272 } 273 func (m *IoamEnable) Marshal(b []byte) ([]byte, error) { 274 if b == nil { 275 b = make([]byte, m.Size()) 276 } 277 buf := codec.NewBuffer(b) 278 buf.EncodeUint16(m.ID) 279 buf.EncodeBool(m.Seqno) 280 buf.EncodeBool(m.Analyse) 281 buf.EncodeBool(m.PotEnable) 282 buf.EncodeBool(m.TraceEnable) 283 buf.EncodeUint32(m.NodeID) 284 return buf.Bytes(), nil 285 } 286 func (m *IoamEnable) Unmarshal(b []byte) error { 287 buf := codec.NewBuffer(b) 288 m.ID = buf.DecodeUint16() 289 m.Seqno = buf.DecodeBool() 290 m.Analyse = buf.DecodeBool() 291 m.PotEnable = buf.DecodeBool() 292 m.TraceEnable = buf.DecodeBool() 293 m.NodeID = buf.DecodeUint32() 294 return nil 295 } 296 297 // IoamEnableReply defines message 'ioam_enable_reply'. 298 type IoamEnableReply struct { 299 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 300 } 301 302 func (m *IoamEnableReply) Reset() { *m = IoamEnableReply{} } 303 func (*IoamEnableReply) GetMessageName() string { return "ioam_enable_reply" } 304 func (*IoamEnableReply) GetCrcString() string { return "e8d4e804" } 305 func (*IoamEnableReply) GetMessageType() api.MessageType { 306 return api.ReplyMessage 307 } 308 309 func (m *IoamEnableReply) Size() (size int) { 310 if m == nil { 311 return 0 312 } 313 size += 4 // m.Retval 314 return size 315 } 316 func (m *IoamEnableReply) Marshal(b []byte) ([]byte, error) { 317 if b == nil { 318 b = make([]byte, m.Size()) 319 } 320 buf := codec.NewBuffer(b) 321 buf.EncodeInt32(m.Retval) 322 return buf.Bytes(), nil 323 } 324 func (m *IoamEnableReply) Unmarshal(b []byte) error { 325 buf := codec.NewBuffer(b) 326 m.Retval = buf.DecodeInt32() 327 return nil 328 } 329 330 // IPAddressDetails defines message 'ip_address_details'. 331 type IPAddressDetails struct { 332 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 333 Prefix ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"` 334 } 335 336 func (m *IPAddressDetails) Reset() { *m = IPAddressDetails{} } 337 func (*IPAddressDetails) GetMessageName() string { return "ip_address_details" } 338 func (*IPAddressDetails) GetCrcString() string { return "ee29b797" } 339 func (*IPAddressDetails) GetMessageType() api.MessageType { 340 return api.ReplyMessage 341 } 342 343 func (m *IPAddressDetails) Size() (size int) { 344 if m == nil { 345 return 0 346 } 347 size += 4 // m.SwIfIndex 348 size += 1 // m.Prefix.Address.Af 349 size += 1 * 16 // m.Prefix.Address.Un 350 size += 1 // m.Prefix.Len 351 return size 352 } 353 func (m *IPAddressDetails) Marshal(b []byte) ([]byte, error) { 354 if b == nil { 355 b = make([]byte, m.Size()) 356 } 357 buf := codec.NewBuffer(b) 358 buf.EncodeUint32(uint32(m.SwIfIndex)) 359 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 360 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 361 buf.EncodeUint8(m.Prefix.Len) 362 return buf.Bytes(), nil 363 } 364 func (m *IPAddressDetails) Unmarshal(b []byte) error { 365 buf := codec.NewBuffer(b) 366 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 367 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 368 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 369 m.Prefix.Len = buf.DecodeUint8() 370 return nil 371 } 372 373 // IPAddressDump defines message 'ip_address_dump'. 374 type IPAddressDump struct { 375 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 376 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 377 } 378 379 func (m *IPAddressDump) Reset() { *m = IPAddressDump{} } 380 func (*IPAddressDump) GetMessageName() string { return "ip_address_dump" } 381 func (*IPAddressDump) GetCrcString() string { return "2d033de4" } 382 func (*IPAddressDump) GetMessageType() api.MessageType { 383 return api.RequestMessage 384 } 385 386 func (m *IPAddressDump) Size() (size int) { 387 if m == nil { 388 return 0 389 } 390 size += 4 // m.SwIfIndex 391 size += 1 // m.IsIPv6 392 return size 393 } 394 func (m *IPAddressDump) Marshal(b []byte) ([]byte, error) { 395 if b == nil { 396 b = make([]byte, m.Size()) 397 } 398 buf := codec.NewBuffer(b) 399 buf.EncodeUint32(uint32(m.SwIfIndex)) 400 buf.EncodeBool(m.IsIPv6) 401 return buf.Bytes(), nil 402 } 403 func (m *IPAddressDump) Unmarshal(b []byte) error { 404 buf := codec.NewBuffer(b) 405 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 406 m.IsIPv6 = buf.DecodeBool() 407 return nil 408 } 409 410 // IPContainerProxyAddDel defines message 'ip_container_proxy_add_del'. 411 type IPContainerProxyAddDel struct { 412 Pfx ip_types.Prefix `binapi:"prefix,name=pfx" json:"pfx,omitempty"` 413 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 414 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 415 } 416 417 func (m *IPContainerProxyAddDel) Reset() { *m = IPContainerProxyAddDel{} } 418 func (*IPContainerProxyAddDel) GetMessageName() string { return "ip_container_proxy_add_del" } 419 func (*IPContainerProxyAddDel) GetCrcString() string { return "7df1dff1" } 420 func (*IPContainerProxyAddDel) GetMessageType() api.MessageType { 421 return api.RequestMessage 422 } 423 424 func (m *IPContainerProxyAddDel) Size() (size int) { 425 if m == nil { 426 return 0 427 } 428 size += 1 // m.Pfx.Address.Af 429 size += 1 * 16 // m.Pfx.Address.Un 430 size += 1 // m.Pfx.Len 431 size += 4 // m.SwIfIndex 432 size += 1 // m.IsAdd 433 return size 434 } 435 func (m *IPContainerProxyAddDel) Marshal(b []byte) ([]byte, error) { 436 if b == nil { 437 b = make([]byte, m.Size()) 438 } 439 buf := codec.NewBuffer(b) 440 buf.EncodeUint8(uint8(m.Pfx.Address.Af)) 441 buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16) 442 buf.EncodeUint8(m.Pfx.Len) 443 buf.EncodeUint32(uint32(m.SwIfIndex)) 444 buf.EncodeBool(m.IsAdd) 445 return buf.Bytes(), nil 446 } 447 func (m *IPContainerProxyAddDel) Unmarshal(b []byte) error { 448 buf := codec.NewBuffer(b) 449 m.Pfx.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 450 copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 451 m.Pfx.Len = buf.DecodeUint8() 452 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 453 m.IsAdd = buf.DecodeBool() 454 return nil 455 } 456 457 // IPContainerProxyAddDelReply defines message 'ip_container_proxy_add_del_reply'. 458 type IPContainerProxyAddDelReply struct { 459 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 460 } 461 462 func (m *IPContainerProxyAddDelReply) Reset() { *m = IPContainerProxyAddDelReply{} } 463 func (*IPContainerProxyAddDelReply) GetMessageName() string { 464 return "ip_container_proxy_add_del_reply" 465 } 466 func (*IPContainerProxyAddDelReply) GetCrcString() string { return "e8d4e804" } 467 func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType { 468 return api.ReplyMessage 469 } 470 471 func (m *IPContainerProxyAddDelReply) Size() (size int) { 472 if m == nil { 473 return 0 474 } 475 size += 4 // m.Retval 476 return size 477 } 478 func (m *IPContainerProxyAddDelReply) Marshal(b []byte) ([]byte, error) { 479 if b == nil { 480 b = make([]byte, m.Size()) 481 } 482 buf := codec.NewBuffer(b) 483 buf.EncodeInt32(m.Retval) 484 return buf.Bytes(), nil 485 } 486 func (m *IPContainerProxyAddDelReply) Unmarshal(b []byte) error { 487 buf := codec.NewBuffer(b) 488 m.Retval = buf.DecodeInt32() 489 return nil 490 } 491 492 // IPContainerProxyDetails defines message 'ip_container_proxy_details'. 493 type IPContainerProxyDetails struct { 494 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 495 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 496 } 497 498 func (m *IPContainerProxyDetails) Reset() { *m = IPContainerProxyDetails{} } 499 func (*IPContainerProxyDetails) GetMessageName() string { return "ip_container_proxy_details" } 500 func (*IPContainerProxyDetails) GetCrcString() string { return "a8085523" } 501 func (*IPContainerProxyDetails) GetMessageType() api.MessageType { 502 return api.ReplyMessage 503 } 504 505 func (m *IPContainerProxyDetails) Size() (size int) { 506 if m == nil { 507 return 0 508 } 509 size += 4 // m.SwIfIndex 510 size += 1 // m.Prefix.Address.Af 511 size += 1 * 16 // m.Prefix.Address.Un 512 size += 1 // m.Prefix.Len 513 return size 514 } 515 func (m *IPContainerProxyDetails) Marshal(b []byte) ([]byte, error) { 516 if b == nil { 517 b = make([]byte, m.Size()) 518 } 519 buf := codec.NewBuffer(b) 520 buf.EncodeUint32(uint32(m.SwIfIndex)) 521 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 522 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 523 buf.EncodeUint8(m.Prefix.Len) 524 return buf.Bytes(), nil 525 } 526 func (m *IPContainerProxyDetails) Unmarshal(b []byte) error { 527 buf := codec.NewBuffer(b) 528 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 529 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 530 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 531 m.Prefix.Len = buf.DecodeUint8() 532 return nil 533 } 534 535 // IPContainerProxyDump defines message 'ip_container_proxy_dump'. 536 type IPContainerProxyDump struct{} 537 538 func (m *IPContainerProxyDump) Reset() { *m = IPContainerProxyDump{} } 539 func (*IPContainerProxyDump) GetMessageName() string { return "ip_container_proxy_dump" } 540 func (*IPContainerProxyDump) GetCrcString() string { return "51077d14" } 541 func (*IPContainerProxyDump) GetMessageType() api.MessageType { 542 return api.RequestMessage 543 } 544 545 func (m *IPContainerProxyDump) Size() (size int) { 546 if m == nil { 547 return 0 548 } 549 return size 550 } 551 func (m *IPContainerProxyDump) Marshal(b []byte) ([]byte, error) { 552 if b == nil { 553 b = make([]byte, m.Size()) 554 } 555 buf := codec.NewBuffer(b) 556 return buf.Bytes(), nil 557 } 558 func (m *IPContainerProxyDump) Unmarshal(b []byte) error { 559 return nil 560 } 561 562 // IPDetails defines message 'ip_details'. 563 type IPDetails struct { 564 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 565 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 566 } 567 568 func (m *IPDetails) Reset() { *m = IPDetails{} } 569 func (*IPDetails) GetMessageName() string { return "ip_details" } 570 func (*IPDetails) GetCrcString() string { return "eb152d07" } 571 func (*IPDetails) GetMessageType() api.MessageType { 572 return api.ReplyMessage 573 } 574 575 func (m *IPDetails) Size() (size int) { 576 if m == nil { 577 return 0 578 } 579 size += 4 // m.SwIfIndex 580 size += 1 // m.IsIPv6 581 return size 582 } 583 func (m *IPDetails) Marshal(b []byte) ([]byte, error) { 584 if b == nil { 585 b = make([]byte, m.Size()) 586 } 587 buf := codec.NewBuffer(b) 588 buf.EncodeUint32(uint32(m.SwIfIndex)) 589 buf.EncodeBool(m.IsIPv6) 590 return buf.Bytes(), nil 591 } 592 func (m *IPDetails) Unmarshal(b []byte) error { 593 buf := codec.NewBuffer(b) 594 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 595 m.IsIPv6 = buf.DecodeBool() 596 return nil 597 } 598 599 // IPDump defines message 'ip_dump'. 600 type IPDump struct { 601 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 602 } 603 604 func (m *IPDump) Reset() { *m = IPDump{} } 605 func (*IPDump) GetMessageName() string { return "ip_dump" } 606 func (*IPDump) GetCrcString() string { return "98d231ca" } 607 func (*IPDump) GetMessageType() api.MessageType { 608 return api.RequestMessage 609 } 610 611 func (m *IPDump) Size() (size int) { 612 if m == nil { 613 return 0 614 } 615 size += 1 // m.IsIPv6 616 return size 617 } 618 func (m *IPDump) Marshal(b []byte) ([]byte, error) { 619 if b == nil { 620 b = make([]byte, m.Size()) 621 } 622 buf := codec.NewBuffer(b) 623 buf.EncodeBool(m.IsIPv6) 624 return buf.Bytes(), nil 625 } 626 func (m *IPDump) Unmarshal(b []byte) error { 627 buf := codec.NewBuffer(b) 628 m.IsIPv6 = buf.DecodeBool() 629 return nil 630 } 631 632 // IPMrouteAddDel defines message 'ip_mroute_add_del'. 633 type IPMrouteAddDel struct { 634 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 635 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"` 636 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"` 637 } 638 639 func (m *IPMrouteAddDel) Reset() { *m = IPMrouteAddDel{} } 640 func (*IPMrouteAddDel) GetMessageName() string { return "ip_mroute_add_del" } 641 func (*IPMrouteAddDel) GetCrcString() string { return "0dd7e790" } 642 func (*IPMrouteAddDel) GetMessageType() api.MessageType { 643 return api.RequestMessage 644 } 645 646 func (m *IPMrouteAddDel) Size() (size int) { 647 if m == nil { 648 return 0 649 } 650 size += 1 // m.IsAdd 651 size += 1 // m.IsMultipath 652 size += 4 // m.Route.TableID 653 size += 4 // m.Route.EntryFlags 654 size += 4 // m.Route.RpfID 655 size += 1 // m.Route.Prefix.Af 656 size += 2 // m.Route.Prefix.GrpAddressLength 657 size += 1 * 16 // m.Route.Prefix.GrpAddress 658 size += 1 * 16 // m.Route.Prefix.SrcAddress 659 size += 1 // m.Route.NPaths 660 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 661 var s2 mfib_types.MfibPath 662 _ = s2 663 if j2 < len(m.Route.Paths) { 664 s2 = m.Route.Paths[j2] 665 } 666 size += 4 // s2.ItfFlags 667 size += 4 // s2.Path.SwIfIndex 668 size += 4 // s2.Path.TableID 669 size += 4 // s2.Path.RpfID 670 size += 1 // s2.Path.Weight 671 size += 1 // s2.Path.Preference 672 size += 4 // s2.Path.Type 673 size += 4 // s2.Path.Flags 674 size += 4 // s2.Path.Proto 675 size += 1 * 16 // s2.Path.Nh.Address 676 size += 4 // s2.Path.Nh.ViaLabel 677 size += 4 // s2.Path.Nh.ObjID 678 size += 4 // s2.Path.Nh.ClassifyTableIndex 679 size += 1 // s2.Path.NLabels 680 for j4 := 0; j4 < 16; j4++ { 681 size += 1 // s2.Path.LabelStack[j4].IsUniform 682 size += 4 // s2.Path.LabelStack[j4].Label 683 size += 1 // s2.Path.LabelStack[j4].TTL 684 size += 1 // s2.Path.LabelStack[j4].Exp 685 } 686 } 687 return size 688 } 689 func (m *IPMrouteAddDel) Marshal(b []byte) ([]byte, error) { 690 if b == nil { 691 b = make([]byte, m.Size()) 692 } 693 buf := codec.NewBuffer(b) 694 buf.EncodeBool(m.IsAdd) 695 buf.EncodeBool(m.IsMultipath) 696 buf.EncodeUint32(m.Route.TableID) 697 buf.EncodeUint32(uint32(m.Route.EntryFlags)) 698 buf.EncodeUint32(m.Route.RpfID) 699 buf.EncodeUint8(uint8(m.Route.Prefix.Af)) 700 buf.EncodeUint16(m.Route.Prefix.GrpAddressLength) 701 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16) 702 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16) 703 buf.EncodeUint8(uint8(len(m.Route.Paths))) 704 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 705 var v1 mfib_types.MfibPath // Paths 706 if j1 < len(m.Route.Paths) { 707 v1 = m.Route.Paths[j1] 708 } 709 buf.EncodeUint32(uint32(v1.ItfFlags)) 710 buf.EncodeUint32(v1.Path.SwIfIndex) 711 buf.EncodeUint32(v1.Path.TableID) 712 buf.EncodeUint32(v1.Path.RpfID) 713 buf.EncodeUint8(v1.Path.Weight) 714 buf.EncodeUint8(v1.Path.Preference) 715 buf.EncodeUint32(uint32(v1.Path.Type)) 716 buf.EncodeUint32(uint32(v1.Path.Flags)) 717 buf.EncodeUint32(uint32(v1.Path.Proto)) 718 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16) 719 buf.EncodeUint32(v1.Path.Nh.ViaLabel) 720 buf.EncodeUint32(v1.Path.Nh.ObjID) 721 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex) 722 buf.EncodeUint8(v1.Path.NLabels) 723 for j3 := 0; j3 < 16; j3++ { 724 buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform) 725 buf.EncodeUint32(v1.Path.LabelStack[j3].Label) 726 buf.EncodeUint8(v1.Path.LabelStack[j3].TTL) 727 buf.EncodeUint8(v1.Path.LabelStack[j3].Exp) 728 } 729 } 730 return buf.Bytes(), nil 731 } 732 func (m *IPMrouteAddDel) Unmarshal(b []byte) error { 733 buf := codec.NewBuffer(b) 734 m.IsAdd = buf.DecodeBool() 735 m.IsMultipath = buf.DecodeBool() 736 m.Route.TableID = buf.DecodeUint32() 737 m.Route.EntryFlags = mfib_types.MfibEntryFlags(buf.DecodeUint32()) 738 m.Route.RpfID = buf.DecodeUint32() 739 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8()) 740 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16() 741 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 742 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 743 m.Route.NPaths = buf.DecodeUint8() 744 m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths) 745 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 746 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32()) 747 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32() 748 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32() 749 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32() 750 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8() 751 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8() 752 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32()) 753 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 754 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 755 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 756 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32() 757 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32() 758 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32() 759 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8() 760 for j3 := 0; j3 < 16; j3++ { 761 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8() 762 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32() 763 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8() 764 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8() 765 } 766 } 767 return nil 768 } 769 770 // IPMrouteAddDelReply defines message 'ip_mroute_add_del_reply'. 771 type IPMrouteAddDelReply struct { 772 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 773 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` 774 } 775 776 func (m *IPMrouteAddDelReply) Reset() { *m = IPMrouteAddDelReply{} } 777 func (*IPMrouteAddDelReply) GetMessageName() string { return "ip_mroute_add_del_reply" } 778 func (*IPMrouteAddDelReply) GetCrcString() string { return "1992deab" } 779 func (*IPMrouteAddDelReply) GetMessageType() api.MessageType { 780 return api.ReplyMessage 781 } 782 783 func (m *IPMrouteAddDelReply) Size() (size int) { 784 if m == nil { 785 return 0 786 } 787 size += 4 // m.Retval 788 size += 4 // m.StatsIndex 789 return size 790 } 791 func (m *IPMrouteAddDelReply) Marshal(b []byte) ([]byte, error) { 792 if b == nil { 793 b = make([]byte, m.Size()) 794 } 795 buf := codec.NewBuffer(b) 796 buf.EncodeInt32(m.Retval) 797 buf.EncodeUint32(m.StatsIndex) 798 return buf.Bytes(), nil 799 } 800 func (m *IPMrouteAddDelReply) Unmarshal(b []byte) error { 801 buf := codec.NewBuffer(b) 802 m.Retval = buf.DecodeInt32() 803 m.StatsIndex = buf.DecodeUint32() 804 return nil 805 } 806 807 // IPMrouteDetails defines message 'ip_mroute_details'. 808 type IPMrouteDetails struct { 809 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"` 810 } 811 812 func (m *IPMrouteDetails) Reset() { *m = IPMrouteDetails{} } 813 func (*IPMrouteDetails) GetMessageName() string { return "ip_mroute_details" } 814 func (*IPMrouteDetails) GetCrcString() string { return "c5cb23fc" } 815 func (*IPMrouteDetails) GetMessageType() api.MessageType { 816 return api.ReplyMessage 817 } 818 819 func (m *IPMrouteDetails) Size() (size int) { 820 if m == nil { 821 return 0 822 } 823 size += 4 // m.Route.TableID 824 size += 4 // m.Route.EntryFlags 825 size += 4 // m.Route.RpfID 826 size += 1 // m.Route.Prefix.Af 827 size += 2 // m.Route.Prefix.GrpAddressLength 828 size += 1 * 16 // m.Route.Prefix.GrpAddress 829 size += 1 * 16 // m.Route.Prefix.SrcAddress 830 size += 1 // m.Route.NPaths 831 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 832 var s2 mfib_types.MfibPath 833 _ = s2 834 if j2 < len(m.Route.Paths) { 835 s2 = m.Route.Paths[j2] 836 } 837 size += 4 // s2.ItfFlags 838 size += 4 // s2.Path.SwIfIndex 839 size += 4 // s2.Path.TableID 840 size += 4 // s2.Path.RpfID 841 size += 1 // s2.Path.Weight 842 size += 1 // s2.Path.Preference 843 size += 4 // s2.Path.Type 844 size += 4 // s2.Path.Flags 845 size += 4 // s2.Path.Proto 846 size += 1 * 16 // s2.Path.Nh.Address 847 size += 4 // s2.Path.Nh.ViaLabel 848 size += 4 // s2.Path.Nh.ObjID 849 size += 4 // s2.Path.Nh.ClassifyTableIndex 850 size += 1 // s2.Path.NLabels 851 for j4 := 0; j4 < 16; j4++ { 852 size += 1 // s2.Path.LabelStack[j4].IsUniform 853 size += 4 // s2.Path.LabelStack[j4].Label 854 size += 1 // s2.Path.LabelStack[j4].TTL 855 size += 1 // s2.Path.LabelStack[j4].Exp 856 } 857 } 858 return size 859 } 860 func (m *IPMrouteDetails) Marshal(b []byte) ([]byte, error) { 861 if b == nil { 862 b = make([]byte, m.Size()) 863 } 864 buf := codec.NewBuffer(b) 865 buf.EncodeUint32(m.Route.TableID) 866 buf.EncodeUint32(uint32(m.Route.EntryFlags)) 867 buf.EncodeUint32(m.Route.RpfID) 868 buf.EncodeUint8(uint8(m.Route.Prefix.Af)) 869 buf.EncodeUint16(m.Route.Prefix.GrpAddressLength) 870 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16) 871 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16) 872 buf.EncodeUint8(uint8(len(m.Route.Paths))) 873 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 874 var v1 mfib_types.MfibPath // Paths 875 if j1 < len(m.Route.Paths) { 876 v1 = m.Route.Paths[j1] 877 } 878 buf.EncodeUint32(uint32(v1.ItfFlags)) 879 buf.EncodeUint32(v1.Path.SwIfIndex) 880 buf.EncodeUint32(v1.Path.TableID) 881 buf.EncodeUint32(v1.Path.RpfID) 882 buf.EncodeUint8(v1.Path.Weight) 883 buf.EncodeUint8(v1.Path.Preference) 884 buf.EncodeUint32(uint32(v1.Path.Type)) 885 buf.EncodeUint32(uint32(v1.Path.Flags)) 886 buf.EncodeUint32(uint32(v1.Path.Proto)) 887 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16) 888 buf.EncodeUint32(v1.Path.Nh.ViaLabel) 889 buf.EncodeUint32(v1.Path.Nh.ObjID) 890 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex) 891 buf.EncodeUint8(v1.Path.NLabels) 892 for j3 := 0; j3 < 16; j3++ { 893 buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform) 894 buf.EncodeUint32(v1.Path.LabelStack[j3].Label) 895 buf.EncodeUint8(v1.Path.LabelStack[j3].TTL) 896 buf.EncodeUint8(v1.Path.LabelStack[j3].Exp) 897 } 898 } 899 return buf.Bytes(), nil 900 } 901 func (m *IPMrouteDetails) Unmarshal(b []byte) error { 902 buf := codec.NewBuffer(b) 903 m.Route.TableID = buf.DecodeUint32() 904 m.Route.EntryFlags = mfib_types.MfibEntryFlags(buf.DecodeUint32()) 905 m.Route.RpfID = buf.DecodeUint32() 906 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8()) 907 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16() 908 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 909 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 910 m.Route.NPaths = buf.DecodeUint8() 911 m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths) 912 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 913 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32()) 914 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32() 915 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32() 916 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32() 917 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8() 918 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8() 919 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32()) 920 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 921 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 922 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 923 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32() 924 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32() 925 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32() 926 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8() 927 for j3 := 0; j3 < 16; j3++ { 928 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8() 929 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32() 930 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8() 931 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8() 932 } 933 } 934 return nil 935 } 936 937 // IPMrouteDump defines message 'ip_mroute_dump'. 938 type IPMrouteDump struct { 939 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 940 } 941 942 func (m *IPMrouteDump) Reset() { *m = IPMrouteDump{} } 943 func (*IPMrouteDump) GetMessageName() string { return "ip_mroute_dump" } 944 func (*IPMrouteDump) GetCrcString() string { return "b9d2e09e" } 945 func (*IPMrouteDump) GetMessageType() api.MessageType { 946 return api.RequestMessage 947 } 948 949 func (m *IPMrouteDump) Size() (size int) { 950 if m == nil { 951 return 0 952 } 953 size += 4 // m.Table.TableID 954 size += 1 // m.Table.IsIP6 955 size += 64 // m.Table.Name 956 return size 957 } 958 func (m *IPMrouteDump) Marshal(b []byte) ([]byte, error) { 959 if b == nil { 960 b = make([]byte, m.Size()) 961 } 962 buf := codec.NewBuffer(b) 963 buf.EncodeUint32(m.Table.TableID) 964 buf.EncodeBool(m.Table.IsIP6) 965 buf.EncodeString(m.Table.Name, 64) 966 return buf.Bytes(), nil 967 } 968 func (m *IPMrouteDump) Unmarshal(b []byte) error { 969 buf := codec.NewBuffer(b) 970 m.Table.TableID = buf.DecodeUint32() 971 m.Table.IsIP6 = buf.DecodeBool() 972 m.Table.Name = buf.DecodeString(64) 973 return nil 974 } 975 976 // IPMtableDetails defines message 'ip_mtable_details'. 977 type IPMtableDetails struct { 978 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 979 } 980 981 func (m *IPMtableDetails) Reset() { *m = IPMtableDetails{} } 982 func (*IPMtableDetails) GetMessageName() string { return "ip_mtable_details" } 983 func (*IPMtableDetails) GetCrcString() string { return "b9d2e09e" } 984 func (*IPMtableDetails) GetMessageType() api.MessageType { 985 return api.RequestMessage 986 } 987 988 func (m *IPMtableDetails) Size() (size int) { 989 if m == nil { 990 return 0 991 } 992 size += 4 // m.Table.TableID 993 size += 1 // m.Table.IsIP6 994 size += 64 // m.Table.Name 995 return size 996 } 997 func (m *IPMtableDetails) Marshal(b []byte) ([]byte, error) { 998 if b == nil { 999 b = make([]byte, m.Size()) 1000 } 1001 buf := codec.NewBuffer(b) 1002 buf.EncodeUint32(m.Table.TableID) 1003 buf.EncodeBool(m.Table.IsIP6) 1004 buf.EncodeString(m.Table.Name, 64) 1005 return buf.Bytes(), nil 1006 } 1007 func (m *IPMtableDetails) Unmarshal(b []byte) error { 1008 buf := codec.NewBuffer(b) 1009 m.Table.TableID = buf.DecodeUint32() 1010 m.Table.IsIP6 = buf.DecodeBool() 1011 m.Table.Name = buf.DecodeString(64) 1012 return nil 1013 } 1014 1015 // IPMtableDump defines message 'ip_mtable_dump'. 1016 type IPMtableDump struct{} 1017 1018 func (m *IPMtableDump) Reset() { *m = IPMtableDump{} } 1019 func (*IPMtableDump) GetMessageName() string { return "ip_mtable_dump" } 1020 func (*IPMtableDump) GetCrcString() string { return "51077d14" } 1021 func (*IPMtableDump) GetMessageType() api.MessageType { 1022 return api.RequestMessage 1023 } 1024 1025 func (m *IPMtableDump) Size() (size int) { 1026 if m == nil { 1027 return 0 1028 } 1029 return size 1030 } 1031 func (m *IPMtableDump) Marshal(b []byte) ([]byte, error) { 1032 if b == nil { 1033 b = make([]byte, m.Size()) 1034 } 1035 buf := codec.NewBuffer(b) 1036 return buf.Bytes(), nil 1037 } 1038 func (m *IPMtableDump) Unmarshal(b []byte) error { 1039 return nil 1040 } 1041 1042 // IPPathMtuDetails defines message 'ip_path_mtu_details'. 1043 type IPPathMtuDetails struct { 1044 Pmtu IPPathMtu `binapi:"ip_path_mtu,name=pmtu" json:"pmtu,omitempty"` 1045 } 1046 1047 func (m *IPPathMtuDetails) Reset() { *m = IPPathMtuDetails{} } 1048 func (*IPPathMtuDetails) GetMessageName() string { return "ip_path_mtu_details" } 1049 func (*IPPathMtuDetails) GetCrcString() string { return "ac9539a7" } 1050 func (*IPPathMtuDetails) GetMessageType() api.MessageType { 1051 return api.ReplyMessage 1052 } 1053 1054 func (m *IPPathMtuDetails) Size() (size int) { 1055 if m == nil { 1056 return 0 1057 } 1058 size += 4 // m.Pmtu.ClientIndex 1059 size += 4 // m.Pmtu.Context 1060 size += 4 // m.Pmtu.TableID 1061 size += 1 // m.Pmtu.Nh.Af 1062 size += 1 * 16 // m.Pmtu.Nh.Un 1063 size += 2 // m.Pmtu.PathMtu 1064 return size 1065 } 1066 func (m *IPPathMtuDetails) Marshal(b []byte) ([]byte, error) { 1067 if b == nil { 1068 b = make([]byte, m.Size()) 1069 } 1070 buf := codec.NewBuffer(b) 1071 buf.EncodeUint32(m.Pmtu.ClientIndex) 1072 buf.EncodeUint32(m.Pmtu.Context) 1073 buf.EncodeUint32(m.Pmtu.TableID) 1074 buf.EncodeUint8(uint8(m.Pmtu.Nh.Af)) 1075 buf.EncodeBytes(m.Pmtu.Nh.Un.XXX_UnionData[:], 16) 1076 buf.EncodeUint16(m.Pmtu.PathMtu) 1077 return buf.Bytes(), nil 1078 } 1079 func (m *IPPathMtuDetails) Unmarshal(b []byte) error { 1080 buf := codec.NewBuffer(b) 1081 m.Pmtu.ClientIndex = buf.DecodeUint32() 1082 m.Pmtu.Context = buf.DecodeUint32() 1083 m.Pmtu.TableID = buf.DecodeUint32() 1084 m.Pmtu.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1085 copy(m.Pmtu.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1086 m.Pmtu.PathMtu = buf.DecodeUint16() 1087 return nil 1088 } 1089 1090 // IPPathMtuGet defines message 'ip_path_mtu_get'. 1091 type IPPathMtuGet struct { 1092 Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` 1093 } 1094 1095 func (m *IPPathMtuGet) Reset() { *m = IPPathMtuGet{} } 1096 func (*IPPathMtuGet) GetMessageName() string { return "ip_path_mtu_get" } 1097 func (*IPPathMtuGet) GetCrcString() string { return "f75ba505" } 1098 func (*IPPathMtuGet) GetMessageType() api.MessageType { 1099 return api.RequestMessage 1100 } 1101 1102 func (m *IPPathMtuGet) Size() (size int) { 1103 if m == nil { 1104 return 0 1105 } 1106 size += 4 // m.Cursor 1107 return size 1108 } 1109 func (m *IPPathMtuGet) Marshal(b []byte) ([]byte, error) { 1110 if b == nil { 1111 b = make([]byte, m.Size()) 1112 } 1113 buf := codec.NewBuffer(b) 1114 buf.EncodeUint32(m.Cursor) 1115 return buf.Bytes(), nil 1116 } 1117 func (m *IPPathMtuGet) Unmarshal(b []byte) error { 1118 buf := codec.NewBuffer(b) 1119 m.Cursor = buf.DecodeUint32() 1120 return nil 1121 } 1122 1123 // IPPathMtuGetReply defines message 'ip_path_mtu_get_reply'. 1124 type IPPathMtuGetReply struct { 1125 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1126 Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` 1127 } 1128 1129 func (m *IPPathMtuGetReply) Reset() { *m = IPPathMtuGetReply{} } 1130 func (*IPPathMtuGetReply) GetMessageName() string { return "ip_path_mtu_get_reply" } 1131 func (*IPPathMtuGetReply) GetCrcString() string { return "53b48f5d" } 1132 func (*IPPathMtuGetReply) GetMessageType() api.MessageType { 1133 return api.ReplyMessage 1134 } 1135 1136 func (m *IPPathMtuGetReply) Size() (size int) { 1137 if m == nil { 1138 return 0 1139 } 1140 size += 4 // m.Retval 1141 size += 4 // m.Cursor 1142 return size 1143 } 1144 func (m *IPPathMtuGetReply) Marshal(b []byte) ([]byte, error) { 1145 if b == nil { 1146 b = make([]byte, m.Size()) 1147 } 1148 buf := codec.NewBuffer(b) 1149 buf.EncodeInt32(m.Retval) 1150 buf.EncodeUint32(m.Cursor) 1151 return buf.Bytes(), nil 1152 } 1153 func (m *IPPathMtuGetReply) Unmarshal(b []byte) error { 1154 buf := codec.NewBuffer(b) 1155 m.Retval = buf.DecodeInt32() 1156 m.Cursor = buf.DecodeUint32() 1157 return nil 1158 } 1159 1160 // IPPathMtuReplaceBegin defines message 'ip_path_mtu_replace_begin'. 1161 type IPPathMtuReplaceBegin struct{} 1162 1163 func (m *IPPathMtuReplaceBegin) Reset() { *m = IPPathMtuReplaceBegin{} } 1164 func (*IPPathMtuReplaceBegin) GetMessageName() string { return "ip_path_mtu_replace_begin" } 1165 func (*IPPathMtuReplaceBegin) GetCrcString() string { return "51077d14" } 1166 func (*IPPathMtuReplaceBegin) GetMessageType() api.MessageType { 1167 return api.RequestMessage 1168 } 1169 1170 func (m *IPPathMtuReplaceBegin) Size() (size int) { 1171 if m == nil { 1172 return 0 1173 } 1174 return size 1175 } 1176 func (m *IPPathMtuReplaceBegin) Marshal(b []byte) ([]byte, error) { 1177 if b == nil { 1178 b = make([]byte, m.Size()) 1179 } 1180 buf := codec.NewBuffer(b) 1181 return buf.Bytes(), nil 1182 } 1183 func (m *IPPathMtuReplaceBegin) Unmarshal(b []byte) error { 1184 return nil 1185 } 1186 1187 // IPPathMtuReplaceBeginReply defines message 'ip_path_mtu_replace_begin_reply'. 1188 type IPPathMtuReplaceBeginReply struct { 1189 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1190 } 1191 1192 func (m *IPPathMtuReplaceBeginReply) Reset() { *m = IPPathMtuReplaceBeginReply{} } 1193 func (*IPPathMtuReplaceBeginReply) GetMessageName() string { return "ip_path_mtu_replace_begin_reply" } 1194 func (*IPPathMtuReplaceBeginReply) GetCrcString() string { return "e8d4e804" } 1195 func (*IPPathMtuReplaceBeginReply) GetMessageType() api.MessageType { 1196 return api.ReplyMessage 1197 } 1198 1199 func (m *IPPathMtuReplaceBeginReply) Size() (size int) { 1200 if m == nil { 1201 return 0 1202 } 1203 size += 4 // m.Retval 1204 return size 1205 } 1206 func (m *IPPathMtuReplaceBeginReply) Marshal(b []byte) ([]byte, error) { 1207 if b == nil { 1208 b = make([]byte, m.Size()) 1209 } 1210 buf := codec.NewBuffer(b) 1211 buf.EncodeInt32(m.Retval) 1212 return buf.Bytes(), nil 1213 } 1214 func (m *IPPathMtuReplaceBeginReply) Unmarshal(b []byte) error { 1215 buf := codec.NewBuffer(b) 1216 m.Retval = buf.DecodeInt32() 1217 return nil 1218 } 1219 1220 // IPPathMtuReplaceEnd defines message 'ip_path_mtu_replace_end'. 1221 type IPPathMtuReplaceEnd struct{} 1222 1223 func (m *IPPathMtuReplaceEnd) Reset() { *m = IPPathMtuReplaceEnd{} } 1224 func (*IPPathMtuReplaceEnd) GetMessageName() string { return "ip_path_mtu_replace_end" } 1225 func (*IPPathMtuReplaceEnd) GetCrcString() string { return "51077d14" } 1226 func (*IPPathMtuReplaceEnd) GetMessageType() api.MessageType { 1227 return api.RequestMessage 1228 } 1229 1230 func (m *IPPathMtuReplaceEnd) Size() (size int) { 1231 if m == nil { 1232 return 0 1233 } 1234 return size 1235 } 1236 func (m *IPPathMtuReplaceEnd) Marshal(b []byte) ([]byte, error) { 1237 if b == nil { 1238 b = make([]byte, m.Size()) 1239 } 1240 buf := codec.NewBuffer(b) 1241 return buf.Bytes(), nil 1242 } 1243 func (m *IPPathMtuReplaceEnd) Unmarshal(b []byte) error { 1244 return nil 1245 } 1246 1247 // IPPathMtuReplaceEndReply defines message 'ip_path_mtu_replace_end_reply'. 1248 type IPPathMtuReplaceEndReply struct { 1249 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1250 } 1251 1252 func (m *IPPathMtuReplaceEndReply) Reset() { *m = IPPathMtuReplaceEndReply{} } 1253 func (*IPPathMtuReplaceEndReply) GetMessageName() string { return "ip_path_mtu_replace_end_reply" } 1254 func (*IPPathMtuReplaceEndReply) GetCrcString() string { return "e8d4e804" } 1255 func (*IPPathMtuReplaceEndReply) GetMessageType() api.MessageType { 1256 return api.ReplyMessage 1257 } 1258 1259 func (m *IPPathMtuReplaceEndReply) Size() (size int) { 1260 if m == nil { 1261 return 0 1262 } 1263 size += 4 // m.Retval 1264 return size 1265 } 1266 func (m *IPPathMtuReplaceEndReply) Marshal(b []byte) ([]byte, error) { 1267 if b == nil { 1268 b = make([]byte, m.Size()) 1269 } 1270 buf := codec.NewBuffer(b) 1271 buf.EncodeInt32(m.Retval) 1272 return buf.Bytes(), nil 1273 } 1274 func (m *IPPathMtuReplaceEndReply) Unmarshal(b []byte) error { 1275 buf := codec.NewBuffer(b) 1276 m.Retval = buf.DecodeInt32() 1277 return nil 1278 } 1279 1280 // IPPathMtuUpdate defines message 'ip_path_mtu_update'. 1281 type IPPathMtuUpdate struct { 1282 Pmtu IPPathMtu `binapi:"ip_path_mtu,name=pmtu" json:"pmtu,omitempty"` 1283 } 1284 1285 func (m *IPPathMtuUpdate) Reset() { *m = IPPathMtuUpdate{} } 1286 func (*IPPathMtuUpdate) GetMessageName() string { return "ip_path_mtu_update" } 1287 func (*IPPathMtuUpdate) GetCrcString() string { return "10bbe5cb" } 1288 func (*IPPathMtuUpdate) GetMessageType() api.MessageType { 1289 return api.RequestMessage 1290 } 1291 1292 func (m *IPPathMtuUpdate) Size() (size int) { 1293 if m == nil { 1294 return 0 1295 } 1296 size += 4 // m.Pmtu.ClientIndex 1297 size += 4 // m.Pmtu.Context 1298 size += 4 // m.Pmtu.TableID 1299 size += 1 // m.Pmtu.Nh.Af 1300 size += 1 * 16 // m.Pmtu.Nh.Un 1301 size += 2 // m.Pmtu.PathMtu 1302 return size 1303 } 1304 func (m *IPPathMtuUpdate) Marshal(b []byte) ([]byte, error) { 1305 if b == nil { 1306 b = make([]byte, m.Size()) 1307 } 1308 buf := codec.NewBuffer(b) 1309 buf.EncodeUint32(m.Pmtu.ClientIndex) 1310 buf.EncodeUint32(m.Pmtu.Context) 1311 buf.EncodeUint32(m.Pmtu.TableID) 1312 buf.EncodeUint8(uint8(m.Pmtu.Nh.Af)) 1313 buf.EncodeBytes(m.Pmtu.Nh.Un.XXX_UnionData[:], 16) 1314 buf.EncodeUint16(m.Pmtu.PathMtu) 1315 return buf.Bytes(), nil 1316 } 1317 func (m *IPPathMtuUpdate) Unmarshal(b []byte) error { 1318 buf := codec.NewBuffer(b) 1319 m.Pmtu.ClientIndex = buf.DecodeUint32() 1320 m.Pmtu.Context = buf.DecodeUint32() 1321 m.Pmtu.TableID = buf.DecodeUint32() 1322 m.Pmtu.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1323 copy(m.Pmtu.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1324 m.Pmtu.PathMtu = buf.DecodeUint16() 1325 return nil 1326 } 1327 1328 // IPPathMtuUpdateReply defines message 'ip_path_mtu_update_reply'. 1329 type IPPathMtuUpdateReply struct { 1330 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1331 } 1332 1333 func (m *IPPathMtuUpdateReply) Reset() { *m = IPPathMtuUpdateReply{} } 1334 func (*IPPathMtuUpdateReply) GetMessageName() string { return "ip_path_mtu_update_reply" } 1335 func (*IPPathMtuUpdateReply) GetCrcString() string { return "e8d4e804" } 1336 func (*IPPathMtuUpdateReply) GetMessageType() api.MessageType { 1337 return api.ReplyMessage 1338 } 1339 1340 func (m *IPPathMtuUpdateReply) Size() (size int) { 1341 if m == nil { 1342 return 0 1343 } 1344 size += 4 // m.Retval 1345 return size 1346 } 1347 func (m *IPPathMtuUpdateReply) Marshal(b []byte) ([]byte, error) { 1348 if b == nil { 1349 b = make([]byte, m.Size()) 1350 } 1351 buf := codec.NewBuffer(b) 1352 buf.EncodeInt32(m.Retval) 1353 return buf.Bytes(), nil 1354 } 1355 func (m *IPPathMtuUpdateReply) Unmarshal(b []byte) error { 1356 buf := codec.NewBuffer(b) 1357 m.Retval = buf.DecodeInt32() 1358 return nil 1359 } 1360 1361 // IPPuntPolice defines message 'ip_punt_police'. 1362 type IPPuntPolice struct { 1363 PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"` 1364 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 1365 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 1366 } 1367 1368 func (m *IPPuntPolice) Reset() { *m = IPPuntPolice{} } 1369 func (*IPPuntPolice) GetMessageName() string { return "ip_punt_police" } 1370 func (*IPPuntPolice) GetCrcString() string { return "db867cea" } 1371 func (*IPPuntPolice) GetMessageType() api.MessageType { 1372 return api.RequestMessage 1373 } 1374 1375 func (m *IPPuntPolice) Size() (size int) { 1376 if m == nil { 1377 return 0 1378 } 1379 size += 4 // m.PolicerIndex 1380 size += 1 // m.IsAdd 1381 size += 1 // m.IsIP6 1382 return size 1383 } 1384 func (m *IPPuntPolice) Marshal(b []byte) ([]byte, error) { 1385 if b == nil { 1386 b = make([]byte, m.Size()) 1387 } 1388 buf := codec.NewBuffer(b) 1389 buf.EncodeUint32(m.PolicerIndex) 1390 buf.EncodeBool(m.IsAdd) 1391 buf.EncodeBool(m.IsIP6) 1392 return buf.Bytes(), nil 1393 } 1394 func (m *IPPuntPolice) Unmarshal(b []byte) error { 1395 buf := codec.NewBuffer(b) 1396 m.PolicerIndex = buf.DecodeUint32() 1397 m.IsAdd = buf.DecodeBool() 1398 m.IsIP6 = buf.DecodeBool() 1399 return nil 1400 } 1401 1402 // IPPuntPoliceReply defines message 'ip_punt_police_reply'. 1403 type IPPuntPoliceReply struct { 1404 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1405 } 1406 1407 func (m *IPPuntPoliceReply) Reset() { *m = IPPuntPoliceReply{} } 1408 func (*IPPuntPoliceReply) GetMessageName() string { return "ip_punt_police_reply" } 1409 func (*IPPuntPoliceReply) GetCrcString() string { return "e8d4e804" } 1410 func (*IPPuntPoliceReply) GetMessageType() api.MessageType { 1411 return api.ReplyMessage 1412 } 1413 1414 func (m *IPPuntPoliceReply) Size() (size int) { 1415 if m == nil { 1416 return 0 1417 } 1418 size += 4 // m.Retval 1419 return size 1420 } 1421 func (m *IPPuntPoliceReply) Marshal(b []byte) ([]byte, error) { 1422 if b == nil { 1423 b = make([]byte, m.Size()) 1424 } 1425 buf := codec.NewBuffer(b) 1426 buf.EncodeInt32(m.Retval) 1427 return buf.Bytes(), nil 1428 } 1429 func (m *IPPuntPoliceReply) Unmarshal(b []byte) error { 1430 buf := codec.NewBuffer(b) 1431 m.Retval = buf.DecodeInt32() 1432 return nil 1433 } 1434 1435 // IPPuntRedirect defines message 'ip_punt_redirect'. 1436 type IPPuntRedirect struct { 1437 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"` 1438 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 1439 } 1440 1441 func (m *IPPuntRedirect) Reset() { *m = IPPuntRedirect{} } 1442 func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" } 1443 func (*IPPuntRedirect) GetCrcString() string { return "6580f635" } 1444 func (*IPPuntRedirect) GetMessageType() api.MessageType { 1445 return api.RequestMessage 1446 } 1447 1448 func (m *IPPuntRedirect) Size() (size int) { 1449 if m == nil { 1450 return 0 1451 } 1452 size += 4 // m.Punt.RxSwIfIndex 1453 size += 4 // m.Punt.TxSwIfIndex 1454 size += 1 // m.Punt.Nh.Af 1455 size += 1 * 16 // m.Punt.Nh.Un 1456 size += 1 // m.IsAdd 1457 return size 1458 } 1459 func (m *IPPuntRedirect) Marshal(b []byte) ([]byte, error) { 1460 if b == nil { 1461 b = make([]byte, m.Size()) 1462 } 1463 buf := codec.NewBuffer(b) 1464 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex)) 1465 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex)) 1466 buf.EncodeUint8(uint8(m.Punt.Nh.Af)) 1467 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16) 1468 buf.EncodeBool(m.IsAdd) 1469 return buf.Bytes(), nil 1470 } 1471 func (m *IPPuntRedirect) Unmarshal(b []byte) error { 1472 buf := codec.NewBuffer(b) 1473 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1474 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1475 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1476 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1477 m.IsAdd = buf.DecodeBool() 1478 return nil 1479 } 1480 1481 // IPPuntRedirectDetails defines message 'ip_punt_redirect_details'. 1482 type IPPuntRedirectDetails struct { 1483 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"` 1484 } 1485 1486 func (m *IPPuntRedirectDetails) Reset() { *m = IPPuntRedirectDetails{} } 1487 func (*IPPuntRedirectDetails) GetMessageName() string { return "ip_punt_redirect_details" } 1488 func (*IPPuntRedirectDetails) GetCrcString() string { return "2cef63e7" } 1489 func (*IPPuntRedirectDetails) GetMessageType() api.MessageType { 1490 return api.ReplyMessage 1491 } 1492 1493 func (m *IPPuntRedirectDetails) Size() (size int) { 1494 if m == nil { 1495 return 0 1496 } 1497 size += 4 // m.Punt.RxSwIfIndex 1498 size += 4 // m.Punt.TxSwIfIndex 1499 size += 1 // m.Punt.Nh.Af 1500 size += 1 * 16 // m.Punt.Nh.Un 1501 return size 1502 } 1503 func (m *IPPuntRedirectDetails) Marshal(b []byte) ([]byte, error) { 1504 if b == nil { 1505 b = make([]byte, m.Size()) 1506 } 1507 buf := codec.NewBuffer(b) 1508 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex)) 1509 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex)) 1510 buf.EncodeUint8(uint8(m.Punt.Nh.Af)) 1511 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16) 1512 return buf.Bytes(), nil 1513 } 1514 func (m *IPPuntRedirectDetails) Unmarshal(b []byte) error { 1515 buf := codec.NewBuffer(b) 1516 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1517 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1518 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1519 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1520 return nil 1521 } 1522 1523 // IPPuntRedirectDump defines message 'ip_punt_redirect_dump'. 1524 type IPPuntRedirectDump struct { 1525 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1526 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 1527 } 1528 1529 func (m *IPPuntRedirectDump) Reset() { *m = IPPuntRedirectDump{} } 1530 func (*IPPuntRedirectDump) GetMessageName() string { return "ip_punt_redirect_dump" } 1531 func (*IPPuntRedirectDump) GetCrcString() string { return "2d033de4" } 1532 func (*IPPuntRedirectDump) GetMessageType() api.MessageType { 1533 return api.RequestMessage 1534 } 1535 1536 func (m *IPPuntRedirectDump) Size() (size int) { 1537 if m == nil { 1538 return 0 1539 } 1540 size += 4 // m.SwIfIndex 1541 size += 1 // m.IsIPv6 1542 return size 1543 } 1544 func (m *IPPuntRedirectDump) Marshal(b []byte) ([]byte, error) { 1545 if b == nil { 1546 b = make([]byte, m.Size()) 1547 } 1548 buf := codec.NewBuffer(b) 1549 buf.EncodeUint32(uint32(m.SwIfIndex)) 1550 buf.EncodeBool(m.IsIPv6) 1551 return buf.Bytes(), nil 1552 } 1553 func (m *IPPuntRedirectDump) Unmarshal(b []byte) error { 1554 buf := codec.NewBuffer(b) 1555 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1556 m.IsIPv6 = buf.DecodeBool() 1557 return nil 1558 } 1559 1560 // IPPuntRedirectReply defines message 'ip_punt_redirect_reply'. 1561 type IPPuntRedirectReply struct { 1562 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1563 } 1564 1565 func (m *IPPuntRedirectReply) Reset() { *m = IPPuntRedirectReply{} } 1566 func (*IPPuntRedirectReply) GetMessageName() string { return "ip_punt_redirect_reply" } 1567 func (*IPPuntRedirectReply) GetCrcString() string { return "e8d4e804" } 1568 func (*IPPuntRedirectReply) GetMessageType() api.MessageType { 1569 return api.ReplyMessage 1570 } 1571 1572 func (m *IPPuntRedirectReply) Size() (size int) { 1573 if m == nil { 1574 return 0 1575 } 1576 size += 4 // m.Retval 1577 return size 1578 } 1579 func (m *IPPuntRedirectReply) Marshal(b []byte) ([]byte, error) { 1580 if b == nil { 1581 b = make([]byte, m.Size()) 1582 } 1583 buf := codec.NewBuffer(b) 1584 buf.EncodeInt32(m.Retval) 1585 return buf.Bytes(), nil 1586 } 1587 func (m *IPPuntRedirectReply) Unmarshal(b []byte) error { 1588 buf := codec.NewBuffer(b) 1589 m.Retval = buf.DecodeInt32() 1590 return nil 1591 } 1592 1593 // IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'. 1594 type IPReassemblyEnableDisable struct { 1595 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1596 EnableIP4 bool `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"` 1597 EnableIP6 bool `binapi:"bool,name=enable_ip6" json:"enable_ip6,omitempty"` 1598 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"` 1599 } 1600 1601 func (m *IPReassemblyEnableDisable) Reset() { *m = IPReassemblyEnableDisable{} } 1602 func (*IPReassemblyEnableDisable) GetMessageName() string { return "ip_reassembly_enable_disable" } 1603 func (*IPReassemblyEnableDisable) GetCrcString() string { return "eb77968d" } 1604 func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType { 1605 return api.RequestMessage 1606 } 1607 1608 func (m *IPReassemblyEnableDisable) Size() (size int) { 1609 if m == nil { 1610 return 0 1611 } 1612 size += 4 // m.SwIfIndex 1613 size += 1 // m.EnableIP4 1614 size += 1 // m.EnableIP6 1615 size += 4 // m.Type 1616 return size 1617 } 1618 func (m *IPReassemblyEnableDisable) Marshal(b []byte) ([]byte, error) { 1619 if b == nil { 1620 b = make([]byte, m.Size()) 1621 } 1622 buf := codec.NewBuffer(b) 1623 buf.EncodeUint32(uint32(m.SwIfIndex)) 1624 buf.EncodeBool(m.EnableIP4) 1625 buf.EncodeBool(m.EnableIP6) 1626 buf.EncodeUint32(uint32(m.Type)) 1627 return buf.Bytes(), nil 1628 } 1629 func (m *IPReassemblyEnableDisable) Unmarshal(b []byte) error { 1630 buf := codec.NewBuffer(b) 1631 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1632 m.EnableIP4 = buf.DecodeBool() 1633 m.EnableIP6 = buf.DecodeBool() 1634 m.Type = IPReassType(buf.DecodeUint32()) 1635 return nil 1636 } 1637 1638 // IPReassemblyEnableDisableReply defines message 'ip_reassembly_enable_disable_reply'. 1639 type IPReassemblyEnableDisableReply struct { 1640 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1641 } 1642 1643 func (m *IPReassemblyEnableDisableReply) Reset() { *m = IPReassemblyEnableDisableReply{} } 1644 func (*IPReassemblyEnableDisableReply) GetMessageName() string { 1645 return "ip_reassembly_enable_disable_reply" 1646 } 1647 func (*IPReassemblyEnableDisableReply) GetCrcString() string { return "e8d4e804" } 1648 func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType { 1649 return api.ReplyMessage 1650 } 1651 1652 func (m *IPReassemblyEnableDisableReply) Size() (size int) { 1653 if m == nil { 1654 return 0 1655 } 1656 size += 4 // m.Retval 1657 return size 1658 } 1659 func (m *IPReassemblyEnableDisableReply) Marshal(b []byte) ([]byte, error) { 1660 if b == nil { 1661 b = make([]byte, m.Size()) 1662 } 1663 buf := codec.NewBuffer(b) 1664 buf.EncodeInt32(m.Retval) 1665 return buf.Bytes(), nil 1666 } 1667 func (m *IPReassemblyEnableDisableReply) Unmarshal(b []byte) error { 1668 buf := codec.NewBuffer(b) 1669 m.Retval = buf.DecodeInt32() 1670 return nil 1671 } 1672 1673 // IPReassemblyGet defines message 'ip_reassembly_get'. 1674 type IPReassemblyGet struct { 1675 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 1676 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"` 1677 } 1678 1679 func (m *IPReassemblyGet) Reset() { *m = IPReassemblyGet{} } 1680 func (*IPReassemblyGet) GetMessageName() string { return "ip_reassembly_get" } 1681 func (*IPReassemblyGet) GetCrcString() string { return "ea13ff63" } 1682 func (*IPReassemblyGet) GetMessageType() api.MessageType { 1683 return api.RequestMessage 1684 } 1685 1686 func (m *IPReassemblyGet) Size() (size int) { 1687 if m == nil { 1688 return 0 1689 } 1690 size += 1 // m.IsIP6 1691 size += 4 // m.Type 1692 return size 1693 } 1694 func (m *IPReassemblyGet) Marshal(b []byte) ([]byte, error) { 1695 if b == nil { 1696 b = make([]byte, m.Size()) 1697 } 1698 buf := codec.NewBuffer(b) 1699 buf.EncodeBool(m.IsIP6) 1700 buf.EncodeUint32(uint32(m.Type)) 1701 return buf.Bytes(), nil 1702 } 1703 func (m *IPReassemblyGet) Unmarshal(b []byte) error { 1704 buf := codec.NewBuffer(b) 1705 m.IsIP6 = buf.DecodeBool() 1706 m.Type = IPReassType(buf.DecodeUint32()) 1707 return nil 1708 } 1709 1710 // IPReassemblyGetReply defines message 'ip_reassembly_get_reply'. 1711 type IPReassemblyGetReply struct { 1712 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1713 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"` 1714 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"` 1715 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"` 1716 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"` 1717 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 1718 } 1719 1720 func (m *IPReassemblyGetReply) Reset() { *m = IPReassemblyGetReply{} } 1721 func (*IPReassemblyGetReply) GetMessageName() string { return "ip_reassembly_get_reply" } 1722 func (*IPReassemblyGetReply) GetCrcString() string { return "d5eb8d34" } 1723 func (*IPReassemblyGetReply) GetMessageType() api.MessageType { 1724 return api.ReplyMessage 1725 } 1726 1727 func (m *IPReassemblyGetReply) Size() (size int) { 1728 if m == nil { 1729 return 0 1730 } 1731 size += 4 // m.Retval 1732 size += 4 // m.TimeoutMs 1733 size += 4 // m.MaxReassemblies 1734 size += 4 // m.MaxReassemblyLength 1735 size += 4 // m.ExpireWalkIntervalMs 1736 size += 1 // m.IsIP6 1737 return size 1738 } 1739 func (m *IPReassemblyGetReply) Marshal(b []byte) ([]byte, error) { 1740 if b == nil { 1741 b = make([]byte, m.Size()) 1742 } 1743 buf := codec.NewBuffer(b) 1744 buf.EncodeInt32(m.Retval) 1745 buf.EncodeUint32(m.TimeoutMs) 1746 buf.EncodeUint32(m.MaxReassemblies) 1747 buf.EncodeUint32(m.MaxReassemblyLength) 1748 buf.EncodeUint32(m.ExpireWalkIntervalMs) 1749 buf.EncodeBool(m.IsIP6) 1750 return buf.Bytes(), nil 1751 } 1752 func (m *IPReassemblyGetReply) Unmarshal(b []byte) error { 1753 buf := codec.NewBuffer(b) 1754 m.Retval = buf.DecodeInt32() 1755 m.TimeoutMs = buf.DecodeUint32() 1756 m.MaxReassemblies = buf.DecodeUint32() 1757 m.MaxReassemblyLength = buf.DecodeUint32() 1758 m.ExpireWalkIntervalMs = buf.DecodeUint32() 1759 m.IsIP6 = buf.DecodeBool() 1760 return nil 1761 } 1762 1763 // IPReassemblySet defines message 'ip_reassembly_set'. 1764 type IPReassemblySet struct { 1765 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"` 1766 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"` 1767 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"` 1768 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"` 1769 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 1770 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"` 1771 } 1772 1773 func (m *IPReassemblySet) Reset() { *m = IPReassemblySet{} } 1774 func (*IPReassemblySet) GetMessageName() string { return "ip_reassembly_set" } 1775 func (*IPReassemblySet) GetCrcString() string { return "16467d25" } 1776 func (*IPReassemblySet) GetMessageType() api.MessageType { 1777 return api.RequestMessage 1778 } 1779 1780 func (m *IPReassemblySet) Size() (size int) { 1781 if m == nil { 1782 return 0 1783 } 1784 size += 4 // m.TimeoutMs 1785 size += 4 // m.MaxReassemblies 1786 size += 4 // m.MaxReassemblyLength 1787 size += 4 // m.ExpireWalkIntervalMs 1788 size += 1 // m.IsIP6 1789 size += 4 // m.Type 1790 return size 1791 } 1792 func (m *IPReassemblySet) Marshal(b []byte) ([]byte, error) { 1793 if b == nil { 1794 b = make([]byte, m.Size()) 1795 } 1796 buf := codec.NewBuffer(b) 1797 buf.EncodeUint32(m.TimeoutMs) 1798 buf.EncodeUint32(m.MaxReassemblies) 1799 buf.EncodeUint32(m.MaxReassemblyLength) 1800 buf.EncodeUint32(m.ExpireWalkIntervalMs) 1801 buf.EncodeBool(m.IsIP6) 1802 buf.EncodeUint32(uint32(m.Type)) 1803 return buf.Bytes(), nil 1804 } 1805 func (m *IPReassemblySet) Unmarshal(b []byte) error { 1806 buf := codec.NewBuffer(b) 1807 m.TimeoutMs = buf.DecodeUint32() 1808 m.MaxReassemblies = buf.DecodeUint32() 1809 m.MaxReassemblyLength = buf.DecodeUint32() 1810 m.ExpireWalkIntervalMs = buf.DecodeUint32() 1811 m.IsIP6 = buf.DecodeBool() 1812 m.Type = IPReassType(buf.DecodeUint32()) 1813 return nil 1814 } 1815 1816 // IPReassemblySetReply defines message 'ip_reassembly_set_reply'. 1817 type IPReassemblySetReply struct { 1818 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1819 } 1820 1821 func (m *IPReassemblySetReply) Reset() { *m = IPReassemblySetReply{} } 1822 func (*IPReassemblySetReply) GetMessageName() string { return "ip_reassembly_set_reply" } 1823 func (*IPReassemblySetReply) GetCrcString() string { return "e8d4e804" } 1824 func (*IPReassemblySetReply) GetMessageType() api.MessageType { 1825 return api.ReplyMessage 1826 } 1827 1828 func (m *IPReassemblySetReply) Size() (size int) { 1829 if m == nil { 1830 return 0 1831 } 1832 size += 4 // m.Retval 1833 return size 1834 } 1835 func (m *IPReassemblySetReply) Marshal(b []byte) ([]byte, error) { 1836 if b == nil { 1837 b = make([]byte, m.Size()) 1838 } 1839 buf := codec.NewBuffer(b) 1840 buf.EncodeInt32(m.Retval) 1841 return buf.Bytes(), nil 1842 } 1843 func (m *IPReassemblySetReply) Unmarshal(b []byte) error { 1844 buf := codec.NewBuffer(b) 1845 m.Retval = buf.DecodeInt32() 1846 return nil 1847 } 1848 1849 // IPRouteAddDel defines message 'ip_route_add_del'. 1850 type IPRouteAddDel struct { 1851 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 1852 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"` 1853 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"` 1854 } 1855 1856 func (m *IPRouteAddDel) Reset() { *m = IPRouteAddDel{} } 1857 func (*IPRouteAddDel) GetMessageName() string { return "ip_route_add_del" } 1858 func (*IPRouteAddDel) GetCrcString() string { return "b8ecfe0d" } 1859 func (*IPRouteAddDel) GetMessageType() api.MessageType { 1860 return api.RequestMessage 1861 } 1862 1863 func (m *IPRouteAddDel) Size() (size int) { 1864 if m == nil { 1865 return 0 1866 } 1867 size += 1 // m.IsAdd 1868 size += 1 // m.IsMultipath 1869 size += 4 // m.Route.TableID 1870 size += 4 // m.Route.StatsIndex 1871 size += 1 // m.Route.Prefix.Address.Af 1872 size += 1 * 16 // m.Route.Prefix.Address.Un 1873 size += 1 // m.Route.Prefix.Len 1874 size += 1 // m.Route.NPaths 1875 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 1876 var s2 fib_types.FibPath 1877 _ = s2 1878 if j2 < len(m.Route.Paths) { 1879 s2 = m.Route.Paths[j2] 1880 } 1881 size += 4 // s2.SwIfIndex 1882 size += 4 // s2.TableID 1883 size += 4 // s2.RpfID 1884 size += 1 // s2.Weight 1885 size += 1 // s2.Preference 1886 size += 4 // s2.Type 1887 size += 4 // s2.Flags 1888 size += 4 // s2.Proto 1889 size += 1 * 16 // s2.Nh.Address 1890 size += 4 // s2.Nh.ViaLabel 1891 size += 4 // s2.Nh.ObjID 1892 size += 4 // s2.Nh.ClassifyTableIndex 1893 size += 1 // s2.NLabels 1894 for j3 := 0; j3 < 16; j3++ { 1895 size += 1 // s2.LabelStack[j3].IsUniform 1896 size += 4 // s2.LabelStack[j3].Label 1897 size += 1 // s2.LabelStack[j3].TTL 1898 size += 1 // s2.LabelStack[j3].Exp 1899 } 1900 } 1901 return size 1902 } 1903 func (m *IPRouteAddDel) Marshal(b []byte) ([]byte, error) { 1904 if b == nil { 1905 b = make([]byte, m.Size()) 1906 } 1907 buf := codec.NewBuffer(b) 1908 buf.EncodeBool(m.IsAdd) 1909 buf.EncodeBool(m.IsMultipath) 1910 buf.EncodeUint32(m.Route.TableID) 1911 buf.EncodeUint32(m.Route.StatsIndex) 1912 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 1913 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 1914 buf.EncodeUint8(m.Route.Prefix.Len) 1915 buf.EncodeUint8(uint8(len(m.Route.Paths))) 1916 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 1917 var v1 fib_types.FibPath // Paths 1918 if j1 < len(m.Route.Paths) { 1919 v1 = m.Route.Paths[j1] 1920 } 1921 buf.EncodeUint32(v1.SwIfIndex) 1922 buf.EncodeUint32(v1.TableID) 1923 buf.EncodeUint32(v1.RpfID) 1924 buf.EncodeUint8(v1.Weight) 1925 buf.EncodeUint8(v1.Preference) 1926 buf.EncodeUint32(uint32(v1.Type)) 1927 buf.EncodeUint32(uint32(v1.Flags)) 1928 buf.EncodeUint32(uint32(v1.Proto)) 1929 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 1930 buf.EncodeUint32(v1.Nh.ViaLabel) 1931 buf.EncodeUint32(v1.Nh.ObjID) 1932 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 1933 buf.EncodeUint8(v1.NLabels) 1934 for j2 := 0; j2 < 16; j2++ { 1935 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 1936 buf.EncodeUint32(v1.LabelStack[j2].Label) 1937 buf.EncodeUint8(v1.LabelStack[j2].TTL) 1938 buf.EncodeUint8(v1.LabelStack[j2].Exp) 1939 } 1940 } 1941 return buf.Bytes(), nil 1942 } 1943 func (m *IPRouteAddDel) Unmarshal(b []byte) error { 1944 buf := codec.NewBuffer(b) 1945 m.IsAdd = buf.DecodeBool() 1946 m.IsMultipath = buf.DecodeBool() 1947 m.Route.TableID = buf.DecodeUint32() 1948 m.Route.StatsIndex = buf.DecodeUint32() 1949 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1950 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1951 m.Route.Prefix.Len = buf.DecodeUint8() 1952 m.Route.NPaths = buf.DecodeUint8() 1953 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 1954 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 1955 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 1956 m.Route.Paths[j1].TableID = buf.DecodeUint32() 1957 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 1958 m.Route.Paths[j1].Weight = buf.DecodeUint8() 1959 m.Route.Paths[j1].Preference = buf.DecodeUint8() 1960 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 1961 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 1962 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 1963 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 1964 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 1965 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 1966 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 1967 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 1968 for j2 := 0; j2 < 16; j2++ { 1969 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 1970 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 1971 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 1972 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 1973 } 1974 } 1975 return nil 1976 } 1977 1978 // IPRouteAddDelReply defines message 'ip_route_add_del_reply'. 1979 type IPRouteAddDelReply struct { 1980 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1981 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` 1982 } 1983 1984 func (m *IPRouteAddDelReply) Reset() { *m = IPRouteAddDelReply{} } 1985 func (*IPRouteAddDelReply) GetMessageName() string { return "ip_route_add_del_reply" } 1986 func (*IPRouteAddDelReply) GetCrcString() string { return "1992deab" } 1987 func (*IPRouteAddDelReply) GetMessageType() api.MessageType { 1988 return api.ReplyMessage 1989 } 1990 1991 func (m *IPRouteAddDelReply) Size() (size int) { 1992 if m == nil { 1993 return 0 1994 } 1995 size += 4 // m.Retval 1996 size += 4 // m.StatsIndex 1997 return size 1998 } 1999 func (m *IPRouteAddDelReply) Marshal(b []byte) ([]byte, error) { 2000 if b == nil { 2001 b = make([]byte, m.Size()) 2002 } 2003 buf := codec.NewBuffer(b) 2004 buf.EncodeInt32(m.Retval) 2005 buf.EncodeUint32(m.StatsIndex) 2006 return buf.Bytes(), nil 2007 } 2008 func (m *IPRouteAddDelReply) Unmarshal(b []byte) error { 2009 buf := codec.NewBuffer(b) 2010 m.Retval = buf.DecodeInt32() 2011 m.StatsIndex = buf.DecodeUint32() 2012 return nil 2013 } 2014 2015 // IPRouteAddDelV2 defines message 'ip_route_add_del_v2'. 2016 // InProgress: the message form may change in the future versions 2017 type IPRouteAddDelV2 struct { 2018 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 2019 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"` 2020 Route IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"` 2021 } 2022 2023 func (m *IPRouteAddDelV2) Reset() { *m = IPRouteAddDelV2{} } 2024 func (*IPRouteAddDelV2) GetMessageName() string { return "ip_route_add_del_v2" } 2025 func (*IPRouteAddDelV2) GetCrcString() string { return "521ef330" } 2026 func (*IPRouteAddDelV2) GetMessageType() api.MessageType { 2027 return api.RequestMessage 2028 } 2029 2030 func (m *IPRouteAddDelV2) Size() (size int) { 2031 if m == nil { 2032 return 0 2033 } 2034 size += 1 // m.IsAdd 2035 size += 1 // m.IsMultipath 2036 size += 4 // m.Route.TableID 2037 size += 4 // m.Route.StatsIndex 2038 size += 1 // m.Route.Prefix.Address.Af 2039 size += 1 * 16 // m.Route.Prefix.Address.Un 2040 size += 1 // m.Route.Prefix.Len 2041 size += 1 // m.Route.NPaths 2042 size += 1 // m.Route.Src 2043 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 2044 var s2 fib_types.FibPath 2045 _ = s2 2046 if j2 < len(m.Route.Paths) { 2047 s2 = m.Route.Paths[j2] 2048 } 2049 size += 4 // s2.SwIfIndex 2050 size += 4 // s2.TableID 2051 size += 4 // s2.RpfID 2052 size += 1 // s2.Weight 2053 size += 1 // s2.Preference 2054 size += 4 // s2.Type 2055 size += 4 // s2.Flags 2056 size += 4 // s2.Proto 2057 size += 1 * 16 // s2.Nh.Address 2058 size += 4 // s2.Nh.ViaLabel 2059 size += 4 // s2.Nh.ObjID 2060 size += 4 // s2.Nh.ClassifyTableIndex 2061 size += 1 // s2.NLabels 2062 for j3 := 0; j3 < 16; j3++ { 2063 size += 1 // s2.LabelStack[j3].IsUniform 2064 size += 4 // s2.LabelStack[j3].Label 2065 size += 1 // s2.LabelStack[j3].TTL 2066 size += 1 // s2.LabelStack[j3].Exp 2067 } 2068 } 2069 return size 2070 } 2071 func (m *IPRouteAddDelV2) Marshal(b []byte) ([]byte, error) { 2072 if b == nil { 2073 b = make([]byte, m.Size()) 2074 } 2075 buf := codec.NewBuffer(b) 2076 buf.EncodeBool(m.IsAdd) 2077 buf.EncodeBool(m.IsMultipath) 2078 buf.EncodeUint32(m.Route.TableID) 2079 buf.EncodeUint32(m.Route.StatsIndex) 2080 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 2081 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 2082 buf.EncodeUint8(m.Route.Prefix.Len) 2083 buf.EncodeUint8(uint8(len(m.Route.Paths))) 2084 buf.EncodeUint8(m.Route.Src) 2085 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2086 var v1 fib_types.FibPath // Paths 2087 if j1 < len(m.Route.Paths) { 2088 v1 = m.Route.Paths[j1] 2089 } 2090 buf.EncodeUint32(v1.SwIfIndex) 2091 buf.EncodeUint32(v1.TableID) 2092 buf.EncodeUint32(v1.RpfID) 2093 buf.EncodeUint8(v1.Weight) 2094 buf.EncodeUint8(v1.Preference) 2095 buf.EncodeUint32(uint32(v1.Type)) 2096 buf.EncodeUint32(uint32(v1.Flags)) 2097 buf.EncodeUint32(uint32(v1.Proto)) 2098 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 2099 buf.EncodeUint32(v1.Nh.ViaLabel) 2100 buf.EncodeUint32(v1.Nh.ObjID) 2101 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 2102 buf.EncodeUint8(v1.NLabels) 2103 for j2 := 0; j2 < 16; j2++ { 2104 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 2105 buf.EncodeUint32(v1.LabelStack[j2].Label) 2106 buf.EncodeUint8(v1.LabelStack[j2].TTL) 2107 buf.EncodeUint8(v1.LabelStack[j2].Exp) 2108 } 2109 } 2110 return buf.Bytes(), nil 2111 } 2112 func (m *IPRouteAddDelV2) Unmarshal(b []byte) error { 2113 buf := codec.NewBuffer(b) 2114 m.IsAdd = buf.DecodeBool() 2115 m.IsMultipath = buf.DecodeBool() 2116 m.Route.TableID = buf.DecodeUint32() 2117 m.Route.StatsIndex = buf.DecodeUint32() 2118 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2119 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2120 m.Route.Prefix.Len = buf.DecodeUint8() 2121 m.Route.NPaths = buf.DecodeUint8() 2122 m.Route.Src = buf.DecodeUint8() 2123 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 2124 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2125 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 2126 m.Route.Paths[j1].TableID = buf.DecodeUint32() 2127 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 2128 m.Route.Paths[j1].Weight = buf.DecodeUint8() 2129 m.Route.Paths[j1].Preference = buf.DecodeUint8() 2130 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 2131 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 2132 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 2133 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 2134 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 2135 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 2136 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 2137 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 2138 for j2 := 0; j2 < 16; j2++ { 2139 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 2140 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 2141 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 2142 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 2143 } 2144 } 2145 return nil 2146 } 2147 2148 // IPRouteAddDelV2Reply defines message 'ip_route_add_del_v2_reply'. 2149 // InProgress: the message form may change in the future versions 2150 type IPRouteAddDelV2Reply struct { 2151 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2152 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` 2153 } 2154 2155 func (m *IPRouteAddDelV2Reply) Reset() { *m = IPRouteAddDelV2Reply{} } 2156 func (*IPRouteAddDelV2Reply) GetMessageName() string { return "ip_route_add_del_v2_reply" } 2157 func (*IPRouteAddDelV2Reply) GetCrcString() string { return "1992deab" } 2158 func (*IPRouteAddDelV2Reply) GetMessageType() api.MessageType { 2159 return api.ReplyMessage 2160 } 2161 2162 func (m *IPRouteAddDelV2Reply) Size() (size int) { 2163 if m == nil { 2164 return 0 2165 } 2166 size += 4 // m.Retval 2167 size += 4 // m.StatsIndex 2168 return size 2169 } 2170 func (m *IPRouteAddDelV2Reply) Marshal(b []byte) ([]byte, error) { 2171 if b == nil { 2172 b = make([]byte, m.Size()) 2173 } 2174 buf := codec.NewBuffer(b) 2175 buf.EncodeInt32(m.Retval) 2176 buf.EncodeUint32(m.StatsIndex) 2177 return buf.Bytes(), nil 2178 } 2179 func (m *IPRouteAddDelV2Reply) Unmarshal(b []byte) error { 2180 buf := codec.NewBuffer(b) 2181 m.Retval = buf.DecodeInt32() 2182 m.StatsIndex = buf.DecodeUint32() 2183 return nil 2184 } 2185 2186 // IPRouteDetails defines message 'ip_route_details'. 2187 type IPRouteDetails struct { 2188 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"` 2189 } 2190 2191 func (m *IPRouteDetails) Reset() { *m = IPRouteDetails{} } 2192 func (*IPRouteDetails) GetMessageName() string { return "ip_route_details" } 2193 func (*IPRouteDetails) GetCrcString() string { return "bda8f315" } 2194 func (*IPRouteDetails) GetMessageType() api.MessageType { 2195 return api.ReplyMessage 2196 } 2197 2198 func (m *IPRouteDetails) Size() (size int) { 2199 if m == nil { 2200 return 0 2201 } 2202 size += 4 // m.Route.TableID 2203 size += 4 // m.Route.StatsIndex 2204 size += 1 // m.Route.Prefix.Address.Af 2205 size += 1 * 16 // m.Route.Prefix.Address.Un 2206 size += 1 // m.Route.Prefix.Len 2207 size += 1 // m.Route.NPaths 2208 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 2209 var s2 fib_types.FibPath 2210 _ = s2 2211 if j2 < len(m.Route.Paths) { 2212 s2 = m.Route.Paths[j2] 2213 } 2214 size += 4 // s2.SwIfIndex 2215 size += 4 // s2.TableID 2216 size += 4 // s2.RpfID 2217 size += 1 // s2.Weight 2218 size += 1 // s2.Preference 2219 size += 4 // s2.Type 2220 size += 4 // s2.Flags 2221 size += 4 // s2.Proto 2222 size += 1 * 16 // s2.Nh.Address 2223 size += 4 // s2.Nh.ViaLabel 2224 size += 4 // s2.Nh.ObjID 2225 size += 4 // s2.Nh.ClassifyTableIndex 2226 size += 1 // s2.NLabels 2227 for j3 := 0; j3 < 16; j3++ { 2228 size += 1 // s2.LabelStack[j3].IsUniform 2229 size += 4 // s2.LabelStack[j3].Label 2230 size += 1 // s2.LabelStack[j3].TTL 2231 size += 1 // s2.LabelStack[j3].Exp 2232 } 2233 } 2234 return size 2235 } 2236 func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) { 2237 if b == nil { 2238 b = make([]byte, m.Size()) 2239 } 2240 buf := codec.NewBuffer(b) 2241 buf.EncodeUint32(m.Route.TableID) 2242 buf.EncodeUint32(m.Route.StatsIndex) 2243 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 2244 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 2245 buf.EncodeUint8(m.Route.Prefix.Len) 2246 buf.EncodeUint8(uint8(len(m.Route.Paths))) 2247 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2248 var v1 fib_types.FibPath // Paths 2249 if j1 < len(m.Route.Paths) { 2250 v1 = m.Route.Paths[j1] 2251 } 2252 buf.EncodeUint32(v1.SwIfIndex) 2253 buf.EncodeUint32(v1.TableID) 2254 buf.EncodeUint32(v1.RpfID) 2255 buf.EncodeUint8(v1.Weight) 2256 buf.EncodeUint8(v1.Preference) 2257 buf.EncodeUint32(uint32(v1.Type)) 2258 buf.EncodeUint32(uint32(v1.Flags)) 2259 buf.EncodeUint32(uint32(v1.Proto)) 2260 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 2261 buf.EncodeUint32(v1.Nh.ViaLabel) 2262 buf.EncodeUint32(v1.Nh.ObjID) 2263 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 2264 buf.EncodeUint8(v1.NLabels) 2265 for j2 := 0; j2 < 16; j2++ { 2266 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 2267 buf.EncodeUint32(v1.LabelStack[j2].Label) 2268 buf.EncodeUint8(v1.LabelStack[j2].TTL) 2269 buf.EncodeUint8(v1.LabelStack[j2].Exp) 2270 } 2271 } 2272 return buf.Bytes(), nil 2273 } 2274 func (m *IPRouteDetails) Unmarshal(b []byte) error { 2275 buf := codec.NewBuffer(b) 2276 m.Route.TableID = buf.DecodeUint32() 2277 m.Route.StatsIndex = buf.DecodeUint32() 2278 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2279 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2280 m.Route.Prefix.Len = buf.DecodeUint8() 2281 m.Route.NPaths = buf.DecodeUint8() 2282 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 2283 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2284 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 2285 m.Route.Paths[j1].TableID = buf.DecodeUint32() 2286 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 2287 m.Route.Paths[j1].Weight = buf.DecodeUint8() 2288 m.Route.Paths[j1].Preference = buf.DecodeUint8() 2289 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 2290 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 2291 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 2292 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 2293 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 2294 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 2295 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 2296 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 2297 for j2 := 0; j2 < 16; j2++ { 2298 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 2299 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 2300 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 2301 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 2302 } 2303 } 2304 return nil 2305 } 2306 2307 // IPRouteDump defines message 'ip_route_dump'. 2308 type IPRouteDump struct { 2309 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 2310 } 2311 2312 func (m *IPRouteDump) Reset() { *m = IPRouteDump{} } 2313 func (*IPRouteDump) GetMessageName() string { return "ip_route_dump" } 2314 func (*IPRouteDump) GetCrcString() string { return "b9d2e09e" } 2315 func (*IPRouteDump) GetMessageType() api.MessageType { 2316 return api.RequestMessage 2317 } 2318 2319 func (m *IPRouteDump) Size() (size int) { 2320 if m == nil { 2321 return 0 2322 } 2323 size += 4 // m.Table.TableID 2324 size += 1 // m.Table.IsIP6 2325 size += 64 // m.Table.Name 2326 return size 2327 } 2328 func (m *IPRouteDump) Marshal(b []byte) ([]byte, error) { 2329 if b == nil { 2330 b = make([]byte, m.Size()) 2331 } 2332 buf := codec.NewBuffer(b) 2333 buf.EncodeUint32(m.Table.TableID) 2334 buf.EncodeBool(m.Table.IsIP6) 2335 buf.EncodeString(m.Table.Name, 64) 2336 return buf.Bytes(), nil 2337 } 2338 func (m *IPRouteDump) Unmarshal(b []byte) error { 2339 buf := codec.NewBuffer(b) 2340 m.Table.TableID = buf.DecodeUint32() 2341 m.Table.IsIP6 = buf.DecodeBool() 2342 m.Table.Name = buf.DecodeString(64) 2343 return nil 2344 } 2345 2346 // IPRouteLookup defines message 'ip_route_lookup'. 2347 type IPRouteLookup struct { 2348 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 2349 Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"` 2350 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 2351 } 2352 2353 func (m *IPRouteLookup) Reset() { *m = IPRouteLookup{} } 2354 func (*IPRouteLookup) GetMessageName() string { return "ip_route_lookup" } 2355 func (*IPRouteLookup) GetCrcString() string { return "710d6471" } 2356 func (*IPRouteLookup) GetMessageType() api.MessageType { 2357 return api.RequestMessage 2358 } 2359 2360 func (m *IPRouteLookup) Size() (size int) { 2361 if m == nil { 2362 return 0 2363 } 2364 size += 4 // m.TableID 2365 size += 1 // m.Exact 2366 size += 1 // m.Prefix.Address.Af 2367 size += 1 * 16 // m.Prefix.Address.Un 2368 size += 1 // m.Prefix.Len 2369 return size 2370 } 2371 func (m *IPRouteLookup) Marshal(b []byte) ([]byte, error) { 2372 if b == nil { 2373 b = make([]byte, m.Size()) 2374 } 2375 buf := codec.NewBuffer(b) 2376 buf.EncodeUint32(m.TableID) 2377 buf.EncodeUint8(m.Exact) 2378 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 2379 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 2380 buf.EncodeUint8(m.Prefix.Len) 2381 return buf.Bytes(), nil 2382 } 2383 func (m *IPRouteLookup) Unmarshal(b []byte) error { 2384 buf := codec.NewBuffer(b) 2385 m.TableID = buf.DecodeUint32() 2386 m.Exact = buf.DecodeUint8() 2387 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2388 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2389 m.Prefix.Len = buf.DecodeUint8() 2390 return nil 2391 } 2392 2393 // IPRouteLookupReply defines message 'ip_route_lookup_reply'. 2394 type IPRouteLookupReply struct { 2395 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2396 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"` 2397 } 2398 2399 func (m *IPRouteLookupReply) Reset() { *m = IPRouteLookupReply{} } 2400 func (*IPRouteLookupReply) GetMessageName() string { return "ip_route_lookup_reply" } 2401 func (*IPRouteLookupReply) GetCrcString() string { return "5d8febcb" } 2402 func (*IPRouteLookupReply) GetMessageType() api.MessageType { 2403 return api.ReplyMessage 2404 } 2405 2406 func (m *IPRouteLookupReply) Size() (size int) { 2407 if m == nil { 2408 return 0 2409 } 2410 size += 4 // m.Retval 2411 size += 4 // m.Route.TableID 2412 size += 4 // m.Route.StatsIndex 2413 size += 1 // m.Route.Prefix.Address.Af 2414 size += 1 * 16 // m.Route.Prefix.Address.Un 2415 size += 1 // m.Route.Prefix.Len 2416 size += 1 // m.Route.NPaths 2417 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 2418 var s2 fib_types.FibPath 2419 _ = s2 2420 if j2 < len(m.Route.Paths) { 2421 s2 = m.Route.Paths[j2] 2422 } 2423 size += 4 // s2.SwIfIndex 2424 size += 4 // s2.TableID 2425 size += 4 // s2.RpfID 2426 size += 1 // s2.Weight 2427 size += 1 // s2.Preference 2428 size += 4 // s2.Type 2429 size += 4 // s2.Flags 2430 size += 4 // s2.Proto 2431 size += 1 * 16 // s2.Nh.Address 2432 size += 4 // s2.Nh.ViaLabel 2433 size += 4 // s2.Nh.ObjID 2434 size += 4 // s2.Nh.ClassifyTableIndex 2435 size += 1 // s2.NLabels 2436 for j3 := 0; j3 < 16; j3++ { 2437 size += 1 // s2.LabelStack[j3].IsUniform 2438 size += 4 // s2.LabelStack[j3].Label 2439 size += 1 // s2.LabelStack[j3].TTL 2440 size += 1 // s2.LabelStack[j3].Exp 2441 } 2442 } 2443 return size 2444 } 2445 func (m *IPRouteLookupReply) Marshal(b []byte) ([]byte, error) { 2446 if b == nil { 2447 b = make([]byte, m.Size()) 2448 } 2449 buf := codec.NewBuffer(b) 2450 buf.EncodeInt32(m.Retval) 2451 buf.EncodeUint32(m.Route.TableID) 2452 buf.EncodeUint32(m.Route.StatsIndex) 2453 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 2454 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 2455 buf.EncodeUint8(m.Route.Prefix.Len) 2456 buf.EncodeUint8(uint8(len(m.Route.Paths))) 2457 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2458 var v1 fib_types.FibPath // Paths 2459 if j1 < len(m.Route.Paths) { 2460 v1 = m.Route.Paths[j1] 2461 } 2462 buf.EncodeUint32(v1.SwIfIndex) 2463 buf.EncodeUint32(v1.TableID) 2464 buf.EncodeUint32(v1.RpfID) 2465 buf.EncodeUint8(v1.Weight) 2466 buf.EncodeUint8(v1.Preference) 2467 buf.EncodeUint32(uint32(v1.Type)) 2468 buf.EncodeUint32(uint32(v1.Flags)) 2469 buf.EncodeUint32(uint32(v1.Proto)) 2470 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 2471 buf.EncodeUint32(v1.Nh.ViaLabel) 2472 buf.EncodeUint32(v1.Nh.ObjID) 2473 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 2474 buf.EncodeUint8(v1.NLabels) 2475 for j2 := 0; j2 < 16; j2++ { 2476 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 2477 buf.EncodeUint32(v1.LabelStack[j2].Label) 2478 buf.EncodeUint8(v1.LabelStack[j2].TTL) 2479 buf.EncodeUint8(v1.LabelStack[j2].Exp) 2480 } 2481 } 2482 return buf.Bytes(), nil 2483 } 2484 func (m *IPRouteLookupReply) Unmarshal(b []byte) error { 2485 buf := codec.NewBuffer(b) 2486 m.Retval = buf.DecodeInt32() 2487 m.Route.TableID = buf.DecodeUint32() 2488 m.Route.StatsIndex = buf.DecodeUint32() 2489 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2490 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2491 m.Route.Prefix.Len = buf.DecodeUint8() 2492 m.Route.NPaths = buf.DecodeUint8() 2493 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 2494 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2495 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 2496 m.Route.Paths[j1].TableID = buf.DecodeUint32() 2497 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 2498 m.Route.Paths[j1].Weight = buf.DecodeUint8() 2499 m.Route.Paths[j1].Preference = buf.DecodeUint8() 2500 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 2501 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 2502 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 2503 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 2504 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 2505 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 2506 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 2507 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 2508 for j2 := 0; j2 < 16; j2++ { 2509 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 2510 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 2511 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 2512 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 2513 } 2514 } 2515 return nil 2516 } 2517 2518 // IPRouteLookupV2 defines message 'ip_route_lookup_v2'. 2519 // InProgress: the message form may change in the future versions 2520 type IPRouteLookupV2 struct { 2521 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 2522 Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"` 2523 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 2524 } 2525 2526 func (m *IPRouteLookupV2) Reset() { *m = IPRouteLookupV2{} } 2527 func (*IPRouteLookupV2) GetMessageName() string { return "ip_route_lookup_v2" } 2528 func (*IPRouteLookupV2) GetCrcString() string { return "710d6471" } 2529 func (*IPRouteLookupV2) GetMessageType() api.MessageType { 2530 return api.RequestMessage 2531 } 2532 2533 func (m *IPRouteLookupV2) Size() (size int) { 2534 if m == nil { 2535 return 0 2536 } 2537 size += 4 // m.TableID 2538 size += 1 // m.Exact 2539 size += 1 // m.Prefix.Address.Af 2540 size += 1 * 16 // m.Prefix.Address.Un 2541 size += 1 // m.Prefix.Len 2542 return size 2543 } 2544 func (m *IPRouteLookupV2) Marshal(b []byte) ([]byte, error) { 2545 if b == nil { 2546 b = make([]byte, m.Size()) 2547 } 2548 buf := codec.NewBuffer(b) 2549 buf.EncodeUint32(m.TableID) 2550 buf.EncodeUint8(m.Exact) 2551 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 2552 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 2553 buf.EncodeUint8(m.Prefix.Len) 2554 return buf.Bytes(), nil 2555 } 2556 func (m *IPRouteLookupV2) Unmarshal(b []byte) error { 2557 buf := codec.NewBuffer(b) 2558 m.TableID = buf.DecodeUint32() 2559 m.Exact = buf.DecodeUint8() 2560 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2561 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2562 m.Prefix.Len = buf.DecodeUint8() 2563 return nil 2564 } 2565 2566 // IPRouteLookupV2Reply defines message 'ip_route_lookup_v2_reply'. 2567 // InProgress: the message form may change in the future versions 2568 type IPRouteLookupV2Reply struct { 2569 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2570 Route IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"` 2571 } 2572 2573 func (m *IPRouteLookupV2Reply) Reset() { *m = IPRouteLookupV2Reply{} } 2574 func (*IPRouteLookupV2Reply) GetMessageName() string { return "ip_route_lookup_v2_reply" } 2575 func (*IPRouteLookupV2Reply) GetCrcString() string { return "84cc9e03" } 2576 func (*IPRouteLookupV2Reply) GetMessageType() api.MessageType { 2577 return api.ReplyMessage 2578 } 2579 2580 func (m *IPRouteLookupV2Reply) Size() (size int) { 2581 if m == nil { 2582 return 0 2583 } 2584 size += 4 // m.Retval 2585 size += 4 // m.Route.TableID 2586 size += 4 // m.Route.StatsIndex 2587 size += 1 // m.Route.Prefix.Address.Af 2588 size += 1 * 16 // m.Route.Prefix.Address.Un 2589 size += 1 // m.Route.Prefix.Len 2590 size += 1 // m.Route.NPaths 2591 size += 1 // m.Route.Src 2592 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 2593 var s2 fib_types.FibPath 2594 _ = s2 2595 if j2 < len(m.Route.Paths) { 2596 s2 = m.Route.Paths[j2] 2597 } 2598 size += 4 // s2.SwIfIndex 2599 size += 4 // s2.TableID 2600 size += 4 // s2.RpfID 2601 size += 1 // s2.Weight 2602 size += 1 // s2.Preference 2603 size += 4 // s2.Type 2604 size += 4 // s2.Flags 2605 size += 4 // s2.Proto 2606 size += 1 * 16 // s2.Nh.Address 2607 size += 4 // s2.Nh.ViaLabel 2608 size += 4 // s2.Nh.ObjID 2609 size += 4 // s2.Nh.ClassifyTableIndex 2610 size += 1 // s2.NLabels 2611 for j3 := 0; j3 < 16; j3++ { 2612 size += 1 // s2.LabelStack[j3].IsUniform 2613 size += 4 // s2.LabelStack[j3].Label 2614 size += 1 // s2.LabelStack[j3].TTL 2615 size += 1 // s2.LabelStack[j3].Exp 2616 } 2617 } 2618 return size 2619 } 2620 func (m *IPRouteLookupV2Reply) Marshal(b []byte) ([]byte, error) { 2621 if b == nil { 2622 b = make([]byte, m.Size()) 2623 } 2624 buf := codec.NewBuffer(b) 2625 buf.EncodeInt32(m.Retval) 2626 buf.EncodeUint32(m.Route.TableID) 2627 buf.EncodeUint32(m.Route.StatsIndex) 2628 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 2629 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 2630 buf.EncodeUint8(m.Route.Prefix.Len) 2631 buf.EncodeUint8(uint8(len(m.Route.Paths))) 2632 buf.EncodeUint8(m.Route.Src) 2633 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2634 var v1 fib_types.FibPath // Paths 2635 if j1 < len(m.Route.Paths) { 2636 v1 = m.Route.Paths[j1] 2637 } 2638 buf.EncodeUint32(v1.SwIfIndex) 2639 buf.EncodeUint32(v1.TableID) 2640 buf.EncodeUint32(v1.RpfID) 2641 buf.EncodeUint8(v1.Weight) 2642 buf.EncodeUint8(v1.Preference) 2643 buf.EncodeUint32(uint32(v1.Type)) 2644 buf.EncodeUint32(uint32(v1.Flags)) 2645 buf.EncodeUint32(uint32(v1.Proto)) 2646 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 2647 buf.EncodeUint32(v1.Nh.ViaLabel) 2648 buf.EncodeUint32(v1.Nh.ObjID) 2649 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 2650 buf.EncodeUint8(v1.NLabels) 2651 for j2 := 0; j2 < 16; j2++ { 2652 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 2653 buf.EncodeUint32(v1.LabelStack[j2].Label) 2654 buf.EncodeUint8(v1.LabelStack[j2].TTL) 2655 buf.EncodeUint8(v1.LabelStack[j2].Exp) 2656 } 2657 } 2658 return buf.Bytes(), nil 2659 } 2660 func (m *IPRouteLookupV2Reply) Unmarshal(b []byte) error { 2661 buf := codec.NewBuffer(b) 2662 m.Retval = buf.DecodeInt32() 2663 m.Route.TableID = buf.DecodeUint32() 2664 m.Route.StatsIndex = buf.DecodeUint32() 2665 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2666 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2667 m.Route.Prefix.Len = buf.DecodeUint8() 2668 m.Route.NPaths = buf.DecodeUint8() 2669 m.Route.Src = buf.DecodeUint8() 2670 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 2671 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2672 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 2673 m.Route.Paths[j1].TableID = buf.DecodeUint32() 2674 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 2675 m.Route.Paths[j1].Weight = buf.DecodeUint8() 2676 m.Route.Paths[j1].Preference = buf.DecodeUint8() 2677 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 2678 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 2679 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 2680 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 2681 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 2682 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 2683 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 2684 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 2685 for j2 := 0; j2 < 16; j2++ { 2686 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 2687 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 2688 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 2689 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 2690 } 2691 } 2692 return nil 2693 } 2694 2695 // IPRouteV2Details defines message 'ip_route_v2_details'. 2696 // InProgress: the message form may change in the future versions 2697 type IPRouteV2Details struct { 2698 Route IPRouteV2 `binapi:"ip_route_v2,name=route" json:"route,omitempty"` 2699 } 2700 2701 func (m *IPRouteV2Details) Reset() { *m = IPRouteV2Details{} } 2702 func (*IPRouteV2Details) GetMessageName() string { return "ip_route_v2_details" } 2703 func (*IPRouteV2Details) GetCrcString() string { return "b09aa6c0" } 2704 func (*IPRouteV2Details) GetMessageType() api.MessageType { 2705 return api.ReplyMessage 2706 } 2707 2708 func (m *IPRouteV2Details) Size() (size int) { 2709 if m == nil { 2710 return 0 2711 } 2712 size += 4 // m.Route.TableID 2713 size += 4 // m.Route.StatsIndex 2714 size += 1 // m.Route.Prefix.Address.Af 2715 size += 1 * 16 // m.Route.Prefix.Address.Un 2716 size += 1 // m.Route.Prefix.Len 2717 size += 1 // m.Route.NPaths 2718 size += 1 // m.Route.Src 2719 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 2720 var s2 fib_types.FibPath 2721 _ = s2 2722 if j2 < len(m.Route.Paths) { 2723 s2 = m.Route.Paths[j2] 2724 } 2725 size += 4 // s2.SwIfIndex 2726 size += 4 // s2.TableID 2727 size += 4 // s2.RpfID 2728 size += 1 // s2.Weight 2729 size += 1 // s2.Preference 2730 size += 4 // s2.Type 2731 size += 4 // s2.Flags 2732 size += 4 // s2.Proto 2733 size += 1 * 16 // s2.Nh.Address 2734 size += 4 // s2.Nh.ViaLabel 2735 size += 4 // s2.Nh.ObjID 2736 size += 4 // s2.Nh.ClassifyTableIndex 2737 size += 1 // s2.NLabels 2738 for j3 := 0; j3 < 16; j3++ { 2739 size += 1 // s2.LabelStack[j3].IsUniform 2740 size += 4 // s2.LabelStack[j3].Label 2741 size += 1 // s2.LabelStack[j3].TTL 2742 size += 1 // s2.LabelStack[j3].Exp 2743 } 2744 } 2745 return size 2746 } 2747 func (m *IPRouteV2Details) Marshal(b []byte) ([]byte, error) { 2748 if b == nil { 2749 b = make([]byte, m.Size()) 2750 } 2751 buf := codec.NewBuffer(b) 2752 buf.EncodeUint32(m.Route.TableID) 2753 buf.EncodeUint32(m.Route.StatsIndex) 2754 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 2755 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 2756 buf.EncodeUint8(m.Route.Prefix.Len) 2757 buf.EncodeUint8(uint8(len(m.Route.Paths))) 2758 buf.EncodeUint8(m.Route.Src) 2759 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2760 var v1 fib_types.FibPath // Paths 2761 if j1 < len(m.Route.Paths) { 2762 v1 = m.Route.Paths[j1] 2763 } 2764 buf.EncodeUint32(v1.SwIfIndex) 2765 buf.EncodeUint32(v1.TableID) 2766 buf.EncodeUint32(v1.RpfID) 2767 buf.EncodeUint8(v1.Weight) 2768 buf.EncodeUint8(v1.Preference) 2769 buf.EncodeUint32(uint32(v1.Type)) 2770 buf.EncodeUint32(uint32(v1.Flags)) 2771 buf.EncodeUint32(uint32(v1.Proto)) 2772 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 2773 buf.EncodeUint32(v1.Nh.ViaLabel) 2774 buf.EncodeUint32(v1.Nh.ObjID) 2775 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 2776 buf.EncodeUint8(v1.NLabels) 2777 for j2 := 0; j2 < 16; j2++ { 2778 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 2779 buf.EncodeUint32(v1.LabelStack[j2].Label) 2780 buf.EncodeUint8(v1.LabelStack[j2].TTL) 2781 buf.EncodeUint8(v1.LabelStack[j2].Exp) 2782 } 2783 } 2784 return buf.Bytes(), nil 2785 } 2786 func (m *IPRouteV2Details) Unmarshal(b []byte) error { 2787 buf := codec.NewBuffer(b) 2788 m.Route.TableID = buf.DecodeUint32() 2789 m.Route.StatsIndex = buf.DecodeUint32() 2790 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2791 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2792 m.Route.Prefix.Len = buf.DecodeUint8() 2793 m.Route.NPaths = buf.DecodeUint8() 2794 m.Route.Src = buf.DecodeUint8() 2795 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 2796 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 2797 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 2798 m.Route.Paths[j1].TableID = buf.DecodeUint32() 2799 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 2800 m.Route.Paths[j1].Weight = buf.DecodeUint8() 2801 m.Route.Paths[j1].Preference = buf.DecodeUint8() 2802 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 2803 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 2804 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 2805 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 2806 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 2807 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 2808 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 2809 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 2810 for j2 := 0; j2 < 16; j2++ { 2811 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 2812 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 2813 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 2814 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 2815 } 2816 } 2817 return nil 2818 } 2819 2820 // IPRouteV2Dump defines message 'ip_route_v2_dump'. 2821 // InProgress: the message form may change in the future versions 2822 type IPRouteV2Dump struct { 2823 Src uint8 `binapi:"u8,name=src" json:"src,omitempty"` 2824 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 2825 } 2826 2827 func (m *IPRouteV2Dump) Reset() { *m = IPRouteV2Dump{} } 2828 func (*IPRouteV2Dump) GetMessageName() string { return "ip_route_v2_dump" } 2829 func (*IPRouteV2Dump) GetCrcString() string { return "d16f72e6" } 2830 func (*IPRouteV2Dump) GetMessageType() api.MessageType { 2831 return api.RequestMessage 2832 } 2833 2834 func (m *IPRouteV2Dump) Size() (size int) { 2835 if m == nil { 2836 return 0 2837 } 2838 size += 1 // m.Src 2839 size += 4 // m.Table.TableID 2840 size += 1 // m.Table.IsIP6 2841 size += 64 // m.Table.Name 2842 return size 2843 } 2844 func (m *IPRouteV2Dump) Marshal(b []byte) ([]byte, error) { 2845 if b == nil { 2846 b = make([]byte, m.Size()) 2847 } 2848 buf := codec.NewBuffer(b) 2849 buf.EncodeUint8(m.Src) 2850 buf.EncodeUint32(m.Table.TableID) 2851 buf.EncodeBool(m.Table.IsIP6) 2852 buf.EncodeString(m.Table.Name, 64) 2853 return buf.Bytes(), nil 2854 } 2855 func (m *IPRouteV2Dump) Unmarshal(b []byte) error { 2856 buf := codec.NewBuffer(b) 2857 m.Src = buf.DecodeUint8() 2858 m.Table.TableID = buf.DecodeUint32() 2859 m.Table.IsIP6 = buf.DecodeBool() 2860 m.Table.Name = buf.DecodeString(64) 2861 return nil 2862 } 2863 2864 // IPSourceAndPortRangeCheckAddDel defines message 'ip_source_and_port_range_check_add_del'. 2865 type IPSourceAndPortRangeCheckAddDel struct { 2866 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 2867 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 2868 NumberOfRanges uint8 `binapi:"u8,name=number_of_ranges" json:"number_of_ranges,omitempty"` 2869 LowPorts []uint16 `binapi:"u16[32],name=low_ports" json:"low_ports,omitempty"` 2870 HighPorts []uint16 `binapi:"u16[32],name=high_ports" json:"high_ports,omitempty"` 2871 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 2872 } 2873 2874 func (m *IPSourceAndPortRangeCheckAddDel) Reset() { *m = IPSourceAndPortRangeCheckAddDel{} } 2875 func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string { 2876 return "ip_source_and_port_range_check_add_del" 2877 } 2878 func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "92a067e3" } 2879 func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType { 2880 return api.RequestMessage 2881 } 2882 2883 func (m *IPSourceAndPortRangeCheckAddDel) Size() (size int) { 2884 if m == nil { 2885 return 0 2886 } 2887 size += 1 // m.IsAdd 2888 size += 1 // m.Prefix.Address.Af 2889 size += 1 * 16 // m.Prefix.Address.Un 2890 size += 1 // m.Prefix.Len 2891 size += 1 // m.NumberOfRanges 2892 size += 2 * 32 // m.LowPorts 2893 size += 2 * 32 // m.HighPorts 2894 size += 4 // m.VrfID 2895 return size 2896 } 2897 func (m *IPSourceAndPortRangeCheckAddDel) Marshal(b []byte) ([]byte, error) { 2898 if b == nil { 2899 b = make([]byte, m.Size()) 2900 } 2901 buf := codec.NewBuffer(b) 2902 buf.EncodeBool(m.IsAdd) 2903 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 2904 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 2905 buf.EncodeUint8(m.Prefix.Len) 2906 buf.EncodeUint8(m.NumberOfRanges) 2907 for i := 0; i < 32; i++ { 2908 var x uint16 2909 if i < len(m.LowPorts) { 2910 x = uint16(m.LowPorts[i]) 2911 } 2912 buf.EncodeUint16(x) 2913 } 2914 for i := 0; i < 32; i++ { 2915 var x uint16 2916 if i < len(m.HighPorts) { 2917 x = uint16(m.HighPorts[i]) 2918 } 2919 buf.EncodeUint16(x) 2920 } 2921 buf.EncodeUint32(m.VrfID) 2922 return buf.Bytes(), nil 2923 } 2924 func (m *IPSourceAndPortRangeCheckAddDel) Unmarshal(b []byte) error { 2925 buf := codec.NewBuffer(b) 2926 m.IsAdd = buf.DecodeBool() 2927 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2928 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2929 m.Prefix.Len = buf.DecodeUint8() 2930 m.NumberOfRanges = buf.DecodeUint8() 2931 m.LowPorts = make([]uint16, 32) 2932 for i := 0; i < len(m.LowPorts); i++ { 2933 m.LowPorts[i] = buf.DecodeUint16() 2934 } 2935 m.HighPorts = make([]uint16, 32) 2936 for i := 0; i < len(m.HighPorts); i++ { 2937 m.HighPorts[i] = buf.DecodeUint16() 2938 } 2939 m.VrfID = buf.DecodeUint32() 2940 return nil 2941 } 2942 2943 // IPSourceAndPortRangeCheckAddDelReply defines message 'ip_source_and_port_range_check_add_del_reply'. 2944 type IPSourceAndPortRangeCheckAddDelReply struct { 2945 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2946 } 2947 2948 func (m *IPSourceAndPortRangeCheckAddDelReply) Reset() { *m = IPSourceAndPortRangeCheckAddDelReply{} } 2949 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string { 2950 return "ip_source_and_port_range_check_add_del_reply" 2951 } 2952 func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { return "e8d4e804" } 2953 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType { 2954 return api.ReplyMessage 2955 } 2956 2957 func (m *IPSourceAndPortRangeCheckAddDelReply) Size() (size int) { 2958 if m == nil { 2959 return 0 2960 } 2961 size += 4 // m.Retval 2962 return size 2963 } 2964 func (m *IPSourceAndPortRangeCheckAddDelReply) Marshal(b []byte) ([]byte, error) { 2965 if b == nil { 2966 b = make([]byte, m.Size()) 2967 } 2968 buf := codec.NewBuffer(b) 2969 buf.EncodeInt32(m.Retval) 2970 return buf.Bytes(), nil 2971 } 2972 func (m *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(b []byte) error { 2973 buf := codec.NewBuffer(b) 2974 m.Retval = buf.DecodeInt32() 2975 return nil 2976 } 2977 2978 // IPSourceAndPortRangeCheckInterfaceAddDel defines message 'ip_source_and_port_range_check_interface_add_del'. 2979 type IPSourceAndPortRangeCheckInterfaceAddDel struct { 2980 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 2981 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2982 TCPInVrfID uint32 `binapi:"u32,name=tcp_in_vrf_id" json:"tcp_in_vrf_id,omitempty"` 2983 TCPOutVrfID uint32 `binapi:"u32,name=tcp_out_vrf_id" json:"tcp_out_vrf_id,omitempty"` 2984 UDPInVrfID uint32 `binapi:"u32,name=udp_in_vrf_id" json:"udp_in_vrf_id,omitempty"` 2985 UDPOutVrfID uint32 `binapi:"u32,name=udp_out_vrf_id" json:"udp_out_vrf_id,omitempty"` 2986 } 2987 2988 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Reset() { 2989 *m = IPSourceAndPortRangeCheckInterfaceAddDel{} 2990 } 2991 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string { 2992 return "ip_source_and_port_range_check_interface_add_del" 2993 } 2994 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { return "e1ba8987" } 2995 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType { 2996 return api.RequestMessage 2997 } 2998 2999 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() (size int) { 3000 if m == nil { 3001 return 0 3002 } 3003 size += 1 // m.IsAdd 3004 size += 4 // m.SwIfIndex 3005 size += 4 // m.TCPInVrfID 3006 size += 4 // m.TCPOutVrfID 3007 size += 4 // m.UDPInVrfID 3008 size += 4 // m.UDPOutVrfID 3009 return size 3010 } 3011 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Marshal(b []byte) ([]byte, error) { 3012 if b == nil { 3013 b = make([]byte, m.Size()) 3014 } 3015 buf := codec.NewBuffer(b) 3016 buf.EncodeBool(m.IsAdd) 3017 buf.EncodeUint32(uint32(m.SwIfIndex)) 3018 buf.EncodeUint32(m.TCPInVrfID) 3019 buf.EncodeUint32(m.TCPOutVrfID) 3020 buf.EncodeUint32(m.UDPInVrfID) 3021 buf.EncodeUint32(m.UDPOutVrfID) 3022 return buf.Bytes(), nil 3023 } 3024 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Unmarshal(b []byte) error { 3025 buf := codec.NewBuffer(b) 3026 m.IsAdd = buf.DecodeBool() 3027 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 3028 m.TCPInVrfID = buf.DecodeUint32() 3029 m.TCPOutVrfID = buf.DecodeUint32() 3030 m.UDPInVrfID = buf.DecodeUint32() 3031 m.UDPOutVrfID = buf.DecodeUint32() 3032 return nil 3033 } 3034 3035 // IPSourceAndPortRangeCheckInterfaceAddDelReply defines message 'ip_source_and_port_range_check_interface_add_del_reply'. 3036 type IPSourceAndPortRangeCheckInterfaceAddDelReply struct { 3037 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3038 } 3039 3040 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Reset() { 3041 *m = IPSourceAndPortRangeCheckInterfaceAddDelReply{} 3042 } 3043 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string { 3044 return "ip_source_and_port_range_check_interface_add_del_reply" 3045 } 3046 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" } 3047 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType { 3048 return api.ReplyMessage 3049 } 3050 3051 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Size() (size int) { 3052 if m == nil { 3053 return 0 3054 } 3055 size += 4 // m.Retval 3056 return size 3057 } 3058 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) { 3059 if b == nil { 3060 b = make([]byte, m.Size()) 3061 } 3062 buf := codec.NewBuffer(b) 3063 buf.EncodeInt32(m.Retval) 3064 return buf.Bytes(), nil 3065 } 3066 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(b []byte) error { 3067 buf := codec.NewBuffer(b) 3068 m.Retval = buf.DecodeInt32() 3069 return nil 3070 } 3071 3072 // IPTableAddDel defines message 'ip_table_add_del'. 3073 type IPTableAddDel struct { 3074 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 3075 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 3076 } 3077 3078 func (m *IPTableAddDel) Reset() { *m = IPTableAddDel{} } 3079 func (*IPTableAddDel) GetMessageName() string { return "ip_table_add_del" } 3080 func (*IPTableAddDel) GetCrcString() string { return "0ffdaec0" } 3081 func (*IPTableAddDel) GetMessageType() api.MessageType { 3082 return api.RequestMessage 3083 } 3084 3085 func (m *IPTableAddDel) Size() (size int) { 3086 if m == nil { 3087 return 0 3088 } 3089 size += 1 // m.IsAdd 3090 size += 4 // m.Table.TableID 3091 size += 1 // m.Table.IsIP6 3092 size += 64 // m.Table.Name 3093 return size 3094 } 3095 func (m *IPTableAddDel) Marshal(b []byte) ([]byte, error) { 3096 if b == nil { 3097 b = make([]byte, m.Size()) 3098 } 3099 buf := codec.NewBuffer(b) 3100 buf.EncodeBool(m.IsAdd) 3101 buf.EncodeUint32(m.Table.TableID) 3102 buf.EncodeBool(m.Table.IsIP6) 3103 buf.EncodeString(m.Table.Name, 64) 3104 return buf.Bytes(), nil 3105 } 3106 func (m *IPTableAddDel) Unmarshal(b []byte) error { 3107 buf := codec.NewBuffer(b) 3108 m.IsAdd = buf.DecodeBool() 3109 m.Table.TableID = buf.DecodeUint32() 3110 m.Table.IsIP6 = buf.DecodeBool() 3111 m.Table.Name = buf.DecodeString(64) 3112 return nil 3113 } 3114 3115 // IPTableAddDelReply defines message 'ip_table_add_del_reply'. 3116 type IPTableAddDelReply struct { 3117 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3118 } 3119 3120 func (m *IPTableAddDelReply) Reset() { *m = IPTableAddDelReply{} } 3121 func (*IPTableAddDelReply) GetMessageName() string { return "ip_table_add_del_reply" } 3122 func (*IPTableAddDelReply) GetCrcString() string { return "e8d4e804" } 3123 func (*IPTableAddDelReply) GetMessageType() api.MessageType { 3124 return api.ReplyMessage 3125 } 3126 3127 func (m *IPTableAddDelReply) Size() (size int) { 3128 if m == nil { 3129 return 0 3130 } 3131 size += 4 // m.Retval 3132 return size 3133 } 3134 func (m *IPTableAddDelReply) Marshal(b []byte) ([]byte, error) { 3135 if b == nil { 3136 b = make([]byte, m.Size()) 3137 } 3138 buf := codec.NewBuffer(b) 3139 buf.EncodeInt32(m.Retval) 3140 return buf.Bytes(), nil 3141 } 3142 func (m *IPTableAddDelReply) Unmarshal(b []byte) error { 3143 buf := codec.NewBuffer(b) 3144 m.Retval = buf.DecodeInt32() 3145 return nil 3146 } 3147 3148 // IPTableDetails defines message 'ip_table_details'. 3149 type IPTableDetails struct { 3150 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 3151 } 3152 3153 func (m *IPTableDetails) Reset() { *m = IPTableDetails{} } 3154 func (*IPTableDetails) GetMessageName() string { return "ip_table_details" } 3155 func (*IPTableDetails) GetCrcString() string { return "c79fca0f" } 3156 func (*IPTableDetails) GetMessageType() api.MessageType { 3157 return api.ReplyMessage 3158 } 3159 3160 func (m *IPTableDetails) Size() (size int) { 3161 if m == nil { 3162 return 0 3163 } 3164 size += 4 // m.Table.TableID 3165 size += 1 // m.Table.IsIP6 3166 size += 64 // m.Table.Name 3167 return size 3168 } 3169 func (m *IPTableDetails) Marshal(b []byte) ([]byte, error) { 3170 if b == nil { 3171 b = make([]byte, m.Size()) 3172 } 3173 buf := codec.NewBuffer(b) 3174 buf.EncodeUint32(m.Table.TableID) 3175 buf.EncodeBool(m.Table.IsIP6) 3176 buf.EncodeString(m.Table.Name, 64) 3177 return buf.Bytes(), nil 3178 } 3179 func (m *IPTableDetails) Unmarshal(b []byte) error { 3180 buf := codec.NewBuffer(b) 3181 m.Table.TableID = buf.DecodeUint32() 3182 m.Table.IsIP6 = buf.DecodeBool() 3183 m.Table.Name = buf.DecodeString(64) 3184 return nil 3185 } 3186 3187 // IPTableDump defines message 'ip_table_dump'. 3188 type IPTableDump struct{} 3189 3190 func (m *IPTableDump) Reset() { *m = IPTableDump{} } 3191 func (*IPTableDump) GetMessageName() string { return "ip_table_dump" } 3192 func (*IPTableDump) GetCrcString() string { return "51077d14" } 3193 func (*IPTableDump) GetMessageType() api.MessageType { 3194 return api.RequestMessage 3195 } 3196 3197 func (m *IPTableDump) Size() (size int) { 3198 if m == nil { 3199 return 0 3200 } 3201 return size 3202 } 3203 func (m *IPTableDump) Marshal(b []byte) ([]byte, error) { 3204 if b == nil { 3205 b = make([]byte, m.Size()) 3206 } 3207 buf := codec.NewBuffer(b) 3208 return buf.Bytes(), nil 3209 } 3210 func (m *IPTableDump) Unmarshal(b []byte) error { 3211 return nil 3212 } 3213 3214 // IPTableFlush defines message 'ip_table_flush'. 3215 type IPTableFlush struct { 3216 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 3217 } 3218 3219 func (m *IPTableFlush) Reset() { *m = IPTableFlush{} } 3220 func (*IPTableFlush) GetMessageName() string { return "ip_table_flush" } 3221 func (*IPTableFlush) GetCrcString() string { return "b9d2e09e" } 3222 func (*IPTableFlush) GetMessageType() api.MessageType { 3223 return api.RequestMessage 3224 } 3225 3226 func (m *IPTableFlush) Size() (size int) { 3227 if m == nil { 3228 return 0 3229 } 3230 size += 4 // m.Table.TableID 3231 size += 1 // m.Table.IsIP6 3232 size += 64 // m.Table.Name 3233 return size 3234 } 3235 func (m *IPTableFlush) Marshal(b []byte) ([]byte, error) { 3236 if b == nil { 3237 b = make([]byte, m.Size()) 3238 } 3239 buf := codec.NewBuffer(b) 3240 buf.EncodeUint32(m.Table.TableID) 3241 buf.EncodeBool(m.Table.IsIP6) 3242 buf.EncodeString(m.Table.Name, 64) 3243 return buf.Bytes(), nil 3244 } 3245 func (m *IPTableFlush) Unmarshal(b []byte) error { 3246 buf := codec.NewBuffer(b) 3247 m.Table.TableID = buf.DecodeUint32() 3248 m.Table.IsIP6 = buf.DecodeBool() 3249 m.Table.Name = buf.DecodeString(64) 3250 return nil 3251 } 3252 3253 // IPTableFlushReply defines message 'ip_table_flush_reply'. 3254 type IPTableFlushReply struct { 3255 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3256 } 3257 3258 func (m *IPTableFlushReply) Reset() { *m = IPTableFlushReply{} } 3259 func (*IPTableFlushReply) GetMessageName() string { return "ip_table_flush_reply" } 3260 func (*IPTableFlushReply) GetCrcString() string { return "e8d4e804" } 3261 func (*IPTableFlushReply) GetMessageType() api.MessageType { 3262 return api.ReplyMessage 3263 } 3264 3265 func (m *IPTableFlushReply) Size() (size int) { 3266 if m == nil { 3267 return 0 3268 } 3269 size += 4 // m.Retval 3270 return size 3271 } 3272 func (m *IPTableFlushReply) Marshal(b []byte) ([]byte, error) { 3273 if b == nil { 3274 b = make([]byte, m.Size()) 3275 } 3276 buf := codec.NewBuffer(b) 3277 buf.EncodeInt32(m.Retval) 3278 return buf.Bytes(), nil 3279 } 3280 func (m *IPTableFlushReply) Unmarshal(b []byte) error { 3281 buf := codec.NewBuffer(b) 3282 m.Retval = buf.DecodeInt32() 3283 return nil 3284 } 3285 3286 // IPTableReplaceBegin defines message 'ip_table_replace_begin'. 3287 type IPTableReplaceBegin struct { 3288 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 3289 } 3290 3291 func (m *IPTableReplaceBegin) Reset() { *m = IPTableReplaceBegin{} } 3292 func (*IPTableReplaceBegin) GetMessageName() string { return "ip_table_replace_begin" } 3293 func (*IPTableReplaceBegin) GetCrcString() string { return "b9d2e09e" } 3294 func (*IPTableReplaceBegin) GetMessageType() api.MessageType { 3295 return api.RequestMessage 3296 } 3297 3298 func (m *IPTableReplaceBegin) Size() (size int) { 3299 if m == nil { 3300 return 0 3301 } 3302 size += 4 // m.Table.TableID 3303 size += 1 // m.Table.IsIP6 3304 size += 64 // m.Table.Name 3305 return size 3306 } 3307 func (m *IPTableReplaceBegin) Marshal(b []byte) ([]byte, error) { 3308 if b == nil { 3309 b = make([]byte, m.Size()) 3310 } 3311 buf := codec.NewBuffer(b) 3312 buf.EncodeUint32(m.Table.TableID) 3313 buf.EncodeBool(m.Table.IsIP6) 3314 buf.EncodeString(m.Table.Name, 64) 3315 return buf.Bytes(), nil 3316 } 3317 func (m *IPTableReplaceBegin) Unmarshal(b []byte) error { 3318 buf := codec.NewBuffer(b) 3319 m.Table.TableID = buf.DecodeUint32() 3320 m.Table.IsIP6 = buf.DecodeBool() 3321 m.Table.Name = buf.DecodeString(64) 3322 return nil 3323 } 3324 3325 // IPTableReplaceBeginReply defines message 'ip_table_replace_begin_reply'. 3326 type IPTableReplaceBeginReply struct { 3327 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3328 } 3329 3330 func (m *IPTableReplaceBeginReply) Reset() { *m = IPTableReplaceBeginReply{} } 3331 func (*IPTableReplaceBeginReply) GetMessageName() string { return "ip_table_replace_begin_reply" } 3332 func (*IPTableReplaceBeginReply) GetCrcString() string { return "e8d4e804" } 3333 func (*IPTableReplaceBeginReply) GetMessageType() api.MessageType { 3334 return api.ReplyMessage 3335 } 3336 3337 func (m *IPTableReplaceBeginReply) Size() (size int) { 3338 if m == nil { 3339 return 0 3340 } 3341 size += 4 // m.Retval 3342 return size 3343 } 3344 func (m *IPTableReplaceBeginReply) Marshal(b []byte) ([]byte, error) { 3345 if b == nil { 3346 b = make([]byte, m.Size()) 3347 } 3348 buf := codec.NewBuffer(b) 3349 buf.EncodeInt32(m.Retval) 3350 return buf.Bytes(), nil 3351 } 3352 func (m *IPTableReplaceBeginReply) Unmarshal(b []byte) error { 3353 buf := codec.NewBuffer(b) 3354 m.Retval = buf.DecodeInt32() 3355 return nil 3356 } 3357 3358 // IPTableReplaceEnd defines message 'ip_table_replace_end'. 3359 type IPTableReplaceEnd struct { 3360 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 3361 } 3362 3363 func (m *IPTableReplaceEnd) Reset() { *m = IPTableReplaceEnd{} } 3364 func (*IPTableReplaceEnd) GetMessageName() string { return "ip_table_replace_end" } 3365 func (*IPTableReplaceEnd) GetCrcString() string { return "b9d2e09e" } 3366 func (*IPTableReplaceEnd) GetMessageType() api.MessageType { 3367 return api.RequestMessage 3368 } 3369 3370 func (m *IPTableReplaceEnd) Size() (size int) { 3371 if m == nil { 3372 return 0 3373 } 3374 size += 4 // m.Table.TableID 3375 size += 1 // m.Table.IsIP6 3376 size += 64 // m.Table.Name 3377 return size 3378 } 3379 func (m *IPTableReplaceEnd) Marshal(b []byte) ([]byte, error) { 3380 if b == nil { 3381 b = make([]byte, m.Size()) 3382 } 3383 buf := codec.NewBuffer(b) 3384 buf.EncodeUint32(m.Table.TableID) 3385 buf.EncodeBool(m.Table.IsIP6) 3386 buf.EncodeString(m.Table.Name, 64) 3387 return buf.Bytes(), nil 3388 } 3389 func (m *IPTableReplaceEnd) Unmarshal(b []byte) error { 3390 buf := codec.NewBuffer(b) 3391 m.Table.TableID = buf.DecodeUint32() 3392 m.Table.IsIP6 = buf.DecodeBool() 3393 m.Table.Name = buf.DecodeString(64) 3394 return nil 3395 } 3396 3397 // IPTableReplaceEndReply defines message 'ip_table_replace_end_reply'. 3398 type IPTableReplaceEndReply struct { 3399 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3400 } 3401 3402 func (m *IPTableReplaceEndReply) Reset() { *m = IPTableReplaceEndReply{} } 3403 func (*IPTableReplaceEndReply) GetMessageName() string { return "ip_table_replace_end_reply" } 3404 func (*IPTableReplaceEndReply) GetCrcString() string { return "e8d4e804" } 3405 func (*IPTableReplaceEndReply) GetMessageType() api.MessageType { 3406 return api.ReplyMessage 3407 } 3408 3409 func (m *IPTableReplaceEndReply) Size() (size int) { 3410 if m == nil { 3411 return 0 3412 } 3413 size += 4 // m.Retval 3414 return size 3415 } 3416 func (m *IPTableReplaceEndReply) Marshal(b []byte) ([]byte, error) { 3417 if b == nil { 3418 b = make([]byte, m.Size()) 3419 } 3420 buf := codec.NewBuffer(b) 3421 buf.EncodeInt32(m.Retval) 3422 return buf.Bytes(), nil 3423 } 3424 func (m *IPTableReplaceEndReply) Unmarshal(b []byte) error { 3425 buf := codec.NewBuffer(b) 3426 m.Retval = buf.DecodeInt32() 3427 return nil 3428 } 3429 3430 // IPUnnumberedDetails defines message 'ip_unnumbered_details'. 3431 type IPUnnumberedDetails struct { 3432 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 3433 IPSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip_sw_if_index" json:"ip_sw_if_index,omitempty"` 3434 } 3435 3436 func (m *IPUnnumberedDetails) Reset() { *m = IPUnnumberedDetails{} } 3437 func (*IPUnnumberedDetails) GetMessageName() string { return "ip_unnumbered_details" } 3438 func (*IPUnnumberedDetails) GetCrcString() string { return "cc59bd42" } 3439 func (*IPUnnumberedDetails) GetMessageType() api.MessageType { 3440 return api.ReplyMessage 3441 } 3442 3443 func (m *IPUnnumberedDetails) Size() (size int) { 3444 if m == nil { 3445 return 0 3446 } 3447 size += 4 // m.SwIfIndex 3448 size += 4 // m.IPSwIfIndex 3449 return size 3450 } 3451 func (m *IPUnnumberedDetails) Marshal(b []byte) ([]byte, error) { 3452 if b == nil { 3453 b = make([]byte, m.Size()) 3454 } 3455 buf := codec.NewBuffer(b) 3456 buf.EncodeUint32(uint32(m.SwIfIndex)) 3457 buf.EncodeUint32(uint32(m.IPSwIfIndex)) 3458 return buf.Bytes(), nil 3459 } 3460 func (m *IPUnnumberedDetails) Unmarshal(b []byte) error { 3461 buf := codec.NewBuffer(b) 3462 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 3463 m.IPSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 3464 return nil 3465 } 3466 3467 // IPUnnumberedDump defines message 'ip_unnumbered_dump'. 3468 type IPUnnumberedDump struct { 3469 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` 3470 } 3471 3472 func (m *IPUnnumberedDump) Reset() { *m = IPUnnumberedDump{} } 3473 func (*IPUnnumberedDump) GetMessageName() string { return "ip_unnumbered_dump" } 3474 func (*IPUnnumberedDump) GetCrcString() string { return "f9e6675e" } 3475 func (*IPUnnumberedDump) GetMessageType() api.MessageType { 3476 return api.RequestMessage 3477 } 3478 3479 func (m *IPUnnumberedDump) Size() (size int) { 3480 if m == nil { 3481 return 0 3482 } 3483 size += 4 // m.SwIfIndex 3484 return size 3485 } 3486 func (m *IPUnnumberedDump) Marshal(b []byte) ([]byte, error) { 3487 if b == nil { 3488 b = make([]byte, m.Size()) 3489 } 3490 buf := codec.NewBuffer(b) 3491 buf.EncodeUint32(uint32(m.SwIfIndex)) 3492 return buf.Bytes(), nil 3493 } 3494 func (m *IPUnnumberedDump) Unmarshal(b []byte) error { 3495 buf := codec.NewBuffer(b) 3496 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 3497 return nil 3498 } 3499 3500 // MfibSignalDetails defines message 'mfib_signal_details'. 3501 type MfibSignalDetails struct { 3502 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 3503 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 3504 Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"` 3505 IPPacketLen uint16 `binapi:"u16,name=ip_packet_len" json:"ip_packet_len,omitempty"` 3506 IPPacketData []byte `binapi:"u8[256],name=ip_packet_data" json:"ip_packet_data,omitempty"` 3507 } 3508 3509 func (m *MfibSignalDetails) Reset() { *m = MfibSignalDetails{} } 3510 func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" } 3511 func (*MfibSignalDetails) GetCrcString() string { return "6f4a4cfb" } 3512 func (*MfibSignalDetails) GetMessageType() api.MessageType { 3513 return api.ReplyMessage 3514 } 3515 3516 func (m *MfibSignalDetails) Size() (size int) { 3517 if m == nil { 3518 return 0 3519 } 3520 size += 4 // m.SwIfIndex 3521 size += 4 // m.TableID 3522 size += 1 // m.Prefix.Af 3523 size += 2 // m.Prefix.GrpAddressLength 3524 size += 1 * 16 // m.Prefix.GrpAddress 3525 size += 1 * 16 // m.Prefix.SrcAddress 3526 size += 2 // m.IPPacketLen 3527 size += 1 * 256 // m.IPPacketData 3528 return size 3529 } 3530 func (m *MfibSignalDetails) Marshal(b []byte) ([]byte, error) { 3531 if b == nil { 3532 b = make([]byte, m.Size()) 3533 } 3534 buf := codec.NewBuffer(b) 3535 buf.EncodeUint32(uint32(m.SwIfIndex)) 3536 buf.EncodeUint32(m.TableID) 3537 buf.EncodeUint8(uint8(m.Prefix.Af)) 3538 buf.EncodeUint16(m.Prefix.GrpAddressLength) 3539 buf.EncodeBytes(m.Prefix.GrpAddress.XXX_UnionData[:], 16) 3540 buf.EncodeBytes(m.Prefix.SrcAddress.XXX_UnionData[:], 16) 3541 buf.EncodeUint16(m.IPPacketLen) 3542 buf.EncodeBytes(m.IPPacketData, 256) 3543 return buf.Bytes(), nil 3544 } 3545 func (m *MfibSignalDetails) Unmarshal(b []byte) error { 3546 buf := codec.NewBuffer(b) 3547 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 3548 m.TableID = buf.DecodeUint32() 3549 m.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8()) 3550 m.Prefix.GrpAddressLength = buf.DecodeUint16() 3551 copy(m.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 3552 copy(m.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 3553 m.IPPacketLen = buf.DecodeUint16() 3554 m.IPPacketData = make([]byte, 256) 3555 copy(m.IPPacketData, buf.DecodeBytes(len(m.IPPacketData))) 3556 return nil 3557 } 3558 3559 // MfibSignalDump defines message 'mfib_signal_dump'. 3560 type MfibSignalDump struct{} 3561 3562 func (m *MfibSignalDump) Reset() { *m = MfibSignalDump{} } 3563 func (*MfibSignalDump) GetMessageName() string { return "mfib_signal_dump" } 3564 func (*MfibSignalDump) GetCrcString() string { return "51077d14" } 3565 func (*MfibSignalDump) GetMessageType() api.MessageType { 3566 return api.RequestMessage 3567 } 3568 3569 func (m *MfibSignalDump) Size() (size int) { 3570 if m == nil { 3571 return 0 3572 } 3573 return size 3574 } 3575 func (m *MfibSignalDump) Marshal(b []byte) ([]byte, error) { 3576 if b == nil { 3577 b = make([]byte, m.Size()) 3578 } 3579 buf := codec.NewBuffer(b) 3580 return buf.Bytes(), nil 3581 } 3582 func (m *MfibSignalDump) Unmarshal(b []byte) error { 3583 return nil 3584 } 3585 3586 // SetIPFlowHash defines message 'set_ip_flow_hash'. 3587 // Deprecated: the message will be removed in the future versions 3588 type SetIPFlowHash struct { 3589 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 3590 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 3591 Src bool `binapi:"bool,name=src" json:"src,omitempty"` 3592 Dst bool `binapi:"bool,name=dst" json:"dst,omitempty"` 3593 Sport bool `binapi:"bool,name=sport" json:"sport,omitempty"` 3594 Dport bool `binapi:"bool,name=dport" json:"dport,omitempty"` 3595 Proto bool `binapi:"bool,name=proto" json:"proto,omitempty"` 3596 Reverse bool `binapi:"bool,name=reverse" json:"reverse,omitempty"` 3597 Symmetric bool `binapi:"bool,name=symmetric" json:"symmetric,omitempty"` 3598 } 3599 3600 func (m *SetIPFlowHash) Reset() { *m = SetIPFlowHash{} } 3601 func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" } 3602 func (*SetIPFlowHash) GetCrcString() string { return "084ee09e" } 3603 func (*SetIPFlowHash) GetMessageType() api.MessageType { 3604 return api.RequestMessage 3605 } 3606 3607 func (m *SetIPFlowHash) Size() (size int) { 3608 if m == nil { 3609 return 0 3610 } 3611 size += 4 // m.VrfID 3612 size += 1 // m.IsIPv6 3613 size += 1 // m.Src 3614 size += 1 // m.Dst 3615 size += 1 // m.Sport 3616 size += 1 // m.Dport 3617 size += 1 // m.Proto 3618 size += 1 // m.Reverse 3619 size += 1 // m.Symmetric 3620 return size 3621 } 3622 func (m *SetIPFlowHash) Marshal(b []byte) ([]byte, error) { 3623 if b == nil { 3624 b = make([]byte, m.Size()) 3625 } 3626 buf := codec.NewBuffer(b) 3627 buf.EncodeUint32(m.VrfID) 3628 buf.EncodeBool(m.IsIPv6) 3629 buf.EncodeBool(m.Src) 3630 buf.EncodeBool(m.Dst) 3631 buf.EncodeBool(m.Sport) 3632 buf.EncodeBool(m.Dport) 3633 buf.EncodeBool(m.Proto) 3634 buf.EncodeBool(m.Reverse) 3635 buf.EncodeBool(m.Symmetric) 3636 return buf.Bytes(), nil 3637 } 3638 func (m *SetIPFlowHash) Unmarshal(b []byte) error { 3639 buf := codec.NewBuffer(b) 3640 m.VrfID = buf.DecodeUint32() 3641 m.IsIPv6 = buf.DecodeBool() 3642 m.Src = buf.DecodeBool() 3643 m.Dst = buf.DecodeBool() 3644 m.Sport = buf.DecodeBool() 3645 m.Dport = buf.DecodeBool() 3646 m.Proto = buf.DecodeBool() 3647 m.Reverse = buf.DecodeBool() 3648 m.Symmetric = buf.DecodeBool() 3649 return nil 3650 } 3651 3652 // SetIPFlowHashReply defines message 'set_ip_flow_hash_reply'. 3653 // Deprecated: the message will be removed in the future versions 3654 type SetIPFlowHashReply struct { 3655 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3656 } 3657 3658 func (m *SetIPFlowHashReply) Reset() { *m = SetIPFlowHashReply{} } 3659 func (*SetIPFlowHashReply) GetMessageName() string { return "set_ip_flow_hash_reply" } 3660 func (*SetIPFlowHashReply) GetCrcString() string { return "e8d4e804" } 3661 func (*SetIPFlowHashReply) GetMessageType() api.MessageType { 3662 return api.ReplyMessage 3663 } 3664 3665 func (m *SetIPFlowHashReply) Size() (size int) { 3666 if m == nil { 3667 return 0 3668 } 3669 size += 4 // m.Retval 3670 return size 3671 } 3672 func (m *SetIPFlowHashReply) Marshal(b []byte) ([]byte, error) { 3673 if b == nil { 3674 b = make([]byte, m.Size()) 3675 } 3676 buf := codec.NewBuffer(b) 3677 buf.EncodeInt32(m.Retval) 3678 return buf.Bytes(), nil 3679 } 3680 func (m *SetIPFlowHashReply) Unmarshal(b []byte) error { 3681 buf := codec.NewBuffer(b) 3682 m.Retval = buf.DecodeInt32() 3683 return nil 3684 } 3685 3686 // SetIPFlowHashRouterID defines message 'set_ip_flow_hash_router_id'. 3687 type SetIPFlowHashRouterID struct { 3688 RouterID uint32 `binapi:"u32,name=router_id" json:"router_id,omitempty"` 3689 } 3690 3691 func (m *SetIPFlowHashRouterID) Reset() { *m = SetIPFlowHashRouterID{} } 3692 func (*SetIPFlowHashRouterID) GetMessageName() string { return "set_ip_flow_hash_router_id" } 3693 func (*SetIPFlowHashRouterID) GetCrcString() string { return "03e4f48e" } 3694 func (*SetIPFlowHashRouterID) GetMessageType() api.MessageType { 3695 return api.RequestMessage 3696 } 3697 3698 func (m *SetIPFlowHashRouterID) Size() (size int) { 3699 if m == nil { 3700 return 0 3701 } 3702 size += 4 // m.RouterID 3703 return size 3704 } 3705 func (m *SetIPFlowHashRouterID) Marshal(b []byte) ([]byte, error) { 3706 if b == nil { 3707 b = make([]byte, m.Size()) 3708 } 3709 buf := codec.NewBuffer(b) 3710 buf.EncodeUint32(m.RouterID) 3711 return buf.Bytes(), nil 3712 } 3713 func (m *SetIPFlowHashRouterID) Unmarshal(b []byte) error { 3714 buf := codec.NewBuffer(b) 3715 m.RouterID = buf.DecodeUint32() 3716 return nil 3717 } 3718 3719 // SetIPFlowHashRouterIDReply defines message 'set_ip_flow_hash_router_id_reply'. 3720 type SetIPFlowHashRouterIDReply struct { 3721 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3722 } 3723 3724 func (m *SetIPFlowHashRouterIDReply) Reset() { *m = SetIPFlowHashRouterIDReply{} } 3725 func (*SetIPFlowHashRouterIDReply) GetMessageName() string { return "set_ip_flow_hash_router_id_reply" } 3726 func (*SetIPFlowHashRouterIDReply) GetCrcString() string { return "e8d4e804" } 3727 func (*SetIPFlowHashRouterIDReply) GetMessageType() api.MessageType { 3728 return api.ReplyMessage 3729 } 3730 3731 func (m *SetIPFlowHashRouterIDReply) Size() (size int) { 3732 if m == nil { 3733 return 0 3734 } 3735 size += 4 // m.Retval 3736 return size 3737 } 3738 func (m *SetIPFlowHashRouterIDReply) Marshal(b []byte) ([]byte, error) { 3739 if b == nil { 3740 b = make([]byte, m.Size()) 3741 } 3742 buf := codec.NewBuffer(b) 3743 buf.EncodeInt32(m.Retval) 3744 return buf.Bytes(), nil 3745 } 3746 func (m *SetIPFlowHashRouterIDReply) Unmarshal(b []byte) error { 3747 buf := codec.NewBuffer(b) 3748 m.Retval = buf.DecodeInt32() 3749 return nil 3750 } 3751 3752 // SetIPFlowHashV2 defines message 'set_ip_flow_hash_v2'. 3753 type SetIPFlowHashV2 struct { 3754 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 3755 Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"` 3756 FlowHashConfig IPFlowHashConfig `binapi:"ip_flow_hash_config,name=flow_hash_config" json:"flow_hash_config,omitempty"` 3757 } 3758 3759 func (m *SetIPFlowHashV2) Reset() { *m = SetIPFlowHashV2{} } 3760 func (*SetIPFlowHashV2) GetMessageName() string { return "set_ip_flow_hash_v2" } 3761 func (*SetIPFlowHashV2) GetCrcString() string { return "6d132100" } 3762 func (*SetIPFlowHashV2) GetMessageType() api.MessageType { 3763 return api.RequestMessage 3764 } 3765 3766 func (m *SetIPFlowHashV2) Size() (size int) { 3767 if m == nil { 3768 return 0 3769 } 3770 size += 4 // m.TableID 3771 size += 1 // m.Af 3772 size += 4 // m.FlowHashConfig 3773 return size 3774 } 3775 func (m *SetIPFlowHashV2) Marshal(b []byte) ([]byte, error) { 3776 if b == nil { 3777 b = make([]byte, m.Size()) 3778 } 3779 buf := codec.NewBuffer(b) 3780 buf.EncodeUint32(m.TableID) 3781 buf.EncodeUint8(uint8(m.Af)) 3782 buf.EncodeUint32(uint32(m.FlowHashConfig)) 3783 return buf.Bytes(), nil 3784 } 3785 func (m *SetIPFlowHashV2) Unmarshal(b []byte) error { 3786 buf := codec.NewBuffer(b) 3787 m.TableID = buf.DecodeUint32() 3788 m.Af = ip_types.AddressFamily(buf.DecodeUint8()) 3789 m.FlowHashConfig = IPFlowHashConfig(buf.DecodeUint32()) 3790 return nil 3791 } 3792 3793 // SetIPFlowHashV2Reply defines message 'set_ip_flow_hash_v2_reply'. 3794 type SetIPFlowHashV2Reply struct { 3795 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3796 } 3797 3798 func (m *SetIPFlowHashV2Reply) Reset() { *m = SetIPFlowHashV2Reply{} } 3799 func (*SetIPFlowHashV2Reply) GetMessageName() string { return "set_ip_flow_hash_v2_reply" } 3800 func (*SetIPFlowHashV2Reply) GetCrcString() string { return "e8d4e804" } 3801 func (*SetIPFlowHashV2Reply) GetMessageType() api.MessageType { 3802 return api.ReplyMessage 3803 } 3804 3805 func (m *SetIPFlowHashV2Reply) Size() (size int) { 3806 if m == nil { 3807 return 0 3808 } 3809 size += 4 // m.Retval 3810 return size 3811 } 3812 func (m *SetIPFlowHashV2Reply) Marshal(b []byte) ([]byte, error) { 3813 if b == nil { 3814 b = make([]byte, m.Size()) 3815 } 3816 buf := codec.NewBuffer(b) 3817 buf.EncodeInt32(m.Retval) 3818 return buf.Bytes(), nil 3819 } 3820 func (m *SetIPFlowHashV2Reply) Unmarshal(b []byte) error { 3821 buf := codec.NewBuffer(b) 3822 m.Retval = buf.DecodeInt32() 3823 return nil 3824 } 3825 3826 // SwInterfaceIP6EnableDisable defines message 'sw_interface_ip6_enable_disable'. 3827 type SwInterfaceIP6EnableDisable struct { 3828 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 3829 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 3830 } 3831 3832 func (m *SwInterfaceIP6EnableDisable) Reset() { *m = SwInterfaceIP6EnableDisable{} } 3833 func (*SwInterfaceIP6EnableDisable) GetMessageName() string { return "sw_interface_ip6_enable_disable" } 3834 func (*SwInterfaceIP6EnableDisable) GetCrcString() string { return "ae6cfcfb" } 3835 func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType { 3836 return api.RequestMessage 3837 } 3838 3839 func (m *SwInterfaceIP6EnableDisable) Size() (size int) { 3840 if m == nil { 3841 return 0 3842 } 3843 size += 4 // m.SwIfIndex 3844 size += 1 // m.Enable 3845 return size 3846 } 3847 func (m *SwInterfaceIP6EnableDisable) Marshal(b []byte) ([]byte, error) { 3848 if b == nil { 3849 b = make([]byte, m.Size()) 3850 } 3851 buf := codec.NewBuffer(b) 3852 buf.EncodeUint32(uint32(m.SwIfIndex)) 3853 buf.EncodeBool(m.Enable) 3854 return buf.Bytes(), nil 3855 } 3856 func (m *SwInterfaceIP6EnableDisable) Unmarshal(b []byte) error { 3857 buf := codec.NewBuffer(b) 3858 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 3859 m.Enable = buf.DecodeBool() 3860 return nil 3861 } 3862 3863 // SwInterfaceIP6EnableDisableReply defines message 'sw_interface_ip6_enable_disable_reply'. 3864 type SwInterfaceIP6EnableDisableReply struct { 3865 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3866 } 3867 3868 func (m *SwInterfaceIP6EnableDisableReply) Reset() { *m = SwInterfaceIP6EnableDisableReply{} } 3869 func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string { 3870 return "sw_interface_ip6_enable_disable_reply" 3871 } 3872 func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" } 3873 func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType { 3874 return api.ReplyMessage 3875 } 3876 3877 func (m *SwInterfaceIP6EnableDisableReply) Size() (size int) { 3878 if m == nil { 3879 return 0 3880 } 3881 size += 4 // m.Retval 3882 return size 3883 } 3884 func (m *SwInterfaceIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) { 3885 if b == nil { 3886 b = make([]byte, m.Size()) 3887 } 3888 buf := codec.NewBuffer(b) 3889 buf.EncodeInt32(m.Retval) 3890 return buf.Bytes(), nil 3891 } 3892 func (m *SwInterfaceIP6EnableDisableReply) Unmarshal(b []byte) error { 3893 buf := codec.NewBuffer(b) 3894 m.Retval = buf.DecodeInt32() 3895 return nil 3896 } 3897 3898 // SwInterfaceIP6GetLinkLocalAddress defines message 'sw_interface_ip6_get_link_local_address'. 3899 type SwInterfaceIP6GetLinkLocalAddress struct { 3900 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 3901 } 3902 3903 func (m *SwInterfaceIP6GetLinkLocalAddress) Reset() { *m = SwInterfaceIP6GetLinkLocalAddress{} } 3904 func (*SwInterfaceIP6GetLinkLocalAddress) GetMessageName() string { 3905 return "sw_interface_ip6_get_link_local_address" 3906 } 3907 func (*SwInterfaceIP6GetLinkLocalAddress) GetCrcString() string { return "f9e6675e" } 3908 func (*SwInterfaceIP6GetLinkLocalAddress) GetMessageType() api.MessageType { 3909 return api.RequestMessage 3910 } 3911 3912 func (m *SwInterfaceIP6GetLinkLocalAddress) Size() (size int) { 3913 if m == nil { 3914 return 0 3915 } 3916 size += 4 // m.SwIfIndex 3917 return size 3918 } 3919 func (m *SwInterfaceIP6GetLinkLocalAddress) Marshal(b []byte) ([]byte, error) { 3920 if b == nil { 3921 b = make([]byte, m.Size()) 3922 } 3923 buf := codec.NewBuffer(b) 3924 buf.EncodeUint32(uint32(m.SwIfIndex)) 3925 return buf.Bytes(), nil 3926 } 3927 func (m *SwInterfaceIP6GetLinkLocalAddress) Unmarshal(b []byte) error { 3928 buf := codec.NewBuffer(b) 3929 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 3930 return nil 3931 } 3932 3933 // SwInterfaceIP6GetLinkLocalAddressReply defines message 'sw_interface_ip6_get_link_local_address_reply'. 3934 type SwInterfaceIP6GetLinkLocalAddressReply struct { 3935 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 3936 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"` 3937 } 3938 3939 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Reset() { 3940 *m = SwInterfaceIP6GetLinkLocalAddressReply{} 3941 } 3942 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetMessageName() string { 3943 return "sw_interface_ip6_get_link_local_address_reply" 3944 } 3945 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetCrcString() string { return "d16b7130" } 3946 func (*SwInterfaceIP6GetLinkLocalAddressReply) GetMessageType() api.MessageType { 3947 return api.ReplyMessage 3948 } 3949 3950 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Size() (size int) { 3951 if m == nil { 3952 return 0 3953 } 3954 size += 4 // m.Retval 3955 size += 1 * 16 // m.IP 3956 return size 3957 } 3958 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) { 3959 if b == nil { 3960 b = make([]byte, m.Size()) 3961 } 3962 buf := codec.NewBuffer(b) 3963 buf.EncodeInt32(m.Retval) 3964 buf.EncodeBytes(m.IP[:], 16) 3965 return buf.Bytes(), nil 3966 } 3967 func (m *SwInterfaceIP6GetLinkLocalAddressReply) Unmarshal(b []byte) error { 3968 buf := codec.NewBuffer(b) 3969 m.Retval = buf.DecodeInt32() 3970 copy(m.IP[:], buf.DecodeBytes(16)) 3971 return nil 3972 } 3973 3974 // SwInterfaceIP6SetLinkLocalAddress defines message 'sw_interface_ip6_set_link_local_address'. 3975 type SwInterfaceIP6SetLinkLocalAddress struct { 3976 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 3977 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"` 3978 } 3979 3980 func (m *SwInterfaceIP6SetLinkLocalAddress) Reset() { *m = SwInterfaceIP6SetLinkLocalAddress{} } 3981 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string { 3982 return "sw_interface_ip6_set_link_local_address" 3983 } 3984 func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "1c10f15f" } 3985 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType { 3986 return api.RequestMessage 3987 } 3988 3989 func (m *SwInterfaceIP6SetLinkLocalAddress) Size() (size int) { 3990 if m == nil { 3991 return 0 3992 } 3993 size += 4 // m.SwIfIndex 3994 size += 1 * 16 // m.IP 3995 return size 3996 } 3997 func (m *SwInterfaceIP6SetLinkLocalAddress) Marshal(b []byte) ([]byte, error) { 3998 if b == nil { 3999 b = make([]byte, m.Size()) 4000 } 4001 buf := codec.NewBuffer(b) 4002 buf.EncodeUint32(uint32(m.SwIfIndex)) 4003 buf.EncodeBytes(m.IP[:], 16) 4004 return buf.Bytes(), nil 4005 } 4006 func (m *SwInterfaceIP6SetLinkLocalAddress) Unmarshal(b []byte) error { 4007 buf := codec.NewBuffer(b) 4008 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 4009 copy(m.IP[:], buf.DecodeBytes(16)) 4010 return nil 4011 } 4012 4013 // SwInterfaceIP6SetLinkLocalAddressReply defines message 'sw_interface_ip6_set_link_local_address_reply'. 4014 type SwInterfaceIP6SetLinkLocalAddressReply struct { 4015 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 4016 } 4017 4018 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Reset() { 4019 *m = SwInterfaceIP6SetLinkLocalAddressReply{} 4020 } 4021 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string { 4022 return "sw_interface_ip6_set_link_local_address_reply" 4023 } 4024 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { return "e8d4e804" } 4025 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType { 4026 return api.ReplyMessage 4027 } 4028 4029 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Size() (size int) { 4030 if m == nil { 4031 return 0 4032 } 4033 size += 4 // m.Retval 4034 return size 4035 } 4036 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) { 4037 if b == nil { 4038 b = make([]byte, m.Size()) 4039 } 4040 buf := codec.NewBuffer(b) 4041 buf.EncodeInt32(m.Retval) 4042 return buf.Bytes(), nil 4043 } 4044 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error { 4045 buf := codec.NewBuffer(b) 4046 m.Retval = buf.DecodeInt32() 4047 return nil 4048 } 4049 4050 func init() { file_ip_binapi_init() } 4051 func file_ip_binapi_init() { 4052 api.RegisterMessage((*IoamDisable)(nil), "ioam_disable_6b16a45e") 4053 api.RegisterMessage((*IoamDisableReply)(nil), "ioam_disable_reply_e8d4e804") 4054 api.RegisterMessage((*IoamEnable)(nil), "ioam_enable_51ccd868") 4055 api.RegisterMessage((*IoamEnableReply)(nil), "ioam_enable_reply_e8d4e804") 4056 api.RegisterMessage((*IPAddressDetails)(nil), "ip_address_details_ee29b797") 4057 api.RegisterMessage((*IPAddressDump)(nil), "ip_address_dump_2d033de4") 4058 api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip_container_proxy_add_del_7df1dff1") 4059 api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip_container_proxy_add_del_reply_e8d4e804") 4060 api.RegisterMessage((*IPContainerProxyDetails)(nil), "ip_container_proxy_details_a8085523") 4061 api.RegisterMessage((*IPContainerProxyDump)(nil), "ip_container_proxy_dump_51077d14") 4062 api.RegisterMessage((*IPDetails)(nil), "ip_details_eb152d07") 4063 api.RegisterMessage((*IPDump)(nil), "ip_dump_98d231ca") 4064 api.RegisterMessage((*IPMrouteAddDel)(nil), "ip_mroute_add_del_0dd7e790") 4065 api.RegisterMessage((*IPMrouteAddDelReply)(nil), "ip_mroute_add_del_reply_1992deab") 4066 api.RegisterMessage((*IPMrouteDetails)(nil), "ip_mroute_details_c5cb23fc") 4067 api.RegisterMessage((*IPMrouteDump)(nil), "ip_mroute_dump_b9d2e09e") 4068 api.RegisterMessage((*IPMtableDetails)(nil), "ip_mtable_details_b9d2e09e") 4069 api.RegisterMessage((*IPMtableDump)(nil), "ip_mtable_dump_51077d14") 4070 api.RegisterMessage((*IPPathMtuDetails)(nil), "ip_path_mtu_details_ac9539a7") 4071 api.RegisterMessage((*IPPathMtuGet)(nil), "ip_path_mtu_get_f75ba505") 4072 api.RegisterMessage((*IPPathMtuGetReply)(nil), "ip_path_mtu_get_reply_53b48f5d") 4073 api.RegisterMessage((*IPPathMtuReplaceBegin)(nil), "ip_path_mtu_replace_begin_51077d14") 4074 api.RegisterMessage((*IPPathMtuReplaceBeginReply)(nil), "ip_path_mtu_replace_begin_reply_e8d4e804") 4075 api.RegisterMessage((*IPPathMtuReplaceEnd)(nil), "ip_path_mtu_replace_end_51077d14") 4076 api.RegisterMessage((*IPPathMtuReplaceEndReply)(nil), "ip_path_mtu_replace_end_reply_e8d4e804") 4077 api.RegisterMessage((*IPPathMtuUpdate)(nil), "ip_path_mtu_update_10bbe5cb") 4078 api.RegisterMessage((*IPPathMtuUpdateReply)(nil), "ip_path_mtu_update_reply_e8d4e804") 4079 api.RegisterMessage((*IPPuntPolice)(nil), "ip_punt_police_db867cea") 4080 api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip_punt_police_reply_e8d4e804") 4081 api.RegisterMessage((*IPPuntRedirect)(nil), "ip_punt_redirect_6580f635") 4082 api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_2cef63e7") 4083 api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip_punt_redirect_dump_2d033de4") 4084 api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip_punt_redirect_reply_e8d4e804") 4085 api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_eb77968d") 4086 api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip_reassembly_enable_disable_reply_e8d4e804") 4087 api.RegisterMessage((*IPReassemblyGet)(nil), "ip_reassembly_get_ea13ff63") 4088 api.RegisterMessage((*IPReassemblyGetReply)(nil), "ip_reassembly_get_reply_d5eb8d34") 4089 api.RegisterMessage((*IPReassemblySet)(nil), "ip_reassembly_set_16467d25") 4090 api.RegisterMessage((*IPReassemblySetReply)(nil), "ip_reassembly_set_reply_e8d4e804") 4091 api.RegisterMessage((*IPRouteAddDel)(nil), "ip_route_add_del_b8ecfe0d") 4092 api.RegisterMessage((*IPRouteAddDelReply)(nil), "ip_route_add_del_reply_1992deab") 4093 api.RegisterMessage((*IPRouteAddDelV2)(nil), "ip_route_add_del_v2_521ef330") 4094 api.RegisterMessage((*IPRouteAddDelV2Reply)(nil), "ip_route_add_del_v2_reply_1992deab") 4095 api.RegisterMessage((*IPRouteDetails)(nil), "ip_route_details_bda8f315") 4096 api.RegisterMessage((*IPRouteDump)(nil), "ip_route_dump_b9d2e09e") 4097 api.RegisterMessage((*IPRouteLookup)(nil), "ip_route_lookup_710d6471") 4098 api.RegisterMessage((*IPRouteLookupReply)(nil), "ip_route_lookup_reply_5d8febcb") 4099 api.RegisterMessage((*IPRouteLookupV2)(nil), "ip_route_lookup_v2_710d6471") 4100 api.RegisterMessage((*IPRouteLookupV2Reply)(nil), "ip_route_lookup_v2_reply_84cc9e03") 4101 api.RegisterMessage((*IPRouteV2Details)(nil), "ip_route_v2_details_b09aa6c0") 4102 api.RegisterMessage((*IPRouteV2Dump)(nil), "ip_route_v2_dump_d16f72e6") 4103 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip_source_and_port_range_check_add_del_92a067e3") 4104 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip_source_and_port_range_check_add_del_reply_e8d4e804") 4105 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip_source_and_port_range_check_interface_add_del_e1ba8987") 4106 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip_source_and_port_range_check_interface_add_del_reply_e8d4e804") 4107 api.RegisterMessage((*IPTableAddDel)(nil), "ip_table_add_del_0ffdaec0") 4108 api.RegisterMessage((*IPTableAddDelReply)(nil), "ip_table_add_del_reply_e8d4e804") 4109 api.RegisterMessage((*IPTableDetails)(nil), "ip_table_details_c79fca0f") 4110 api.RegisterMessage((*IPTableDump)(nil), "ip_table_dump_51077d14") 4111 api.RegisterMessage((*IPTableFlush)(nil), "ip_table_flush_b9d2e09e") 4112 api.RegisterMessage((*IPTableFlushReply)(nil), "ip_table_flush_reply_e8d4e804") 4113 api.RegisterMessage((*IPTableReplaceBegin)(nil), "ip_table_replace_begin_b9d2e09e") 4114 api.RegisterMessage((*IPTableReplaceBeginReply)(nil), "ip_table_replace_begin_reply_e8d4e804") 4115 api.RegisterMessage((*IPTableReplaceEnd)(nil), "ip_table_replace_end_b9d2e09e") 4116 api.RegisterMessage((*IPTableReplaceEndReply)(nil), "ip_table_replace_end_reply_e8d4e804") 4117 api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip_unnumbered_details_cc59bd42") 4118 api.RegisterMessage((*IPUnnumberedDump)(nil), "ip_unnumbered_dump_f9e6675e") 4119 api.RegisterMessage((*MfibSignalDetails)(nil), "mfib_signal_details_6f4a4cfb") 4120 api.RegisterMessage((*MfibSignalDump)(nil), "mfib_signal_dump_51077d14") 4121 api.RegisterMessage((*SetIPFlowHash)(nil), "set_ip_flow_hash_084ee09e") 4122 api.RegisterMessage((*SetIPFlowHashReply)(nil), "set_ip_flow_hash_reply_e8d4e804") 4123 api.RegisterMessage((*SetIPFlowHashRouterID)(nil), "set_ip_flow_hash_router_id_03e4f48e") 4124 api.RegisterMessage((*SetIPFlowHashRouterIDReply)(nil), "set_ip_flow_hash_router_id_reply_e8d4e804") 4125 api.RegisterMessage((*SetIPFlowHashV2)(nil), "set_ip_flow_hash_v2_6d132100") 4126 api.RegisterMessage((*SetIPFlowHashV2Reply)(nil), "set_ip_flow_hash_v2_reply_e8d4e804") 4127 api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "sw_interface_ip6_enable_disable_ae6cfcfb") 4128 api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "sw_interface_ip6_enable_disable_reply_e8d4e804") 4129 api.RegisterMessage((*SwInterfaceIP6GetLinkLocalAddress)(nil), "sw_interface_ip6_get_link_local_address_f9e6675e") 4130 api.RegisterMessage((*SwInterfaceIP6GetLinkLocalAddressReply)(nil), "sw_interface_ip6_get_link_local_address_reply_d16b7130") 4131 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "sw_interface_ip6_set_link_local_address_1c10f15f") 4132 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "sw_interface_ip6_set_link_local_address_reply_e8d4e804") 4133 } 4134 4135 // Messages returns list of all messages in this module. 4136 func AllMessages() []api.Message { 4137 return []api.Message{ 4138 (*IoamDisable)(nil), 4139 (*IoamDisableReply)(nil), 4140 (*IoamEnable)(nil), 4141 (*IoamEnableReply)(nil), 4142 (*IPAddressDetails)(nil), 4143 (*IPAddressDump)(nil), 4144 (*IPContainerProxyAddDel)(nil), 4145 (*IPContainerProxyAddDelReply)(nil), 4146 (*IPContainerProxyDetails)(nil), 4147 (*IPContainerProxyDump)(nil), 4148 (*IPDetails)(nil), 4149 (*IPDump)(nil), 4150 (*IPMrouteAddDel)(nil), 4151 (*IPMrouteAddDelReply)(nil), 4152 (*IPMrouteDetails)(nil), 4153 (*IPMrouteDump)(nil), 4154 (*IPMtableDetails)(nil), 4155 (*IPMtableDump)(nil), 4156 (*IPPathMtuDetails)(nil), 4157 (*IPPathMtuGet)(nil), 4158 (*IPPathMtuGetReply)(nil), 4159 (*IPPathMtuReplaceBegin)(nil), 4160 (*IPPathMtuReplaceBeginReply)(nil), 4161 (*IPPathMtuReplaceEnd)(nil), 4162 (*IPPathMtuReplaceEndReply)(nil), 4163 (*IPPathMtuUpdate)(nil), 4164 (*IPPathMtuUpdateReply)(nil), 4165 (*IPPuntPolice)(nil), 4166 (*IPPuntPoliceReply)(nil), 4167 (*IPPuntRedirect)(nil), 4168 (*IPPuntRedirectDetails)(nil), 4169 (*IPPuntRedirectDump)(nil), 4170 (*IPPuntRedirectReply)(nil), 4171 (*IPReassemblyEnableDisable)(nil), 4172 (*IPReassemblyEnableDisableReply)(nil), 4173 (*IPReassemblyGet)(nil), 4174 (*IPReassemblyGetReply)(nil), 4175 (*IPReassemblySet)(nil), 4176 (*IPReassemblySetReply)(nil), 4177 (*IPRouteAddDel)(nil), 4178 (*IPRouteAddDelReply)(nil), 4179 (*IPRouteAddDelV2)(nil), 4180 (*IPRouteAddDelV2Reply)(nil), 4181 (*IPRouteDetails)(nil), 4182 (*IPRouteDump)(nil), 4183 (*IPRouteLookup)(nil), 4184 (*IPRouteLookupReply)(nil), 4185 (*IPRouteLookupV2)(nil), 4186 (*IPRouteLookupV2Reply)(nil), 4187 (*IPRouteV2Details)(nil), 4188 (*IPRouteV2Dump)(nil), 4189 (*IPSourceAndPortRangeCheckAddDel)(nil), 4190 (*IPSourceAndPortRangeCheckAddDelReply)(nil), 4191 (*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), 4192 (*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), 4193 (*IPTableAddDel)(nil), 4194 (*IPTableAddDelReply)(nil), 4195 (*IPTableDetails)(nil), 4196 (*IPTableDump)(nil), 4197 (*IPTableFlush)(nil), 4198 (*IPTableFlushReply)(nil), 4199 (*IPTableReplaceBegin)(nil), 4200 (*IPTableReplaceBeginReply)(nil), 4201 (*IPTableReplaceEnd)(nil), 4202 (*IPTableReplaceEndReply)(nil), 4203 (*IPUnnumberedDetails)(nil), 4204 (*IPUnnumberedDump)(nil), 4205 (*MfibSignalDetails)(nil), 4206 (*MfibSignalDump)(nil), 4207 (*SetIPFlowHash)(nil), 4208 (*SetIPFlowHashReply)(nil), 4209 (*SetIPFlowHashRouterID)(nil), 4210 (*SetIPFlowHashRouterIDReply)(nil), 4211 (*SetIPFlowHashV2)(nil), 4212 (*SetIPFlowHashV2Reply)(nil), 4213 (*SwInterfaceIP6EnableDisable)(nil), 4214 (*SwInterfaceIP6EnableDisableReply)(nil), 4215 (*SwInterfaceIP6GetLinkLocalAddress)(nil), 4216 (*SwInterfaceIP6GetLinkLocalAddressReply)(nil), 4217 (*SwInterfaceIP6SetLinkLocalAddress)(nil), 4218 (*SwInterfaceIP6SetLinkLocalAddressReply)(nil), 4219 } 4220 }