libutil++  1.9.3
 All Classes Functions Variables
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Protected Member Functions | List of all members
sella::net::DNS Class Reference

Public Types

typedef std::shared_ptr< DNSshared
 
typedef DNSptr
 

Public Member Functions

 DNS (const std::vector< std::string > &nameservers=empty, const std::vector< std::string > &searches=empty) throw (DNSException)
 
 DNS (sella::util::ThreadPool *pool, const std::vector< std::string > &nameservers=empty, const std::vector< std::string > &searches=empty) throw (DNSException)
 
std::vector< std::string > resolve (const std::string &name, int record=A, int protocol=AnyProtocol) throw (DNSException)
 
sella::variant::Variant resolve (const std::vector< std::string > &names, int record=A, int protocol=AnyProtocol) throw (DNSException)
 
std::vector< std::string > bulkResolve (const std::vector< std::string > &names, int record=A, int protocol=AnyProtocol) throw (DNSException)
 
DNSCallbackresolve (DNSCallback *callback, const std::string &name, int record=A, int protocol=AnyProtocol) throw (DNSException)
 
bool receive (uint64_t usec=0, time_t now=0) throw ()
 
void setInterval (uint64_t usec) throw ()
 
void setNoSearch (bool on=true) throw ()
 
void setNoRecursion (bool on=true) throw ()
 
void setAuthoritativeOnly (bool on=true) throw ()
 
void setTimeout (int seconds=5) throw ()
 
void setRetries (int retries=2) throw ()
 
void setDots (int ndots=1) throw ()
 
void setUDPSize (int bytes=4096) throw ()
 
void setUDPPort (short port=53) throw ()
 
int getActive () throw ()
 
int getFD () throw ()
 

Static Public Member Functions

static std::vector< std::string > sresolve (const std::string &name, int protocol=AnyProtocol) throw (DNSException)
 
static std::vector< IPAddresssresolve_ip (const std::string &name, int protocol=AnyProtocol) throw (DNSException)
 
static const DNS::shared shared_ptr (const std::vector< std::string > &nameservers=empty, const std::vector< std::string > &searches=empty) throw (DNSException)
 
static const DNS::shared shared_ptr (sella::util::ThreadPool *pool, const std::vector< std::string > &nameservers=empty, const std::vector< std::string > &searches=empty) throw (DNSException)
 
static const IPAddress convertArpa (const std::string &qname) throw (DNSException)
 

Static Public Attributes

static const uint64_t DefaultInterval = 5000
 
static const int AnyProtocol = 0x00
 
static const int IPv4Preferred = 0x01
 
static const int IPv4Required = 0x03
 
static const int IPv6Preferred = 0x04
 
static const int IPv6Required = 0x12
 
static const int A = 0x20
 
static const int PTR = 0x21
 
static const std::vector
< std::string > 
empty
 

Static Protected Member Functions

static void callback_a (struct dns_ctx *context, void *result, void *argument)
 
static void callback_aaaa (struct dns_ctx *context, void *result, void *argument)
 
static void callback_ptr (struct dns_ctx *context, dns_rr_ptr *result, void *argument)
 

Detailed Description

Definition at line 40 of file DNS.h.


The documentation for this class was generated from the following files: