-
-
Save evanslai/d47c8778ce6c88beebe8f65f8a5f8f7f to your computer and use it in GitHub Desktop.
brforward convertion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brctl_showmacs () { | |
cat /sys/class/net/$1/brforward > /tmp/brforward ; | |
printf "port no\tmac addr\t\tis local?\tageing timer\n" ; | |
hexdump -v -e '5/1 "%02x:" /1 "%02x" /1 " %x" /1 " %x" 1/4 " %i" 1/4 "\n"' /tmp/brforward | awk '{ islocal = $3 ? "yes" : "no" ; printf "%3i\t%s\t%s\t\t%8.2f\n",$2,$1,islocal,$4/100 } ' ; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment