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.
18 api "git.fd.io/govpp.git/api"
19 ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
20 interface_types "git.fd.io/govpp.git/binapi/interface_types"
21 codec "git.fd.io/govpp.git/codec"
24 // This is a compile-time assertion to ensure that this generated file
25 // is compatible with the GoVPP api package it is being compiled against.
26 // A compilation error at this line likely means your copy of the
27 // GoVPP api package needs to be updated.
28 const _ = api.GoVppAPIPackageIsVersion2
33 VersionCrc = 0xa65a4a1e
36 // BondLbAlgo defines enum 'bond_lb_algo'.
37 type BondLbAlgo uint32
40 BOND_API_LB_ALGO_L2 BondLbAlgo = 0
41 BOND_API_LB_ALGO_L34 BondLbAlgo = 1
42 BOND_API_LB_ALGO_L23 BondLbAlgo = 2
43 BOND_API_LB_ALGO_RR BondLbAlgo = 3
44 BOND_API_LB_ALGO_BC BondLbAlgo = 4
45 BOND_API_LB_ALGO_AB BondLbAlgo = 5
49 BondLbAlgo_name = map[uint32]string{
50 0: "BOND_API_LB_ALGO_L2",
51 1: "BOND_API_LB_ALGO_L34",
52 2: "BOND_API_LB_ALGO_L23",
53 3: "BOND_API_LB_ALGO_RR",
54 4: "BOND_API_LB_ALGO_BC",
55 5: "BOND_API_LB_ALGO_AB",
57 BondLbAlgo_value = map[string]uint32{
58 "BOND_API_LB_ALGO_L2": 0,
59 "BOND_API_LB_ALGO_L34": 1,
60 "BOND_API_LB_ALGO_L23": 2,
61 "BOND_API_LB_ALGO_RR": 3,
62 "BOND_API_LB_ALGO_BC": 4,
63 "BOND_API_LB_ALGO_AB": 5,
67 func (x BondLbAlgo) String() string {
68 s, ok := BondLbAlgo_name[uint32(x)]
72 return "BondLbAlgo(" + strconv.Itoa(int(x)) + ")"
75 // BondMode defines enum 'bond_mode'.
79 BOND_API_MODE_ROUND_ROBIN BondMode = 1
80 BOND_API_MODE_ACTIVE_BACKUP BondMode = 2
81 BOND_API_MODE_XOR BondMode = 3
82 BOND_API_MODE_BROADCAST BondMode = 4
83 BOND_API_MODE_LACP BondMode = 5
87 BondMode_name = map[uint32]string{
88 1: "BOND_API_MODE_ROUND_ROBIN",
89 2: "BOND_API_MODE_ACTIVE_BACKUP",
90 3: "BOND_API_MODE_XOR",
91 4: "BOND_API_MODE_BROADCAST",
92 5: "BOND_API_MODE_LACP",
94 BondMode_value = map[string]uint32{
95 "BOND_API_MODE_ROUND_ROBIN": 1,
96 "BOND_API_MODE_ACTIVE_BACKUP": 2,
97 "BOND_API_MODE_XOR": 3,
98 "BOND_API_MODE_BROADCAST": 4,
99 "BOND_API_MODE_LACP": 5,
103 func (x BondMode) String() string {
104 s, ok := BondMode_name[uint32(x)]
108 return "BondMode(" + strconv.Itoa(int(x)) + ")"
111 // BondCreate defines message 'bond_create'.
112 type BondCreate struct {
113 ID uint32 `binapi:"u32,name=id,default=4294967295" json:"id,omitempty"`
114 UseCustomMac bool `binapi:"bool,name=use_custom_mac" json:"use_custom_mac,omitempty"`
115 MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
116 Mode BondMode `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
117 Lb BondLbAlgo `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
118 NumaOnly bool `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
121 func (m *BondCreate) Reset() { *m = BondCreate{} }
122 func (*BondCreate) GetMessageName() string { return "bond_create" }
123 func (*BondCreate) GetCrcString() string { return "48883c7e" }
124 func (*BondCreate) GetMessageType() api.MessageType {
125 return api.RequestMessage
128 func (m *BondCreate) Size() (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) {
142 b = make([]byte, m.Size())
144 buf := codec.NewBuffer(b)
145 buf.EncodeUint32(m.ID)
146 buf.EncodeBool(m.UseCustomMac)
147 buf.EncodeBytes(m.MacAddress[:], 6)
148 buf.EncodeUint32(uint32(m.Mode))
149 buf.EncodeUint32(uint32(m.Lb))
150 buf.EncodeBool(m.NumaOnly)
151 return buf.Bytes(), nil
153 func (m *BondCreate) Unmarshal(b []byte) error {
154 buf := codec.NewBuffer(b)
155 m.ID = buf.DecodeUint32()
156 m.UseCustomMac = buf.DecodeBool()
157 copy(m.MacAddress[:], buf.DecodeBytes(6))
158 m.Mode = BondMode(buf.DecodeUint32())
159 m.Lb = BondLbAlgo(buf.DecodeUint32())
160 m.NumaOnly = buf.DecodeBool()
164 // BondCreateReply defines message 'bond_create_reply'.
165 type BondCreateReply struct {
166 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
167 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
170 func (m *BondCreateReply) Reset() { *m = BondCreateReply{} }
171 func (*BondCreateReply) GetMessageName() string { return "bond_create_reply" }
172 func (*BondCreateReply) GetCrcString() string { return "5383d31f" }
173 func (*BondCreateReply) GetMessageType() api.MessageType {
174 return api.ReplyMessage
177 func (m *BondCreateReply) Size() (size int) {
181 size += 4 // m.Retval
182 size += 4 // m.SwIfIndex
185 func (m *BondCreateReply) Marshal(b []byte) ([]byte, error) {
187 b = make([]byte, m.Size())
189 buf := codec.NewBuffer(b)
190 buf.EncodeInt32(m.Retval)
191 buf.EncodeUint32(uint32(m.SwIfIndex))
192 return buf.Bytes(), nil
194 func (m *BondCreateReply) Unmarshal(b []byte) error {
195 buf := codec.NewBuffer(b)
196 m.Retval = buf.DecodeInt32()
197 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
201 // BondDelete defines message 'bond_delete'.
202 type BondDelete struct {
203 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
206 func (m *BondDelete) Reset() { *m = BondDelete{} }
207 func (*BondDelete) GetMessageName() string { return "bond_delete" }
208 func (*BondDelete) GetCrcString() string { return "f9e6675e" }
209 func (*BondDelete) GetMessageType() api.MessageType {
210 return api.RequestMessage
213 func (m *BondDelete) Size() (size int) {
217 size += 4 // m.SwIfIndex
220 func (m *BondDelete) Marshal(b []byte) ([]byte, error) {
222 b = make([]byte, m.Size())
224 buf := codec.NewBuffer(b)
225 buf.EncodeUint32(uint32(m.SwIfIndex))
226 return buf.Bytes(), nil
228 func (m *BondDelete) Unmarshal(b []byte) error {
229 buf := codec.NewBuffer(b)
230 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
234 // BondDeleteReply defines message 'bond_delete_reply'.
235 type BondDeleteReply struct {
236 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
239 func (m *BondDeleteReply) Reset() { *m = BondDeleteReply{} }
240 func (*BondDeleteReply) GetMessageName() string { return "bond_delete_reply" }
241 func (*BondDeleteReply) GetCrcString() string { return "e8d4e804" }
242 func (*BondDeleteReply) GetMessageType() api.MessageType {
243 return api.ReplyMessage
246 func (m *BondDeleteReply) Size() (size int) {
250 size += 4 // m.Retval
253 func (m *BondDeleteReply) Marshal(b []byte) ([]byte, error) {
255 b = make([]byte, m.Size())
257 buf := codec.NewBuffer(b)
258 buf.EncodeInt32(m.Retval)
259 return buf.Bytes(), nil
261 func (m *BondDeleteReply) Unmarshal(b []byte) error {
262 buf := codec.NewBuffer(b)
263 m.Retval = buf.DecodeInt32()
267 // BondDetachSlave defines message 'bond_detach_slave'.
268 type BondDetachSlave struct {
269 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
272 func (m *BondDetachSlave) Reset() { *m = BondDetachSlave{} }
273 func (*BondDetachSlave) GetMessageName() string { return "bond_detach_slave" }
274 func (*BondDetachSlave) GetCrcString() string { return "f9e6675e" }
275 func (*BondDetachSlave) GetMessageType() api.MessageType {
276 return api.RequestMessage
279 func (m *BondDetachSlave) Size() (size int) {
283 size += 4 // m.SwIfIndex
286 func (m *BondDetachSlave) Marshal(b []byte) ([]byte, error) {
288 b = make([]byte, m.Size())
290 buf := codec.NewBuffer(b)
291 buf.EncodeUint32(uint32(m.SwIfIndex))
292 return buf.Bytes(), nil
294 func (m *BondDetachSlave) Unmarshal(b []byte) error {
295 buf := codec.NewBuffer(b)
296 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
300 // BondDetachSlaveReply defines message 'bond_detach_slave_reply'.
301 type BondDetachSlaveReply struct {
302 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
305 func (m *BondDetachSlaveReply) Reset() { *m = BondDetachSlaveReply{} }
306 func (*BondDetachSlaveReply) GetMessageName() string { return "bond_detach_slave_reply" }
307 func (*BondDetachSlaveReply) GetCrcString() string { return "e8d4e804" }
308 func (*BondDetachSlaveReply) GetMessageType() api.MessageType {
309 return api.ReplyMessage
312 func (m *BondDetachSlaveReply) Size() (size int) {
316 size += 4 // m.Retval
319 func (m *BondDetachSlaveReply) Marshal(b []byte) ([]byte, error) {
321 b = make([]byte, m.Size())
323 buf := codec.NewBuffer(b)
324 buf.EncodeInt32(m.Retval)
325 return buf.Bytes(), nil
327 func (m *BondDetachSlaveReply) Unmarshal(b []byte) error {
328 buf := codec.NewBuffer(b)
329 m.Retval = buf.DecodeInt32()
333 // BondEnslave defines message 'bond_enslave'.
334 type BondEnslave struct {
335 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
336 BondSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bond_sw_if_index" json:"bond_sw_if_index,omitempty"`
337 IsPassive bool `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
338 IsLongTimeout bool `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
341 func (m *BondEnslave) Reset() { *m = BondEnslave{} }
342 func (*BondEnslave) GetMessageName() string { return "bond_enslave" }
343 func (*BondEnslave) GetCrcString() string { return "076ecfa7" }
344 func (*BondEnslave) GetMessageType() api.MessageType {
345 return api.RequestMessage
348 func (m *BondEnslave) Size() (size int) {
352 size += 4 // m.SwIfIndex
353 size += 4 // m.BondSwIfIndex
354 size += 1 // m.IsPassive
355 size += 1 // m.IsLongTimeout
358 func (m *BondEnslave) Marshal(b []byte) ([]byte, error) {
360 b = make([]byte, m.Size())
362 buf := codec.NewBuffer(b)
363 buf.EncodeUint32(uint32(m.SwIfIndex))
364 buf.EncodeUint32(uint32(m.BondSwIfIndex))
365 buf.EncodeBool(m.IsPassive)
366 buf.EncodeBool(m.IsLongTimeout)
367 return buf.Bytes(), nil
369 func (m *BondEnslave) Unmarshal(b []byte) error {
370 buf := codec.NewBuffer(b)
371 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
372 m.BondSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
373 m.IsPassive = buf.DecodeBool()
374 m.IsLongTimeout = buf.DecodeBool()
378 // BondEnslaveReply defines message 'bond_enslave_reply'.
379 type BondEnslaveReply struct {
380 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
383 func (m *BondEnslaveReply) Reset() { *m = BondEnslaveReply{} }
384 func (*BondEnslaveReply) GetMessageName() string { return "bond_enslave_reply" }
385 func (*BondEnslaveReply) GetCrcString() string { return "e8d4e804" }
386 func (*BondEnslaveReply) GetMessageType() api.MessageType {
387 return api.ReplyMessage
390 func (m *BondEnslaveReply) Size() (size int) {
394 size += 4 // m.Retval
397 func (m *BondEnslaveReply) Marshal(b []byte) ([]byte, error) {
399 b = make([]byte, m.Size())
401 buf := codec.NewBuffer(b)
402 buf.EncodeInt32(m.Retval)
403 return buf.Bytes(), nil
405 func (m *BondEnslaveReply) Unmarshal(b []byte) error {
406 buf := codec.NewBuffer(b)
407 m.Retval = buf.DecodeInt32()
411 // SwInterfaceBondDetails defines message 'sw_interface_bond_details'.
412 type SwInterfaceBondDetails struct {
413 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
414 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
415 Mode BondMode `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
416 Lb BondLbAlgo `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
417 NumaOnly bool `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
418 ActiveSlaves uint32 `binapi:"u32,name=active_slaves" json:"active_slaves,omitempty"`
419 Slaves uint32 `binapi:"u32,name=slaves" json:"slaves,omitempty"`
420 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
423 func (m *SwInterfaceBondDetails) Reset() { *m = SwInterfaceBondDetails{} }
424 func (*SwInterfaceBondDetails) GetMessageName() string { return "sw_interface_bond_details" }
425 func (*SwInterfaceBondDetails) GetCrcString() string { return "f5ef2106" }
426 func (*SwInterfaceBondDetails) GetMessageType() api.MessageType {
427 return api.ReplyMessage
430 func (m *SwInterfaceBondDetails) Size() (size int) {
434 size += 4 // m.SwIfIndex
438 size += 1 // m.NumaOnly
439 size += 4 // m.ActiveSlaves
440 size += 4 // m.Slaves
441 size += 64 // m.InterfaceName
444 func (m *SwInterfaceBondDetails) Marshal(b []byte) ([]byte, error) {
446 b = make([]byte, m.Size())
448 buf := codec.NewBuffer(b)
449 buf.EncodeUint32(uint32(m.SwIfIndex))
450 buf.EncodeUint32(m.ID)
451 buf.EncodeUint32(uint32(m.Mode))
452 buf.EncodeUint32(uint32(m.Lb))
453 buf.EncodeBool(m.NumaOnly)
454 buf.EncodeUint32(m.ActiveSlaves)
455 buf.EncodeUint32(m.Slaves)
456 buf.EncodeString(m.InterfaceName, 64)
457 return buf.Bytes(), nil
459 func (m *SwInterfaceBondDetails) Unmarshal(b []byte) error {
460 buf := codec.NewBuffer(b)
461 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
462 m.ID = buf.DecodeUint32()
463 m.Mode = BondMode(buf.DecodeUint32())
464 m.Lb = BondLbAlgo(buf.DecodeUint32())
465 m.NumaOnly = buf.DecodeBool()
466 m.ActiveSlaves = buf.DecodeUint32()
467 m.Slaves = buf.DecodeUint32()
468 m.InterfaceName = buf.DecodeString(64)
472 // SwInterfaceBondDump defines message 'sw_interface_bond_dump'.
473 type SwInterfaceBondDump struct{}
475 func (m *SwInterfaceBondDump) Reset() { *m = SwInterfaceBondDump{} }
476 func (*SwInterfaceBondDump) GetMessageName() string { return "sw_interface_bond_dump" }
477 func (*SwInterfaceBondDump) GetCrcString() string { return "51077d14" }
478 func (*SwInterfaceBondDump) GetMessageType() api.MessageType {
479 return api.RequestMessage
482 func (m *SwInterfaceBondDump) Size() (size int) {
488 func (m *SwInterfaceBondDump) Marshal(b []byte) ([]byte, error) {
490 b = make([]byte, m.Size())
492 buf := codec.NewBuffer(b)
493 return buf.Bytes(), nil
495 func (m *SwInterfaceBondDump) Unmarshal(b []byte) error {
499 // SwInterfaceSetBondWeight defines message 'sw_interface_set_bond_weight'.
500 type SwInterfaceSetBondWeight struct {
501 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
502 Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
505 func (m *SwInterfaceSetBondWeight) Reset() { *m = SwInterfaceSetBondWeight{} }
506 func (*SwInterfaceSetBondWeight) GetMessageName() string { return "sw_interface_set_bond_weight" }
507 func (*SwInterfaceSetBondWeight) GetCrcString() string { return "deb510a0" }
508 func (*SwInterfaceSetBondWeight) GetMessageType() api.MessageType {
509 return api.RequestMessage
512 func (m *SwInterfaceSetBondWeight) Size() (size int) {
516 size += 4 // m.SwIfIndex
517 size += 4 // m.Weight
520 func (m *SwInterfaceSetBondWeight) Marshal(b []byte) ([]byte, error) {
522 b = make([]byte, m.Size())
524 buf := codec.NewBuffer(b)
525 buf.EncodeUint32(uint32(m.SwIfIndex))
526 buf.EncodeUint32(m.Weight)
527 return buf.Bytes(), nil
529 func (m *SwInterfaceSetBondWeight) Unmarshal(b []byte) error {
530 buf := codec.NewBuffer(b)
531 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
532 m.Weight = buf.DecodeUint32()
536 // SwInterfaceSetBondWeightReply defines message 'sw_interface_set_bond_weight_reply'.
537 type SwInterfaceSetBondWeightReply struct {
538 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
541 func (m *SwInterfaceSetBondWeightReply) Reset() { *m = SwInterfaceSetBondWeightReply{} }
542 func (*SwInterfaceSetBondWeightReply) GetMessageName() string {
543 return "sw_interface_set_bond_weight_reply"
545 func (*SwInterfaceSetBondWeightReply) GetCrcString() string { return "e8d4e804" }
546 func (*SwInterfaceSetBondWeightReply) GetMessageType() api.MessageType {
547 return api.ReplyMessage
550 func (m *SwInterfaceSetBondWeightReply) Size() (size int) {
554 size += 4 // m.Retval
557 func (m *SwInterfaceSetBondWeightReply) Marshal(b []byte) ([]byte, error) {
559 b = make([]byte, m.Size())
561 buf := codec.NewBuffer(b)
562 buf.EncodeInt32(m.Retval)
563 return buf.Bytes(), nil
565 func (m *SwInterfaceSetBondWeightReply) Unmarshal(b []byte) error {
566 buf := codec.NewBuffer(b)
567 m.Retval = buf.DecodeInt32()
571 // SwInterfaceSlaveDetails defines message 'sw_interface_slave_details'.
572 type SwInterfaceSlaveDetails struct {
573 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
574 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
575 IsPassive bool `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
576 IsLongTimeout bool `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
577 IsLocalNuma bool `binapi:"bool,name=is_local_numa" json:"is_local_numa,omitempty"`
578 Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
581 func (m *SwInterfaceSlaveDetails) Reset() { *m = SwInterfaceSlaveDetails{} }
582 func (*SwInterfaceSlaveDetails) GetMessageName() string { return "sw_interface_slave_details" }
583 func (*SwInterfaceSlaveDetails) GetCrcString() string { return "3c4a0e23" }
584 func (*SwInterfaceSlaveDetails) GetMessageType() api.MessageType {
585 return api.ReplyMessage
588 func (m *SwInterfaceSlaveDetails) Size() (size int) {
592 size += 4 // m.SwIfIndex
593 size += 64 // m.InterfaceName
594 size += 1 // m.IsPassive
595 size += 1 // m.IsLongTimeout
596 size += 1 // m.IsLocalNuma
597 size += 4 // m.Weight
600 func (m *SwInterfaceSlaveDetails) Marshal(b []byte) ([]byte, error) {
602 b = make([]byte, m.Size())
604 buf := codec.NewBuffer(b)
605 buf.EncodeUint32(uint32(m.SwIfIndex))
606 buf.EncodeString(m.InterfaceName, 64)
607 buf.EncodeBool(m.IsPassive)
608 buf.EncodeBool(m.IsLongTimeout)
609 buf.EncodeBool(m.IsLocalNuma)
610 buf.EncodeUint32(m.Weight)
611 return buf.Bytes(), nil
613 func (m *SwInterfaceSlaveDetails) Unmarshal(b []byte) error {
614 buf := codec.NewBuffer(b)
615 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
616 m.InterfaceName = buf.DecodeString(64)
617 m.IsPassive = buf.DecodeBool()
618 m.IsLongTimeout = buf.DecodeBool()
619 m.IsLocalNuma = buf.DecodeBool()
620 m.Weight = buf.DecodeUint32()
624 // SwInterfaceSlaveDump defines message 'sw_interface_slave_dump'.
625 type SwInterfaceSlaveDump struct {
626 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
629 func (m *SwInterfaceSlaveDump) Reset() { *m = SwInterfaceSlaveDump{} }
630 func (*SwInterfaceSlaveDump) GetMessageName() string { return "sw_interface_slave_dump" }
631 func (*SwInterfaceSlaveDump) GetCrcString() string { return "f9e6675e" }
632 func (*SwInterfaceSlaveDump) GetMessageType() api.MessageType {
633 return api.RequestMessage
636 func (m *SwInterfaceSlaveDump) Size() (size int) {
640 size += 4 // m.SwIfIndex
643 func (m *SwInterfaceSlaveDump) Marshal(b []byte) ([]byte, error) {
645 b = make([]byte, m.Size())
647 buf := codec.NewBuffer(b)
648 buf.EncodeUint32(uint32(m.SwIfIndex))
649 return buf.Bytes(), nil
651 func (m *SwInterfaceSlaveDump) Unmarshal(b []byte) error {
652 buf := codec.NewBuffer(b)
653 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
657 func init() { file_bond_binapi_init() }
658 func file_bond_binapi_init() {
659 api.RegisterMessage((*BondCreate)(nil), "bond_create_48883c7e")
660 api.RegisterMessage((*BondCreateReply)(nil), "bond_create_reply_5383d31f")
661 api.RegisterMessage((*BondDelete)(nil), "bond_delete_f9e6675e")
662 api.RegisterMessage((*BondDeleteReply)(nil), "bond_delete_reply_e8d4e804")
663 api.RegisterMessage((*BondDetachSlave)(nil), "bond_detach_slave_f9e6675e")
664 api.RegisterMessage((*BondDetachSlaveReply)(nil), "bond_detach_slave_reply_e8d4e804")
665 api.RegisterMessage((*BondEnslave)(nil), "bond_enslave_076ecfa7")
666 api.RegisterMessage((*BondEnslaveReply)(nil), "bond_enslave_reply_e8d4e804")
667 api.RegisterMessage((*SwInterfaceBondDetails)(nil), "sw_interface_bond_details_f5ef2106")
668 api.RegisterMessage((*SwInterfaceBondDump)(nil), "sw_interface_bond_dump_51077d14")
669 api.RegisterMessage((*SwInterfaceSetBondWeight)(nil), "sw_interface_set_bond_weight_deb510a0")
670 api.RegisterMessage((*SwInterfaceSetBondWeightReply)(nil), "sw_interface_set_bond_weight_reply_e8d4e804")
671 api.RegisterMessage((*SwInterfaceSlaveDetails)(nil), "sw_interface_slave_details_3c4a0e23")
672 api.RegisterMessage((*SwInterfaceSlaveDump)(nil), "sw_interface_slave_dump_f9e6675e")
675 // Messages returns list of all messages in this module.
676 func AllMessages() []api.Message {
677 return []api.Message{
679 (*BondCreateReply)(nil),
681 (*BondDeleteReply)(nil),
682 (*BondDetachSlave)(nil),
683 (*BondDetachSlaveReply)(nil),
685 (*BondEnslaveReply)(nil),
686 (*SwInterfaceBondDetails)(nil),
687 (*SwInterfaceBondDump)(nil),
688 (*SwInterfaceSetBondWeight)(nil),
689 (*SwInterfaceSetBondWeightReply)(nil),
690 (*SwInterfaceSlaveDetails)(nil),
691 (*SwInterfaceSlaveDump)(nil),