One ping only
-
1 min read
For some odd reason, today was the day when I woke up and continued working on libICMP. It’s now almost seven years since I first adopted Tim Lawless’ public domain version, and today I picked up where I left off and started refactoring and cleaning up.
Example:
#include "icmp/icmp.h"
int main(int argc, char *argv[])
{
char *host = "localhost";
struct libicmp *obj;
if (argc >= 2)
host = argv[1];
if (!(obj = icmp_open(host, 0x1337, 0)))
return 1;
return icmp_ping(obj, 0, 0) == -1;
}
libICMP is nowhere near as fancy as liboping and is only slightly smaller with a more liberal license (ISC). The first release is however available from GitHub. Pull requests are as usual most welcome! :smiley: