+#define kIOClientPrivilegeForeground "foreground"
+
+/*! @enum
+ @abstract Constants to specify the maximum number of scalar arguments in the IOExternalMethodArguments structure. These constants are documentary since the scalarInputCount, scalarOutputCount fields reflect the actual number passed.
+ @constant kIOExternalMethodScalarInputCountMax The maximum number of scalars able to passed on input.
+ @constant kIOExternalMethodScalarOutputCountMax The maximum number of scalars able to passed on output.
+*/
+enum {
+ kIOExternalMethodScalarInputCountMax = 16,
+ kIOExternalMethodScalarOutputCountMax = 16,
+};
+
+
+struct IOExternalMethodArguments
+{
+ uint32_t version;
+
+ uint32_t selector;
+
+ mach_port_t asyncWakePort;
+ io_user_reference_t * asyncReference;
+ uint32_t asyncReferenceCount;
+
+ const uint64_t * scalarInput;
+ uint32_t scalarInputCount;
+
+ const void * structureInput;
+ uint32_t structureInputSize;
+
+ IOMemoryDescriptor * structureInputDescriptor;
+
+ uint64_t * scalarOutput;
+ uint32_t scalarOutputCount;
+
+ void * structureOutput;
+ uint32_t structureOutputSize;
+
+ IOMemoryDescriptor * structureOutputDescriptor;
+ uint32_t structureOutputDescriptorSize;
+
+ uint32_t __reservedA;
+
+ OSObject ** structureVariableOutputData;
+
+ uint32_t __reserved[30];
+};
+
+typedef IOReturn (*IOExternalMethodAction)(OSObject * target, void * reference,
+ IOExternalMethodArguments * arguments);
+struct IOExternalMethodDispatch
+{
+ IOExternalMethodAction function;
+ uint32_t checkScalarInputCount;
+ uint32_t checkStructureInputSize;
+ uint32_t checkScalarOutputCount;
+ uint32_t checkStructureOutputSize;
+};
+
+enum {
+#define IO_EXTERNAL_METHOD_ARGUMENTS_CURRENT_VERSION 2
+ kIOExternalMethodArgumentsCurrentVersion = IO_EXTERNAL_METHOD_ARGUMENTS_CURRENT_VERSION
+};
+