// - avoid silent script failures, especially under load...
// - link status monitoring (restart on link-up; stop on link-down)
-#include "busybox.h"
+#include "libbb.h"
#include <syslog.h>
#include <poll.h>
#include <sys/wait.h>
memcpy(&p.arp.arp_tpa, &target_ip, sizeof(p.arp.arp_tpa));
// send it
- if (sendto(fd, &p, sizeof(p), 0, saddr, sizeof(*saddr)) < 0) {
- bb_perror_msg("sendto");
- //return -errno;
- }
+ xsendto(fd, &p, sizeof(p), saddr, sizeof(*saddr));
+
// Currently all callers ignore errors, that's why returns are
// commented out...
//return 0;
/**
* Return milliseconds of random delay, up to "secs" seconds.
*/
-static unsigned ATTRIBUTE_ALWAYS_INLINE ms_rdelay(unsigned secs)
+static unsigned ALWAYS_INLINE ms_rdelay(unsigned secs)
{
return lrand48() % (secs * 1000);
}