summaryrefslogtreecommitdiff
path: root/src/basic/generate-af-list.sh
blob: 8d9cdd1836249607a2bf1f562898ee156dee839e (plain)
1
2
3
4
5
#!/bin/sh -eu

$1 -E -dM -include sys/socket.h - </dev/null | \
        grep -Ev 'AF_UNSPEC|AF_MAX' | \
        awk '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $2; }'