DNS_RECORDA structure (windns.h)
The DNS_RECORD structure stores a DNS resource record (RR).
Syntax
typedef struct _DnsRecordA {
struct _DnsRecordA *pNext;
PSTR pName;
WORD wType;
WORD wDataLength;
union {
DWORD DW;
DNS_RECORD_FLAGS S;
} Flags;
DWORD dwTtl;
DWORD dwReserved;
union {
DNS_A_DATA A;
DNS_SOA_DATAA SOA;
DNS_SOA_DATAA Soa;
DNS_PTR_DATAA PTR;
DNS_PTR_DATAA Ptr;
DNS_PTR_DATAA NS;
DNS_PTR_DATAA Ns;
DNS_PTR_DATAA CNAME;
DNS_PTR_DATAA Cname;
DNS_PTR_DATAA DNAME;
DNS_PTR_DATAA Dname;
DNS_PTR_DATAA MB;
DNS_PTR_DATAA Mb;
DNS_PTR_DATAA MD;
DNS_PTR_DATAA Md;
DNS_PTR_DATAA MF;
DNS_PTR_DATAA Mf;
DNS_PTR_DATAA MG;
DNS_PTR_DATAA Mg;
DNS_PTR_DATAA MR;
DNS_PTR_DATAA Mr;
DNS_MINFO_DATAA MINFO;
DNS_MINFO_DATAA Minfo;
DNS_MINFO_DATAA RP;
DNS_MINFO_DATAA Rp;
DNS_MX_DATAA MX;
DNS_MX_DATAA Mx;
DNS_MX_DATAA AFSDB;
DNS_MX_DATAA Afsdb;
DNS_MX_DATAA RT;
DNS_MX_DATAA Rt;
DNS_TXT_DATAA HINFO;
DNS_TXT_DATAA Hinfo;
DNS_TXT_DATAA ISDN;
DNS_TXT_DATAA Isdn;
DNS_TXT_DATAA TXT;
DNS_TXT_DATAA Txt;
DNS_TXT_DATAA X25;
DNS_NULL_DATA Null;
DNS_WKS_DATA WKS;
DNS_WKS_DATA Wks;
DNS_AAAA_DATA AAAA;
DNS_KEY_DATA KEY;
DNS_KEY_DATA Key;
DNS_SIG_DATAA SIG;
DNS_SIG_DATAA Sig;
DNS_ATMA_DATA ATMA;
DNS_ATMA_DATA Atma;
DNS_NXT_DATAA NXT;
DNS_NXT_DATAA Nxt;
DNS_SRV_DATAA SRV;
DNS_SRV_DATAA Srv;
DNS_NAPTR_DATAA NAPTR;
DNS_NAPTR_DATAA Naptr;
DNS_OPT_DATA OPT;
DNS_OPT_DATA Opt;
DNS_DS_DATA DS;
DNS_DS_DATA Ds;
DNS_RRSIG_DATAA RRSIG;
DNS_RRSIG_DATAA Rrsig;
DNS_NSEC_DATAA NSEC;
DNS_NSEC_DATAA Nsec;
DNS_DNSKEY_DATA DNSKEY;
DNS_DNSKEY_DATA Dnskey;
DNS_TKEY_DATAA TKEY;
DNS_TKEY_DATAA Tkey;
DNS_TSIG_DATAA TSIG;
DNS_TSIG_DATAA Tsig;
DNS_WINS_DATA WINS;
DNS_WINS_DATA Wins;
DNS_WINSR_DATAA WINSR;
DNS_WINSR_DATAA WinsR;
DNS_WINSR_DATAA NBSTAT;
DNS_WINSR_DATAA Nbstat;
DNS_DHCID_DATA DHCID;
DNS_NSEC3_DATA NSEC3;
DNS_NSEC3_DATA Nsec3;
DNS_NSEC3PARAM_DATA NSEC3PARAM;
DNS_NSEC3PARAM_DATA Nsec3Param;
DNS_TLSA_DATA TLSA;
DNS_TLSA_DATA Tlsa;
DNS_SVCB_DATA SVCB;
DNS_SVCB_DATA Svcb;
DNS_UNKNOWN_DATA UNKNOWN;
DNS_UNKNOWN_DATA Unknown;
PBYTE pDataPtr;
} Data;
} DNS_RECORDA, *PDNS_RECORDA;
Members
pNext
A pointer to the next DNS_RECORD structure.
pName
A pointer to a string that represents the domain name of the record set. This must be in the string format that corresponds to the function called, such as ANSI, Unicode, or UTF8.
wType
A value that represents the RR DNS Record Type. wType determines the format of Data. For example, if the value of wType is DNS_TYPE_A, the data type of Data is DNS_A_DATA.
wDataLength
The length, in bytes, of Data. For fixed-length data types, this value is the size of the corresponding data type, such as sizeof(DNS_A_DATA). For the non-fixed data types, use one of the following macros to determine the length of the data:
C++ |
---|
#include <windows.h> |
Flags
Flags.DW
A value that contains a bitmap of DNS Record Flags.
Flags.S
A set of flags in the form of a DNS_RECORD_FLAGS structure.
dwTtl
The DNS RR's Time To Live value (TTL), in seconds.
dwReserved
Reserved. Do not use.
Data
The DNS RR data type is determined by wType and is one of the following members:
SOA, Soa
The RR data type is DNS_SOA_DATA. The value of wType is DNS_TYPE_SOA.
PTR, Ptr, NS, Ns, CNAME, Cname, DNAME, Dname, MB, Mb, MD, Md, MF, Mf, MG, Mg, MR, Mr
The RR data type is DNS_PTR_DATA. The value of wType is DNS_TYPE_PTR.
MINFO, Minfo, RP, Rp
The RR data type is DNS_MINFO_DATA. The value of wType is DNS_TYPE_MINFO.
MX, Mx, AFSDB, Afsdb, RT, Rt
The RR data type is DNS_MX_DATA. The value of wType is DNS_TYPE_MX.
HINFO, Hinfo, ISDN, Isdn, TXT, Txt, X25
The RR data type is DNS_TXT_DATA. The value of wType is DNS_TYPE_TEXT.
WKS, Wks
The RR data type is DNS_WKS_DATA. The value of wType is DNS_TYPE_WKS.
KEY, Key
The RR data type is DNS_KEY_DATA. The value of wType is DNS_TYPE_KEY.
SIG, Sig
The RR data type is DNS_SIG_DATA. The value of wType is DNS_TYPE_SIG.
ATMA, Atma
The RR data type is DNS_ATMA_DATA. The value of wType is DNS_TYPE_ATMA.
NXT, Nxt
The RR data type is DNS_NXT_DATA. The value of wType is DNS_TYPE_NXT.
SRV, Srv
The RR data type is DNS_SRV_DATA. The value of wType is DNS_TYPE_SRV.
NAPTR, Naptr
The RR data type is DNS_NAPTR_DATA. The value of wType is DNS_TYPE_NAPTR.
OPT, Opt
Windows 7 or later: The RR data type is DNS_OPT_DATA. The value of wType is DNS_TYPE_OPT.
DS, Ds
Windows 7 or later: The RR data type is DNS_DS_DATA. The value of wType is DNS_TYPE_DS.
RRSIG, Rrsig
Windows 7 or later: The RR data type is DNS_RRSIG_DATA. The value of wType is DNS_TYPE_RRSIG.
NSEC, Nsec
Windows 7 or later: The RR data type is DNS_NSEC_DATA. The value of wType is DNS_TYPE_NSEC.
DNSKEY, Dnskey
Windows 7 or later: The RR data type is DNS_DNSKEY_DATA. The value of wType is DNS_TYPE_DNSKEY.
TKEY, Tkey
The RR data type is DNS_TKEY_DATA. The value of wType is DNS_TYPE_TKEY.
TSIG, Tsig
The RR data type is DNS_TSIG_DATA. The value of wType is DNS_TYPE_TSIG.
WINS, Wins
The RR data type is DNS_WINS_DATA. The value of wType is DNS_TYPE_WINS.
WINSR, WinsR, NBSTAT, Nbstat
The RR data type is DNS_WINSR_DATA. The value of wType is DNS_TYPE_WINSR.
Data.A
The RR data type is DNS_A_DATA. The value of wType is DNS_TYPE_A.
Data.SOA
Data.Soa
Data.PTR
Data.Ptr
Data.NS
Data.Ns
Data.CNAME
Data.Cname
Data.DNAME
Data.Dname
Data.MB
Data.Mb
Data.MD
Data.Md
Data.MF
Data.Mf
Data.MG
Data.Mg
Data.MR
Data.Mr
Data.MINFO
Data.Minfo
Data.RP
Data.Rp
Data.MX
Data.Mx
Data.AFSDB
Data.Afsdb
Data.RT
Data.Rt
Data.HINFO
Data.Hinfo
Data.ISDN
Data.Isdn
Data.TXT
Data.Txt
Data.X25
Data.Null
The RR data type is DNS_NULL_DATA. The value of wType is DNS_TYPE_NULL.
Data.WKS
Data.Wks
Data.AAAA
The RR data type is DNS_AAAA_DATA. The value of wType is DNS_TYPE_AAAA.
Data.KEY
Data.Key
Data.SIG
Data.Sig
Data.ATMA
Data.Atma
Data.NXT
Data.Nxt
Data.SRV
Data.Srv
Data.NAPTR
Data.Naptr
Data.OPT
Data.Opt
Data.DS
Data.Ds
Data.RRSIG
Data.Rrsig
Data.NSEC
Data.Nsec
Data.DNSKEY
Data.Dnskey
Data.TKEY
Data.Tkey
Data.TSIG
Data.Tsig
Data.WINS
Data.Wins
Data.WINSR
Data.WinsR
Data.NBSTAT
Data.Nbstat
Data.DHCID
Windows 7 or later: The RR data type is DNS_DHCID_DATA. The value of wType is DNS_TYPE_DHCID.
Data.NSEC3
Data.Nsec3
Data.NSEC3PARAM
Data.Nsec3Param
Data.TLSA
Data.Tlsa
Data.SVCB
Data.Svcb
Data.UNKNOWN
Data.Unknown
Data.pDataPtr
Remarks
When building a DNS_RECORD list as an input argument for the various DNS update routines found in the DNS API, all flags in the DNS_RECORD structure should be set to zero.
Note
The windns.h header defines DNS_RECORD as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Header | windns.h |