Reputation: 163
I need to test code which deals with ICMP packets, but there is no activity at all. So i thought is there any system function to trigger tsome activity, for instance to make port 80 work you usually do system("wget 'webaddress'");
. Is there anything similar to that for ICMP? thanks beforehand
Upvotes: 1
Views: 299
Reputation: 38118
The ping
command would get you close. Modern implementations often default to a random UDP port, but the documentation on your system (e.g. man ping
) should tell you the option to pass to tell it to use ICMP instead.
Upvotes: 1