commit 9049ed2f252bad800885459450d74564efe4d684
parent 3f4cafe135817c8814f933a8db9d694fdaff1ea7
Author: James Prestwood <prestwoj@gmail.com>
Date: Thu, 9 Sep 2021 15:08:44 -0700
auto-t: hwsim.py: add match/match_offset properties
Diffstat:
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/autotests/util/hwsim.py b/autotests/util/hwsim.py
@@ -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)