Fix WinPCap loading. No idea why zeromus made it load pcap_send() instead of pcap_sendpacket(), but now it supports both, and if pcap_send() can't be found, pcap_sendpacket() is loaded instead.

This commit is contained in:
luigi__ 2010-05-13 16:12:12 +00:00
parent 04d9bec939
commit 4885c6588b
1 changed files with 6 additions and 1 deletions

View File

@ -62,9 +62,14 @@ static void LoadWinPCap()
LOADSYMBOL(pcap_open_live);
LOADSYMBOL(pcap_close);
LOADSYMBOL(pcap_setnonblock);
LOADSYMBOL(pcap_send);
LOADSYMBOL(pcap_dispatch);
_pcap_send = (T_pcap_send)GetProcAddress(wpcap, "pcap_send");
if (_pcap_send == NULL)
_pcap_send = (T_pcap_send)GetProcAddress(wpcap, "pcap_sendpacket");
if (_pcap_send == NULL)
return;
bWinPCapAvailable = true;
}