summaryrefslogtreecommitdiff
path: root/src/basic/generate-socket-protocol-list.sh
blob: 18a540f32baa4355690a437ef3e7f766a45fedae (plain)
1
2
3
4
5
#!/bin/sh -eu

$1 -dM -include netinet/in.h - </dev/null | \
        awk '/^#define[ \t]+IPPROTO_[^ \t]+[ \t]+[^ \t]/ { print $2; }' | \
        sed -e 's/IPPROTO_//'