3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

auto-t: hwsim.py: add match/match_offset properties

This commit is contained in:
James Prestwood 2021-09-09 15:08:44 -07:00 committed by Denis Kenzior
parent 3f4cafe135
commit 9049ed2f25

View File

@ -169,6 +169,22 @@ class Rule(HwsimDBusAbstract):
def drop_ack(self, value):
self._prop_proxy.Set(self._iface_name, 'DropAck', value)
@property
def match(self):
return self._properties['MatchBytes']
@match.setter
def match(self, value):
self._prop_proxy.Set(self._iface_name, 'MatchBytes', dbus.ByteArray.fromhex(value))
@property
def match_offset(self):
return self._properties(['MatchBytesOffset'])
@match_offset.setter
def match_offset(self, value):
self._prop_proxy.Set(self._iface_name, 'MatchBytesOffset', dbus.UInt16(value))
def remove(self):
self._iface.Remove(reply_handler=self._success,
error_handler=self._failure)