source: branches/samba-3.5.x/librpc/idl/epmapper.idl

Last change on this file was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 8.2 KB
Line 
1#include "idl_types.h"
2
3/*
4 endpoint mapper interface
5 Related links:
6 http://www.opengroup.org/onlinepubs/9629399/apdxo.htm : The official IDL for this pipe
7 http://www.opengroup.org/onlinepubs/9629399/apdxl.htm : Details on towers
8http://www.opengroup.org/onlinepubs/9629399/chap6.htm#tagcjh_11_02_03_01: binding strings
9
10*/
11
12import "misc.idl";
13
14[
15 uuid("e1af8308-5d1f-11c9-91a4-08002b14a0fa"),
16 version(3.0),
17 endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]",
18 "ncalrpc:[EPMAPPER]"),
19 helpstring("EndPoint Mapper"),
20 pointer_default(ptr)
21]
22interface epmapper
23{
24
25 /*
26 note that the following IDL won't work in MIDL, and in fact
27 that the full towers/floors representation of epm cannot be
28 represented in MIDL at all. I decided to represent it using
29 the extended IDL syntax in pidl to make it easier to work
30 with.
31 */
32
33 const int EPMAPPER_STATUS_NO_MORE_ENTRIES = 0x16c9a0d6;
34 const int EPMAPPER_STATUS_NO_MEMORY = 0x16C9A012;
35 const int EPMAPPER_STATUS_OK = 0;
36
37
38
39 typedef [enum8bit] enum {
40
41 /* Level 4 and higher */
42 EPM_PROTOCOL_DNET_NSP = 0x04,
43 EPM_PROTOCOL_OSI_TP4 = 0x05,
44 EPM_PROTOCOL_OSI_CLNS = 0x06,
45 EPM_PROTOCOL_TCP = 0x07,
46 EPM_PROTOCOL_UDP = 0x08,
47 EPM_PROTOCOL_IP = 0x09,
48 /* These 4 are protocol identifiers, always at level 3 or lower */
49 EPM_PROTOCOL_NCADG = 0x0a, /* Connectionless RPC */
50 EPM_PROTOCOL_NCACN = 0x0b,
51 EPM_PROTOCOL_NCALRPC = 0x0c, /* Local RPC */
52 EPM_PROTOCOL_UUID = 0x0d,
53 EPM_PROTOCOL_IPX = 0x0e,
54 EPM_PROTOCOL_SMB = 0x0f,
55 EPM_PROTOCOL_NAMED_PIPE = 0x10,
56 EPM_PROTOCOL_NETBIOS = 0x11,
57 EPM_PROTOCOL_NETBEUI = 0x12,
58 EPM_PROTOCOL_SPX = 0x13,
59 EPM_PROTOCOL_NB_IPX = 0x14, /* NetBIOS over IPX */
60 EPM_PROTOCOL_DSP = 0x16, /* AppleTalk Data Stream Protocol */
61 EPM_PROTOCOL_DDP = 0x17, /* AppleTalk Data Datagram Protocol */
62 EPM_PROTOCOL_APPLETALK = 0x18, /* AppleTalk */
63 EPM_PROTOCOL_VINES_SPP = 0x1a,
64 EPM_PROTOCOL_VINES_IPC = 0x1b, /* Inter Process Communication */
65 EPM_PROTOCOL_STREETTALK = 0x1c, /* Vines Streettalk */
66 EPM_PROTOCOL_HTTP = 0x1f,
67 EPM_PROTOCOL_UNIX_DS = 0x20, /* Unix domain socket */
68 EPM_PROTOCOL_NULL = 0x21
69 } epm_protocol;
70
71 typedef struct {
72 /*FIXME */
73 } epm_rhs_dnet_nsp;
74
75 typedef struct {
76 /*FIXME*/
77 } epm_rhs_osi_tp4;
78
79 typedef struct {
80 /*FIXME*/
81 } epm_rhs_osi_clns;
82
83 typedef struct {
84 uint16 port;
85 } epm_rhs_udp;
86
87 typedef struct {
88 uint16 port;
89 } epm_rhs_tcp;
90
91 typedef struct {
92 ipv4address ipaddr;
93 } epm_rhs_ip;
94
95 typedef struct {
96 uint16 minor_version;
97 } epm_rhs_ncadg;
98
99 typedef struct {
100 uint16 minor_version;
101 } epm_rhs_ncacn;
102
103 typedef struct {
104 [flag(NDR_REMAINING)] DATA_BLOB unknown;
105 } epm_rhs_uuid;
106
107 typedef struct {
108 /*FIXME */
109 } epm_rhs_ipx;
110
111 typedef struct {
112 astring unc;
113 } epm_rhs_smb;
114
115 typedef struct {
116 astring path;
117 } epm_rhs_named_pipe;
118
119 typedef struct {
120 astring name;
121 } epm_rhs_netbios;
122
123 typedef struct {
124 } epm_rhs_netbeui;
125
126 typedef struct {
127 } epm_rhs_spx;
128
129 typedef struct {
130 } epm_rhs_nb_ipx;
131
132 typedef struct {
133 uint16 port;
134 } epm_rhs_http;
135
136 typedef struct {
137 astring path;
138 } epm_rhs_unix_ds;
139
140 typedef struct {
141 } epm_rhs_null;
142
143 typedef struct {
144 uint16 minor_version;
145 } epm_rhs_ncalrpc;
146
147 typedef struct {
148 } epm_rhs_appletalk;
149
150 typedef struct {
151 } epm_rhs_atalk_stream;
152
153 typedef struct {
154 } epm_rhs_atalk_datagram;
155
156 typedef struct {
157 uint16 port;
158 } epm_rhs_vines_spp;
159
160 typedef struct {
161 uint16 port;
162 } epm_rhs_vines_ipc;
163
164 typedef struct {
165 astring streettalk;
166 } epm_rhs_streettalk;
167
168 typedef [flag(NDR_BIG_ENDIAN),nodiscriminant] union {
169 [case(EPM_PROTOCOL_DNET_NSP)] epm_rhs_dnet_nsp dnet_nsp;
170 [case(EPM_PROTOCOL_OSI_TP4)] epm_rhs_osi_tp4 osi_tp4;
171 [case(EPM_PROTOCOL_OSI_CLNS)] epm_rhs_osi_clns osi_clns;
172 [case(EPM_PROTOCOL_TCP)] epm_rhs_tcp tcp;
173 [case(EPM_PROTOCOL_UDP)] epm_rhs_udp udp;
174 [case(EPM_PROTOCOL_IP)] epm_rhs_ip ip;
175 [case(EPM_PROTOCOL_NCADG)] epm_rhs_ncadg ncadg;
176 [case(EPM_PROTOCOL_NCACN)] epm_rhs_ncacn ncacn;
177 [case(EPM_PROTOCOL_NCALRPC)] epm_rhs_ncalrpc ncalrpc;
178 [case(EPM_PROTOCOL_UUID)] epm_rhs_uuid uuid;
179 [case(EPM_PROTOCOL_IPX)] epm_rhs_ipx ipx;
180 [case(EPM_PROTOCOL_SMB)] epm_rhs_smb smb;
181 [case(EPM_PROTOCOL_NAMED_PIPE)] epm_rhs_named_pipe named_pipe;
182 [case(EPM_PROTOCOL_NETBIOS)] epm_rhs_netbios netbios;
183 [case(EPM_PROTOCOL_NETBEUI)] epm_rhs_netbeui netbeui;
184 [case(EPM_PROTOCOL_SPX)] epm_rhs_spx spx;
185 [case(EPM_PROTOCOL_NB_IPX)] epm_rhs_nb_ipx nb_ipx;
186 [case(EPM_PROTOCOL_DSP)] epm_rhs_atalk_stream atalk_stream;
187 [case(EPM_PROTOCOL_DDP)] epm_rhs_atalk_datagram atalk_datagram;
188 [case(EPM_PROTOCOL_APPLETALK)] epm_rhs_appletalk appletalk;
189 [case(EPM_PROTOCOL_VINES_SPP)] epm_rhs_vines_spp vines_spp;
190 [case(EPM_PROTOCOL_VINES_IPC)] epm_rhs_vines_ipc vines_ipc;
191 [case(EPM_PROTOCOL_STREETTALK)] epm_rhs_streettalk streettalk;
192 [case(EPM_PROTOCOL_HTTP)] epm_rhs_http http;
193 [case(EPM_PROTOCOL_UNIX_DS)] epm_rhs_unix_ds unix_ds;
194 [case(EPM_PROTOCOL_NULL)] epm_rhs_null null;
195 [default] [flag(NDR_REMAINING)] DATA_BLOB unknown;
196 } epm_rhs;
197
198 typedef struct {
199 epm_protocol protocol;
200 [flag(NDR_REMAINING)] DATA_BLOB lhs_data;
201 } epm_lhs;
202
203 typedef struct {
204 [subcontext(2)] epm_lhs lhs;
205 [subcontext(2),switch_is(lhs.protocol)] epm_rhs rhs;
206 } epm_floor;
207
208 /* note that the NDR_NOALIGN flag is inherited by all nested
209 structures. All of the towers/floors stuff is
210 non-aligned. I wonder what sort of wicked substance these
211 guys were smoking?
212 */
213 typedef [gensize,flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN)] struct {
214 uint16 num_floors;
215 epm_floor floors[num_floors];
216 } epm_tower;
217
218 typedef struct {
219 [value(ndr_size_epm_tower(&tower, ndr->iconv_convenience, ndr->flags))] uint32 tower_length;
220 [subcontext(4)] epm_tower tower;
221 } epm_twr_t;
222
223 typedef struct {
224 GUID object;
225 epm_twr_t *tower;
226 /*
227 * In theory this should be:
228 * [charset(DOS),string] uint8 annotation[64]
229 * But midl treats this as:
230 * [charset(DOS),string] uint8 annotation[]
231 * and pidl doesn't support this yet
232 */
233 [value(0)] uint32 __annotation_offset;
234 [value(strlen(annotation)+1)] uint32 __annotation_length;
235 [charset(DOS)] uint8 annotation[__annotation_length];
236 } epm_entry_t;
237
238 typedef struct {
239 GUID uuid;
240 uint16 vers_major;
241 uint16 vers_minor;
242 } rpc_if_id_t;
243
244 /**********************/
245 /* Function 0x0 */
246 error_status_t epm_Insert(
247 [in] uint32 num_ents,
248 [in,size_is(num_ents)] epm_entry_t entries[],
249 [in] uint32 replace
250 );
251
252 /**********************/
253 /* Function 0x1 */
254 error_status_t epm_Delete(
255 [in] uint32 num_ents,
256 [in, size_is(num_ents)] epm_entry_t entries[]
257 );
258
259 /**********************/
260 /* Function 0x02 */
261 error_status_t epm_Lookup(
262 [in] uint32 inquiry_type,
263 [in,ptr] GUID *object,
264 [in,ptr] rpc_if_id_t *interface_id,
265 [in] uint32 vers_option,
266 [in,out] policy_handle *entry_handle,
267 [in] uint32 max_ents,
268 [out] uint32 *num_ents,
269 [out, length_is(*num_ents), size_is(max_ents)] epm_entry_t entries[]
270 );
271
272
273 /**********************/
274 /* Function 0x03 */
275
276 typedef struct {
277 epm_twr_t *twr;
278 } epm_twr_p_t;
279
280 [public] error_status_t epm_Map(
281 [in,ptr] GUID *object,
282 [in,ptr] epm_twr_t *map_tower,
283 [in,out] policy_handle *entry_handle,
284 [in] uint32 max_towers,
285 [out] uint32 *num_towers,
286 [out, length_is(*num_towers), size_is(max_towers)] epm_twr_p_t towers[]
287 );
288
289
290 /**********************/
291 /* Function 0x04 */
292 error_status_t epm_LookupHandleFree(
293 [in,out] policy_handle *entry_handle
294 );
295
296 /**********************/
297 /* Function 0x05 */
298 error_status_t epm_InqObject(
299 [in] GUID *epm_object
300 );
301
302
303 /**********************/
304 /* Function 0x06 */
305 error_status_t epm_MgmtDelete(
306 [in] uint32 object_speced,
307 [in,ptr] GUID *object,
308 [in,ptr] epm_twr_t *tower
309 );
310
311 /**********************/
312 /* Function 0x07 */
313 [todo] error_status_t epm_MapAuth();
314}
Note: See TracBrowser for help on using the repository browser.