mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
move defines in namespace
This commit is contained in:
parent
8dfeec95c6
commit
5da9abe26e
1 changed files with 3 additions and 3 deletions
|
@ -22,9 +22,6 @@
|
|||
#define MALLOC(x) HeapAlloc(GetProcessHeap(), 0, (x))
|
||||
#define FREE(x) HeapFree(GetProcessHeap(), 0, (x))
|
||||
|
||||
#define address_pair_v4(a,b) { boost::asio::ip::address_v4::from_string (a).to_ulong (), boost::asio::ip::address_v4::from_string (b).to_ulong () }
|
||||
#define address_pair_v6(a,b) { boost::asio::ip::address_v6::from_string (a).to_bytes (), boost::asio::ip::address_v6::from_string (b).to_bytes () }
|
||||
|
||||
// inet_pton exists Windows since Vista, but XP haven't that function!
|
||||
// This function was written by Petar Korponai?. See http://stackoverflow.com/questions/15660203/inet-pton-identifier-not-found
|
||||
int inet_pton_xp(int af, const char *src, void *dst)
|
||||
|
@ -343,6 +340,9 @@ namespace net
|
|||
#endif
|
||||
}
|
||||
|
||||
#define address_pair_v4(a,b) { boost::asio::ip::address_v4::from_string (a).to_ulong (), boost::asio::ip::address_v4::from_string (b).to_ulong () }
|
||||
#define address_pair_v6(a,b) { boost::asio::ip::address_v6::from_string (a).to_bytes (), boost::asio::ip::address_v6::from_string (b).to_bytes () }
|
||||
|
||||
bool IsInReservedRange(const boost::asio::ip::address& host) {
|
||||
// https://en.wikipedia.org/wiki/Reserved_IP_addresses
|
||||
if(host.is_v4())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue