DNS_RECORDW structure (windns.h)
The DNS_RECORD structure stores a DNS resource record (RR).
Syntax
typedef struct _DnsRecordW {
struct _DnsRecordW *pNext;
PWSTR pName;
WORD wType;
WORD wDataLength;
union {
DWORD DW;
DNS_RECORD_FLAGS S;
} Flags;
DWORD dwTtl;
DWORD dwReserved;
union {
DNS_A_DATA A;
DNS_SOA_DATAW SOA;
DNS_SOA_DATAW Soa;
DNS_PTR_DATAW PTR;
DNS_PTR_DATAW Ptr;
DNS_PTR_DATAW NS;
DNS_PTR_DATAW Ns;
DNS_PTR_DATAW CNAME;
DNS_PTR_DATAW Cname;
DNS_PTR_DATAW DNAME;
DNS_PTR_DATAW Dname;
DNS_PTR_DATAW MB;
DNS_PTR_DATAW Mb;
DNS_PTR_DATAW MD;
DNS_PTR_DATAW Md;
DNS_PTR_DATAW MF;
DNS_PTR_DATAW Mf;
DNS_PTR_DATAW MG;
DNS_PTR_DATAW Mg;
DNS_PTR_DATAW MR;
DNS_PTR_DATAW Mr;
DNS_MINFO_DATAW MINFO;
DNS_MINFO_DATAW Minfo;
DNS_MINFO_DATAW RP;
DNS_MINFO_DATAW Rp;
DNS_MX_DATAW MX;
DNS_MX_DATAW Mx;
DNS_MX_DATAW AFSDB;
DNS_MX_DATAW Afsdb;
DNS_MX_DATAW RT;
DNS_MX_DATAW Rt;
DNS_TXT_DATAW HINFO;
DNS_TXT_DATAW Hinfo;
DNS_TXT_DATAW ISDN;
DNS_TXT_DATAW Isdn;
DNS_TXT_DATAW TXT;
DNS_TXT_DATAW Txt;
DNS_TXT_DATAW 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_DATAW SIG;
DNS_SIG_DATAW Sig;
DNS_ATMA_DATA ATMA;
DNS_ATMA_DATA Atma;
DNS_NXT_DATAW NXT;
DNS_NXT_DATAW Nxt;
DNS_SRV_DATAW SRV;
DNS_SRV_DATAW Srv;
DNS_NAPTR_DATAW NAPTR;
DNS_NAPTR_DATAW Naptr;
DNS_OPT_DATA OPT;
DNS_OPT_DATA Opt;
DNS_DS_DATA DS;
DNS_DS_DATA Ds;
DNS_RRSIG_DATAW RRSIG;
DNS_RRSIG_DATAW Rrsig;
DNS_NSEC_DATAW NSEC;
DNS_NSEC_DATAW Nsec;
DNS_DNSKEY_DATA DNSKEY;
DNS_DNSKEY_DATA Dnskey;
DNS_TKEY_DATAW TKEY;
DNS_TKEY_DATAW Tkey;
DNS_TSIG_DATAW TSIG;
DNS_TSIG_DATAW Tsig;
DNS_WINS_DATA WINS;
DNS_WINS_DATA Wins;
DNS_WINSR_DATAW WINSR;
DNS_WINSR_DATAW WinsR;
DNS_WINSR_DATAW NBSTAT;
DNS_WINSR_DATAW 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_RECORDW, *PDNS_RECORDW;
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 |