Systemd/src/basic/generate-socket-protocol-list.sh
2017-12-25 19:48:49 +01:00

7 lines
171 B
Bash
Executable file

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