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