2003-11-21 16:14:17 +03:00
#include "idl_types.h"
/*
endpoint mapper interface
2004-08-11 00:55:42 +04:00
Related links:
http://www.opengroup.org/onlinepubs/9629399/apdxl.htm : Details on towers
http://www.opengroup.org/onlinepubs/9629399/chap6.htm#tagcjh_11_02_03_01: binding strings
2003-11-21 16:14:17 +03:00
*/
[
2004-10-27 08:48:41 +04:00
uuid("e1af8308-5d1f-11c9-91a4-08002b14a0fa"),
2003-11-21 16:14:17 +03:00
version(3.0),
2004-10-24 18:57:16 +04:00
endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]",
2005-05-02 19:19:25 +04:00
"ncalrpc:[EPMAPPER]"),
2004-11-01 15:57:51 +03:00
helpstring("EndPoint Mapper"),
2006-11-22 19:55:21 +03:00
pointer_default(ptr)
2003-11-21 16:14:17 +03:00
]
interface epmapper
{
2003-11-22 04:27:40 +03:00
/*
note that the following IDL won't work in MIDL, and in fact
that the full towers/floors representation of epm cannot be
represented in MIDL at all. I decided to represent it using
the extended IDL syntax in pidl to make it easier to work
with.
*/
2003-12-13 07:46:50 +03:00
const int EPMAPPER_STATUS_NO_MORE_ENTRIES = 0x16c9a0d6;
2004-08-14 09:53:53 +04:00
const int EPMAPPER_STATUS_NO_MEMORY = 0x16C9A012;
const int EPMAPPER_STATUS_OK = 0;
2003-12-13 07:46:50 +03:00
2005-06-30 12:00:08 +04:00
2005-01-05 05:01:19 +03:00
typedef [enum8bit] enum {
2004-10-12 00:12:51 +04:00
/* Level 4 and higher */
EPM_PROTOCOL_DNET_NSP = 0x04,
EPM_PROTOCOL_OSI_TP4 = 0x05,
EPM_PROTOCOL_OSI_CLNS = 0x06,
EPM_PROTOCOL_TCP = 0x07,
EPM_PROTOCOL_UDP = 0x08,
EPM_PROTOCOL_IP = 0x09,
/* These 4 are protocol identifiers, always at level 3 or lower */
EPM_PROTOCOL_NCADG = 0x0a, /* Connectionless RPC */
EPM_PROTOCOL_NCACN = 0x0b,
EPM_PROTOCOL_NCALRPC = 0x0c, /* Local RPC */
EPM_PROTOCOL_UUID = 0x0d,
EPM_PROTOCOL_IPX = 0x0e,
EPM_PROTOCOL_SMB = 0x0f,
EPM_PROTOCOL_PIPE = 0x10,
EPM_PROTOCOL_NETBIOS = 0x11,
2004-10-21 14:52:03 +04:00
EPM_PROTOCOL_NETBEUI = 0x12,
2004-10-12 00:12:51 +04:00
EPM_PROTOCOL_SPX = 0x13,
EPM_PROTOCOL_NB_IPX = 0x14, /* NetBIOS over IPX */
2004-10-21 16:47:02 +04:00
EPM_PROTOCOL_DSP = 0x16, /* AppleTalk Data Stream Protocol */
EPM_PROTOCOL_DDP = 0x17, /* AppleTalk Data Datagram Protocol */
2004-10-21 14:52:03 +04:00
EPM_PROTOCOL_APPLETALK = 0x18, /* AppleTalk */
EPM_PROTOCOL_VINES_SPP = 0x1a,
2004-10-21 16:47:02 +04:00
EPM_PROTOCOL_VINES_IPC = 0x1b, /* Inter Process Communication */
EPM_PROTOCOL_STREETTALK = 0x1c, /* Vines Streettalk */
2004-10-12 00:12:51 +04:00
EPM_PROTOCOL_HTTP = 0x1f,
2004-10-21 16:47:02 +04:00
EPM_PROTOCOL_UNIX_DS = 0x20, /* Unix domain socket */
2004-10-12 00:12:51 +04:00
EPM_PROTOCOL_NULL = 0x21
2005-01-05 05:01:19 +03:00
} epm_protocol;
2003-11-26 06:36:17 +03:00
2003-11-21 16:14:17 +03:00
typedef struct {
2004-10-12 16:51:35 +04:00
/*FIXME */
2004-10-12 16:41:50 +04:00
} epm_rhs_dnet_nsp;
typedef struct {
2004-10-12 16:51:35 +04:00
/*FIXME*/
2004-10-12 16:41:50 +04:00
} epm_rhs_osi_tp4;
typedef struct {
2004-10-12 16:51:35 +04:00
/*FIXME*/
2004-10-12 16:41:50 +04:00
} epm_rhs_osi_clns;
typedef struct {
uint16 port;
} epm_rhs_udp;
typedef struct {
uint16 port;
} epm_rhs_tcp;
typedef struct {
2005-02-01 07:12:44 +03:00
ipv4address ipaddr;
2004-10-12 16:41:50 +04:00
} epm_rhs_ip;
2003-11-21 16:14:17 +03:00
typedef struct {
2004-10-12 16:41:50 +04:00
uint16 minor_version;
} epm_rhs_ncadg;
typedef struct {
uint16 minor_version;
} epm_rhs_ncacn;
typedef struct {
2005-02-04 04:32:19 +03:00
[flag(NDR_REMAINING)] DATA_BLOB unknown;
2004-10-12 16:41:50 +04:00
} epm_rhs_uuid;
typedef struct {
2004-10-12 16:51:35 +04:00
/*FIXME */
2004-10-12 16:41:50 +04:00
} epm_rhs_ipx;
typedef struct {
astring unc;
} epm_rhs_smb;
typedef struct {
astring path;
} epm_rhs_pipe;
typedef struct {
astring name;
} epm_rhs_netbios;
typedef struct {
2004-10-21 14:52:03 +04:00
} epm_rhs_netbeui;
2004-10-12 16:41:50 +04:00
typedef struct {
} epm_rhs_spx;
typedef struct {
} epm_rhs_nb_ipx;
typedef struct {
uint16 port;
} epm_rhs_http;
typedef struct {
astring path;
} epm_rhs_unix_ds;
typedef struct {
} epm_rhs_null;
typedef struct {
2004-10-21 23:54:38 +04:00
uint16 minor_version;
2004-10-12 16:41:50 +04:00
} epm_rhs_ncalrpc;
2004-10-21 14:52:03 +04:00
typedef struct {
} epm_rhs_appletalk;
typedef struct {
} epm_rhs_atalk_stream;
typedef struct {
} epm_rhs_atalk_datagram;
typedef struct {
uint16 port;
} epm_rhs_vines_spp;
typedef struct {
uint16 port;
} epm_rhs_vines_ipc;
typedef struct {
astring streettalk;
} epm_rhs_streettalk;
2004-10-14 13:07:41 +04:00
typedef [flag(NDR_BIG_ENDIAN),nodiscriminant] union {
2004-10-12 16:41:50 +04:00
[case(EPM_PROTOCOL_DNET_NSP)] epm_rhs_dnet_nsp dnet_nsp;
[case(EPM_PROTOCOL_OSI_TP4)] epm_rhs_osi_tp4 osi_tp4;
[case(EPM_PROTOCOL_OSI_CLNS)] epm_rhs_osi_clns osi_clns;
[case(EPM_PROTOCOL_TCP)] epm_rhs_tcp tcp;
[case(EPM_PROTOCOL_UDP)] epm_rhs_udp udp;
[case(EPM_PROTOCOL_IP)] epm_rhs_ip ip;
[case(EPM_PROTOCOL_NCADG)] epm_rhs_ncadg ncadg;
[case(EPM_PROTOCOL_NCACN)] epm_rhs_ncacn ncacn;
[case(EPM_PROTOCOL_NCALRPC)] epm_rhs_ncalrpc ncalrpc;
[case(EPM_PROTOCOL_UUID)] epm_rhs_uuid uuid;
[case(EPM_PROTOCOL_IPX)] epm_rhs_ipx ipx;
[case(EPM_PROTOCOL_SMB)] epm_rhs_smb smb;
[case(EPM_PROTOCOL_PIPE)] epm_rhs_pipe pipe;
[case(EPM_PROTOCOL_NETBIOS)] epm_rhs_netbios netbios;
2004-10-21 14:52:03 +04:00
[case(EPM_PROTOCOL_NETBEUI)] epm_rhs_netbeui netbeui;
2004-10-12 16:41:50 +04:00
[case(EPM_PROTOCOL_SPX)] epm_rhs_spx spx;
[case(EPM_PROTOCOL_NB_IPX)] epm_rhs_nb_ipx nb_ipx;
2004-10-21 16:47:02 +04:00
[case(EPM_PROTOCOL_DSP)] epm_rhs_atalk_stream atalk_stream;
[case(EPM_PROTOCOL_DDP)] epm_rhs_atalk_datagram atalk_datagram;
2004-10-21 14:52:03 +04:00
[case(EPM_PROTOCOL_APPLETALK)] epm_rhs_appletalk appletalk;
[case(EPM_PROTOCOL_VINES_SPP)] epm_rhs_vines_spp vines_spp;
[case(EPM_PROTOCOL_VINES_IPC)] epm_rhs_vines_ipc vines_ipc;
[case(EPM_PROTOCOL_STREETTALK)] epm_rhs_streettalk streettalk;
2004-10-12 16:41:50 +04:00
[case(EPM_PROTOCOL_HTTP)] epm_rhs_http http;
[case(EPM_PROTOCOL_UNIX_DS)] epm_rhs_unix_ds unix_ds;
[case(EPM_PROTOCOL_NULL)] epm_rhs_null null;
[default] [flag(NDR_REMAINING)] DATA_BLOB unknown;
2003-11-21 16:14:17 +03:00
} epm_rhs;
2004-10-12 16:41:50 +04:00
typedef struct {
2005-02-04 04:32:19 +03:00
epm_protocol protocol;
[flag(NDR_REMAINING)] DATA_BLOB lhs_data;
2004-10-12 16:41:50 +04:00
} epm_lhs;
2003-11-21 16:14:17 +03:00
typedef struct {
[subcontext(2)] epm_lhs lhs;
r6973: Merge new version of pidl into the main SAMBA_4_0 branch.
The main difference in this new version is the extra data structure generated
between the IDL data structure and the NDR parser:
IDL -> NDR -> { ndr_parser, ndr_header, eparser, etc }
This makes the ndr_parser.pm internals much more sane.
Other changes include:
- Remove unnecessary calls with NDR_BUFFERS (for example, GUID doesn't have any buffers, just scalars) as well as some (unnecessary) nested setting of flags.
- Parse array loops in the C code rather then calling ndr_pull_array(). This allows us to have, for example, arrays of pointers or arrays of pointers to arrays, etc..
- Use if() {} rather then if () goto foo; everywhere
- NDR_IN no longer implies LIBNDR_FLAG_REF_ALLOC
- By default, top level pointers are now "ref" (as is the default in
most other IDL compilers). This can be overridden using the
default_pointer_top() property.
- initial work on new ethereal parser generators by Alan DeKok and me
- pidl now writes errors in the standard format used by compilers, which
is parsable by most editors
- ability to warn about the fact that pidl extension(s) have been used,
useful for making sure IDL files work with other IDL compilers.
oh, and there's probably some other things I can't think of right now..
(This used to be commit 13cf227615f6b9e0e5fa62e59197024410254f01)
2005-05-25 17:50:27 +04:00
[subcontext(2),switch_is(r->lhs.protocol)] epm_rhs rhs;
2003-11-21 16:14:17 +03:00
} epm_floor;
2003-11-24 13:15:17 +03:00
/* note that the NDR_NOALIGN flag is inherited by all nested
2003-11-22 04:27:40 +03:00
structures. All of the towers/floors stuff is
non-aligned. I wonder what sort of wicked substance these
2003-11-24 13:15:17 +03:00
guys were smoking?
2003-11-22 04:27:40 +03:00
*/
2004-10-28 16:46:59 +04:00
typedef [gensize,flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN)] struct {
2003-11-21 16:14:17 +03:00
uint16 num_floors;
epm_floor floors[num_floors];
2004-10-21 14:52:03 +04:00
} epm_tower;
2003-11-21 16:14:17 +03:00
2004-10-28 16:46:59 +04:00
typedef struct {
2005-06-14 02:22:51 +04:00
[value(ndr_size_epm_tower(&tower, ndr->flags))] uint32 tower_length;
2004-10-21 14:52:03 +04:00
[subcontext(4)] epm_tower tower;
2003-11-24 08:28:10 +03:00
} epm_twr_t;
2003-11-21 16:14:17 +03:00
typedef struct {
GUID object;
2003-11-24 08:28:10 +03:00
epm_twr_t *tower;
2003-11-21 16:14:17 +03:00
ascstr2 annotation;
} epm_entry_t;
typedef struct {
GUID uuid;
uint16 vers_major;
uint16 vers_minor;
} rpc_if_id_t;
/**********************/
/* Function 0x0 */
2004-08-14 09:53:53 +04:00
error_status_t epm_Insert(
2003-11-21 16:14:17 +03:00
[in] uint32 num_ents,
[in,size_is(num_ents)] epm_entry_t entries[],
2004-08-14 09:53:53 +04:00
[in] uint32 replace
2003-11-21 16:14:17 +03:00
);
/**********************/
/* Function 0x1 */
2004-08-14 09:53:53 +04:00
error_status_t epm_Delete(
2003-11-21 16:14:17 +03:00
[in] uint32 num_ents,
2004-08-14 09:53:53 +04:00
[in, size_is(num_ents)] epm_entry_t entries[]
2003-11-21 16:14:17 +03:00
);
/**********************/
/* Function 0x02 */
2004-08-14 09:53:53 +04:00
error_status_t epm_Lookup(
2003-11-21 16:14:17 +03:00
[in] uint32 inquiry_type,
[in] GUID *object,
[in] rpc_if_id_t *interface_id,
[in] uint32 vers_option,
2003-11-24 08:28:10 +03:00
[in,out,ref] policy_handle *entry_handle,
2003-11-21 16:14:17 +03:00
[in] uint32 max_ents,
2006-11-22 19:55:21 +03:00
[out] uint32 *num_ents,
[out, length_is(*num_ents), size_is(max_ents)] epm_entry_t entries[]
2003-11-21 16:14:17 +03:00
);
/**********************/
/* Function 0x03 */
typedef struct {
2003-11-24 08:28:10 +03:00
epm_twr_t *twr;
} epm_twr_p_t;
2003-11-21 16:14:17 +03:00
2004-08-14 09:53:53 +04:00
error_status_t epm_Map(
2003-11-21 16:14:17 +03:00
[in] GUID *object,
2003-11-24 08:28:10 +03:00
[in] epm_twr_t *map_tower,
[in,out,ref] policy_handle *entry_handle,
2003-11-21 16:14:17 +03:00
[in] uint32 max_towers,
2006-11-22 19:55:21 +03:00
[out] uint32 *num_towers,
[out, length_is(*num_towers), size_is(max_towers)] epm_twr_p_t towers[]
2003-11-21 16:14:17 +03:00
);
/**********************/
/* Function 0x04 */
2004-08-14 09:53:53 +04:00
error_status_t epm_LookupHandleFree(
[in,out,ref] policy_handle *entry_handle
2003-11-21 16:14:17 +03:00
);
/**********************/
/* Function 0x05 */
2004-08-14 09:53:53 +04:00
error_status_t epm_InqObject(
2005-01-01 01:12:44 +03:00
[in,ref] GUID *epm_object
2003-11-21 16:14:17 +03:00
);
/**********************/
2004-08-11 00:55:42 +04:00
/* Function 0x06 */
2004-08-14 09:53:53 +04:00
error_status_t epm_MgmtDelete(
2003-11-21 16:14:17 +03:00
[in] uint32 object_speced,
[in] GUID *object,
2004-08-14 09:53:53 +04:00
[in] epm_twr_t *tower
2003-11-21 16:14:17 +03:00
);
2004-08-13 05:31:11 +04:00
/**********************/
/* Function 0x07 */
2004-08-14 09:53:53 +04:00
error_status_t epm_MapAuth();
2003-11-21 16:14:17 +03:00
}