diff options
Diffstat (limited to 'net/cdpr/files/patch-aa')
-rw-r--r-- | net/cdpr/files/patch-aa | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/net/cdpr/files/patch-aa b/net/cdpr/files/patch-aa index 13728e24b06c..8c591de71e7e 100644 --- a/net/cdpr/files/patch-aa +++ b/net/cdpr/files/patch-aa @@ -1,10 +1,36 @@ ---- conffile.c.orig Fri Jun 27 16:38:56 2003 -+++ conffile.c Fri Jun 27 16:37:14 2003 -@@ -6,6 +6,7 @@ - #if WIN32
- #include "Winsock2.h"
- #else
-+#include "sys/types.h"
- #include "sys/socket.h"
- #include "netinet/in.h"
- #include "arpa/inet.h"
+--- cdpr.c.orig Wed Nov 19 17:53:13 2003 ++++ cdpr.c Wed Nov 19 17:54:06 2003 +@@ -639,7 +639,7 @@ + pcap_lookupnet(dev, &net, &mask, errbuf); + + /* Open the pcap device */ +- if((handle = pcap_open_live(dev, BUFSIZ, 1, 0, errbuf)) == NULL) ++ if((handle = pcap_open_live(dev, BUFSIZ, 1, 1000, errbuf)) == NULL) + { + printf("Error opening device (%s)\n", errbuf); + exit(1); +@@ -656,11 +656,6 @@ + pcap_setfilter(handle, &filter); + pcap_freecode(&filter); + +- /* Set non-blocking mode */ +- if(pcap_setnonblock(handle, 1, errbuf)) +- { +- pcap_perror(handle, NULL); +- } + + /* Get the next packet that comes in, we only need one */ + printf("Waiting for CDP advertisement:\n"); +@@ -671,11 +666,7 @@ + do + { + packet = pcap_next(handle, &header); +-#ifdef WIN32 +- Sleep(10000); +-#else +- usleep(10000); +-#endif ++ + } while ((!packet) && ( timeout=((start_time+seconds) > (unsigned int)time(NULL))) ); + + /* |