diff options
author | Dmitry V. Levin <ldv@strace.io> | 2022-11-26 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2022-11-26 08:00:00 +0000 |
commit | 238f5799fe1d87147e851f3fd099186185e39e3f (patch) | |
tree | 25d6c83f9904ac17db61ab6499303b2d9f11a291 /src/xlat | |
parent | 3e9ef7a242267bc8921dbaafcea5bbec89bdc059 (diff) | |
download | strace-238f5799fe1d87147e851f3fd099186185e39e3f.tar.gz |
print_icmp_filter: print icmp_filter as a bitset
* src/xlat/icmp_filter_flags.in: New file.
* src/xlat/icmpfilterflags.in: Remove.
* src/net.c: Include "xlat/icmp_filter_flags.h" instead of
"xlat/icmpfilterflags.h".
(print_icmp_filter): Print struct icmp_filter.data as a bitset.
* tests/net-icmp_filter.c (main): Update expected output.
Diffstat (limited to 'src/xlat')
-rw-r--r-- | src/xlat/icmp_filter_flags.in | 14 | ||||
-rw-r--r-- | src/xlat/icmpfilterflags.in | 13 |
2 files changed, 14 insertions, 13 deletions
diff --git a/src/xlat/icmp_filter_flags.in b/src/xlat/icmp_filter_flags.in new file mode 100644 index 000000000..75f75772a --- /dev/null +++ b/src/xlat/icmp_filter_flags.in @@ -0,0 +1,14 @@ +#value_indexed +ICMP_ECHOREPLY 0 +ICMP_DEST_UNREACH 3 +ICMP_SOURCE_QUENCH 4 +ICMP_REDIRECT 5 +ICMP_ECHO 8 +ICMP_TIME_EXCEEDED 11 +ICMP_PARAMETERPROB 12 +ICMP_TIMESTAMP 13 +ICMP_TIMESTAMPREPLY 14 +ICMP_INFO_REQUEST 15 +ICMP_INFO_REPLY 16 +ICMP_ADDRESS 17 +ICMP_ADDRESSREPLY 18 diff --git a/src/xlat/icmpfilterflags.in b/src/xlat/icmpfilterflags.in deleted file mode 100644 index dac579edb..000000000 --- a/src/xlat/icmpfilterflags.in +++ /dev/null @@ -1,13 +0,0 @@ -1<<ICMP_ECHOREPLY -1<<ICMP_DEST_UNREACH -1<<ICMP_SOURCE_QUENCH -1<<ICMP_REDIRECT -1<<ICMP_ECHO -1<<ICMP_TIME_EXCEEDED -1<<ICMP_PARAMETERPROB -1<<ICMP_TIMESTAMP -1<<ICMP_TIMESTAMPREPLY -1<<ICMP_INFO_REQUEST -1<<ICMP_INFO_REPLY -1<<ICMP_ADDRESS -1<<ICMP_ADDRESSREPLY |