1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package bond contains generated bindings for API file bond.api.
17 api "git.fd.io/govpp.git/api"
18 ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
19 interface_types "git.fd.io/govpp.git/binapi/interface_types"
20 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=4294967295" 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() (size int) {
132 size += 1 // m.UseCustomMac
133 size += 1 * 6 // m.MacAddress
136 size += 1 // m.NumaOnly
139 func (m *BondCreate) Marshal(b []byte) ([]byte, error) {
141 b = make([]byte, m.Size())
143 buf := codec.NewBuffer(b)
144 buf.EncodeUint32(m.ID)
145 buf.EncodeBool(m.UseCustomMac)
146 buf.EncodeBytes(m.MacAddress[:], 6)
147 buf.EncodeUint32(uint32(m.Mode))
148 buf.EncodeUint32(uint32(m.Lb))
149 buf.EncodeBool(m.NumaOnly)
150 return buf.Bytes(), nil
152 func (m *BondCreate) Unmarshal(b []byte) error {
153 buf := codec.NewBuffer(b)
154 m.ID = buf.DecodeUint32()
155 m.UseCustomMac = buf.DecodeBool()
156 copy(m.MacAddress[:], buf.DecodeBytes(6))
157 m.Mode = BondMode(buf.DecodeUint32())
158 m.Lb = BondLbAlgo(buf.DecodeUint32())
159 m.NumaOnly = buf.DecodeBool()
163 // BondCreateReply defines message 'bond_create_reply'.
164 type BondCreateReply struct {
165 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
166 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
169 func (m *BondCreateReply) Reset() { *m = BondCreateReply{} }
170 func (*BondCreateReply) GetMessageName() string { return "bond_create_reply" }
171 func (*BondCreateReply) GetCrcString() string { return "5383d31f" }
172 func (*BondCreateReply) GetMessageType() api.MessageType {
173 return api.ReplyMessage
176 func (m *BondCreateReply) Size() (size int) {
180 size += 4 // m.Retval
181 size += 4 // m.SwIfIndex
184 func (m *BondCreateReply) Marshal(b []byte) ([]byte, error) {
186 b = make([]byte, m.Size())
188 buf := codec.NewBuffer(b)
189 buf.EncodeInt32(m.Retval)
190 buf.EncodeUint32(uint32(m.SwIfIndex))
191 return buf.Bytes(), nil
193 func (m *BondCreateReply) Unmarshal(b []byte) error {
194 buf := codec.NewBuffer(b)
195 m.Retval = buf.DecodeInt32()
196 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
200 // BondDelete defines message 'bond_delete'.
201 type BondDelete struct {
202 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
205 func (m *BondDelete) Reset() { *m = BondDelete{} }
206 func (*BondDelete) GetMessageName() string { return "bond_delete" }
207 func (*BondDelete) GetCrcString() string { return "f9e6675e" }
208 func (*BondDelete) GetMessageType() api.MessageType {
209 return api.RequestMessage
212 func (m *BondDelete) Size() (size int) {
216 size += 4 // m.SwIfIndex
219 func (m *BondDelete) Marshal(b []byte) ([]byte, error) {
221 b = make([]byte, m.Size())
223 buf := codec.NewBuffer(b)
224 buf.EncodeUint32(uint32(m.SwIfIndex))
225 return buf.Bytes(), nil
227 func (m *BondDelete) Unmarshal(b []byte) error {
228 buf := codec.NewBuffer(b)
229 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
233 // BondDeleteReply defines message 'bond_delete_reply'.
234 type BondDeleteReply struct {
235 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
238 func (m *BondDeleteReply) Reset() { *m = BondDeleteReply{} }
239 func (*BondDeleteReply) GetMessageName() string { return "bond_delete_reply" }
240 func (*BondDeleteReply) GetCrcString() string { return "e8d4e804" }
241 func (*BondDeleteReply) GetMessageType() api.MessageType {
242 return api.ReplyMessage
245 func (m *BondDeleteReply) Size() (size int) {
249 size += 4 // m.Retval
252 func (m *BondDeleteReply) Marshal(b []byte) ([]byte, error) {
254 b = make([]byte, m.Size())
256 buf := codec.NewBuffer(b)
257 buf.EncodeInt32(m.Retval)
258 return buf.Bytes(), nil
260 func (m *BondDeleteReply) Unmarshal(b []byte) error {
261 buf := codec.NewBuffer(b)
262 m.Retval = buf.DecodeInt32()
266 // BondDetachSlave defines message 'bond_detach_slave'.
267 type BondDetachSlave struct {
268 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
271 func (m *BondDetachSlave) Reset() { *m = BondDetachSlave{} }
272 func (*BondDetachSlave) GetMessageName() string { return "bond_detach_slave" }
273 func (*BondDetachSlave) GetCrcString() string { return "f9e6675e" }
274 func (*BondDetachSlave) GetMessageType() api.MessageType {
275 return api.RequestMessage
278 func (m *BondDetachSlave) Size() (size int) {
282 size += 4 // m.SwIfIndex
285 func (m *BondDetachSlave) Marshal(b []byte) ([]byte, error) {
287 b = make([]byte, m.Size())
289 buf := codec.NewBuffer(b)
290 buf.EncodeUint32(uint32(m.SwIfIndex))
291 return buf.Bytes(), nil
293 func (m *BondDetachSlave) Unmarshal(b []byte) error {
294 buf := codec.NewBuffer(b)
295 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
299 // BondDetachSlaveReply defines message 'bond_detach_slave_reply'.
300 type BondDetachSlaveReply struct {
301 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
304 func (m *BondDetachSlaveReply) Reset() { *m = BondDetachSlaveReply{} }
305 func (*BondDetachSlaveReply) GetMessageName() string { return "bond_detach_slave_reply" }
306 func (*BondDetachSlaveReply) GetCrcString() string { return "e8d4e804" }
307 func (*BondDetachSlaveReply) GetMessageType() api.MessageType {
308 return api.ReplyMessage
311 func (m *BondDetachSlaveReply) Size() (size int) {
315 size += 4 // m.Retval
318 func (m *BondDetachSlaveReply) Marshal(b []byte) ([]byte, error) {
320 b = make([]byte, m.Size())
322 buf := codec.NewBuffer(b)
323 buf.EncodeInt32(m.Retval)
324 return buf.Bytes(), nil
326 func (m *BondDetachSlaveReply) Unmarshal(b []byte) error {
327 buf := codec.NewBuffer(b)
328 m.Retval = buf.DecodeInt32()
332 // BondEnslave defines message 'bond_enslave'.
333 type BondEnslave struct {
334 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
335 BondSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bond_sw_if_index" json:"bond_sw_if_index,omitempty"`
336 IsPassive bool `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
337 IsLongTimeout bool `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
340 func (m *BondEnslave) Reset() { *m = BondEnslave{} }
341 func (*BondEnslave) GetMessageName() string { return "bond_enslave" }
342 func (*BondEnslave) GetCrcString() string { return "076ecfa7" }
343 func (*BondEnslave) GetMessageType() api.MessageType {
344 return api.RequestMessage
347 func (m *BondEnslave) Size() (size int) {
351 size += 4 // m.SwIfIndex
352 size += 4 // m.BondSwIfIndex
353 size += 1 // m.IsPassive
354 size += 1 // m.IsLongTimeout
357 func (m *BondEnslave) Marshal(b []byte) ([]byte, error) {
359 b = make([]byte, m.Size())
361 buf := codec.NewBuffer(b)
362 buf.EncodeUint32(uint32(m.SwIfIndex))
363 buf.EncodeUint32(uint32(m.BondSwIfIndex))
364 buf.EncodeBool(m.IsPassive)
365 buf.EncodeBool(m.IsLongTimeout)
366 return buf.Bytes(), nil
368 func (m *BondEnslave) Unmarshal(b []byte) error {
369 buf := codec.NewBuffer(b)
370 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
371 m.BondSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
372 m.IsPassive = buf.DecodeBool()
373 m.IsLongTimeout = buf.DecodeBool()
377 // BondEnslaveReply defines message 'bond_enslave_reply'.
378 type BondEnslaveReply struct {
379 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
382 func (m *BondEnslaveReply) Reset() { *m = BondEnslaveReply{} }
383 func (*BondEnslaveReply) GetMessageName() string { return "bond_enslave_reply" }
384 func (*BondEnslaveReply) GetCrcString() string { return "e8d4e804" }
385 func (*BondEnslaveReply) GetMessageType() api.MessageType {
386 return api.ReplyMessage
389 func (m *BondEnslaveReply) Size() (size int) {
393 size += 4 // m.Retval
396 func (m *BondEnslaveReply) Marshal(b []byte) ([]byte, error) {
398 b = make([]byte, m.Size())
400 buf := codec.NewBuffer(b)
401 buf.EncodeInt32(m.Retval)
402 return buf.Bytes(), nil
404 func (m *BondEnslaveReply) Unmarshal(b []byte) error {
405 buf := codec.NewBuffer(b)
406 m.Retval = buf.DecodeInt32()
410 // SwInterfaceBondDetails defines message 'sw_interface_bond_details'.
411 type SwInterfaceBondDetails struct {
412 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
413 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
414 Mode BondMode `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
415 Lb BondLbAlgo `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
416 NumaOnly bool `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
417 ActiveSlaves uint32 `binapi:"u32,name=active_slaves" json:"active_slaves,omitempty"`
418 Slaves uint32 `binapi:"u32,name=slaves" json:"slaves,omitempty"`
419 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
422 func (m *SwInterfaceBondDetails) Reset() { *m = SwInterfaceBondDetails{} }
423 func (*SwInterfaceBondDetails) GetMessageName() string { return "sw_interface_bond_details" }
424 func (*SwInterfaceBondDetails) GetCrcString() string { return "f5ef2106" }
425 func (*SwInterfaceBondDetails) GetMessageType() api.MessageType {
426 return api.ReplyMessage
429 func (m *SwInterfaceBondDetails) Size() (size int) {
433 size += 4 // m.SwIfIndex
437 size += 1 // m.NumaOnly
438 size += 4 // m.ActiveSlaves
439 size += 4 // m.Slaves
440 size += 64 // m.InterfaceName
443 func (m *SwInterfaceBondDetails) Marshal(b []byte) ([]byte, error) {
445 b = make([]byte, m.Size())
447 buf := codec.NewBuffer(b)
448 buf.EncodeUint32(uint32(m.SwIfIndex))
449 buf.EncodeUint32(m.ID)
450 buf.EncodeUint32(uint32(m.Mode))
451 buf.EncodeUint32(uint32(m.Lb))
452 buf.EncodeBool(m.NumaOnly)
453 buf.EncodeUint32(m.ActiveSlaves)
454 buf.EncodeUint32(m.Slaves)
455 buf.EncodeString(m.InterfaceName, 64)
456 return buf.Bytes(), nil
458 func (m *SwInterfaceBondDetails) Unmarshal(b []byte) error {
459 buf := codec.NewBuffer(b)
460 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
461 m.ID = buf.DecodeUint32()
462 m.Mode = BondMode(buf.DecodeUint32())
463 m.Lb = BondLbAlgo(buf.DecodeUint32())
464 m.NumaOnly = buf.DecodeBool()
465 m.ActiveSlaves = buf.DecodeUint32()
466 m.Slaves = buf.DecodeUint32()
467 m.InterfaceName = buf.DecodeString(64)
471 // SwInterfaceBondDump defines message 'sw_interface_bond_dump'.
472 type SwInterfaceBondDump struct{}
474 func (m *SwInterfaceBondDump) Reset() { *m = SwInterfaceBondDump{} }
475 func (*SwInterfaceBondDump) GetMessageName() string { return "sw_interface_bond_dump" }
476 func (*SwInterfaceBondDump) GetCrcString() string { return "51077d14" }
477 func (*SwInterfaceBondDump) GetMessageType() api.MessageType {
478 return api.RequestMessage
481 func (m *SwInterfaceBondDump) Size() (size int) {
487 func (m *SwInterfaceBondDump) Marshal(b []byte) ([]byte, error) {
489 b = make([]byte, m.Size())
491 buf := codec.NewBuffer(b)
492 return buf.Bytes(), nil
494 func (m *SwInterfaceBondDump) Unmarshal(b []byte) error {
498 // SwInterfaceSetBondWeight defines message 'sw_interface_set_bond_weight'.
499 type SwInterfaceSetBondWeight struct {
500 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
501 Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
504 func (m *SwInterfaceSetBondWeight) Reset() { *m = SwInterfaceSetBondWeight{} }
505 func (*SwInterfaceSetBondWeight) GetMessageName() string { return "sw_interface_set_bond_weight" }
506 func (*SwInterfaceSetBondWeight) GetCrcString() string { return "deb510a0" }
507 func (*SwInterfaceSetBondWeight) GetMessageType() api.MessageType {
508 return api.RequestMessage
511 func (m *SwInterfaceSetBondWeight) Size() (size int) {
515 size += 4 // m.SwIfIndex
516 size += 4 // m.Weight
519 func (m *SwInterfaceSetBondWeight) Marshal(b []byte) ([]byte, error) {
521 b = make([]byte, m.Size())
523 buf := codec.NewBuffer(b)
524 buf.EncodeUint32(uint32(m.SwIfIndex))
525 buf.EncodeUint32(m.Weight)
526 return buf.Bytes(), nil
528 func (m *SwInterfaceSetBondWeight) Unmarshal(b []byte) error {
529 buf := codec.NewBuffer(b)
530 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
531 m.Weight = buf.DecodeUint32()
535 // SwInterfaceSetBondWeightReply defines message 'sw_interface_set_bond_weight_reply'.
536 type SwInterfaceSetBondWeightReply struct {
537 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
540 func (m *SwInterfaceSetBondWeightReply) Reset() { *m = SwInterfaceSetBondWeightReply{} }
541 func (*SwInterfaceSetBondWeightReply) GetMessageName() string {
542 return "sw_interface_set_bond_weight_reply"
544 func (*SwInterfaceSetBondWeightReply) GetCrcString() string { return "e8d4e804" }
545 func (*SwInterfaceSetBondWeightReply) GetMessageType() api.MessageType {
546 return api.ReplyMessage
549 func (m *SwInterfaceSetBondWeightReply) Size() (size int) {
553 size += 4 // m.Retval
556 func (m *SwInterfaceSetBondWeightReply) Marshal(b []byte) ([]byte, error) {
558 b = make([]byte, m.Size())
560 buf := codec.NewBuffer(b)
561 buf.EncodeInt32(m.Retval)
562 return buf.Bytes(), nil
564 func (m *SwInterfaceSetBondWeightReply) Unmarshal(b []byte) error {
565 buf := codec.NewBuffer(b)
566 m.Retval = buf.DecodeInt32()
570 // SwInterfaceSlaveDetails defines message 'sw_interface_slave_details'.
571 type SwInterfaceSlaveDetails struct {
572 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
573 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
574 IsPassive bool `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
575 IsLongTimeout bool `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
576 IsLocalNuma bool `binapi:"bool,name=is_local_numa" json:"is_local_numa,omitempty"`
577 Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
580 func (m *SwInterfaceSlaveDetails) Reset() { *m = SwInterfaceSlaveDetails{} }
581 func (*SwInterfaceSlaveDetails) GetMessageName() string { return "sw_interface_slave_details" }
582 func (*SwInterfaceSlaveDetails) GetCrcString() string { return "3c4a0e23" }
583 func (*SwInterfaceSlaveDetails) GetMessageType() api.MessageType {
584 return api.ReplyMessage
587 func (m *SwInterfaceSlaveDetails) Size() (size int) {
591 size += 4 // m.SwIfIndex
592 size += 64 // m.InterfaceName
593 size += 1 // m.IsPassive
594 size += 1 // m.IsLongTimeout
595 size += 1 // m.IsLocalNuma
596 size += 4 // m.Weight
599 func (m *SwInterfaceSlaveDetails) Marshal(b []byte) ([]byte, error) {
601 b = make([]byte, m.Size())
603 buf := codec.NewBuffer(b)
604 buf.EncodeUint32(uint32(m.SwIfIndex))
605 buf.EncodeString(m.InterfaceName, 64)
606 buf.EncodeBool(m.IsPassive)
607 buf.EncodeBool(m.IsLongTimeout)
608 buf.EncodeBool(m.IsLocalNuma)
609 buf.EncodeUint32(m.Weight)
610 return buf.Bytes(), nil
612 func (m *SwInterfaceSlaveDetails) Unmarshal(b []byte) error {
613 buf := codec.NewBuffer(b)
614 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
615 m.InterfaceName = buf.DecodeString(64)
616 m.IsPassive = buf.DecodeBool()
617 m.IsLongTimeout = buf.DecodeBool()
618 m.IsLocalNuma = buf.DecodeBool()
619 m.Weight = buf.DecodeUint32()
623 // SwInterfaceSlaveDump defines message 'sw_interface_slave_dump'.
624 type SwInterfaceSlaveDump struct {
625 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
628 func (m *SwInterfaceSlaveDump) Reset() { *m = SwInterfaceSlaveDump{} }
629 func (*SwInterfaceSlaveDump) GetMessageName() string { return "sw_interface_slave_dump" }
630 func (*SwInterfaceSlaveDump) GetCrcString() string { return "f9e6675e" }
631 func (*SwInterfaceSlaveDump) GetMessageType() api.MessageType {
632 return api.RequestMessage
635 func (m *SwInterfaceSlaveDump) Size() (size int) {
639 size += 4 // m.SwIfIndex
642 func (m *SwInterfaceSlaveDump) Marshal(b []byte) ([]byte, error) {
644 b = make([]byte, m.Size())
646 buf := codec.NewBuffer(b)
647 buf.EncodeUint32(uint32(m.SwIfIndex))
648 return buf.Bytes(), nil
650 func (m *SwInterfaceSlaveDump) Unmarshal(b []byte) error {
651 buf := codec.NewBuffer(b)
652 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
656 func init() { file_bond_binapi_init() }
657 func file_bond_binapi_init() {
658 api.RegisterMessage((*BondCreate)(nil), "bond_create_48883c7e")
659 api.RegisterMessage((*BondCreateReply)(nil), "bond_create_reply_5383d31f")
660 api.RegisterMessage((*BondDelete)(nil), "bond_delete_f9e6675e")
661 api.RegisterMessage((*BondDeleteReply)(nil), "bond_delete_reply_e8d4e804")
662 api.RegisterMessage((*BondDetachSlave)(nil), "bond_detach_slave_f9e6675e")
663 api.RegisterMessage((*BondDetachSlaveReply)(nil), "bond_detach_slave_reply_e8d4e804")
664 api.RegisterMessage((*BondEnslave)(nil), "bond_enslave_076ecfa7")
665 api.RegisterMessage((*BondEnslaveReply)(nil), "bond_enslave_reply_e8d4e804")
666 api.RegisterMessage((*SwInterfaceBondDetails)(nil), "sw_interface_bond_details_f5ef2106")
667 api.RegisterMessage((*SwInterfaceBondDump)(nil), "sw_interface_bond_dump_51077d14")
668 api.RegisterMessage((*SwInterfaceSetBondWeight)(nil), "sw_interface_set_bond_weight_deb510a0")
669 api.RegisterMessage((*SwInterfaceSetBondWeightReply)(nil), "sw_interface_set_bond_weight_reply_e8d4e804")
670 api.RegisterMessage((*SwInterfaceSlaveDetails)(nil), "sw_interface_slave_details_3c4a0e23")
671 api.RegisterMessage((*SwInterfaceSlaveDump)(nil), "sw_interface_slave_dump_f9e6675e")
674 // Messages returns list of all messages in this module.
675 func AllMessages() []api.Message {
676 return []api.Message{
678 (*BondCreateReply)(nil),
680 (*BondDeleteReply)(nil),
681 (*BondDetachSlave)(nil),
682 (*BondDetachSlaveReply)(nil),
684 (*BondEnslaveReply)(nil),
685 (*SwInterfaceBondDetails)(nil),
686 (*SwInterfaceBondDump)(nil),
687 (*SwInterfaceSetBondWeight)(nil),
688 (*SwInterfaceSetBondWeightReply)(nil),
689 (*SwInterfaceSlaveDetails)(nil),
690 (*SwInterfaceSlaveDump)(nil),