summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.pp.se>2002-08-31 12:31:43 +0000
committerThomas Habets <thomas@habets.pp.se>2002-08-31 12:31:43 +0000
commit5f6ee8c6c87558820184524db385e789abd7a924 (patch)
tree36b1460ef2c2e253ed3445b2149976e0eba33a54
parent9c7766f33071900527d9613baaad628e05aefea6 (diff)
downloadarping-5f6ee8c6c87558820184524db385e789abd7a924.tar.gz
pseudo-works on solaris-sparc
-rw-r--r--Makefile4
-rw-r--r--arping2.c7
-rw-r--r--configure.in7
3 files changed, 10 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 9d0fa22..4dc1cb4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile 709 2002-08-30 22:40:41Z marvin $
+# $Id: Makefile 713 2002-08-31 12:31:43Z marvin $
TARGETS=arping
USE_NETIF=0
@@ -57,6 +57,8 @@ arping: $(O_arping)
O_arping2=arping2.c
arping2: $(O_arping2)
gcc -I/home/thompa/src/Libnet-1.1.0/include -L/home/thompa/src/Libnet-1.1.0/src -o arping2 arping2.c -lnet -lpcap
+# gcc -I/home/thompa/src/Libnet-1.1.0/include -L/home/thompa/src/Libnet-1.1.0rc -o arping2 arping2.c -lnet -lpcap -lresolv -lnsl -lsocket
+
clean:
rm -f *.o $(TARGETS)
diff --git a/arping2.c b/arping2.c
index aa412c3..7c66f3b 100644
--- a/arping2.c
+++ b/arping2.c
@@ -12,7 +12,7 @@
*
* Also finds out IP of specified MAC
*
- * $Id: arping2.c 712 2002-08-30 23:23:12Z marvin $
+ * $Id: arping2.c 713 2002-08-31 12:31:43Z marvin $
*/
/*
* Copyright (C) 2000-2002 Thomas Habets <thomas@habets.pp.se>
@@ -691,7 +691,6 @@ int main(int argc, char **argv)
}
-
parm = argv[optind];
/*
@@ -734,7 +733,7 @@ int main(int argc, char **argv)
* parse parm into dstmac
*/
if (mode == PINGMAC) {
- unsigned char n[6];
+ u_int32_t n[6]; // 32bit because of alignment
if (optind + 1 != argc) {
usage(1);
}
@@ -783,7 +782,7 @@ int main(int argc, char **argv)
fprintf(stderr, "arping: pcap_open_live(): %s\n",ebuf);
exit(1);
}
-#ifdef HAVE_NET_BPF_H
+#ifdef HAVE_WEIRD_BSD
{
u_int32_t on = 1;
if (0 < (ioctl(pcap_fileno(pcap), BIOCIMMEDIATE,
diff --git a/configure.in b/configure.in
index df0ba33..3079a1d 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-dnl $Id: configure.in 712 2002-08-30 23:23:12Z marvin $
+dnl $Id: configure.in 713 2002-08-31 12:31:43Z marvin $
AC_INIT(arping2.c)
AC_CONFIG_HEADER(config.h)
@@ -24,11 +24,12 @@ case `uname -s` in
;;
esac
-AC_MSG_CHECKING(for explicit size type support)
+AC_MSG_CHECKING(for my kind of explicit size type support)
AC_TRY_COMPILE(
[#include <sys/types.h>],
[u_int32_t foo;],
- AC_DEFINE(HAVE_ESIZE_TYPES, 1, [Define this if your system has u_int32_t and such])
+ AC_DEFINE(HAVE_ESIZE_TYPES, 1,
+ [Define this if your system has u_int32_t and such])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))