diff options
author | Shauren <shauren.trinity@gmail.com> | 2013-01-27 17:33:01 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2013-01-27 17:33:01 +0100 |
commit | 6e80357f8e8b4e820bab8bd05fb8457c3cb46d11 (patch) | |
tree | 43c19c9e00dbf99c3811900438348bfe266d82fb /src/server/shared/Utilities/Util.h | |
parent | e1d12de2b14534e35916e58afbe4e7016f0b6ff7 (diff) |
Core/Authserver: Added possibility to allow realm connections both from "world" and local networks.
Diffstat (limited to 'src/server/shared/Utilities/Util.h')
-rw-r--r-- | src/server/shared/Utilities/Util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h index e7218d7ba72..a379bfd32fc 100644 --- a/src/server/shared/Utilities/Util.h +++ b/src/server/shared/Utilities/Util.h @@ -25,6 +25,7 @@ #include <string> #include <vector> #include <list> +#include <ace/INET_Addr.h> // Searcher for map of structs template<typename T, class S> struct Finder @@ -343,6 +344,13 @@ void utf8printf(FILE* out, const char *str, ...); void vutf8printf(FILE* out, const char *str, va_list* ap); bool IsIPAddress(char const* ipaddress); + +/// Checks if address belongs to the a network with specified submask +bool IsIPAddrInNetwork(ACE_INET_Addr const& net, ACE_INET_Addr const& addr, ACE_INET_Addr const& subnetMask); + +/// Transforms ACE_INET_Addr address into string format "dotted_ip:port" +std::string GetAddressString(ACE_INET_Addr const& addr); + uint32 CreatePIDFile(const std::string& filename); std::string ByteArrayToHexStr(uint8 const* bytes, uint32 length, bool reverse = false); |