freebsd-dev/sbin/ping/tests
Jose Luis Duran 9185854d19 ping: Fix the display of Flags/Fragment Offset
In the IP header, Flags + Fragment Offset is a 16-bit field.

Use ntohs() instead of ntohl(), otherwise the Flags/Fragment Offset
values may not display correctly.

Before (DF set)

    Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src      Dst
     4  5  00 0054 0001   0 0000  40  01 b6a4 192.0.2.1  192.0.2.2

After (DF set)

    Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src      Dst
     4  5  00 0054 0001   2 0000  40  01 b6a4 192.0.2.1  192.0.2.2

Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D38479
2023-03-14 11:58:02 -04:00
..
in_cksum_test.c ICMP checksum test: Fix for big endian 2021-01-11 19:03:46 -07:00
injection.py Add test cases for ping with IP options in the response 2022-12-25 22:59:58 -07:00
Makefile ping: Add ATF-Python tests 2023-02-20 10:34:33 +00:00
ping_6_c1_s8_t1.out Merge ping6 to ping 2020-11-26 04:29:30 +00:00
ping_c1_s8_t1_S1.out ping: if -S srcaddr uses a numeric address, use that protocol 2022-05-20 18:30:47 -05:00
ping_c1_s56_t1_S127.out ping: if -S srcaddr uses a numeric address, use that protocol 2022-05-20 18:30:47 -05:00
ping_c1_s56_t1.out
ping_test.sh Add test cases for ping with IP options in the response 2022-12-25 22:59:58 -07:00
test_ping.py ping: Fix the display of Flags/Fragment Offset 2023-03-14 11:58:02 -04:00