ip link set can3 txqueuelen $1
ip link set can3 up
-ip link show
+ip link show dev can0
+ip link show dev can1
+ip link show dev can2
+ip link show dev can3
#!/bin/bash
-DEV=can0
+
+if [ -z "$2" ]; then # device not set
+ DEV="can0"
+else
+ DEV="$2"
+fi
+
+echo "[ Running on ${DEV} device. ]"
if [ "$1" == "del" ]; then # delete all qdiscs & filters
tc qdisc del dev ${DEV} root
--- /dev/null
+#!/bin/bash
+
+(lsmod | grep vcan > /dev/null) && rmmod vcan
+modprobe vcan echo=1
+
+ip link add vcan0 type vcan
+ip link set vcan0 txqueuelen $1
+ip link set vcan0 up
+ip link show dev vcan0
+