VirtualBox

source: vbox/trunk/src/VBox/Main/src-server/darwin/iokit.h@ 94088

Last change on this file since 94088 was 93115, checked in by vboxsync, 3 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 3.2 KB
Line 
1/* $Id: iokit.h 93115 2022-01-01 11:31:46Z vboxsync $ */
2/** @file
3 * Main - Darwin IOKit Routines.
4 */
5
6/*
7 * Copyright (C) 2006-2022 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 MAIN_INCLUDED_SRC_src_server_darwin_iokit_h
19#define MAIN_INCLUDED_SRC_src_server_darwin_iokit_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include <iprt/cdefs.h>
25#include <iprt/types.h>
26#include <iprt/cpp/ministring.h>
27#ifdef VBOX_WITH_USB
28# include <VBox/usb.h>
29#endif
30
31/**
32 * Darwin DVD descriptor as returned by DarwinGetDVDDrives().
33 */
34typedef struct DARWINDVD
35{
36 /** Pointer to the next DVD. */
37 struct DARWINDVD *pNext;
38 /** Variable length name / identifier. */
39 char szName[1];
40} DARWINDVD;
41/** Pointer to a Darwin DVD descriptor. */
42typedef DARWINDVD *PDARWINDVD;
43
44/** Darwin fixed drive (SSD, HDD, ++) descriptor as returned by
45 * DarwinGetFixedDrives(). */
46typedef struct DARWINFIXEDDRIVE
47{
48 /** Pointer to the next DVD. */
49 struct DARWINFIXEDDRIVE *pNext;
50 /** Pointer to the model name, NULL if none.
51 * This points after szName and needs not be freed separately. */
52 const char *pszModel;
53 /** Variable length name / identifier. */
54 char szName[1];
55} DARWINFIXEDDRIVE;
56/** Pointer to a Darwin fixed drive. */
57typedef DARWINFIXEDDRIVE *PDARWINFIXEDDRIVE;
58
59
60/**
61 * Darwin ethernet controller descriptor as returned by DarwinGetEthernetControllers().
62 */
63typedef struct DARWINETHERNIC
64{
65 /** Pointer to the next NIC. */
66 struct DARWINETHERNIC *pNext;
67 /** The BSD name. (like en0)*/
68 char szBSDName[16];
69 /** The fake unique identifier. */
70 RTUUID Uuid;
71 /** The MAC address. */
72 RTMAC Mac;
73 /** Whether it's wireless (true) or wired (false). */
74 bool fWireless;
75 /** Whether it is an AirPort device. */
76 bool fAirPort;
77 /** Whether it's built in or not. */
78 bool fBuiltin;
79 /** Whether it's a USB device or not. */
80 bool fUSB;
81 /** Whether it's the primary interface. */
82 bool fPrimaryIf;
83 /** A variable length descriptive name if possible. */
84 char szName[1];
85} DARWINETHERNIC;
86/** Pointer to a Darwin ethernet controller descriptor. */
87typedef DARWINETHERNIC *PDARWINETHERNIC;
88
89
90/** The run loop mode string used by iokit.cpp when it registers
91 * notifications events. */
92#define VBOX_IOKIT_MODE_STRING "VBoxIOKitMode"
93
94RT_C_DECLS_BEGIN
95#ifdef VBOX_WITH_USB
96void * DarwinSubscribeUSBNotifications(void);
97void DarwinUnsubscribeUSBNotifications(void *pvOpaque);
98PUSBDEVICE DarwinGetUSBDevices(void);
99void DarwinFreeUSBDeviceFromIOKit(PUSBDEVICE pCur);
100int DarwinReEnumerateUSBDevice(PCUSBDEVICE pCur);
101#endif /* VBOX_WITH_USB */
102PDARWINDVD DarwinGetDVDDrives(void);
103PDARWINFIXEDDRIVE DarwinGetFixedDrives(void);
104PDARWINETHERNIC DarwinGetEthernetControllers(void);
105RT_C_DECLS_END
106
107#endif /* !MAIN_INCLUDED_SRC_src_server_darwin_iokit_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette