Yate
|
DNS services. More...
#include <yateclass.h>
Public Types | |
enum | Type { Unknown, Srv, Naptr } |
Static Public Member Functions | |
static bool | available (Type type=Unknown) |
static bool | init (int timeout=-1, int retries=-1) |
static int | query (Type type, const char *dname, ObjList &result, String *error=0) |
static int | srvQuery (const char *dname, ObjList &result, String *error=0) |
static int | naptrQuery (const char *dname, ObjList &result, String *error=0) |
Static Public Attributes | |
static const TokenDict | s_types [] |
DNS services.
This class offers DNS query services
Runtime check for resolver availability
type | Optional type to check. Set it to Unknown (default) to check general resolver availability |
static bool init | ( | int | timeout = -1 , |
int | retries = -1 |
||
) | [static] |
Initialize the resolver in the current thread
timeout | Query timeout. Negative to use default |
retries | The number of query retries. Negative to use default |
static int naptrQuery | ( | const char * | dname, |
ObjList & | result, | ||
String * | error = 0 |
||
) | [static] |
Make a NAPTR (Naming Authority Pointer) query
dname | Domain to query |
result | List of resulting NaptrRecord items |
error | Optional string to be filled with error string |
Make a query
type | Query type as enumeration |
dname | Domain to query |
result | List of resulting record items |
error | Optional string to be filled with error string |
Make a SRV (Service Location) query
dname | Domain to query |
result | List of resulting SrvRecord items |
error | Optional string to be filled with error string |