X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fdns.h;h=63d5bb1fb78174a15b840d80a031164184044477;hb=8ed28d1f98d4d4c653201f0c4273e74dd8a122e6;hp=1b8c740ed73ac90c33b69506e244c69273735d82;hpb=4705381691cba08c7d3e6ef982e2335bb7672960;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/dns.h b/include/dns.h index 1b8c740ed..63d5bb1fb 100644 --- a/include/dns.h +++ b/include/dns.h @@ -35,11 +35,12 @@ struct dns_ip4list { class DNS { private: - char *result; in_addr *binip; - int t,i; + char* result; + char localbuf[1024]; + int t; void dns_init(); - unsigned int fd; + int myfd; void dns_init_2(const char* dnsserver); in_addr *dns_aton4(const char * const ipstring); char *dns_ntoa4(const in_addr * const ip); @@ -81,14 +82,19 @@ public: * to determine the status of the socket. */ bool HasResult(); + /** This method will return true if the lookup's fd matches the one provided + */ + bool HasResult(int fd); /** This method returns the result of your query as a string, depending upon wether you * called DNS::ReverseLookup() or DNS::ForwardLookup. */ std::string GetResult(); + std::string GetResultIP(); /** This method returns the file handle used by the dns query socket or zero if the * query is invalid for some reason, e.g. the dns server not responding. */ int GetFD(); + void SetNS(std::string dnsserver); }; #endif