blob: 689d040c909030fc3799abc892e8baa717e55c82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#! /bin/bash
declare progname=${0##*/}
_usage ()
{
cat <<-EOF
Usage: $progname INTERFACE
$progname INTERFACE filter
$progname INTERFACE class
EOF
}
if [[ $# -lt 1 ]]; then
_usage
exit 1
fi
if [[ $# -eq 1 ]]; then
/sbin/tc -s -d qdisc show dev $1
else
case $2 in
filter )
/sbin/tc filter show dev $1 ;;
class )
/sbin/tc -s -d class show dev $1 ;;
*)
_usage; exit 1;;
esac
fi
|