1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0
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 = 0xa03f5330
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 // BondAddMember defines message 'bond_add_member'.
112 type BondAddMember struct {
113 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
114 BondSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bond_sw_if_index" json:"bond_sw_if_index,omitempty"`
115 IsPassive bool `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
116 IsLongTimeout bool `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
119 func (m *BondAddMember) Reset() { *m = BondAddMember{} }
120 func (*BondAddMember) GetMessageName() string { return "bond_add_member" }
121 func (*BondAddMember) GetCrcString() string { return "e7d14948" }
122 func (*BondAddMember) GetMessageType() api.MessageType {
123 return api.RequestMessage
126 func (m *BondAddMember) Size() (size int) {
130 size += 4 // m.SwIfIndex
131 size += 4 // m.BondSwIfIndex
132 size += 1 // m.IsPassive
133 size += 1 // m.IsLongTimeout
136 func (m *BondAddMember) Marshal(b []byte) ([]byte, error) {
138 b = make([]byte, m.Size())
140 buf := codec.NewBuffer(b)
141 buf.EncodeUint32(uint32(m.SwIfIndex))
142 buf.EncodeUint32(uint32(m.BondSwIfIndex))
143 buf.EncodeBool(m.IsPassive)
144 buf.EncodeBool(m.IsLongTimeout)
145 return buf.Bytes(), nil
147 func (m *BondAddMember) Unmarshal(b []byte) error {
148 buf := codec.NewBuffer(b)
149 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
150 m.BondSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
151 m.IsPassive = buf.DecodeBool()
152 m.IsLongTimeout = buf.DecodeBool()
156 // BondAddMemberReply defines message 'bond_add_member_reply'.
157 type BondAddMemberReply struct {
158 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
161 func (m *BondAddMemberReply) Reset() { *m = BondAddMemberReply{} }
162 func (*BondAddMemberReply) GetMessageName() string { return "bond_add_member_reply" }
163 func (*BondAddMemberReply) GetCrcString() string { return "e8d4e804" }
164 func (*BondAddMemberReply) GetMessageType() api.MessageType {
165 return api.ReplyMessage
168 func (m *BondAddMemberReply) Size() (size int) {
172 size += 4 // m.Retval
175 func (m *BondAddMemberReply) Marshal(b []byte) ([]byte, error) {
177 b = make([]byte, m.Size())
179 buf := codec.NewBuffer(b)
180 buf.EncodeInt32(m.Retval)
181 return buf.Bytes(), nil
183 func (m *BondAddMemberReply) Unmarshal(b []byte) error {
184 buf := codec.NewBuffer(b)
185 m.Retval = buf.DecodeInt32()
189 // BondCreate defines message 'bond_create'.
190 // Deprecated: the message will be removed in the future versions
191 type BondCreate struct {
192 ID uint32 `binapi:"u32,name=id,default=4294967295" json:"id,omitempty"`
193 UseCustomMac bool `binapi:"bool,name=use_custom_mac" json:"use_custom_mac,omitempty"`
194 MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
195 Mode BondMode `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
196 Lb BondLbAlgo `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
197 NumaOnly bool `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
200 func (m *BondCreate) Reset() { *m = BondCreate{} }
201 func (*BondCreate) GetMessageName() string { return "bond_create" }
202 func (*BondCreate) GetCrcString() string { return "f1dbd4ff" }
203 func (*BondCreate) GetMessageType() api.MessageType {
204 return api.RequestMessage
207 func (m *BondCreate) Size() (size int) {
212 size += 1 // m.UseCustomMac
213 size += 1 * 6 // m.MacAddress
216 size += 1 // m.NumaOnly
219 func (m *BondCreate) Marshal(b []byte) ([]byte, error) {
221 b = make([]byte, m.Size())
223 buf := codec.NewBuffer(b)
224 buf.EncodeUint32(m.ID)
225 buf.EncodeBool(m.UseCustomMac)
226 buf.EncodeBytes(m.MacAddress[:], 6)
227 buf.EncodeUint32(uint32(m.Mode))
228 buf.EncodeUint32(uint32(m.Lb))
229 buf.EncodeBool(m.NumaOnly)
230 return buf.Bytes(), nil
232 func (m *BondCreate) Unmarshal(b []byte) error {
233 buf := codec.NewBuffer(b)
234 m.ID = buf.DecodeUint32()
235 m.UseCustomMac = buf.DecodeBool()
236 copy(m.MacAddress[:], buf.DecodeBytes(6))
237 m.Mode = BondMode(buf.DecodeUint32())
238 m.Lb = BondLbAlgo(buf.DecodeUint32())
239 m.NumaOnly = buf.DecodeBool()
243 // BondCreate2 defines message 'bond_create2'.
244 type BondCreate2 struct {
245 Mode BondMode `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
246 Lb BondLbAlgo `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
247 NumaOnly bool `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
248 EnableGso bool `binapi:"bool,name=enable_gso" json:"enable_gso,omitempty"`
249 UseCustomMac bool `binapi:"bool,name=use_custom_mac" json:"use_custom_mac,omitempty"`
250 MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
251 ID uint32 `binapi:"u32,name=id,default=4294967295" json:"id,omitempty"`
254 func (m *BondCreate2) Reset() { *m = BondCreate2{} }
255 func (*BondCreate2) GetMessageName() string { return "bond_create2" }
256 func (*BondCreate2) GetCrcString() string { return "912fda76" }
257 func (*BondCreate2) GetMessageType() api.MessageType {
258 return api.RequestMessage
261 func (m *BondCreate2) Size() (size int) {
267 size += 1 // m.NumaOnly
268 size += 1 // m.EnableGso
269 size += 1 // m.UseCustomMac
270 size += 1 * 6 // m.MacAddress
274 func (m *BondCreate2) Marshal(b []byte) ([]byte, error) {
276 b = make([]byte, m.Size())
278 buf := codec.NewBuffer(b)
279 buf.EncodeUint32(uint32(m.Mode))
280 buf.EncodeUint32(uint32(m.Lb))
281 buf.EncodeBool(m.NumaOnly)
282 buf.EncodeBool(m.EnableGso)
283 buf.EncodeBool(m.UseCustomMac)
284 buf.EncodeBytes(m.MacAddress[:], 6)
285 buf.EncodeUint32(m.ID)
286 return buf.Bytes(), nil
288 func (m *BondCreate2) Unmarshal(b []byte) error {
289 buf := codec.NewBuffer(b)
290 m.Mode = BondMode(buf.DecodeUint32())
291 m.Lb = BondLbAlgo(buf.DecodeUint32())
292 m.NumaOnly = buf.DecodeBool()
293 m.EnableGso = buf.DecodeBool()
294 m.UseCustomMac = buf.DecodeBool()
295 copy(m.MacAddress[:], buf.DecodeBytes(6))
296 m.ID = buf.DecodeUint32()
300 // BondCreate2Reply defines message 'bond_create2_reply'.
301 type BondCreate2Reply 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"`
306 func (m *BondCreate2Reply) Reset() { *m = BondCreate2Reply{} }
307 func (*BondCreate2Reply) GetMessageName() string { return "bond_create2_reply" }
308 func (*BondCreate2Reply) GetCrcString() string { return "5383d31f" }
309 func (*BondCreate2Reply) GetMessageType() api.MessageType {
310 return api.ReplyMessage
313 func (m *BondCreate2Reply) Size() (size int) {
317 size += 4 // m.Retval
318 size += 4 // m.SwIfIndex
321 func (m *BondCreate2Reply) Marshal(b []byte) ([]byte, error) {
323 b = make([]byte, m.Size())
325 buf := codec.NewBuffer(b)
326 buf.EncodeInt32(m.Retval)
327 buf.EncodeUint32(uint32(m.SwIfIndex))
328 return buf.Bytes(), nil
330 func (m *BondCreate2Reply) Unmarshal(b []byte) error {
331 buf := codec.NewBuffer(b)
332 m.Retval = buf.DecodeInt32()
333 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
337 // BondCreateReply defines message 'bond_create_reply'.
338 type BondCreateReply struct {
339 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
340 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
343 func (m *BondCreateReply) Reset() { *m = BondCreateReply{} }
344 func (*BondCreateReply) GetMessageName() string { return "bond_create_reply" }
345 func (*BondCreateReply) GetCrcString() string { return "5383d31f" }
346 func (*BondCreateReply) GetMessageType() api.MessageType {
347 return api.ReplyMessage
350 func (m *BondCreateReply) Size() (size int) {
354 size += 4 // m.Retval
355 size += 4 // m.SwIfIndex
358 func (m *BondCreateReply) Marshal(b []byte) ([]byte, error) {
360 b = make([]byte, m.Size())
362 buf := codec.NewBuffer(b)
363 buf.EncodeInt32(m.Retval)
364 buf.EncodeUint32(uint32(m.SwIfIndex))
365 return buf.Bytes(), nil
367 func (m *BondCreateReply) Unmarshal(b []byte) error {
368 buf := codec.NewBuffer(b)
369 m.Retval = buf.DecodeInt32()
370 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
374 // BondDelete defines message 'bond_delete'.
375 type BondDelete struct {
376 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
379 func (m *BondDelete) Reset() { *m = BondDelete{} }
380 func (*BondDelete) GetMessageName() string { return "bond_delete" }
381 func (*BondDelete) GetCrcString() string { return "f9e6675e" }
382 func (*BondDelete) GetMessageType() api.MessageType {
383 return api.RequestMessage
386 func (m *BondDelete) Size() (size int) {
390 size += 4 // m.SwIfIndex
393 func (m *BondDelete) Marshal(b []byte) ([]byte, error) {
395 b = make([]byte, m.Size())
397 buf := codec.NewBuffer(b)
398 buf.EncodeUint32(uint32(m.SwIfIndex))
399 return buf.Bytes(), nil
401 func (m *BondDelete) Unmarshal(b []byte) error {
402 buf := codec.NewBuffer(b)
403 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
407 // BondDeleteReply defines message 'bond_delete_reply'.
408 type BondDeleteReply struct {
409 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
412 func (m *BondDeleteReply) Reset() { *m = BondDeleteReply{} }
413 func (*BondDeleteReply) GetMessageName() string { return "bond_delete_reply" }
414 func (*BondDeleteReply) GetCrcString() string { return "e8d4e804" }
415 func (*BondDeleteReply) GetMessageType() api.MessageType {
416 return api.ReplyMessage
419 func (m *BondDeleteReply) Size() (size int) {
423 size += 4 // m.Retval
426 func (m *BondDeleteReply) Marshal(b []byte) ([]byte, error) {
428 b = make([]byte, m.Size())
430 buf := codec.NewBuffer(b)
431 buf.EncodeInt32(m.Retval)
432 return buf.Bytes(), nil
434 func (m *BondDeleteReply) Unmarshal(b []byte) error {
435 buf := codec.NewBuffer(b)
436 m.Retval = buf.DecodeInt32()
440 // BondDetachMember defines message 'bond_detach_member'.
441 type BondDetachMember struct {
442 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
445 func (m *BondDetachMember) Reset() { *m = BondDetachMember{} }
446 func (*BondDetachMember) GetMessageName() string { return "bond_detach_member" }
447 func (*BondDetachMember) GetCrcString() string { return "f9e6675e" }
448 func (*BondDetachMember) GetMessageType() api.MessageType {
449 return api.RequestMessage
452 func (m *BondDetachMember) Size() (size int) {
456 size += 4 // m.SwIfIndex
459 func (m *BondDetachMember) Marshal(b []byte) ([]byte, error) {
461 b = make([]byte, m.Size())
463 buf := codec.NewBuffer(b)
464 buf.EncodeUint32(uint32(m.SwIfIndex))
465 return buf.Bytes(), nil
467 func (m *BondDetachMember) Unmarshal(b []byte) error {
468 buf := codec.NewBuffer(b)
469 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
473 // BondDetachMemberReply defines message 'bond_detach_member_reply'.
474 type BondDetachMemberReply struct {
475 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
478 func (m *BondDetachMemberReply) Reset() { *m = BondDetachMemberReply{} }
479 func (*BondDetachMemberReply) GetMessageName() string { return "bond_detach_member_reply" }
480 func (*BondDetachMemberReply) GetCrcString() string { return "e8d4e804" }
481 func (*BondDetachMemberReply) GetMessageType() api.MessageType {
482 return api.ReplyMessage
485 func (m *BondDetachMemberReply) Size() (size int) {
489 size += 4 // m.Retval
492 func (m *BondDetachMemberReply) Marshal(b []byte) ([]byte, error) {
494 b = make([]byte, m.Size())
496 buf := codec.NewBuffer(b)
497 buf.EncodeInt32(m.Retval)
498 return buf.Bytes(), nil
500 func (m *BondDetachMemberReply) Unmarshal(b []byte) error {
501 buf := codec.NewBuffer(b)
502 m.Retval = buf.DecodeInt32()
506 // BondDetachSlave defines message 'bond_detach_slave'.
507 // Deprecated: the message will be removed in the future versions
508 type BondDetachSlave struct {
509 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
512 func (m *BondDetachSlave) Reset() { *m = BondDetachSlave{} }
513 func (*BondDetachSlave) GetMessageName() string { return "bond_detach_slave" }
514 func (*BondDetachSlave) GetCrcString() string { return "f9e6675e" }
515 func (*BondDetachSlave) GetMessageType() api.MessageType {
516 return api.RequestMessage
519 func (m *BondDetachSlave) Size() (size int) {
523 size += 4 // m.SwIfIndex
526 func (m *BondDetachSlave) Marshal(b []byte) ([]byte, error) {
528 b = make([]byte, m.Size())
530 buf := codec.NewBuffer(b)
531 buf.EncodeUint32(uint32(m.SwIfIndex))
532 return buf.Bytes(), nil
534 func (m *BondDetachSlave) Unmarshal(b []byte) error {
535 buf := codec.NewBuffer(b)
536 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
540 // BondDetachSlaveReply defines message 'bond_detach_slave_reply'.
541 // Deprecated: the message will be removed in the future versions
542 type BondDetachSlaveReply struct {
543 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
546 func (m *BondDetachSlaveReply) Reset() { *m = BondDetachSlaveReply{} }
547 func (*BondDetachSlaveReply) GetMessageName() string { return "bond_detach_slave_reply" }
548 func (*BondDetachSlaveReply) GetCrcString() string { return "e8d4e804" }
549 func (*BondDetachSlaveReply) GetMessageType() api.MessageType {
550 return api.ReplyMessage
553 func (m *BondDetachSlaveReply) Size() (size int) {
557 size += 4 // m.Retval
560 func (m *BondDetachSlaveReply) Marshal(b []byte) ([]byte, error) {
562 b = make([]byte, m.Size())
564 buf := codec.NewBuffer(b)
565 buf.EncodeInt32(m.Retval)
566 return buf.Bytes(), nil
568 func (m *BondDetachSlaveReply) Unmarshal(b []byte) error {
569 buf := codec.NewBuffer(b)
570 m.Retval = buf.DecodeInt32()
574 // BondEnslave defines message 'bond_enslave'.
575 // Deprecated: the message will be removed in the future versions
576 type BondEnslave struct {
577 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
578 BondSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bond_sw_if_index" json:"bond_sw_if_index,omitempty"`
579 IsPassive bool `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
580 IsLongTimeout bool `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
583 func (m *BondEnslave) Reset() { *m = BondEnslave{} }
584 func (*BondEnslave) GetMessageName() string { return "bond_enslave" }
585 func (*BondEnslave) GetCrcString() string { return "e7d14948" }
586 func (*BondEnslave) GetMessageType() api.MessageType {
587 return api.RequestMessage
590 func (m *BondEnslave) Size() (size int) {
594 size += 4 // m.SwIfIndex
595 size += 4 // m.BondSwIfIndex
596 size += 1 // m.IsPassive
597 size += 1 // m.IsLongTimeout
600 func (m *BondEnslave) Marshal(b []byte) ([]byte, error) {
602 b = make([]byte, m.Size())
604 buf := codec.NewBuffer(b)
605 buf.EncodeUint32(uint32(m.SwIfIndex))
606 buf.EncodeUint32(uint32(m.BondSwIfIndex))
607 buf.EncodeBool(m.IsPassive)
608 buf.EncodeBool(m.IsLongTimeout)
609 return buf.Bytes(), nil
611 func (m *BondEnslave) Unmarshal(b []byte) error {
612 buf := codec.NewBuffer(b)
613 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
614 m.BondSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
615 m.IsPassive = buf.DecodeBool()
616 m.IsLongTimeout = buf.DecodeBool()
620 // BondEnslaveReply defines message 'bond_enslave_reply'.
621 type BondEnslaveReply struct {
622 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
625 func (m *BondEnslaveReply) Reset() { *m = BondEnslaveReply{} }
626 func (*BondEnslaveReply) GetMessageName() string { return "bond_enslave_reply" }
627 func (*BondEnslaveReply) GetCrcString() string { return "e8d4e804" }
628 func (*BondEnslaveReply) GetMessageType() api.MessageType {
629 return api.ReplyMessage
632 func (m *BondEnslaveReply) Size() (size int) {
636 size += 4 // m.Retval
639 func (m *BondEnslaveReply) Marshal(b []byte) ([]byte, error) {
641 b = make([]byte, m.Size())
643 buf := codec.NewBuffer(b)
644 buf.EncodeInt32(m.Retval)
645 return buf.Bytes(), nil
647 func (m *BondEnslaveReply) Unmarshal(b []byte) error {
648 buf := codec.NewBuffer(b)
649 m.Retval = buf.DecodeInt32()
653 // SwBondInterfaceDetails defines message 'sw_bond_interface_details'.
654 type SwBondInterfaceDetails struct {
655 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
656 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
657 Mode BondMode `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
658 Lb BondLbAlgo `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
659 NumaOnly bool `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
660 ActiveMembers uint32 `binapi:"u32,name=active_members" json:"active_members,omitempty"`
661 Members uint32 `binapi:"u32,name=members" json:"members,omitempty"`
662 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
665 func (m *SwBondInterfaceDetails) Reset() { *m = SwBondInterfaceDetails{} }
666 func (*SwBondInterfaceDetails) GetMessageName() string { return "sw_bond_interface_details" }
667 func (*SwBondInterfaceDetails) GetCrcString() string { return "9428a69c" }
668 func (*SwBondInterfaceDetails) GetMessageType() api.MessageType {
669 return api.ReplyMessage
672 func (m *SwBondInterfaceDetails) Size() (size int) {
676 size += 4 // m.SwIfIndex
680 size += 1 // m.NumaOnly
681 size += 4 // m.ActiveMembers
682 size += 4 // m.Members
683 size += 64 // m.InterfaceName
686 func (m *SwBondInterfaceDetails) Marshal(b []byte) ([]byte, error) {
688 b = make([]byte, m.Size())
690 buf := codec.NewBuffer(b)
691 buf.EncodeUint32(uint32(m.SwIfIndex))
692 buf.EncodeUint32(m.ID)
693 buf.EncodeUint32(uint32(m.Mode))
694 buf.EncodeUint32(uint32(m.Lb))
695 buf.EncodeBool(m.NumaOnly)
696 buf.EncodeUint32(m.ActiveMembers)
697 buf.EncodeUint32(m.Members)
698 buf.EncodeString(m.InterfaceName, 64)
699 return buf.Bytes(), nil
701 func (m *SwBondInterfaceDetails) Unmarshal(b []byte) error {
702 buf := codec.NewBuffer(b)
703 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
704 m.ID = buf.DecodeUint32()
705 m.Mode = BondMode(buf.DecodeUint32())
706 m.Lb = BondLbAlgo(buf.DecodeUint32())
707 m.NumaOnly = buf.DecodeBool()
708 m.ActiveMembers = buf.DecodeUint32()
709 m.Members = buf.DecodeUint32()
710 m.InterfaceName = buf.DecodeString(64)
714 // SwBondInterfaceDump defines message 'sw_bond_interface_dump'.
715 type SwBondInterfaceDump struct {
716 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
719 func (m *SwBondInterfaceDump) Reset() { *m = SwBondInterfaceDump{} }
720 func (*SwBondInterfaceDump) GetMessageName() string { return "sw_bond_interface_dump" }
721 func (*SwBondInterfaceDump) GetCrcString() string { return "f9e6675e" }
722 func (*SwBondInterfaceDump) GetMessageType() api.MessageType {
723 return api.RequestMessage
726 func (m *SwBondInterfaceDump) Size() (size int) {
730 size += 4 // m.SwIfIndex
733 func (m *SwBondInterfaceDump) Marshal(b []byte) ([]byte, error) {
735 b = make([]byte, m.Size())
737 buf := codec.NewBuffer(b)
738 buf.EncodeUint32(uint32(m.SwIfIndex))
739 return buf.Bytes(), nil
741 func (m *SwBondInterfaceDump) Unmarshal(b []byte) error {
742 buf := codec.NewBuffer(b)
743 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
747 // SwInterfaceBondDetails defines message 'sw_interface_bond_details'.
748 type SwInterfaceBondDetails struct {
749 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
750 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
751 Mode BondMode `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
752 Lb BondLbAlgo `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
753 NumaOnly bool `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
754 ActiveSlaves uint32 `binapi:"u32,name=active_slaves" json:"active_slaves,omitempty"`
755 Slaves uint32 `binapi:"u32,name=slaves" json:"slaves,omitempty"`
756 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
759 func (m *SwInterfaceBondDetails) Reset() { *m = SwInterfaceBondDetails{} }
760 func (*SwInterfaceBondDetails) GetMessageName() string { return "sw_interface_bond_details" }
761 func (*SwInterfaceBondDetails) GetCrcString() string { return "bb7c929b" }
762 func (*SwInterfaceBondDetails) GetMessageType() api.MessageType {
763 return api.ReplyMessage
766 func (m *SwInterfaceBondDetails) Size() (size int) {
770 size += 4 // m.SwIfIndex
774 size += 1 // m.NumaOnly
775 size += 4 // m.ActiveSlaves
776 size += 4 // m.Slaves
777 size += 64 // m.InterfaceName
780 func (m *SwInterfaceBondDetails) Marshal(b []byte) ([]byte, error) {
782 b = make([]byte, m.Size())
784 buf := codec.NewBuffer(b)
785 buf.EncodeUint32(uint32(m.SwIfIndex))
786 buf.EncodeUint32(m.ID)
787 buf.EncodeUint32(uint32(m.Mode))
788 buf.EncodeUint32(uint32(m.Lb))
789 buf.EncodeBool(m.NumaOnly)
790 buf.EncodeUint32(m.ActiveSlaves)
791 buf.EncodeUint32(m.Slaves)
792 buf.EncodeString(m.InterfaceName, 64)
793 return buf.Bytes(), nil
795 func (m *SwInterfaceBondDetails) Unmarshal(b []byte) error {
796 buf := codec.NewBuffer(b)
797 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
798 m.ID = buf.DecodeUint32()
799 m.Mode = BondMode(buf.DecodeUint32())
800 m.Lb = BondLbAlgo(buf.DecodeUint32())
801 m.NumaOnly = buf.DecodeBool()
802 m.ActiveSlaves = buf.DecodeUint32()
803 m.Slaves = buf.DecodeUint32()
804 m.InterfaceName = buf.DecodeString(64)
808 // SwInterfaceBondDump defines message 'sw_interface_bond_dump'.
809 // Deprecated: the message will be removed in the future versions
810 type SwInterfaceBondDump struct{}
812 func (m *SwInterfaceBondDump) Reset() { *m = SwInterfaceBondDump{} }
813 func (*SwInterfaceBondDump) GetMessageName() string { return "sw_interface_bond_dump" }
814 func (*SwInterfaceBondDump) GetCrcString() string { return "51077d14" }
815 func (*SwInterfaceBondDump) GetMessageType() api.MessageType {
816 return api.RequestMessage
819 func (m *SwInterfaceBondDump) Size() (size int) {
825 func (m *SwInterfaceBondDump) Marshal(b []byte) ([]byte, error) {
827 b = make([]byte, m.Size())
829 buf := codec.NewBuffer(b)
830 return buf.Bytes(), nil
832 func (m *SwInterfaceBondDump) Unmarshal(b []byte) error {
836 // SwInterfaceSetBondWeight defines message 'sw_interface_set_bond_weight'.
837 type SwInterfaceSetBondWeight struct {
838 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
839 Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
842 func (m *SwInterfaceSetBondWeight) Reset() { *m = SwInterfaceSetBondWeight{} }
843 func (*SwInterfaceSetBondWeight) GetMessageName() string { return "sw_interface_set_bond_weight" }
844 func (*SwInterfaceSetBondWeight) GetCrcString() string { return "deb510a0" }
845 func (*SwInterfaceSetBondWeight) GetMessageType() api.MessageType {
846 return api.RequestMessage
849 func (m *SwInterfaceSetBondWeight) Size() (size int) {
853 size += 4 // m.SwIfIndex
854 size += 4 // m.Weight
857 func (m *SwInterfaceSetBondWeight) Marshal(b []byte) ([]byte, error) {
859 b = make([]byte, m.Size())
861 buf := codec.NewBuffer(b)
862 buf.EncodeUint32(uint32(m.SwIfIndex))
863 buf.EncodeUint32(m.Weight)
864 return buf.Bytes(), nil
866 func (m *SwInterfaceSetBondWeight) Unmarshal(b []byte) error {
867 buf := codec.NewBuffer(b)
868 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
869 m.Weight = buf.DecodeUint32()
873 // SwInterfaceSetBondWeightReply defines message 'sw_interface_set_bond_weight_reply'.
874 type SwInterfaceSetBondWeightReply struct {
875 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
878 func (m *SwInterfaceSetBondWeightReply) Reset() { *m = SwInterfaceSetBondWeightReply{} }
879 func (*SwInterfaceSetBondWeightReply) GetMessageName() string {
880 return "sw_interface_set_bond_weight_reply"
882 func (*SwInterfaceSetBondWeightReply) GetCrcString() string { return "e8d4e804" }
883 func (*SwInterfaceSetBondWeightReply) GetMessageType() api.MessageType {
884 return api.ReplyMessage
887 func (m *SwInterfaceSetBondWeightReply) Size() (size int) {
891 size += 4 // m.Retval
894 func (m *SwInterfaceSetBondWeightReply) Marshal(b []byte) ([]byte, error) {
896 b = make([]byte, m.Size())
898 buf := codec.NewBuffer(b)
899 buf.EncodeInt32(m.Retval)
900 return buf.Bytes(), nil
902 func (m *SwInterfaceSetBondWeightReply) Unmarshal(b []byte) error {
903 buf := codec.NewBuffer(b)
904 m.Retval = buf.DecodeInt32()
908 // SwInterfaceSlaveDetails defines message 'sw_interface_slave_details'.
909 type SwInterfaceSlaveDetails struct {
910 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
911 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
912 IsPassive bool `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
913 IsLongTimeout bool `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
914 IsLocalNuma bool `binapi:"bool,name=is_local_numa" json:"is_local_numa,omitempty"`
915 Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
918 func (m *SwInterfaceSlaveDetails) Reset() { *m = SwInterfaceSlaveDetails{} }
919 func (*SwInterfaceSlaveDetails) GetMessageName() string { return "sw_interface_slave_details" }
920 func (*SwInterfaceSlaveDetails) GetCrcString() string { return "3c4a0e23" }
921 func (*SwInterfaceSlaveDetails) GetMessageType() api.MessageType {
922 return api.ReplyMessage
925 func (m *SwInterfaceSlaveDetails) Size() (size int) {
929 size += 4 // m.SwIfIndex
930 size += 64 // m.InterfaceName
931 size += 1 // m.IsPassive
932 size += 1 // m.IsLongTimeout
933 size += 1 // m.IsLocalNuma
934 size += 4 // m.Weight
937 func (m *SwInterfaceSlaveDetails) Marshal(b []byte) ([]byte, error) {
939 b = make([]byte, m.Size())
941 buf := codec.NewBuffer(b)
942 buf.EncodeUint32(uint32(m.SwIfIndex))
943 buf.EncodeString(m.InterfaceName, 64)
944 buf.EncodeBool(m.IsPassive)
945 buf.EncodeBool(m.IsLongTimeout)
946 buf.EncodeBool(m.IsLocalNuma)
947 buf.EncodeUint32(m.Weight)
948 return buf.Bytes(), nil
950 func (m *SwInterfaceSlaveDetails) Unmarshal(b []byte) error {
951 buf := codec.NewBuffer(b)
952 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
953 m.InterfaceName = buf.DecodeString(64)
954 m.IsPassive = buf.DecodeBool()
955 m.IsLongTimeout = buf.DecodeBool()
956 m.IsLocalNuma = buf.DecodeBool()
957 m.Weight = buf.DecodeUint32()
961 // SwInterfaceSlaveDump defines message 'sw_interface_slave_dump'.
962 // Deprecated: the message will be removed in the future versions
963 type SwInterfaceSlaveDump struct {
964 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
967 func (m *SwInterfaceSlaveDump) Reset() { *m = SwInterfaceSlaveDump{} }
968 func (*SwInterfaceSlaveDump) GetMessageName() string { return "sw_interface_slave_dump" }
969 func (*SwInterfaceSlaveDump) GetCrcString() string { return "f9e6675e" }
970 func (*SwInterfaceSlaveDump) GetMessageType() api.MessageType {
971 return api.RequestMessage
974 func (m *SwInterfaceSlaveDump) Size() (size int) {
978 size += 4 // m.SwIfIndex
981 func (m *SwInterfaceSlaveDump) Marshal(b []byte) ([]byte, error) {
983 b = make([]byte, m.Size())
985 buf := codec.NewBuffer(b)
986 buf.EncodeUint32(uint32(m.SwIfIndex))
987 return buf.Bytes(), nil
989 func (m *SwInterfaceSlaveDump) Unmarshal(b []byte) error {
990 buf := codec.NewBuffer(b)
991 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
995 // SwMemberInterfaceDetails defines message 'sw_member_interface_details'.
996 type SwMemberInterfaceDetails struct {
997 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
998 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
999 IsPassive bool `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
1000 IsLongTimeout bool `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
1001 IsLocalNuma bool `binapi:"bool,name=is_local_numa" json:"is_local_numa,omitempty"`
1002 Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
1005 func (m *SwMemberInterfaceDetails) Reset() { *m = SwMemberInterfaceDetails{} }
1006 func (*SwMemberInterfaceDetails) GetMessageName() string { return "sw_member_interface_details" }
1007 func (*SwMemberInterfaceDetails) GetCrcString() string { return "3c4a0e23" }
1008 func (*SwMemberInterfaceDetails) GetMessageType() api.MessageType {
1009 return api.ReplyMessage
1012 func (m *SwMemberInterfaceDetails) Size() (size int) {
1016 size += 4 // m.SwIfIndex
1017 size += 64 // m.InterfaceName
1018 size += 1 // m.IsPassive
1019 size += 1 // m.IsLongTimeout
1020 size += 1 // m.IsLocalNuma
1021 size += 4 // m.Weight
1024 func (m *SwMemberInterfaceDetails) Marshal(b []byte) ([]byte, error) {
1026 b = make([]byte, m.Size())
1028 buf := codec.NewBuffer(b)
1029 buf.EncodeUint32(uint32(m.SwIfIndex))
1030 buf.EncodeString(m.InterfaceName, 64)
1031 buf.EncodeBool(m.IsPassive)
1032 buf.EncodeBool(m.IsLongTimeout)
1033 buf.EncodeBool(m.IsLocalNuma)
1034 buf.EncodeUint32(m.Weight)
1035 return buf.Bytes(), nil
1037 func (m *SwMemberInterfaceDetails) Unmarshal(b []byte) error {
1038 buf := codec.NewBuffer(b)
1039 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1040 m.InterfaceName = buf.DecodeString(64)
1041 m.IsPassive = buf.DecodeBool()
1042 m.IsLongTimeout = buf.DecodeBool()
1043 m.IsLocalNuma = buf.DecodeBool()
1044 m.Weight = buf.DecodeUint32()
1048 // SwMemberInterfaceDump defines message 'sw_member_interface_dump'.
1049 type SwMemberInterfaceDump struct {
1050 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1053 func (m *SwMemberInterfaceDump) Reset() { *m = SwMemberInterfaceDump{} }
1054 func (*SwMemberInterfaceDump) GetMessageName() string { return "sw_member_interface_dump" }
1055 func (*SwMemberInterfaceDump) GetCrcString() string { return "f9e6675e" }
1056 func (*SwMemberInterfaceDump) GetMessageType() api.MessageType {
1057 return api.RequestMessage
1060 func (m *SwMemberInterfaceDump) Size() (size int) {
1064 size += 4 // m.SwIfIndex
1067 func (m *SwMemberInterfaceDump) Marshal(b []byte) ([]byte, error) {
1069 b = make([]byte, m.Size())
1071 buf := codec.NewBuffer(b)
1072 buf.EncodeUint32(uint32(m.SwIfIndex))
1073 return buf.Bytes(), nil
1075 func (m *SwMemberInterfaceDump) Unmarshal(b []byte) error {
1076 buf := codec.NewBuffer(b)
1077 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1081 func init() { file_bond_binapi_init() }
1082 func file_bond_binapi_init() {
1083 api.RegisterMessage((*BondAddMember)(nil), "bond_add_member_e7d14948")
1084 api.RegisterMessage((*BondAddMemberReply)(nil), "bond_add_member_reply_e8d4e804")
1085 api.RegisterMessage((*BondCreate)(nil), "bond_create_f1dbd4ff")
1086 api.RegisterMessage((*BondCreate2)(nil), "bond_create2_912fda76")
1087 api.RegisterMessage((*BondCreate2Reply)(nil), "bond_create2_reply_5383d31f")
1088 api.RegisterMessage((*BondCreateReply)(nil), "bond_create_reply_5383d31f")
1089 api.RegisterMessage((*BondDelete)(nil), "bond_delete_f9e6675e")
1090 api.RegisterMessage((*BondDeleteReply)(nil), "bond_delete_reply_e8d4e804")
1091 api.RegisterMessage((*BondDetachMember)(nil), "bond_detach_member_f9e6675e")
1092 api.RegisterMessage((*BondDetachMemberReply)(nil), "bond_detach_member_reply_e8d4e804")
1093 api.RegisterMessage((*BondDetachSlave)(nil), "bond_detach_slave_f9e6675e")
1094 api.RegisterMessage((*BondDetachSlaveReply)(nil), "bond_detach_slave_reply_e8d4e804")
1095 api.RegisterMessage((*BondEnslave)(nil), "bond_enslave_e7d14948")
1096 api.RegisterMessage((*BondEnslaveReply)(nil), "bond_enslave_reply_e8d4e804")
1097 api.RegisterMessage((*SwBondInterfaceDetails)(nil), "sw_bond_interface_details_9428a69c")
1098 api.RegisterMessage((*SwBondInterfaceDump)(nil), "sw_bond_interface_dump_f9e6675e")
1099 api.RegisterMessage((*SwInterfaceBondDetails)(nil), "sw_interface_bond_details_bb7c929b")
1100 api.RegisterMessage((*SwInterfaceBondDump)(nil), "sw_interface_bond_dump_51077d14")
1101 api.RegisterMessage((*SwInterfaceSetBondWeight)(nil), "sw_interface_set_bond_weight_deb510a0")
1102 api.RegisterMessage((*SwInterfaceSetBondWeightReply)(nil), "sw_interface_set_bond_weight_reply_e8d4e804")
1103 api.RegisterMessage((*SwInterfaceSlaveDetails)(nil), "sw_interface_slave_details_3c4a0e23")
1104 api.RegisterMessage((*SwInterfaceSlaveDump)(nil), "sw_interface_slave_dump_f9e6675e")
1105 api.RegisterMessage((*SwMemberInterfaceDetails)(nil), "sw_member_interface_details_3c4a0e23")
1106 api.RegisterMessage((*SwMemberInterfaceDump)(nil), "sw_member_interface_dump_f9e6675e")
1109 // Messages returns list of all messages in this module.
1110 func AllMessages() []api.Message {
1111 return []api.Message{
1112 (*BondAddMember)(nil),
1113 (*BondAddMemberReply)(nil),
1115 (*BondCreate2)(nil),
1116 (*BondCreate2Reply)(nil),
1117 (*BondCreateReply)(nil),
1119 (*BondDeleteReply)(nil),
1120 (*BondDetachMember)(nil),
1121 (*BondDetachMemberReply)(nil),
1122 (*BondDetachSlave)(nil),
1123 (*BondDetachSlaveReply)(nil),
1124 (*BondEnslave)(nil),
1125 (*BondEnslaveReply)(nil),
1126 (*SwBondInterfaceDetails)(nil),
1127 (*SwBondInterfaceDump)(nil),
1128 (*SwInterfaceBondDetails)(nil),
1129 (*SwInterfaceBondDump)(nil),
1130 (*SwInterfaceSetBondWeight)(nil),
1131 (*SwInterfaceSetBondWeightReply)(nil),
1132 (*SwInterfaceSlaveDetails)(nil),
1133 (*SwInterfaceSlaveDump)(nil),
1134 (*SwMemberInterfaceDetails)(nil),
1135 (*SwMemberInterfaceDump)(nil),