Made use of exit handler.
This commit is contained in:
parent
b8b0dfaa5d
commit
0bf8c95b79
1 changed files with 4 additions and 2 deletions
|
@ -30,7 +30,7 @@
|
||||||
*
|
*
|
||||||
* Author: Oliver Schmidt <ol.sc@web.de>
|
* Author: Oliver Schmidt <ol.sc@web.de>
|
||||||
*
|
*
|
||||||
* $Id: wpcap.c,v 1.7 2007/05/20 21:32:24 oliverschmidt Exp $
|
* $Id: wpcap.c,v 1.8 2007/05/22 22:01:03 oliverschmidt Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
@ -77,6 +77,8 @@ struct pcap_pkthdr {
|
||||||
DWORD len;
|
DWORD len;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
HMODULE wpcap;
|
||||||
|
|
||||||
static struct pcap *pcap;
|
static struct pcap *pcap;
|
||||||
|
|
||||||
static int (* pcap_findalldevs)(struct pcap_if **, char *);
|
static int (* pcap_findalldevs)(struct pcap_if **, char *);
|
||||||
|
@ -193,7 +195,6 @@ void
|
||||||
wpcap_init(void)
|
wpcap_init(void)
|
||||||
{
|
{
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
HMODULE wpcap;
|
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
addr.s_addr = inet_addr((*__argv)[1]);
|
addr.s_addr = inet_addr((*__argv)[1]);
|
||||||
|
@ -252,5 +253,6 @@ wpcap_send(void)
|
||||||
void
|
void
|
||||||
wpcap_exit(void)
|
wpcap_exit(void)
|
||||||
{
|
{
|
||||||
|
FreeLibrary(wpcap);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
Loading…
Reference in a new issue