Source reformatting only.
This commit is contained in:
parent
d6dc8763e9
commit
eb3fda68c7
1 changed files with 9 additions and 5 deletions
|
@ -30,7 +30,7 @@
|
||||||
*
|
*
|
||||||
* Author: Oliver Schmidt <ol.sc@web.de>
|
* Author: Oliver Schmidt <ol.sc@web.de>
|
||||||
*
|
*
|
||||||
* $Id: wpcap.c,v 1.9 2007/11/17 18:08:15 adamdunkels Exp $
|
* $Id: wpcap.c,v 1.10 2007/11/17 20:00:42 oliverschmidt Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
@ -208,10 +208,14 @@ wpcap_init(void)
|
||||||
log_message("wpcap_init: cmdline address: ", inet_ntoa(addr));
|
log_message("wpcap_init: cmdline address: ", inet_ntoa(addr));
|
||||||
|
|
||||||
wpcap = LoadLibrary("wpcap.dll");
|
wpcap = LoadLibrary("wpcap.dll");
|
||||||
pcap_findalldevs = (int (*)(struct pcap_if **, char *))GetProcAddress(wpcap, "pcap_findalldevs");
|
pcap_findalldevs = (int (*)(struct pcap_if **, char *))
|
||||||
pcap_open_live = (struct pcap *(*)(char *, int, int, int, char *))GetProcAddress(wpcap, "pcap_open_live");
|
GetProcAddress(wpcap, "pcap_findalldevs");
|
||||||
pcap_next_ex = (int (*)(struct pcap *, struct pcap_pkthdr **, unsigned char **))GetProcAddress(wpcap, "pcap_next_ex");
|
pcap_open_live = (struct pcap *(*)(char *, int, int, int, char *))
|
||||||
pcap_sendpacket = (int (*)(struct pcap *, unsigned char *, int))GetProcAddress(wpcap, "pcap_sendpacket");
|
GetProcAddress(wpcap, "pcap_open_live");
|
||||||
|
pcap_next_ex = (int (*)(struct pcap *, struct pcap_pkthdr **, unsigned char **))
|
||||||
|
GetProcAddress(wpcap, "pcap_next_ex");
|
||||||
|
pcap_sendpacket = (int (*)(struct pcap *, unsigned char *, int))
|
||||||
|
GetProcAddress(wpcap, "pcap_sendpacket");
|
||||||
|
|
||||||
if(pcap_findalldevs == NULL || pcap_open_live == NULL ||
|
if(pcap_findalldevs == NULL || pcap_open_live == NULL ||
|
||||||
pcap_next_ex == NULL || pcap_sendpacket == NULL) {
|
pcap_next_ex == NULL || pcap_sendpacket == NULL) {
|
||||||
|
|
Loading…
Reference in a new issue