github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/interface/interface.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 // versions: 3 // binapi-generator: v0.4.0-dev 4 // VPP: 23.02-rc0~189-g57127b32a 5 // source: /usr/share/vpp/api/core/interface.api.json 6 7 // Package interfaces contains generated bindings for API file interface.api. 8 // 9 // Contents: 10 // 68 messages 11 // 12 package interfaces 13 14 import ( 15 api "git.fd.io/govpp.git/api" 16 codec "git.fd.io/govpp.git/codec" 17 ethernet_types "github.com/edwarnicke/govpp/binapi/ethernet_types" 18 interface_types "github.com/edwarnicke/govpp/binapi/interface_types" 19 ip_types "github.com/edwarnicke/govpp/binapi/ip_types" 20 ) 21 22 // This is a compile-time assertion to ensure that this generated file 23 // is compatible with the GoVPP api package it is being compiled against. 24 // A compilation error at this line likely means your copy of the 25 // GoVPP api package needs to be updated. 26 const _ = api.GoVppAPIPackageIsVersion2 27 28 const ( 29 APIFile = "interface" 30 APIVersion = "3.2.3" 31 VersionCrc = 0xddff3487 32 ) 33 34 // CollectDetailedInterfaceStats defines message 'collect_detailed_interface_stats'. 35 type CollectDetailedInterfaceStats struct { 36 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 37 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"` 38 } 39 40 func (m *CollectDetailedInterfaceStats) Reset() { *m = CollectDetailedInterfaceStats{} } 41 func (*CollectDetailedInterfaceStats) GetMessageName() string { 42 return "collect_detailed_interface_stats" 43 } 44 func (*CollectDetailedInterfaceStats) GetCrcString() string { return "5501adee" } 45 func (*CollectDetailedInterfaceStats) GetMessageType() api.MessageType { 46 return api.RequestMessage 47 } 48 49 func (m *CollectDetailedInterfaceStats) Size() (size int) { 50 if m == nil { 51 return 0 52 } 53 size += 4 // m.SwIfIndex 54 size += 1 // m.EnableDisable 55 return size 56 } 57 func (m *CollectDetailedInterfaceStats) Marshal(b []byte) ([]byte, error) { 58 if b == nil { 59 b = make([]byte, m.Size()) 60 } 61 buf := codec.NewBuffer(b) 62 buf.EncodeUint32(uint32(m.SwIfIndex)) 63 buf.EncodeBool(m.EnableDisable) 64 return buf.Bytes(), nil 65 } 66 func (m *CollectDetailedInterfaceStats) Unmarshal(b []byte) error { 67 buf := codec.NewBuffer(b) 68 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 69 m.EnableDisable = buf.DecodeBool() 70 return nil 71 } 72 73 // CollectDetailedInterfaceStatsReply defines message 'collect_detailed_interface_stats_reply'. 74 type CollectDetailedInterfaceStatsReply struct { 75 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 76 } 77 78 func (m *CollectDetailedInterfaceStatsReply) Reset() { *m = CollectDetailedInterfaceStatsReply{} } 79 func (*CollectDetailedInterfaceStatsReply) GetMessageName() string { 80 return "collect_detailed_interface_stats_reply" 81 } 82 func (*CollectDetailedInterfaceStatsReply) GetCrcString() string { return "e8d4e804" } 83 func (*CollectDetailedInterfaceStatsReply) GetMessageType() api.MessageType { 84 return api.ReplyMessage 85 } 86 87 func (m *CollectDetailedInterfaceStatsReply) Size() (size int) { 88 if m == nil { 89 return 0 90 } 91 size += 4 // m.Retval 92 return size 93 } 94 func (m *CollectDetailedInterfaceStatsReply) Marshal(b []byte) ([]byte, error) { 95 if b == nil { 96 b = make([]byte, m.Size()) 97 } 98 buf := codec.NewBuffer(b) 99 buf.EncodeInt32(m.Retval) 100 return buf.Bytes(), nil 101 } 102 func (m *CollectDetailedInterfaceStatsReply) Unmarshal(b []byte) error { 103 buf := codec.NewBuffer(b) 104 m.Retval = buf.DecodeInt32() 105 return nil 106 } 107 108 // CreateLoopback defines message 'create_loopback'. 109 type CreateLoopback struct { 110 MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"` 111 } 112 113 func (m *CreateLoopback) Reset() { *m = CreateLoopback{} } 114 func (*CreateLoopback) GetMessageName() string { return "create_loopback" } 115 func (*CreateLoopback) GetCrcString() string { return "42bb5d22" } 116 func (*CreateLoopback) GetMessageType() api.MessageType { 117 return api.RequestMessage 118 } 119 120 func (m *CreateLoopback) Size() (size int) { 121 if m == nil { 122 return 0 123 } 124 size += 1 * 6 // m.MacAddress 125 return size 126 } 127 func (m *CreateLoopback) Marshal(b []byte) ([]byte, error) { 128 if b == nil { 129 b = make([]byte, m.Size()) 130 } 131 buf := codec.NewBuffer(b) 132 buf.EncodeBytes(m.MacAddress[:], 6) 133 return buf.Bytes(), nil 134 } 135 func (m *CreateLoopback) Unmarshal(b []byte) error { 136 buf := codec.NewBuffer(b) 137 copy(m.MacAddress[:], buf.DecodeBytes(6)) 138 return nil 139 } 140 141 // CreateLoopbackInstance defines message 'create_loopback_instance'. 142 type CreateLoopbackInstance struct { 143 MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"` 144 IsSpecified bool `binapi:"bool,name=is_specified" json:"is_specified,omitempty"` 145 UserInstance uint32 `binapi:"u32,name=user_instance" json:"user_instance,omitempty"` 146 } 147 148 func (m *CreateLoopbackInstance) Reset() { *m = CreateLoopbackInstance{} } 149 func (*CreateLoopbackInstance) GetMessageName() string { return "create_loopback_instance" } 150 func (*CreateLoopbackInstance) GetCrcString() string { return "d36a3ee2" } 151 func (*CreateLoopbackInstance) GetMessageType() api.MessageType { 152 return api.RequestMessage 153 } 154 155 func (m *CreateLoopbackInstance) Size() (size int) { 156 if m == nil { 157 return 0 158 } 159 size += 1 * 6 // m.MacAddress 160 size += 1 // m.IsSpecified 161 size += 4 // m.UserInstance 162 return size 163 } 164 func (m *CreateLoopbackInstance) Marshal(b []byte) ([]byte, error) { 165 if b == nil { 166 b = make([]byte, m.Size()) 167 } 168 buf := codec.NewBuffer(b) 169 buf.EncodeBytes(m.MacAddress[:], 6) 170 buf.EncodeBool(m.IsSpecified) 171 buf.EncodeUint32(m.UserInstance) 172 return buf.Bytes(), nil 173 } 174 func (m *CreateLoopbackInstance) Unmarshal(b []byte) error { 175 buf := codec.NewBuffer(b) 176 copy(m.MacAddress[:], buf.DecodeBytes(6)) 177 m.IsSpecified = buf.DecodeBool() 178 m.UserInstance = buf.DecodeUint32() 179 return nil 180 } 181 182 // CreateLoopbackInstanceReply defines message 'create_loopback_instance_reply'. 183 type CreateLoopbackInstanceReply struct { 184 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 185 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 186 } 187 188 func (m *CreateLoopbackInstanceReply) Reset() { *m = CreateLoopbackInstanceReply{} } 189 func (*CreateLoopbackInstanceReply) GetMessageName() string { return "create_loopback_instance_reply" } 190 func (*CreateLoopbackInstanceReply) GetCrcString() string { return "5383d31f" } 191 func (*CreateLoopbackInstanceReply) GetMessageType() api.MessageType { 192 return api.ReplyMessage 193 } 194 195 func (m *CreateLoopbackInstanceReply) Size() (size int) { 196 if m == nil { 197 return 0 198 } 199 size += 4 // m.Retval 200 size += 4 // m.SwIfIndex 201 return size 202 } 203 func (m *CreateLoopbackInstanceReply) Marshal(b []byte) ([]byte, error) { 204 if b == nil { 205 b = make([]byte, m.Size()) 206 } 207 buf := codec.NewBuffer(b) 208 buf.EncodeInt32(m.Retval) 209 buf.EncodeUint32(uint32(m.SwIfIndex)) 210 return buf.Bytes(), nil 211 } 212 func (m *CreateLoopbackInstanceReply) Unmarshal(b []byte) error { 213 buf := codec.NewBuffer(b) 214 m.Retval = buf.DecodeInt32() 215 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 216 return nil 217 } 218 219 // CreateLoopbackReply defines message 'create_loopback_reply'. 220 type CreateLoopbackReply struct { 221 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 222 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 223 } 224 225 func (m *CreateLoopbackReply) Reset() { *m = CreateLoopbackReply{} } 226 func (*CreateLoopbackReply) GetMessageName() string { return "create_loopback_reply" } 227 func (*CreateLoopbackReply) GetCrcString() string { return "5383d31f" } 228 func (*CreateLoopbackReply) GetMessageType() api.MessageType { 229 return api.ReplyMessage 230 } 231 232 func (m *CreateLoopbackReply) Size() (size int) { 233 if m == nil { 234 return 0 235 } 236 size += 4 // m.Retval 237 size += 4 // m.SwIfIndex 238 return size 239 } 240 func (m *CreateLoopbackReply) Marshal(b []byte) ([]byte, error) { 241 if b == nil { 242 b = make([]byte, m.Size()) 243 } 244 buf := codec.NewBuffer(b) 245 buf.EncodeInt32(m.Retval) 246 buf.EncodeUint32(uint32(m.SwIfIndex)) 247 return buf.Bytes(), nil 248 } 249 func (m *CreateLoopbackReply) Unmarshal(b []byte) error { 250 buf := codec.NewBuffer(b) 251 m.Retval = buf.DecodeInt32() 252 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 253 return nil 254 } 255 256 // CreateSubif defines message 'create_subif'. 257 type CreateSubif struct { 258 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 259 SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"` 260 SubIfFlags interface_types.SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"` 261 OuterVlanID uint16 `binapi:"u16,name=outer_vlan_id" json:"outer_vlan_id,omitempty"` 262 InnerVlanID uint16 `binapi:"u16,name=inner_vlan_id" json:"inner_vlan_id,omitempty"` 263 } 264 265 func (m *CreateSubif) Reset() { *m = CreateSubif{} } 266 func (*CreateSubif) GetMessageName() string { return "create_subif" } 267 func (*CreateSubif) GetCrcString() string { return "790ca755" } 268 func (*CreateSubif) GetMessageType() api.MessageType { 269 return api.RequestMessage 270 } 271 272 func (m *CreateSubif) Size() (size int) { 273 if m == nil { 274 return 0 275 } 276 size += 4 // m.SwIfIndex 277 size += 4 // m.SubID 278 size += 4 // m.SubIfFlags 279 size += 2 // m.OuterVlanID 280 size += 2 // m.InnerVlanID 281 return size 282 } 283 func (m *CreateSubif) Marshal(b []byte) ([]byte, error) { 284 if b == nil { 285 b = make([]byte, m.Size()) 286 } 287 buf := codec.NewBuffer(b) 288 buf.EncodeUint32(uint32(m.SwIfIndex)) 289 buf.EncodeUint32(m.SubID) 290 buf.EncodeUint32(uint32(m.SubIfFlags)) 291 buf.EncodeUint16(m.OuterVlanID) 292 buf.EncodeUint16(m.InnerVlanID) 293 return buf.Bytes(), nil 294 } 295 func (m *CreateSubif) Unmarshal(b []byte) error { 296 buf := codec.NewBuffer(b) 297 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 298 m.SubID = buf.DecodeUint32() 299 m.SubIfFlags = interface_types.SubIfFlags(buf.DecodeUint32()) 300 m.OuterVlanID = buf.DecodeUint16() 301 m.InnerVlanID = buf.DecodeUint16() 302 return nil 303 } 304 305 // CreateSubifReply defines message 'create_subif_reply'. 306 type CreateSubifReply struct { 307 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 308 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 309 } 310 311 func (m *CreateSubifReply) Reset() { *m = CreateSubifReply{} } 312 func (*CreateSubifReply) GetMessageName() string { return "create_subif_reply" } 313 func (*CreateSubifReply) GetCrcString() string { return "5383d31f" } 314 func (*CreateSubifReply) GetMessageType() api.MessageType { 315 return api.ReplyMessage 316 } 317 318 func (m *CreateSubifReply) Size() (size int) { 319 if m == nil { 320 return 0 321 } 322 size += 4 // m.Retval 323 size += 4 // m.SwIfIndex 324 return size 325 } 326 func (m *CreateSubifReply) Marshal(b []byte) ([]byte, error) { 327 if b == nil { 328 b = make([]byte, m.Size()) 329 } 330 buf := codec.NewBuffer(b) 331 buf.EncodeInt32(m.Retval) 332 buf.EncodeUint32(uint32(m.SwIfIndex)) 333 return buf.Bytes(), nil 334 } 335 func (m *CreateSubifReply) Unmarshal(b []byte) error { 336 buf := codec.NewBuffer(b) 337 m.Retval = buf.DecodeInt32() 338 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 339 return nil 340 } 341 342 // CreateVlanSubif defines message 'create_vlan_subif'. 343 type CreateVlanSubif struct { 344 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 345 VlanID uint32 `binapi:"u32,name=vlan_id" json:"vlan_id,omitempty"` 346 } 347 348 func (m *CreateVlanSubif) Reset() { *m = CreateVlanSubif{} } 349 func (*CreateVlanSubif) GetMessageName() string { return "create_vlan_subif" } 350 func (*CreateVlanSubif) GetCrcString() string { return "af34ac8b" } 351 func (*CreateVlanSubif) GetMessageType() api.MessageType { 352 return api.RequestMessage 353 } 354 355 func (m *CreateVlanSubif) Size() (size int) { 356 if m == nil { 357 return 0 358 } 359 size += 4 // m.SwIfIndex 360 size += 4 // m.VlanID 361 return size 362 } 363 func (m *CreateVlanSubif) Marshal(b []byte) ([]byte, error) { 364 if b == nil { 365 b = make([]byte, m.Size()) 366 } 367 buf := codec.NewBuffer(b) 368 buf.EncodeUint32(uint32(m.SwIfIndex)) 369 buf.EncodeUint32(m.VlanID) 370 return buf.Bytes(), nil 371 } 372 func (m *CreateVlanSubif) Unmarshal(b []byte) error { 373 buf := codec.NewBuffer(b) 374 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 375 m.VlanID = buf.DecodeUint32() 376 return nil 377 } 378 379 // CreateVlanSubifReply defines message 'create_vlan_subif_reply'. 380 type CreateVlanSubifReply struct { 381 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 382 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 383 } 384 385 func (m *CreateVlanSubifReply) Reset() { *m = CreateVlanSubifReply{} } 386 func (*CreateVlanSubifReply) GetMessageName() string { return "create_vlan_subif_reply" } 387 func (*CreateVlanSubifReply) GetCrcString() string { return "5383d31f" } 388 func (*CreateVlanSubifReply) GetMessageType() api.MessageType { 389 return api.ReplyMessage 390 } 391 392 func (m *CreateVlanSubifReply) Size() (size int) { 393 if m == nil { 394 return 0 395 } 396 size += 4 // m.Retval 397 size += 4 // m.SwIfIndex 398 return size 399 } 400 func (m *CreateVlanSubifReply) Marshal(b []byte) ([]byte, error) { 401 if b == nil { 402 b = make([]byte, m.Size()) 403 } 404 buf := codec.NewBuffer(b) 405 buf.EncodeInt32(m.Retval) 406 buf.EncodeUint32(uint32(m.SwIfIndex)) 407 return buf.Bytes(), nil 408 } 409 func (m *CreateVlanSubifReply) Unmarshal(b []byte) error { 410 buf := codec.NewBuffer(b) 411 m.Retval = buf.DecodeInt32() 412 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 413 return nil 414 } 415 416 // DeleteLoopback defines message 'delete_loopback'. 417 type DeleteLoopback struct { 418 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 419 } 420 421 func (m *DeleteLoopback) Reset() { *m = DeleteLoopback{} } 422 func (*DeleteLoopback) GetMessageName() string { return "delete_loopback" } 423 func (*DeleteLoopback) GetCrcString() string { return "f9e6675e" } 424 func (*DeleteLoopback) GetMessageType() api.MessageType { 425 return api.RequestMessage 426 } 427 428 func (m *DeleteLoopback) Size() (size int) { 429 if m == nil { 430 return 0 431 } 432 size += 4 // m.SwIfIndex 433 return size 434 } 435 func (m *DeleteLoopback) Marshal(b []byte) ([]byte, error) { 436 if b == nil { 437 b = make([]byte, m.Size()) 438 } 439 buf := codec.NewBuffer(b) 440 buf.EncodeUint32(uint32(m.SwIfIndex)) 441 return buf.Bytes(), nil 442 } 443 func (m *DeleteLoopback) Unmarshal(b []byte) error { 444 buf := codec.NewBuffer(b) 445 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 446 return nil 447 } 448 449 // DeleteLoopbackReply defines message 'delete_loopback_reply'. 450 type DeleteLoopbackReply struct { 451 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 452 } 453 454 func (m *DeleteLoopbackReply) Reset() { *m = DeleteLoopbackReply{} } 455 func (*DeleteLoopbackReply) GetMessageName() string { return "delete_loopback_reply" } 456 func (*DeleteLoopbackReply) GetCrcString() string { return "e8d4e804" } 457 func (*DeleteLoopbackReply) GetMessageType() api.MessageType { 458 return api.ReplyMessage 459 } 460 461 func (m *DeleteLoopbackReply) Size() (size int) { 462 if m == nil { 463 return 0 464 } 465 size += 4 // m.Retval 466 return size 467 } 468 func (m *DeleteLoopbackReply) Marshal(b []byte) ([]byte, error) { 469 if b == nil { 470 b = make([]byte, m.Size()) 471 } 472 buf := codec.NewBuffer(b) 473 buf.EncodeInt32(m.Retval) 474 return buf.Bytes(), nil 475 } 476 func (m *DeleteLoopbackReply) Unmarshal(b []byte) error { 477 buf := codec.NewBuffer(b) 478 m.Retval = buf.DecodeInt32() 479 return nil 480 } 481 482 // DeleteSubif defines message 'delete_subif'. 483 type DeleteSubif struct { 484 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 485 } 486 487 func (m *DeleteSubif) Reset() { *m = DeleteSubif{} } 488 func (*DeleteSubif) GetMessageName() string { return "delete_subif" } 489 func (*DeleteSubif) GetCrcString() string { return "f9e6675e" } 490 func (*DeleteSubif) GetMessageType() api.MessageType { 491 return api.RequestMessage 492 } 493 494 func (m *DeleteSubif) Size() (size int) { 495 if m == nil { 496 return 0 497 } 498 size += 4 // m.SwIfIndex 499 return size 500 } 501 func (m *DeleteSubif) Marshal(b []byte) ([]byte, error) { 502 if b == nil { 503 b = make([]byte, m.Size()) 504 } 505 buf := codec.NewBuffer(b) 506 buf.EncodeUint32(uint32(m.SwIfIndex)) 507 return buf.Bytes(), nil 508 } 509 func (m *DeleteSubif) Unmarshal(b []byte) error { 510 buf := codec.NewBuffer(b) 511 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 512 return nil 513 } 514 515 // DeleteSubifReply defines message 'delete_subif_reply'. 516 type DeleteSubifReply struct { 517 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 518 } 519 520 func (m *DeleteSubifReply) Reset() { *m = DeleteSubifReply{} } 521 func (*DeleteSubifReply) GetMessageName() string { return "delete_subif_reply" } 522 func (*DeleteSubifReply) GetCrcString() string { return "e8d4e804" } 523 func (*DeleteSubifReply) GetMessageType() api.MessageType { 524 return api.ReplyMessage 525 } 526 527 func (m *DeleteSubifReply) Size() (size int) { 528 if m == nil { 529 return 0 530 } 531 size += 4 // m.Retval 532 return size 533 } 534 func (m *DeleteSubifReply) Marshal(b []byte) ([]byte, error) { 535 if b == nil { 536 b = make([]byte, m.Size()) 537 } 538 buf := codec.NewBuffer(b) 539 buf.EncodeInt32(m.Retval) 540 return buf.Bytes(), nil 541 } 542 func (m *DeleteSubifReply) Unmarshal(b []byte) error { 543 buf := codec.NewBuffer(b) 544 m.Retval = buf.DecodeInt32() 545 return nil 546 } 547 548 // GetBuffersStats defines message 'get_buffers_stats'. 549 type GetBuffersStats struct { 550 BufferIndex uint32 `binapi:"u32,name=buffer_index" json:"buffer_index,omitempty"` 551 } 552 553 func (m *GetBuffersStats) Reset() { *m = GetBuffersStats{} } 554 func (*GetBuffersStats) GetMessageName() string { return "get_buffers_stats" } 555 func (*GetBuffersStats) GetCrcString() string { return "d698f87e" } 556 func (*GetBuffersStats) GetMessageType() api.MessageType { 557 return api.RequestMessage 558 } 559 560 func (m *GetBuffersStats) Size() (size int) { 561 if m == nil { 562 return 0 563 } 564 size += 4 // m.BufferIndex 565 return size 566 } 567 func (m *GetBuffersStats) Marshal(b []byte) ([]byte, error) { 568 if b == nil { 569 b = make([]byte, m.Size()) 570 } 571 buf := codec.NewBuffer(b) 572 buf.EncodeUint32(m.BufferIndex) 573 return buf.Bytes(), nil 574 } 575 func (m *GetBuffersStats) Unmarshal(b []byte) error { 576 buf := codec.NewBuffer(b) 577 m.BufferIndex = buf.DecodeUint32() 578 return nil 579 } 580 581 // GetBuffersStatsReply defines message 'get_buffers_stats_reply'. 582 type GetBuffersStatsReply struct { 583 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 584 AvailableBuffers uint32 `binapi:"u32,name=available_buffers" json:"available_buffers,omitempty"` 585 CachedBuffers uint32 `binapi:"u32,name=cached_buffers" json:"cached_buffers,omitempty"` 586 UsedBuffers uint32 `binapi:"u32,name=used_buffers" json:"used_buffers,omitempty"` 587 } 588 589 func (m *GetBuffersStatsReply) Reset() { *m = GetBuffersStatsReply{} } 590 func (*GetBuffersStatsReply) GetMessageName() string { return "get_buffers_stats_reply" } 591 func (*GetBuffersStatsReply) GetCrcString() string { return "22c0649d" } 592 func (*GetBuffersStatsReply) GetMessageType() api.MessageType { 593 return api.ReplyMessage 594 } 595 596 func (m *GetBuffersStatsReply) Size() (size int) { 597 if m == nil { 598 return 0 599 } 600 size += 4 // m.Retval 601 size += 4 // m.AvailableBuffers 602 size += 4 // m.CachedBuffers 603 size += 4 // m.UsedBuffers 604 return size 605 } 606 func (m *GetBuffersStatsReply) Marshal(b []byte) ([]byte, error) { 607 if b == nil { 608 b = make([]byte, m.Size()) 609 } 610 buf := codec.NewBuffer(b) 611 buf.EncodeInt32(m.Retval) 612 buf.EncodeUint32(m.AvailableBuffers) 613 buf.EncodeUint32(m.CachedBuffers) 614 buf.EncodeUint32(m.UsedBuffers) 615 return buf.Bytes(), nil 616 } 617 func (m *GetBuffersStatsReply) Unmarshal(b []byte) error { 618 buf := codec.NewBuffer(b) 619 m.Retval = buf.DecodeInt32() 620 m.AvailableBuffers = buf.DecodeUint32() 621 m.CachedBuffers = buf.DecodeUint32() 622 m.UsedBuffers = buf.DecodeUint32() 623 return nil 624 } 625 626 // HwInterfaceSetMtu defines message 'hw_interface_set_mtu'. 627 type HwInterfaceSetMtu struct { 628 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 629 Mtu uint16 `binapi:"u16,name=mtu" json:"mtu,omitempty"` 630 } 631 632 func (m *HwInterfaceSetMtu) Reset() { *m = HwInterfaceSetMtu{} } 633 func (*HwInterfaceSetMtu) GetMessageName() string { return "hw_interface_set_mtu" } 634 func (*HwInterfaceSetMtu) GetCrcString() string { return "e6746899" } 635 func (*HwInterfaceSetMtu) GetMessageType() api.MessageType { 636 return api.RequestMessage 637 } 638 639 func (m *HwInterfaceSetMtu) Size() (size int) { 640 if m == nil { 641 return 0 642 } 643 size += 4 // m.SwIfIndex 644 size += 2 // m.Mtu 645 return size 646 } 647 func (m *HwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) { 648 if b == nil { 649 b = make([]byte, m.Size()) 650 } 651 buf := codec.NewBuffer(b) 652 buf.EncodeUint32(uint32(m.SwIfIndex)) 653 buf.EncodeUint16(m.Mtu) 654 return buf.Bytes(), nil 655 } 656 func (m *HwInterfaceSetMtu) Unmarshal(b []byte) error { 657 buf := codec.NewBuffer(b) 658 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 659 m.Mtu = buf.DecodeUint16() 660 return nil 661 } 662 663 // HwInterfaceSetMtuReply defines message 'hw_interface_set_mtu_reply'. 664 type HwInterfaceSetMtuReply struct { 665 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 666 } 667 668 func (m *HwInterfaceSetMtuReply) Reset() { *m = HwInterfaceSetMtuReply{} } 669 func (*HwInterfaceSetMtuReply) GetMessageName() string { return "hw_interface_set_mtu_reply" } 670 func (*HwInterfaceSetMtuReply) GetCrcString() string { return "e8d4e804" } 671 func (*HwInterfaceSetMtuReply) GetMessageType() api.MessageType { 672 return api.ReplyMessage 673 } 674 675 func (m *HwInterfaceSetMtuReply) Size() (size int) { 676 if m == nil { 677 return 0 678 } 679 size += 4 // m.Retval 680 return size 681 } 682 func (m *HwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) { 683 if b == nil { 684 b = make([]byte, m.Size()) 685 } 686 buf := codec.NewBuffer(b) 687 buf.EncodeInt32(m.Retval) 688 return buf.Bytes(), nil 689 } 690 func (m *HwInterfaceSetMtuReply) Unmarshal(b []byte) error { 691 buf := codec.NewBuffer(b) 692 m.Retval = buf.DecodeInt32() 693 return nil 694 } 695 696 // InterfaceNameRenumber defines message 'interface_name_renumber'. 697 type InterfaceNameRenumber struct { 698 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 699 NewShowDevInstance uint32 `binapi:"u32,name=new_show_dev_instance" json:"new_show_dev_instance,omitempty"` 700 } 701 702 func (m *InterfaceNameRenumber) Reset() { *m = InterfaceNameRenumber{} } 703 func (*InterfaceNameRenumber) GetMessageName() string { return "interface_name_renumber" } 704 func (*InterfaceNameRenumber) GetCrcString() string { return "2b8858b8" } 705 func (*InterfaceNameRenumber) GetMessageType() api.MessageType { 706 return api.RequestMessage 707 } 708 709 func (m *InterfaceNameRenumber) Size() (size int) { 710 if m == nil { 711 return 0 712 } 713 size += 4 // m.SwIfIndex 714 size += 4 // m.NewShowDevInstance 715 return size 716 } 717 func (m *InterfaceNameRenumber) Marshal(b []byte) ([]byte, error) { 718 if b == nil { 719 b = make([]byte, m.Size()) 720 } 721 buf := codec.NewBuffer(b) 722 buf.EncodeUint32(uint32(m.SwIfIndex)) 723 buf.EncodeUint32(m.NewShowDevInstance) 724 return buf.Bytes(), nil 725 } 726 func (m *InterfaceNameRenumber) Unmarshal(b []byte) error { 727 buf := codec.NewBuffer(b) 728 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 729 m.NewShowDevInstance = buf.DecodeUint32() 730 return nil 731 } 732 733 // InterfaceNameRenumberReply defines message 'interface_name_renumber_reply'. 734 type InterfaceNameRenumberReply struct { 735 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 736 } 737 738 func (m *InterfaceNameRenumberReply) Reset() { *m = InterfaceNameRenumberReply{} } 739 func (*InterfaceNameRenumberReply) GetMessageName() string { return "interface_name_renumber_reply" } 740 func (*InterfaceNameRenumberReply) GetCrcString() string { return "e8d4e804" } 741 func (*InterfaceNameRenumberReply) GetMessageType() api.MessageType { 742 return api.ReplyMessage 743 } 744 745 func (m *InterfaceNameRenumberReply) Size() (size int) { 746 if m == nil { 747 return 0 748 } 749 size += 4 // m.Retval 750 return size 751 } 752 func (m *InterfaceNameRenumberReply) Marshal(b []byte) ([]byte, error) { 753 if b == nil { 754 b = make([]byte, m.Size()) 755 } 756 buf := codec.NewBuffer(b) 757 buf.EncodeInt32(m.Retval) 758 return buf.Bytes(), nil 759 } 760 func (m *InterfaceNameRenumberReply) Unmarshal(b []byte) error { 761 buf := codec.NewBuffer(b) 762 m.Retval = buf.DecodeInt32() 763 return nil 764 } 765 766 // SwInterfaceAddDelAddress defines message 'sw_interface_add_del_address'. 767 type SwInterfaceAddDelAddress struct { 768 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 769 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 770 DelAll bool `binapi:"bool,name=del_all" json:"del_all,omitempty"` 771 Prefix ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"` 772 } 773 774 func (m *SwInterfaceAddDelAddress) Reset() { *m = SwInterfaceAddDelAddress{} } 775 func (*SwInterfaceAddDelAddress) GetMessageName() string { return "sw_interface_add_del_address" } 776 func (*SwInterfaceAddDelAddress) GetCrcString() string { return "5463d73b" } 777 func (*SwInterfaceAddDelAddress) GetMessageType() api.MessageType { 778 return api.RequestMessage 779 } 780 781 func (m *SwInterfaceAddDelAddress) Size() (size int) { 782 if m == nil { 783 return 0 784 } 785 size += 4 // m.SwIfIndex 786 size += 1 // m.IsAdd 787 size += 1 // m.DelAll 788 size += 1 // m.Prefix.Address.Af 789 size += 1 * 16 // m.Prefix.Address.Un 790 size += 1 // m.Prefix.Len 791 return size 792 } 793 func (m *SwInterfaceAddDelAddress) Marshal(b []byte) ([]byte, error) { 794 if b == nil { 795 b = make([]byte, m.Size()) 796 } 797 buf := codec.NewBuffer(b) 798 buf.EncodeUint32(uint32(m.SwIfIndex)) 799 buf.EncodeBool(m.IsAdd) 800 buf.EncodeBool(m.DelAll) 801 buf.EncodeUint8(uint8(m.Prefix.Address.Af)) 802 buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16) 803 buf.EncodeUint8(m.Prefix.Len) 804 return buf.Bytes(), nil 805 } 806 func (m *SwInterfaceAddDelAddress) Unmarshal(b []byte) error { 807 buf := codec.NewBuffer(b) 808 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 809 m.IsAdd = buf.DecodeBool() 810 m.DelAll = buf.DecodeBool() 811 m.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) 812 copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) 813 m.Prefix.Len = buf.DecodeUint8() 814 return nil 815 } 816 817 // SwInterfaceAddDelAddressReply defines message 'sw_interface_add_del_address_reply'. 818 type SwInterfaceAddDelAddressReply struct { 819 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 820 } 821 822 func (m *SwInterfaceAddDelAddressReply) Reset() { *m = SwInterfaceAddDelAddressReply{} } 823 func (*SwInterfaceAddDelAddressReply) GetMessageName() string { 824 return "sw_interface_add_del_address_reply" 825 } 826 func (*SwInterfaceAddDelAddressReply) GetCrcString() string { return "e8d4e804" } 827 func (*SwInterfaceAddDelAddressReply) GetMessageType() api.MessageType { 828 return api.ReplyMessage 829 } 830 831 func (m *SwInterfaceAddDelAddressReply) Size() (size int) { 832 if m == nil { 833 return 0 834 } 835 size += 4 // m.Retval 836 return size 837 } 838 func (m *SwInterfaceAddDelAddressReply) Marshal(b []byte) ([]byte, error) { 839 if b == nil { 840 b = make([]byte, m.Size()) 841 } 842 buf := codec.NewBuffer(b) 843 buf.EncodeInt32(m.Retval) 844 return buf.Bytes(), nil 845 } 846 func (m *SwInterfaceAddDelAddressReply) Unmarshal(b []byte) error { 847 buf := codec.NewBuffer(b) 848 m.Retval = buf.DecodeInt32() 849 return nil 850 } 851 852 // SwInterfaceAddDelMacAddress defines message 'sw_interface_add_del_mac_address'. 853 type SwInterfaceAddDelMacAddress struct { 854 SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"` 855 Addr ethernet_types.MacAddress `binapi:"mac_address,name=addr" json:"addr,omitempty"` 856 IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"` 857 } 858 859 func (m *SwInterfaceAddDelMacAddress) Reset() { *m = SwInterfaceAddDelMacAddress{} } 860 func (*SwInterfaceAddDelMacAddress) GetMessageName() string { 861 return "sw_interface_add_del_mac_address" 862 } 863 func (*SwInterfaceAddDelMacAddress) GetCrcString() string { return "638bb9f4" } 864 func (*SwInterfaceAddDelMacAddress) GetMessageType() api.MessageType { 865 return api.RequestMessage 866 } 867 868 func (m *SwInterfaceAddDelMacAddress) Size() (size int) { 869 if m == nil { 870 return 0 871 } 872 size += 4 // m.SwIfIndex 873 size += 1 * 6 // m.Addr 874 size += 1 // m.IsAdd 875 return size 876 } 877 func (m *SwInterfaceAddDelMacAddress) Marshal(b []byte) ([]byte, error) { 878 if b == nil { 879 b = make([]byte, m.Size()) 880 } 881 buf := codec.NewBuffer(b) 882 buf.EncodeUint32(m.SwIfIndex) 883 buf.EncodeBytes(m.Addr[:], 6) 884 buf.EncodeUint8(m.IsAdd) 885 return buf.Bytes(), nil 886 } 887 func (m *SwInterfaceAddDelMacAddress) Unmarshal(b []byte) error { 888 buf := codec.NewBuffer(b) 889 m.SwIfIndex = buf.DecodeUint32() 890 copy(m.Addr[:], buf.DecodeBytes(6)) 891 m.IsAdd = buf.DecodeUint8() 892 return nil 893 } 894 895 // SwInterfaceAddDelMacAddressReply defines message 'sw_interface_add_del_mac_address_reply'. 896 type SwInterfaceAddDelMacAddressReply struct { 897 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 898 } 899 900 func (m *SwInterfaceAddDelMacAddressReply) Reset() { *m = SwInterfaceAddDelMacAddressReply{} } 901 func (*SwInterfaceAddDelMacAddressReply) GetMessageName() string { 902 return "sw_interface_add_del_mac_address_reply" 903 } 904 func (*SwInterfaceAddDelMacAddressReply) GetCrcString() string { return "e8d4e804" } 905 func (*SwInterfaceAddDelMacAddressReply) GetMessageType() api.MessageType { 906 return api.ReplyMessage 907 } 908 909 func (m *SwInterfaceAddDelMacAddressReply) Size() (size int) { 910 if m == nil { 911 return 0 912 } 913 size += 4 // m.Retval 914 return size 915 } 916 func (m *SwInterfaceAddDelMacAddressReply) Marshal(b []byte) ([]byte, error) { 917 if b == nil { 918 b = make([]byte, m.Size()) 919 } 920 buf := codec.NewBuffer(b) 921 buf.EncodeInt32(m.Retval) 922 return buf.Bytes(), nil 923 } 924 func (m *SwInterfaceAddDelMacAddressReply) Unmarshal(b []byte) error { 925 buf := codec.NewBuffer(b) 926 m.Retval = buf.DecodeInt32() 927 return nil 928 } 929 930 // SwInterfaceAddressReplaceBegin defines message 'sw_interface_address_replace_begin'. 931 type SwInterfaceAddressReplaceBegin struct{} 932 933 func (m *SwInterfaceAddressReplaceBegin) Reset() { *m = SwInterfaceAddressReplaceBegin{} } 934 func (*SwInterfaceAddressReplaceBegin) GetMessageName() string { 935 return "sw_interface_address_replace_begin" 936 } 937 func (*SwInterfaceAddressReplaceBegin) GetCrcString() string { return "51077d14" } 938 func (*SwInterfaceAddressReplaceBegin) GetMessageType() api.MessageType { 939 return api.RequestMessage 940 } 941 942 func (m *SwInterfaceAddressReplaceBegin) Size() (size int) { 943 if m == nil { 944 return 0 945 } 946 return size 947 } 948 func (m *SwInterfaceAddressReplaceBegin) 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 *SwInterfaceAddressReplaceBegin) Unmarshal(b []byte) error { 956 return nil 957 } 958 959 // SwInterfaceAddressReplaceBeginReply defines message 'sw_interface_address_replace_begin_reply'. 960 type SwInterfaceAddressReplaceBeginReply struct { 961 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 962 } 963 964 func (m *SwInterfaceAddressReplaceBeginReply) Reset() { *m = SwInterfaceAddressReplaceBeginReply{} } 965 func (*SwInterfaceAddressReplaceBeginReply) GetMessageName() string { 966 return "sw_interface_address_replace_begin_reply" 967 } 968 func (*SwInterfaceAddressReplaceBeginReply) GetCrcString() string { return "e8d4e804" } 969 func (*SwInterfaceAddressReplaceBeginReply) GetMessageType() api.MessageType { 970 return api.ReplyMessage 971 } 972 973 func (m *SwInterfaceAddressReplaceBeginReply) Size() (size int) { 974 if m == nil { 975 return 0 976 } 977 size += 4 // m.Retval 978 return size 979 } 980 func (m *SwInterfaceAddressReplaceBeginReply) Marshal(b []byte) ([]byte, error) { 981 if b == nil { 982 b = make([]byte, m.Size()) 983 } 984 buf := codec.NewBuffer(b) 985 buf.EncodeInt32(m.Retval) 986 return buf.Bytes(), nil 987 } 988 func (m *SwInterfaceAddressReplaceBeginReply) Unmarshal(b []byte) error { 989 buf := codec.NewBuffer(b) 990 m.Retval = buf.DecodeInt32() 991 return nil 992 } 993 994 // SwInterfaceAddressReplaceEnd defines message 'sw_interface_address_replace_end'. 995 type SwInterfaceAddressReplaceEnd struct{} 996 997 func (m *SwInterfaceAddressReplaceEnd) Reset() { *m = SwInterfaceAddressReplaceEnd{} } 998 func (*SwInterfaceAddressReplaceEnd) GetMessageName() string { 999 return "sw_interface_address_replace_end" 1000 } 1001 func (*SwInterfaceAddressReplaceEnd) GetCrcString() string { return "51077d14" } 1002 func (*SwInterfaceAddressReplaceEnd) GetMessageType() api.MessageType { 1003 return api.RequestMessage 1004 } 1005 1006 func (m *SwInterfaceAddressReplaceEnd) Size() (size int) { 1007 if m == nil { 1008 return 0 1009 } 1010 return size 1011 } 1012 func (m *SwInterfaceAddressReplaceEnd) Marshal(b []byte) ([]byte, error) { 1013 if b == nil { 1014 b = make([]byte, m.Size()) 1015 } 1016 buf := codec.NewBuffer(b) 1017 return buf.Bytes(), nil 1018 } 1019 func (m *SwInterfaceAddressReplaceEnd) Unmarshal(b []byte) error { 1020 return nil 1021 } 1022 1023 // SwInterfaceAddressReplaceEndReply defines message 'sw_interface_address_replace_end_reply'. 1024 type SwInterfaceAddressReplaceEndReply struct { 1025 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1026 } 1027 1028 func (m *SwInterfaceAddressReplaceEndReply) Reset() { *m = SwInterfaceAddressReplaceEndReply{} } 1029 func (*SwInterfaceAddressReplaceEndReply) GetMessageName() string { 1030 return "sw_interface_address_replace_end_reply" 1031 } 1032 func (*SwInterfaceAddressReplaceEndReply) GetCrcString() string { return "e8d4e804" } 1033 func (*SwInterfaceAddressReplaceEndReply) GetMessageType() api.MessageType { 1034 return api.ReplyMessage 1035 } 1036 1037 func (m *SwInterfaceAddressReplaceEndReply) Size() (size int) { 1038 if m == nil { 1039 return 0 1040 } 1041 size += 4 // m.Retval 1042 return size 1043 } 1044 func (m *SwInterfaceAddressReplaceEndReply) Marshal(b []byte) ([]byte, error) { 1045 if b == nil { 1046 b = make([]byte, m.Size()) 1047 } 1048 buf := codec.NewBuffer(b) 1049 buf.EncodeInt32(m.Retval) 1050 return buf.Bytes(), nil 1051 } 1052 func (m *SwInterfaceAddressReplaceEndReply) Unmarshal(b []byte) error { 1053 buf := codec.NewBuffer(b) 1054 m.Retval = buf.DecodeInt32() 1055 return nil 1056 } 1057 1058 // SwInterfaceClearStats defines message 'sw_interface_clear_stats'. 1059 type SwInterfaceClearStats struct { 1060 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1061 } 1062 1063 func (m *SwInterfaceClearStats) Reset() { *m = SwInterfaceClearStats{} } 1064 func (*SwInterfaceClearStats) GetMessageName() string { return "sw_interface_clear_stats" } 1065 func (*SwInterfaceClearStats) GetCrcString() string { return "f9e6675e" } 1066 func (*SwInterfaceClearStats) GetMessageType() api.MessageType { 1067 return api.RequestMessage 1068 } 1069 1070 func (m *SwInterfaceClearStats) Size() (size int) { 1071 if m == nil { 1072 return 0 1073 } 1074 size += 4 // m.SwIfIndex 1075 return size 1076 } 1077 func (m *SwInterfaceClearStats) Marshal(b []byte) ([]byte, error) { 1078 if b == nil { 1079 b = make([]byte, m.Size()) 1080 } 1081 buf := codec.NewBuffer(b) 1082 buf.EncodeUint32(uint32(m.SwIfIndex)) 1083 return buf.Bytes(), nil 1084 } 1085 func (m *SwInterfaceClearStats) Unmarshal(b []byte) error { 1086 buf := codec.NewBuffer(b) 1087 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1088 return nil 1089 } 1090 1091 // SwInterfaceClearStatsReply defines message 'sw_interface_clear_stats_reply'. 1092 type SwInterfaceClearStatsReply struct { 1093 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1094 } 1095 1096 func (m *SwInterfaceClearStatsReply) Reset() { *m = SwInterfaceClearStatsReply{} } 1097 func (*SwInterfaceClearStatsReply) GetMessageName() string { return "sw_interface_clear_stats_reply" } 1098 func (*SwInterfaceClearStatsReply) GetCrcString() string { return "e8d4e804" } 1099 func (*SwInterfaceClearStatsReply) GetMessageType() api.MessageType { 1100 return api.ReplyMessage 1101 } 1102 1103 func (m *SwInterfaceClearStatsReply) Size() (size int) { 1104 if m == nil { 1105 return 0 1106 } 1107 size += 4 // m.Retval 1108 return size 1109 } 1110 func (m *SwInterfaceClearStatsReply) Marshal(b []byte) ([]byte, error) { 1111 if b == nil { 1112 b = make([]byte, m.Size()) 1113 } 1114 buf := codec.NewBuffer(b) 1115 buf.EncodeInt32(m.Retval) 1116 return buf.Bytes(), nil 1117 } 1118 func (m *SwInterfaceClearStatsReply) Unmarshal(b []byte) error { 1119 buf := codec.NewBuffer(b) 1120 m.Retval = buf.DecodeInt32() 1121 return nil 1122 } 1123 1124 // SwInterfaceDetails defines message 'sw_interface_details'. 1125 type SwInterfaceDetails struct { 1126 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1127 SupSwIfIndex uint32 `binapi:"u32,name=sup_sw_if_index" json:"sup_sw_if_index,omitempty"` 1128 L2Address ethernet_types.MacAddress `binapi:"mac_address,name=l2_address" json:"l2_address,omitempty"` 1129 Flags interface_types.IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"` 1130 Type interface_types.IfType `binapi:"if_type,name=type" json:"type,omitempty"` 1131 LinkDuplex interface_types.LinkDuplex `binapi:"link_duplex,name=link_duplex" json:"link_duplex,omitempty"` 1132 LinkSpeed uint32 `binapi:"u32,name=link_speed" json:"link_speed,omitempty"` 1133 LinkMtu uint16 `binapi:"u16,name=link_mtu" json:"link_mtu,omitempty"` 1134 Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty"` 1135 SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"` 1136 SubNumberOfTags uint8 `binapi:"u8,name=sub_number_of_tags" json:"sub_number_of_tags,omitempty"` 1137 SubOuterVlanID uint16 `binapi:"u16,name=sub_outer_vlan_id" json:"sub_outer_vlan_id,omitempty"` 1138 SubInnerVlanID uint16 `binapi:"u16,name=sub_inner_vlan_id" json:"sub_inner_vlan_id,omitempty"` 1139 SubIfFlags interface_types.SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"` 1140 VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"` 1141 VtrPushDot1q uint32 `binapi:"u32,name=vtr_push_dot1q" json:"vtr_push_dot1q,omitempty"` 1142 VtrTag1 uint32 `binapi:"u32,name=vtr_tag1" json:"vtr_tag1,omitempty"` 1143 VtrTag2 uint32 `binapi:"u32,name=vtr_tag2" json:"vtr_tag2,omitempty"` 1144 OuterTag uint16 `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"` 1145 BDmac ethernet_types.MacAddress `binapi:"mac_address,name=b_dmac" json:"b_dmac,omitempty"` 1146 BSmac ethernet_types.MacAddress `binapi:"mac_address,name=b_smac" json:"b_smac,omitempty"` 1147 BVlanid uint16 `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"` 1148 ISid uint32 `binapi:"u32,name=i_sid" json:"i_sid,omitempty"` 1149 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"` 1150 InterfaceDevType string `binapi:"string[64],name=interface_dev_type" json:"interface_dev_type,omitempty"` 1151 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 1152 } 1153 1154 func (m *SwInterfaceDetails) Reset() { *m = SwInterfaceDetails{} } 1155 func (*SwInterfaceDetails) GetMessageName() string { return "sw_interface_details" } 1156 func (*SwInterfaceDetails) GetCrcString() string { return "6c221fc7" } 1157 func (*SwInterfaceDetails) GetMessageType() api.MessageType { 1158 return api.ReplyMessage 1159 } 1160 1161 func (m *SwInterfaceDetails) Size() (size int) { 1162 if m == nil { 1163 return 0 1164 } 1165 size += 4 // m.SwIfIndex 1166 size += 4 // m.SupSwIfIndex 1167 size += 1 * 6 // m.L2Address 1168 size += 4 // m.Flags 1169 size += 4 // m.Type 1170 size += 4 // m.LinkDuplex 1171 size += 4 // m.LinkSpeed 1172 size += 2 // m.LinkMtu 1173 size += 4 * 4 // m.Mtu 1174 size += 4 // m.SubID 1175 size += 1 // m.SubNumberOfTags 1176 size += 2 // m.SubOuterVlanID 1177 size += 2 // m.SubInnerVlanID 1178 size += 4 // m.SubIfFlags 1179 size += 4 // m.VtrOp 1180 size += 4 // m.VtrPushDot1q 1181 size += 4 // m.VtrTag1 1182 size += 4 // m.VtrTag2 1183 size += 2 // m.OuterTag 1184 size += 1 * 6 // m.BDmac 1185 size += 1 * 6 // m.BSmac 1186 size += 2 // m.BVlanid 1187 size += 4 // m.ISid 1188 size += 64 // m.InterfaceName 1189 size += 64 // m.InterfaceDevType 1190 size += 64 // m.Tag 1191 return size 1192 } 1193 func (m *SwInterfaceDetails) Marshal(b []byte) ([]byte, error) { 1194 if b == nil { 1195 b = make([]byte, m.Size()) 1196 } 1197 buf := codec.NewBuffer(b) 1198 buf.EncodeUint32(uint32(m.SwIfIndex)) 1199 buf.EncodeUint32(m.SupSwIfIndex) 1200 buf.EncodeBytes(m.L2Address[:], 6) 1201 buf.EncodeUint32(uint32(m.Flags)) 1202 buf.EncodeUint32(uint32(m.Type)) 1203 buf.EncodeUint32(uint32(m.LinkDuplex)) 1204 buf.EncodeUint32(m.LinkSpeed) 1205 buf.EncodeUint16(m.LinkMtu) 1206 for i := 0; i < 4; i++ { 1207 var x uint32 1208 if i < len(m.Mtu) { 1209 x = uint32(m.Mtu[i]) 1210 } 1211 buf.EncodeUint32(x) 1212 } 1213 buf.EncodeUint32(m.SubID) 1214 buf.EncodeUint8(m.SubNumberOfTags) 1215 buf.EncodeUint16(m.SubOuterVlanID) 1216 buf.EncodeUint16(m.SubInnerVlanID) 1217 buf.EncodeUint32(uint32(m.SubIfFlags)) 1218 buf.EncodeUint32(m.VtrOp) 1219 buf.EncodeUint32(m.VtrPushDot1q) 1220 buf.EncodeUint32(m.VtrTag1) 1221 buf.EncodeUint32(m.VtrTag2) 1222 buf.EncodeUint16(m.OuterTag) 1223 buf.EncodeBytes(m.BDmac[:], 6) 1224 buf.EncodeBytes(m.BSmac[:], 6) 1225 buf.EncodeUint16(m.BVlanid) 1226 buf.EncodeUint32(m.ISid) 1227 buf.EncodeString(m.InterfaceName, 64) 1228 buf.EncodeString(m.InterfaceDevType, 64) 1229 buf.EncodeString(m.Tag, 64) 1230 return buf.Bytes(), nil 1231 } 1232 func (m *SwInterfaceDetails) Unmarshal(b []byte) error { 1233 buf := codec.NewBuffer(b) 1234 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1235 m.SupSwIfIndex = buf.DecodeUint32() 1236 copy(m.L2Address[:], buf.DecodeBytes(6)) 1237 m.Flags = interface_types.IfStatusFlags(buf.DecodeUint32()) 1238 m.Type = interface_types.IfType(buf.DecodeUint32()) 1239 m.LinkDuplex = interface_types.LinkDuplex(buf.DecodeUint32()) 1240 m.LinkSpeed = buf.DecodeUint32() 1241 m.LinkMtu = buf.DecodeUint16() 1242 m.Mtu = make([]uint32, 4) 1243 for i := 0; i < len(m.Mtu); i++ { 1244 m.Mtu[i] = buf.DecodeUint32() 1245 } 1246 m.SubID = buf.DecodeUint32() 1247 m.SubNumberOfTags = buf.DecodeUint8() 1248 m.SubOuterVlanID = buf.DecodeUint16() 1249 m.SubInnerVlanID = buf.DecodeUint16() 1250 m.SubIfFlags = interface_types.SubIfFlags(buf.DecodeUint32()) 1251 m.VtrOp = buf.DecodeUint32() 1252 m.VtrPushDot1q = buf.DecodeUint32() 1253 m.VtrTag1 = buf.DecodeUint32() 1254 m.VtrTag2 = buf.DecodeUint32() 1255 m.OuterTag = buf.DecodeUint16() 1256 copy(m.BDmac[:], buf.DecodeBytes(6)) 1257 copy(m.BSmac[:], buf.DecodeBytes(6)) 1258 m.BVlanid = buf.DecodeUint16() 1259 m.ISid = buf.DecodeUint32() 1260 m.InterfaceName = buf.DecodeString(64) 1261 m.InterfaceDevType = buf.DecodeString(64) 1262 m.Tag = buf.DecodeString(64) 1263 return nil 1264 } 1265 1266 // SwInterfaceDump defines message 'sw_interface_dump'. 1267 type SwInterfaceDump struct { 1268 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` 1269 NameFilterValid bool `binapi:"bool,name=name_filter_valid" json:"name_filter_valid,omitempty"` 1270 NameFilter string `binapi:"string[],name=name_filter" json:"name_filter,omitempty"` 1271 } 1272 1273 func (m *SwInterfaceDump) Reset() { *m = SwInterfaceDump{} } 1274 func (*SwInterfaceDump) GetMessageName() string { return "sw_interface_dump" } 1275 func (*SwInterfaceDump) GetCrcString() string { return "aa610c27" } 1276 func (*SwInterfaceDump) GetMessageType() api.MessageType { 1277 return api.RequestMessage 1278 } 1279 1280 func (m *SwInterfaceDump) Size() (size int) { 1281 if m == nil { 1282 return 0 1283 } 1284 size += 4 // m.SwIfIndex 1285 size += 1 // m.NameFilterValid 1286 size += 4 + len(m.NameFilter) // m.NameFilter 1287 return size 1288 } 1289 func (m *SwInterfaceDump) Marshal(b []byte) ([]byte, error) { 1290 if b == nil { 1291 b = make([]byte, m.Size()) 1292 } 1293 buf := codec.NewBuffer(b) 1294 buf.EncodeUint32(uint32(m.SwIfIndex)) 1295 buf.EncodeBool(m.NameFilterValid) 1296 buf.EncodeString(m.NameFilter, 0) 1297 return buf.Bytes(), nil 1298 } 1299 func (m *SwInterfaceDump) Unmarshal(b []byte) error { 1300 buf := codec.NewBuffer(b) 1301 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1302 m.NameFilterValid = buf.DecodeBool() 1303 m.NameFilter = buf.DecodeString(0) 1304 return nil 1305 } 1306 1307 // SwInterfaceEvent defines message 'sw_interface_event'. 1308 type SwInterfaceEvent struct { 1309 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` 1310 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1311 Flags interface_types.IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"` 1312 Deleted bool `binapi:"bool,name=deleted" json:"deleted,omitempty"` 1313 } 1314 1315 func (m *SwInterfaceEvent) Reset() { *m = SwInterfaceEvent{} } 1316 func (*SwInterfaceEvent) GetMessageName() string { return "sw_interface_event" } 1317 func (*SwInterfaceEvent) GetCrcString() string { return "2d3d95a7" } 1318 func (*SwInterfaceEvent) GetMessageType() api.MessageType { 1319 return api.EventMessage 1320 } 1321 1322 func (m *SwInterfaceEvent) Size() (size int) { 1323 if m == nil { 1324 return 0 1325 } 1326 size += 4 // m.PID 1327 size += 4 // m.SwIfIndex 1328 size += 4 // m.Flags 1329 size += 1 // m.Deleted 1330 return size 1331 } 1332 func (m *SwInterfaceEvent) Marshal(b []byte) ([]byte, error) { 1333 if b == nil { 1334 b = make([]byte, m.Size()) 1335 } 1336 buf := codec.NewBuffer(b) 1337 buf.EncodeUint32(m.PID) 1338 buf.EncodeUint32(uint32(m.SwIfIndex)) 1339 buf.EncodeUint32(uint32(m.Flags)) 1340 buf.EncodeBool(m.Deleted) 1341 return buf.Bytes(), nil 1342 } 1343 func (m *SwInterfaceEvent) Unmarshal(b []byte) error { 1344 buf := codec.NewBuffer(b) 1345 m.PID = buf.DecodeUint32() 1346 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1347 m.Flags = interface_types.IfStatusFlags(buf.DecodeUint32()) 1348 m.Deleted = buf.DecodeBool() 1349 return nil 1350 } 1351 1352 // SwInterfaceGetMacAddress defines message 'sw_interface_get_mac_address'. 1353 type SwInterfaceGetMacAddress struct { 1354 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1355 } 1356 1357 func (m *SwInterfaceGetMacAddress) Reset() { *m = SwInterfaceGetMacAddress{} } 1358 func (*SwInterfaceGetMacAddress) GetMessageName() string { return "sw_interface_get_mac_address" } 1359 func (*SwInterfaceGetMacAddress) GetCrcString() string { return "f9e6675e" } 1360 func (*SwInterfaceGetMacAddress) GetMessageType() api.MessageType { 1361 return api.RequestMessage 1362 } 1363 1364 func (m *SwInterfaceGetMacAddress) Size() (size int) { 1365 if m == nil { 1366 return 0 1367 } 1368 size += 4 // m.SwIfIndex 1369 return size 1370 } 1371 func (m *SwInterfaceGetMacAddress) Marshal(b []byte) ([]byte, error) { 1372 if b == nil { 1373 b = make([]byte, m.Size()) 1374 } 1375 buf := codec.NewBuffer(b) 1376 buf.EncodeUint32(uint32(m.SwIfIndex)) 1377 return buf.Bytes(), nil 1378 } 1379 func (m *SwInterfaceGetMacAddress) Unmarshal(b []byte) error { 1380 buf := codec.NewBuffer(b) 1381 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1382 return nil 1383 } 1384 1385 // SwInterfaceGetMacAddressReply defines message 'sw_interface_get_mac_address_reply'. 1386 type SwInterfaceGetMacAddressReply struct { 1387 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1388 MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"` 1389 } 1390 1391 func (m *SwInterfaceGetMacAddressReply) Reset() { *m = SwInterfaceGetMacAddressReply{} } 1392 func (*SwInterfaceGetMacAddressReply) GetMessageName() string { 1393 return "sw_interface_get_mac_address_reply" 1394 } 1395 func (*SwInterfaceGetMacAddressReply) GetCrcString() string { return "40ef2c08" } 1396 func (*SwInterfaceGetMacAddressReply) GetMessageType() api.MessageType { 1397 return api.ReplyMessage 1398 } 1399 1400 func (m *SwInterfaceGetMacAddressReply) Size() (size int) { 1401 if m == nil { 1402 return 0 1403 } 1404 size += 4 // m.Retval 1405 size += 1 * 6 // m.MacAddress 1406 return size 1407 } 1408 func (m *SwInterfaceGetMacAddressReply) Marshal(b []byte) ([]byte, error) { 1409 if b == nil { 1410 b = make([]byte, m.Size()) 1411 } 1412 buf := codec.NewBuffer(b) 1413 buf.EncodeInt32(m.Retval) 1414 buf.EncodeBytes(m.MacAddress[:], 6) 1415 return buf.Bytes(), nil 1416 } 1417 func (m *SwInterfaceGetMacAddressReply) Unmarshal(b []byte) error { 1418 buf := codec.NewBuffer(b) 1419 m.Retval = buf.DecodeInt32() 1420 copy(m.MacAddress[:], buf.DecodeBytes(6)) 1421 return nil 1422 } 1423 1424 // SwInterfaceGetTable defines message 'sw_interface_get_table'. 1425 type SwInterfaceGetTable struct { 1426 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1427 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 1428 } 1429 1430 func (m *SwInterfaceGetTable) Reset() { *m = SwInterfaceGetTable{} } 1431 func (*SwInterfaceGetTable) GetMessageName() string { return "sw_interface_get_table" } 1432 func (*SwInterfaceGetTable) GetCrcString() string { return "2d033de4" } 1433 func (*SwInterfaceGetTable) GetMessageType() api.MessageType { 1434 return api.RequestMessage 1435 } 1436 1437 func (m *SwInterfaceGetTable) Size() (size int) { 1438 if m == nil { 1439 return 0 1440 } 1441 size += 4 // m.SwIfIndex 1442 size += 1 // m.IsIPv6 1443 return size 1444 } 1445 func (m *SwInterfaceGetTable) Marshal(b []byte) ([]byte, error) { 1446 if b == nil { 1447 b = make([]byte, m.Size()) 1448 } 1449 buf := codec.NewBuffer(b) 1450 buf.EncodeUint32(uint32(m.SwIfIndex)) 1451 buf.EncodeBool(m.IsIPv6) 1452 return buf.Bytes(), nil 1453 } 1454 func (m *SwInterfaceGetTable) Unmarshal(b []byte) error { 1455 buf := codec.NewBuffer(b) 1456 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1457 m.IsIPv6 = buf.DecodeBool() 1458 return nil 1459 } 1460 1461 // SwInterfaceGetTableReply defines message 'sw_interface_get_table_reply'. 1462 type SwInterfaceGetTableReply struct { 1463 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1464 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 1465 } 1466 1467 func (m *SwInterfaceGetTableReply) Reset() { *m = SwInterfaceGetTableReply{} } 1468 func (*SwInterfaceGetTableReply) GetMessageName() string { return "sw_interface_get_table_reply" } 1469 func (*SwInterfaceGetTableReply) GetCrcString() string { return "a6eb0109" } 1470 func (*SwInterfaceGetTableReply) GetMessageType() api.MessageType { 1471 return api.ReplyMessage 1472 } 1473 1474 func (m *SwInterfaceGetTableReply) Size() (size int) { 1475 if m == nil { 1476 return 0 1477 } 1478 size += 4 // m.Retval 1479 size += 4 // m.VrfID 1480 return size 1481 } 1482 func (m *SwInterfaceGetTableReply) Marshal(b []byte) ([]byte, error) { 1483 if b == nil { 1484 b = make([]byte, m.Size()) 1485 } 1486 buf := codec.NewBuffer(b) 1487 buf.EncodeInt32(m.Retval) 1488 buf.EncodeUint32(m.VrfID) 1489 return buf.Bytes(), nil 1490 } 1491 func (m *SwInterfaceGetTableReply) Unmarshal(b []byte) error { 1492 buf := codec.NewBuffer(b) 1493 m.Retval = buf.DecodeInt32() 1494 m.VrfID = buf.DecodeUint32() 1495 return nil 1496 } 1497 1498 // SwInterfaceRxPlacementDetails defines message 'sw_interface_rx_placement_details'. 1499 type SwInterfaceRxPlacementDetails struct { 1500 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1501 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"` 1502 WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"` 1503 Mode interface_types.RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"` 1504 } 1505 1506 func (m *SwInterfaceRxPlacementDetails) Reset() { *m = SwInterfaceRxPlacementDetails{} } 1507 func (*SwInterfaceRxPlacementDetails) GetMessageName() string { 1508 return "sw_interface_rx_placement_details" 1509 } 1510 func (*SwInterfaceRxPlacementDetails) GetCrcString() string { return "9e44a7ce" } 1511 func (*SwInterfaceRxPlacementDetails) GetMessageType() api.MessageType { 1512 return api.RequestMessage 1513 } 1514 1515 func (m *SwInterfaceRxPlacementDetails) Size() (size int) { 1516 if m == nil { 1517 return 0 1518 } 1519 size += 4 // m.SwIfIndex 1520 size += 4 // m.QueueID 1521 size += 4 // m.WorkerID 1522 size += 4 // m.Mode 1523 return size 1524 } 1525 func (m *SwInterfaceRxPlacementDetails) Marshal(b []byte) ([]byte, error) { 1526 if b == nil { 1527 b = make([]byte, m.Size()) 1528 } 1529 buf := codec.NewBuffer(b) 1530 buf.EncodeUint32(uint32(m.SwIfIndex)) 1531 buf.EncodeUint32(m.QueueID) 1532 buf.EncodeUint32(m.WorkerID) 1533 buf.EncodeUint32(uint32(m.Mode)) 1534 return buf.Bytes(), nil 1535 } 1536 func (m *SwInterfaceRxPlacementDetails) Unmarshal(b []byte) error { 1537 buf := codec.NewBuffer(b) 1538 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1539 m.QueueID = buf.DecodeUint32() 1540 m.WorkerID = buf.DecodeUint32() 1541 m.Mode = interface_types.RxMode(buf.DecodeUint32()) 1542 return nil 1543 } 1544 1545 // SwInterfaceRxPlacementDump defines message 'sw_interface_rx_placement_dump'. 1546 type SwInterfaceRxPlacementDump struct { 1547 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1548 } 1549 1550 func (m *SwInterfaceRxPlacementDump) Reset() { *m = SwInterfaceRxPlacementDump{} } 1551 func (*SwInterfaceRxPlacementDump) GetMessageName() string { return "sw_interface_rx_placement_dump" } 1552 func (*SwInterfaceRxPlacementDump) GetCrcString() string { return "f9e6675e" } 1553 func (*SwInterfaceRxPlacementDump) GetMessageType() api.MessageType { 1554 return api.RequestMessage 1555 } 1556 1557 func (m *SwInterfaceRxPlacementDump) Size() (size int) { 1558 if m == nil { 1559 return 0 1560 } 1561 size += 4 // m.SwIfIndex 1562 return size 1563 } 1564 func (m *SwInterfaceRxPlacementDump) Marshal(b []byte) ([]byte, error) { 1565 if b == nil { 1566 b = make([]byte, m.Size()) 1567 } 1568 buf := codec.NewBuffer(b) 1569 buf.EncodeUint32(uint32(m.SwIfIndex)) 1570 return buf.Bytes(), nil 1571 } 1572 func (m *SwInterfaceRxPlacementDump) Unmarshal(b []byte) error { 1573 buf := codec.NewBuffer(b) 1574 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1575 return nil 1576 } 1577 1578 // SwInterfaceSetFlags defines message 'sw_interface_set_flags'. 1579 type SwInterfaceSetFlags struct { 1580 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1581 Flags interface_types.IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"` 1582 } 1583 1584 func (m *SwInterfaceSetFlags) Reset() { *m = SwInterfaceSetFlags{} } 1585 func (*SwInterfaceSetFlags) GetMessageName() string { return "sw_interface_set_flags" } 1586 func (*SwInterfaceSetFlags) GetCrcString() string { return "f5aec1b8" } 1587 func (*SwInterfaceSetFlags) GetMessageType() api.MessageType { 1588 return api.RequestMessage 1589 } 1590 1591 func (m *SwInterfaceSetFlags) Size() (size int) { 1592 if m == nil { 1593 return 0 1594 } 1595 size += 4 // m.SwIfIndex 1596 size += 4 // m.Flags 1597 return size 1598 } 1599 func (m *SwInterfaceSetFlags) Marshal(b []byte) ([]byte, error) { 1600 if b == nil { 1601 b = make([]byte, m.Size()) 1602 } 1603 buf := codec.NewBuffer(b) 1604 buf.EncodeUint32(uint32(m.SwIfIndex)) 1605 buf.EncodeUint32(uint32(m.Flags)) 1606 return buf.Bytes(), nil 1607 } 1608 func (m *SwInterfaceSetFlags) Unmarshal(b []byte) error { 1609 buf := codec.NewBuffer(b) 1610 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1611 m.Flags = interface_types.IfStatusFlags(buf.DecodeUint32()) 1612 return nil 1613 } 1614 1615 // SwInterfaceSetFlagsReply defines message 'sw_interface_set_flags_reply'. 1616 type SwInterfaceSetFlagsReply struct { 1617 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1618 } 1619 1620 func (m *SwInterfaceSetFlagsReply) Reset() { *m = SwInterfaceSetFlagsReply{} } 1621 func (*SwInterfaceSetFlagsReply) GetMessageName() string { return "sw_interface_set_flags_reply" } 1622 func (*SwInterfaceSetFlagsReply) GetCrcString() string { return "e8d4e804" } 1623 func (*SwInterfaceSetFlagsReply) GetMessageType() api.MessageType { 1624 return api.ReplyMessage 1625 } 1626 1627 func (m *SwInterfaceSetFlagsReply) Size() (size int) { 1628 if m == nil { 1629 return 0 1630 } 1631 size += 4 // m.Retval 1632 return size 1633 } 1634 func (m *SwInterfaceSetFlagsReply) Marshal(b []byte) ([]byte, error) { 1635 if b == nil { 1636 b = make([]byte, m.Size()) 1637 } 1638 buf := codec.NewBuffer(b) 1639 buf.EncodeInt32(m.Retval) 1640 return buf.Bytes(), nil 1641 } 1642 func (m *SwInterfaceSetFlagsReply) Unmarshal(b []byte) error { 1643 buf := codec.NewBuffer(b) 1644 m.Retval = buf.DecodeInt32() 1645 return nil 1646 } 1647 1648 // SwInterfaceSetInterfaceName defines message 'sw_interface_set_interface_name'. 1649 type SwInterfaceSetInterfaceName struct { 1650 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1651 Name string `binapi:"string[64],name=name" json:"name,omitempty"` 1652 } 1653 1654 func (m *SwInterfaceSetInterfaceName) Reset() { *m = SwInterfaceSetInterfaceName{} } 1655 func (*SwInterfaceSetInterfaceName) GetMessageName() string { return "sw_interface_set_interface_name" } 1656 func (*SwInterfaceSetInterfaceName) GetCrcString() string { return "45a1d548" } 1657 func (*SwInterfaceSetInterfaceName) GetMessageType() api.MessageType { 1658 return api.RequestMessage 1659 } 1660 1661 func (m *SwInterfaceSetInterfaceName) Size() (size int) { 1662 if m == nil { 1663 return 0 1664 } 1665 size += 4 // m.SwIfIndex 1666 size += 64 // m.Name 1667 return size 1668 } 1669 func (m *SwInterfaceSetInterfaceName) Marshal(b []byte) ([]byte, error) { 1670 if b == nil { 1671 b = make([]byte, m.Size()) 1672 } 1673 buf := codec.NewBuffer(b) 1674 buf.EncodeUint32(uint32(m.SwIfIndex)) 1675 buf.EncodeString(m.Name, 64) 1676 return buf.Bytes(), nil 1677 } 1678 func (m *SwInterfaceSetInterfaceName) Unmarshal(b []byte) error { 1679 buf := codec.NewBuffer(b) 1680 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1681 m.Name = buf.DecodeString(64) 1682 return nil 1683 } 1684 1685 // SwInterfaceSetInterfaceNameReply defines message 'sw_interface_set_interface_name_reply'. 1686 type SwInterfaceSetInterfaceNameReply struct { 1687 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1688 } 1689 1690 func (m *SwInterfaceSetInterfaceNameReply) Reset() { *m = SwInterfaceSetInterfaceNameReply{} } 1691 func (*SwInterfaceSetInterfaceNameReply) GetMessageName() string { 1692 return "sw_interface_set_interface_name_reply" 1693 } 1694 func (*SwInterfaceSetInterfaceNameReply) GetCrcString() string { return "e8d4e804" } 1695 func (*SwInterfaceSetInterfaceNameReply) GetMessageType() api.MessageType { 1696 return api.ReplyMessage 1697 } 1698 1699 func (m *SwInterfaceSetInterfaceNameReply) Size() (size int) { 1700 if m == nil { 1701 return 0 1702 } 1703 size += 4 // m.Retval 1704 return size 1705 } 1706 func (m *SwInterfaceSetInterfaceNameReply) Marshal(b []byte) ([]byte, error) { 1707 if b == nil { 1708 b = make([]byte, m.Size()) 1709 } 1710 buf := codec.NewBuffer(b) 1711 buf.EncodeInt32(m.Retval) 1712 return buf.Bytes(), nil 1713 } 1714 func (m *SwInterfaceSetInterfaceNameReply) Unmarshal(b []byte) error { 1715 buf := codec.NewBuffer(b) 1716 m.Retval = buf.DecodeInt32() 1717 return nil 1718 } 1719 1720 // SwInterfaceSetIPDirectedBroadcast defines message 'sw_interface_set_ip_directed_broadcast'. 1721 type SwInterfaceSetIPDirectedBroadcast struct { 1722 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1723 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 1724 } 1725 1726 func (m *SwInterfaceSetIPDirectedBroadcast) Reset() { *m = SwInterfaceSetIPDirectedBroadcast{} } 1727 func (*SwInterfaceSetIPDirectedBroadcast) GetMessageName() string { 1728 return "sw_interface_set_ip_directed_broadcast" 1729 } 1730 func (*SwInterfaceSetIPDirectedBroadcast) GetCrcString() string { return "ae6cfcfb" } 1731 func (*SwInterfaceSetIPDirectedBroadcast) GetMessageType() api.MessageType { 1732 return api.RequestMessage 1733 } 1734 1735 func (m *SwInterfaceSetIPDirectedBroadcast) Size() (size int) { 1736 if m == nil { 1737 return 0 1738 } 1739 size += 4 // m.SwIfIndex 1740 size += 1 // m.Enable 1741 return size 1742 } 1743 func (m *SwInterfaceSetIPDirectedBroadcast) Marshal(b []byte) ([]byte, error) { 1744 if b == nil { 1745 b = make([]byte, m.Size()) 1746 } 1747 buf := codec.NewBuffer(b) 1748 buf.EncodeUint32(uint32(m.SwIfIndex)) 1749 buf.EncodeBool(m.Enable) 1750 return buf.Bytes(), nil 1751 } 1752 func (m *SwInterfaceSetIPDirectedBroadcast) Unmarshal(b []byte) error { 1753 buf := codec.NewBuffer(b) 1754 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1755 m.Enable = buf.DecodeBool() 1756 return nil 1757 } 1758 1759 // SwInterfaceSetIPDirectedBroadcastReply defines message 'sw_interface_set_ip_directed_broadcast_reply'. 1760 type SwInterfaceSetIPDirectedBroadcastReply struct { 1761 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1762 } 1763 1764 func (m *SwInterfaceSetIPDirectedBroadcastReply) Reset() { 1765 *m = SwInterfaceSetIPDirectedBroadcastReply{} 1766 } 1767 func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageName() string { 1768 return "sw_interface_set_ip_directed_broadcast_reply" 1769 } 1770 func (*SwInterfaceSetIPDirectedBroadcastReply) GetCrcString() string { return "e8d4e804" } 1771 func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageType() api.MessageType { 1772 return api.ReplyMessage 1773 } 1774 1775 func (m *SwInterfaceSetIPDirectedBroadcastReply) Size() (size int) { 1776 if m == nil { 1777 return 0 1778 } 1779 size += 4 // m.Retval 1780 return size 1781 } 1782 func (m *SwInterfaceSetIPDirectedBroadcastReply) Marshal(b []byte) ([]byte, error) { 1783 if b == nil { 1784 b = make([]byte, m.Size()) 1785 } 1786 buf := codec.NewBuffer(b) 1787 buf.EncodeInt32(m.Retval) 1788 return buf.Bytes(), nil 1789 } 1790 func (m *SwInterfaceSetIPDirectedBroadcastReply) Unmarshal(b []byte) error { 1791 buf := codec.NewBuffer(b) 1792 m.Retval = buf.DecodeInt32() 1793 return nil 1794 } 1795 1796 // SwInterfaceSetMacAddress defines message 'sw_interface_set_mac_address'. 1797 type SwInterfaceSetMacAddress struct { 1798 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1799 MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"` 1800 } 1801 1802 func (m *SwInterfaceSetMacAddress) Reset() { *m = SwInterfaceSetMacAddress{} } 1803 func (*SwInterfaceSetMacAddress) GetMessageName() string { return "sw_interface_set_mac_address" } 1804 func (*SwInterfaceSetMacAddress) GetCrcString() string { return "c536e7eb" } 1805 func (*SwInterfaceSetMacAddress) GetMessageType() api.MessageType { 1806 return api.RequestMessage 1807 } 1808 1809 func (m *SwInterfaceSetMacAddress) Size() (size int) { 1810 if m == nil { 1811 return 0 1812 } 1813 size += 4 // m.SwIfIndex 1814 size += 1 * 6 // m.MacAddress 1815 return size 1816 } 1817 func (m *SwInterfaceSetMacAddress) Marshal(b []byte) ([]byte, error) { 1818 if b == nil { 1819 b = make([]byte, m.Size()) 1820 } 1821 buf := codec.NewBuffer(b) 1822 buf.EncodeUint32(uint32(m.SwIfIndex)) 1823 buf.EncodeBytes(m.MacAddress[:], 6) 1824 return buf.Bytes(), nil 1825 } 1826 func (m *SwInterfaceSetMacAddress) Unmarshal(b []byte) error { 1827 buf := codec.NewBuffer(b) 1828 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1829 copy(m.MacAddress[:], buf.DecodeBytes(6)) 1830 return nil 1831 } 1832 1833 // SwInterfaceSetMacAddressReply defines message 'sw_interface_set_mac_address_reply'. 1834 type SwInterfaceSetMacAddressReply struct { 1835 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1836 } 1837 1838 func (m *SwInterfaceSetMacAddressReply) Reset() { *m = SwInterfaceSetMacAddressReply{} } 1839 func (*SwInterfaceSetMacAddressReply) GetMessageName() string { 1840 return "sw_interface_set_mac_address_reply" 1841 } 1842 func (*SwInterfaceSetMacAddressReply) GetCrcString() string { return "e8d4e804" } 1843 func (*SwInterfaceSetMacAddressReply) GetMessageType() api.MessageType { 1844 return api.ReplyMessage 1845 } 1846 1847 func (m *SwInterfaceSetMacAddressReply) Size() (size int) { 1848 if m == nil { 1849 return 0 1850 } 1851 size += 4 // m.Retval 1852 return size 1853 } 1854 func (m *SwInterfaceSetMacAddressReply) Marshal(b []byte) ([]byte, error) { 1855 if b == nil { 1856 b = make([]byte, m.Size()) 1857 } 1858 buf := codec.NewBuffer(b) 1859 buf.EncodeInt32(m.Retval) 1860 return buf.Bytes(), nil 1861 } 1862 func (m *SwInterfaceSetMacAddressReply) Unmarshal(b []byte) error { 1863 buf := codec.NewBuffer(b) 1864 m.Retval = buf.DecodeInt32() 1865 return nil 1866 } 1867 1868 // SwInterfaceSetMtu defines message 'sw_interface_set_mtu'. 1869 type SwInterfaceSetMtu struct { 1870 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1871 Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty"` 1872 } 1873 1874 func (m *SwInterfaceSetMtu) Reset() { *m = SwInterfaceSetMtu{} } 1875 func (*SwInterfaceSetMtu) GetMessageName() string { return "sw_interface_set_mtu" } 1876 func (*SwInterfaceSetMtu) GetCrcString() string { return "5cbe85e5" } 1877 func (*SwInterfaceSetMtu) GetMessageType() api.MessageType { 1878 return api.RequestMessage 1879 } 1880 1881 func (m *SwInterfaceSetMtu) Size() (size int) { 1882 if m == nil { 1883 return 0 1884 } 1885 size += 4 // m.SwIfIndex 1886 size += 4 * 4 // m.Mtu 1887 return size 1888 } 1889 func (m *SwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) { 1890 if b == nil { 1891 b = make([]byte, m.Size()) 1892 } 1893 buf := codec.NewBuffer(b) 1894 buf.EncodeUint32(uint32(m.SwIfIndex)) 1895 for i := 0; i < 4; i++ { 1896 var x uint32 1897 if i < len(m.Mtu) { 1898 x = uint32(m.Mtu[i]) 1899 } 1900 buf.EncodeUint32(x) 1901 } 1902 return buf.Bytes(), nil 1903 } 1904 func (m *SwInterfaceSetMtu) Unmarshal(b []byte) error { 1905 buf := codec.NewBuffer(b) 1906 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1907 m.Mtu = make([]uint32, 4) 1908 for i := 0; i < len(m.Mtu); i++ { 1909 m.Mtu[i] = buf.DecodeUint32() 1910 } 1911 return nil 1912 } 1913 1914 // SwInterfaceSetMtuReply defines message 'sw_interface_set_mtu_reply'. 1915 type SwInterfaceSetMtuReply struct { 1916 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1917 } 1918 1919 func (m *SwInterfaceSetMtuReply) Reset() { *m = SwInterfaceSetMtuReply{} } 1920 func (*SwInterfaceSetMtuReply) GetMessageName() string { return "sw_interface_set_mtu_reply" } 1921 func (*SwInterfaceSetMtuReply) GetCrcString() string { return "e8d4e804" } 1922 func (*SwInterfaceSetMtuReply) GetMessageType() api.MessageType { 1923 return api.ReplyMessage 1924 } 1925 1926 func (m *SwInterfaceSetMtuReply) Size() (size int) { 1927 if m == nil { 1928 return 0 1929 } 1930 size += 4 // m.Retval 1931 return size 1932 } 1933 func (m *SwInterfaceSetMtuReply) Marshal(b []byte) ([]byte, error) { 1934 if b == nil { 1935 b = make([]byte, m.Size()) 1936 } 1937 buf := codec.NewBuffer(b) 1938 buf.EncodeInt32(m.Retval) 1939 return buf.Bytes(), nil 1940 } 1941 func (m *SwInterfaceSetMtuReply) Unmarshal(b []byte) error { 1942 buf := codec.NewBuffer(b) 1943 m.Retval = buf.DecodeInt32() 1944 return nil 1945 } 1946 1947 // SwInterfaceSetPromisc defines message 'sw_interface_set_promisc'. 1948 type SwInterfaceSetPromisc struct { 1949 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 1950 PromiscOn bool `binapi:"bool,name=promisc_on" json:"promisc_on,omitempty"` 1951 } 1952 1953 func (m *SwInterfaceSetPromisc) Reset() { *m = SwInterfaceSetPromisc{} } 1954 func (*SwInterfaceSetPromisc) GetMessageName() string { return "sw_interface_set_promisc" } 1955 func (*SwInterfaceSetPromisc) GetCrcString() string { return "d40860d4" } 1956 func (*SwInterfaceSetPromisc) GetMessageType() api.MessageType { 1957 return api.RequestMessage 1958 } 1959 1960 func (m *SwInterfaceSetPromisc) Size() (size int) { 1961 if m == nil { 1962 return 0 1963 } 1964 size += 4 // m.SwIfIndex 1965 size += 1 // m.PromiscOn 1966 return size 1967 } 1968 func (m *SwInterfaceSetPromisc) Marshal(b []byte) ([]byte, error) { 1969 if b == nil { 1970 b = make([]byte, m.Size()) 1971 } 1972 buf := codec.NewBuffer(b) 1973 buf.EncodeUint32(uint32(m.SwIfIndex)) 1974 buf.EncodeBool(m.PromiscOn) 1975 return buf.Bytes(), nil 1976 } 1977 func (m *SwInterfaceSetPromisc) Unmarshal(b []byte) error { 1978 buf := codec.NewBuffer(b) 1979 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 1980 m.PromiscOn = buf.DecodeBool() 1981 return nil 1982 } 1983 1984 // SwInterfaceSetPromiscReply defines message 'sw_interface_set_promisc_reply'. 1985 type SwInterfaceSetPromiscReply struct { 1986 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 1987 } 1988 1989 func (m *SwInterfaceSetPromiscReply) Reset() { *m = SwInterfaceSetPromiscReply{} } 1990 func (*SwInterfaceSetPromiscReply) GetMessageName() string { return "sw_interface_set_promisc_reply" } 1991 func (*SwInterfaceSetPromiscReply) GetCrcString() string { return "e8d4e804" } 1992 func (*SwInterfaceSetPromiscReply) GetMessageType() api.MessageType { 1993 return api.ReplyMessage 1994 } 1995 1996 func (m *SwInterfaceSetPromiscReply) Size() (size int) { 1997 if m == nil { 1998 return 0 1999 } 2000 size += 4 // m.Retval 2001 return size 2002 } 2003 func (m *SwInterfaceSetPromiscReply) Marshal(b []byte) ([]byte, error) { 2004 if b == nil { 2005 b = make([]byte, m.Size()) 2006 } 2007 buf := codec.NewBuffer(b) 2008 buf.EncodeInt32(m.Retval) 2009 return buf.Bytes(), nil 2010 } 2011 func (m *SwInterfaceSetPromiscReply) Unmarshal(b []byte) error { 2012 buf := codec.NewBuffer(b) 2013 m.Retval = buf.DecodeInt32() 2014 return nil 2015 } 2016 2017 // SwInterfaceSetRxMode defines message 'sw_interface_set_rx_mode'. 2018 type SwInterfaceSetRxMode struct { 2019 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2020 QueueIDValid bool `binapi:"bool,name=queue_id_valid" json:"queue_id_valid,omitempty"` 2021 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"` 2022 Mode interface_types.RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"` 2023 } 2024 2025 func (m *SwInterfaceSetRxMode) Reset() { *m = SwInterfaceSetRxMode{} } 2026 func (*SwInterfaceSetRxMode) GetMessageName() string { return "sw_interface_set_rx_mode" } 2027 func (*SwInterfaceSetRxMode) GetCrcString() string { return "b04d1cfe" } 2028 func (*SwInterfaceSetRxMode) GetMessageType() api.MessageType { 2029 return api.RequestMessage 2030 } 2031 2032 func (m *SwInterfaceSetRxMode) Size() (size int) { 2033 if m == nil { 2034 return 0 2035 } 2036 size += 4 // m.SwIfIndex 2037 size += 1 // m.QueueIDValid 2038 size += 4 // m.QueueID 2039 size += 4 // m.Mode 2040 return size 2041 } 2042 func (m *SwInterfaceSetRxMode) Marshal(b []byte) ([]byte, error) { 2043 if b == nil { 2044 b = make([]byte, m.Size()) 2045 } 2046 buf := codec.NewBuffer(b) 2047 buf.EncodeUint32(uint32(m.SwIfIndex)) 2048 buf.EncodeBool(m.QueueIDValid) 2049 buf.EncodeUint32(m.QueueID) 2050 buf.EncodeUint32(uint32(m.Mode)) 2051 return buf.Bytes(), nil 2052 } 2053 func (m *SwInterfaceSetRxMode) Unmarshal(b []byte) error { 2054 buf := codec.NewBuffer(b) 2055 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2056 m.QueueIDValid = buf.DecodeBool() 2057 m.QueueID = buf.DecodeUint32() 2058 m.Mode = interface_types.RxMode(buf.DecodeUint32()) 2059 return nil 2060 } 2061 2062 // SwInterfaceSetRxModeReply defines message 'sw_interface_set_rx_mode_reply'. 2063 type SwInterfaceSetRxModeReply struct { 2064 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2065 } 2066 2067 func (m *SwInterfaceSetRxModeReply) Reset() { *m = SwInterfaceSetRxModeReply{} } 2068 func (*SwInterfaceSetRxModeReply) GetMessageName() string { return "sw_interface_set_rx_mode_reply" } 2069 func (*SwInterfaceSetRxModeReply) GetCrcString() string { return "e8d4e804" } 2070 func (*SwInterfaceSetRxModeReply) GetMessageType() api.MessageType { 2071 return api.ReplyMessage 2072 } 2073 2074 func (m *SwInterfaceSetRxModeReply) Size() (size int) { 2075 if m == nil { 2076 return 0 2077 } 2078 size += 4 // m.Retval 2079 return size 2080 } 2081 func (m *SwInterfaceSetRxModeReply) Marshal(b []byte) ([]byte, error) { 2082 if b == nil { 2083 b = make([]byte, m.Size()) 2084 } 2085 buf := codec.NewBuffer(b) 2086 buf.EncodeInt32(m.Retval) 2087 return buf.Bytes(), nil 2088 } 2089 func (m *SwInterfaceSetRxModeReply) Unmarshal(b []byte) error { 2090 buf := codec.NewBuffer(b) 2091 m.Retval = buf.DecodeInt32() 2092 return nil 2093 } 2094 2095 // SwInterfaceSetRxPlacement defines message 'sw_interface_set_rx_placement'. 2096 type SwInterfaceSetRxPlacement struct { 2097 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2098 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"` 2099 WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"` 2100 IsMain bool `binapi:"bool,name=is_main" json:"is_main,omitempty"` 2101 } 2102 2103 func (m *SwInterfaceSetRxPlacement) Reset() { *m = SwInterfaceSetRxPlacement{} } 2104 func (*SwInterfaceSetRxPlacement) GetMessageName() string { return "sw_interface_set_rx_placement" } 2105 func (*SwInterfaceSetRxPlacement) GetCrcString() string { return "db65f3c9" } 2106 func (*SwInterfaceSetRxPlacement) GetMessageType() api.MessageType { 2107 return api.RequestMessage 2108 } 2109 2110 func (m *SwInterfaceSetRxPlacement) Size() (size int) { 2111 if m == nil { 2112 return 0 2113 } 2114 size += 4 // m.SwIfIndex 2115 size += 4 // m.QueueID 2116 size += 4 // m.WorkerID 2117 size += 1 // m.IsMain 2118 return size 2119 } 2120 func (m *SwInterfaceSetRxPlacement) Marshal(b []byte) ([]byte, error) { 2121 if b == nil { 2122 b = make([]byte, m.Size()) 2123 } 2124 buf := codec.NewBuffer(b) 2125 buf.EncodeUint32(uint32(m.SwIfIndex)) 2126 buf.EncodeUint32(m.QueueID) 2127 buf.EncodeUint32(m.WorkerID) 2128 buf.EncodeBool(m.IsMain) 2129 return buf.Bytes(), nil 2130 } 2131 func (m *SwInterfaceSetRxPlacement) Unmarshal(b []byte) error { 2132 buf := codec.NewBuffer(b) 2133 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2134 m.QueueID = buf.DecodeUint32() 2135 m.WorkerID = buf.DecodeUint32() 2136 m.IsMain = buf.DecodeBool() 2137 return nil 2138 } 2139 2140 // SwInterfaceSetRxPlacementReply defines message 'sw_interface_set_rx_placement_reply'. 2141 type SwInterfaceSetRxPlacementReply struct { 2142 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2143 } 2144 2145 func (m *SwInterfaceSetRxPlacementReply) Reset() { *m = SwInterfaceSetRxPlacementReply{} } 2146 func (*SwInterfaceSetRxPlacementReply) GetMessageName() string { 2147 return "sw_interface_set_rx_placement_reply" 2148 } 2149 func (*SwInterfaceSetRxPlacementReply) GetCrcString() string { return "e8d4e804" } 2150 func (*SwInterfaceSetRxPlacementReply) GetMessageType() api.MessageType { 2151 return api.ReplyMessage 2152 } 2153 2154 func (m *SwInterfaceSetRxPlacementReply) Size() (size int) { 2155 if m == nil { 2156 return 0 2157 } 2158 size += 4 // m.Retval 2159 return size 2160 } 2161 func (m *SwInterfaceSetRxPlacementReply) Marshal(b []byte) ([]byte, error) { 2162 if b == nil { 2163 b = make([]byte, m.Size()) 2164 } 2165 buf := codec.NewBuffer(b) 2166 buf.EncodeInt32(m.Retval) 2167 return buf.Bytes(), nil 2168 } 2169 func (m *SwInterfaceSetRxPlacementReply) Unmarshal(b []byte) error { 2170 buf := codec.NewBuffer(b) 2171 m.Retval = buf.DecodeInt32() 2172 return nil 2173 } 2174 2175 // SwInterfaceSetTable defines message 'sw_interface_set_table'. 2176 type SwInterfaceSetTable struct { 2177 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2178 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` 2179 VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` 2180 } 2181 2182 func (m *SwInterfaceSetTable) Reset() { *m = SwInterfaceSetTable{} } 2183 func (*SwInterfaceSetTable) GetMessageName() string { return "sw_interface_set_table" } 2184 func (*SwInterfaceSetTable) GetCrcString() string { return "df42a577" } 2185 func (*SwInterfaceSetTable) GetMessageType() api.MessageType { 2186 return api.RequestMessage 2187 } 2188 2189 func (m *SwInterfaceSetTable) Size() (size int) { 2190 if m == nil { 2191 return 0 2192 } 2193 size += 4 // m.SwIfIndex 2194 size += 1 // m.IsIPv6 2195 size += 4 // m.VrfID 2196 return size 2197 } 2198 func (m *SwInterfaceSetTable) Marshal(b []byte) ([]byte, error) { 2199 if b == nil { 2200 b = make([]byte, m.Size()) 2201 } 2202 buf := codec.NewBuffer(b) 2203 buf.EncodeUint32(uint32(m.SwIfIndex)) 2204 buf.EncodeBool(m.IsIPv6) 2205 buf.EncodeUint32(m.VrfID) 2206 return buf.Bytes(), nil 2207 } 2208 func (m *SwInterfaceSetTable) Unmarshal(b []byte) error { 2209 buf := codec.NewBuffer(b) 2210 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2211 m.IsIPv6 = buf.DecodeBool() 2212 m.VrfID = buf.DecodeUint32() 2213 return nil 2214 } 2215 2216 // SwInterfaceSetTableReply defines message 'sw_interface_set_table_reply'. 2217 type SwInterfaceSetTableReply struct { 2218 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2219 } 2220 2221 func (m *SwInterfaceSetTableReply) Reset() { *m = SwInterfaceSetTableReply{} } 2222 func (*SwInterfaceSetTableReply) GetMessageName() string { return "sw_interface_set_table_reply" } 2223 func (*SwInterfaceSetTableReply) GetCrcString() string { return "e8d4e804" } 2224 func (*SwInterfaceSetTableReply) GetMessageType() api.MessageType { 2225 return api.ReplyMessage 2226 } 2227 2228 func (m *SwInterfaceSetTableReply) Size() (size int) { 2229 if m == nil { 2230 return 0 2231 } 2232 size += 4 // m.Retval 2233 return size 2234 } 2235 func (m *SwInterfaceSetTableReply) Marshal(b []byte) ([]byte, error) { 2236 if b == nil { 2237 b = make([]byte, m.Size()) 2238 } 2239 buf := codec.NewBuffer(b) 2240 buf.EncodeInt32(m.Retval) 2241 return buf.Bytes(), nil 2242 } 2243 func (m *SwInterfaceSetTableReply) Unmarshal(b []byte) error { 2244 buf := codec.NewBuffer(b) 2245 m.Retval = buf.DecodeInt32() 2246 return nil 2247 } 2248 2249 // SwInterfaceSetTxPlacement defines message 'sw_interface_set_tx_placement'. 2250 type SwInterfaceSetTxPlacement struct { 2251 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2252 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"` 2253 ArraySize uint32 `binapi:"u32,name=array_size" json:"-"` 2254 Threads []uint32 `binapi:"u32[array_size],name=threads" json:"threads,omitempty"` 2255 } 2256 2257 func (m *SwInterfaceSetTxPlacement) Reset() { *m = SwInterfaceSetTxPlacement{} } 2258 func (*SwInterfaceSetTxPlacement) GetMessageName() string { return "sw_interface_set_tx_placement" } 2259 func (*SwInterfaceSetTxPlacement) GetCrcString() string { return "4e0cd5ff" } 2260 func (*SwInterfaceSetTxPlacement) GetMessageType() api.MessageType { 2261 return api.RequestMessage 2262 } 2263 2264 func (m *SwInterfaceSetTxPlacement) Size() (size int) { 2265 if m == nil { 2266 return 0 2267 } 2268 size += 4 // m.SwIfIndex 2269 size += 4 // m.QueueID 2270 size += 4 // m.ArraySize 2271 size += 4 * len(m.Threads) // m.Threads 2272 return size 2273 } 2274 func (m *SwInterfaceSetTxPlacement) Marshal(b []byte) ([]byte, error) { 2275 if b == nil { 2276 b = make([]byte, m.Size()) 2277 } 2278 buf := codec.NewBuffer(b) 2279 buf.EncodeUint32(uint32(m.SwIfIndex)) 2280 buf.EncodeUint32(m.QueueID) 2281 buf.EncodeUint32(uint32(len(m.Threads))) 2282 for i := 0; i < len(m.Threads); i++ { 2283 var x uint32 2284 if i < len(m.Threads) { 2285 x = uint32(m.Threads[i]) 2286 } 2287 buf.EncodeUint32(x) 2288 } 2289 return buf.Bytes(), nil 2290 } 2291 func (m *SwInterfaceSetTxPlacement) Unmarshal(b []byte) error { 2292 buf := codec.NewBuffer(b) 2293 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2294 m.QueueID = buf.DecodeUint32() 2295 m.ArraySize = buf.DecodeUint32() 2296 m.Threads = make([]uint32, m.ArraySize) 2297 for i := 0; i < len(m.Threads); i++ { 2298 m.Threads[i] = buf.DecodeUint32() 2299 } 2300 return nil 2301 } 2302 2303 // SwInterfaceSetTxPlacementReply defines message 'sw_interface_set_tx_placement_reply'. 2304 type SwInterfaceSetTxPlacementReply struct { 2305 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2306 } 2307 2308 func (m *SwInterfaceSetTxPlacementReply) Reset() { *m = SwInterfaceSetTxPlacementReply{} } 2309 func (*SwInterfaceSetTxPlacementReply) GetMessageName() string { 2310 return "sw_interface_set_tx_placement_reply" 2311 } 2312 func (*SwInterfaceSetTxPlacementReply) GetCrcString() string { return "e8d4e804" } 2313 func (*SwInterfaceSetTxPlacementReply) GetMessageType() api.MessageType { 2314 return api.ReplyMessage 2315 } 2316 2317 func (m *SwInterfaceSetTxPlacementReply) Size() (size int) { 2318 if m == nil { 2319 return 0 2320 } 2321 size += 4 // m.Retval 2322 return size 2323 } 2324 func (m *SwInterfaceSetTxPlacementReply) Marshal(b []byte) ([]byte, error) { 2325 if b == nil { 2326 b = make([]byte, m.Size()) 2327 } 2328 buf := codec.NewBuffer(b) 2329 buf.EncodeInt32(m.Retval) 2330 return buf.Bytes(), nil 2331 } 2332 func (m *SwInterfaceSetTxPlacementReply) Unmarshal(b []byte) error { 2333 buf := codec.NewBuffer(b) 2334 m.Retval = buf.DecodeInt32() 2335 return nil 2336 } 2337 2338 // SwInterfaceSetUnnumbered defines message 'sw_interface_set_unnumbered'. 2339 type SwInterfaceSetUnnumbered struct { 2340 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2341 UnnumberedSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=unnumbered_sw_if_index" json:"unnumbered_sw_if_index,omitempty"` 2342 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 2343 } 2344 2345 func (m *SwInterfaceSetUnnumbered) Reset() { *m = SwInterfaceSetUnnumbered{} } 2346 func (*SwInterfaceSetUnnumbered) GetMessageName() string { return "sw_interface_set_unnumbered" } 2347 func (*SwInterfaceSetUnnumbered) GetCrcString() string { return "154a6439" } 2348 func (*SwInterfaceSetUnnumbered) GetMessageType() api.MessageType { 2349 return api.RequestMessage 2350 } 2351 2352 func (m *SwInterfaceSetUnnumbered) Size() (size int) { 2353 if m == nil { 2354 return 0 2355 } 2356 size += 4 // m.SwIfIndex 2357 size += 4 // m.UnnumberedSwIfIndex 2358 size += 1 // m.IsAdd 2359 return size 2360 } 2361 func (m *SwInterfaceSetUnnumbered) Marshal(b []byte) ([]byte, error) { 2362 if b == nil { 2363 b = make([]byte, m.Size()) 2364 } 2365 buf := codec.NewBuffer(b) 2366 buf.EncodeUint32(uint32(m.SwIfIndex)) 2367 buf.EncodeUint32(uint32(m.UnnumberedSwIfIndex)) 2368 buf.EncodeBool(m.IsAdd) 2369 return buf.Bytes(), nil 2370 } 2371 func (m *SwInterfaceSetUnnumbered) Unmarshal(b []byte) error { 2372 buf := codec.NewBuffer(b) 2373 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2374 m.UnnumberedSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2375 m.IsAdd = buf.DecodeBool() 2376 return nil 2377 } 2378 2379 // SwInterfaceSetUnnumberedReply defines message 'sw_interface_set_unnumbered_reply'. 2380 type SwInterfaceSetUnnumberedReply struct { 2381 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2382 } 2383 2384 func (m *SwInterfaceSetUnnumberedReply) Reset() { *m = SwInterfaceSetUnnumberedReply{} } 2385 func (*SwInterfaceSetUnnumberedReply) GetMessageName() string { 2386 return "sw_interface_set_unnumbered_reply" 2387 } 2388 func (*SwInterfaceSetUnnumberedReply) GetCrcString() string { return "e8d4e804" } 2389 func (*SwInterfaceSetUnnumberedReply) GetMessageType() api.MessageType { 2390 return api.ReplyMessage 2391 } 2392 2393 func (m *SwInterfaceSetUnnumberedReply) Size() (size int) { 2394 if m == nil { 2395 return 0 2396 } 2397 size += 4 // m.Retval 2398 return size 2399 } 2400 func (m *SwInterfaceSetUnnumberedReply) Marshal(b []byte) ([]byte, error) { 2401 if b == nil { 2402 b = make([]byte, m.Size()) 2403 } 2404 buf := codec.NewBuffer(b) 2405 buf.EncodeInt32(m.Retval) 2406 return buf.Bytes(), nil 2407 } 2408 func (m *SwInterfaceSetUnnumberedReply) Unmarshal(b []byte) error { 2409 buf := codec.NewBuffer(b) 2410 m.Retval = buf.DecodeInt32() 2411 return nil 2412 } 2413 2414 // SwInterfaceTagAddDel defines message 'sw_interface_tag_add_del'. 2415 type SwInterfaceTagAddDel struct { 2416 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` 2417 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2418 Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` 2419 } 2420 2421 func (m *SwInterfaceTagAddDel) Reset() { *m = SwInterfaceTagAddDel{} } 2422 func (*SwInterfaceTagAddDel) GetMessageName() string { return "sw_interface_tag_add_del" } 2423 func (*SwInterfaceTagAddDel) GetCrcString() string { return "426f8bc1" } 2424 func (*SwInterfaceTagAddDel) GetMessageType() api.MessageType { 2425 return api.RequestMessage 2426 } 2427 2428 func (m *SwInterfaceTagAddDel) Size() (size int) { 2429 if m == nil { 2430 return 0 2431 } 2432 size += 1 // m.IsAdd 2433 size += 4 // m.SwIfIndex 2434 size += 64 // m.Tag 2435 return size 2436 } 2437 func (m *SwInterfaceTagAddDel) Marshal(b []byte) ([]byte, error) { 2438 if b == nil { 2439 b = make([]byte, m.Size()) 2440 } 2441 buf := codec.NewBuffer(b) 2442 buf.EncodeBool(m.IsAdd) 2443 buf.EncodeUint32(uint32(m.SwIfIndex)) 2444 buf.EncodeString(m.Tag, 64) 2445 return buf.Bytes(), nil 2446 } 2447 func (m *SwInterfaceTagAddDel) Unmarshal(b []byte) error { 2448 buf := codec.NewBuffer(b) 2449 m.IsAdd = buf.DecodeBool() 2450 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2451 m.Tag = buf.DecodeString(64) 2452 return nil 2453 } 2454 2455 // SwInterfaceTagAddDelReply defines message 'sw_interface_tag_add_del_reply'. 2456 type SwInterfaceTagAddDelReply struct { 2457 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2458 } 2459 2460 func (m *SwInterfaceTagAddDelReply) Reset() { *m = SwInterfaceTagAddDelReply{} } 2461 func (*SwInterfaceTagAddDelReply) GetMessageName() string { return "sw_interface_tag_add_del_reply" } 2462 func (*SwInterfaceTagAddDelReply) GetCrcString() string { return "e8d4e804" } 2463 func (*SwInterfaceTagAddDelReply) GetMessageType() api.MessageType { 2464 return api.ReplyMessage 2465 } 2466 2467 func (m *SwInterfaceTagAddDelReply) Size() (size int) { 2468 if m == nil { 2469 return 0 2470 } 2471 size += 4 // m.Retval 2472 return size 2473 } 2474 func (m *SwInterfaceTagAddDelReply) Marshal(b []byte) ([]byte, error) { 2475 if b == nil { 2476 b = make([]byte, m.Size()) 2477 } 2478 buf := codec.NewBuffer(b) 2479 buf.EncodeInt32(m.Retval) 2480 return buf.Bytes(), nil 2481 } 2482 func (m *SwInterfaceTagAddDelReply) Unmarshal(b []byte) error { 2483 buf := codec.NewBuffer(b) 2484 m.Retval = buf.DecodeInt32() 2485 return nil 2486 } 2487 2488 // SwInterfaceTxPlacementDetails defines message 'sw_interface_tx_placement_details'. 2489 type SwInterfaceTxPlacementDetails struct { 2490 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2491 QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"` 2492 Shared uint8 `binapi:"u8,name=shared" json:"shared,omitempty"` 2493 ArraySize uint32 `binapi:"u32,name=array_size" json:"-"` 2494 Threads []uint32 `binapi:"u32[array_size],name=threads" json:"threads,omitempty"` 2495 } 2496 2497 func (m *SwInterfaceTxPlacementDetails) Reset() { *m = SwInterfaceTxPlacementDetails{} } 2498 func (*SwInterfaceTxPlacementDetails) GetMessageName() string { 2499 return "sw_interface_tx_placement_details" 2500 } 2501 func (*SwInterfaceTxPlacementDetails) GetCrcString() string { return "00381a2e" } 2502 func (*SwInterfaceTxPlacementDetails) GetMessageType() api.MessageType { 2503 return api.RequestMessage 2504 } 2505 2506 func (m *SwInterfaceTxPlacementDetails) Size() (size int) { 2507 if m == nil { 2508 return 0 2509 } 2510 size += 4 // m.SwIfIndex 2511 size += 4 // m.QueueID 2512 size += 1 // m.Shared 2513 size += 4 // m.ArraySize 2514 size += 4 * len(m.Threads) // m.Threads 2515 return size 2516 } 2517 func (m *SwInterfaceTxPlacementDetails) Marshal(b []byte) ([]byte, error) { 2518 if b == nil { 2519 b = make([]byte, m.Size()) 2520 } 2521 buf := codec.NewBuffer(b) 2522 buf.EncodeUint32(uint32(m.SwIfIndex)) 2523 buf.EncodeUint32(m.QueueID) 2524 buf.EncodeUint8(m.Shared) 2525 buf.EncodeUint32(uint32(len(m.Threads))) 2526 for i := 0; i < len(m.Threads); i++ { 2527 var x uint32 2528 if i < len(m.Threads) { 2529 x = uint32(m.Threads[i]) 2530 } 2531 buf.EncodeUint32(x) 2532 } 2533 return buf.Bytes(), nil 2534 } 2535 func (m *SwInterfaceTxPlacementDetails) Unmarshal(b []byte) error { 2536 buf := codec.NewBuffer(b) 2537 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2538 m.QueueID = buf.DecodeUint32() 2539 m.Shared = buf.DecodeUint8() 2540 m.ArraySize = buf.DecodeUint32() 2541 m.Threads = make([]uint32, m.ArraySize) 2542 for i := 0; i < len(m.Threads); i++ { 2543 m.Threads[i] = buf.DecodeUint32() 2544 } 2545 return nil 2546 } 2547 2548 // SwInterfaceTxPlacementGet defines message 'sw_interface_tx_placement_get'. 2549 type SwInterfaceTxPlacementGet struct { 2550 Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` 2551 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 2552 } 2553 2554 func (m *SwInterfaceTxPlacementGet) Reset() { *m = SwInterfaceTxPlacementGet{} } 2555 func (*SwInterfaceTxPlacementGet) GetMessageName() string { return "sw_interface_tx_placement_get" } 2556 func (*SwInterfaceTxPlacementGet) GetCrcString() string { return "47250981" } 2557 func (*SwInterfaceTxPlacementGet) GetMessageType() api.MessageType { 2558 return api.RequestMessage 2559 } 2560 2561 func (m *SwInterfaceTxPlacementGet) Size() (size int) { 2562 if m == nil { 2563 return 0 2564 } 2565 size += 4 // m.Cursor 2566 size += 4 // m.SwIfIndex 2567 return size 2568 } 2569 func (m *SwInterfaceTxPlacementGet) Marshal(b []byte) ([]byte, error) { 2570 if b == nil { 2571 b = make([]byte, m.Size()) 2572 } 2573 buf := codec.NewBuffer(b) 2574 buf.EncodeUint32(m.Cursor) 2575 buf.EncodeUint32(uint32(m.SwIfIndex)) 2576 return buf.Bytes(), nil 2577 } 2578 func (m *SwInterfaceTxPlacementGet) Unmarshal(b []byte) error { 2579 buf := codec.NewBuffer(b) 2580 m.Cursor = buf.DecodeUint32() 2581 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 2582 return nil 2583 } 2584 2585 // SwInterfaceTxPlacementGetReply defines message 'sw_interface_tx_placement_get_reply'. 2586 type SwInterfaceTxPlacementGetReply struct { 2587 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2588 Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` 2589 } 2590 2591 func (m *SwInterfaceTxPlacementGetReply) Reset() { *m = SwInterfaceTxPlacementGetReply{} } 2592 func (*SwInterfaceTxPlacementGetReply) GetMessageName() string { 2593 return "sw_interface_tx_placement_get_reply" 2594 } 2595 func (*SwInterfaceTxPlacementGetReply) GetCrcString() string { return "53b48f5d" } 2596 func (*SwInterfaceTxPlacementGetReply) GetMessageType() api.MessageType { 2597 return api.ReplyMessage 2598 } 2599 2600 func (m *SwInterfaceTxPlacementGetReply) Size() (size int) { 2601 if m == nil { 2602 return 0 2603 } 2604 size += 4 // m.Retval 2605 size += 4 // m.Cursor 2606 return size 2607 } 2608 func (m *SwInterfaceTxPlacementGetReply) Marshal(b []byte) ([]byte, error) { 2609 if b == nil { 2610 b = make([]byte, m.Size()) 2611 } 2612 buf := codec.NewBuffer(b) 2613 buf.EncodeInt32(m.Retval) 2614 buf.EncodeUint32(m.Cursor) 2615 return buf.Bytes(), nil 2616 } 2617 func (m *SwInterfaceTxPlacementGetReply) Unmarshal(b []byte) error { 2618 buf := codec.NewBuffer(b) 2619 m.Retval = buf.DecodeInt32() 2620 m.Cursor = buf.DecodeUint32() 2621 return nil 2622 } 2623 2624 // WantInterfaceEvents defines message 'want_interface_events'. 2625 type WantInterfaceEvents struct { 2626 EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"` 2627 PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` 2628 } 2629 2630 func (m *WantInterfaceEvents) Reset() { *m = WantInterfaceEvents{} } 2631 func (*WantInterfaceEvents) GetMessageName() string { return "want_interface_events" } 2632 func (*WantInterfaceEvents) GetCrcString() string { return "476f5a08" } 2633 func (*WantInterfaceEvents) GetMessageType() api.MessageType { 2634 return api.RequestMessage 2635 } 2636 2637 func (m *WantInterfaceEvents) Size() (size int) { 2638 if m == nil { 2639 return 0 2640 } 2641 size += 4 // m.EnableDisable 2642 size += 4 // m.PID 2643 return size 2644 } 2645 func (m *WantInterfaceEvents) Marshal(b []byte) ([]byte, error) { 2646 if b == nil { 2647 b = make([]byte, m.Size()) 2648 } 2649 buf := codec.NewBuffer(b) 2650 buf.EncodeUint32(m.EnableDisable) 2651 buf.EncodeUint32(m.PID) 2652 return buf.Bytes(), nil 2653 } 2654 func (m *WantInterfaceEvents) Unmarshal(b []byte) error { 2655 buf := codec.NewBuffer(b) 2656 m.EnableDisable = buf.DecodeUint32() 2657 m.PID = buf.DecodeUint32() 2658 return nil 2659 } 2660 2661 // WantInterfaceEventsReply defines message 'want_interface_events_reply'. 2662 type WantInterfaceEventsReply struct { 2663 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 2664 } 2665 2666 func (m *WantInterfaceEventsReply) Reset() { *m = WantInterfaceEventsReply{} } 2667 func (*WantInterfaceEventsReply) GetMessageName() string { return "want_interface_events_reply" } 2668 func (*WantInterfaceEventsReply) GetCrcString() string { return "e8d4e804" } 2669 func (*WantInterfaceEventsReply) GetMessageType() api.MessageType { 2670 return api.ReplyMessage 2671 } 2672 2673 func (m *WantInterfaceEventsReply) Size() (size int) { 2674 if m == nil { 2675 return 0 2676 } 2677 size += 4 // m.Retval 2678 return size 2679 } 2680 func (m *WantInterfaceEventsReply) Marshal(b []byte) ([]byte, error) { 2681 if b == nil { 2682 b = make([]byte, m.Size()) 2683 } 2684 buf := codec.NewBuffer(b) 2685 buf.EncodeInt32(m.Retval) 2686 return buf.Bytes(), nil 2687 } 2688 func (m *WantInterfaceEventsReply) Unmarshal(b []byte) error { 2689 buf := codec.NewBuffer(b) 2690 m.Retval = buf.DecodeInt32() 2691 return nil 2692 } 2693 2694 func init() { file_interfaces_binapi_init() } 2695 func file_interfaces_binapi_init() { 2696 api.RegisterMessage((*CollectDetailedInterfaceStats)(nil), "collect_detailed_interface_stats_5501adee") 2697 api.RegisterMessage((*CollectDetailedInterfaceStatsReply)(nil), "collect_detailed_interface_stats_reply_e8d4e804") 2698 api.RegisterMessage((*CreateLoopback)(nil), "create_loopback_42bb5d22") 2699 api.RegisterMessage((*CreateLoopbackInstance)(nil), "create_loopback_instance_d36a3ee2") 2700 api.RegisterMessage((*CreateLoopbackInstanceReply)(nil), "create_loopback_instance_reply_5383d31f") 2701 api.RegisterMessage((*CreateLoopbackReply)(nil), "create_loopback_reply_5383d31f") 2702 api.RegisterMessage((*CreateSubif)(nil), "create_subif_790ca755") 2703 api.RegisterMessage((*CreateSubifReply)(nil), "create_subif_reply_5383d31f") 2704 api.RegisterMessage((*CreateVlanSubif)(nil), "create_vlan_subif_af34ac8b") 2705 api.RegisterMessage((*CreateVlanSubifReply)(nil), "create_vlan_subif_reply_5383d31f") 2706 api.RegisterMessage((*DeleteLoopback)(nil), "delete_loopback_f9e6675e") 2707 api.RegisterMessage((*DeleteLoopbackReply)(nil), "delete_loopback_reply_e8d4e804") 2708 api.RegisterMessage((*DeleteSubif)(nil), "delete_subif_f9e6675e") 2709 api.RegisterMessage((*DeleteSubifReply)(nil), "delete_subif_reply_e8d4e804") 2710 api.RegisterMessage((*GetBuffersStats)(nil), "get_buffers_stats_d698f87e") 2711 api.RegisterMessage((*GetBuffersStatsReply)(nil), "get_buffers_stats_reply_22c0649d") 2712 api.RegisterMessage((*HwInterfaceSetMtu)(nil), "hw_interface_set_mtu_e6746899") 2713 api.RegisterMessage((*HwInterfaceSetMtuReply)(nil), "hw_interface_set_mtu_reply_e8d4e804") 2714 api.RegisterMessage((*InterfaceNameRenumber)(nil), "interface_name_renumber_2b8858b8") 2715 api.RegisterMessage((*InterfaceNameRenumberReply)(nil), "interface_name_renumber_reply_e8d4e804") 2716 api.RegisterMessage((*SwInterfaceAddDelAddress)(nil), "sw_interface_add_del_address_5463d73b") 2717 api.RegisterMessage((*SwInterfaceAddDelAddressReply)(nil), "sw_interface_add_del_address_reply_e8d4e804") 2718 api.RegisterMessage((*SwInterfaceAddDelMacAddress)(nil), "sw_interface_add_del_mac_address_638bb9f4") 2719 api.RegisterMessage((*SwInterfaceAddDelMacAddressReply)(nil), "sw_interface_add_del_mac_address_reply_e8d4e804") 2720 api.RegisterMessage((*SwInterfaceAddressReplaceBegin)(nil), "sw_interface_address_replace_begin_51077d14") 2721 api.RegisterMessage((*SwInterfaceAddressReplaceBeginReply)(nil), "sw_interface_address_replace_begin_reply_e8d4e804") 2722 api.RegisterMessage((*SwInterfaceAddressReplaceEnd)(nil), "sw_interface_address_replace_end_51077d14") 2723 api.RegisterMessage((*SwInterfaceAddressReplaceEndReply)(nil), "sw_interface_address_replace_end_reply_e8d4e804") 2724 api.RegisterMessage((*SwInterfaceClearStats)(nil), "sw_interface_clear_stats_f9e6675e") 2725 api.RegisterMessage((*SwInterfaceClearStatsReply)(nil), "sw_interface_clear_stats_reply_e8d4e804") 2726 api.RegisterMessage((*SwInterfaceDetails)(nil), "sw_interface_details_6c221fc7") 2727 api.RegisterMessage((*SwInterfaceDump)(nil), "sw_interface_dump_aa610c27") 2728 api.RegisterMessage((*SwInterfaceEvent)(nil), "sw_interface_event_2d3d95a7") 2729 api.RegisterMessage((*SwInterfaceGetMacAddress)(nil), "sw_interface_get_mac_address_f9e6675e") 2730 api.RegisterMessage((*SwInterfaceGetMacAddressReply)(nil), "sw_interface_get_mac_address_reply_40ef2c08") 2731 api.RegisterMessage((*SwInterfaceGetTable)(nil), "sw_interface_get_table_2d033de4") 2732 api.RegisterMessage((*SwInterfaceGetTableReply)(nil), "sw_interface_get_table_reply_a6eb0109") 2733 api.RegisterMessage((*SwInterfaceRxPlacementDetails)(nil), "sw_interface_rx_placement_details_9e44a7ce") 2734 api.RegisterMessage((*SwInterfaceRxPlacementDump)(nil), "sw_interface_rx_placement_dump_f9e6675e") 2735 api.RegisterMessage((*SwInterfaceSetFlags)(nil), "sw_interface_set_flags_f5aec1b8") 2736 api.RegisterMessage((*SwInterfaceSetFlagsReply)(nil), "sw_interface_set_flags_reply_e8d4e804") 2737 api.RegisterMessage((*SwInterfaceSetInterfaceName)(nil), "sw_interface_set_interface_name_45a1d548") 2738 api.RegisterMessage((*SwInterfaceSetInterfaceNameReply)(nil), "sw_interface_set_interface_name_reply_e8d4e804") 2739 api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcast)(nil), "sw_interface_set_ip_directed_broadcast_ae6cfcfb") 2740 api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcastReply)(nil), "sw_interface_set_ip_directed_broadcast_reply_e8d4e804") 2741 api.RegisterMessage((*SwInterfaceSetMacAddress)(nil), "sw_interface_set_mac_address_c536e7eb") 2742 api.RegisterMessage((*SwInterfaceSetMacAddressReply)(nil), "sw_interface_set_mac_address_reply_e8d4e804") 2743 api.RegisterMessage((*SwInterfaceSetMtu)(nil), "sw_interface_set_mtu_5cbe85e5") 2744 api.RegisterMessage((*SwInterfaceSetMtuReply)(nil), "sw_interface_set_mtu_reply_e8d4e804") 2745 api.RegisterMessage((*SwInterfaceSetPromisc)(nil), "sw_interface_set_promisc_d40860d4") 2746 api.RegisterMessage((*SwInterfaceSetPromiscReply)(nil), "sw_interface_set_promisc_reply_e8d4e804") 2747 api.RegisterMessage((*SwInterfaceSetRxMode)(nil), "sw_interface_set_rx_mode_b04d1cfe") 2748 api.RegisterMessage((*SwInterfaceSetRxModeReply)(nil), "sw_interface_set_rx_mode_reply_e8d4e804") 2749 api.RegisterMessage((*SwInterfaceSetRxPlacement)(nil), "sw_interface_set_rx_placement_db65f3c9") 2750 api.RegisterMessage((*SwInterfaceSetRxPlacementReply)(nil), "sw_interface_set_rx_placement_reply_e8d4e804") 2751 api.RegisterMessage((*SwInterfaceSetTable)(nil), "sw_interface_set_table_df42a577") 2752 api.RegisterMessage((*SwInterfaceSetTableReply)(nil), "sw_interface_set_table_reply_e8d4e804") 2753 api.RegisterMessage((*SwInterfaceSetTxPlacement)(nil), "sw_interface_set_tx_placement_4e0cd5ff") 2754 api.RegisterMessage((*SwInterfaceSetTxPlacementReply)(nil), "sw_interface_set_tx_placement_reply_e8d4e804") 2755 api.RegisterMessage((*SwInterfaceSetUnnumbered)(nil), "sw_interface_set_unnumbered_154a6439") 2756 api.RegisterMessage((*SwInterfaceSetUnnumberedReply)(nil), "sw_interface_set_unnumbered_reply_e8d4e804") 2757 api.RegisterMessage((*SwInterfaceTagAddDel)(nil), "sw_interface_tag_add_del_426f8bc1") 2758 api.RegisterMessage((*SwInterfaceTagAddDelReply)(nil), "sw_interface_tag_add_del_reply_e8d4e804") 2759 api.RegisterMessage((*SwInterfaceTxPlacementDetails)(nil), "sw_interface_tx_placement_details_00381a2e") 2760 api.RegisterMessage((*SwInterfaceTxPlacementGet)(nil), "sw_interface_tx_placement_get_47250981") 2761 api.RegisterMessage((*SwInterfaceTxPlacementGetReply)(nil), "sw_interface_tx_placement_get_reply_53b48f5d") 2762 api.RegisterMessage((*WantInterfaceEvents)(nil), "want_interface_events_476f5a08") 2763 api.RegisterMessage((*WantInterfaceEventsReply)(nil), "want_interface_events_reply_e8d4e804") 2764 } 2765 2766 // Messages returns list of all messages in this module. 2767 func AllMessages() []api.Message { 2768 return []api.Message{ 2769 (*CollectDetailedInterfaceStats)(nil), 2770 (*CollectDetailedInterfaceStatsReply)(nil), 2771 (*CreateLoopback)(nil), 2772 (*CreateLoopbackInstance)(nil), 2773 (*CreateLoopbackInstanceReply)(nil), 2774 (*CreateLoopbackReply)(nil), 2775 (*CreateSubif)(nil), 2776 (*CreateSubifReply)(nil), 2777 (*CreateVlanSubif)(nil), 2778 (*CreateVlanSubifReply)(nil), 2779 (*DeleteLoopback)(nil), 2780 (*DeleteLoopbackReply)(nil), 2781 (*DeleteSubif)(nil), 2782 (*DeleteSubifReply)(nil), 2783 (*GetBuffersStats)(nil), 2784 (*GetBuffersStatsReply)(nil), 2785 (*HwInterfaceSetMtu)(nil), 2786 (*HwInterfaceSetMtuReply)(nil), 2787 (*InterfaceNameRenumber)(nil), 2788 (*InterfaceNameRenumberReply)(nil), 2789 (*SwInterfaceAddDelAddress)(nil), 2790 (*SwInterfaceAddDelAddressReply)(nil), 2791 (*SwInterfaceAddDelMacAddress)(nil), 2792 (*SwInterfaceAddDelMacAddressReply)(nil), 2793 (*SwInterfaceAddressReplaceBegin)(nil), 2794 (*SwInterfaceAddressReplaceBeginReply)(nil), 2795 (*SwInterfaceAddressReplaceEnd)(nil), 2796 (*SwInterfaceAddressReplaceEndReply)(nil), 2797 (*SwInterfaceClearStats)(nil), 2798 (*SwInterfaceClearStatsReply)(nil), 2799 (*SwInterfaceDetails)(nil), 2800 (*SwInterfaceDump)(nil), 2801 (*SwInterfaceEvent)(nil), 2802 (*SwInterfaceGetMacAddress)(nil), 2803 (*SwInterfaceGetMacAddressReply)(nil), 2804 (*SwInterfaceGetTable)(nil), 2805 (*SwInterfaceGetTableReply)(nil), 2806 (*SwInterfaceRxPlacementDetails)(nil), 2807 (*SwInterfaceRxPlacementDump)(nil), 2808 (*SwInterfaceSetFlags)(nil), 2809 (*SwInterfaceSetFlagsReply)(nil), 2810 (*SwInterfaceSetInterfaceName)(nil), 2811 (*SwInterfaceSetInterfaceNameReply)(nil), 2812 (*SwInterfaceSetIPDirectedBroadcast)(nil), 2813 (*SwInterfaceSetIPDirectedBroadcastReply)(nil), 2814 (*SwInterfaceSetMacAddress)(nil), 2815 (*SwInterfaceSetMacAddressReply)(nil), 2816 (*SwInterfaceSetMtu)(nil), 2817 (*SwInterfaceSetMtuReply)(nil), 2818 (*SwInterfaceSetPromisc)(nil), 2819 (*SwInterfaceSetPromiscReply)(nil), 2820 (*SwInterfaceSetRxMode)(nil), 2821 (*SwInterfaceSetRxModeReply)(nil), 2822 (*SwInterfaceSetRxPlacement)(nil), 2823 (*SwInterfaceSetRxPlacementReply)(nil), 2824 (*SwInterfaceSetTable)(nil), 2825 (*SwInterfaceSetTableReply)(nil), 2826 (*SwInterfaceSetTxPlacement)(nil), 2827 (*SwInterfaceSetTxPlacementReply)(nil), 2828 (*SwInterfaceSetUnnumbered)(nil), 2829 (*SwInterfaceSetUnnumberedReply)(nil), 2830 (*SwInterfaceTagAddDel)(nil), 2831 (*SwInterfaceTagAddDelReply)(nil), 2832 (*SwInterfaceTxPlacementDetails)(nil), 2833 (*SwInterfaceTxPlacementGet)(nil), 2834 (*SwInterfaceTxPlacementGetReply)(nil), 2835 (*WantInterfaceEvents)(nil), 2836 (*WantInterfaceEventsReply)(nil), 2837 } 2838 }