Yate
Public Types | Static Public Member Functions | Static Public Attributes
Resolver Class Reference

DNS services. More...

#include <yateclass.h>

List of all members.

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 []

Detailed Description

DNS services.

This class offers DNS query services


Member Enumeration Documentation

enum Type

Resolver handled types


Member Function Documentation

static bool available ( Type  type = Unknown) [static]

Runtime check for resolver availability

Parameters:
typeOptional type to check. Set it to Unknown (default) to check general resolver availability
Returns:
True if the resolver is available on current platform
static bool init ( int  timeout = -1,
int  retries = -1 
) [static]

Initialize the resolver in the current thread

Parameters:
timeoutQuery timeout. Negative to use default
retriesThe number of query retries. Negative to use default
Returns:
True on success
static int naptrQuery ( const char *  dname,
ObjList result,
String error = 0 
) [static]

Make a NAPTR (Naming Authority Pointer) query

Parameters:
dnameDomain to query
resultList of resulting NaptrRecord items
errorOptional string to be filled with error string
Returns:
0 on success, error code otherwise (h_errno value on Linux)
static int query ( Type  type,
const char *  dname,
ObjList result,
String error = 0 
) [static]

Make a query

Parameters:
typeQuery type as enumeration
dnameDomain to query
resultList of resulting record items
errorOptional string to be filled with error string
Returns:
0 on success, error code otherwise (h_errno value on Linux)
static int srvQuery ( const char *  dname,
ObjList result,
String error = 0 
) [static]

Make a SRV (Service Location) query

Parameters:
dnameDomain to query
resultList of resulting SrvRecord items
errorOptional string to be filled with error string
Returns:
0 on success, error code otherwise (h_errno value on Linux)

Member Data Documentation

const TokenDict s_types[] [static]

Resolver type names


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