mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
fix ip_to_int function on windows
This commit is contained in:
@@ -6,4 +6,6 @@
|
||||
#define HAVE_DOT11
|
||||
|
||||
/* Have WPA2 decryption library */
|
||||
#define HAVE_WPA2_DECRYPTION
|
||||
//#define HAVE_WPA2_DECRYPTION
|
||||
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ uint32_t IPv4Address::ip_to_int(const char* ip) {
|
||||
#ifdef WIN32
|
||||
in_addr addr;
|
||||
if(InetPtonA(AF_INET, ip, &addr)) {
|
||||
return addr.s_addr;
|
||||
return Endian::be_to_host(addr.s_addr);
|
||||
}
|
||||
else {
|
||||
throw std::runtime_error("Invalid ip address");
|
||||
|
||||
Reference in New Issue
Block a user