diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-29 15:58:43 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-12-02 05:48:27 +0100 |
commit | da96ad5ae2bf3e9fd94d145c4b75fdf54a214350 (patch) | |
tree | 0c8be8c1b1c3bb562cc7fedaabb8d2e4b2b9fee5 /src/shared/ip-protocol-to-name.awk | |
parent | tree-wide: remove various unused functions (diff) | |
download | systemd-da96ad5ae2bf3e9fd94d145c4b75fdf54a214350.tar.xz systemd-da96ad5ae2bf3e9fd94d145c4b75fdf54a214350.zip |
util: rename socket_protocol_{from,to}_name() to ip_protocol_{from,to}_name()
Diffstat (limited to 'src/shared/ip-protocol-to-name.awk')
-rw-r--r-- | src/shared/ip-protocol-to-name.awk | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shared/ip-protocol-to-name.awk b/src/shared/ip-protocol-to-name.awk new file mode 100644 index 0000000000..824f811f5c --- /dev/null +++ b/src/shared/ip-protocol-to-name.awk @@ -0,0 +1,9 @@ +BEGIN{ + print "static const char* const ip_protocol_names[] = { " +} +!/HOPOPTS/ { + printf " [IPPROTO_%s] = \"%s\",\n", $1, tolower($1) +} +END{ + print "};" +} |