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,
57 DNS_TYPE_DNAME
= 0x27,
59 DNS_TYPE_RRSIG
= 0x2E,
61 DNS_TYPE_DNSKEY
= 0x30,
62 DNS_TYPE_DHCID
= 0x31,
64 DNS_TYPE_WINS
= 0xFF01,
65 DNS_TYPE_WINSR
= 0xFF02
68 typedef [bitmap32bit
] bitmap
{
69 DNS_RPC_FLAG_SUPPRESS_NOTIFY
= 0x00010000,
70 DNS_RPC_FLAG_AGING_ON
= 0x00020000,
71 DNS_RPC_FLAG_OPEN_ACL
= 0x00040000,
72 DNS_RPC_FLAG_NODE_COMPLETE
= 0x00800000,
73 DNS_RPC_FLAG_NODE_STICKY
= 0x01000000,
74 DNS_RPC_FLAG_RECORD_CREATE_PTR
= 0x02000000,
75 DNS_RPC_FLAG_RECORD_TTL_CHANGE
= 0x04000000,
76 DNS_RPC_FLAG_RECORD_DEFAULT_TTL
= 0x08000000,
77 DNS_RPC_FLAG_ZONE_DELEGATION
= 0x10000000,
78 DNS_RPC_FLAG_AUTH_ZONE_ROOT
= 0x20000000,
79 DNS_RPC_FLAG_ZONE_ROOT
= 0x40000000,
80 DNS_RPC_FLAG_CACHE_DATA
= 0x80000000
85 typedef [enum8bit
] enum {
87 DNS_RANK_CACHE_BIT
= 0x01,
88 DNS_RANK_ROOT_HINT
= 0x08,
89 DNS_RANK_OUTSIDE_GLUE
= 0x20,
90 DNS_RANK_CACHE_NA_ADDITIONAL
= 0x31,
91 DNS_RANK_CACHE_NA_AUTHORITY
= 0x41,
92 DNS_RANK_CACHE_A_ADDITIONAL
= 0x51,
93 DNS_RANK_CACHE_NA_ANSWER
= 0x61,
94 DNS_RANK_CACHE_A_AUTHORITY
= 0x71,
96 DNS_RANK_NS_GLUE
= 0x82,
97 DNS_RANK_CACHE_A_ANSWER
= 0xc1,
101 typedef [v1_enum] enum {
102 DNS_ZONE_TYPE_CACHE
= 0x00,
103 DNS_ZONE_TYPE_PRIMARY
= 0x01,
104 DNS_ZONE_TYPE_SECONDARY
= 0x02,
105 DNS_ZONE_TYPE_STUB
= 0x03,
106 DNS_ZONE_TYPE_FORWARDER
= 0x04,
107 DNS_ZONE_TYPE_SECONDARY_CACHE
= 0x05
110 typedef [public,enum8bit
] enum {
111 DNS_ZONE_UPDATE_OFF
= 0x00,
112 DNS_ZONE_UPDATE_UNSECURE
= 0x01,
113 DNS_ZONE_UPDATE_SECURE
= 0x02
116 typedef [v1_enum] enum {
117 DSPROPERTY_ZONE_EMPTY
= 0x00,
118 DSPROPERTY_ZONE_TYPE
= 0x01,
119 DSPROPERTY_ZONE_ALLOW_UPDATE
= 0x02,
120 DSPROPERTY_ZONE_SECURE_TIME
= 0x08,
121 DSPROPERTY_ZONE_NOREFRESH_INTERVAL
= 0x10,
122 DSPROPERTY_ZONE_SCAVENGING_SERVERS
= 0x11,
123 DSPROPERTY_ZONE_AGING_ENABLED_TIME
= 0x12,
124 DSPROPERTY_ZONE_REFRESH_INTERVAL
= 0x20,
125 DSPROPERTY_ZONE_AGING_STATE
= 0x40,
126 DSPROPERTY_ZONE_DELETED_FROM_HOSTNAME
= 0x80,
127 DSPROPERTY_ZONE_MASTER_SERVERS
= 0x81,
128 DSPROPERTY_ZONE_AUTO_NS_SERVERS
= 0x82,
129 DSPROPERTY_ZONE_DCPROMO_CONVERT
= 0x83,
130 DSPROPERTY_ZONE_SCAVENGING_SERVERS_DA
= 0x90,
131 DSPROPERTY_ZONE_MASTER_SERVERS_DA
= 0x91,
132 DSPROPERTY_ZONE_NS_SERVERS_DA
= 0x92,
133 DSPROPERTY_ZONE_NODE_DBFLAGS
= 0x100
137 typedef [enum8bit
] enum {
138 DCPROMO_CONVERT_NONE
= 0x00,
139 DCPROMO_CONVERT_DOMAIN
= 0x01,
140 DCPROMO_CONVERT_FOREST
= 0x02
143 typedef [public] struct {
153 typedef [public] struct {
155 dnsp_name nameTarget
;
158 typedef [public] struct {
163 typedef [public] struct {
167 dnsp_name nameTarget
;
172 [size_is(addrCount
)] uint32
*addr
;
184 typedef [public] struct {
193 dnsp_dns_addr AddrArray
[AddrCount
];
194 } dnsp_dns_addr_array
;
196 typedef [nodiscriminant
,gensize
] union {
197 [case(DNS_TYPE_TOMBSTONE
)] NTTIME timestamp
;
198 [case(DNS_TYPE_A
)] [flag
(NDR_BIG_ENDIAN
)] ipv4address ipv4
;
199 [case(DNS_TYPE_NS
)] dnsp_name ns
;
200 [case(DNS_TYPE_CNAME
)] dnsp_name cname
;
201 [case(DNS_TYPE_SOA
)] [flag
(NDR_BIG_ENDIAN
)] dnsp_soa soa
;
202 [case(DNS_TYPE_MX
)] [flag
(NDR_BIG_ENDIAN
)] dnsp_mx mx
;
203 [case(DNS_TYPE_TXT
)] dnsp_string txt
;
204 [case(DNS_TYPE_PTR
)] dnsp_name
ptr;
205 [case(DNS_TYPE_HINFO
)] dnsp_hinfo hinfo
;
206 [case(DNS_TYPE_AAAA
)] ipv6address ipv6
;
207 [case(DNS_TYPE_SRV
)] [flag
(NDR_BIG_ENDIAN
)] dnsp_srv srv
;
208 [default] [flag
(NDR_REMAINING
)] DATA_BLOB data
;
211 /* this is the format for the dnsRecord attribute in the DNS
213 typedef [public] struct {
214 [value
(ndr_size_dnsRecordData
(&data
,wType
,ndr
->flags
))] uint16 wDataLength
;
215 dns_record_type wType
;
216 [value
(5)] uint8
version;
217 dns_record_rank rank
;
220 [flag
(NDR_BIG_ENDIAN
)] uint32 dwTtlSeconds
;
223 [switch_is(wType
)] dnsRecordData data
;
224 } dnsp_DnssrvRpcRecord
;
226 typedef [nodiscriminant
,gensize
] union {
227 [case(DSPROPERTY_ZONE_EMPTY
)] ;
228 [case(DSPROPERTY_ZONE_TYPE
)] dns_zone_type zone_type
;
229 [case(DSPROPERTY_ZONE_ALLOW_UPDATE
)] dns_zone_update allow_update_flag
;
230 [case(DSPROPERTY_ZONE_SECURE_TIME
)] NTTIME zone_secure_time
;
231 [case(DSPROPERTY_ZONE_NOREFRESH_INTERVAL
)] uint32 norefresh_hours
;
232 [case(DSPROPERTY_ZONE_REFRESH_INTERVAL
)] uint32 refresh_hours
;
233 [case(DSPROPERTY_ZONE_AGING_STATE
)] uint32 aging_enabled
;
234 [case(DSPROPERTY_ZONE_SCAVENGING_SERVERS
)] dnsp_ip4_array servers
;
235 [case(DSPROPERTY_ZONE_AGING_ENABLED_TIME
)] uint32 next_scavenging_cycle_hours
;
236 [case(DSPROPERTY_ZONE_DELETED_FROM_HOSTNAME
)] utf8string deleted_by_hostname
;
237 [case(DSPROPERTY_ZONE_MASTER_SERVERS
)] dnsp_ip4_array master_servers
;
238 [case(DSPROPERTY_ZONE_AUTO_NS_SERVERS
)] dnsp_ip4_array ns_servers
;
239 [case(DSPROPERTY_ZONE_DCPROMO_CONVERT
)] dns_dcpromo_flag dcpromo_flag
;
240 [case(DSPROPERTY_ZONE_SCAVENGING_SERVERS_DA
)] dnsp_dns_addr_array s_ns_servers
;
241 [case(DSPROPERTY_ZONE_MASTER_SERVERS_DA
)] dnsp_dns_addr_array z_master_servers
;
242 [case(DSPROPERTY_ZONE_NS_SERVERS_DA
)] dnsp_dns_addr_array d_ns_servers
;
243 [case(DSPROPERTY_ZONE_NODE_DBFLAGS
)] dns_rpc_node_flags flags
;
246 /* this is the format for the dnsProperty attribute in the DNS
248 typedef [flag
(NDR_NOALIGN
),public] struct {
249 [value
(ndr_size_dnsPropertyData
(&data
,id,ndr
->flags
))] uint32 wDataLength
;
251 [value
(0)] uint32 flag
;
252 [value
(1)] uint32
version;
254 [switch_is(wDataLength?
id:DSPROPERTY_ZONE_EMPTY
)] dnsPropertyData data
;
259 these are convenience hooks for ndrdump
261 void decode_DnssrvRpcRecord
(
262 [in] dnsp_DnssrvRpcRecord blob
265 void decode_DnsProperty
(
266 [in] dnsp_DnsProperty blob