summaryrefslogtreecommitdiffstats
path: root/src/basic/generate-arphrd-list.sh
blob: e6e874a8fd06d0b4c83a0a4f50aef3960936c1c6 (plain)
1
2
3
4
5
6
#!/bin/sh
set -eu

$1 -dM -include net/if_arp.h -include "$2" -include "$3" - </dev/null | \
        awk '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $2; }' | \
        sed -e 's/ARPHRD_//'