brintos

brintos / linux-shallow public Read only

0
0
Text · 710 B · 2e3326e Raw
37 lines · bash
1#!/bin/bash2# SPDX-License-Identifier: GPL-2.03 4CHECK_TC="yes"5 6# Can be overridden by the configuration file. See lib.sh7: "${TC_HIT_TIMEOUT:=1000}" # ms8 9tc_check_packets()10{11	local id=$112	local handle=$213	local count=$314 15	busywait "$TC_HIT_TIMEOUT" until_counter_is "== $count" \16		 tc_rule_handle_stats_get "$id" "$handle" > /dev/null17}18 19tc_check_at_least_x_packets()20{21	local id=$122	local handle=$223	local count=$324 25	busywait "$TC_HIT_TIMEOUT" until_counter_is ">= $count" \26		 tc_rule_handle_stats_get "$id" "$handle" > /dev/null27}28 29tc_check_packets_hitting()30{31	local id=$132	local handle=$233 34	busywait "$TC_HIT_TIMEOUT" until_counter_is "> 0" \35		 tc_rule_handle_stats_get "$id" "$handle" > /dev/null36}37