#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.
Namespaces | |
| namespace | PDNS |
Classes | |
| struct | _DnsAData |
| struct | DNS_MX_DATA |
| struct | DNS_PTR_DATA |
| struct | _DnsSRVData |
| struct | _DnsNULLData |
| struct | _DnsRecordFlags |
| class | DnsRecord |
| struct | _IP4_ARRAY |
| class | PDNS::SRVRecord |
| class | MXRecord |
Defines | |
| #define | P_HAS_RESOLVER 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_NAPTR T_NAPTR |
| #define | DnsFreeRecordList 0 |
| #define | DNS_QUERY_STANDARD 0 |
| #define | DNS_QUERY_BYPASS_CACHE 0 |
Typedefs | |
| typedef _DnsAData | DNS_A_DATA |
| typedef _DnsSRVData | DNS_SRV_DATA |
| typedef _DnsNULLData | DNS_NULL_DATA |
| typedef _DnsRecordFlags | DNS_RECORD_FLAGS |
| typedef enum _DnsSection | DNS_SECTION |
| typedef DnsRecord * | PDNS_RECORD |
| typedef DWORD | IP4_ADDRESS |
| typedef DWORD * | PIP4_ADDRESS |
| typedef _IP4_ARRAY | IP4_ARRAY |
| typedef _IP4_ARRAY * | PIP4_ARRAY |
Enumerations | |
| enum | _DnsSection { DnsSectionQuestion, DnsSectionAnswer, DnsSectionAuthority, DnsSectionAdditional } |
Functions | |
| void | DnsRecordListFree (PDNS_RECORD rec, int FreeType) |
| DNS_STATUS | DnsQuery_A (const char *service, WORD requestType, DWORD options, PIP4_ARRAY, PDNS_RECORD *results, void *) |
| 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 | |
| PBoolean | GetSRVRecords (const PString &service, SRVRecordList &serviceList) |
| provided for backwards compatibility | |
| 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 | |
| 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) |
| 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 | |
| PBoolean | GetMXRecords (const PString &domain, MXRecordList &serviceList) |
| provided for backwards compatibility | |
Variables | |
| PINDEX | PDNS::priPos |
| PWORDArray | PDNS::priList |
| PINDEX | lastIndex |
| #define DNS_QUERY_BYPASS_CACHE 0 |
| #define DNS_QUERY_STANDARD 0 |
| #define DNS_STATUS int |
| #define DNS_TYPE_A T_A |
| #define DNS_TYPE_MX T_MX |
| #define DNS_TYPE_NAPTR T_NAPTR |
| #define DNS_TYPE_SRV T_SRV |
| #define DnsFreeRecordList 0 |
| #define P_HAS_RESOLVER 1 |
| #define T_NAPTR 35 |
| #define T_SRV 33 |
| typedef struct _DnsAData DNS_A_DATA |
| typedef struct _DnsNULLData DNS_NULL_DATA |
| typedef struct _DnsRecordFlags DNS_RECORD_FLAGS |
| typedef enum _DnsSection DNS_SECTION |
| typedef struct _DnsSRVData DNS_SRV_DATA |
| typedef DWORD IP4_ADDRESS |
| typedef struct _IP4_ARRAY IP4_ARRAY |
| typedef DnsRecord* PDNS_RECORD |
| typedef DWORD * PIP4_ADDRESS |
| typedef struct _IP4_ARRAY * PIP4_ARRAY |
| enum _DnsSection |
| DNS_STATUS DnsQuery_A | ( | const char * | service, | |
| WORD | requestType, | |||
| DWORD | options, | |||
| PIP4_ARRAY | , | |||
| PDNS_RECORD * | results, | |||
| void * | ||||
| ) |
| void DnsRecordListFree | ( | PDNS_RECORD | rec, | |
| int | FreeType | |||
| ) |
| MXRecord* GetFirst | ( | ) |
provided for backwards compatibility
| MXRecord* GetNext | ( | ) |
return a list of MX records for the specified domain
return a list of DNS SRV record with the specified service type
| 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
provided for backwards compatibility
| PDNS::MXRecord* HandleDNSRecord | ( | PDNS_RECORD | dnsRecord, | |
| PDNS_RECORD | results | |||
| ) |
| 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 |
| 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 PString & | srvQuery, | |
| WORD | defaultPort, | |||
| PIPSocketAddressAndPortVector & | addrList | |||
| ) |
Perform a DNS lookup of the specified service.
| void PrintOn | ( | ostream & | strm | ) | const |
| PINDEX lastIndex |
1.4.7