#!/bin/sh N=100 MODE=oneattime SLEEP=1 LOGANDPRINT="tee -a result | cut -c 2-" modprobe canethgw cegw --listen udp@127.0.0.1:10501 cegw --add -s can@vcan0 -d udp@127.0.0.1:10502 cegw --add -s udp@127.0.0.1:10502 -d can@vcan0 sleep $SLEEP echo "#kernel udp->can: " | tee -a result | cut -c 2- cegwbench -s udp@127.0.0.1:10501 -d can@vcan0 -n $N -m $MODE -t 1 >> result sleep $SLEEP echo "#kernel can->udp: " | tee -a result | cut -c 2- cegwbench -s can@vcan0 -d udp@127.0.0.1:10502 -n $N -m $MODE -t 1 >> result sleep $SLEEP modprobe -r canudpgw sleep 3 canethgw -s can@vcan0 -d udp@127.0.0.1:10502 -l udp@127.0.0.1:10501 & sleep $SLEEP echo "#user udp->can: " | tee -a result | cut -c 2- cegwbench -s udp@127.0.0.1:10501 -d can@vcan0 -n $N -m $MODE -t 1 >> result sleep $SLEEP echo "#user can->udp: " | tee -a result | cut -c 2- cegwbench -s can@vcan0 -d udp@127.0.0.1:10502 -n $N -m $MODE -t 1 >> result # send result cat result | nc `cat /etc/retip` 10600