r5476: Move ORPC extensions to DCE/RPC into seperate file.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 20 Feb 2005 21:02:30 +0000 (21:02 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:10:49 +0000 (13:10 -0500)
(This used to be commit 75d8fc8338ea0345ed0181f5700640029e311599)

source4/build/pidl/header.pm
source4/librpc/config.mk
source4/librpc/idl/dcom.idl
source4/librpc/idl/orpc.idl [new file with mode: 0644]

index 803916a79c2234104aeb70a587c8decc6ddd525c..b192efb6992ba2a55169d228081999cbad99c965 100644 (file)
@@ -385,6 +385,11 @@ sub HeaderInterface($)
            }
     }
 
+       # Object interfaces use ORPC
+       if (util::has_property($interface, "object")) {
+               pidl "#include \"librpc/gen_ndr/ndr_orpc.h\"\n";
+       }
+
     if (defined $interface->{PROPERTIES}->{uuid}) {
            my $name = uc $interface->{NAME};
            pidl "#define DCERPC_$name\_UUID " . 
index 22d9d1de9809abbd87e1f1ccf9d10e710338a684..95d618227ac170d751faaf7453b8e42d0b9a5b31 100644 (file)
@@ -207,7 +207,13 @@ INIT_OBJ_FILES = librpc/ndr/ndr_dcom.o
 INIT_FUNCTION = dcerpc_dcom_init
 INIT_OBJ_FILES = librpc/gen_ndr/ndr_dcom.o
 NOPROTO = YES
-REQUIRED_SUBSYSTEMS = LIBNDR NDR_DCOM_MANUAL
+REQUIRED_SUBSYSTEMS = LIBNDR NDR_DCOM_MANUAL NDR_ORPC
+
+[SUBSYSTEM::NDR_ORPC]
+INIT_FUNCTION = dcerpc_orpc_init
+INIT_OBJ_FILES = librpc/gen_ndr/ndr_orpc.o
+NOPROTO = YES
+REQUIRES_SUBSYSTEMS = LIBNDR
 
 [SUBSYSTEM::NDR_OXIDRESOLVER]
 INIT_FUNCTION = dcerpc_oxidresolver_init
index a29d38dac1a08fffe6bf5b090c7899cdeedda5e2..099cb0d74df0551b9fb00bb958172ec90367241b 100644 (file)
        void UpdateResolverBindings();
 }
 
