You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
1.0 KiB

Index: Makefile
--- Makefile.orig 2010-02-15 20:39:49.000000000 +0100
+++ Makefile 2010-02-17 18:18:40.000000000 +0100
@@ -18,7 +18,7 @@
#LDFLAGS = -lsocket -lnsl -lpcap
cdpr: cdpr.c cdprs.c conffile.c cdp.h cdpr.h
- gcc $(CFLAGS) cdpr.c cdprs.c conffile.c $(LDFLAGS) -o cdpr
+ $(CC) $(CFLAGS) cdpr.c cdprs.c conffile.c $(LDFLAGS) -o cdpr $(LIBS)
clean:
rm -f cdpr
Index: cdpr.c
--- cdpr.c.orig 2010-02-15 20:49:19.000000000 +0100
+++ cdpr.c 2010-02-17 18:20:16.000000000 +0100
@@ -713,11 +713,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");
@@ -728,11 +723,6 @@
do
{
packet = pcap_next(handle, &header);
-#ifdef WIN32
- Sleep(10000);
-#else
- usleep(10000);
-#endif
} while ((packet == NULL) && ( timeout=((start_time+seconds) > (unsigned int)time(NULL))) );
/*