dcerpc over tcp in the samba4 server now works to some extent. It
[abartlet/samba.git/.git] / source4 / librpc / idl / epmapper.idl
1 #include "idl_types.h"
2
3 /*
4   endpoint mapper interface
5 */
6
7 [
8  uuid(e1af8308-5d1f-11c9-91a4-08002b14a0fa), 
9  version(3.0), 
10  endpoints(epmapper, TCP-135),
11  pointer_default(unique)
12 ]
13 interface epmapper
14 {
15
16         /*
17           note that the following IDL won't work in MIDL, and in fact
18           that the full towers/floors representation of epm cannot be
19           represented in MIDL at all. I decided to represent it using
20           the extended IDL syntax in pidl to make it easier to work
21           with.
22         */
23
24         const int EPMAPPER_STATUS_NO_MORE_ENTRIES = 0x16c9a0d6;
25
26
27         /* this guid indicates NDR encoding in a protocol tower */
28         const string NDR_GUID = "8a885d04-1ceb-11c9-9fe8-08002b104860";
29         const string NDR_GUID_VERSION = 2;
30
31         const uint32 EPMAPPER_PORT = 135;
32
33         typedef struct {
34                 GUID uuid;
35                 uint16 version;
36         } epm_prot_uuid;
37
38         typedef enum {
39                 EPM_PROTOCOL_TCP     = 0x07,
40                 EPM_PROTOCOL_IP      = 0x09,
41                 EPM_PROTOCOL_PIPE    = 0x10,
42                 EPM_PROTOCOL_NETBIOS = 0x11,
43                 EPM_PROTOCOL_RPC_C   = 0x0b,
44                 EPM_PROTOCOL_UUID    = 0x0d,
45                 EPM_PROTOCOL_SMB     = 0x0f,
46                 EPM_PROTOCOL_HTTP    = 0x1f
47         } epm_protocols;
48
49         typedef [nodiscriminant] union {
50                 [case(13)] epm_prot_uuid uuid;
51                 [default]  [flag(NDR_REMAINING)] DATA_BLOB lhs_data;
52         } epm_protocol_info;
53
54         typedef struct {
55                 uint8  protocol;
56                 [switch_is(protocol)] epm_protocol_info info;
57         } epm_lhs;
58
59         typedef struct {
60                 [flag(NDR_REMAINING)] DATA_BLOB rhs_data;
61         } epm_rhs;
62
63         typedef struct {
64                 [subcontext(2)] epm_lhs lhs;
65                 [subcontext(2)] epm_rhs rhs;
66         } epm_floor;
67
68         /* note that the NDR_NOALIGN flag is inherited by all nested
69            structures. All of the towers/floors stuff is
70            non-aligned. I wonder what sort of wicked substance these
71            guys were smoking?
72         */
73         typedef [flag(NDR_NOALIGN)] struct {
74                 uint16 num_floors;
75                 epm_floor floors[num_floors];
76         } epm_towers;
77
78         typedef struct {
79                 [value(ndr_size_epm_towers(&r->towers))] uint32  tower_length;
80                 [subcontext(4)] epm_towers towers;
81         } epm_twr_t;
82
83         typedef struct {
84                 GUID        object;
85                 epm_twr_t   *tower;
86                 ascstr2     annotation;
87         } epm_entry_t;
88
89         typedef struct {
90                 GUID                uuid;
91                 uint16              vers_major;
92                 uint16              vers_minor;
93         } rpc_if_id_t;
94     
95         /**********************/
96         /* Function 0x0       */
97         void epm_Insert(
98                 [in]    uint32          num_ents,
99                 [in,size_is(num_ents)]  epm_entry_t         entries[],
100                 [in]    uint32    replace,
101                 [out]   error_status_t  status
102                 );
103     
104         /**********************/
105         /* Function 0x1       */
106         void epm_Delete(
107                 [in]     uint32          num_ents,
108                 [in, size_is(num_ents)]  epm_entry_t entries[],
109                 [out]    error_status_t  status
110                 );
111     
112         /**********************/
113         /* Function 0x02      */
114         void epm_Lookup(
115                 [in]            uint32          inquiry_type,
116                 [in]            GUID            *object,
117                 [in]            rpc_if_id_t     *interface_id,
118                 [in]            uint32          vers_option,
119                 [in,out,ref]    policy_handle   *entry_handle,
120                 [in]            uint32          max_ents,
121                 [out]           uint32          num_ents,
122                 [out, length_is(num_ents), size_is(max_ents)]  epm_entry_t entries[],
123                 [out]           error_status_t  status
124                 );
125
126
127         /**********************/
128         /* Function 0x03      */
129
130         typedef struct {
131                 epm_twr_t *twr;
132         } epm_twr_p_t;
133
134         void epm_Map(
135                 [in]            GUID            *object,
136                 [in]            epm_twr_t       *map_tower,
137                 [in,out,ref]    policy_handle   *entry_handle,
138                 [in]            uint32          max_towers,
139                 [out]           uint32          num_towers,
140                 [out, length_is(num_towers), size_is(max_towers)]  epm_twr_p_t towers[],
141                 [out]           error_status_t  status
142                 );
143     
144
145         /**********************/
146         /* Function 0x04      */
147         void epm_LookupHandleFree(
148                 [in,out,ref]    policy_handle *entry_handle,
149                 [out]           error_status_t status
150                 );
151     
152         /**********************/
153         /* Function 0x05      */
154         void epm_InqObject(
155                 [out]           GUID        *epm_object,
156                 [out]           error_status_t   status
157                 );
158     
159
160         /**********************/
161         /* Function 0x05      */
162         void epm_MgmtDelete(
163                 [in]            uint32   object_speced,
164                 [in]            GUID     *object,
165                 [in]            epm_twr_t    *tower,
166                 [out]           error_status_t   status
167                 );
168 }