From 3f37844d0aa21b282df7fbd23694edef67314198 Mon Sep 17 00:00:00 2001 From: Thomas Habets Date: Mon, 9 Jul 2007 22:23:28 +0000 Subject: flags and fast ctrl-c --- Makefile | 6 +++--- arping-2/arping.c | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 799ba59..4885e3c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile 1891 2007-07-09 22:12:22Z marvin $ +# $Id: Makefile 1893 2007-07-09 22:23:28Z marvin $ TARGETS=arping CD=cd @@ -23,8 +23,8 @@ CC=gcc # explicit pcap include dir is for redhat which is fux0red CFLAGS=-g -I/usr/local/include -L/usr/local/lib -DFINDIF=$(FINDIF) -DUSE_NETIF=$(USE_NETIF) -DOPENBSD=$(OPENBSD) -DLINUX=$(LINUX) -DSOLARIS=$(SOLARIS) -DFREEBSD=$(FREEBSD) -DMACOSX=$(MACOSX) -I/usr/include/pcap -L/opt/csw/lib -R/opt/csw/lib -CFLAGS2=-g -I/usr/local/include -I/usr/local/include/libnet-1.1 -I/usr/include/pcap -LDFLAGS2=-g -L/usr/local/lib -L/usr/local/lib/libnet-1.1 -L/opt/csw/lib +CFLAGS2=-g -I/usr/local/include -I/usr/local/include/libnet-1.1 -I/usr/include/pcap -I/usr/local/include/libnet11 +LDFLAGS2=-g -L/usr/local/lib -L/usr/local/lib/libnet-1.1 -L/opt/csw/lib -L/usr/local/lib/libnet11 all: message arping2 diff --git a/arping-2/arping.c b/arping-2/arping.c index 34ed170..ac7aea6 100644 --- a/arping-2/arping.c +++ b/arping-2/arping.c @@ -12,7 +12,7 @@ * * Also finds out IP of specified MAC * - * $Id: arping.c 1892 2007-07-09 22:13:13Z marvin $ + * $Id: arping.c 1893 2007-07-09 22:23:28Z marvin $ */ /* * Copyright (C) 2000-2002 Thomas Habets @@ -769,7 +769,9 @@ ping_recv_unix(pcap_t *pcap,u_int32_t packetwait, pcap_handler func) tv.tv_usec = 1; done = 1; } - + if (time_to_die) { + return; + } #ifndef HAVE_WEIRD_BSD switch((sr = select(pcap_fileno(pcap)+1, &fds, -- cgit v1.2.1