From 9049ed2f252bad800885459450d74564efe4d684 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Thu, 9 Sep 2021 15:08:44 -0700 Subject: [PATCH] auto-t: hwsim.py: add match/match_offset properties --- autotests/util/hwsim.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/autotests/util/hwsim.py b/autotests/util/hwsim.py index e5d336e3..34859910 100755 --- 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)