4 IDL structures for DNSP structures
6 See [MS-DNSP].pdf in MCPP for details
12 note that this is not a real RPC interface. We are just using PIDL
13 to save us a lot of tedious hand parsing of the dnsRecord
14 attribute. The uuid is randomly generated.
17 uuid("bdd66e9e-d45f-4202-85c0-6132edc4f30a"),
19 pointer_default(unique),
20 helper
("../librpc/ndr/ndr_dnsp.h"),
21 helpstring("DNSP interfaces")
26 typedef [enum16bit
,public] enum {
27 DNS_TYPE_TOMBSTONE
= 0x0,
45 DNS_TYPE_AFSDB
= 0x12,
56 DNS_TYPE_NAPTR
= 0x23,
58 DNS_TYPE_DNAME
= 0x27,
60 DNS_TYPE_SSHFP
= 0x2C,
61 DNS_TYPE_IPSECKEY
= 0x2D,
62 DNS_TYPE_RRSIG
= 0x2E,
64 DNS_TYPE_DNSKEY
= 0x30,
65 DNS_TYPE_DHCID
= 0x31,
66 DNS_TYPE_NSEC3
= 0x32,
67 DNS_TYPE_NSEC3PARAM
= 0x33,
70 DNS_TYPE_CDNSKEY
= 0x3C,
72 DNS_TYPE_HTTPS
= 0x41,
76 DNS_TYPE_WINS
= 0xFF01,
77 DNS_TYPE_WINSR
= 0xFF02
80 typedef [bitmap32bit
] bitmap
{
81 DNS_RPC_FLAG_SUPPRESS_NOTIFY
= 0x00010000,
82 DNS_RPC_FLAG_AGING_ON
= 0x00020000,
83 DNS_RPC_FLAG_OPEN_ACL
= 0x00040000,
84 DNS_RPC_FLAG_RECORD_WIRE_FORMAT
= 0x00100000,
85 DNS_RPC_FLAG_SUPPRESS_RECORD_UPDATE_PTR
= 0x00200000,
86 DNS_RPC_FLAG_NODE_COMPLETE
= 0x00800000,
87 DNS_RPC_FLAG_NODE_STICKY
= 0x01000000,
88 DNS_RPC_FLAG_RECORD_CREATE_PTR
= 0x02000000,
89 DNS_RPC_FLAG_RECORD_TTL_CHANGE
= 0x04000000,
90 DNS_RPC_FLAG_RECORD_DEFAULT_TTL
= 0x08000000,
91 DNS_RPC_FLAG_ZONE_DELEGATION
= 0x10000000,
92 DNS_RPC_FLAG_AUTH_ZONE_ROOT
= 0x20000000,
93 DNS_RPC_FLAG_ZONE_ROOT
= 0x40000000,
94 DNS_RPC_FLAG_CACHE_DATA
= 0x80000000
99 typedef [enum8bit
] enum {
100 DNS_RANK_NONE
= 0x00,
101 DNS_RANK_CACHE_BIT
= 0x01,
102 DNS_RANK_ROOT_HINT
= 0x08,
103 DNS_RANK_OUTSIDE_GLUE
= 0x20,
104 DNS_RANK_CACHE_NA_ADDITIONAL
= 0x31,
105 DNS_RANK_CACHE_NA_AUTHORITY
= 0x41,
106 DNS_RANK_CACHE_A_ADDITIONAL
= 0x51,
107 DNS_RANK_CACHE_NA_ANSWER
= 0x61,
108 DNS_RANK_CACHE_A_AUTHORITY
= 0x71,
109 DNS_RANK_GLUE
= 0x80,
110 DNS_RANK_NS_GLUE
= 0x82,
111 DNS_RANK_CACHE_A_ANSWER
= 0xc1,
115 typedef [v1_enum] enum {
116 DNS_ZONE_TYPE_CACHE
= 0x00,
117 DNS_ZONE_TYPE_PRIMARY
= 0x01,
118 DNS_ZONE_TYPE_SECONDARY
= 0x02,
119 DNS_ZONE_TYPE_STUB
= 0x03,
120 DNS_ZONE_TYPE_FORWARDER
= 0x04,
121 DNS_ZONE_TYPE_SECONDARY_CACHE
= 0x05
124 typedef [public,enum8bit
] enum {
125 DNS_ZONE_UPDATE_OFF
= 0x00,
126 DNS_ZONE_UPDATE_UNSECURE
= 0x01,
127 DNS_ZONE_UPDATE_SECURE
= 0x02
130 typedef [v1_enum] enum {
131 DSPROPERTY_ZONE_EMPTY
= 0x00,
132 DSPROPERTY_ZONE_TYPE
= 0x01,
133 DSPROPERTY_ZONE_ALLOW_UPDATE
= 0x02,
134 DSPROPERTY_ZONE_SECURE_TIME
= 0x08,
135 DSPROPERTY_ZONE_NOREFRESH_INTERVAL
= 0x10,
136 DSPROPERTY_ZONE_SCAVENGING_SERVERS
= 0x11,
137 DSPROPERTY_ZONE_AGING_ENABLED_TIME
= 0x12,
138 DSPROPERTY_ZONE_REFRESH_INTERVAL
= 0x20,
139 DSPROPERTY_ZONE_AGING_STATE
= 0x40,
140 DSPROPERTY_ZONE_DELETED_FROM_HOSTNAME
= 0x80,
141 DSPROPERTY_ZONE_MASTER_SERVERS
= 0x81,
142 DSPROPERTY_ZONE_AUTO_NS_SERVERS
= 0x82,
143 DSPROPERTY_ZONE_DCPROMO_CONVERT
= 0x83,
144 DSPROPERTY_ZONE_SCAVENGING_SERVERS_DA
= 0x90,
145 DSPROPERTY_ZONE_MASTER_SERVERS_DA
= 0x91,
146 DSPROPERTY_ZONE_NS_SERVERS_DA
= 0x92,
147 DSPROPERTY_ZONE_NODE_DBFLAGS
= 0x100
151 typedef [enum8bit
] enum {
152 DCPROMO_CONVERT_NONE
= 0x00,
153 DCPROMO_CONVERT_DOMAIN
= 0x01,
154 DCPROMO_CONVERT_FOREST
= 0x02
157 typedef [public] struct {
167 typedef [public] struct {
169 dnsp_name nameTarget
;
172 typedef [public] struct {
177 typedef [public] struct {
181 dnsp_name nameTarget
;
186 uint32 addrArray
[addrCount
];
191 [flag
(NDR_BIG_ENDIAN
)] uint16 port
;
192 [flag
(NDR_BIG_ENDIAN
)] ipv4address ipv4
;
198 typedef [public] struct {
208 dnsp_dns_addr AddrArray
[AddrCount
];
209 } dnsp_dns_addr_array
;
211 typedef [public,nopull
,nopush
,noprint
,gensize
] struct {
213 dnsp_string str
[count
];
216 typedef [nodiscriminant
,gensize
] union {
217 [case(DNS_TYPE_TOMBSTONE
)] NTTIME EntombedTime
;
218 [case(DNS_TYPE_A
)] [flag
(NDR_BIG_ENDIAN
)] ipv4address ipv4
;
219 [case(DNS_TYPE_NS
)] dnsp_name ns
;
220 [case(DNS_TYPE_CNAME
)] dnsp_name cname
;
221 [case(DNS_TYPE_SOA
)] [flag
(NDR_BIG_ENDIAN
)] dnsp_soa soa
;
222 [case(DNS_TYPE_MX
)] [flag
(NDR_BIG_ENDIAN
)] dnsp_mx mx
;
223 [case(DNS_TYPE_TXT
)] dnsp_string_list txt
;
224 [case(DNS_TYPE_PTR
)] dnsp_name
ptr;
225 [case(DNS_TYPE_HINFO
)] dnsp_hinfo hinfo
;
226 [case(DNS_TYPE_AAAA
)] ipv6address ipv6
;
227 [case(DNS_TYPE_SRV
)] [flag
(NDR_BIG_ENDIAN
)] dnsp_srv srv
;
228 [default] [flag
(NDR_REMAINING
)] DATA_BLOB data
;
231 /* this is the format for the dnsRecord attribute in the DNS
233 typedef [public] struct {
234 [value
(ndr_size_dnsRecordData
(&data
,wType
,ndr
->flags
))] uint16 wDataLength
;
235 dns_record_type wType
;
236 [value
(5)] uint8
version;
237 dns_record_rank rank
;
240 [flag
(NDR_BIG_ENDIAN
)] uint32 dwTtlSeconds
;
243 [switch_is(wType
)] dnsRecordData data
;
244 } dnsp_DnssrvRpcRecord
;
246 typedef [nodiscriminant
,gensize
] union {
247 [case(DSPROPERTY_ZONE_EMPTY
)] ;
248 [case(DSPROPERTY_ZONE_TYPE
)] dns_zone_type zone_type
;
249 [case(DSPROPERTY_ZONE_ALLOW_UPDATE
)] dns_zone_update allow_update_flag
;
250 [case(DSPROPERTY_ZONE_SECURE_TIME
)] NTTIME zone_secure_time
;
251 [case(DSPROPERTY_ZONE_NOREFRESH_INTERVAL
)] uint32 norefresh_hours
;
252 [case(DSPROPERTY_ZONE_REFRESH_INTERVAL
)] uint32 refresh_hours
;
253 [case(DSPROPERTY_ZONE_AGING_STATE
)] uint32 aging_enabled
;
254 [case(DSPROPERTY_ZONE_SCAVENGING_SERVERS
)] dnsp_ip4_array servers
;
255 [case(DSPROPERTY_ZONE_AGING_ENABLED_TIME
)] uint32 next_scavenging_cycle_hours
;
256 [case(DSPROPERTY_ZONE_DELETED_FROM_HOSTNAME
)] nstring deleted_by_hostname
;
257 [case(DSPROPERTY_ZONE_MASTER_SERVERS
)] dnsp_ip4_array master_servers
;
258 [case(DSPROPERTY_ZONE_AUTO_NS_SERVERS
)] dnsp_ip4_array ns_servers
;
259 [case(DSPROPERTY_ZONE_DCPROMO_CONVERT
)] dns_dcpromo_flag dcpromo_flag
;
260 [case(DSPROPERTY_ZONE_SCAVENGING_SERVERS_DA
)] dnsp_dns_addr_array s_ns_servers
;
261 [case(DSPROPERTY_ZONE_MASTER_SERVERS_DA
)] dnsp_dns_addr_array z_master_servers
;
262 [case(DSPROPERTY_ZONE_NS_SERVERS_DA
)] dnsp_dns_addr_array d_ns_servers
;
263 [case(DSPROPERTY_ZONE_NODE_DBFLAGS
)] dns_rpc_node_flags flags
;
266 /* this is the format for the dnsProperty attribute in the DNS
268 typedef [flag
(NDR_NOALIGN
),public] struct {
269 [value
(ndr_size_dnsPropertyData
(&data
,id,ndr
->flags
))] uint32 wDataLength
;
271 [value
(0)] uint32 flag
;
272 [value
(1)] uint32
version;
274 [switch_is(id)] dnsPropertyData data
;
279 * this is the format for the dnsProperty attribute in the DNS
280 * partitions in AD when the wDataLength is 0. This is an
281 * invalid format seen from some Windows servers in the same
284 typedef [flag
(NDR_NOALIGN
),public] struct {
285 [range(0, 0), value
(0)] uint32 wDataLength
;
287 [value
(0)] uint32 flag
;
288 [value
(1)] uint32
version;
290 [switch_is(DSPROPERTY_ZONE_EMPTY
)] dnsPropertyData data
;
292 } dnsp_DnsProperty_short
;