go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2101/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 // - 1 enum 7 // - 4 structs 8 // - 60 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/vpp2101/ethernet_types" 17 fib_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/fib_types" 18 interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/interface_types" 19 ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/ip_types" 20 mfib_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/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.0.1" 32 VersionCrc = 0xd7d82c5f 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 // IPMroute defines type 'ip_mroute'. 63 type IPMroute struct { 64 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 65 EntryFlags mfib_types.MfibEntryFlags `binapi:"mfib_entry_flags,name=entry_flags" json:"entry_flags,omitempty"` 66 RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"` 67 Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"` 68 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"` 69 Paths []mfib_types.MfibPath `binapi:"mfib_path[n_paths],name=paths" json:"paths,omitempty"` 70 } 71 72 // IPRoute defines type 'ip_route'. 73 type IPRoute struct { 74 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 75 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` 76 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 77 NPaths uint8 `binapi:"u8,name=n_paths" json:"-"` 78 Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"` 79 } 80 81 // IPTable defines type 'ip_table'. 82 type IPTable struct { 83 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 84 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 85 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 86 } 87 88 // PuntRedirect defines type 'punt_redirect'. 89 type PuntRedirect struct { 90 RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` 91 TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"` 92 Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"` 93 } 94 95 // IoamDisable defines message 'ioam_disable'. 96 type IoamDisable struct { 97 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"` 98 } 99 100 func (m *IoamDisable) Reset() { *m = IoamDisable{} } 101 func (*IoamDisable) GetMessageName() string { return "ioam_disable" } 102 func (*IoamDisable) GetCrcString() string { return "6b16a45e" } 103 func (*IoamDisable) GetMessageType() api.MessageType { 104 return api.RequestMessage 105 } 106 107 func (m *IoamDisable) Size() (size int) { 108 if m == nil { 109 return 0 110 } 111 size += 2 // m.ID 112 return size 113 } 114 func (m *IoamDisable) Marshal(b []byte) ([]byte, error) { 115 if b == nil { 116 b = make([]byte, m.Size()) 117 } 118 buf := codec.NewBuffer(b) 119 buf.EncodeUint16(m.ID) 120 return buf.Bytes(), nil 121 } 122 func (m *IoamDisable) Unmarshal(b []byte) error { 123 buf := codec.NewBuffer(b) 124 m.ID = buf.DecodeUint16() 125 return nil 126 } 127 128 // IoamDisableReply defines message 'ioam_disable_reply'. 129 type IoamDisableReply struct { 130 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 131 } 132 133 func (m *IoamDisableReply) Reset() { *m = IoamDisableReply{} } 134 func (*IoamDisableReply) GetMessageName() string { return "ioam_disable_reply" } 135 func (*IoamDisableReply) GetCrcString() string { return "e8d4e804" } 136 func (*IoamDisableReply) GetMessageType() api.MessageType { 137 return api.ReplyMessage 138 } 139 140 func (m *IoamDisableReply) Size() (size int) { 141 if m == nil { 142 return 0 143 } 144 size += 4 // m.Retval 145 return size 146 } 147 func (m *IoamDisableReply) Marshal(b []byte) ([]byte, error) { 148 if b == nil { 149 b = make([]byte, m.Size()) 150 } 151 buf := codec.NewBuffer(b) 152 buf.EncodeInt32(m.Retval) 153 return buf.Bytes(), nil 154 } 155 func (m *IoamDisableReply) Unmarshal(b []byte) error { 156 buf := codec.NewBuffer(b) 157 m.Retval = buf.DecodeInt32() 158 return nil 159 } 160 161 // IoamEnable defines message 'ioam_enable'. 162 type IoamEnable struct { 163 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"` 164 Seqno bool `binapi:"bool,name=seqno" json:"seqno,omitempty"` 165 Analyse bool `binapi:"bool,name=analyse" json:"analyse,omitempty"` 166 PotEnable bool `binapi:"bool,name=pot_enable" json:"pot_enable,omitempty"` 167 TraceEnable bool `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"` 168 NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"` 169 } 170 171 func (m *IoamEnable) Reset() { *m = IoamEnable{} } 172 func (*IoamEnable) GetMessageName() string { return "ioam_enable" } 173 func (*IoamEnable) GetCrcString() string { return "51ccd868" } 174 func (*IoamEnable) GetMessageType() api.MessageType { 175 return api.RequestMessage 176 } 177 178 func (m *IoamEnable) Size() (size int) { 179 if m == nil { 180 return 0 181 } 182 size += 2 // m.ID 183 size += 1 // m.Seqno 184 size += 1 // m.Analyse 185 size += 1 // m.PotEnable 186 size += 1 // m.TraceEnable 187 size += 4 // m.NodeID 188 return size 189 } 190 func (m *IoamEnable) Marshal(b []byte) ([]byte, error) { 191 if b == nil { 192 b = make([]byte, m.Size()) 193 } 194 buf := codec.NewBuffer(b) 195 buf.EncodeUint16(m.ID) 196 buf.EncodeBool(m.Seqno) 197 buf.EncodeBool(m.Analyse) 198 buf.EncodeBool(m.PotEnable) 199 buf.EncodeBool(m.TraceEnable) 200 buf.EncodeUint32(m.NodeID) 201 return buf.Bytes(), nil 202 } 203 func (m *IoamEnable) Unmarshal(b []byte) error { 204 buf := codec.NewBuffer(b) 205 m.ID = buf.DecodeUint16() 206 m.Seqno = buf.DecodeBool() 207 m.Analyse = buf.DecodeBool() 208 m.PotEnable = buf.DecodeBool() 209 m.TraceEnable = buf.DecodeBool() 210 m.NodeID = buf.DecodeUint32() 211 return nil 212 } 213 214 // IoamEnableReply defines message 'ioam_enable_reply'. 215 type IoamEnableReply struct { 216 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 217 } 218 219 func (m *IoamEnableReply) Reset() { *m = IoamEnableReply{} } 220 func (*IoamEnableReply) GetMessageName() string { return "ioam_enable_reply" } 221 func (*IoamEnableReply) GetCrcString() string { return "e8d4e804" } 222 func (*IoamEnableReply) GetMessageType() api.MessageType { 223 return api.ReplyMessage 224 } 225 226 func (m *IoamEnableReply) Size() (size int) { 227 if m == nil { 228 return 0 229 } 230 size += 4 // m.Retval 231 return size 232 } 233 func (m *IoamEnableReply) Marshal(b []byte) ([]byte, error) { 234 if b == nil { 235 b = make([]byte, m.Size()) 236 } 237 buf := codec.NewBuffer(b) 238 buf.EncodeInt32(m.Retval) 239 return buf.Bytes(), nil 240 } 241 func (m *IoamEnableReply) Unmarshal(b []byte) error { 242 buf := codec.NewBuffer(b) 243 m.Retval = buf.DecodeInt32() 244 return nil 245 } 246 247 // IPAddressDetails defines message 'ip_address_details'. 248 type IPAddressDetails struct { 249 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 250 Prefix ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"` 251 } 252 253 func (m *IPAddressDetails) Reset() { *m = IPAddressDetails{} } 254 func (*IPAddressDetails) GetMessageName() string { return "ip_address_details" } 255 func (*IPAddressDetails) GetCrcString() string { return "b1199745" } 256 func (*IPAddressDetails) GetMessageType() api.MessageType { 257 return api.ReplyMessage 258 } 259 260 func (m *IPAddressDetails) Size() (size int) { 261 if m == nil { 262 return 0 263 } 264 size += 4 // m.SwIfIndex 265 size += 1 // m.Prefix.Address.Af 266 size += 1 * 16 // m.Prefix.Address.Un 267 size += 1 // m.Prefix.Len 268 return size 269 } 270 func (m *IPAddressDetails) Marshal(b []byte) ([]byte, error) { 271 if b == nil { 272 b = make([]byte, m.Size()) 273 } 274 buf := codec.NewBuffer(b) 275 buf.EncodeUint32(uint32(m.SwIfIndex)) 276 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 277 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 278 buf.EncodeUint8(m.Prefix.Len) 279 return buf.Bytes(), nil 280 } 281 func (m *IPAddressDetails) Unmarshal(b []byte) error { 282 buf := codec.NewBuffer(b) 283 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 284 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 285 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 286 m.Prefix.Len = buf.DecodeUint8() 287 return nil 288 } 289 290 // IPAddressDump defines message 'ip_address_dump'. 291 type IPAddressDump struct { 292 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 293 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 294 } 295 296 func (m *IPAddressDump) Reset() { *m = IPAddressDump{} } 297 func (*IPAddressDump) GetMessageName() string { return "ip_address_dump" } 298 func (*IPAddressDump) GetCrcString() string { return "2d033de4" } 299 func (*IPAddressDump) GetMessageType() api.MessageType { 300 return api.RequestMessage 301 } 302 303 func (m *IPAddressDump) Size() (size int) { 304 if m == nil { 305 return 0 306 } 307 size += 4 // m.SwIfIndex 308 size += 1 // m.IsIPv6 309 return size 310 } 311 func (m *IPAddressDump) Marshal(b []byte) ([]byte, error) { 312 if b == nil { 313 b = make([]byte, m.Size()) 314 } 315 buf := codec.NewBuffer(b) 316 buf.EncodeUint32(uint32(m.SwIfIndex)) 317 buf.EncodeBool(m.IsIPv6) 318 return buf.Bytes(), nil 319 } 320 func (m *IPAddressDump) Unmarshal(b []byte) error { 321 buf := codec.NewBuffer(b) 322 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 323 m.IsIPv6 = buf.DecodeBool() 324 return nil 325 } 326 327 // IPContainerProxyAddDel defines message 'ip_container_proxy_add_del'. 328 type IPContainerProxyAddDel struct { 329 Pfx ip_types.Prefix `binapi:"prefix,name=pfx" json:"pfx,omitempty"` 330 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 331 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 332 } 333 334 func (m *IPContainerProxyAddDel) Reset() { *m = IPContainerProxyAddDel{} } 335 func (*IPContainerProxyAddDel) GetMessageName() string { return "ip_container_proxy_add_del" } 336 func (*IPContainerProxyAddDel) GetCrcString() string { return "91189f40" } 337 func (*IPContainerProxyAddDel) GetMessageType() api.MessageType { 338 return api.RequestMessage 339 } 340 341 func (m *IPContainerProxyAddDel) Size() (size int) { 342 if m == nil { 343 return 0 344 } 345 size += 1 // m.Pfx.Address.Af 346 size += 1 * 16 // m.Pfx.Address.Un 347 size += 1 // m.Pfx.Len 348 size += 4 // m.SwIfIndex 349 size += 1 // m.IsAdd 350 return size 351 } 352 func (m *IPContainerProxyAddDel) Marshal(b []byte) ([]byte, error) { 353 if b == nil { 354 b = make([]byte, m.Size()) 355 } 356 buf := codec.NewBuffer(b) 357 buf.EncodeUint8(uint8(m.Pfx.Address.Af)) 358 buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16) 359 buf.EncodeUint8(m.Pfx.Len) 360 buf.EncodeUint32(uint32(m.SwIfIndex)) 361 buf.EncodeBool(m.IsAdd) 362 return buf.Bytes(), nil 363 } 364 func (m *IPContainerProxyAddDel) Unmarshal(b []byte) error { 365 buf := codec.NewBuffer(b) 366 m.Pfx.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 367 copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 368 m.Pfx.Len = buf.DecodeUint8() 369 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 370 m.IsAdd = buf.DecodeBool() 371 return nil 372 } 373 374 // IPContainerProxyAddDelReply defines message 'ip_container_proxy_add_del_reply'. 375 type IPContainerProxyAddDelReply struct { 376 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 377 } 378 379 func (m *IPContainerProxyAddDelReply) Reset() { *m = IPContainerProxyAddDelReply{} } 380 func (*IPContainerProxyAddDelReply) GetMessageName() string { 381 return "ip_container_proxy_add_del_reply" 382 } 383 func (*IPContainerProxyAddDelReply) GetCrcString() string { return "e8d4e804" } 384 func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType { 385 return api.ReplyMessage 386 } 387 388 func (m *IPContainerProxyAddDelReply) Size() (size int) { 389 if m == nil { 390 return 0 391 } 392 size += 4 // m.Retval 393 return size 394 } 395 func (m *IPContainerProxyAddDelReply) Marshal(b []byte) ([]byte, error) { 396 if b == nil { 397 b = make([]byte, m.Size()) 398 } 399 buf := codec.NewBuffer(b) 400 buf.EncodeInt32(m.Retval) 401 return buf.Bytes(), nil 402 } 403 func (m *IPContainerProxyAddDelReply) Unmarshal(b []byte) error { 404 buf := codec.NewBuffer(b) 405 m.Retval = buf.DecodeInt32() 406 return nil 407 } 408 409 // IPContainerProxyDetails defines message 'ip_container_proxy_details'. 410 type IPContainerProxyDetails struct { 411 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 412 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 413 } 414 415 func (m *IPContainerProxyDetails) Reset() { *m = IPContainerProxyDetails{} } 416 func (*IPContainerProxyDetails) GetMessageName() string { return "ip_container_proxy_details" } 417 func (*IPContainerProxyDetails) GetCrcString() string { return "0ee460e8" } 418 func (*IPContainerProxyDetails) GetMessageType() api.MessageType { 419 return api.ReplyMessage 420 } 421 422 func (m *IPContainerProxyDetails) Size() (size int) { 423 if m == nil { 424 return 0 425 } 426 size += 4 // m.SwIfIndex 427 size += 1 // m.Prefix.Address.Af 428 size += 1 * 16 // m.Prefix.Address.Un 429 size += 1 // m.Prefix.Len 430 return size 431 } 432 func (m *IPContainerProxyDetails) Marshal(b []byte) ([]byte, error) { 433 if b == nil { 434 b = make([]byte, m.Size()) 435 } 436 buf := codec.NewBuffer(b) 437 buf.EncodeUint32(uint32(m.SwIfIndex)) 438 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 439 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 440 buf.EncodeUint8(m.Prefix.Len) 441 return buf.Bytes(), nil 442 } 443 func (m *IPContainerProxyDetails) Unmarshal(b []byte) error { 444 buf := codec.NewBuffer(b) 445 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 446 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 447 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 448 m.Prefix.Len = buf.DecodeUint8() 449 return nil 450 } 451 452 // IPContainerProxyDump defines message 'ip_container_proxy_dump'. 453 type IPContainerProxyDump struct{} 454 455 func (m *IPContainerProxyDump) Reset() { *m = IPContainerProxyDump{} } 456 func (*IPContainerProxyDump) GetMessageName() string { return "ip_container_proxy_dump" } 457 func (*IPContainerProxyDump) GetCrcString() string { return "51077d14" } 458 func (*IPContainerProxyDump) GetMessageType() api.MessageType { 459 return api.RequestMessage 460 } 461 462 func (m *IPContainerProxyDump) Size() (size int) { 463 if m == nil { 464 return 0 465 } 466 return size 467 } 468 func (m *IPContainerProxyDump) Marshal(b []byte) ([]byte, error) { 469 if b == nil { 470 b = make([]byte, m.Size()) 471 } 472 buf := codec.NewBuffer(b) 473 return buf.Bytes(), nil 474 } 475 func (m *IPContainerProxyDump) Unmarshal(b []byte) error { 476 return nil 477 } 478 479 // IPDetails defines message 'ip_details'. 480 type IPDetails struct { 481 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 482 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 483 } 484 485 func (m *IPDetails) Reset() { *m = IPDetails{} } 486 func (*IPDetails) GetMessageName() string { return "ip_details" } 487 func (*IPDetails) GetCrcString() string { return "eb152d07" } 488 func (*IPDetails) GetMessageType() api.MessageType { 489 return api.ReplyMessage 490 } 491 492 func (m *IPDetails) Size() (size int) { 493 if m == nil { 494 return 0 495 } 496 size += 4 // m.SwIfIndex 497 size += 1 // m.IsIPv6 498 return size 499 } 500 func (m *IPDetails) Marshal(b []byte) ([]byte, error) { 501 if b == nil { 502 b = make([]byte, m.Size()) 503 } 504 buf := codec.NewBuffer(b) 505 buf.EncodeUint32(uint32(m.SwIfIndex)) 506 buf.EncodeBool(m.IsIPv6) 507 return buf.Bytes(), nil 508 } 509 func (m *IPDetails) Unmarshal(b []byte) error { 510 buf := codec.NewBuffer(b) 511 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 512 m.IsIPv6 = buf.DecodeBool() 513 return nil 514 } 515 516 // IPDump defines message 'ip_dump'. 517 type IPDump struct { 518 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 519 } 520 521 func (m *IPDump) Reset() { *m = IPDump{} } 522 func (*IPDump) GetMessageName() string { return "ip_dump" } 523 func (*IPDump) GetCrcString() string { return "98d231ca" } 524 func (*IPDump) GetMessageType() api.MessageType { 525 return api.RequestMessage 526 } 527 528 func (m *IPDump) Size() (size int) { 529 if m == nil { 530 return 0 531 } 532 size += 1 // m.IsIPv6 533 return size 534 } 535 func (m *IPDump) Marshal(b []byte) ([]byte, error) { 536 if b == nil { 537 b = make([]byte, m.Size()) 538 } 539 buf := codec.NewBuffer(b) 540 buf.EncodeBool(m.IsIPv6) 541 return buf.Bytes(), nil 542 } 543 func (m *IPDump) Unmarshal(b []byte) error { 544 buf := codec.NewBuffer(b) 545 m.IsIPv6 = buf.DecodeBool() 546 return nil 547 } 548 549 // IPMrouteAddDel defines message 'ip_mroute_add_del'. 550 type IPMrouteAddDel struct { 551 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 552 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"` 553 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"` 554 } 555 556 func (m *IPMrouteAddDel) Reset() { *m = IPMrouteAddDel{} } 557 func (*IPMrouteAddDel) GetMessageName() string { return "ip_mroute_add_del" } 558 func (*IPMrouteAddDel) GetCrcString() string { return "0dd7e790" } 559 func (*IPMrouteAddDel) GetMessageType() api.MessageType { 560 return api.RequestMessage 561 } 562 563 func (m *IPMrouteAddDel) Size() (size int) { 564 if m == nil { 565 return 0 566 } 567 size += 1 // m.IsAdd 568 size += 1 // m.IsMultipath 569 size += 4 // m.Route.TableID 570 size += 4 // m.Route.EntryFlags 571 size += 4 // m.Route.RpfID 572 size += 1 // m.Route.Prefix.Af 573 size += 2 // m.Route.Prefix.GrpAddressLength 574 size += 1 * 16 // m.Route.Prefix.GrpAddress 575 size += 1 * 16 // m.Route.Prefix.SrcAddress 576 size += 1 // m.Route.NPaths 577 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 578 var s2 mfib_types.MfibPath 579 _ = s2 580 if j2 < len(m.Route.Paths) { 581 s2 = m.Route.Paths[j2] 582 } 583 size += 4 // s2.ItfFlags 584 size += 4 // s2.Path.SwIfIndex 585 size += 4 // s2.Path.TableID 586 size += 4 // s2.Path.RpfID 587 size += 1 // s2.Path.Weight 588 size += 1 // s2.Path.Preference 589 size += 4 // s2.Path.Type 590 size += 4 // s2.Path.Flags 591 size += 4 // s2.Path.Proto 592 size += 1 * 16 // s2.Path.Nh.Address 593 size += 4 // s2.Path.Nh.ViaLabel 594 size += 4 // s2.Path.Nh.ObjID 595 size += 4 // s2.Path.Nh.ClassifyTableIndex 596 size += 1 // s2.Path.NLabels 597 for j4 := 0; j4 < 16; j4++ { 598 size += 1 // s2.Path.LabelStack[j4].IsUniform 599 size += 4 // s2.Path.LabelStack[j4].Label 600 size += 1 // s2.Path.LabelStack[j4].TTL 601 size += 1 // s2.Path.LabelStack[j4].Exp 602 } 603 } 604 return size 605 } 606 func (m *IPMrouteAddDel) Marshal(b []byte) ([]byte, error) { 607 if b == nil { 608 b = make([]byte, m.Size()) 609 } 610 buf := codec.NewBuffer(b) 611 buf.EncodeBool(m.IsAdd) 612 buf.EncodeBool(m.IsMultipath) 613 buf.EncodeUint32(m.Route.TableID) 614 buf.EncodeUint32(uint32(m.Route.EntryFlags)) 615 buf.EncodeUint32(m.Route.RpfID) 616 buf.EncodeUint8(uint8(m.Route.Prefix.Af)) 617 buf.EncodeUint16(m.Route.Prefix.GrpAddressLength) 618 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16) 619 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16) 620 buf.EncodeUint8(uint8(len(m.Route.Paths))) 621 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 622 var v1 mfib_types.MfibPath // Paths 623 if j1 < len(m.Route.Paths) { 624 v1 = m.Route.Paths[j1] 625 } 626 buf.EncodeUint32(uint32(v1.ItfFlags)) 627 buf.EncodeUint32(v1.Path.SwIfIndex) 628 buf.EncodeUint32(v1.Path.TableID) 629 buf.EncodeUint32(v1.Path.RpfID) 630 buf.EncodeUint8(v1.Path.Weight) 631 buf.EncodeUint8(v1.Path.Preference) 632 buf.EncodeUint32(uint32(v1.Path.Type)) 633 buf.EncodeUint32(uint32(v1.Path.Flags)) 634 buf.EncodeUint32(uint32(v1.Path.Proto)) 635 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16) 636 buf.EncodeUint32(v1.Path.Nh.ViaLabel) 637 buf.EncodeUint32(v1.Path.Nh.ObjID) 638 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex) 639 buf.EncodeUint8(v1.Path.NLabels) 640 for j3 := 0; j3 < 16; j3++ { 641 buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform) 642 buf.EncodeUint32(v1.Path.LabelStack[j3].Label) 643 buf.EncodeUint8(v1.Path.LabelStack[j3].TTL) 644 buf.EncodeUint8(v1.Path.LabelStack[j3].Exp) 645 } 646 } 647 return buf.Bytes(), nil 648 } 649 func (m *IPMrouteAddDel) Unmarshal(b []byte) error { 650 buf := codec.NewBuffer(b) 651 m.IsAdd = buf.DecodeBool() 652 m.IsMultipath = buf.DecodeBool() 653 m.Route.TableID = buf.DecodeUint32() 654 m.Route.EntryFlags = mfib_types.MfibEntryFlags(buf.DecodeUint32()) 655 m.Route.RpfID = buf.DecodeUint32() 656 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8()) 657 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16() 658 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 659 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 660 m.Route.NPaths = buf.DecodeUint8() 661 m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths) 662 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 663 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32()) 664 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32() 665 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32() 666 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32() 667 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8() 668 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8() 669 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32()) 670 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 671 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 672 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 673 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32() 674 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32() 675 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32() 676 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8() 677 for j3 := 0; j3 < 16; j3++ { 678 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8() 679 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32() 680 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8() 681 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8() 682 } 683 } 684 return nil 685 } 686 687 // IPMrouteAddDelReply defines message 'ip_mroute_add_del_reply'. 688 type IPMrouteAddDelReply struct { 689 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 690 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` 691 } 692 693 func (m *IPMrouteAddDelReply) Reset() { *m = IPMrouteAddDelReply{} } 694 func (*IPMrouteAddDelReply) GetMessageName() string { return "ip_mroute_add_del_reply" } 695 func (*IPMrouteAddDelReply) GetCrcString() string { return "1992deab" } 696 func (*IPMrouteAddDelReply) GetMessageType() api.MessageType { 697 return api.ReplyMessage 698 } 699 700 func (m *IPMrouteAddDelReply) Size() (size int) { 701 if m == nil { 702 return 0 703 } 704 size += 4 // m.Retval 705 size += 4 // m.StatsIndex 706 return size 707 } 708 func (m *IPMrouteAddDelReply) Marshal(b []byte) ([]byte, error) { 709 if b == nil { 710 b = make([]byte, m.Size()) 711 } 712 buf := codec.NewBuffer(b) 713 buf.EncodeInt32(m.Retval) 714 buf.EncodeUint32(m.StatsIndex) 715 return buf.Bytes(), nil 716 } 717 func (m *IPMrouteAddDelReply) Unmarshal(b []byte) error { 718 buf := codec.NewBuffer(b) 719 m.Retval = buf.DecodeInt32() 720 m.StatsIndex = buf.DecodeUint32() 721 return nil 722 } 723 724 // IPMrouteDetails defines message 'ip_mroute_details'. 725 type IPMrouteDetails struct { 726 Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"` 727 } 728 729 func (m *IPMrouteDetails) Reset() { *m = IPMrouteDetails{} } 730 func (*IPMrouteDetails) GetMessageName() string { return "ip_mroute_details" } 731 func (*IPMrouteDetails) GetCrcString() string { return "c5cb23fc" } 732 func (*IPMrouteDetails) GetMessageType() api.MessageType { 733 return api.ReplyMessage 734 } 735 736 func (m *IPMrouteDetails) Size() (size int) { 737 if m == nil { 738 return 0 739 } 740 size += 4 // m.Route.TableID 741 size += 4 // m.Route.EntryFlags 742 size += 4 // m.Route.RpfID 743 size += 1 // m.Route.Prefix.Af 744 size += 2 // m.Route.Prefix.GrpAddressLength 745 size += 1 * 16 // m.Route.Prefix.GrpAddress 746 size += 1 * 16 // m.Route.Prefix.SrcAddress 747 size += 1 // m.Route.NPaths 748 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 749 var s2 mfib_types.MfibPath 750 _ = s2 751 if j2 < len(m.Route.Paths) { 752 s2 = m.Route.Paths[j2] 753 } 754 size += 4 // s2.ItfFlags 755 size += 4 // s2.Path.SwIfIndex 756 size += 4 // s2.Path.TableID 757 size += 4 // s2.Path.RpfID 758 size += 1 // s2.Path.Weight 759 size += 1 // s2.Path.Preference 760 size += 4 // s2.Path.Type 761 size += 4 // s2.Path.Flags 762 size += 4 // s2.Path.Proto 763 size += 1 * 16 // s2.Path.Nh.Address 764 size += 4 // s2.Path.Nh.ViaLabel 765 size += 4 // s2.Path.Nh.ObjID 766 size += 4 // s2.Path.Nh.ClassifyTableIndex 767 size += 1 // s2.Path.NLabels 768 for j4 := 0; j4 < 16; j4++ { 769 size += 1 // s2.Path.LabelStack[j4].IsUniform 770 size += 4 // s2.Path.LabelStack[j4].Label 771 size += 1 // s2.Path.LabelStack[j4].TTL 772 size += 1 // s2.Path.LabelStack[j4].Exp 773 } 774 } 775 return size 776 } 777 func (m *IPMrouteDetails) Marshal(b []byte) ([]byte, error) { 778 if b == nil { 779 b = make([]byte, m.Size()) 780 } 781 buf := codec.NewBuffer(b) 782 buf.EncodeUint32(m.Route.TableID) 783 buf.EncodeUint32(uint32(m.Route.EntryFlags)) 784 buf.EncodeUint32(m.Route.RpfID) 785 buf.EncodeUint8(uint8(m.Route.Prefix.Af)) 786 buf.EncodeUint16(m.Route.Prefix.GrpAddressLength) 787 buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16) 788 buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16) 789 buf.EncodeUint8(uint8(len(m.Route.Paths))) 790 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 791 var v1 mfib_types.MfibPath // Paths 792 if j1 < len(m.Route.Paths) { 793 v1 = m.Route.Paths[j1] 794 } 795 buf.EncodeUint32(uint32(v1.ItfFlags)) 796 buf.EncodeUint32(v1.Path.SwIfIndex) 797 buf.EncodeUint32(v1.Path.TableID) 798 buf.EncodeUint32(v1.Path.RpfID) 799 buf.EncodeUint8(v1.Path.Weight) 800 buf.EncodeUint8(v1.Path.Preference) 801 buf.EncodeUint32(uint32(v1.Path.Type)) 802 buf.EncodeUint32(uint32(v1.Path.Flags)) 803 buf.EncodeUint32(uint32(v1.Path.Proto)) 804 buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16) 805 buf.EncodeUint32(v1.Path.Nh.ViaLabel) 806 buf.EncodeUint32(v1.Path.Nh.ObjID) 807 buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex) 808 buf.EncodeUint8(v1.Path.NLabels) 809 for j3 := 0; j3 < 16; j3++ { 810 buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform) 811 buf.EncodeUint32(v1.Path.LabelStack[j3].Label) 812 buf.EncodeUint8(v1.Path.LabelStack[j3].TTL) 813 buf.EncodeUint8(v1.Path.LabelStack[j3].Exp) 814 } 815 } 816 return buf.Bytes(), nil 817 } 818 func (m *IPMrouteDetails) Unmarshal(b []byte) error { 819 buf := codec.NewBuffer(b) 820 m.Route.TableID = buf.DecodeUint32() 821 m.Route.EntryFlags = mfib_types.MfibEntryFlags(buf.DecodeUint32()) 822 m.Route.RpfID = buf.DecodeUint32() 823 m.Route.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8()) 824 m.Route.Prefix.GrpAddressLength = buf.DecodeUint16() 825 copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 826 copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 827 m.Route.NPaths = buf.DecodeUint8() 828 m.Route.Paths = make([]mfib_types.MfibPath, m.Route.NPaths) 829 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 830 m.Route.Paths[j1].ItfFlags = mfib_types.MfibItfFlags(buf.DecodeUint32()) 831 m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32() 832 m.Route.Paths[j1].Path.TableID = buf.DecodeUint32() 833 m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32() 834 m.Route.Paths[j1].Path.Weight = buf.DecodeUint8() 835 m.Route.Paths[j1].Path.Preference = buf.DecodeUint8() 836 m.Route.Paths[j1].Path.Type = fib_types.FibPathType(buf.DecodeUint32()) 837 m.Route.Paths[j1].Path.Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 838 m.Route.Paths[j1].Path.Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 839 copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 840 m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32() 841 m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32() 842 m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32() 843 m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8() 844 for j3 := 0; j3 < 16; j3++ { 845 m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8() 846 m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32() 847 m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8() 848 m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8() 849 } 850 } 851 return nil 852 } 853 854 // IPMrouteDump defines message 'ip_mroute_dump'. 855 type IPMrouteDump struct { 856 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 857 } 858 859 func (m *IPMrouteDump) Reset() { *m = IPMrouteDump{} } 860 func (*IPMrouteDump) GetMessageName() string { return "ip_mroute_dump" } 861 func (*IPMrouteDump) GetCrcString() string { return "b9d2e09e" } 862 func (*IPMrouteDump) GetMessageType() api.MessageType { 863 return api.RequestMessage 864 } 865 866 func (m *IPMrouteDump) Size() (size int) { 867 if m == nil { 868 return 0 869 } 870 size += 4 // m.Table.TableID 871 size += 1 // m.Table.IsIP6 872 size += 64 // m.Table.Name 873 return size 874 } 875 func (m *IPMrouteDump) Marshal(b []byte) ([]byte, error) { 876 if b == nil { 877 b = make([]byte, m.Size()) 878 } 879 buf := codec.NewBuffer(b) 880 buf.EncodeUint32(m.Table.TableID) 881 buf.EncodeBool(m.Table.IsIP6) 882 buf.EncodeString(m.Table.Name, 64) 883 return buf.Bytes(), nil 884 } 885 func (m *IPMrouteDump) Unmarshal(b []byte) error { 886 buf := codec.NewBuffer(b) 887 m.Table.TableID = buf.DecodeUint32() 888 m.Table.IsIP6 = buf.DecodeBool() 889 m.Table.Name = buf.DecodeString(64) 890 return nil 891 } 892 893 // IPMtableDetails defines message 'ip_mtable_details'. 894 type IPMtableDetails struct { 895 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 896 } 897 898 func (m *IPMtableDetails) Reset() { *m = IPMtableDetails{} } 899 func (*IPMtableDetails) GetMessageName() string { return "ip_mtable_details" } 900 func (*IPMtableDetails) GetCrcString() string { return "b9d2e09e" } 901 func (*IPMtableDetails) GetMessageType() api.MessageType { 902 return api.RequestMessage 903 } 904 905 func (m *IPMtableDetails) Size() (size int) { 906 if m == nil { 907 return 0 908 } 909 size += 4 // m.Table.TableID 910 size += 1 // m.Table.IsIP6 911 size += 64 // m.Table.Name 912 return size 913 } 914 func (m *IPMtableDetails) Marshal(b []byte) ([]byte, error) { 915 if b == nil { 916 b = make([]byte, m.Size()) 917 } 918 buf := codec.NewBuffer(b) 919 buf.EncodeUint32(m.Table.TableID) 920 buf.EncodeBool(m.Table.IsIP6) 921 buf.EncodeString(m.Table.Name, 64) 922 return buf.Bytes(), nil 923 } 924 func (m *IPMtableDetails) Unmarshal(b []byte) error { 925 buf := codec.NewBuffer(b) 926 m.Table.TableID = buf.DecodeUint32() 927 m.Table.IsIP6 = buf.DecodeBool() 928 m.Table.Name = buf.DecodeString(64) 929 return nil 930 } 931 932 // IPMtableDump defines message 'ip_mtable_dump'. 933 type IPMtableDump struct{} 934 935 func (m *IPMtableDump) Reset() { *m = IPMtableDump{} } 936 func (*IPMtableDump) GetMessageName() string { return "ip_mtable_dump" } 937 func (*IPMtableDump) GetCrcString() string { return "51077d14" } 938 func (*IPMtableDump) GetMessageType() api.MessageType { 939 return api.RequestMessage 940 } 941 942 func (m *IPMtableDump) Size() (size int) { 943 if m == nil { 944 return 0 945 } 946 return size 947 } 948 func (m *IPMtableDump) Marshal(b []byte) ([]byte, error) { 949 if b == nil { 950 b = make([]byte, m.Size()) 951 } 952 buf := codec.NewBuffer(b) 953 return buf.Bytes(), nil 954 } 955 func (m *IPMtableDump) Unmarshal(b []byte) error { 956 return nil 957 } 958 959 // IPPuntPolice defines message 'ip_punt_police'. 960 type IPPuntPolice struct { 961 PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"` 962 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 963 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 964 } 965 966 func (m *IPPuntPolice) Reset() { *m = IPPuntPolice{} } 967 func (*IPPuntPolice) GetMessageName() string { return "ip_punt_police" } 968 func (*IPPuntPolice) GetCrcString() string { return "db867cea" } 969 func (*IPPuntPolice) GetMessageType() api.MessageType { 970 return api.RequestMessage 971 } 972 973 func (m *IPPuntPolice) Size() (size int) { 974 if m == nil { 975 return 0 976 } 977 size += 4 // m.PolicerIndex 978 size += 1 // m.IsAdd 979 size += 1 // m.IsIP6 980 return size 981 } 982 func (m *IPPuntPolice) Marshal(b []byte) ([]byte, error) { 983 if b == nil { 984 b = make([]byte, m.Size()) 985 } 986 buf := codec.NewBuffer(b) 987 buf.EncodeUint32(m.PolicerIndex) 988 buf.EncodeBool(m.IsAdd) 989 buf.EncodeBool(m.IsIP6) 990 return buf.Bytes(), nil 991 } 992 func (m *IPPuntPolice) Unmarshal(b []byte) error { 993 buf := codec.NewBuffer(b) 994 m.PolicerIndex = buf.DecodeUint32() 995 m.IsAdd = buf.DecodeBool() 996 m.IsIP6 = buf.DecodeBool() 997 return nil 998 } 999 1000 // IPPuntPoliceReply defines message 'ip_punt_police_reply'. 1001 type IPPuntPoliceReply struct { 1002 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1003 } 1004 1005 func (m *IPPuntPoliceReply) Reset() { *m = IPPuntPoliceReply{} } 1006 func (*IPPuntPoliceReply) GetMessageName() string { return "ip_punt_police_reply" } 1007 func (*IPPuntPoliceReply) GetCrcString() string { return "e8d4e804" } 1008 func (*IPPuntPoliceReply) GetMessageType() api.MessageType { 1009 return api.ReplyMessage 1010 } 1011 1012 func (m *IPPuntPoliceReply) Size() (size int) { 1013 if m == nil { 1014 return 0 1015 } 1016 size += 4 // m.Retval 1017 return size 1018 } 1019 func (m *IPPuntPoliceReply) Marshal(b []byte) ([]byte, error) { 1020 if b == nil { 1021 b = make([]byte, m.Size()) 1022 } 1023 buf := codec.NewBuffer(b) 1024 buf.EncodeInt32(m.Retval) 1025 return buf.Bytes(), nil 1026 } 1027 func (m *IPPuntPoliceReply) Unmarshal(b []byte) error { 1028 buf := codec.NewBuffer(b) 1029 m.Retval = buf.DecodeInt32() 1030 return nil 1031 } 1032 1033 // IPPuntRedirect defines message 'ip_punt_redirect'. 1034 type IPPuntRedirect struct { 1035 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"` 1036 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 1037 } 1038 1039 func (m *IPPuntRedirect) Reset() { *m = IPPuntRedirect{} } 1040 func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" } 1041 func (*IPPuntRedirect) GetCrcString() string { return "a9a5592c" } 1042 func (*IPPuntRedirect) GetMessageType() api.MessageType { 1043 return api.RequestMessage 1044 } 1045 1046 func (m *IPPuntRedirect) Size() (size int) { 1047 if m == nil { 1048 return 0 1049 } 1050 size += 4 // m.Punt.RxSwIfIndex 1051 size += 4 // m.Punt.TxSwIfIndex 1052 size += 1 // m.Punt.Nh.Af 1053 size += 1 * 16 // m.Punt.Nh.Un 1054 size += 1 // m.IsAdd 1055 return size 1056 } 1057 func (m *IPPuntRedirect) Marshal(b []byte) ([]byte, error) { 1058 if b == nil { 1059 b = make([]byte, m.Size()) 1060 } 1061 buf := codec.NewBuffer(b) 1062 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex)) 1063 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex)) 1064 buf.EncodeUint8(uint8(m.Punt.Nh.Af)) 1065 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16) 1066 buf.EncodeBool(m.IsAdd) 1067 return buf.Bytes(), nil 1068 } 1069 func (m *IPPuntRedirect) Unmarshal(b []byte) error { 1070 buf := codec.NewBuffer(b) 1071 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1072 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1073 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1074 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1075 m.IsAdd = buf.DecodeBool() 1076 return nil 1077 } 1078 1079 // IPPuntRedirectDetails defines message 'ip_punt_redirect_details'. 1080 type IPPuntRedirectDetails struct { 1081 Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"` 1082 } 1083 1084 func (m *IPPuntRedirectDetails) Reset() { *m = IPPuntRedirectDetails{} } 1085 func (*IPPuntRedirectDetails) GetMessageName() string { return "ip_punt_redirect_details" } 1086 func (*IPPuntRedirectDetails) GetCrcString() string { return "3924f5d3" } 1087 func (*IPPuntRedirectDetails) GetMessageType() api.MessageType { 1088 return api.ReplyMessage 1089 } 1090 1091 func (m *IPPuntRedirectDetails) Size() (size int) { 1092 if m == nil { 1093 return 0 1094 } 1095 size += 4 // m.Punt.RxSwIfIndex 1096 size += 4 // m.Punt.TxSwIfIndex 1097 size += 1 // m.Punt.Nh.Af 1098 size += 1 * 16 // m.Punt.Nh.Un 1099 return size 1100 } 1101 func (m *IPPuntRedirectDetails) Marshal(b []byte) ([]byte, error) { 1102 if b == nil { 1103 b = make([]byte, m.Size()) 1104 } 1105 buf := codec.NewBuffer(b) 1106 buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex)) 1107 buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex)) 1108 buf.EncodeUint8(uint8(m.Punt.Nh.Af)) 1109 buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16) 1110 return buf.Bytes(), nil 1111 } 1112 func (m *IPPuntRedirectDetails) Unmarshal(b []byte) error { 1113 buf := codec.NewBuffer(b) 1114 m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1115 m.Punt.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1116 m.Punt.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1117 copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1118 return nil 1119 } 1120 1121 // IPPuntRedirectDump defines message 'ip_punt_redirect_dump'. 1122 type IPPuntRedirectDump struct { 1123 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1124 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 1125 } 1126 1127 func (m *IPPuntRedirectDump) Reset() { *m = IPPuntRedirectDump{} } 1128 func (*IPPuntRedirectDump) GetMessageName() string { return "ip_punt_redirect_dump" } 1129 func (*IPPuntRedirectDump) GetCrcString() string { return "2d033de4" } 1130 func (*IPPuntRedirectDump) GetMessageType() api.MessageType { 1131 return api.RequestMessage 1132 } 1133 1134 func (m *IPPuntRedirectDump) Size() (size int) { 1135 if m == nil { 1136 return 0 1137 } 1138 size += 4 // m.SwIfIndex 1139 size += 1 // m.IsIPv6 1140 return size 1141 } 1142 func (m *IPPuntRedirectDump) Marshal(b []byte) ([]byte, error) { 1143 if b == nil { 1144 b = make([]byte, m.Size()) 1145 } 1146 buf := codec.NewBuffer(b) 1147 buf.EncodeUint32(uint32(m.SwIfIndex)) 1148 buf.EncodeBool(m.IsIPv6) 1149 return buf.Bytes(), nil 1150 } 1151 func (m *IPPuntRedirectDump) Unmarshal(b []byte) error { 1152 buf := codec.NewBuffer(b) 1153 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1154 m.IsIPv6 = buf.DecodeBool() 1155 return nil 1156 } 1157 1158 // IPPuntRedirectReply defines message 'ip_punt_redirect_reply'. 1159 type IPPuntRedirectReply struct { 1160 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1161 } 1162 1163 func (m *IPPuntRedirectReply) Reset() { *m = IPPuntRedirectReply{} } 1164 func (*IPPuntRedirectReply) GetMessageName() string { return "ip_punt_redirect_reply" } 1165 func (*IPPuntRedirectReply) GetCrcString() string { return "e8d4e804" } 1166 func (*IPPuntRedirectReply) GetMessageType() api.MessageType { 1167 return api.ReplyMessage 1168 } 1169 1170 func (m *IPPuntRedirectReply) Size() (size int) { 1171 if m == nil { 1172 return 0 1173 } 1174 size += 4 // m.Retval 1175 return size 1176 } 1177 func (m *IPPuntRedirectReply) Marshal(b []byte) ([]byte, error) { 1178 if b == nil { 1179 b = make([]byte, m.Size()) 1180 } 1181 buf := codec.NewBuffer(b) 1182 buf.EncodeInt32(m.Retval) 1183 return buf.Bytes(), nil 1184 } 1185 func (m *IPPuntRedirectReply) Unmarshal(b []byte) error { 1186 buf := codec.NewBuffer(b) 1187 m.Retval = buf.DecodeInt32() 1188 return nil 1189 } 1190 1191 // IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'. 1192 type IPReassemblyEnableDisable struct { 1193 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1194 EnableIP4 bool `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"` 1195 EnableIP6 bool `binapi:"bool,name=enable_ip6" json:"enable_ip6,omitempty"` 1196 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"` 1197 } 1198 1199 func (m *IPReassemblyEnableDisable) Reset() { *m = IPReassemblyEnableDisable{} } 1200 func (*IPReassemblyEnableDisable) GetMessageName() string { return "ip_reassembly_enable_disable" } 1201 func (*IPReassemblyEnableDisable) GetCrcString() string { return "885c85a6" } 1202 func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType { 1203 return api.RequestMessage 1204 } 1205 1206 func (m *IPReassemblyEnableDisable) Size() (size int) { 1207 if m == nil { 1208 return 0 1209 } 1210 size += 4 // m.SwIfIndex 1211 size += 1 // m.EnableIP4 1212 size += 1 // m.EnableIP6 1213 size += 4 // m.Type 1214 return size 1215 } 1216 func (m *IPReassemblyEnableDisable) Marshal(b []byte) ([]byte, error) { 1217 if b == nil { 1218 b = make([]byte, m.Size()) 1219 } 1220 buf := codec.NewBuffer(b) 1221 buf.EncodeUint32(uint32(m.SwIfIndex)) 1222 buf.EncodeBool(m.EnableIP4) 1223 buf.EncodeBool(m.EnableIP6) 1224 buf.EncodeUint32(uint32(m.Type)) 1225 return buf.Bytes(), nil 1226 } 1227 func (m *IPReassemblyEnableDisable) Unmarshal(b []byte) error { 1228 buf := codec.NewBuffer(b) 1229 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1230 m.EnableIP4 = buf.DecodeBool() 1231 m.EnableIP6 = buf.DecodeBool() 1232 m.Type = IPReassType(buf.DecodeUint32()) 1233 return nil 1234 } 1235 1236 // IPReassemblyEnableDisableReply defines message 'ip_reassembly_enable_disable_reply'. 1237 type IPReassemblyEnableDisableReply struct { 1238 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1239 } 1240 1241 func (m *IPReassemblyEnableDisableReply) Reset() { *m = IPReassemblyEnableDisableReply{} } 1242 func (*IPReassemblyEnableDisableReply) GetMessageName() string { 1243 return "ip_reassembly_enable_disable_reply" 1244 } 1245 func (*IPReassemblyEnableDisableReply) GetCrcString() string { return "e8d4e804" } 1246 func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType { 1247 return api.ReplyMessage 1248 } 1249 1250 func (m *IPReassemblyEnableDisableReply) Size() (size int) { 1251 if m == nil { 1252 return 0 1253 } 1254 size += 4 // m.Retval 1255 return size 1256 } 1257 func (m *IPReassemblyEnableDisableReply) Marshal(b []byte) ([]byte, error) { 1258 if b == nil { 1259 b = make([]byte, m.Size()) 1260 } 1261 buf := codec.NewBuffer(b) 1262 buf.EncodeInt32(m.Retval) 1263 return buf.Bytes(), nil 1264 } 1265 func (m *IPReassemblyEnableDisableReply) Unmarshal(b []byte) error { 1266 buf := codec.NewBuffer(b) 1267 m.Retval = buf.DecodeInt32() 1268 return nil 1269 } 1270 1271 // IPReassemblyGet defines message 'ip_reassembly_get'. 1272 type IPReassemblyGet struct { 1273 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 1274 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"` 1275 } 1276 1277 func (m *IPReassemblyGet) Reset() { *m = IPReassemblyGet{} } 1278 func (*IPReassemblyGet) GetMessageName() string { return "ip_reassembly_get" } 1279 func (*IPReassemblyGet) GetCrcString() string { return "ea13ff63" } 1280 func (*IPReassemblyGet) GetMessageType() api.MessageType { 1281 return api.RequestMessage 1282 } 1283 1284 func (m *IPReassemblyGet) Size() (size int) { 1285 if m == nil { 1286 return 0 1287 } 1288 size += 1 // m.IsIP6 1289 size += 4 // m.Type 1290 return size 1291 } 1292 func (m *IPReassemblyGet) Marshal(b []byte) ([]byte, error) { 1293 if b == nil { 1294 b = make([]byte, m.Size()) 1295 } 1296 buf := codec.NewBuffer(b) 1297 buf.EncodeBool(m.IsIP6) 1298 buf.EncodeUint32(uint32(m.Type)) 1299 return buf.Bytes(), nil 1300 } 1301 func (m *IPReassemblyGet) Unmarshal(b []byte) error { 1302 buf := codec.NewBuffer(b) 1303 m.IsIP6 = buf.DecodeBool() 1304 m.Type = IPReassType(buf.DecodeUint32()) 1305 return nil 1306 } 1307 1308 // IPReassemblyGetReply defines message 'ip_reassembly_get_reply'. 1309 type IPReassemblyGetReply struct { 1310 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1311 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"` 1312 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"` 1313 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"` 1314 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"` 1315 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 1316 } 1317 1318 func (m *IPReassemblyGetReply) Reset() { *m = IPReassemblyGetReply{} } 1319 func (*IPReassemblyGetReply) GetMessageName() string { return "ip_reassembly_get_reply" } 1320 func (*IPReassemblyGetReply) GetCrcString() string { return "d5eb8d34" } 1321 func (*IPReassemblyGetReply) GetMessageType() api.MessageType { 1322 return api.ReplyMessage 1323 } 1324 1325 func (m *IPReassemblyGetReply) Size() (size int) { 1326 if m == nil { 1327 return 0 1328 } 1329 size += 4 // m.Retval 1330 size += 4 // m.TimeoutMs 1331 size += 4 // m.MaxReassemblies 1332 size += 4 // m.MaxReassemblyLength 1333 size += 4 // m.ExpireWalkIntervalMs 1334 size += 1 // m.IsIP6 1335 return size 1336 } 1337 func (m *IPReassemblyGetReply) Marshal(b []byte) ([]byte, error) { 1338 if b == nil { 1339 b = make([]byte, m.Size()) 1340 } 1341 buf := codec.NewBuffer(b) 1342 buf.EncodeInt32(m.Retval) 1343 buf.EncodeUint32(m.TimeoutMs) 1344 buf.EncodeUint32(m.MaxReassemblies) 1345 buf.EncodeUint32(m.MaxReassemblyLength) 1346 buf.EncodeUint32(m.ExpireWalkIntervalMs) 1347 buf.EncodeBool(m.IsIP6) 1348 return buf.Bytes(), nil 1349 } 1350 func (m *IPReassemblyGetReply) Unmarshal(b []byte) error { 1351 buf := codec.NewBuffer(b) 1352 m.Retval = buf.DecodeInt32() 1353 m.TimeoutMs = buf.DecodeUint32() 1354 m.MaxReassemblies = buf.DecodeUint32() 1355 m.MaxReassemblyLength = buf.DecodeUint32() 1356 m.ExpireWalkIntervalMs = buf.DecodeUint32() 1357 m.IsIP6 = buf.DecodeBool() 1358 return nil 1359 } 1360 1361 // IPReassemblySet defines message 'ip_reassembly_set'. 1362 type IPReassemblySet struct { 1363 TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"` 1364 MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"` 1365 MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"` 1366 ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"` 1367 IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` 1368 Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"` 1369 } 1370 1371 func (m *IPReassemblySet) Reset() { *m = IPReassemblySet{} } 1372 func (*IPReassemblySet) GetMessageName() string { return "ip_reassembly_set" } 1373 func (*IPReassemblySet) GetCrcString() string { return "16467d25" } 1374 func (*IPReassemblySet) GetMessageType() api.MessageType { 1375 return api.RequestMessage 1376 } 1377 1378 func (m *IPReassemblySet) Size() (size int) { 1379 if m == nil { 1380 return 0 1381 } 1382 size += 4 // m.TimeoutMs 1383 size += 4 // m.MaxReassemblies 1384 size += 4 // m.MaxReassemblyLength 1385 size += 4 // m.ExpireWalkIntervalMs 1386 size += 1 // m.IsIP6 1387 size += 4 // m.Type 1388 return size 1389 } 1390 func (m *IPReassemblySet) Marshal(b []byte) ([]byte, error) { 1391 if b == nil { 1392 b = make([]byte, m.Size()) 1393 } 1394 buf := codec.NewBuffer(b) 1395 buf.EncodeUint32(m.TimeoutMs) 1396 buf.EncodeUint32(m.MaxReassemblies) 1397 buf.EncodeUint32(m.MaxReassemblyLength) 1398 buf.EncodeUint32(m.ExpireWalkIntervalMs) 1399 buf.EncodeBool(m.IsIP6) 1400 buf.EncodeUint32(uint32(m.Type)) 1401 return buf.Bytes(), nil 1402 } 1403 func (m *IPReassemblySet) Unmarshal(b []byte) error { 1404 buf := codec.NewBuffer(b) 1405 m.TimeoutMs = buf.DecodeUint32() 1406 m.MaxReassemblies = buf.DecodeUint32() 1407 m.MaxReassemblyLength = buf.DecodeUint32() 1408 m.ExpireWalkIntervalMs = buf.DecodeUint32() 1409 m.IsIP6 = buf.DecodeBool() 1410 m.Type = IPReassType(buf.DecodeUint32()) 1411 return nil 1412 } 1413 1414 // IPReassemblySetReply defines message 'ip_reassembly_set_reply'. 1415 type IPReassemblySetReply struct { 1416 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1417 } 1418 1419 func (m *IPReassemblySetReply) Reset() { *m = IPReassemblySetReply{} } 1420 func (*IPReassemblySetReply) GetMessageName() string { return "ip_reassembly_set_reply" } 1421 func (*IPReassemblySetReply) GetCrcString() string { return "e8d4e804" } 1422 func (*IPReassemblySetReply) GetMessageType() api.MessageType { 1423 return api.ReplyMessage 1424 } 1425 1426 func (m *IPReassemblySetReply) Size() (size int) { 1427 if m == nil { 1428 return 0 1429 } 1430 size += 4 // m.Retval 1431 return size 1432 } 1433 func (m *IPReassemblySetReply) Marshal(b []byte) ([]byte, error) { 1434 if b == nil { 1435 b = make([]byte, m.Size()) 1436 } 1437 buf := codec.NewBuffer(b) 1438 buf.EncodeInt32(m.Retval) 1439 return buf.Bytes(), nil 1440 } 1441 func (m *IPReassemblySetReply) Unmarshal(b []byte) error { 1442 buf := codec.NewBuffer(b) 1443 m.Retval = buf.DecodeInt32() 1444 return nil 1445 } 1446 1447 // IPRouteAddDel defines message 'ip_route_add_del'. 1448 type IPRouteAddDel struct { 1449 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 1450 IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"` 1451 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"` 1452 } 1453 1454 func (m *IPRouteAddDel) Reset() { *m = IPRouteAddDel{} } 1455 func (*IPRouteAddDel) GetMessageName() string { return "ip_route_add_del" } 1456 func (*IPRouteAddDel) GetCrcString() string { return "c1ff832d" } 1457 func (*IPRouteAddDel) GetMessageType() api.MessageType { 1458 return api.RequestMessage 1459 } 1460 1461 func (m *IPRouteAddDel) Size() (size int) { 1462 if m == nil { 1463 return 0 1464 } 1465 size += 1 // m.IsAdd 1466 size += 1 // m.IsMultipath 1467 size += 4 // m.Route.TableID 1468 size += 4 // m.Route.StatsIndex 1469 size += 1 // m.Route.Prefix.Address.Af 1470 size += 1 * 16 // m.Route.Prefix.Address.Un 1471 size += 1 // m.Route.Prefix.Len 1472 size += 1 // m.Route.NPaths 1473 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 1474 var s2 fib_types.FibPath 1475 _ = s2 1476 if j2 < len(m.Route.Paths) { 1477 s2 = m.Route.Paths[j2] 1478 } 1479 size += 4 // s2.SwIfIndex 1480 size += 4 // s2.TableID 1481 size += 4 // s2.RpfID 1482 size += 1 // s2.Weight 1483 size += 1 // s2.Preference 1484 size += 4 // s2.Type 1485 size += 4 // s2.Flags 1486 size += 4 // s2.Proto 1487 size += 1 * 16 // s2.Nh.Address 1488 size += 4 // s2.Nh.ViaLabel 1489 size += 4 // s2.Nh.ObjID 1490 size += 4 // s2.Nh.ClassifyTableIndex 1491 size += 1 // s2.NLabels 1492 for j3 := 0; j3 < 16; j3++ { 1493 size += 1 // s2.LabelStack[j3].IsUniform 1494 size += 4 // s2.LabelStack[j3].Label 1495 size += 1 // s2.LabelStack[j3].TTL 1496 size += 1 // s2.LabelStack[j3].Exp 1497 } 1498 } 1499 return size 1500 } 1501 func (m *IPRouteAddDel) Marshal(b []byte) ([]byte, error) { 1502 if b == nil { 1503 b = make([]byte, m.Size()) 1504 } 1505 buf := codec.NewBuffer(b) 1506 buf.EncodeBool(m.IsAdd) 1507 buf.EncodeBool(m.IsMultipath) 1508 buf.EncodeUint32(m.Route.TableID) 1509 buf.EncodeUint32(m.Route.StatsIndex) 1510 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 1511 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 1512 buf.EncodeUint8(m.Route.Prefix.Len) 1513 buf.EncodeUint8(uint8(len(m.Route.Paths))) 1514 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 1515 var v1 fib_types.FibPath // Paths 1516 if j1 < len(m.Route.Paths) { 1517 v1 = m.Route.Paths[j1] 1518 } 1519 buf.EncodeUint32(v1.SwIfIndex) 1520 buf.EncodeUint32(v1.TableID) 1521 buf.EncodeUint32(v1.RpfID) 1522 buf.EncodeUint8(v1.Weight) 1523 buf.EncodeUint8(v1.Preference) 1524 buf.EncodeUint32(uint32(v1.Type)) 1525 buf.EncodeUint32(uint32(v1.Flags)) 1526 buf.EncodeUint32(uint32(v1.Proto)) 1527 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 1528 buf.EncodeUint32(v1.Nh.ViaLabel) 1529 buf.EncodeUint32(v1.Nh.ObjID) 1530 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 1531 buf.EncodeUint8(v1.NLabels) 1532 for j2 := 0; j2 < 16; j2++ { 1533 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 1534 buf.EncodeUint32(v1.LabelStack[j2].Label) 1535 buf.EncodeUint8(v1.LabelStack[j2].TTL) 1536 buf.EncodeUint8(v1.LabelStack[j2].Exp) 1537 } 1538 } 1539 return buf.Bytes(), nil 1540 } 1541 func (m *IPRouteAddDel) Unmarshal(b []byte) error { 1542 buf := codec.NewBuffer(b) 1543 m.IsAdd = buf.DecodeBool() 1544 m.IsMultipath = buf.DecodeBool() 1545 m.Route.TableID = buf.DecodeUint32() 1546 m.Route.StatsIndex = buf.DecodeUint32() 1547 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1548 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1549 m.Route.Prefix.Len = buf.DecodeUint8() 1550 m.Route.NPaths = buf.DecodeUint8() 1551 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 1552 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 1553 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 1554 m.Route.Paths[j1].TableID = buf.DecodeUint32() 1555 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 1556 m.Route.Paths[j1].Weight = buf.DecodeUint8() 1557 m.Route.Paths[j1].Preference = buf.DecodeUint8() 1558 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 1559 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 1560 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 1561 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 1562 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 1563 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 1564 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 1565 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 1566 for j2 := 0; j2 < 16; j2++ { 1567 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 1568 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 1569 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 1570 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 1571 } 1572 } 1573 return nil 1574 } 1575 1576 // IPRouteAddDelReply defines message 'ip_route_add_del_reply'. 1577 type IPRouteAddDelReply struct { 1578 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1579 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"` 1580 } 1581 1582 func (m *IPRouteAddDelReply) Reset() { *m = IPRouteAddDelReply{} } 1583 func (*IPRouteAddDelReply) GetMessageName() string { return "ip_route_add_del_reply" } 1584 func (*IPRouteAddDelReply) GetCrcString() string { return "1992deab" } 1585 func (*IPRouteAddDelReply) GetMessageType() api.MessageType { 1586 return api.ReplyMessage 1587 } 1588 1589 func (m *IPRouteAddDelReply) Size() (size int) { 1590 if m == nil { 1591 return 0 1592 } 1593 size += 4 // m.Retval 1594 size += 4 // m.StatsIndex 1595 return size 1596 } 1597 func (m *IPRouteAddDelReply) Marshal(b []byte) ([]byte, error) { 1598 if b == nil { 1599 b = make([]byte, m.Size()) 1600 } 1601 buf := codec.NewBuffer(b) 1602 buf.EncodeInt32(m.Retval) 1603 buf.EncodeUint32(m.StatsIndex) 1604 return buf.Bytes(), nil 1605 } 1606 func (m *IPRouteAddDelReply) Unmarshal(b []byte) error { 1607 buf := codec.NewBuffer(b) 1608 m.Retval = buf.DecodeInt32() 1609 m.StatsIndex = buf.DecodeUint32() 1610 return nil 1611 } 1612 1613 // IPRouteDetails defines message 'ip_route_details'. 1614 type IPRouteDetails struct { 1615 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"` 1616 } 1617 1618 func (m *IPRouteDetails) Reset() { *m = IPRouteDetails{} } 1619 func (*IPRouteDetails) GetMessageName() string { return "ip_route_details" } 1620 func (*IPRouteDetails) GetCrcString() string { return "d1ffaae1" } 1621 func (*IPRouteDetails) GetMessageType() api.MessageType { 1622 return api.ReplyMessage 1623 } 1624 1625 func (m *IPRouteDetails) Size() (size int) { 1626 if m == nil { 1627 return 0 1628 } 1629 size += 4 // m.Route.TableID 1630 size += 4 // m.Route.StatsIndex 1631 size += 1 // m.Route.Prefix.Address.Af 1632 size += 1 * 16 // m.Route.Prefix.Address.Un 1633 size += 1 // m.Route.Prefix.Len 1634 size += 1 // m.Route.NPaths 1635 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 1636 var s2 fib_types.FibPath 1637 _ = s2 1638 if j2 < len(m.Route.Paths) { 1639 s2 = m.Route.Paths[j2] 1640 } 1641 size += 4 // s2.SwIfIndex 1642 size += 4 // s2.TableID 1643 size += 4 // s2.RpfID 1644 size += 1 // s2.Weight 1645 size += 1 // s2.Preference 1646 size += 4 // s2.Type 1647 size += 4 // s2.Flags 1648 size += 4 // s2.Proto 1649 size += 1 * 16 // s2.Nh.Address 1650 size += 4 // s2.Nh.ViaLabel 1651 size += 4 // s2.Nh.ObjID 1652 size += 4 // s2.Nh.ClassifyTableIndex 1653 size += 1 // s2.NLabels 1654 for j3 := 0; j3 < 16; j3++ { 1655 size += 1 // s2.LabelStack[j3].IsUniform 1656 size += 4 // s2.LabelStack[j3].Label 1657 size += 1 // s2.LabelStack[j3].TTL 1658 size += 1 // s2.LabelStack[j3].Exp 1659 } 1660 } 1661 return size 1662 } 1663 func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) { 1664 if b == nil { 1665 b = make([]byte, m.Size()) 1666 } 1667 buf := codec.NewBuffer(b) 1668 buf.EncodeUint32(m.Route.TableID) 1669 buf.EncodeUint32(m.Route.StatsIndex) 1670 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 1671 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 1672 buf.EncodeUint8(m.Route.Prefix.Len) 1673 buf.EncodeUint8(uint8(len(m.Route.Paths))) 1674 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 1675 var v1 fib_types.FibPath // Paths 1676 if j1 < len(m.Route.Paths) { 1677 v1 = m.Route.Paths[j1] 1678 } 1679 buf.EncodeUint32(v1.SwIfIndex) 1680 buf.EncodeUint32(v1.TableID) 1681 buf.EncodeUint32(v1.RpfID) 1682 buf.EncodeUint8(v1.Weight) 1683 buf.EncodeUint8(v1.Preference) 1684 buf.EncodeUint32(uint32(v1.Type)) 1685 buf.EncodeUint32(uint32(v1.Flags)) 1686 buf.EncodeUint32(uint32(v1.Proto)) 1687 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 1688 buf.EncodeUint32(v1.Nh.ViaLabel) 1689 buf.EncodeUint32(v1.Nh.ObjID) 1690 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 1691 buf.EncodeUint8(v1.NLabels) 1692 for j2 := 0; j2 < 16; j2++ { 1693 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 1694 buf.EncodeUint32(v1.LabelStack[j2].Label) 1695 buf.EncodeUint8(v1.LabelStack[j2].TTL) 1696 buf.EncodeUint8(v1.LabelStack[j2].Exp) 1697 } 1698 } 1699 return buf.Bytes(), nil 1700 } 1701 func (m *IPRouteDetails) Unmarshal(b []byte) error { 1702 buf := codec.NewBuffer(b) 1703 m.Route.TableID = buf.DecodeUint32() 1704 m.Route.StatsIndex = buf.DecodeUint32() 1705 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1706 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1707 m.Route.Prefix.Len = buf.DecodeUint8() 1708 m.Route.NPaths = buf.DecodeUint8() 1709 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 1710 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 1711 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 1712 m.Route.Paths[j1].TableID = buf.DecodeUint32() 1713 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 1714 m.Route.Paths[j1].Weight = buf.DecodeUint8() 1715 m.Route.Paths[j1].Preference = buf.DecodeUint8() 1716 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 1717 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 1718 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 1719 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 1720 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 1721 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 1722 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 1723 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 1724 for j2 := 0; j2 < 16; j2++ { 1725 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 1726 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 1727 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 1728 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 1729 } 1730 } 1731 return nil 1732 } 1733 1734 // IPRouteDump defines message 'ip_route_dump'. 1735 type IPRouteDump struct { 1736 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 1737 } 1738 1739 func (m *IPRouteDump) Reset() { *m = IPRouteDump{} } 1740 func (*IPRouteDump) GetMessageName() string { return "ip_route_dump" } 1741 func (*IPRouteDump) GetCrcString() string { return "b9d2e09e" } 1742 func (*IPRouteDump) GetMessageType() api.MessageType { 1743 return api.RequestMessage 1744 } 1745 1746 func (m *IPRouteDump) Size() (size int) { 1747 if m == nil { 1748 return 0 1749 } 1750 size += 4 // m.Table.TableID 1751 size += 1 // m.Table.IsIP6 1752 size += 64 // m.Table.Name 1753 return size 1754 } 1755 func (m *IPRouteDump) Marshal(b []byte) ([]byte, error) { 1756 if b == nil { 1757 b = make([]byte, m.Size()) 1758 } 1759 buf := codec.NewBuffer(b) 1760 buf.EncodeUint32(m.Table.TableID) 1761 buf.EncodeBool(m.Table.IsIP6) 1762 buf.EncodeString(m.Table.Name, 64) 1763 return buf.Bytes(), nil 1764 } 1765 func (m *IPRouteDump) Unmarshal(b []byte) error { 1766 buf := codec.NewBuffer(b) 1767 m.Table.TableID = buf.DecodeUint32() 1768 m.Table.IsIP6 = buf.DecodeBool() 1769 m.Table.Name = buf.DecodeString(64) 1770 return nil 1771 } 1772 1773 // IPRouteLookup defines message 'ip_route_lookup'. 1774 type IPRouteLookup struct { 1775 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 1776 Exact uint8 `binapi:"u8,name=exact" json:"exact,omitempty"` 1777 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 1778 } 1779 1780 func (m *IPRouteLookup) Reset() { *m = IPRouteLookup{} } 1781 func (*IPRouteLookup) GetMessageName() string { return "ip_route_lookup" } 1782 func (*IPRouteLookup) GetCrcString() string { return "e2986185" } 1783 func (*IPRouteLookup) GetMessageType() api.MessageType { 1784 return api.RequestMessage 1785 } 1786 1787 func (m *IPRouteLookup) Size() (size int) { 1788 if m == nil { 1789 return 0 1790 } 1791 size += 4 // m.TableID 1792 size += 1 // m.Exact 1793 size += 1 // m.Prefix.Address.Af 1794 size += 1 * 16 // m.Prefix.Address.Un 1795 size += 1 // m.Prefix.Len 1796 return size 1797 } 1798 func (m *IPRouteLookup) Marshal(b []byte) ([]byte, error) { 1799 if b == nil { 1800 b = make([]byte, m.Size()) 1801 } 1802 buf := codec.NewBuffer(b) 1803 buf.EncodeUint32(m.TableID) 1804 buf.EncodeUint8(m.Exact) 1805 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 1806 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 1807 buf.EncodeUint8(m.Prefix.Len) 1808 return buf.Bytes(), nil 1809 } 1810 func (m *IPRouteLookup) Unmarshal(b []byte) error { 1811 buf := codec.NewBuffer(b) 1812 m.TableID = buf.DecodeUint32() 1813 m.Exact = buf.DecodeUint8() 1814 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1815 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1816 m.Prefix.Len = buf.DecodeUint8() 1817 return nil 1818 } 1819 1820 // IPRouteLookupReply defines message 'ip_route_lookup_reply'. 1821 type IPRouteLookupReply struct { 1822 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1823 Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"` 1824 } 1825 1826 func (m *IPRouteLookupReply) Reset() { *m = IPRouteLookupReply{} } 1827 func (*IPRouteLookupReply) GetMessageName() string { return "ip_route_lookup_reply" } 1828 func (*IPRouteLookupReply) GetCrcString() string { return "ae99de8e" } 1829 func (*IPRouteLookupReply) GetMessageType() api.MessageType { 1830 return api.ReplyMessage 1831 } 1832 1833 func (m *IPRouteLookupReply) Size() (size int) { 1834 if m == nil { 1835 return 0 1836 } 1837 size += 4 // m.Retval 1838 size += 4 // m.Route.TableID 1839 size += 4 // m.Route.StatsIndex 1840 size += 1 // m.Route.Prefix.Address.Af 1841 size += 1 * 16 // m.Route.Prefix.Address.Un 1842 size += 1 // m.Route.Prefix.Len 1843 size += 1 // m.Route.NPaths 1844 for j2 := 0; j2 < len(m.Route.Paths); j2++ { 1845 var s2 fib_types.FibPath 1846 _ = s2 1847 if j2 < len(m.Route.Paths) { 1848 s2 = m.Route.Paths[j2] 1849 } 1850 size += 4 // s2.SwIfIndex 1851 size += 4 // s2.TableID 1852 size += 4 // s2.RpfID 1853 size += 1 // s2.Weight 1854 size += 1 // s2.Preference 1855 size += 4 // s2.Type 1856 size += 4 // s2.Flags 1857 size += 4 // s2.Proto 1858 size += 1 * 16 // s2.Nh.Address 1859 size += 4 // s2.Nh.ViaLabel 1860 size += 4 // s2.Nh.ObjID 1861 size += 4 // s2.Nh.ClassifyTableIndex 1862 size += 1 // s2.NLabels 1863 for j3 := 0; j3 < 16; j3++ { 1864 size += 1 // s2.LabelStack[j3].IsUniform 1865 size += 4 // s2.LabelStack[j3].Label 1866 size += 1 // s2.LabelStack[j3].TTL 1867 size += 1 // s2.LabelStack[j3].Exp 1868 } 1869 } 1870 return size 1871 } 1872 func (m *IPRouteLookupReply) Marshal(b []byte) ([]byte, error) { 1873 if b == nil { 1874 b = make([]byte, m.Size()) 1875 } 1876 buf := codec.NewBuffer(b) 1877 buf.EncodeInt32(m.Retval) 1878 buf.EncodeUint32(m.Route.TableID) 1879 buf.EncodeUint32(m.Route.StatsIndex) 1880 buf.EncodeUint8(uint8(m.Route.Prefix.Address.Af)) 1881 buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16) 1882 buf.EncodeUint8(m.Route.Prefix.Len) 1883 buf.EncodeUint8(uint8(len(m.Route.Paths))) 1884 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 1885 var v1 fib_types.FibPath // Paths 1886 if j1 < len(m.Route.Paths) { 1887 v1 = m.Route.Paths[j1] 1888 } 1889 buf.EncodeUint32(v1.SwIfIndex) 1890 buf.EncodeUint32(v1.TableID) 1891 buf.EncodeUint32(v1.RpfID) 1892 buf.EncodeUint8(v1.Weight) 1893 buf.EncodeUint8(v1.Preference) 1894 buf.EncodeUint32(uint32(v1.Type)) 1895 buf.EncodeUint32(uint32(v1.Flags)) 1896 buf.EncodeUint32(uint32(v1.Proto)) 1897 buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) 1898 buf.EncodeUint32(v1.Nh.ViaLabel) 1899 buf.EncodeUint32(v1.Nh.ObjID) 1900 buf.EncodeUint32(v1.Nh.ClassifyTableIndex) 1901 buf.EncodeUint8(v1.NLabels) 1902 for j2 := 0; j2 < 16; j2++ { 1903 buf.EncodeUint8(v1.LabelStack[j2].IsUniform) 1904 buf.EncodeUint32(v1.LabelStack[j2].Label) 1905 buf.EncodeUint8(v1.LabelStack[j2].TTL) 1906 buf.EncodeUint8(v1.LabelStack[j2].Exp) 1907 } 1908 } 1909 return buf.Bytes(), nil 1910 } 1911 func (m *IPRouteLookupReply) Unmarshal(b []byte) error { 1912 buf := codec.NewBuffer(b) 1913 m.Retval = buf.DecodeInt32() 1914 m.Route.TableID = buf.DecodeUint32() 1915 m.Route.StatsIndex = buf.DecodeUint32() 1916 m.Route.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 1917 copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 1918 m.Route.Prefix.Len = buf.DecodeUint8() 1919 m.Route.NPaths = buf.DecodeUint8() 1920 m.Route.Paths = make([]fib_types.FibPath, m.Route.NPaths) 1921 for j1 := 0; j1 < len(m.Route.Paths); j1++ { 1922 m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32() 1923 m.Route.Paths[j1].TableID = buf.DecodeUint32() 1924 m.Route.Paths[j1].RpfID = buf.DecodeUint32() 1925 m.Route.Paths[j1].Weight = buf.DecodeUint8() 1926 m.Route.Paths[j1].Preference = buf.DecodeUint8() 1927 m.Route.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) 1928 m.Route.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) 1929 m.Route.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) 1930 copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) 1931 m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() 1932 m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32() 1933 m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() 1934 m.Route.Paths[j1].NLabels = buf.DecodeUint8() 1935 for j2 := 0; j2 < 16; j2++ { 1936 m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() 1937 m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() 1938 m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() 1939 m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() 1940 } 1941 } 1942 return nil 1943 } 1944 1945 // IPSourceAndPortRangeCheckAddDel defines message 'ip_source_and_port_range_check_add_del'. 1946 type IPSourceAndPortRangeCheckAddDel struct { 1947 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 1948 Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` 1949 NumberOfRanges uint8 `binapi:"u8,name=number_of_ranges" json:"number_of_ranges,omitempty"` 1950 LowPorts []uint16 `binapi:"u16[32],name=low_ports" json:"low_ports,omitempty"` 1951 HighPorts []uint16 `binapi:"u16[32],name=high_ports" json:"high_ports,omitempty"` 1952 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 1953 } 1954 1955 func (m *IPSourceAndPortRangeCheckAddDel) Reset() { *m = IPSourceAndPortRangeCheckAddDel{} } 1956 func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string { 1957 return "ip_source_and_port_range_check_add_del" 1958 } 1959 func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "8bfc76f2" } 1960 func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType { 1961 return api.RequestMessage 1962 } 1963 1964 func (m *IPSourceAndPortRangeCheckAddDel) Size() (size int) { 1965 if m == nil { 1966 return 0 1967 } 1968 size += 1 // m.IsAdd 1969 size += 1 // m.Prefix.Address.Af 1970 size += 1 * 16 // m.Prefix.Address.Un 1971 size += 1 // m.Prefix.Len 1972 size += 1 // m.NumberOfRanges 1973 size += 2 * 32 // m.LowPorts 1974 size += 2 * 32 // m.HighPorts 1975 size += 4 // m.VrfID 1976 return size 1977 } 1978 func (m *IPSourceAndPortRangeCheckAddDel) Marshal(b []byte) ([]byte, error) { 1979 if b == nil { 1980 b = make([]byte, m.Size()) 1981 } 1982 buf := codec.NewBuffer(b) 1983 buf.EncodeBool(m.IsAdd) 1984 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 1985 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 1986 buf.EncodeUint8(m.Prefix.Len) 1987 buf.EncodeUint8(m.NumberOfRanges) 1988 for i := 0; i < 32; i++ { 1989 var x uint16 1990 if i < len(m.LowPorts) { 1991 x = uint16(m.LowPorts[i]) 1992 } 1993 buf.EncodeUint16(x) 1994 } 1995 for i := 0; i < 32; i++ { 1996 var x uint16 1997 if i < len(m.HighPorts) { 1998 x = uint16(m.HighPorts[i]) 1999 } 2000 buf.EncodeUint16(x) 2001 } 2002 buf.EncodeUint32(m.VrfID) 2003 return buf.Bytes(), nil 2004 } 2005 func (m *IPSourceAndPortRangeCheckAddDel) Unmarshal(b []byte) error { 2006 buf := codec.NewBuffer(b) 2007 m.IsAdd = buf.DecodeBool() 2008 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2009 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 2010 m.Prefix.Len = buf.DecodeUint8() 2011 m.NumberOfRanges = buf.DecodeUint8() 2012 m.LowPorts = make([]uint16, 32) 2013 for i := 0; i < len(m.LowPorts); i++ { 2014 m.LowPorts[i] = buf.DecodeUint16() 2015 } 2016 m.HighPorts = make([]uint16, 32) 2017 for i := 0; i < len(m.HighPorts); i++ { 2018 m.HighPorts[i] = buf.DecodeUint16() 2019 } 2020 m.VrfID = buf.DecodeUint32() 2021 return nil 2022 } 2023 2024 // IPSourceAndPortRangeCheckAddDelReply defines message 'ip_source_and_port_range_check_add_del_reply'. 2025 type IPSourceAndPortRangeCheckAddDelReply struct { 2026 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2027 } 2028 2029 func (m *IPSourceAndPortRangeCheckAddDelReply) Reset() { *m = IPSourceAndPortRangeCheckAddDelReply{} } 2030 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string { 2031 return "ip_source_and_port_range_check_add_del_reply" 2032 } 2033 func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { return "e8d4e804" } 2034 func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType { 2035 return api.ReplyMessage 2036 } 2037 2038 func (m *IPSourceAndPortRangeCheckAddDelReply) Size() (size int) { 2039 if m == nil { 2040 return 0 2041 } 2042 size += 4 // m.Retval 2043 return size 2044 } 2045 func (m *IPSourceAndPortRangeCheckAddDelReply) Marshal(b []byte) ([]byte, error) { 2046 if b == nil { 2047 b = make([]byte, m.Size()) 2048 } 2049 buf := codec.NewBuffer(b) 2050 buf.EncodeInt32(m.Retval) 2051 return buf.Bytes(), nil 2052 } 2053 func (m *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(b []byte) error { 2054 buf := codec.NewBuffer(b) 2055 m.Retval = buf.DecodeInt32() 2056 return nil 2057 } 2058 2059 // IPSourceAndPortRangeCheckInterfaceAddDel defines message 'ip_source_and_port_range_check_interface_add_del'. 2060 type IPSourceAndPortRangeCheckInterfaceAddDel struct { 2061 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 2062 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2063 TCPInVrfID uint32 `binapi:"u32,name=tcp_in_vrf_id" json:"tcp_in_vrf_id,omitempty"` 2064 TCPOutVrfID uint32 `binapi:"u32,name=tcp_out_vrf_id" json:"tcp_out_vrf_id,omitempty"` 2065 UDPInVrfID uint32 `binapi:"u32,name=udp_in_vrf_id" json:"udp_in_vrf_id,omitempty"` 2066 UDPOutVrfID uint32 `binapi:"u32,name=udp_out_vrf_id" json:"udp_out_vrf_id,omitempty"` 2067 } 2068 2069 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Reset() { 2070 *m = IPSourceAndPortRangeCheckInterfaceAddDel{} 2071 } 2072 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string { 2073 return "ip_source_and_port_range_check_interface_add_del" 2074 } 2075 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { return "e1ba8987" } 2076 func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType { 2077 return api.RequestMessage 2078 } 2079 2080 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() (size int) { 2081 if m == nil { 2082 return 0 2083 } 2084 size += 1 // m.IsAdd 2085 size += 4 // m.SwIfIndex 2086 size += 4 // m.TCPInVrfID 2087 size += 4 // m.TCPOutVrfID 2088 size += 4 // m.UDPInVrfID 2089 size += 4 // m.UDPOutVrfID 2090 return size 2091 } 2092 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Marshal(b []byte) ([]byte, error) { 2093 if b == nil { 2094 b = make([]byte, m.Size()) 2095 } 2096 buf := codec.NewBuffer(b) 2097 buf.EncodeBool(m.IsAdd) 2098 buf.EncodeUint32(uint32(m.SwIfIndex)) 2099 buf.EncodeUint32(m.TCPInVrfID) 2100 buf.EncodeUint32(m.TCPOutVrfID) 2101 buf.EncodeUint32(m.UDPInVrfID) 2102 buf.EncodeUint32(m.UDPOutVrfID) 2103 return buf.Bytes(), nil 2104 } 2105 func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Unmarshal(b []byte) error { 2106 buf := codec.NewBuffer(b) 2107 m.IsAdd = buf.DecodeBool() 2108 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2109 m.TCPInVrfID = buf.DecodeUint32() 2110 m.TCPOutVrfID = buf.DecodeUint32() 2111 m.UDPInVrfID = buf.DecodeUint32() 2112 m.UDPOutVrfID = buf.DecodeUint32() 2113 return nil 2114 } 2115 2116 // IPSourceAndPortRangeCheckInterfaceAddDelReply defines message 'ip_source_and_port_range_check_interface_add_del_reply'. 2117 type IPSourceAndPortRangeCheckInterfaceAddDelReply struct { 2118 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2119 } 2120 2121 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Reset() { 2122 *m = IPSourceAndPortRangeCheckInterfaceAddDelReply{} 2123 } 2124 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string { 2125 return "ip_source_and_port_range_check_interface_add_del_reply" 2126 } 2127 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" } 2128 func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType { 2129 return api.ReplyMessage 2130 } 2131 2132 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Size() (size int) { 2133 if m == nil { 2134 return 0 2135 } 2136 size += 4 // m.Retval 2137 return size 2138 } 2139 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Marshal(b []byte) ([]byte, error) { 2140 if b == nil { 2141 b = make([]byte, m.Size()) 2142 } 2143 buf := codec.NewBuffer(b) 2144 buf.EncodeInt32(m.Retval) 2145 return buf.Bytes(), nil 2146 } 2147 func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(b []byte) error { 2148 buf := codec.NewBuffer(b) 2149 m.Retval = buf.DecodeInt32() 2150 return nil 2151 } 2152 2153 // IPTableAddDel defines message 'ip_table_add_del'. 2154 type IPTableAddDel struct { 2155 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` 2156 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 2157 } 2158 2159 func (m *IPTableAddDel) Reset() { *m = IPTableAddDel{} } 2160 func (*IPTableAddDel) GetMessageName() string { return "ip_table_add_del" } 2161 func (*IPTableAddDel) GetCrcString() string { return "0ffdaec0" } 2162 func (*IPTableAddDel) GetMessageType() api.MessageType { 2163 return api.RequestMessage 2164 } 2165 2166 func (m *IPTableAddDel) Size() (size int) { 2167 if m == nil { 2168 return 0 2169 } 2170 size += 1 // m.IsAdd 2171 size += 4 // m.Table.TableID 2172 size += 1 // m.Table.IsIP6 2173 size += 64 // m.Table.Name 2174 return size 2175 } 2176 func (m *IPTableAddDel) Marshal(b []byte) ([]byte, error) { 2177 if b == nil { 2178 b = make([]byte, m.Size()) 2179 } 2180 buf := codec.NewBuffer(b) 2181 buf.EncodeBool(m.IsAdd) 2182 buf.EncodeUint32(m.Table.TableID) 2183 buf.EncodeBool(m.Table.IsIP6) 2184 buf.EncodeString(m.Table.Name, 64) 2185 return buf.Bytes(), nil 2186 } 2187 func (m *IPTableAddDel) Unmarshal(b []byte) error { 2188 buf := codec.NewBuffer(b) 2189 m.IsAdd = buf.DecodeBool() 2190 m.Table.TableID = buf.DecodeUint32() 2191 m.Table.IsIP6 = buf.DecodeBool() 2192 m.Table.Name = buf.DecodeString(64) 2193 return nil 2194 } 2195 2196 // IPTableAddDelReply defines message 'ip_table_add_del_reply'. 2197 type IPTableAddDelReply struct { 2198 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2199 } 2200 2201 func (m *IPTableAddDelReply) Reset() { *m = IPTableAddDelReply{} } 2202 func (*IPTableAddDelReply) GetMessageName() string { return "ip_table_add_del_reply" } 2203 func (*IPTableAddDelReply) GetCrcString() string { return "e8d4e804" } 2204 func (*IPTableAddDelReply) GetMessageType() api.MessageType { 2205 return api.ReplyMessage 2206 } 2207 2208 func (m *IPTableAddDelReply) Size() (size int) { 2209 if m == nil { 2210 return 0 2211 } 2212 size += 4 // m.Retval 2213 return size 2214 } 2215 func (m *IPTableAddDelReply) Marshal(b []byte) ([]byte, error) { 2216 if b == nil { 2217 b = make([]byte, m.Size()) 2218 } 2219 buf := codec.NewBuffer(b) 2220 buf.EncodeInt32(m.Retval) 2221 return buf.Bytes(), nil 2222 } 2223 func (m *IPTableAddDelReply) Unmarshal(b []byte) error { 2224 buf := codec.NewBuffer(b) 2225 m.Retval = buf.DecodeInt32() 2226 return nil 2227 } 2228 2229 // IPTableDetails defines message 'ip_table_details'. 2230 type IPTableDetails struct { 2231 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 2232 } 2233 2234 func (m *IPTableDetails) Reset() { *m = IPTableDetails{} } 2235 func (*IPTableDetails) GetMessageName() string { return "ip_table_details" } 2236 func (*IPTableDetails) GetCrcString() string { return "c79fca0f" } 2237 func (*IPTableDetails) GetMessageType() api.MessageType { 2238 return api.ReplyMessage 2239 } 2240 2241 func (m *IPTableDetails) Size() (size int) { 2242 if m == nil { 2243 return 0 2244 } 2245 size += 4 // m.Table.TableID 2246 size += 1 // m.Table.IsIP6 2247 size += 64 // m.Table.Name 2248 return size 2249 } 2250 func (m *IPTableDetails) Marshal(b []byte) ([]byte, error) { 2251 if b == nil { 2252 b = make([]byte, m.Size()) 2253 } 2254 buf := codec.NewBuffer(b) 2255 buf.EncodeUint32(m.Table.TableID) 2256 buf.EncodeBool(m.Table.IsIP6) 2257 buf.EncodeString(m.Table.Name, 64) 2258 return buf.Bytes(), nil 2259 } 2260 func (m *IPTableDetails) Unmarshal(b []byte) error { 2261 buf := codec.NewBuffer(b) 2262 m.Table.TableID = buf.DecodeUint32() 2263 m.Table.IsIP6 = buf.DecodeBool() 2264 m.Table.Name = buf.DecodeString(64) 2265 return nil 2266 } 2267 2268 // IPTableDump defines message 'ip_table_dump'. 2269 type IPTableDump struct{} 2270 2271 func (m *IPTableDump) Reset() { *m = IPTableDump{} } 2272 func (*IPTableDump) GetMessageName() string { return "ip_table_dump" } 2273 func (*IPTableDump) GetCrcString() string { return "51077d14" } 2274 func (*IPTableDump) GetMessageType() api.MessageType { 2275 return api.RequestMessage 2276 } 2277 2278 func (m *IPTableDump) Size() (size int) { 2279 if m == nil { 2280 return 0 2281 } 2282 return size 2283 } 2284 func (m *IPTableDump) Marshal(b []byte) ([]byte, error) { 2285 if b == nil { 2286 b = make([]byte, m.Size()) 2287 } 2288 buf := codec.NewBuffer(b) 2289 return buf.Bytes(), nil 2290 } 2291 func (m *IPTableDump) Unmarshal(b []byte) error { 2292 return nil 2293 } 2294 2295 // IPTableFlush defines message 'ip_table_flush'. 2296 type IPTableFlush struct { 2297 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 2298 } 2299 2300 func (m *IPTableFlush) Reset() { *m = IPTableFlush{} } 2301 func (*IPTableFlush) GetMessageName() string { return "ip_table_flush" } 2302 func (*IPTableFlush) GetCrcString() string { return "b9d2e09e" } 2303 func (*IPTableFlush) GetMessageType() api.MessageType { 2304 return api.RequestMessage 2305 } 2306 2307 func (m *IPTableFlush) Size() (size int) { 2308 if m == nil { 2309 return 0 2310 } 2311 size += 4 // m.Table.TableID 2312 size += 1 // m.Table.IsIP6 2313 size += 64 // m.Table.Name 2314 return size 2315 } 2316 func (m *IPTableFlush) Marshal(b []byte) ([]byte, error) { 2317 if b == nil { 2318 b = make([]byte, m.Size()) 2319 } 2320 buf := codec.NewBuffer(b) 2321 buf.EncodeUint32(m.Table.TableID) 2322 buf.EncodeBool(m.Table.IsIP6) 2323 buf.EncodeString(m.Table.Name, 64) 2324 return buf.Bytes(), nil 2325 } 2326 func (m *IPTableFlush) Unmarshal(b []byte) error { 2327 buf := codec.NewBuffer(b) 2328 m.Table.TableID = buf.DecodeUint32() 2329 m.Table.IsIP6 = buf.DecodeBool() 2330 m.Table.Name = buf.DecodeString(64) 2331 return nil 2332 } 2333 2334 // IPTableFlushReply defines message 'ip_table_flush_reply'. 2335 type IPTableFlushReply struct { 2336 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2337 } 2338 2339 func (m *IPTableFlushReply) Reset() { *m = IPTableFlushReply{} } 2340 func (*IPTableFlushReply) GetMessageName() string { return "ip_table_flush_reply" } 2341 func (*IPTableFlushReply) GetCrcString() string { return "e8d4e804" } 2342 func (*IPTableFlushReply) GetMessageType() api.MessageType { 2343 return api.ReplyMessage 2344 } 2345 2346 func (m *IPTableFlushReply) Size() (size int) { 2347 if m == nil { 2348 return 0 2349 } 2350 size += 4 // m.Retval 2351 return size 2352 } 2353 func (m *IPTableFlushReply) Marshal(b []byte) ([]byte, error) { 2354 if b == nil { 2355 b = make([]byte, m.Size()) 2356 } 2357 buf := codec.NewBuffer(b) 2358 buf.EncodeInt32(m.Retval) 2359 return buf.Bytes(), nil 2360 } 2361 func (m *IPTableFlushReply) Unmarshal(b []byte) error { 2362 buf := codec.NewBuffer(b) 2363 m.Retval = buf.DecodeInt32() 2364 return nil 2365 } 2366 2367 // IPTableReplaceBegin defines message 'ip_table_replace_begin'. 2368 type IPTableReplaceBegin struct { 2369 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 2370 } 2371 2372 func (m *IPTableReplaceBegin) Reset() { *m = IPTableReplaceBegin{} } 2373 func (*IPTableReplaceBegin) GetMessageName() string { return "ip_table_replace_begin" } 2374 func (*IPTableReplaceBegin) GetCrcString() string { return "b9d2e09e" } 2375 func (*IPTableReplaceBegin) GetMessageType() api.MessageType { 2376 return api.RequestMessage 2377 } 2378 2379 func (m *IPTableReplaceBegin) Size() (size int) { 2380 if m == nil { 2381 return 0 2382 } 2383 size += 4 // m.Table.TableID 2384 size += 1 // m.Table.IsIP6 2385 size += 64 // m.Table.Name 2386 return size 2387 } 2388 func (m *IPTableReplaceBegin) Marshal(b []byte) ([]byte, error) { 2389 if b == nil { 2390 b = make([]byte, m.Size()) 2391 } 2392 buf := codec.NewBuffer(b) 2393 buf.EncodeUint32(m.Table.TableID) 2394 buf.EncodeBool(m.Table.IsIP6) 2395 buf.EncodeString(m.Table.Name, 64) 2396 return buf.Bytes(), nil 2397 } 2398 func (m *IPTableReplaceBegin) Unmarshal(b []byte) error { 2399 buf := codec.NewBuffer(b) 2400 m.Table.TableID = buf.DecodeUint32() 2401 m.Table.IsIP6 = buf.DecodeBool() 2402 m.Table.Name = buf.DecodeString(64) 2403 return nil 2404 } 2405 2406 // IPTableReplaceBeginReply defines message 'ip_table_replace_begin_reply'. 2407 type IPTableReplaceBeginReply struct { 2408 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2409 } 2410 2411 func (m *IPTableReplaceBeginReply) Reset() { *m = IPTableReplaceBeginReply{} } 2412 func (*IPTableReplaceBeginReply) GetMessageName() string { return "ip_table_replace_begin_reply" } 2413 func (*IPTableReplaceBeginReply) GetCrcString() string { return "e8d4e804" } 2414 func (*IPTableReplaceBeginReply) GetMessageType() api.MessageType { 2415 return api.ReplyMessage 2416 } 2417 2418 func (m *IPTableReplaceBeginReply) Size() (size int) { 2419 if m == nil { 2420 return 0 2421 } 2422 size += 4 // m.Retval 2423 return size 2424 } 2425 func (m *IPTableReplaceBeginReply) Marshal(b []byte) ([]byte, error) { 2426 if b == nil { 2427 b = make([]byte, m.Size()) 2428 } 2429 buf := codec.NewBuffer(b) 2430 buf.EncodeInt32(m.Retval) 2431 return buf.Bytes(), nil 2432 } 2433 func (m *IPTableReplaceBeginReply) Unmarshal(b []byte) error { 2434 buf := codec.NewBuffer(b) 2435 m.Retval = buf.DecodeInt32() 2436 return nil 2437 } 2438 2439 // IPTableReplaceEnd defines message 'ip_table_replace_end'. 2440 type IPTableReplaceEnd struct { 2441 Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` 2442 } 2443 2444 func (m *IPTableReplaceEnd) Reset() { *m = IPTableReplaceEnd{} } 2445 func (*IPTableReplaceEnd) GetMessageName() string { return "ip_table_replace_end" } 2446 func (*IPTableReplaceEnd) GetCrcString() string { return "b9d2e09e" } 2447 func (*IPTableReplaceEnd) GetMessageType() api.MessageType { 2448 return api.RequestMessage 2449 } 2450 2451 func (m *IPTableReplaceEnd) Size() (size int) { 2452 if m == nil { 2453 return 0 2454 } 2455 size += 4 // m.Table.TableID 2456 size += 1 // m.Table.IsIP6 2457 size += 64 // m.Table.Name 2458 return size 2459 } 2460 func (m *IPTableReplaceEnd) Marshal(b []byte) ([]byte, error) { 2461 if b == nil { 2462 b = make([]byte, m.Size()) 2463 } 2464 buf := codec.NewBuffer(b) 2465 buf.EncodeUint32(m.Table.TableID) 2466 buf.EncodeBool(m.Table.IsIP6) 2467 buf.EncodeString(m.Table.Name, 64) 2468 return buf.Bytes(), nil 2469 } 2470 func (m *IPTableReplaceEnd) Unmarshal(b []byte) error { 2471 buf := codec.NewBuffer(b) 2472 m.Table.TableID = buf.DecodeUint32() 2473 m.Table.IsIP6 = buf.DecodeBool() 2474 m.Table.Name = buf.DecodeString(64) 2475 return nil 2476 } 2477 2478 // IPTableReplaceEndReply defines message 'ip_table_replace_end_reply'. 2479 type IPTableReplaceEndReply struct { 2480 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2481 } 2482 2483 func (m *IPTableReplaceEndReply) Reset() { *m = IPTableReplaceEndReply{} } 2484 func (*IPTableReplaceEndReply) GetMessageName() string { return "ip_table_replace_end_reply" } 2485 func (*IPTableReplaceEndReply) GetCrcString() string { return "e8d4e804" } 2486 func (*IPTableReplaceEndReply) GetMessageType() api.MessageType { 2487 return api.ReplyMessage 2488 } 2489 2490 func (m *IPTableReplaceEndReply) Size() (size int) { 2491 if m == nil { 2492 return 0 2493 } 2494 size += 4 // m.Retval 2495 return size 2496 } 2497 func (m *IPTableReplaceEndReply) Marshal(b []byte) ([]byte, error) { 2498 if b == nil { 2499 b = make([]byte, m.Size()) 2500 } 2501 buf := codec.NewBuffer(b) 2502 buf.EncodeInt32(m.Retval) 2503 return buf.Bytes(), nil 2504 } 2505 func (m *IPTableReplaceEndReply) Unmarshal(b []byte) error { 2506 buf := codec.NewBuffer(b) 2507 m.Retval = buf.DecodeInt32() 2508 return nil 2509 } 2510 2511 // IPUnnumberedDetails defines message 'ip_unnumbered_details'. 2512 type IPUnnumberedDetails struct { 2513 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2514 IPSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip_sw_if_index" json:"ip_sw_if_index,omitempty"` 2515 } 2516 2517 func (m *IPUnnumberedDetails) Reset() { *m = IPUnnumberedDetails{} } 2518 func (*IPUnnumberedDetails) GetMessageName() string { return "ip_unnumbered_details" } 2519 func (*IPUnnumberedDetails) GetCrcString() string { return "aa12a483" } 2520 func (*IPUnnumberedDetails) GetMessageType() api.MessageType { 2521 return api.ReplyMessage 2522 } 2523 2524 func (m *IPUnnumberedDetails) Size() (size int) { 2525 if m == nil { 2526 return 0 2527 } 2528 size += 4 // m.SwIfIndex 2529 size += 4 // m.IPSwIfIndex 2530 return size 2531 } 2532 func (m *IPUnnumberedDetails) Marshal(b []byte) ([]byte, error) { 2533 if b == nil { 2534 b = make([]byte, m.Size()) 2535 } 2536 buf := codec.NewBuffer(b) 2537 buf.EncodeUint32(uint32(m.SwIfIndex)) 2538 buf.EncodeUint32(uint32(m.IPSwIfIndex)) 2539 return buf.Bytes(), nil 2540 } 2541 func (m *IPUnnumberedDetails) Unmarshal(b []byte) error { 2542 buf := codec.NewBuffer(b) 2543 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2544 m.IPSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2545 return nil 2546 } 2547 2548 // IPUnnumberedDump defines message 'ip_unnumbered_dump'. 2549 type IPUnnumberedDump struct { 2550 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` 2551 } 2552 2553 func (m *IPUnnumberedDump) Reset() { *m = IPUnnumberedDump{} } 2554 func (*IPUnnumberedDump) GetMessageName() string { return "ip_unnumbered_dump" } 2555 func (*IPUnnumberedDump) GetCrcString() string { return "f9e6675e" } 2556 func (*IPUnnumberedDump) GetMessageType() api.MessageType { 2557 return api.RequestMessage 2558 } 2559 2560 func (m *IPUnnumberedDump) Size() (size int) { 2561 if m == nil { 2562 return 0 2563 } 2564 size += 4 // m.SwIfIndex 2565 return size 2566 } 2567 func (m *IPUnnumberedDump) Marshal(b []byte) ([]byte, error) { 2568 if b == nil { 2569 b = make([]byte, m.Size()) 2570 } 2571 buf := codec.NewBuffer(b) 2572 buf.EncodeUint32(uint32(m.SwIfIndex)) 2573 return buf.Bytes(), nil 2574 } 2575 func (m *IPUnnumberedDump) Unmarshal(b []byte) error { 2576 buf := codec.NewBuffer(b) 2577 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2578 return nil 2579 } 2580 2581 // MfibSignalDetails defines message 'mfib_signal_details'. 2582 type MfibSignalDetails struct { 2583 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2584 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` 2585 Prefix ip_types.Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"` 2586 IPPacketLen uint16 `binapi:"u16,name=ip_packet_len" json:"ip_packet_len,omitempty"` 2587 IPPacketData []byte `binapi:"u8[256],name=ip_packet_data" json:"ip_packet_data,omitempty"` 2588 } 2589 2590 func (m *MfibSignalDetails) Reset() { *m = MfibSignalDetails{} } 2591 func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" } 2592 func (*MfibSignalDetails) GetCrcString() string { return "64398a9a" } 2593 func (*MfibSignalDetails) GetMessageType() api.MessageType { 2594 return api.ReplyMessage 2595 } 2596 2597 func (m *MfibSignalDetails) Size() (size int) { 2598 if m == nil { 2599 return 0 2600 } 2601 size += 4 // m.SwIfIndex 2602 size += 4 // m.TableID 2603 size += 1 // m.Prefix.Af 2604 size += 2 // m.Prefix.GrpAddressLength 2605 size += 1 * 16 // m.Prefix.GrpAddress 2606 size += 1 * 16 // m.Prefix.SrcAddress 2607 size += 2 // m.IPPacketLen 2608 size += 1 * 256 // m.IPPacketData 2609 return size 2610 } 2611 func (m *MfibSignalDetails) Marshal(b []byte) ([]byte, error) { 2612 if b == nil { 2613 b = make([]byte, m.Size()) 2614 } 2615 buf := codec.NewBuffer(b) 2616 buf.EncodeUint32(uint32(m.SwIfIndex)) 2617 buf.EncodeUint32(m.TableID) 2618 buf.EncodeUint8(uint8(m.Prefix.Af)) 2619 buf.EncodeUint16(m.Prefix.GrpAddressLength) 2620 buf.EncodeBytes(m.Prefix.GrpAddress.XXX_UnionData[:], 16) 2621 buf.EncodeBytes(m.Prefix.SrcAddress.XXX_UnionData[:], 16) 2622 buf.EncodeUint16(m.IPPacketLen) 2623 buf.EncodeBytes(m.IPPacketData, 256) 2624 return buf.Bytes(), nil 2625 } 2626 func (m *MfibSignalDetails) Unmarshal(b []byte) error { 2627 buf := codec.NewBuffer(b) 2628 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2629 m.TableID = buf.DecodeUint32() 2630 m.Prefix.Af = ip_types.AddressFamily(buf.DecodeUint8()) 2631 m.Prefix.GrpAddressLength = buf.DecodeUint16() 2632 copy(m.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 2633 copy(m.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16)) 2634 m.IPPacketLen = buf.DecodeUint16() 2635 m.IPPacketData = make([]byte, 256) 2636 copy(m.IPPacketData, buf.DecodeBytes(len(m.IPPacketData))) 2637 return nil 2638 } 2639 2640 // MfibSignalDump defines message 'mfib_signal_dump'. 2641 type MfibSignalDump struct{} 2642 2643 func (m *MfibSignalDump) Reset() { *m = MfibSignalDump{} } 2644 func (*MfibSignalDump) GetMessageName() string { return "mfib_signal_dump" } 2645 func (*MfibSignalDump) GetCrcString() string { return "51077d14" } 2646 func (*MfibSignalDump) GetMessageType() api.MessageType { 2647 return api.RequestMessage 2648 } 2649 2650 func (m *MfibSignalDump) Size() (size int) { 2651 if m == nil { 2652 return 0 2653 } 2654 return size 2655 } 2656 func (m *MfibSignalDump) Marshal(b []byte) ([]byte, error) { 2657 if b == nil { 2658 b = make([]byte, m.Size()) 2659 } 2660 buf := codec.NewBuffer(b) 2661 return buf.Bytes(), nil 2662 } 2663 func (m *MfibSignalDump) Unmarshal(b []byte) error { 2664 return nil 2665 } 2666 2667 // SetIPFlowHash defines message 'set_ip_flow_hash'. 2668 type SetIPFlowHash struct { 2669 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 2670 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 2671 Src bool `binapi:"bool,name=src" json:"src,omitempty"` 2672 Dst bool `binapi:"bool,name=dst" json:"dst,omitempty"` 2673 Sport bool `binapi:"bool,name=sport" json:"sport,omitempty"` 2674 Dport bool `binapi:"bool,name=dport" json:"dport,omitempty"` 2675 Proto bool `binapi:"bool,name=proto" json:"proto,omitempty"` 2676 Reverse bool `binapi:"bool,name=reverse" json:"reverse,omitempty"` 2677 Symmetric bool `binapi:"bool,name=symmetric" json:"symmetric,omitempty"` 2678 } 2679 2680 func (m *SetIPFlowHash) Reset() { *m = SetIPFlowHash{} } 2681 func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" } 2682 func (*SetIPFlowHash) GetCrcString() string { return "084ee09e" } 2683 func (*SetIPFlowHash) GetMessageType() api.MessageType { 2684 return api.RequestMessage 2685 } 2686 2687 func (m *SetIPFlowHash) Size() (size int) { 2688 if m == nil { 2689 return 0 2690 } 2691 size += 4 // m.VrfID 2692 size += 1 // m.IsIPv6 2693 size += 1 // m.Src 2694 size += 1 // m.Dst 2695 size += 1 // m.Sport 2696 size += 1 // m.Dport 2697 size += 1 // m.Proto 2698 size += 1 // m.Reverse 2699 size += 1 // m.Symmetric 2700 return size 2701 } 2702 func (m *SetIPFlowHash) Marshal(b []byte) ([]byte, error) { 2703 if b == nil { 2704 b = make([]byte, m.Size()) 2705 } 2706 buf := codec.NewBuffer(b) 2707 buf.EncodeUint32(m.VrfID) 2708 buf.EncodeBool(m.IsIPv6) 2709 buf.EncodeBool(m.Src) 2710 buf.EncodeBool(m.Dst) 2711 buf.EncodeBool(m.Sport) 2712 buf.EncodeBool(m.Dport) 2713 buf.EncodeBool(m.Proto) 2714 buf.EncodeBool(m.Reverse) 2715 buf.EncodeBool(m.Symmetric) 2716 return buf.Bytes(), nil 2717 } 2718 func (m *SetIPFlowHash) Unmarshal(b []byte) error { 2719 buf := codec.NewBuffer(b) 2720 m.VrfID = buf.DecodeUint32() 2721 m.IsIPv6 = buf.DecodeBool() 2722 m.Src = buf.DecodeBool() 2723 m.Dst = buf.DecodeBool() 2724 m.Sport = buf.DecodeBool() 2725 m.Dport = buf.DecodeBool() 2726 m.Proto = buf.DecodeBool() 2727 m.Reverse = buf.DecodeBool() 2728 m.Symmetric = buf.DecodeBool() 2729 return nil 2730 } 2731 2732 // SetIPFlowHashReply defines message 'set_ip_flow_hash_reply'. 2733 type SetIPFlowHashReply struct { 2734 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2735 } 2736 2737 func (m *SetIPFlowHashReply) Reset() { *m = SetIPFlowHashReply{} } 2738 func (*SetIPFlowHashReply) GetMessageName() string { return "set_ip_flow_hash_reply" } 2739 func (*SetIPFlowHashReply) GetCrcString() string { return "e8d4e804" } 2740 func (*SetIPFlowHashReply) GetMessageType() api.MessageType { 2741 return api.ReplyMessage 2742 } 2743 2744 func (m *SetIPFlowHashReply) Size() (size int) { 2745 if m == nil { 2746 return 0 2747 } 2748 size += 4 // m.Retval 2749 return size 2750 } 2751 func (m *SetIPFlowHashReply) Marshal(b []byte) ([]byte, error) { 2752 if b == nil { 2753 b = make([]byte, m.Size()) 2754 } 2755 buf := codec.NewBuffer(b) 2756 buf.EncodeInt32(m.Retval) 2757 return buf.Bytes(), nil 2758 } 2759 func (m *SetIPFlowHashReply) Unmarshal(b []byte) error { 2760 buf := codec.NewBuffer(b) 2761 m.Retval = buf.DecodeInt32() 2762 return nil 2763 } 2764 2765 // SwInterfaceIP6EnableDisable defines message 'sw_interface_ip6_enable_disable'. 2766 type SwInterfaceIP6EnableDisable struct { 2767 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2768 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 2769 } 2770 2771 func (m *SwInterfaceIP6EnableDisable) Reset() { *m = SwInterfaceIP6EnableDisable{} } 2772 func (*SwInterfaceIP6EnableDisable) GetMessageName() string { return "sw_interface_ip6_enable_disable" } 2773 func (*SwInterfaceIP6EnableDisable) GetCrcString() string { return "ae6cfcfb" } 2774 func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType { 2775 return api.RequestMessage 2776 } 2777 2778 func (m *SwInterfaceIP6EnableDisable) Size() (size int) { 2779 if m == nil { 2780 return 0 2781 } 2782 size += 4 // m.SwIfIndex 2783 size += 1 // m.Enable 2784 return size 2785 } 2786 func (m *SwInterfaceIP6EnableDisable) Marshal(b []byte) ([]byte, error) { 2787 if b == nil { 2788 b = make([]byte, m.Size()) 2789 } 2790 buf := codec.NewBuffer(b) 2791 buf.EncodeUint32(uint32(m.SwIfIndex)) 2792 buf.EncodeBool(m.Enable) 2793 return buf.Bytes(), nil 2794 } 2795 func (m *SwInterfaceIP6EnableDisable) Unmarshal(b []byte) error { 2796 buf := codec.NewBuffer(b) 2797 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2798 m.Enable = buf.DecodeBool() 2799 return nil 2800 } 2801 2802 // SwInterfaceIP6EnableDisableReply defines message 'sw_interface_ip6_enable_disable_reply'. 2803 type SwInterfaceIP6EnableDisableReply struct { 2804 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2805 } 2806 2807 func (m *SwInterfaceIP6EnableDisableReply) Reset() { *m = SwInterfaceIP6EnableDisableReply{} } 2808 func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string { 2809 return "sw_interface_ip6_enable_disable_reply" 2810 } 2811 func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" } 2812 func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType { 2813 return api.ReplyMessage 2814 } 2815 2816 func (m *SwInterfaceIP6EnableDisableReply) Size() (size int) { 2817 if m == nil { 2818 return 0 2819 } 2820 size += 4 // m.Retval 2821 return size 2822 } 2823 func (m *SwInterfaceIP6EnableDisableReply) Marshal(b []byte) ([]byte, error) { 2824 if b == nil { 2825 b = make([]byte, m.Size()) 2826 } 2827 buf := codec.NewBuffer(b) 2828 buf.EncodeInt32(m.Retval) 2829 return buf.Bytes(), nil 2830 } 2831 func (m *SwInterfaceIP6EnableDisableReply) Unmarshal(b []byte) error { 2832 buf := codec.NewBuffer(b) 2833 m.Retval = buf.DecodeInt32() 2834 return nil 2835 } 2836 2837 // SwInterfaceIP6SetLinkLocalAddress defines message 'sw_interface_ip6_set_link_local_address'. 2838 type SwInterfaceIP6SetLinkLocalAddress struct { 2839 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2840 IP ip_types.IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"` 2841 } 2842 2843 func (m *SwInterfaceIP6SetLinkLocalAddress) Reset() { *m = SwInterfaceIP6SetLinkLocalAddress{} } 2844 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string { 2845 return "sw_interface_ip6_set_link_local_address" 2846 } 2847 func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "2931d9fa" } 2848 func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType { 2849 return api.RequestMessage 2850 } 2851 2852 func (m *SwInterfaceIP6SetLinkLocalAddress) Size() (size int) { 2853 if m == nil { 2854 return 0 2855 } 2856 size += 4 // m.SwIfIndex 2857 size += 1 * 16 // m.IP 2858 return size 2859 } 2860 func (m *SwInterfaceIP6SetLinkLocalAddress) Marshal(b []byte) ([]byte, error) { 2861 if b == nil { 2862 b = make([]byte, m.Size()) 2863 } 2864 buf := codec.NewBuffer(b) 2865 buf.EncodeUint32(uint32(m.SwIfIndex)) 2866 buf.EncodeBytes(m.IP[:], 16) 2867 return buf.Bytes(), nil 2868 } 2869 func (m *SwInterfaceIP6SetLinkLocalAddress) Unmarshal(b []byte) error { 2870 buf := codec.NewBuffer(b) 2871 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2872 copy(m.IP[:], buf.DecodeBytes(16)) 2873 return nil 2874 } 2875 2876 // SwInterfaceIP6SetLinkLocalAddressReply defines message 'sw_interface_ip6_set_link_local_address_reply'. 2877 type SwInterfaceIP6SetLinkLocalAddressReply struct { 2878 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2879 } 2880 2881 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Reset() { 2882 *m = SwInterfaceIP6SetLinkLocalAddressReply{} 2883 } 2884 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string { 2885 return "sw_interface_ip6_set_link_local_address_reply" 2886 } 2887 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { return "e8d4e804" } 2888 func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType { 2889 return api.ReplyMessage 2890 } 2891 2892 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Size() (size int) { 2893 if m == nil { 2894 return 0 2895 } 2896 size += 4 // m.Retval 2897 return size 2898 } 2899 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Marshal(b []byte) ([]byte, error) { 2900 if b == nil { 2901 b = make([]byte, m.Size()) 2902 } 2903 buf := codec.NewBuffer(b) 2904 buf.EncodeInt32(m.Retval) 2905 return buf.Bytes(), nil 2906 } 2907 func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error { 2908 buf := codec.NewBuffer(b) 2909 m.Retval = buf.DecodeInt32() 2910 return nil 2911 } 2912 2913 func init() { file_ip_binapi_init() } 2914 func file_ip_binapi_init() { 2915 api.RegisterMessage((*IoamDisable)(nil), "ioam_disable_6b16a45e") 2916 api.RegisterMessage((*IoamDisableReply)(nil), "ioam_disable_reply_e8d4e804") 2917 api.RegisterMessage((*IoamEnable)(nil), "ioam_enable_51ccd868") 2918 api.RegisterMessage((*IoamEnableReply)(nil), "ioam_enable_reply_e8d4e804") 2919 api.RegisterMessage((*IPAddressDetails)(nil), "ip_address_details_b1199745") 2920 api.RegisterMessage((*IPAddressDump)(nil), "ip_address_dump_2d033de4") 2921 api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip_container_proxy_add_del_91189f40") 2922 api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip_container_proxy_add_del_reply_e8d4e804") 2923 api.RegisterMessage((*IPContainerProxyDetails)(nil), "ip_container_proxy_details_0ee460e8") 2924 api.RegisterMessage((*IPContainerProxyDump)(nil), "ip_container_proxy_dump_51077d14") 2925 api.RegisterMessage((*IPDetails)(nil), "ip_details_eb152d07") 2926 api.RegisterMessage((*IPDump)(nil), "ip_dump_98d231ca") 2927 api.RegisterMessage((*IPMrouteAddDel)(nil), "ip_mroute_add_del_0dd7e790") 2928 api.RegisterMessage((*IPMrouteAddDelReply)(nil), "ip_mroute_add_del_reply_1992deab") 2929 api.RegisterMessage((*IPMrouteDetails)(nil), "ip_mroute_details_c5cb23fc") 2930 api.RegisterMessage((*IPMrouteDump)(nil), "ip_mroute_dump_b9d2e09e") 2931 api.RegisterMessage((*IPMtableDetails)(nil), "ip_mtable_details_b9d2e09e") 2932 api.RegisterMessage((*IPMtableDump)(nil), "ip_mtable_dump_51077d14") 2933 api.RegisterMessage((*IPPuntPolice)(nil), "ip_punt_police_db867cea") 2934 api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip_punt_police_reply_e8d4e804") 2935 api.RegisterMessage((*IPPuntRedirect)(nil), "ip_punt_redirect_a9a5592c") 2936 api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_3924f5d3") 2937 api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip_punt_redirect_dump_2d033de4") 2938 api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip_punt_redirect_reply_e8d4e804") 2939 api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_885c85a6") 2940 api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip_reassembly_enable_disable_reply_e8d4e804") 2941 api.RegisterMessage((*IPReassemblyGet)(nil), "ip_reassembly_get_ea13ff63") 2942 api.RegisterMessage((*IPReassemblyGetReply)(nil), "ip_reassembly_get_reply_d5eb8d34") 2943 api.RegisterMessage((*IPReassemblySet)(nil), "ip_reassembly_set_16467d25") 2944 api.RegisterMessage((*IPReassemblySetReply)(nil), "ip_reassembly_set_reply_e8d4e804") 2945 api.RegisterMessage((*IPRouteAddDel)(nil), "ip_route_add_del_c1ff832d") 2946 api.RegisterMessage((*IPRouteAddDelReply)(nil), "ip_route_add_del_reply_1992deab") 2947 api.RegisterMessage((*IPRouteDetails)(nil), "ip_route_details_d1ffaae1") 2948 api.RegisterMessage((*IPRouteDump)(nil), "ip_route_dump_b9d2e09e") 2949 api.RegisterMessage((*IPRouteLookup)(nil), "ip_route_lookup_e2986185") 2950 api.RegisterMessage((*IPRouteLookupReply)(nil), "ip_route_lookup_reply_ae99de8e") 2951 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip_source_and_port_range_check_add_del_8bfc76f2") 2952 api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip_source_and_port_range_check_add_del_reply_e8d4e804") 2953 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip_source_and_port_range_check_interface_add_del_e1ba8987") 2954 api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip_source_and_port_range_check_interface_add_del_reply_e8d4e804") 2955 api.RegisterMessage((*IPTableAddDel)(nil), "ip_table_add_del_0ffdaec0") 2956 api.RegisterMessage((*IPTableAddDelReply)(nil), "ip_table_add_del_reply_e8d4e804") 2957 api.RegisterMessage((*IPTableDetails)(nil), "ip_table_details_c79fca0f") 2958 api.RegisterMessage((*IPTableDump)(nil), "ip_table_dump_51077d14") 2959 api.RegisterMessage((*IPTableFlush)(nil), "ip_table_flush_b9d2e09e") 2960 api.RegisterMessage((*IPTableFlushReply)(nil), "ip_table_flush_reply_e8d4e804") 2961 api.RegisterMessage((*IPTableReplaceBegin)(nil), "ip_table_replace_begin_b9d2e09e") 2962 api.RegisterMessage((*IPTableReplaceBeginReply)(nil), "ip_table_replace_begin_reply_e8d4e804") 2963 api.RegisterMessage((*IPTableReplaceEnd)(nil), "ip_table_replace_end_b9d2e09e") 2964 api.RegisterMessage((*IPTableReplaceEndReply)(nil), "ip_table_replace_end_reply_e8d4e804") 2965 api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip_unnumbered_details_aa12a483") 2966 api.RegisterMessage((*IPUnnumberedDump)(nil), "ip_unnumbered_dump_f9e6675e") 2967 api.RegisterMessage((*MfibSignalDetails)(nil), "mfib_signal_details_64398a9a") 2968 api.RegisterMessage((*MfibSignalDump)(nil), "mfib_signal_dump_51077d14") 2969 api.RegisterMessage((*SetIPFlowHash)(nil), "set_ip_flow_hash_084ee09e") 2970 api.RegisterMessage((*SetIPFlowHashReply)(nil), "set_ip_flow_hash_reply_e8d4e804") 2971 api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "sw_interface_ip6_enable_disable_ae6cfcfb") 2972 api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "sw_interface_ip6_enable_disable_reply_e8d4e804") 2973 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "sw_interface_ip6_set_link_local_address_2931d9fa") 2974 api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "sw_interface_ip6_set_link_local_address_reply_e8d4e804") 2975 } 2976 2977 // Messages returns list of all messages in this module. 2978 func AllMessages() []api.Message { 2979 return []api.Message{ 2980 (*IoamDisable)(nil), 2981 (*IoamDisableReply)(nil), 2982 (*IoamEnable)(nil), 2983 (*IoamEnableReply)(nil), 2984 (*IPAddressDetails)(nil), 2985 (*IPAddressDump)(nil), 2986 (*IPContainerProxyAddDel)(nil), 2987 (*IPContainerProxyAddDelReply)(nil), 2988 (*IPContainerProxyDetails)(nil), 2989 (*IPContainerProxyDump)(nil), 2990 (*IPDetails)(nil), 2991 (*IPDump)(nil), 2992 (*IPMrouteAddDel)(nil), 2993 (*IPMrouteAddDelReply)(nil), 2994 (*IPMrouteDetails)(nil), 2995 (*IPMrouteDump)(nil), 2996 (*IPMtableDetails)(nil), 2997 (*IPMtableDump)(nil), 2998 (*IPPuntPolice)(nil), 2999 (*IPPuntPoliceReply)(nil), 3000 (*IPPuntRedirect)(nil), 3001 (*IPPuntRedirectDetails)(nil), 3002 (*IPPuntRedirectDump)(nil), 3003 (*IPPuntRedirectReply)(nil), 3004 (*IPReassemblyEnableDisable)(nil), 3005 (*IPReassemblyEnableDisableReply)(nil), 3006 (*IPReassemblyGet)(nil), 3007 (*IPReassemblyGetReply)(nil), 3008 (*IPReassemblySet)(nil), 3009 (*IPReassemblySetReply)(nil), 3010 (*IPRouteAddDel)(nil), 3011 (*IPRouteAddDelReply)(nil), 3012 (*IPRouteDetails)(nil), 3013 (*IPRouteDump)(nil), 3014 (*IPRouteLookup)(nil), 3015 (*IPRouteLookupReply)(nil), 3016 (*IPSourceAndPortRangeCheckAddDel)(nil), 3017 (*IPSourceAndPortRangeCheckAddDelReply)(nil), 3018 (*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), 3019 (*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), 3020 (*IPTableAddDel)(nil), 3021 (*IPTableAddDelReply)(nil), 3022 (*IPTableDetails)(nil), 3023 (*IPTableDump)(nil), 3024 (*IPTableFlush)(nil), 3025 (*IPTableFlushReply)(nil), 3026 (*IPTableReplaceBegin)(nil), 3027 (*IPTableReplaceBeginReply)(nil), 3028 (*IPTableReplaceEnd)(nil), 3029 (*IPTableReplaceEndReply)(nil), 3030 (*IPUnnumberedDetails)(nil), 3031 (*IPUnnumberedDump)(nil), 3032 (*MfibSignalDetails)(nil), 3033 (*MfibSignalDump)(nil), 3034 (*SetIPFlowHash)(nil), 3035 (*SetIPFlowHashReply)(nil), 3036 (*SwInterfaceIP6EnableDisable)(nil), 3037 (*SwInterfaceIP6EnableDisableReply)(nil), 3038 (*SwInterfaceIP6SetLinkLocalAddress)(nil), 3039 (*SwInterfaceIP6SetLinkLocalAddressReply)(nil), 3040 } 3041 }