(table, chain, rule_d, ipv6=False)
return iptc_chain.rules[iptc_rule_index].get_counters()
Return a tuple with the rule counters (numberOfBytes, numberOfPackets)
Return a tuple with the rule counters (numberOfBytes, numberOfPackets)
Return a tuple with the rule counters ( numberOfBytes numberOfPackets )
def get_rule_counters(table, chain, rule_d, ipv6=False):
    """ Return a tuple with the rule counters (numberOfBytes, numberOfPackets) """
    if not has_rule(table, chain, rule_d, ipv6):
        raise AttributeError('Chain <{}@{}> has no rule <{}>'.format(chain, table, rule_d))
    iptc_chain = _iptc_getchain(table, chain, ipv6)
    iptc_rule  = encode_iptc_rule(rule_d, ipv6)
    iptc_rule_index = iptc_chain.rules.index(iptc_rule)
    return iptc_chain.rules[iptc_rule_index].get_counters()
def get_rule_counters ( table , chain , rule_d , ipv6 = False ) : if not has_rule ( table , chain , rule_d , ipv6 ) : raise AttributeError ( 'Chain <{}@{}> has no rule <{}>' . format ( chain , table , rule_d ) ) iptc_chain = _iptc_getchain ( table , chain , ipv6 ) iptc_rule = encode_iptc_rule ( rule_d , ipv6 ) iptc_rule_index = iptc_chain . rules . index ( iptc_rule ) return iptc_chain . rules [ iptc_rule_index ] . get_counters ( )