Changeset 90
Legend:
- Unmodified
- Added
- Removed
-
trunk/HISTORY
r89 r90 1 Version 0.12. pre11 Version 0.12.0pre1 2 2 ----------------- 3 3 - added debug messages 4 - added support for link that may be down (ppp0 on a DSL line for example) 4 5 5 6 Version 0.11.5rc1 - 18 october 2002 -
trunk/VERSION
r83 r90 1 0.1 1.5rc11 0.12.0pre1 -
trunk/source/pcap.c
r88 r90 47 47 /* dirty code */ 48 48 extern int promisc; 49 extern char *device; 49 50 50 51 /* Global variable. This forbids to open 2 pcap descriptors. */ 51 pcap_t *pcap_global_descriptor = NULL;52 pcap_t *pcap_global_descriptor = NULL; 52 53 53 54 int offset; … … 56 57 int SigDump = 0; 57 58 extern struct AllLogsType * pAllLogs; 59 60 /* pcap error buffer */ 61 extern char errbuf[PCAP_ERRBUF_SIZE]; 58 62 59 63 int iphdr_chksum(u_char *iphead, int size) … … 241 245 DEBUG_MSG("received a packet\n") 242 246 if (NULL == packet) { 243 DEBUG_MSG("pcap_next returned a null pointer\n") 247 /* if pcap_next returns, there is an error on the link, so we close it and try to reopen it */ 248 DEBUG_MSG("pcap_next returned a null pointer [%s]\n", pcap_geterr(pcap_global_descriptor)); 249 closepcap(); 250 sleep(2); 251 while (!openpcap(device, promisc)) { 252 sleep(2); 253 } 244 254 continue; 245 255 }
