diff --git a/iptc/__init__.py b/iptc/__init__.py index 3d25f29..3f6c19f 100644 --- a/iptc/__init__.py +++ b/iptc/__init__.py @@ -944,6 +944,12 @@ def set_protocol(self, proto): protocol = property(get_protocol, set_protocol) """This is the transport layer protocol.""" + def get_counters(self): + """This method returns a tuple pair of the packet and byte counters of + the rule.""" + counters = self.entry.counters + return counters.pcnt, counters.bcnt + def _get_rule(self): if not self.entry or not self._target or not self._target.target: return None