summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/idl/dcerpc.idl1
-rw-r--r--source4/librpc/idl/dcom.idl55
-rw-r--r--source4/librpc/idl/misc.idl1
-rw-r--r--source4/librpc/idl/schannel.idl1
-rw-r--r--source4/librpc/ndr/ndr_basic.c48
5 files changed, 83 insertions, 23 deletions
diff --git a/source4/librpc/idl/dcerpc.idl b/source4/librpc/idl/dcerpc.idl
index 71c1b26e2a..3618dfbb61 100644
--- a/source4/librpc/idl/dcerpc.idl
+++ b/source4/librpc/idl/dcerpc.idl
@@ -8,7 +8,6 @@
see http://www.opengroup.org/onlinepubs/9629399/chap12.htm for packet
layouts
*/
-[]
interface dcerpc
{
typedef [public] struct {
diff --git a/source4/librpc/idl/dcom.idl b/source4/librpc/idl/dcom.idl
index 9d5acb6ebd..dee52243a4 100644
--- a/source4/librpc/idl/dcom.idl
+++ b/source4/librpc/idl/dcom.idl
@@ -10,27 +10,22 @@ interface ObjectRpcBaseTypes
{
WERROR stub();
- typedef [public] struct {
- uint32 upper;
- uint32 lower;
- } hyper;
-
//////////////////////////////////////////////////////////////
// Identifier Definitions
////////////////////////////////////////////////////////////
// Machine Identifier
-#define MID hyper
+#define MID HYPER_T
// Object Exporter Identifier
-#define OXID hyper
+#define OXID HYPER_T
// Object Identifer
-#define OID hyper
+#define OID HYPER_T
// Ping Set Identifier
-#define SETID hyper
+#define SETID HYPER_T
// Interface Pointer Identifier
#define IPID GUID
@@ -186,7 +181,7 @@ interface ObjectRpcBaseTypes
const uint32 SORF_NULL = 0x0; // convenient for initializing SORF
const uint32 SORF_NOPING = 0x1000;// Pinging is not required
// standard object reference
- typedef struct
+ typedef [public] struct
{
uint32 flags; // STDOBJREF flags (see above)
uint32 cPublicRefs; // count of references passed
@@ -241,6 +236,26 @@ interface ObjectRpcBaseTypes
} MInterfacePointer;
}
+
+[
+ object,
+ uuid(00000000-0000-0000-C000-000000000046)
+]
+interface IUnknown
+{
+ /*****************/
+ /* Function 0x00 */
+ HRESULT QueryInterface();
+
+ /*****************/
+ /* Function 0x01 */
+ uint32 AddRef();
+
+ /*****************/
+ /* Function 0x02 */
+ uint32 Release();
+}
+
//////////////////////////////////////////////////////////////////
// The remote version of Iunknown. This interface exists on every
@@ -252,9 +267,10 @@ interface ObjectRpcBaseTypes
//
[
uuid(00000131-0000-0000-C000-000000000046),
+ object,
version(0.0)
]
-interface IRemUnknown // : IUnknown
+interface IRemUnknown : IUnknown
{
typedef struct
{
@@ -262,7 +278,7 @@ interface IRemUnknown // : IUnknown
STDOBJREF std; // data for returned interface
}
REMQIRESULT;
-
+
HRESULT RemQueryInterface (
[in] IPID *ripid, // interface to QI on
[in] uint32 cRefs, // count of AddRefs requested
@@ -291,15 +307,18 @@ interface IRemUnknown // : IUnknown
);
}
+
+
// Derived from IRemUnknown, this interface supports Remote Query interface
// for objects that supply additional data beyond the STDOBJREF in their
// marshaled interface packets.
[
+object,
uuid(00000143-0000-0000-C000-000000000046),
version(0.0)
]
-interface IRemUnknown2 //: IRemUnknown
+interface IRemUnknown2 : IRemUnknown
{
HRESULT RemQueryInterface2 (
[in] IPID *ripid,
@@ -308,7 +327,6 @@ interface IRemUnknown2 //: IRemUnknown
[out, size_is(cIids)] HRESULT *phr
//FIXME [out, size_is(cIids)] MInterfacePointer **ppMIF
);
-
}
[ uuid(99fcfec4-5260-101b-bbcb-00aa0021347a),
@@ -339,7 +357,7 @@ interface IOXIDResolver
// Returns S_TRUE if the SetId is known by the object exporter,
// S_FALSE if not.
[idempotent] WERROR SimplePing (
- [in] policy_handle hRpc,
+ [in,ref] policy_handle *hRpc,
[in] SETID *pSetId // Must not be zero
);
@@ -364,13 +382,13 @@ interface IOXIDResolver
// can be used to validate the binding
// from the client.
[idempotent] WERROR ServerAlive (
- [in] policy_handle hRpc
+ [in,ref] policy_handle *hRpc
);
// Method to get the protocol sequences, string bindings,
// RemoteUnknown IPID and COM version for an object server
// given its OXID. Supported by DCOM
// version 5.2 and above.
- [idempotent] error_status_t ResolveOxid2 (
+ [idempotent] WERROR ResolveOxid2 (
[in] policy_handle hRpc,
[in] OXID *pOxid,
[in] uint16 cRequestedProtseqs,
@@ -452,13 +470,10 @@ interface ISystemActivator
/* Function 0x03 */
NTSTATUS isa_Unknown3();
-
// Binding strings and the OBJREF_SIGNATURE in this call
/*****************/
/* Function 0x04 */
NTSTATUS isa_Unknown4();
-
-
}
[
diff --git a/source4/librpc/idl/misc.idl b/source4/librpc/idl/misc.idl
index d7163839d5..7fed02f5b1 100644
--- a/source4/librpc/idl/misc.idl
+++ b/source4/librpc/idl/misc.idl
@@ -4,7 +4,6 @@
miscellaneous IDL structures
*/
-[]
interface misc
{
/* a NULL sid */
diff --git a/source4/librpc/idl/schannel.idl b/source4/librpc/idl/schannel.idl
index a208ee89a3..157634ef76 100644
--- a/source4/librpc/idl/schannel.idl
+++ b/source4/librpc/idl/schannel.idl
@@ -4,7 +4,6 @@
schannel structures
*/
-[]
interface schannel
{
/*
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c
index 5d4ade096f..bf72e0ad8b 100644
--- a/source4/librpc/ndr/ndr_basic.c
+++ b/source4/librpc/ndr/ndr_basic.c
@@ -207,6 +207,21 @@ NTSTATUS ndr_pull_array_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *da
}
/*
+ pull a const array of HYPER_T
+*/
+NTSTATUS ndr_pull_array_HYPER_T(struct ndr_pull *ndr, int ndr_flags, HYPER_T *data, uint32_t n)
+{
+ uint32_t i;
+ if (!(ndr_flags & NDR_SCALARS)) {
+ return NT_STATUS_OK;
+ }
+ for (i=0;i<n;i++) {
+ NDR_CHECK(ndr_pull_HYPER_T(ndr, &data[i]));
+ }
+ return NT_STATUS_OK;
+}
+
+/*
push a uint8
*/
NTSTATUS ndr_push_uint8(struct ndr_push *ndr, uint8_t v)
@@ -347,6 +362,21 @@ NTSTATUS ndr_push_array_uint32(struct ndr_push *ndr, int ndr_flags, const uint32
}
/*
+ push an array of HYPER_T
+*/
+NTSTATUS ndr_push_array_HYPER_T(struct ndr_push *ndr, int ndr_flags, const HYPER_T *data, uint32_t n)
+{
+ int i;
+ if (!(ndr_flags & NDR_SCALARS)) {
+ return NT_STATUS_OK;
+ }
+ for (i=0;i<n;i++) {
+ NDR_CHECK(ndr_push_HYPER_T(ndr, data[i]));
+ }
+ return NT_STATUS_OK;
+}
+
+/*
save the current position
*/
void ndr_push_save(struct ndr_push *ndr, struct ndr_push_save *save)
@@ -798,6 +828,24 @@ void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16_t level
ndr->print(ndr, "UNKNOWN LEVEL %u", level);
}
+void ndr_print_array_HYPER_T(struct ndr_print *ndr, const char *name,
+ const HYPER_T *data, uint32_t count)
+{
+ int i;
+
+ ndr->print(ndr, "%s: ARRAY(%d)", name, count);
+ ndr->depth++;
+ for (i=0;i<count;i++) {
+ char *idx=NULL;
+ asprintf(&idx, "[%d]", i);
+ if (idx) {
+ ndr_print_HYPER_T(ndr, idx, data[i]);
+ free(idx);
+ }
+ }
+ ndr->depth--;
+}
+
void ndr_print_array_uint32(struct ndr_print *ndr, const char *name,
const uint32_t *data, uint32_t count)
{