Important: The information in this document is obsolete and should not be used for new development.
DNS Address Structure
You can use the DNS (domain name system) address structure with theOTConnect
function (TCP), with theOTSndUData
function (UDP), or with theOTResolveAddress
function (either TCP or UDP). If you do so, TCP/IP will resolve the name for you automatically. You can use theOTInitDNSAddress
function to fill in a DNS address structure. The DNS address structure is defined by theDNSAddress
data type.
struct DNSAddress { OTAddressType fAddressType; InetDomainName fName; }; typedef struct DNSAddress DNSAddress;The address you specify can be just the host name ("otteam"), a partially qualified domain name ("otteam.ssw"), a fully qualified domain name ("otteam.ssw.apple.com."), or an internet address in dotted-decimal format ("17.202.99.99"), and can optionally include a port number ("otteam.ssw.apple.com:25" or "17.202.99.99:25").
Field Description
fAddressType
- The address type. For a DNSAddress structure, this should be
AF_DNS
.fName
- The name to be resolved by the DNR.
Because the port number is not actually part of the domain name, it is possible to have a domain name-port number combination that exceeds 255 bytes. If you wish to specify such a string, you must provide a structure based on the DNS address structure that has sufficient space to contain the full string. In any case, the domain name itself cannot exceed 255 bytes.