1 | /* $Id: iokit.h 62485 2016-07-22 18:36:43Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * Main - Darwin IOKit Routines.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2016 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef ___darwin_iokit_h___
|
---|
19 | #define ___darwin_iokit_h___
|
---|
20 |
|
---|
21 | #include <iprt/cdefs.h>
|
---|
22 | #include <iprt/types.h>
|
---|
23 | #ifdef VBOX_WITH_USB
|
---|
24 | # include <VBox/usb.h>
|
---|
25 | #endif
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * Darwin DVD descriptor as returned by DarwinGetDVDDrives().
|
---|
29 | */
|
---|
30 | typedef struct DARWINDVD
|
---|
31 | {
|
---|
32 | /** Pointer to the next DVD. */
|
---|
33 | struct DARWINDVD *pNext;
|
---|
34 | /** Variable length name / identifier. */
|
---|
35 | char szName[1];
|
---|
36 | } DARWINDVD;
|
---|
37 | /** Pointer to a Darwin DVD descriptor. */
|
---|
38 | typedef DARWINDVD *PDARWINDVD;
|
---|
39 |
|
---|
40 |
|
---|
41 | /**
|
---|
42 | * Darwin ethernet controller descriptor as returned by DarwinGetEthernetControllers().
|
---|
43 | */
|
---|
44 | typedef struct DARWINETHERNIC
|
---|
45 | {
|
---|
46 | /** Pointer to the next NIC. */
|
---|
47 | struct DARWINETHERNIC *pNext;
|
---|
48 | /** The BSD name. (like en0)*/
|
---|
49 | char szBSDName[16];
|
---|
50 | /** The fake unique identifier. */
|
---|
51 | RTUUID Uuid;
|
---|
52 | /** The MAC address. */
|
---|
53 | RTMAC Mac;
|
---|
54 | /** Whether it's wireless (true) or wired (false). */
|
---|
55 | bool fWireless;
|
---|
56 | /** Whether it is an AirPort device. */
|
---|
57 | bool fAirPort;
|
---|
58 | /** Whether it's built in or not. */
|
---|
59 | bool fBuiltin;
|
---|
60 | /** Whether it's a USB device or not. */
|
---|
61 | bool fUSB;
|
---|
62 | /** Whether it's the primary interface. */
|
---|
63 | bool fPrimaryIf;
|
---|
64 | /** A variable length descriptive name if possible. */
|
---|
65 | char szName[1];
|
---|
66 | } DARWINETHERNIC;
|
---|
67 | /** Pointer to a Darwin ethernet controller descriptor. */
|
---|
68 | typedef DARWINETHERNIC *PDARWINETHERNIC;
|
---|
69 |
|
---|
70 |
|
---|
71 | /** The run loop mode string used by iokit.cpp when it registers
|
---|
72 | * notifications events. */
|
---|
73 | #define VBOX_IOKIT_MODE_STRING "VBoxIOKitMode"
|
---|
74 |
|
---|
75 | RT_C_DECLS_BEGIN
|
---|
76 | #ifdef VBOX_WITH_USB
|
---|
77 | void * DarwinSubscribeUSBNotifications(void);
|
---|
78 | void DarwinUnsubscribeUSBNotifications(void *pvOpaque);
|
---|
79 | PUSBDEVICE DarwinGetUSBDevices(void);
|
---|
80 | void DarwinFreeUSBDeviceFromIOKit(PUSBDEVICE pCur);
|
---|
81 | int DarwinReEnumerateUSBDevice(PCUSBDEVICE pCur);
|
---|
82 | #endif /* VBOX_WITH_USB */
|
---|
83 | PDARWINDVD DarwinGetDVDDrives(void);
|
---|
84 | PDARWINETHERNIC DarwinGetEthernetControllers(void);
|
---|
85 | RT_C_DECLS_END
|
---|
86 |
|
---|
87 | #endif
|
---|