Add files for swift over UDP.
[swifty.git] / src / libswift_udp / mfold / netclean.default.sh
1 #!/bin/bash
2 # Cleans configuration made with netem script.
3  
4 if [ ! $EMIF ] ; then
5     exit
6 fi
7
8 if [ ! $SWFTPORT ]; then
9     exit
10 fi
11
12 TC="sudo tc "
13 CLASSID=$(($SWFTPORT - 9900))
14
15 echo cleaning filter and class id 1:$CLASSID from ifb0
16 $TC filter del dev ifb0 protocol ip prio 1 handle 800::$CLASSID u32 \
17     flowid 1:$CLASSID
18 $TC class del dev ifb0 classid 1:$CLASSID
19
20 echo cleaning filter and class id 1:$CLASSID from lo
21 $TC filter del dev lo protocol ip prio 1 handle 800::$CLASSID u32 \
22     flowid 1:$CLASSID
23 $TC class del dev lo classid 1:$CLASSID
24
25 echo cleaning filter and class id 1:$CLASSID from $EMIF
26 $TC filter del dev $EMIF protocol ip prio 1 handle 800::$CLASSID u32 \
27     flowid 1:$CLASSID
28 $TC class del dev $EMIF classid 1:$CLASSID