Dns.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace AppSecInc
4 {
5  namespace TcpIp
6  {
7  namespace DNS
8  {
10  std::wstring GetHostByAddress(const std::wstring& ip_addr, int family = AF_INET);
12  std::string GetHostByAddress(const std::string& ip_addr, int family = AF_INET);
14  std::wstring GetHostByName(const std::wstring& name, int family = AF_INET);
16  std::string GetHostByName(const std::string& name, int family = AF_INET);
18  bool IsIpAddress(const std::wstring& name, int family = AF_INET);
20  bool IsIpAddress(const std::string& name, int family = AF_INET);
22  std::vector<std::wstring> GetHostIpAddresses(const std::wstring& name, int family = AF_INET);
24  std::vector<std::string> GetHostIpAddresses(const std::string& name, int family = AF_INET);
26  void GetHostInfo(const std::wstring& name, std::wstring& hostname, std::vector<std::wstring>& aliases, std::vector<std::wstring>& ipaddresses, int family = AF_INET);
28  void GetHostInfo(const std::string& name, std::string& hostname, std::vector<std::string>& aliases, std::vector<std::string>& ipaddresses, int family = AF_INET);
30  std::wstring GetHostNameW(const std::wstring& defaultvalue = L"localhost");
32  std::string GetHostNameA(const std::string& defaultvalue = "localhost");
33  }
34  }
35 }
std::string GetHostNameA(const std::string &defaultvalue="localhost")
get the local host name from tcp/ip registry configuration
Definition: Dns.cpp:137
bool IsIpAddress(const std::wstring &name, int family=AF_INET)
returns true if this is an IPv4 address
Definition: Dns.cpp:143
std::wstring GetHostByAddress(const std::wstring &ip_addr, int family=AF_INET)
get host name by IPv4 address
Definition: Dns.cpp:4
std::wstring GetHostNameW(const std::wstring &defaultvalue=L"localhost")
get the local host name from tcp/ip registry configuration
Definition: Dns.cpp:124
std::vector< std::wstring > GetHostIpAddresses(const std::wstring &name, int family=AF_INET)
get host IPv4 addresses
Definition: Dns.cpp:100
std::wstring GetHostByName(const std::wstring &name, int family=AF_INET)
get host name by DNS name or IPv4 address
Definition: Dns.cpp:83
void GetHostInfo(const std::wstring &name, std::wstring &hostname, std::vector< std::wstring > &aliases, std::vector< std::wstring > &ipaddresses, int family=AF_INET)
get host IPv4 information
Definition: Dns.cpp:27


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com