+// SwInterfaceSetPromisc defines message 'sw_interface_set_promisc'.
+type SwInterfaceSetPromisc struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ PromiscOn bool `binapi:"bool,name=promisc_on" json:"promisc_on,omitempty"`
+}
+
+func (m *SwInterfaceSetPromisc) Reset() { *m = SwInterfaceSetPromisc{} }
+func (*SwInterfaceSetPromisc) GetMessageName() string { return "sw_interface_set_promisc" }
+func (*SwInterfaceSetPromisc) GetCrcString() string { return "d40860d4" }
+func (*SwInterfaceSetPromisc) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *SwInterfaceSetPromisc) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ size += 1 // m.PromiscOn
+ return size
+}
+func (m *SwInterfaceSetPromisc) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeBool(m.PromiscOn)
+ return buf.Bytes(), nil
+}
+func (m *SwInterfaceSetPromisc) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.PromiscOn = buf.DecodeBool()
+ return nil
+}
+
+// SwInterfaceSetPromiscReply defines message 'sw_interface_set_promisc_reply'.
+type SwInterfaceSetPromiscReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *SwInterfaceSetPromiscReply) Reset() { *m = SwInterfaceSetPromiscReply{} }
+func (*SwInterfaceSetPromiscReply) GetMessageName() string { return "sw_interface_set_promisc_reply" }
+func (*SwInterfaceSetPromiscReply) GetCrcString() string { return "e8d4e804" }
+func (*SwInterfaceSetPromiscReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *SwInterfaceSetPromiscReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *SwInterfaceSetPromiscReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ return buf.Bytes(), nil
+}
+func (m *SwInterfaceSetPromiscReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+