+// SwBondInterfaceDetails defines message 'sw_bond_interface_details'.
+type SwBondInterfaceDetails struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
+ Mode BondMode `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
+ Lb BondLbAlgo `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
+ NumaOnly bool `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
+ ActiveMembers uint32 `binapi:"u32,name=active_members" json:"active_members,omitempty"`
+ Members uint32 `binapi:"u32,name=members" json:"members,omitempty"`
+ InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
+}
+
+func (m *SwBondInterfaceDetails) Reset() { *m = SwBondInterfaceDetails{} }
+func (*SwBondInterfaceDetails) GetMessageName() string { return "sw_bond_interface_details" }
+func (*SwBondInterfaceDetails) GetCrcString() string { return "9428a69c" }
+func (*SwBondInterfaceDetails) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *SwBondInterfaceDetails) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ size += 4 // m.ID
+ size += 4 // m.Mode
+ size += 4 // m.Lb
+ size += 1 // m.NumaOnly
+ size += 4 // m.ActiveMembers
+ size += 4 // m.Members
+ size += 64 // m.InterfaceName
+ return size
+}
+func (m *SwBondInterfaceDetails) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint32(m.ID)
+ buf.EncodeUint32(uint32(m.Mode))
+ buf.EncodeUint32(uint32(m.Lb))
+ buf.EncodeBool(m.NumaOnly)
+ buf.EncodeUint32(m.ActiveMembers)
+ buf.EncodeUint32(m.Members)
+ buf.EncodeString(m.InterfaceName, 64)
+ return buf.Bytes(), nil
+}
+func (m *SwBondInterfaceDetails) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.ID = buf.DecodeUint32()
+ m.Mode = BondMode(buf.DecodeUint32())
+ m.Lb = BondLbAlgo(buf.DecodeUint32())
+ m.NumaOnly = buf.DecodeBool()
+ m.ActiveMembers = buf.DecodeUint32()
+ m.Members = buf.DecodeUint32()
+ m.InterfaceName = buf.DecodeString(64)
+ return nil
+}
+
+// SwBondInterfaceDump defines message 'sw_bond_interface_dump'.
+type SwBondInterfaceDump struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
+}
+
+func (m *SwBondInterfaceDump) Reset() { *m = SwBondInterfaceDump{} }
+func (*SwBondInterfaceDump) GetMessageName() string { return "sw_bond_interface_dump" }
+func (*SwBondInterfaceDump) GetCrcString() string { return "f9e6675e" }
+func (*SwBondInterfaceDump) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *SwBondInterfaceDump) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *SwBondInterfaceDump) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *SwBondInterfaceDump) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+