Changeset 90

Show
Ignore:
Timestamp:
21.10.2002 14:51:28 (6 years ago)
Author:
tibob
Message:

- set VERSION to the good number
- support for "unstable links"
- updated HISTORY

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/HISTORY

    r89 r90  
    1 Version 0.12.pre1 
     1Version 0.12.0pre1 
    22----------------- 
    33- added debug messages 
     4- added support for link that may be down (ppp0 on a DSL line for example) 
    45 
    56Version 0.11.5rc1 - 18 october 2002 
  • trunk/VERSION

    r83 r90  
    1 0.11.5rc1 
     10.12.0pre1 
  • trunk/source/pcap.c

    r88 r90  
    4747/* dirty code */ 
    4848extern int promisc; 
     49extern char *device; 
    4950 
    5051/* Global variable. This forbids to open 2 pcap descriptors. */ 
    51  pcap_t  *pcap_global_descriptor = NULL; 
     52pcap_t  *pcap_global_descriptor = NULL; 
    5253 
    5354int     offset; 
     
    5657int SigDump = 0; 
    5758extern struct AllLogsType * pAllLogs; 
     59 
     60/* pcap error buffer */ 
     61extern char errbuf[PCAP_ERRBUF_SIZE]; 
    5862 
    5963int iphdr_chksum(u_char *iphead, int size) 
     
    241245    DEBUG_MSG("received a packet\n") 
    242246    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      } 
    244254      continue; 
    245255    }