summaryrefslogtreecommitdiff
path: root/scripts/vyatta-show-queue
blob: e45ae185845c8a5d098511c636432568e602d9fc (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
	tc -s -d qdisc show dev $1
else
	case $2 in
	filter )
		tc filter show dev $1 ;;
	class )
		tc -s -d class show dev $1 ;;
	 *)
		_usage; exit 1;;
	esac
fi