Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit 73b5f0387199fbaa75130837b931faf770471640 1 parent 8d691bf
Gisle Vanem authored guyharris committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 pcap-dos.c
View
6 pcap-dos.c
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.