diff options
author | Gisle Vanem <gvanem@broadpark.no> | 2013-03-28 12:24:50 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-03-28 12:24:50 -0700 |
commit | 73b5f0387199fbaa75130837b931faf770471640 (patch) | |
tree | 4ec193ff0f0c6ae6b1cded20da4f1607e7bbd8b8 /pcap-dos.c | |
parent | 8d691bf367c5fa873790350f9edc22269e52664b (diff) |
Rename pcap_create() to pcap_create_interface().
pcap_create() is now a libpcap API, so rename the internal function not
to collide with it.
Also, initialize a variable, and fix a comment to make it clear it's not
pcap_close() that's called directly.
Diffstat (limited to 'pcap-dos.c')
-rw-r--r-- | pcap-dos.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -143,7 +143,7 @@ static struct device *get_device (int fd) return handle_to_device [fd-1]; } -pcap_t *pcap_create (const char *device, char *ebuf) +pcap_t *pcap_create_interface (const char *device, char *ebuf) { pcap_t *p; @@ -211,7 +211,7 @@ static int pcap_read_one (pcap_t *p, pcap_handler callback, u_char *data) { struct pcap_pkthdr pcap; - struct timeval now, expiry; + struct timeval now, expiry = { 0,0 }; BYTE *rx_buf; int rx_len = 0; @@ -287,7 +287,7 @@ pcap_read_one (pcap_t *p, pcap_handler callback, u_char *data) return (1); } - /* If not to wait for a packet or pcap_close() called from + /* If not to wait for a packet or pcap_cleanup_dos() called from * e.g. SIGINT handler, exit loop now. */ if (p->md.timeout <= 0 || (volatile int)p->fd <= 0) |