1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/bond.api.json
7 // Package bond contains generated bindings for API file bond.api.
16 api "git.fd.io/govpp.git/api"
17 ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
18 interface_types "git.fd.io/govpp.git/binapi/interface_types"
19 codec "git.fd.io/govpp.git/codec"
23 // This is a compile-time assertion to ensure that this generated file
24 // is compatible with the GoVPP api package it is being compiled against.
25 // A compilation error at this line likely means your copy of the
26 // GoVPP api package needs to be updated.
27 const _ = api.GoVppAPIPackageIsVersion2
32 VersionCrc = 0xa65a4a1e
35 // BondLbAlgo defines enum 'bond_lb_algo'.
36 type BondLbAlgo uint32
39 BOND_API_LB_ALGO_L2 BondLbAlgo = 0
40 BOND_API_LB_ALGO_L34 BondLbAlgo = 1
41 BOND_API_LB_ALGO_L23 BondLbAlgo = 2
42 BOND_API_LB_ALGO_RR BondLbAlgo = 3
43 BOND_API_LB_ALGO_BC BondLbAlgo = 4
44 BOND_API_LB_ALGO_AB BondLbAlgo = 5
48 BondLbAlgo_name = map[uint32]string{
49 0: "BOND_API_LB_ALGO_L2",
50 1: "BOND_API_LB_ALGO_L34",
51 2: "BOND_API_LB_ALGO_L23",
52 3: "BOND_API_LB_ALGO_RR",
53 4: "BOND_API_LB_ALGO_BC",
54 5: "BOND_API_LB_ALGO_AB",
56 BondLbAlgo_value = map[string]uint32{
57 "BOND_API_LB_ALGO_L2": 0,
58 "BOND_API_LB_ALGO_L34": 1,
59 "BOND_API_LB_ALGO_L23": 2,
60 "BOND_API_LB_ALGO_RR": 3,
61 "BOND_API_LB_ALGO_BC": 4,
62 "BOND_API_LB_ALGO_AB": 5,
66 func (x BondLbAlgo) String() string {
67 s, ok := BondLbAlgo_name[uint32(x)]
71 return "BondLbAlgo(" + strconv.Itoa(int(x)) + ")"
74 // BondMode defines enum 'bond_mode'.
78 BOND_API_MODE_ROUND_ROBIN BondMode = 1
79 BOND_API_MODE_ACTIVE_BACKUP BondMode = 2
80 BOND_API_MODE_XOR BondMode = 3
81 BOND_API_MODE_BROADCAST BondMode = 4
82 BOND_API_MODE_LACP BondMode = 5
86 BondMode_name = map[uint32]string{
87 1: "BOND_API_MODE_ROUND_ROBIN",
88 2: "BOND_API_MODE_ACTIVE_BACKUP",
89 3: "BOND_API_MODE_XOR",
90 4: "BOND_API_MODE_BROADCAST",
91 5: "BOND_API_MODE_LACP",
93 BondMode_value = map[string]uint32{
94 "BOND_API_MODE_ROUND_ROBIN": 1,
95 "BOND_API_MODE_ACTIVE_BACKUP": 2,
96 "BOND_API_MODE_XOR": 3,
97 "BOND_API_MODE_BROADCAST": 4,
98 "BOND_API_MODE_LACP": 5,
102 func (x BondMode) String() string {
103 s, ok := BondMode_name[uint32(x)]
107 return "BondMode(" + strconv.Itoa(int(x)) + ")"
110 // BondCreate defines message 'bond_create'.
111 type BondCreate struct {
112 ID uint32 `binapi:"u32,name=id,default=%!s(float64=4.294967295e+09)" json:"id,omitempty"`
113 UseCustomMac bool `binapi:"bool,name=use_custom_mac" json:"use_custom_mac,omitempty"`
114 MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
115 Mode BondMode `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
116 Lb BondLbAlgo `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
117 NumaOnly bool `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
120 func (m *BondCreate) Reset() { *m = BondCreate{} }
121 func (*BondCreate) GetMessageName() string { return "bond_create" }
122 func (*BondCreate) GetCrcString() string { return "48883c7e" }
123 func (*BondCreate) GetMessageType() api.MessageType {
124 return api.RequestMessage
127 func (m *BondCreate) Size() int {
133 size += 1 // m.UseCustomMac
134 size += 1 * 6 // m.MacAddress
137 size += 1 // m.NumaOnly
140 func (m *BondCreate) Marshal(b []byte) ([]byte, error) {
141 var buf *codec.Buffer
143 buf = codec.NewBuffer(make([]byte, m.Size()))
145 buf = codec.NewBuffer(b)
147 buf.EncodeUint32(uint32(m.ID))
148 buf.EncodeBool(m.UseCustomMac)
149 buf.EncodeBytes(m.MacAddress[:], 6)
150 buf.EncodeUint32(uint32(m.Mode))
151 buf.EncodeUint32(uint32(m.Lb))
152 buf.EncodeBool(m.NumaOnly)
153 return buf.Bytes(), nil
155 func (m *BondCreate) Unmarshal(b []byte) error {
156 buf := codec.NewBuffer(b)
157 m.ID = buf.DecodeUint32()
158 m.UseCustomMac = buf.DecodeBool()
159 copy(m.MacAddress[:], buf.DecodeBytes(6))
160 m.Mode = BondMode(buf.DecodeUint32())
161 m.Lb = BondLbAlgo(buf.DecodeUint32())
162 m.NumaOnly = buf.DecodeBool()
166 // BondCreateReply defines message 'bond_create_reply'.
167 type BondCreateReply struct {
168 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
169 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
172 func (m *BondCreateReply) Reset() { *m = BondCreateReply{} }
173 func (*BondCreateReply) GetMessageName() string { return "bond_create_reply" }
174 func (*BondCreateReply) GetCrcString() string { return "5383d31f" }
175 func (*BondCreateReply) GetMessageType() api.MessageType {
176 return api.ReplyMessage
179 func (m *BondCreateReply) Size() int {
184 size += 4 // m.Retval
185 size += 4 // m.SwIfIndex
188 func (m *BondCreateReply) Marshal(b []byte) ([]byte, error) {
189 var buf *codec.Buffer
191 buf = codec.NewBuffer(make([]byte, m.Size()))
193 buf = codec.NewBuffer(b)
195 buf.EncodeUint32(uint32(m.Retval))
196 buf.EncodeUint32(uint32(m.SwIfIndex))
197 return buf.Bytes(), nil
199 func (m *BondCreateReply) Unmarshal(b []byte) error {
200 buf := codec.NewBuffer(b)
201 m.Retval = int32(buf.DecodeUint32())
202 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
206 // BondDelete defines message 'bond_delete'.
207 type BondDelete struct {
208 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
211 func (m *BondDelete) Reset() { *m = BondDelete{} }
212 func (*BondDelete) GetMessageName() string { return "bond_delete" }
213 func (*BondDelete) GetCrcString() string { return "f9e6675e" }
214 func (*BondDelete) GetMessageType() api.MessageType {
215 return api.RequestMessage
218 func (m *BondDelete) Size() int {
223 size += 4 // m.SwIfIndex
226 func (m *BondDelete) Marshal(b []byte) ([]byte, error) {
227 var buf *codec.Buffer
229 buf = codec.NewBuffer(make([]byte, m.Size()))
231 buf = codec.NewBuffer(b)
233 buf.EncodeUint32(uint32(m.SwIfIndex))
234 return buf.Bytes(), nil
236 func (m *BondDelete) Unmarshal(b []byte) error {
237 buf := codec.NewBuffer(b)
238 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
242 // BondDeleteReply defines message 'bond_delete_reply'.
243 type BondDeleteReply struct {
244 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
247 func (m *BondDeleteReply) Reset() { *m = BondDeleteReply{} }
248 func (*BondDeleteReply) GetMessageName() string { return "bond_delete_reply" }
249 func (*BondDeleteReply) GetCrcString() string { return "e8d4e804" }
250 func (*BondDeleteReply) GetMessageType() api.MessageType {
251 return api.ReplyMessage
254 func (m *BondDeleteReply) Size() int {
259 size += 4 // m.Retval
262 func (m *BondDeleteReply) Marshal(b []byte) ([]byte, error) {
263 var buf *codec.Buffer
265 buf = codec.NewBuffer(make([]byte, m.Size()))
267 buf = codec.NewBuffer(b)
269 buf.EncodeUint32(uint32(m.Retval))
270 return buf.Bytes(), nil
272 func (m *BondDeleteReply) Unmarshal(b []byte) error {
273 buf := codec.NewBuffer(b)
274 m.Retval = int32(buf.DecodeUint32())
278 // BondDetachSlave defines message 'bond_detach_slave'.
279 type BondDetachSlave struct {
280 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
283 func (m *BondDetachSlave) Reset() { *m = BondDetachSlave{} }
284 func (*BondDetachSlave) GetMessageName() string { return "bond_detach_slave" }
285 func (*BondDetachSlave) GetCrcString() string { return "f9e6675e" }
286 func (*BondDetachSlave) GetMessageType() api.MessageType {
287 return api.RequestMessage
290 func (m *BondDetachSlave) Size() int {
295 size += 4 // m.SwIfIndex
298 func (m *BondDetachSlave) Marshal(b []byte) ([]byte, error) {
299 var buf *codec.Buffer
301 buf = codec.NewBuffer(make([]byte, m.Size()))
303 buf = codec.NewBuffer(b)
305 buf.EncodeUint32(uint32(m.SwIfIndex))
306 return buf.Bytes(), nil
308 func (m *BondDetachSlave) Unmarshal(b []byte) error {
309 buf := codec.NewBuffer(b)
310 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
314 // BondDetachSlaveReply defines message 'bond_detach_slave_reply'.
315 type BondDetachSlaveReply struct {
316 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
319 func (m *BondDetachSlaveReply) Reset() { *m = BondDetachSlaveReply{} }
320 func (*BondDetachSlaveReply) GetMessageName() string { return "bond_detach_slave_reply" }
321 func (*BondDetachSlaveReply) GetCrcString() string { return "e8d4e804" }
322 func (*BondDetachSlaveReply) GetMessageType() api.MessageType {
323 return api.ReplyMessage
326 func (m *BondDetachSlaveReply) Size() int {
331 size += 4 // m.Retval
334 func (m *BondDetachSlaveReply) Marshal(b []byte) ([]byte, error) {
335 var buf *codec.Buffer
337 buf = codec.NewBuffer(make([]byte, m.Size()))
339 buf = codec.NewBuffer(b)
341 buf.EncodeUint32(uint32(m.Retval))
342 return buf.Bytes(), nil
344 func (m *BondDetachSlaveReply) Unmarshal(b []byte) error {
345 buf := codec.NewBuffer(b)
346 m.Retval = int32(buf.DecodeUint32())
350 // BondEnslave defines message 'bond_enslave'.
351 type BondEnslave struct {
352 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
353 BondSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bond_sw_if_index" json:"bond_sw_if_index,omitempty"`
354 IsPassive bool `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
355 IsLongTimeout bool `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
358 func (m *BondEnslave) Reset() { *m = BondEnslave{} }
359 func (*BondEnslave) GetMessageName() string { return "bond_enslave" }
360 func (*BondEnslave) GetCrcString() string { return "076ecfa7" }
361 func (*BondEnslave) GetMessageType() api.MessageType {
362 return api.RequestMessage
365 func (m *BondEnslave) Size() int {
370 size += 4 // m.SwIfIndex
371 size += 4 // m.BondSwIfIndex
372 size += 1 // m.IsPassive
373 size += 1 // m.IsLongTimeout
376 func (m *BondEnslave) Marshal(b []byte) ([]byte, error) {
377 var buf *codec.Buffer
379 buf = codec.NewBuffer(make([]byte, m.Size()))
381 buf = codec.NewBuffer(b)
383 buf.EncodeUint32(uint32(m.SwIfIndex))
384 buf.EncodeUint32(uint32(m.BondSwIfIndex))
385 buf.EncodeBool(m.IsPassive)
386 buf.EncodeBool(m.IsLongTimeout)
387 return buf.Bytes(), nil
389 func (m *BondEnslave) Unmarshal(b []byte) error {
390 buf := codec.NewBuffer(b)
391 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
392 m.BondSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
393 m.IsPassive = buf.DecodeBool()
394 m.IsLongTimeout = buf.DecodeBool()
398 // BondEnslaveReply defines message 'bond_enslave_reply'.
399 type BondEnslaveReply struct {
400 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
403 func (m *BondEnslaveReply) Reset() { *m = BondEnslaveReply{} }
404 func (*BondEnslaveReply) GetMessageName() string { return "bond_enslave_reply" }
405 func (*BondEnslaveReply) GetCrcString() string { return "e8d4e804" }
406 func (*BondEnslaveReply) GetMessageType() api.MessageType {
407 return api.ReplyMessage
410 func (m *BondEnslaveReply) Size() int {
415 size += 4 // m.Retval
418 func (m *BondEnslaveReply) Marshal(b []byte) ([]byte, error) {
419 var buf *codec.Buffer
421 buf = codec.NewBuffer(make([]byte, m.Size()))
423 buf = codec.NewBuffer(b)
425 buf.EncodeUint32(uint32(m.Retval))
426 return buf.Bytes(), nil
428 func (m *BondEnslaveReply) Unmarshal(b []byte) error {
429 buf := codec.NewBuffer(b)
430 m.Retval = int32(buf.DecodeUint32())
434 // SwInterfaceBondDetails defines message 'sw_interface_bond_details'.
435 type SwInterfaceBondDetails struct {
436 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
437 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
438 Mode BondMode `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
439 Lb BondLbAlgo `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
440 NumaOnly bool `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
441 ActiveSlaves uint32 `binapi:"u32,name=active_slaves" json:"active_slaves,omitempty"`
442 Slaves uint32 `binapi:"u32,name=slaves" json:"slaves,omitempty"`
443 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
446 func (m *SwInterfaceBondDetails) Reset() { *m = SwInterfaceBondDetails{} }
447 func (*SwInterfaceBondDetails) GetMessageName() string { return "sw_interface_bond_details" }
448 func (*SwInterfaceBondDetails) GetCrcString() string { return "f5ef2106" }
449 func (*SwInterfaceBondDetails) GetMessageType() api.MessageType {
450 return api.ReplyMessage
453 func (m *SwInterfaceBondDetails) Size() int {
458 size += 4 // m.SwIfIndex
462 size += 1 // m.NumaOnly
463 size += 4 // m.ActiveSlaves
464 size += 4 // m.Slaves
465 size += 64 // m.InterfaceName
468 func (m *SwInterfaceBondDetails) Marshal(b []byte) ([]byte, error) {
469 var buf *codec.Buffer
471 buf = codec.NewBuffer(make([]byte, m.Size()))
473 buf = codec.NewBuffer(b)
475 buf.EncodeUint32(uint32(m.SwIfIndex))
476 buf.EncodeUint32(uint32(m.ID))
477 buf.EncodeUint32(uint32(m.Mode))
478 buf.EncodeUint32(uint32(m.Lb))
479 buf.EncodeBool(m.NumaOnly)
480 buf.EncodeUint32(uint32(m.ActiveSlaves))
481 buf.EncodeUint32(uint32(m.Slaves))
482 buf.EncodeString(m.InterfaceName, 64)
483 return buf.Bytes(), nil
485 func (m *SwInterfaceBondDetails) Unmarshal(b []byte) error {
486 buf := codec.NewBuffer(b)
487 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
488 m.ID = buf.DecodeUint32()
489 m.Mode = BondMode(buf.DecodeUint32())
490 m.Lb = BondLbAlgo(buf.DecodeUint32())
491 m.NumaOnly = buf.DecodeBool()
492 m.ActiveSlaves = buf.DecodeUint32()
493 m.Slaves = buf.DecodeUint32()
494 m.InterfaceName = buf.DecodeString(64)
498 // SwInterfaceBondDump defines message 'sw_interface_bond_dump'.
499 type SwInterfaceBondDump struct{}
501 func (m *SwInterfaceBondDump) Reset() { *m = SwInterfaceBondDump{} }
502 func (*SwInterfaceBondDump) GetMessageName() string { return "sw_interface_bond_dump" }
503 func (*SwInterfaceBondDump) GetCrcString() string { return "51077d14" }
504 func (*SwInterfaceBondDump) GetMessageType() api.MessageType {
505 return api.RequestMessage
508 func (m *SwInterfaceBondDump) Size() int {
515 func (m *SwInterfaceBondDump) Marshal(b []byte) ([]byte, error) {
516 var buf *codec.Buffer
518 buf = codec.NewBuffer(make([]byte, m.Size()))
520 buf = codec.NewBuffer(b)
522 return buf.Bytes(), nil
524 func (m *SwInterfaceBondDump) Unmarshal(b []byte) error {
528 // SwInterfaceSetBondWeight defines message 'sw_interface_set_bond_weight'.
529 type SwInterfaceSetBondWeight struct {
530 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
531 Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
534 func (m *SwInterfaceSetBondWeight) Reset() { *m = SwInterfaceSetBondWeight{} }
535 func (*SwInterfaceSetBondWeight) GetMessageName() string { return "sw_interface_set_bond_weight" }
536 func (*SwInterfaceSetBondWeight) GetCrcString() string { return "deb510a0" }
537 func (*SwInterfaceSetBondWeight) GetMessageType() api.MessageType {
538 return api.RequestMessage
541 func (m *SwInterfaceSetBondWeight) Size() int {
546 size += 4 // m.SwIfIndex
547 size += 4 // m.Weight
550 func (m *SwInterfaceSetBondWeight) Marshal(b []byte) ([]byte, error) {
551 var buf *codec.Buffer
553 buf = codec.NewBuffer(make([]byte, m.Size()))
555 buf = codec.NewBuffer(b)
557 buf.EncodeUint32(uint32(m.SwIfIndex))
558 buf.EncodeUint32(uint32(m.Weight))
559 return buf.Bytes(), nil
561 func (m *SwInterfaceSetBondWeight) Unmarshal(b []byte) error {
562 buf := codec.NewBuffer(b)
563 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
564 m.Weight = buf.DecodeUint32()
568 // SwInterfaceSetBondWeightReply defines message 'sw_interface_set_bond_weight_reply'.
569 type SwInterfaceSetBondWeightReply struct {
570 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
573 func (m *SwInterfaceSetBondWeightReply) Reset() { *m = SwInterfaceSetBondWeightReply{} }
574 func (*SwInterfaceSetBondWeightReply) GetMessageName() string {
575 return "sw_interface_set_bond_weight_reply"
577 func (*SwInterfaceSetBondWeightReply) GetCrcString() string { return "e8d4e804" }
578 func (*SwInterfaceSetBondWeightReply) GetMessageType() api.MessageType {
579 return api.ReplyMessage
582 func (m *SwInterfaceSetBondWeightReply) Size() int {
587 size += 4 // m.Retval
590 func (m *SwInterfaceSetBondWeightReply) Marshal(b []byte) ([]byte, error) {
591 var buf *codec.Buffer
593 buf = codec.NewBuffer(make([]byte, m.Size()))
595 buf = codec.NewBuffer(b)
597 buf.EncodeUint32(uint32(m.Retval))
598 return buf.Bytes(), nil
600 func (m *SwInterfaceSetBondWeightReply) Unmarshal(b []byte) error {
601 buf := codec.NewBuffer(b)
602 m.Retval = int32(buf.DecodeUint32())
606 // SwInterfaceSlaveDetails defines message 'sw_interface_slave_details'.
607 type SwInterfaceSlaveDetails struct {
608 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
609 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
610 IsPassive bool `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
611 IsLongTimeout bool `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
612 IsLocalNuma bool `binapi:"bool,name=is_local_numa" json:"is_local_numa,omitempty"`
613 Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
616 func (m *SwInterfaceSlaveDetails) Reset() { *m = SwInterfaceSlaveDetails{} }
617 func (*SwInterfaceSlaveDetails) GetMessageName() string { return "sw_interface_slave_details" }
618 func (*SwInterfaceSlaveDetails) GetCrcString() string { return "3c4a0e23" }
619 func (*SwInterfaceSlaveDetails) GetMessageType() api.MessageType {
620 return api.ReplyMessage
623 func (m *SwInterfaceSlaveDetails) Size() int {
628 size += 4 // m.SwIfIndex
629 size += 64 // m.InterfaceName
630 size += 1 // m.IsPassive
631 size += 1 // m.IsLongTimeout
632 size += 1 // m.IsLocalNuma
633 size += 4 // m.Weight
636 func (m *SwInterfaceSlaveDetails) Marshal(b []byte) ([]byte, error) {
637 var buf *codec.Buffer
639 buf = codec.NewBuffer(make([]byte, m.Size()))
641 buf = codec.NewBuffer(b)
643 buf.EncodeUint32(uint32(m.SwIfIndex))
644 buf.EncodeString(m.InterfaceName, 64)
645 buf.EncodeBool(m.IsPassive)
646 buf.EncodeBool(m.IsLongTimeout)
647 buf.EncodeBool(m.IsLocalNuma)
648 buf.EncodeUint32(uint32(m.Weight))
649 return buf.Bytes(), nil
651 func (m *SwInterfaceSlaveDetails) Unmarshal(b []byte) error {
652 buf := codec.NewBuffer(b)
653 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
654 m.InterfaceName = buf.DecodeString(64)
655 m.IsPassive = buf.DecodeBool()
656 m.IsLongTimeout = buf.DecodeBool()
657 m.IsLocalNuma = buf.DecodeBool()
658 m.Weight = buf.DecodeUint32()
662 // SwInterfaceSlaveDump defines message 'sw_interface_slave_dump'.
663 type SwInterfaceSlaveDump struct {
664 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
667 func (m *SwInterfaceSlaveDump) Reset() { *m = SwInterfaceSlaveDump{} }
668 func (*SwInterfaceSlaveDump) GetMessageName() string { return "sw_interface_slave_dump" }
669 func (*SwInterfaceSlaveDump) GetCrcString() string { return "f9e6675e" }
670 func (*SwInterfaceSlaveDump) GetMessageType() api.MessageType {
671 return api.RequestMessage
674 func (m *SwInterfaceSlaveDump) Size() int {
679 size += 4 // m.SwIfIndex
682 func (m *SwInterfaceSlaveDump) Marshal(b []byte) ([]byte, error) {
683 var buf *codec.Buffer
685 buf = codec.NewBuffer(make([]byte, m.Size()))
687 buf = codec.NewBuffer(b)
689 buf.EncodeUint32(uint32(m.SwIfIndex))
690 return buf.Bytes(), nil
692 func (m *SwInterfaceSlaveDump) Unmarshal(b []byte) error {
693 buf := codec.NewBuffer(b)
694 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
698 func init() { file_bond_binapi_init() }
699 func file_bond_binapi_init() {
700 api.RegisterMessage((*BondCreate)(nil), "bond_create_48883c7e")
701 api.RegisterMessage((*BondCreateReply)(nil), "bond_create_reply_5383d31f")
702 api.RegisterMessage((*BondDelete)(nil), "bond_delete_f9e6675e")
703 api.RegisterMessage((*BondDeleteReply)(nil), "bond_delete_reply_e8d4e804")
704 api.RegisterMessage((*BondDetachSlave)(nil), "bond_detach_slave_f9e6675e")
705 api.RegisterMessage((*BondDetachSlaveReply)(nil), "bond_detach_slave_reply_e8d4e804")
706 api.RegisterMessage((*BondEnslave)(nil), "bond_enslave_076ecfa7")
707 api.RegisterMessage((*BondEnslaveReply)(nil), "bond_enslave_reply_e8d4e804")
708 api.RegisterMessage((*SwInterfaceBondDetails)(nil), "sw_interface_bond_details_f5ef2106")
709 api.RegisterMessage((*SwInterfaceBondDump)(nil), "sw_interface_bond_dump_51077d14")
710 api.RegisterMessage((*SwInterfaceSetBondWeight)(nil), "sw_interface_set_bond_weight_deb510a0")
711 api.RegisterMessage((*SwInterfaceSetBondWeightReply)(nil), "sw_interface_set_bond_weight_reply_e8d4e804")
712 api.RegisterMessage((*SwInterfaceSlaveDetails)(nil), "sw_interface_slave_details_3c4a0e23")
713 api.RegisterMessage((*SwInterfaceSlaveDump)(nil), "sw_interface_slave_dump_f9e6675e")
716 // Messages returns list of all messages in this module.
717 func AllMessages() []api.Message {
718 return []api.Message{
720 (*BondCreateReply)(nil),
722 (*BondDeleteReply)(nil),
723 (*BondDetachSlave)(nil),
724 (*BondDetachSlaveReply)(nil),
726 (*BondEnslaveReply)(nil),
727 (*SwInterfaceBondDetails)(nil),
728 (*SwInterfaceBondDump)(nil),
729 (*SwInterfaceSetBondWeight)(nil),
730 (*SwInterfaceSetBondWeightReply)(nil),
731 (*SwInterfaceSlaveDetails)(nil),
732 (*SwInterfaceSlaveDump)(nil),