ctdb-scripts: No longer load tunables via 00.ctdb.script setup event
[samba.git] / librpc / idl / dnsp.idl
blob0cb18bfcd8a343952077634f0fb790efd69f49c2
1 #include "idl_types.h"
3 /*
4 IDL structures for DNSP structures
6 See [MS-DNSP].pdf in MCPP for details
7 */
9 import "misc.idl";
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"),
18 version(0.0),
19 pointer_default(unique),
20 helper("../librpc/ndr/ndr_dnsp.h"),
21 helpstring("DNSP interfaces")
24 interface dnsp
26 typedef [enum16bit,public] enum {
27 DNS_TYPE_TOMBSTONE = 0x0,
28 DNS_TYPE_A = 0x1,
29 DNS_TYPE_NS = 0x2,
30 DNS_TYPE_MD = 0x3,
31 DNS_TYPE_MF = 0x4,
32 DNS_TYPE_CNAME = 0x5,
33 DNS_TYPE_SOA = 0x6,
34 DNS_TYPE_MB = 0x7,
35 DNS_TYPE_MG = 0x8,
36 DNS_TYPE_MR = 0x9,
37 DNS_TYPE_NULL = 0xA,
38 DNS_TYPE_WKS = 0xB,
39 DNS_TYPE_PTR = 0xC,
40 DNS_TYPE_HINFO = 0xD,
41 DNS_TYPE_MINFO = 0xE,
42 DNS_TYPE_MX = 0xF,
43 DNS_TYPE_TXT = 0x10,
44 DNS_TYPE_RP = 0x11,
45 DNS_TYPE_AFSDB = 0x12,
46 DNS_TYPE_X25 = 0x13,
47 DNS_TYPE_ISDN = 0x14,
48 DNS_TYPE_RT = 0x15,
49 DNS_TYPE_SIG = 0x18,
50 DNS_TYPE_KEY = 0x19,
51 DNS_TYPE_AAAA = 0x1C,
52 DNS_TYPE_LOC = 0x1D,
53 DNS_TYPE_NXT = 0x1E,
54 DNS_TYPE_SRV = 0x21,
55 DNS_TYPE_ATMA = 0x22,
56 DNS_TYPE_NAPTR = 0x23,
57 DNS_TYPE_CERT = 0x25,
58 DNS_TYPE_DNAME = 0x27,
59 DNS_TYPE_DS = 0x2B,
60 DNS_TYPE_SSHFP = 0x2C,
61 DNS_TYPE_IPSECKEY = 0x2D,
62 DNS_TYPE_RRSIG = 0x2E,
63 DNS_TYPE_NSEC = 0x2F,
64 DNS_TYPE_DNSKEY= 0x30,
65 DNS_TYPE_DHCID = 0x31,
66 DNS_TYPE_NSEC3 = 0x32,
67 DNS_TYPE_NSEC3PARAM = 0x33,
68 DNS_TYPE_TLSA = 0x34,
69 DNS_TYPE_CDS = 0x3B,
70 DNS_TYPE_CDNSKEY = 0x3C,
71 DNS_TYPE_SVCB = 0x40,
72 DNS_TYPE_HTTPS = 0x41,
73 DNS_TYPE_ALL = 0xFF,
74 DNS_TYPE_URI = 0x100,
75 DNS_TYPE_CAA = 0x101,
76 DNS_TYPE_WINS = 0xFF01,
77 DNS_TYPE_WINSR = 0xFF02
78 } dns_record_type;
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
96 dns_rpc_node_flags;
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,
112 DNS_RANK_ZONE = 0xf0
113 } dns_record_rank;
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
122 } dns_zone_type;
124 typedef [public,enum8bit] enum {
125 DNS_ZONE_UPDATE_OFF = 0x00,
126 DNS_ZONE_UPDATE_UNSECURE = 0x01,
127 DNS_ZONE_UPDATE_SECURE = 0x02
128 } dns_zone_update;
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
149 } dns_property_id;
151 typedef [enum8bit] enum {
152 DCPROMO_CONVERT_NONE = 0x00,
153 DCPROMO_CONVERT_DOMAIN = 0x01,
154 DCPROMO_CONVERT_FOREST = 0x02
155 } dns_dcpromo_flag;
157 typedef [public] struct {
158 uint32 serial;
159 uint32 refresh;
160 uint32 retry;
161 uint32 expire;
162 uint32 minimum;
163 dnsp_name mname;
164 dnsp_name rname;
165 } dnsp_soa;
167 typedef [public] struct {
168 uint16 wPriority;
169 dnsp_name nameTarget;
170 } dnsp_mx;
172 typedef [public] struct {
173 dnsp_string cpu;
174 dnsp_string os;
175 } dnsp_hinfo;
177 typedef [public] struct {
178 uint16 wPriority;
179 uint16 wWeight;
180 uint16 wPort;
181 dnsp_name nameTarget;
182 } dnsp_srv;
184 typedef struct {
185 uint32 addrCount;
186 uint32 addrArray[addrCount];
187 } dnsp_ip4_array;
189 typedef struct {
190 uint16 family;
191 [flag(NDR_BIG_ENDIAN)] uint16 port;
192 [flag(NDR_BIG_ENDIAN)] ipv4address ipv4;
193 ipv6address ipv6;
194 uint8 pad[8];
195 uint32 unused[8];
196 } dnsp_dns_addr;
198 typedef [public] struct {
199 uint32 MaxCount;
200 uint32 AddrCount;
201 uint32 Tag;
202 uint16 Family;
203 uint16 Reserved0;
204 uint32 Flags;
205 uint32 MatchFlag;
206 uint32 Reserved1;
207 uint32 Reserved2;
208 dnsp_dns_addr AddrArray[AddrCount];
209 } dnsp_dns_addr_array;
211 typedef [public,nopull,nopush,noprint,gensize] struct {
212 uint8 count;
213 dnsp_string str[count];
214 } dnsp_string_list;
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;
229 } dnsRecordData;
231 /* this is the format for the dnsRecord attribute in the DNS
232 partitions in AD */
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;
238 uint16 flags;
239 uint32 dwSerial;
240 [flag(NDR_BIG_ENDIAN)] uint32 dwTtlSeconds;
241 uint32 dwReserved;
242 uint32 dwTimeStamp;
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;
264 } dnsPropertyData;
266 /* this is the format for the dnsProperty attribute in the DNS
267 partitions in AD */
268 typedef [flag(NDR_NOALIGN),public] struct {
269 [value(ndr_size_dnsPropertyData(&data,id,ndr->flags))] uint32 wDataLength;
270 uint32 namelength;
271 [value(0)] uint32 flag;
272 [value(1)] uint32 version;
273 dns_property_id id;
274 [switch_is(id)] dnsPropertyData data;
275 uint32 name;
276 } dnsp_DnsProperty;
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
282 * domain.
284 typedef [flag(NDR_NOALIGN),public] struct {
285 [range(0, 0), value(0)] uint32 wDataLength;
286 uint32 namelength;
287 [value(0)] uint32 flag;
288 [value(1)] uint32 version;
289 dns_property_id id;
290 [switch_is(DSPROPERTY_ZONE_EMPTY)] dnsPropertyData data;
291 uint32 name;
292 } dnsp_DnsProperty_short;