c12e61ab46
- douse with $OpenBSD$ - fix DESCR - regen PLIST
24 lines
601 B
Plaintext
24 lines
601 B
Plaintext
$OpenBSD: patch-arpreqtest_c,v 1.1 2002/03/24 08:36:33 jsyn Exp $
|
|
--- arpreqtest.c.orig Wed Oct 1 15:51:34 1997
|
|
+++ arpreqtest.c Thu Oct 28 19:06:15 1999
|
|
@@ -20,7 +20,7 @@
|
|
unsigned long sourceIP, destIP;
|
|
struct result *resPtr;
|
|
#if defined(_OpenBSD_)
|
|
- char *defaultdevice = "ep1";
|
|
+ static char *defaultdevice = NULL;
|
|
#else if defined(SOLARIS)
|
|
char *defaultdevice = "le0";
|
|
#endif
|
|
@@ -33,7 +33,9 @@
|
|
pid_t our_id;
|
|
caddr_t area;
|
|
|
|
-
|
|
+ if (!defaultdevice) {
|
|
+ defaultdevice = strdup(pcap_lookupdev(NULL));
|
|
+ }
|
|
#ifdef SOLARIS
|
|
mfd = open("/dev/zero", O_RDWR);
|
|
if (mfd < 0){
|