23 echo 2 | update-alternatives --config nc &> /dev/null
25 [ -d $OUTPUT_DIR ] || mkdir -p $OUTPUT_DIR
27 #increase tests debugging
30 # insert module, causing the message to be sent
31 insmod $MODULE_DIR/$MODULE_NAME.ko
33 # listen for UDP packets on localhost, port 60000 (run in background)
34 for port in "${LISTENERS_PORTS[@]}"; do
35 $SERVER $IP $port $OUTPUT_DIR/testfile.$port &
37 ARGUMENTS="$IP $port $ARGUMENTS"
40 # wait for netcat to start listening
46 $CLIENT $FILE $ARGUMENTS
49 [ -e $file ] || continue
50 $CLIENT $file $ARGUMENTS
58 kill -9 $pid &> /dev/null
61 # wait $pid &> /dev/null