-[
-       pointer_default(unique)
-]
-interface ObjectRpcBaseTypes
-{
-       /* COM_MINOR_VERSION = 1 (NT4.0, SP1, SP2, DCOM95). */
-       /* - Initial Release */
-       /* - Must be used when talking to downlevel machines, including */
-       /* on Remote Activation calls. */
-       /* COM_MINOR_VERSION = 2 (NT4.0 SP3 and beyond). */
-       /* - Added ResolveOxid2 to IObjectExporter to retrieve the */
-       /* COM version number of the server. Passed to the NDR engine */
-       /* to fix fatal endian-ness flaw in the way OLEAUTOMATION marshals */
-       /* BSTRS. Previous way used trailing padding, which is not NDR */
-       /* compatible. See Bug# 69189. */
-       /* COM_MINOR_VERSION = 3 (NT4.0 SP4 and DCOM95 builds 1018 and beyond) */
-       /* - OLEAUT32 added two new types to the SAFEARRAY, but SAFEARRAY */
-       /* previously included the "default" keyword, which prevented */
-       /* downlevel NDR engines from correctly handling any extensions. */
-       /* Machines with version >=5.3 don't use "default" and will */
-       /* gracefully handle future extensions to SAFEARRAY. */
-       /* old constants (for convenience) */
-
-       /* current version */
-       const uint16 COM_MAJOR_VERSION = 5;
-       const uint16 COM_MINOR_VERSION = 1;
-
-       /* Body Extensions */
-       const string dcom_ext_debugging = "f1f19680-4d2a-11ce-a66a-0020af6e72f4";
-       const string dcom_ext_extended_error = "f1f19681-4d2a-11ce-a66a-0020af6e72f4";
-
-       /* Component Object Model version number */
-
-       typedef [public] struct 
-       {
-               uint16 MajorVersion; /* Major version number */
-               uint16 MinorVersion; /* Minor version number */
-       } COMVERSION;
-
-       /* enumeration of additional information present in the call packet. */
-       typedef enum {
-               ORPCF_NULL =                    0x00, /* no additional info in packet */
-               ORPCF_LOCAL =                   0x01, /* call is local to this machine */
-               ORPCF_RESERVED1 =               0x02, /* reserved for local use */
-               ORPCF_RESERVED2 =               0x04, /* reserved for local use */
-               ORPCF_RESERVED3 =               0x08, /* reserved for local use */
-               ORPCF_RESERVED4 =           0x10  /* reserved for local use */
-       } ORPC_FLAGS;
-
-       /* Extension to implicit parameters. */
-       typedef [public] struct 
-       {       
-               GUID id; /* Extension identifier. */
-               uint32 size; /* Extension size. */
-               /*FIXME[size_is((size+7)&~7)] uint8 data[]; Extension data. */
-               [size_is(size)] uint8 data[];
-       }       ORPC_EXTENT;
-
-
-       /* Array of extensions. */
-       typedef struct 
-       {
-               uint32 size; /* Num extents. */
-               uint32 reserved; /* Must be zero. */
-               /*FIXME[size_is((size+1)&~1,), unique] ORPC_EXTENT **extent; extents */
-               [size_is(size)] ORPC_EXTENT extent[];
-       } ORPC_EXTENT_ARRAY;
-
-
-       /* implicit 'this' pointer which is the first [in] parameter on */
-       /* every ORPC call. */
-       typedef [public] struct 
-       {
-               COMVERSION version; /* COM version number */
-               uint32 flags; /* ORPCF flags for presence of other data */
-               uint32 reserved1; /* set to zero */
-               GUID cid; /* causality id of caller */
-               /* Extensions. */
-               [unique] ORPC_EXTENT_ARRAY *extensions;
-       }       ORPCTHIS;
-
-
-       /* implicit 'that' pointer which is the first [out] parameter on */
-       /* every ORPC call. */
-       typedef [public] struct 
-       {
-               uint32 flags; /* ORPCF flags for presence of other data */
-               /* Extensions. */
-               [unique] ORPC_EXTENT_ARRAY *extensions;
-       }       ORPCTHAT;
-
-
-       /* DUALSTRINGARRAYS are the return type for arrays of network addresses, */
-       /* arrays of endpoints and arrays of both used in many ORPC interfaces */
-       typedef [public] struct 
-       {
-               uint16 wTowerId; /* Cannot be zero. */
-               nstring NetworkAddr; 
-       }       STRINGBINDING;
-
-
-       const uint16 COM_C_AUTHZ_NONE = 0xffff;
-       typedef [public] struct 
-       {
-               uint16 wAuthnSvc; /* Cannot be zero. */
-               nstring PrincName; 
-       }       SECURITYBINDING;
-
-       /* signature value for OBJREF (object reference, actually the */
-       /* marshaled form of a COM interface). 
-        * MEOW apparently stands for "Microsoft Extended Object Wireformat"
-        */
-       const uint32 OBJREF_SIGNATURE = 0x574f454d; /* 'MEOW' */
-
-       /* flag values for OBJREF */
-       typedef enum {
-               OBJREF_NULL = 0x0, /* NULL pointer */
-               OBJREF_STANDARD = 0x1, /* standard marshaled objref */
-               OBJREF_HANDLER = 0x2, /* handler marshaled objref */
-               OBJREF_CUSTOM = 0x4 /* custom marshaled objref */
-       } OBJREF_FLAGS;
-
-       /* Flag values for a STDOBJREF (standard part of an OBJREF). */
-       /* SORF_OXRES1 - SORF_OXRES8 are reserved for the object exporters */
-       /* use only, object importers must ignore them and must not enforce MBZ. */
-       typedef enum {
-               SORF_NULL   = 0x0000, /* convenient for initializing SORF */
-               SORF_OXRES1 = 0x0001, /* reserved for exporter */
-               SORF_OXRES2 = 0x0020, /* reserved for exporter */
-               SORF_OXRES3 = 0x0040, /* reserved for exporter */
-               SORF_OXRES4 = 0x0080, /* reserved for exporter */
-               SORF_OXRES5 = 0x0100, /* reserved for exporter */
-               SORF_OXRES6 = 0x0200, /* reserved for exporter */
-               SORF_OXRES7 = 0x0400, /* reserved for exporter */
-               SORF_OXRES8 = 0x0800, /* reserved for exporter */
-               SORF_NOPING = 0x1000  /* Pinging is not required  */
-       } STDOBJREF_FLAGS;
-
-       /* standard object reference */
-       typedef [public] struct 
-       {
-               uint32 flags; /* STDOBJREF flags (see above) */
-               uint32 cPublicRefs; /* count of references passed */
-               hyper oxid; /* oxid of server with this oid */
-               hyper oid; /* oid of object with this ipid */
-               GUID ipid; /* ipid of interface pointer to this object */
-       }       STDOBJREF;
-
-       typedef struct
-       {
-               STDOBJREF std; /* standard objref */
-               STRINGARRAY saResAddr; /* resolver address */
-       } u_standard;
-
-       typedef struct
-       {
-               STDOBJREF std; /* standard objref */
-               GUID clsid; /* Clsid of handler code */
-               STRINGARRAY saResAddr; /* resolver address */
-       } u_handler;
-
-       typedef struct
-       {
-               GUID clsid; /* Clsid of unmarshaling code */
-               uint32 cbExtension; /* size of extension data */
-               uint32 size; /* size of data that follows */
-               uint8 pData[size]; /* extension + class specific data */
-       } u_custom;
-
-       typedef struct
-       {
-       } u_null;
-
-       typedef [nodiscriminant] union 
-       {
-               [case(OBJREF_NULL)] u_null u_null;
-               [case(OBJREF_STANDARD)] u_standard u_standard;
-               [case(OBJREF_HANDLER)] u_handler u_handler;
-               [case(OBJREF_CUSTOM)] u_custom u_custom;
-       } OBJREF_Types;
-
-       /* OBJREF is the format of a marshaled interface pointer. */
-       typedef [public,flag(NDR_LITTLE_ENDIAN)] struct 
-       {
-               uint32 signature;
-               uint32 flags; /* OBJREF flags (see above) */
-               GUID iid; /* interface identifier */
-               [switch_is(flags), switch_type(uint32)] OBJREF_Types u_objref;
-       } OBJREF;
-
-       /* wire representation of a marshalled interface pointer */
-       typedef [public] struct 
-       {
-               uint32 size;
-               [subcontext(4)] OBJREF obj;
-       } MInterfacePointer;
-}
-
-
 [
        object,
        uuid("00000000-0000-0000-C000-000000000046"),
diff --git a/source4/librpc/idl/orpc.idl b/source4/librpc/idl/orpc.idl
new file mode 100644 (file)
index 0000000..8b94059
--- /dev/null
@@ -0,0 +1,204 @@
+#include "idl_types.h"
+
+/**
+  DCOM interfaces
+  http://www.grimes.demon.co.uk/DCOM/DCOMSpec.htm
+ */
+
+[
+       pointer_default(unique)
+]
+interface ObjectRpcBaseTypes
+{
+       /* COM_MINOR_VERSION = 1 (NT4.0, SP1, SP2, DCOM95). */
+       /* - Initial Release */
+       /* - Must be used when talking to downlevel machines, including */
+       /* on Remote Activation calls. */
+       /* COM_MINOR_VERSION = 2 (NT4.0 SP3 and beyond). */
+       /* - Added ResolveOxid2 to IObjectExporter to retrieve the */
+       /* COM version number of the server. Passed to the NDR engine */
+       /* to fix fatal endian-ness flaw in the way OLEAUTOMATION marshals */
+       /* BSTRS. Previous way used trailing padding, which is not NDR */
+       /* compatible. See Bug# 69189. */
+       /* COM_MINOR_VERSION = 3 (NT4.0 SP4 and DCOM95 builds 1018 and beyond) */
+       /* - OLEAUT32 added two new types to the SAFEARRAY, but SAFEARRAY */
+       /* previously included the "default" keyword, which prevented */
+       /* downlevel NDR engines from correctly handling any extensions. */
+       /* Machines with version >=5.3 don't use "default" and will */
+       /* gracefully handle future extensions to SAFEARRAY. */
+       /* old constants (for convenience) */
+
+       /* current version */
+       const uint16 COM_MAJOR_VERSION = 5;
+       const uint16 COM_MINOR_VERSION = 1;
+
+       /* Body Extensions */
+       const string dcom_ext_debugging = "f1f19680-4d2a-11ce-a66a-0020af6e72f4";
+       const string dcom_ext_extended_error = "f1f19681-4d2a-11ce-a66a-0020af6e72f4";
+
+       /* Component Object Model version number */
+
+       typedef [public] struct 
+       {
+               uint16 MajorVersion; /* Major version number */
+               uint16 MinorVersion; /* Minor version number */
+       } COMVERSION;
+
+       /* enumeration of additional information present in the call packet. */
+       typedef enum {
+               ORPCF_NULL =                    0x00, /* no additional info in packet */
+               ORPCF_LOCAL =                   0x01, /* call is local to this machine */
+               ORPCF_RESERVED1 =               0x02, /* reserved for local use */
+               ORPCF_RESERVED2 =               0x04, /* reserved for local use */
+               ORPCF_RESERVED3 =               0x08, /* reserved for local use */
+               ORPCF_RESERVED4 =           0x10  /* reserved for local use */
+       } ORPC_FLAGS;
+
+       /* Extension to implicit parameters. */
+       typedef [public] struct 
+       {       
+               GUID id; /* Extension identifier. */
+               uint32 size; /* Extension size. */
+               /*FIXME[size_is((size+7)&~7)] uint8 data[]; Extension data. */
+               [size_is(size)] uint8 data[];
+       }       ORPC_EXTENT;
+
+
+       /* Array of extensions. */
+       typedef struct 
+       {
+               uint32 size; /* Num extents. */
+               uint32 reserved; /* Must be zero. */
+               /*FIXME[size_is((size+1)&~1,), unique] ORPC_EXTENT **extent; extents */
+               [size_is(size)] ORPC_EXTENT extent[];
+       } ORPC_EXTENT_ARRAY;
+
+
+       /* implicit 'this' pointer which is the first [in] parameter on */
+       /* every ORPC call. */
+       typedef [public] struct 
+       {
+               COMVERSION version; /* COM version number */
+               uint32 flags; /* ORPCF flags for presence of other data */
+               uint32 reserved1; /* set to zero */
+               GUID cid; /* causality id of caller */
+               /* Extensions. */
+               [unique] ORPC_EXTENT_ARRAY *extensions;
+       }       ORPCTHIS;
+
+
+       /* implicit 'that' pointer which is the first [out] parameter on */
+       /* every ORPC call. */
+       typedef [public] struct 
+       {
+               uint32 flags; /* ORPCF flags for presence of other data */
+               /* Extensions. */
+               [unique] ORPC_EXTENT_ARRAY *extensions;
+       }       ORPCTHAT;
+
+
+       /* DUALSTRINGARRAYS are the return type for arrays of network addresses, */
+       /* arrays of endpoints and arrays of both used in many ORPC interfaces */
+       typedef [public] struct 
+       {
+               uint16 wTowerId; /* Cannot be zero. */
+               nstring NetworkAddr; 
+       }       STRINGBINDING;
+
+
+       const uint16 COM_C_AUTHZ_NONE = 0xffff;
+       typedef [public] struct 
+       {
+               uint16 wAuthnSvc; /* Cannot be zero. */
+               nstring PrincName; 
+       }       SECURITYBINDING;
+
+       /* signature value for OBJREF (object reference, actually the */
+       /* marshaled form of a COM interface). 
+        * MEOW apparently stands for "Microsoft Extended Object Wireformat"
+        */
+       const uint32 OBJREF_SIGNATURE = 0x574f454d; /* 'MEOW' */
+
+       /* flag values for OBJREF */
+       typedef enum {
+               OBJREF_NULL = 0x0, /* NULL pointer */
+               OBJREF_STANDARD = 0x1, /* standard marshaled objref */
+               OBJREF_HANDLER = 0x2, /* handler marshaled objref */
+               OBJREF_CUSTOM = 0x4 /* custom marshaled objref */
+       } OBJREF_FLAGS;
+
+       /* Flag values for a STDOBJREF (standard part of an OBJREF). */
+       /* SORF_OXRES1 - SORF_OXRES8 are reserved for the object exporters */
+       /* use only, object importers must ignore them and must not enforce MBZ. */
+       typedef enum {
+               SORF_NULL   = 0x0000, /* convenient for initializing SORF */
+               SORF_OXRES1 = 0x0001, /* reserved for exporter */
+               SORF_OXRES2 = 0x0020, /* reserved for exporter */
+               SORF_OXRES3 = 0x0040, /* reserved for exporter */
+               SORF_OXRES4 = 0x0080, /* reserved for exporter */
+               SORF_OXRES5 = 0x0100, /* reserved for exporter */
+               SORF_OXRES6 = 0x0200, /* reserved for exporter */
+               SORF_OXRES7 = 0x0400, /* reserved for exporter */
+               SORF_OXRES8 = 0x0800, /* reserved for exporter */
+               SORF_NOPING = 0x1000  /* Pinging is not required  */
+       } STDOBJREF_FLAGS;
+
+       /* standard object reference */
+       typedef [public] struct 
+       {
+               uint32 flags; /* STDOBJREF flags (see above) */
+               uint32 cPublicRefs; /* count of references passed */
+               hyper oxid; /* oxid of server with this oid */
+               hyper oid; /* oid of object with this ipid */
+               GUID ipid; /* ipid of interface pointer to this object */
+       }       STDOBJREF;
+
+       typedef struct
+       {
+               STDOBJREF std; /* standard objref */
+               STRINGARRAY saResAddr; /* resolver address */
+       } u_standard;
+
+       typedef struct
+       {
+               STDOBJREF std; /* standard objref */
+               GUID clsid; /* Clsid of handler code */
+               STRINGARRAY saResAddr; /* resolver address */
+       } u_handler;
+
+       typedef struct
+       {
+               GUID clsid; /* Clsid of unmarshaling code */
+               uint32 cbExtension; /* size of extension data */
+               uint32 size; /* size of data that follows */
+               uint8 pData[size]; /* extension + class specific data */
+       } u_custom;
+
+       typedef struct
+       {
+       } u_null;
+
+       typedef [nodiscriminant] union 
+       {
+               [case(OBJREF_NULL)] u_null u_null;
+               [case(OBJREF_STANDARD)] u_standard u_standard;
+               [case(OBJREF_HANDLER)] u_handler u_handler;
+               [case(OBJREF_CUSTOM)] u_custom u_custom;
+       } OBJREF_Types;
+
+       /* OBJREF is the format of a marshaled interface pointer. */
+       typedef [public,flag(NDR_LITTLE_ENDIAN)] struct 
+       {
+               uint32 signature;
+               uint32 flags; /* OBJREF flags (see above) */
+               GUID iid; /* interface identifier */
+               [switch_is(flags), switch_type(uint32)] OBJREF_Types u_objref;
+       } OBJREF;
+
+       /* wire representation of a marshalled interface pointer */
+       typedef [public] struct 
+       {
+               uint32 size;
+               [subcontext(4)] OBJREF obj;
+       } MInterfacePointer;
+}