I just want to capture the packets sent by ping. I know there are tcpdump, but it doesn't just capture the packets for a single program. So is there a way to just capture the packet for a single program? Thanks.
Asked
Active
Viewed 223 times
0
-
1Ping packets use ICMP (Internet Control Message Protocol) not IP. – waltinator Feb 23 '21 at 18:04
-
So what can be used to monitor ICMPs? – user1424739 Feb 23 '21 at 19:07
-
1Read `man tcpdump`. In the "`Examples`" section there's a way to monitor all ICMP except ping. – waltinator Feb 23 '21 at 19:26
-
What exactly do you want to capture about these packets? If you're wanting to see what the ping command is writing to the network you can do it with ```strace```, e.g. ```strace -f -e trace=network ping www.google.com``` – grifferz Feb 26 '21 at 02:44