class Resolver

DNS services. More...

Full nameTelEngine::Resolver
Definition#include <yateclass.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Static Methods

Public Members


Detailed Description

This class offers DNS query services

enum Type { Unknown, Srv, Naptr, }

Type

Resolver handled types

bool  available (Type type = Unknown)

available

[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

bool  init (int timeout = -1, int retries = -1)

init

[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

int  query (Type type, const char* dname, ObjList& result, String* error = 0)

query

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

int  srvQuery (const char* dname, ObjList& result, String* error = 0)

srvQuery

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

int  naptrQuery (const char* dname, ObjList& result, String* error = 0)

naptrQuery

[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 const TokenDict s_types[]

s_types[]


Generated by: paulc on bussard on Fri Dec 21 16:28:34 2012, using kdoc 2.0a54.