[ADD] conf for archlinux, <init>
[arrow.git] / archlinux_conf / home / .bin / shell / arrow-tethereal-mac
blobe7008a17c735bdf5564a51e17242fa732ca77ec2
1 #!/bin/sh
3 IF_NAME=$1
4 if [ "$IF_NAME" = "" ]; then
5 # echo usage: "${`basename $0`}" ifname[eth0] <mac>
6 echo -n "usage: "
7 echo -n "$(basename $0)"
8 echo "ifname[${ETH_LAN}] <mac>"
9 exit 1
12 MAC=$2
14 if [ "$MAC" = "" ]; then
15 if [ "$MAC_SYS" = "" ]; then
16 echo "usage:[BIN] 00:11:22:33:44:55"
17 echo "OR, export MAC_SYS"
18 exit 0
19 echo "usage:$0 00:11:22:33:44:55"
20 MAC=00:c0:02:83:46:72
21 #exit 0
22 else
23 MAC="$MAC_SYS"
26 #sudo tethereal -R "eth.dst == "$MAC" || eth.src == "$MAC""
27 #sudo tethereal -R "eth.dst == $MAC || eth.src == $MAC"
28 echo MAC=$MAC
29 sudo tethereal -i $IF_NAME -R "eth.addr==$MAC"