#!/bin/sh
# Copyright (C) 2009 Ubicom, Inc.

. /etc/rgw_config

echo End Test procedure item C from section 2.4.7 of StreamEngine procedure.

#
# Priorities are essentially queue indicies - the lower the number the higher the priority
#
PRIORITY_HIGH=1
PRIORITY_MEDIUM=2
PRIORITY_LOW=3

#
# Priority marks are used to mark packets that match rules on which we want to assign custom priorities
#
PRIORITY_MARK_HIGH=6901
PRIORITY_MARK_MEDIUM=6902
PRIORITY_MARK_LOW=6903

#
# Delete filter rules
#
tc filter del dev $WAN_MODE_INTERFACE prio $PRIORITY_MARK_HIGH
tc filter del dev $WAN_MODE_INTERFACE prio $PRIORITY_MARK_MEDIUM
tc filter del dev $WAN_MODE_INTERFACE prio $PRIORITY_MARK_LOW

#
# Delete the test rules
#
iptables -t mangle -D FORWARD -j test_rule_table
iptables -t mangle -D OUTPUT -j test_rule_table

#
# Add test rules into the table
#
iptables -t mangle -F test_rule_table

#
# Delete test rule table
#
iptables -t mangle -X test_rule_table

