s3:smbd: change trans2.c to use fsp_fnum_dbg() for fsp->fnum logging.
[Samba/gebeck_regimport.git] / librpc / idl / dnsp.idl
blob4c49001c85679bec0cd93f1f76a326b2682ff5c0
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_DNAME = 0x27,
58 DNS_TYPE_DS = 0x2B,
59 DNS_TYPE_RRSIG = 0x2E,
60 DNS_TYPE_NSEC = 0x2F,
61 DNS_TYPE_DNSKEY= 0x30,
62 DNS_TYPE_DHCID = 0x31,
63 DNS_TYPE_ALL = 0xFF,
64 DNS_TYPE_WINS = 0xFF01,
65 DNS_TYPE_WINSR = 0xFF02
66 } dns_record_type;
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
82 dns_rpc_node_flags;
85 typedef [enum8bit] enum {
86 DNS_RANK_NONE = 0x00,
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,
95 DNS_RANK_GLUE = 0x80,
96 DNS_RANK_NS_GLUE = 0x82,
97 DNS_RANK_CACHE_A_ANSWER = 0xc1,
98 DNS_RANK_ZONE = 0xf0
99 } dns_record_rank;
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
108 } dns_zone_type;
110 typedef [public,enum8bit] enum {
111 DNS_ZONE_UPDATE_OFF = 0x00,
112 DNS_ZONE_UPDATE_UNSECURE = 0x01,
113 DNS_ZONE_UPDATE_SECURE = 0x02
114 } dns_zone_update;
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
135 } dns_property_id;
137 typedef [enum8bit] enum {
138 DCPROMO_CONVERT_NONE = 0x00,
139 DCPROMO_CONVERT_DOMAIN = 0x01,
140 DCPROMO_CONVERT_FOREST = 0x02
141 } dns_dcpromo_flag;
143 typedef [public] struct {
144 uint32 serial;
145 uint32 refresh;
146 uint32 retry;
147 uint32 expire;
148 uint32 minimum;
149 dnsp_name mname;
150 dnsp_name rname;
151 } dnsp_soa;
153 typedef [public] struct {
154 uint16 wPriority;
155 dnsp_name nameTarget;
156 } dnsp_mx;
158 typedef [public] struct {
159 dnsp_string cpu;
160 dnsp_string os;
161 } dnsp_hinfo;
163 typedef [public] struct {
164 uint16 wPriority;
165 uint16 wWeight;
166 uint16 wPort;
167 dnsp_name nameTarget;
168 } dnsp_srv;
170 typedef struct {
171 uint32 addrCount;
172 [size_is(addrCount)] uint32 *addr;
173 } dnsp_ip4_array;
175 typedef struct {
176 uint16 family;
177 uint16 port;
178 ipv4address ipv4;
179 ipv6address ipv6;
180 uint8 pad[8];
181 uint32 unused[8];
182 } dnsp_dns_addr;
184 typedef [public] struct {
185 uint32 MaxCount;
186 uint32 AddrCount;
187 uint32 Tag;
188 uint16 Family;
189 uint16 Reserved0;
190 uint32 MatchFlag;
191 uint32 Reserved1;
192 uint32 Reserved2;
193 dnsp_dns_addr AddrArray[AddrCount];
194 } dnsp_dns_addr_array;
196 typedef [public,nopull,nopush,noprint,gensize] struct {
197 uint8 count;
198 dnsp_string str[count];
199 } dnsp_string_list;
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;
214 } dnsRecordData;
216 /* this is the format for the dnsRecord attribute in the DNS
217 partitions in AD */
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;
223 uint16 flags;
224 uint32 dwSerial;
225 [flag(NDR_BIG_ENDIAN)] uint32 dwTtlSeconds;
226 uint32 dwReserved;
227 uint32 dwTimeStamp;
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;
249 } dnsPropertyData;
251 /* this is the format for the dnsProperty attribute in the DNS
252 partitions in AD */
253 typedef [flag(NDR_NOALIGN),public] struct {
254 [value(ndr_size_dnsPropertyData(&data,id,ndr->flags))] uint32 wDataLength;
255 uint32 namelength;
256 [value(0)] uint32 flag;
257 [value(1)] uint32 version;
258 dns_property_id id;
259 [switch_is(wDataLength?id:DSPROPERTY_ZONE_EMPTY)] dnsPropertyData data;
260 uint32 name;
261 } dnsp_DnsProperty;
264 these are convenience hooks for ndrdump
266 void decode_DnssrvRpcRecord(
267 [in] dnsp_DnssrvRpcRecord blob
270 void decode_DnsProperty(
271 [in] dnsp_DnsProperty blob