pscan: new applet (portscanner). ~1350 bytes. By Tito <farmatito@tiscali.it>
[oweals/busybox.git] / networking / zcip.c
index eb3c869ab9f629bb8ded7e14760b43f07507ec92..eb0a7ba417893e2e5757aad2592d32fd52674a0c 100644 (file)
@@ -23,7 +23,7 @@
 // - 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>
@@ -114,10 +114,8 @@ static void arp(int fd, struct sockaddr *saddr, int op,
        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;
@@ -151,7 +149,7 @@ static int run(char *argv[3], const char *intf, struct in_addr *ip)
 /**
  * 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);
 }