PTLib
Version 2.18.8
|
#include <ptlib/sockets.h>
#include <ptclib/random.h>
#include <ptclib/url.h>
#include <arpa/nameser.h>
#include <resolv.h>
Go to the source code of this file.
Classes | |
struct | DNS_A_DATA |
struct | DNS_AAAA_DATA |
struct | DNS_MX_DATA |
struct | DNS_PTR_DATA |
struct | DNS_SRV_DATA |
struct | DNS_NULL_DATA |
struct | DNS_RECORD_FLAGS |
class | DnsRecord |
class | PDNS::PDnsRecords |
class | PDNS::SRVRecord |
class | MXRecord |
Namespaces | |
PDNS | |
Macros | |
#define | P_HAS_RESOLV_H 1 |
#define | T_SRV 33 |
#define | T_NAPTR 35 |
#define | DNS_STATUS int |
#define | DNS_TYPE_SRV T_SRV |
#define | DNS_TYPE_MX T_MX |
#define | DNS_TYPE_A T_A |
#define | DNS_TYPE_AAAA T_AAAA |
#define | DNS_TYPE_NAPTR T_NAPTR |
#define | DnsFreeRecordList 1 |
#define | DNS_QUERY_STANDARD 0 |
#define | DNS_QUERY_BYPASS_CACHE 0 |
Typedefs | |
typedef DnsRecord | DNS_RECORD |
typedef DnsRecord * | PDNS_RECORD |
Enumerations | |
enum | DNS_SECTION { DnsSectionQuestion, DnsSectionAnswer, DnsSectionAuthority, DnsSectionAdditional } |
Functions | |
void | DnsRecordListFree (PDNS_RECORD rec, int FreeType) |
PDNS_RECORD | DnsRecordSetCopy (PDNS_RECORD src) |
DNS_STATUS | DnsQuery_A (const char *service, WORD requestType, DWORD options, void *, PDNS_RECORD *results, void *) |
DNS_STATUS | PDNS::Cached_DnsQuery (const char *name, WORD type, DWORD options, void *extra, PDNS_RECORD *queryResults, void *reserved) |
template<unsigned type, class RecordListType , class RecordType > | |
PBoolean | PDNS::Lookup (const PString &name, RecordListType &recordList) |
void | PDNS::PrintOn (ostream &strm) const |
SRVRecord * | PDNS::GetFirst () |
SRVRecord * | PDNS::GetNext () |
PDNS::NAPTRRecord * | PDNS::HandleDNSRecord (PDNS_RECORD dnsRecord, PDNS_RECORD results) |
PBoolean | GetRecords (const PString &service, SRVRecordList &serviceList) |
return a list of DNS SRV record with the specified service type More... | |
PBoolean | GetSRVRecords (const PString &service, SRVRecordList &serviceList) |
provided for backwards compatibility More... | |
PBoolean | GetSRVRecords (const PString &service, const PString &type, const PString &domain, SRVRecordList &serviceList) |
return a list of DNS SRV record with the specified service, type and domain More... | |
PBoolean | LookupSRV (const PString &srvQuery, WORD defaultPort, PIPSocketAddressAndPortVector &addrList) |
Perform a DNS lookup of the specified service. More... | |
PBoolean | LookupSRV (const PString &domain, const PString &service, WORD defaultPort, PIPSocketAddressAndPortVector &addrList) |
PBoolean | LookupSRV (const PURL &url, const PString &service, PStringList &returnStr) |
void | PrintOn (ostream &strm) const |
MXRecord * | GetFirst () |
MXRecord * | GetNext () |
PDNS::MXRecord * | HandleDNSRecord (PDNS_RECORD dnsRecord, PDNS_RECORD results) |
PBoolean | GetRecords (const PString &domain, MXRecordList &serviceList) |
return a list of MX records for the specified domain More... | |
PBoolean | GetMXRecords (const PString &domain, MXRecordList &serviceList) |
provided for backwards compatibility More... | |
Variables | |
PINDEX | PDNS::priPos |
PWORDArray | PDNS::priList |
PINDEX | lastIndex |
#define DNS_QUERY_BYPASS_CACHE 0 |
#define DNS_QUERY_STANDARD 0 |
Referenced by PDNS::Lookup().
#define DNS_STATUS int |
Referenced by PDNS::Lookup().
#define DNS_TYPE_A T_A |
#define DNS_TYPE_AAAA T_AAAA |
#define DNS_TYPE_MX T_MX |
#define DNS_TYPE_NAPTR T_NAPTR |
#define DNS_TYPE_SRV T_SRV |
#define DnsFreeRecordList 1 |
#define P_HAS_RESOLV_H 1 |
#define T_NAPTR 35 |
#define T_SRV 33 |
typedef DnsRecord DNS_RECORD |
typedef DnsRecord* PDNS_RECORD |
enum DNS_SECTION |
DNS_STATUS DnsQuery_A | ( | const char * | service, |
WORD | requestType, | ||
DWORD | options, | ||
void * | , | ||
PDNS_RECORD * | results, | ||
void * | |||
) |
void DnsRecordListFree | ( | PDNS_RECORD | rec, |
int | FreeType | ||
) |
PDNS_RECORD DnsRecordSetCopy | ( | PDNS_RECORD | src | ) |
MXRecord* GetFirst | ( | ) |
provided for backwards compatibility
References GetRecords().
MXRecord* GetNext | ( | ) |
return a list of DNS SRV record with the specified service type
return a list of MX records for the specified domain
provided for backwards compatibility
References GetRecords().
PBoolean GetSRVRecords | ( | const PString & | service, |
const PString & | type, | ||
const PString & | domain, | ||
SRVRecordList & | serviceList | ||
) |
return a list of DNS SRV record with the specified service, type and domain
PDNS::MXRecord* HandleDNSRecord | ( | PDNS_RECORD | dnsRecord, |
PDNS_RECORD | results | ||
) |
PBoolean LookupSRV | ( | const PString & | srvQuery, |
WORD | defaultPort, | ||
PIPSocketAddressAndPortVector & | addrList | ||
) |
Perform a DNS lookup of the specified service.
PBoolean LookupSRV | ( | const PString & | domain, |
const PString & | service, | ||
WORD | defaultPort, | ||
PIPSocketAddressAndPortVector & | addrList | ||
) |
domain | domain to lookup |
service | service to use |
defaultPort | default por to use |
addrList | returned list of sockets and ports |
PBoolean LookupSRV | ( | const PURL & | url, |
const PString & | service, | ||
PStringList & | returnStr | ||
) |
url | URL to lookup |
service | service to use |
returnStr | resolved addresses, if return value is true |
void PrintOn | ( | ostream & | strm | ) | const |
PINDEX lastIndex |