X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-autoipd%2Fmain.c;h=d4b9b6deb0ab292afb6579e983c07aa7334d512e;hb=722f8d557252486cebc9a4efdd523321f31a9378;hp=27c5a29509f740a2233b9b74d34bed43c16e0bdf;hpb=648db528f5cc197c38f7b17bb09dd53958df6302;p=catta diff --git a/avahi-autoipd/main.c b/avahi-autoipd/main.c index 27c5a29..d4b9b6d 100644 --- a/avahi-autoipd/main.c +++ b/avahi-autoipd/main.c @@ -62,6 +62,12 @@ #ifndef __linux__ #include + +/* Old versions of PCAP defined it as D_IN */ +#ifndef PCAP_D_IN +#define PCAP_D_IN D_IN +#endif + #endif #include @@ -77,6 +83,8 @@ #include "main.h" #include "iface.h" + + /* An implementation of RFC 3927 */ /* Constants from the RFC */ @@ -1003,7 +1011,7 @@ static int drop_privs(void) { #elif defined(HAVE_SETREGID) r = setregid(gr->gr_gid, gr->gr_gid); #else -#error "No API to drop priviliges" +#error "No API to drop privileges" #endif if (r < 0) { @@ -1019,7 +1027,7 @@ static int drop_privs(void) { #elif defined(HAVE_SETREUID) r = setreuid(pw->pw_uid, pw->pw_uid); #else -#error "No API to drop priviliges" +#error "No API to drop privileges" #endif if (r < 0) { @@ -1208,13 +1216,13 @@ static int loop(int iface, uint32_t addr) { if (info.sender_ip_address == addr) { /* Normal conflict */ conflict = 1; - daemon_log(LOG_INFO, "Recieved conflicting normal ARP packet."); + daemon_log(LOG_INFO, "Received conflicting normal ARP packet."); } else if (state == STATE_WAITING_PROBE || state == STATE_PROBING || state == STATE_WAITING_ANNOUNCE) { /* Probe conflict */ conflict = info.target_ip_address == addr && memcmp(hw_address, info.sender_hw_address, ETHER_ADDRLEN); if (conflict) - daemon_log(LOG_INFO, "Recieved conflicting probe ARP packet."); + daemon_log(LOG_INFO, "Received conflicting probe ARP packet."); } if (conflict) { @@ -1418,13 +1426,13 @@ static void help(FILE *f, const char *a0) { " -D --daemonize Daemonize after startup\n" " -s --syslog Write log messages to syslog(3) instead of STDERR\n" " -k --kill Kill a running daemon\n" - " -r --refresh Request a running daemon to refresh it's IP address\n" + " -r --refresh Request a running daemon refresh its IP address\n" " -c --check Return 0 if a daemon is already running\n" " -V --version Show version\n" " -S --start=ADDRESS Start with this address from the IPv4LL range\n" " 169.254.0.0/16\n" " -t --script=script Action script to run (defaults to\n" - " /etc/avahi/avahi-autoipd.action)\n" + " "AVAHI_IPCONF_SCRIPT")\n" " -w --wait Wait until an address has been acquired before\n" " daemonizing\n" " --force-bind Assign an IPv4LL address even if a routable address\n"