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 [public,nopull
,nopush
,noprint
,gensize
] struct {
198 dnsp_string str
[count
];
201 typedef [nodiscriminant
,gensize
] union {
202 [case(DNS_TYPE_TOMBSTONE
)] NTTIME timestamp
;
203 [case(DNS_TYPE_A
)] [flag
(NDR_BIG_ENDIAN
)] ipv4address ipv4
;
204 [case(DNS_TYPE_NS
)] dnsp_name ns
;
205 [case(DNS_TYPE_CNAME
)] dnsp_name cname
;
206 [case(DNS_TYPE_SOA
)] [flag
(NDR_BIG_ENDIAN
)] dnsp_soa soa
;
207 [case(DNS_TYPE_MX
)] [flag
(NDR_BIG_ENDIAN
)] dnsp_mx mx
;
208 [case(DNS_TYPE_TXT
)] dnsp_string_list txt
;
209 [case(DNS_TYPE_PTR
)] dnsp_name
ptr;
210 [case(DNS_TYPE_HINFO
)] dnsp_hinfo hinfo
;
211 [case(DNS_TYPE_AAAA
)] ipv6address ipv6
;
212 [case(DNS_TYPE_SRV
)] [flag
(NDR_BIG_ENDIAN
)] dnsp_srv srv
;
213 [default] [flag
(NDR_REMAINING
)] DATA_BLOB data
;
216 /* this is the format for the dnsRecord attribute in the DNS
218 typedef [public] struct {
219 [value
(ndr_size_dnsRecordData
(&data
,wType
,ndr
->flags
))] uint16 wDataLength
;
220 dns_record_type wType
;
221 [value
(5)] uint8
version;
222 dns_record_rank rank
;
225 [flag
(NDR_BIG_ENDIAN
)] uint32 dwTtlSeconds
;
228 [switch_is(wType
)] dnsRecordData data
;
229 } dnsp_DnssrvRpcRecord
;
231 typedef [nodiscriminant
,gensize
] union {
232 [case(DSPROPERTY_ZONE_EMPTY
)] ;
233 [case(DSPROPERTY_ZONE_TYPE
)] dns_zone_type zone_type
;
234 [case(DSPROPERTY_ZONE_ALLOW_UPDATE
)] dns_zone_update allow_update_flag
;
235 [case(DSPROPERTY_ZONE_SECURE_TIME
)] NTTIME zone_secure_time
;
236 [case(DSPROPERTY_ZONE_NOREFRESH_INTERVAL
)] uint32 norefresh_hours
;
237 [case(DSPROPERTY_ZONE_REFRESH_INTERVAL
)] uint32 refresh_hours
;
238 [case(DSPROPERTY_ZONE_AGING_STATE
)] uint32 aging_enabled
;
239 [case(DSPROPERTY_ZONE_SCAVENGING_SERVERS
)] dnsp_ip4_array servers
;
240 [case(DSPROPERTY_ZONE_AGING_ENABLED_TIME
)] uint32 next_scavenging_cycle_hours
;
241 [case(DSPROPERTY_ZONE_DELETED_FROM_HOSTNAME
)] utf8string deleted_by_hostname
;
242 [case(DSPROPERTY_ZONE_MASTER_SERVERS
)] dnsp_ip4_array master_servers
;
243 [case(DSPROPERTY_ZONE_AUTO_NS_SERVERS
)] dnsp_ip4_array ns_servers
;
244 [case(DSPROPERTY_ZONE_DCPROMO_CONVERT
)] dns_dcpromo_flag dcpromo_flag
;
245 [case(DSPROPERTY_ZONE_SCAVENGING_SERVERS_DA
)] dnsp_dns_addr_array s_ns_servers
;
246 [case(DSPROPERTY_ZONE_MASTER_SERVERS_DA
)] dnsp_dns_addr_array z_master_servers
;
247 [case(DSPROPERTY_ZONE_NS_SERVERS_DA
)] dnsp_dns_addr_array d_ns_servers
;
248 [case(DSPROPERTY_ZONE_NODE_DBFLAGS
)] dns_rpc_node_flags flags
;
251 /* this is the format for the dnsProperty attribute in the DNS
253 typedef [flag
(NDR_NOALIGN
),public] struct {
254 [value
(ndr_size_dnsPropertyData
(&data
,id,ndr
->flags
))] uint32 wDataLength
;
256 [value
(0)] uint32 flag
;
257 [value
(1)] uint32
version;
259 [switch_is(wDataLength?
id:DSPROPERTY_ZONE_EMPTY
)] dnsPropertyData data
;
264 these are convenience hooks for ndrdump
266 [nopython
] void decode_DnssrvRpcRecord
(
267 [in] dnsp_DnssrvRpcRecord blob
270 [nopython
] void decode_DnsProperty
(
271 [in] dnsp_DnsProperty blob