+PROJECT=$(shell basename `pwd -P` | sed -e 's/\(.*\)-[0-9][0-9.]*$$/\1/')
+VERSION=$(shell basename `pwd -P` | sed -e 's/.*-\([0-9][0-9.]*$$\)/\1/')
+
#----------------------------------------------------------------------
#
# Build for [current] release
#
#----------------------------------------------------------------------
-PROJECT=$(shell basename `pwd -P`)
-
SNOW_CFLAGS += -D__MAC_10_7=1060
SNOW_CFLAGS += -D__AVAILABILITY_INTERNAL__MAC_10_7=__AVAILABILITY_INTERNAL__MAC_10_6
SNOW_CFLAGS += -D__AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_7=__AVAILABILITY_INTERNAL__MAC_10_5
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.11.2</string>
+ <string>1.11.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.11.2</string>
+ <string>1.11.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
/*
* Modification History
*
+ * May 20, 2006 Joe Liu <joe.liu@apple.com>
+ * Allan Nathanson <ajn@apple.com>
+ * - register interface by entryID (and not path)
+ *
* November 6, 2006 Allan Nathanson <ajn@apple.com>
* Dan Markarian <markarian@apple.com>
* Dieter Siegmund <dieter@apple.com>
#include <IOKit/IOMessage.h>
#include <IOKit/network/IONetworkController.h>
#include <IOKit/network/IONetworkInterface.h>
+#include <IOKit/network/IONetworkStack.h>
#include <IOKit/usb/USB.h>
+#ifdef kIONetworkStackUserCommandKey
+#define USE_REGISTRY_ENTRY_ID
+#endif
+
+#ifndef USE_REGISTRY_ENTRY_ID
// from <IOKit/network/IONetworkStack.h>
-#define kIONetworkStackUserCommand "IONetworkStackUserCommand"
+#define kIONetworkStackUserCommandKey "IONetworkStackUserCommand"
enum {
kRegisterInterfaceWithFixedUnit = 0,
kRegisterInterface,
kRegisterAllInterfaces
};
+#endif // !USE_REGISTRY_ENTRY_ID
#define kSCNetworkInterfaceInfo "SCNetworkInterfaceInfo"
#define kSCNetworkInterfaceType "SCNetworkInterfaceType"
old_model = SCPreferencesGetValue(prefs, MODEL);
new_model = hw_model();
- if ((old_model != NULL) &&
- (new_model != NULL) &&
- !CFEqual(old_model, new_model) &&
- (cur_list != NULL)) {
- CFStringRef history;
- CFStringRef issue;
-
- // if interface list was created on other hardware
- history = CFStringCreateWithFormat(NULL, NULL,
- CFSTR("%@:%@"),
- INTERFACES,
- old_model);
- SCPreferencesSetValue(prefs, history, cur_list);
- CFRelease(history);
+ if ((new_model != NULL) && !_SC_CFEqual(old_model, new_model)) {
+ // if new hardware
+ if ((old_model != NULL) && (cur_list != NULL)) {
+ CFStringRef history;
+ CFStringRef issue;
- SCLog(TRUE, LOG_ERR,
- CFSTR(MY_PLUGIN_NAME ": Hardware model changed\n"
- MY_PLUGIN_NAME ": created on \"%@\"\n"
- MY_PLUGIN_NAME ": now on \"%@\""),
- old_model,
- new_model);
+ // if interface list was created on other hardware
+ history = CFStringCreateWithFormat(NULL, NULL,
+ CFSTR("%@:%@"),
+ INTERFACES,
+ old_model);
+ SCPreferencesSetValue(prefs, history, cur_list);
+ CFRelease(history);
- issue = CFStringCreateWithFormat(NULL, NULL,
- CFSTR("%@ --> %@"),
- old_model,
- new_model);
- reportIssue("Hardware model changed", issue);
- CFRelease(issue);
- }
+ SCLog(TRUE, LOG_ERR,
+ CFSTR(MY_PLUGIN_NAME ": Hardware model changed\n"
+ MY_PLUGIN_NAME ": created on \"%@\"\n"
+ MY_PLUGIN_NAME ": now on \"%@\""),
+ old_model,
+ new_model);
+
+ issue = CFStringCreateWithFormat(NULL, NULL,
+ CFSTR("%@ --> %@"),
+ old_model,
+ new_model);
+ reportIssue("Hardware model changed", issue);
+ CFRelease(issue);
+ }
- if ((new_model != NULL) &&
- !SCPreferencesSetValue(prefs, MODEL, new_model)) {
- SCLog(TRUE, LOG_ERR,
- CFSTR(MY_PLUGIN_NAME ": SCPreferencesSetValue failed, %s"),
- SCErrorString(SCError()));
- goto done;
+ if (!SCPreferencesSetValue(prefs, MODEL, new_model)) {
+ SCLog(TRUE, LOG_ERR,
+ CFSTR(MY_PLUGIN_NAME ": SCPreferencesSetValue failed, %s"),
+ SCErrorString(SCError()));
+ goto done;
+ }
}
if (!SCPreferencesSetValue(prefs, INTERFACES, if_list)) {
return (ret_unit);
}
+#ifdef USE_REGISTRY_ENTRY_ID
+static kern_return_t
+registerInterfaceWithIORegistryEntryID(io_connect_t connect,
+ uint64_t entryID,
+ CFNumberRef unit,
+ const int command)
+{
+ CFDataRef data;
+ CFMutableDictionaryRef dict;
+ kern_return_t kr;
+ CFNumberRef num;
+
+ dict = CFDictionaryCreateMutable(NULL, 0,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+ num = CFNumberCreate(NULL, kCFNumberIntType, &command);
+ CFDictionarySetValue(dict, CFSTR(kIONetworkStackUserCommandKey), num);
+ CFRelease(num);
+ data = CFDataCreate(NULL, (void *) &entryID, sizeof(entryID));
+ CFDictionarySetValue(dict, CFSTR(kIORegistryEntryIDKey), data);
+ CFRelease(data);
+ CFDictionarySetValue(dict, CFSTR(kIOInterfaceUnit), unit);
+ kr = IOConnectSetCFProperties(connect, dict);
+ CFRelease(dict);
+ return kr;
+}
+
+static SCNetworkInterfaceRef
+lookupIORegistryEntryID(uint64_t entryID)
+{
+ io_registry_entry_t entry = MACH_PORT_NULL;
+ SCNetworkInterfaceRef interface = NULL;
+ io_iterator_t iterator = MACH_PORT_NULL;
+ kern_return_t kr;
+ mach_port_t masterPort = MACH_PORT_NULL;
+
+ kr = IOMasterPort(bootstrap_port, &masterPort);
+ if (kr != KERN_SUCCESS) {
+ SCLog(TRUE, LOG_ERR,
+ CFSTR(MY_PLUGIN_NAME ": IOMasterPort returned 0x%x"),
+ kr);
+ goto error;
+ }
+
+ kr = IOServiceGetMatchingServices(masterPort,
+ IORegistryEntryIDMatching(entryID),
+ &iterator);
+ if ((kr != KERN_SUCCESS) || (iterator == MACH_PORT_NULL)) {
+ SCLog(TRUE, LOG_ERR,
+ CFSTR(MY_PLUGIN_NAME ": IOServiceGetMatchingServices(0x%llx) returned 0x%x/%d"),
+ entryID,
+ kr,
+ iterator);
+ goto error;
+ }
+
+ entry = IOIteratorNext(iterator);
+ if (entry == MACH_PORT_NULL) {
+ SCLog(TRUE, LOG_ERR,
+ CFSTR(MY_PLUGIN_NAME ": IORegistryEntryIDMatching(0x%llx) failed"),
+ entryID);
+ goto error;
+ }
+
+ interface = _SCNetworkInterfaceCreateWithIONetworkInterfaceObject(entry);
+
+ error:
+ if (masterPort != MACH_PORT_NULL) {
+ mach_port_deallocate(mach_task_self(), masterPort);
+ }
+ if (entry != MACH_PORT_NULL) {
+ IOObjectRelease(entry);
+ }
+ if (iterator != MACH_PORT_NULL) {
+ IOObjectRelease(iterator);
+ }
+ return (interface);
+
+}
+#else // USE_REGISTRY_ENTRY_ID
/*
* Function: registerInterface
* Purpose:
* data link layer (BSD), using the specified unit number.
*/
static kern_return_t
-registerInterface(io_connect_t connect,
- CFStringRef path,
- CFNumberRef unit,
- const int command)
+registerInterfaceWithIOServicePath(io_connect_t connect,
+ CFStringRef path,
+ CFNumberRef unit,
+ const int command)
{
CFMutableDictionaryRef dict;
kern_return_t kr;
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
num = CFNumberCreate(NULL, kCFNumberIntType, &command);
- CFDictionarySetValue(dict, CFSTR(kIONetworkStackUserCommand), num);
+ CFDictionarySetValue(dict, CFSTR(kIONetworkStackUserCommandKey), num);
CFRelease(num);
CFDictionarySetValue(dict, CFSTR(kIOPathMatchKey), path);
CFDictionarySetValue(dict, CFSTR(kIOInterfaceUnit), unit);
return (interface);
}
+#endif // USE_REGISTRY_ENTRY_ID
static void
displayInterface(SCNetworkInterfaceRef interface)
CFIndex n = CFArrayGetCount(if_list);
for (i = 0; i < n; i++) {
+ uint64_t entryID;
SCNetworkInterfaceRef interface;
Boolean ok = TRUE;
CFStringRef path;
+ CFStringRef str;
CFNumberRef type;
CFNumberRef unit;
CFIndex where;
path = _SCNetworkInterfaceGetIOPath(interface);
type = _SCNetworkInterfaceGetIOInterfaceType(interface);
unit = _SCNetworkInterfaceGetIOInterfaceUnit(interface);
+ entryID = _SCNetworkInterfaceGetIORegistryEntryID(interface);
if (unit != NULL) {
if (S_debug) {
CFDictionaryRef dbdict;
boolean_t is_builtin;
kern_return_t kr;
+ int retries = 0;
dbdict = lookupInterfaceByAddress(S_dblist, interface, NULL);
if (dbdict != NULL) {
is_builtin ? "built-in" : "next available");
}
- kr = registerInterface(S_connect,
- path,
- unit,
- (dbdict == NULL) ? kRegisterInterface : kRegisterInterfaceWithFixedUnit);
+ retry :
+
+#ifdef USE_REGISTRY_ENTRY_ID
+ kr = registerInterfaceWithIORegistryEntryID(S_connect,
+ entryID,
+ unit,
+ (dbdict == NULL) ? kIONetworkStackRegisterInterfaceWithLowestUnit
+ : kIONetworkStackRegisterInterfaceWithUnit);
+#else // USE_REGISTRY_ENTRY_ID
+ kr = registerInterfaceWithIOServicePath(S_connect,
+ path,
+ unit,
+ (dbdict == NULL) ? kRegisterInterface
+ : kRegisterInterfaceWithFixedUnit);
+#endif // USE_REGISTRY_ENTRY_ID
if (kr != KERN_SUCCESS) {
- CFStringRef issue;
const char *signature;
signature = (dbdict == NULL) ? "failed to name new interface"
SCLog(TRUE, LOG_ERR,
CFSTR(MY_PLUGIN_NAME ": %s, kr=0x%x\n"
MY_PLUGIN_NAME ": path = %@\n"
+ MY_PLUGIN_NAME ": id = 0x%llx\n"
MY_PLUGIN_NAME ": unit = %@"),
signature,
kr,
path,
+ entryID,
unit);
if (S_debug) {
}
// report issue w/MessageTracer
- issue = CFStringCreateWithFormat(NULL, NULL,
- CFSTR("kr=0x%x, path=%@, unit=%@"),
- kr,
- path,
- unit);
- reportIssue(signature, issue);
- CFRelease(issue);
+ str = CFStringCreateWithFormat(NULL, NULL,
+ CFSTR("kr=0x%x, path=%@, unit=%@"),
+ kr,
+ path,
+ unit);
+ reportIssue(signature, str);
+ CFRelease(str);
+
+ if ((dbdict != NULL) && (retries++ < 5)) {
+ usleep(50 * 1000); // sleep 50ms between attempts
+ goto retry;
+ }
ok = FALSE; // ... and don't update the database
} else {
SCNetworkInterfaceRef new_interface;
+ if (retries > 0) {
+ SCLog(TRUE, LOG_ERR,
+ CFSTR(MY_PLUGIN_NAME ": %s interface named after %d %s\n"
+ MY_PLUGIN_NAME ": path = %@\n"
+ MY_PLUGIN_NAME ": unit = %@"),
+ (dbdict == NULL) ? "New" : "Known",
+ retries,
+ (retries == 1) ? "try" : "tries",
+ path,
+ unit);
+
+#ifdef SHOW_NAMING_FAILURE
+ str = CFStringCreateWithFormat(NULL,
+ NULL,
+ CFSTR("\"%s\" interface named after %d %s, unit = %@"),
+ (dbdict == NULL) ? "New" : "Known",
+ retries,
+ (retries == 1) ? "try" : "tries",
+ unit);
+ CFUserNotificationDisplayNotice(0,
+ kCFUserNotificationStopAlertLevel,
+ NULL,
+ NULL,
+ NULL,
+ str,
+ CFSTR("Please report repeated failures."),
+ NULL);
+ CFRelease(str);
+#endif // SHOW_NAMING_FAILURE
+ }
+
+#ifdef USE_REGISTRY_ENTRY_ID
+ new_interface = lookupIORegistryEntryID(entryID);
+#else // USE_REGISTRY_ENTRY_ID
new_interface = lookupIOKitPath(path);
+#endif // USE_REGISTRY_ENTRY_ID
if (new_interface != NULL) {
CFNumberRef new_unit;
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.11.2</string>
+ <string>1.11.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.11.2</string>
+ <string>1.11.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.11.2</string>
+ <string>1.11.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.11.2</string>
+ <string>1.11.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.11.2</string>
+ <string>1.11.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.11.2</string>
+ <string>1.11.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
- <string>1.11.2</string>
+ <string>1.11.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>1.11.2</string>
+ <string>1.11.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>1.11.2</string>
+ <string>1.11.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
SCNetworkInterfacePrivateRef interfacePrivate;
Boolean ok;
- interfacePrivate = __SCNetworkInterfaceCreatePrivate(NULL, NULL, NULL, NULL, NULL);
+ interfacePrivate = __SCNetworkInterfaceCreatePrivate(NULL, NULL, NULL, NULL);
if (interfacePrivate == NULL) {
return FALSE;
}
SCNetworkInterfacePrivateRef interfacePrivate;
Boolean ok;
- interfacePrivate = __SCNetworkInterfaceCreatePrivate(NULL, NULL, NULL, NULL, NULL);
+ interfacePrivate = __SCNetworkInterfaceCreatePrivate(NULL, NULL, NULL, NULL);
if (interfacePrivate == NULL) {
return FALSE;
}
Boolean hidden;
CFStringRef location;
CFStringRef path;
+ uint64_t entryID;
CFMutableDictionaryRef overrides;
Boolean modemIsV92;
CFNumberRef type;
__SCNetworkInterfaceCreatePrivate (CFAllocatorRef allocator,
SCNetworkInterfaceRef interface,
SCPreferencesRef prefs,
- CFStringRef serviceID,
- io_string_t path);
+ CFStringRef serviceID);
SCNetworkInterfacePrivateRef
_SCBondInterfaceCreatePrivate (CFAllocatorRef allocator,
CFStringRef
_SCNetworkInterfaceGetIOPath (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0);
+/*!
+ @function _SCNetworkInterfaceGetIORegistryEntryID
+ @discussion Returns the IORegistry entry ID for the interface.
+ @param interface The network interface.
+ @result The IORegistry entry ID associated with the interface;
+ Zero if no entry ID is available.
+ */
+uint64_t
+_SCNetworkInterfaceGetIORegistryEntryID (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_7/*FIXME*/,__IPHONE_5_0);
+
/*!
@function _SCNetworkInterfaceIsBluetoothPAN
@discussion Identifies if a network interface is a Bluetooth PAN (GN) device.
FALSE, // hidden
NULL, // location
NULL, // path
+ 0, // entryID
NULL, // overrides
FALSE, // modemIsV92
NULL, // type
FALSE, // hidden
NULL, // location
NULL, // path
+ 0, // entryID
NULL, // overrides
FALSE, // modemIsV92
NULL, // type
if (interfacePrivate->path != NULL) {
CFStringAppendFormat(result, NULL, CFSTR(", path = %@"), interfacePrivate->path);
}
+ if (interfacePrivate->entryID != 0) {
+ CFStringAppendFormat(result, NULL, CFSTR(", entryID = 0x%llx"), interfacePrivate->entryID);
+ }
if (interfacePrivate->type != NULL) {
CFStringAppendFormat(result, NULL, CFSTR(", type = %@"), interfacePrivate->type);
}
__SCNetworkInterfaceCreatePrivate(CFAllocatorRef allocator,
SCNetworkInterfaceRef interface,
SCPreferencesRef prefs,
- CFStringRef serviceID,
- io_string_t path)
+ CFStringRef serviceID)
{
SCNetworkInterfacePrivateRef interfacePrivate;
uint32_t size;
interfacePrivate->addressString = NULL;
interfacePrivate->builtin = FALSE;
interfacePrivate->configurationAction = NULL;
- interfacePrivate->path = (path != NULL) ? CFStringCreateWithCString(NULL, path, kCFStringEncodingUTF8)
- : NULL;
+ interfacePrivate->hidden = FALSE;
interfacePrivate->location = NULL;
+ interfacePrivate->path = NULL;
+ interfacePrivate->entryID = 0;
interfacePrivate->overrides = NULL;
interfacePrivate->modemIsV92 = FALSE;
interfacePrivate->type = NULL;
{
SCNetworkInterfacePrivateRef interfacePrivate;
- interfacePrivate = __SCNetworkInterfaceCreatePrivate(allocator, NULL, NULL, NULL, NULL);
+ interfacePrivate = __SCNetworkInterfaceCreatePrivate(allocator, NULL, NULL, NULL);
if (interfacePrivate == NULL) {
return NULL;
}
{
SCNetworkInterfacePrivateRef interfacePrivate;
- interfacePrivate = __SCNetworkInterfaceCreatePrivate(allocator, NULL, NULL, NULL, NULL);
+ interfacePrivate = __SCNetworkInterfaceCreatePrivate(allocator, NULL, NULL, NULL);
if (interfacePrivate == NULL) {
return NULL;
}
{
SCNetworkInterfacePrivateRef interfacePrivate;
- interfacePrivate = __SCNetworkInterfaceCreatePrivate(allocator, NULL, NULL, NULL, NULL);
+ interfacePrivate = __SCNetworkInterfaceCreatePrivate(allocator, NULL, NULL, NULL);
if (interfacePrivate == NULL) {
return NULL;
}
kern_return_t kr;
io_string_t path;
CFTypeRef val;
+ uint64_t entryID = 0;
kr = IORegistryEntryGetPath(interface, kIOServicePlane, path);
if (kr != kIOReturnSuccess) {
goto done;
}
- interfacePrivate = __SCNetworkInterfaceCreatePrivate(NULL, NULL, NULL, NULL, path);
+ /* get the registry entry ID */
+ kr = IORegistryEntryGetRegistryEntryID(interface, &entryID);
+ if (kr != KERN_SUCCESS) {
+ SCLog(TRUE, LOG_DEBUG, CFSTR("createInterface IORegistryEntryGetRegistryEntryID() failed, kr = 0x%x"), kr);
+ goto done;
+ }
+
+ interfacePrivate = __SCNetworkInterfaceCreatePrivate(NULL, NULL, NULL, NULL);
+ interfacePrivate->path = (path != NULL) ? CFStringCreateWithCString(NULL, path, kCFStringEncodingUTF8) : NULL;
+ interfacePrivate->entryID = entryID;
// configuration [PPP, Modem, DNS, IPv4, IPv6, Proxies, SMB] template overrides
val = IORegistryEntrySearchCFProperty(interface,
/*
* if device not present on this system
*/
- interfacePrivate = __SCNetworkInterfaceCreatePrivate(NULL, NULL, NULL, NULL, NULL);
+ interfacePrivate = __SCNetworkInterfaceCreatePrivate(NULL, NULL, NULL, NULL);
interfacePrivate->entity_type = ifType;
interfacePrivate->entity_subtype = ifSubType;
interfacePrivate->entity_device = (ifDevice != NULL) ? CFStringCreateCopy(NULL, ifDevice) : NULL;
parentPrivate = __SCNetworkInterfaceCreatePrivate(NULL,
child,
childPrivate->prefs,
- childPrivate->serviceID,
- NULL);
+ childPrivate->serviceID);
if (parentPrivate == NULL) {
_SCErrorSet(kSCStatusFailed);
return NULL;
}
+uint64_t
+_SCNetworkInterfaceGetIORegistryEntryID(SCNetworkInterfaceRef interface)
+{
+ SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)interface;
+
+ return interfacePrivate->entryID;
+}
+
+
Boolean
_SCNetworkInterfaceIsBuiltin(SCNetworkInterfaceRef interface)
{
return (SCNetworkInterfacePrivateRef)CFRetain(interface);
}
- newPrivate = __SCNetworkInterfaceCreatePrivate(NULL, NULL, prefs, serviceID, NULL);
+ newPrivate = __SCNetworkInterfaceCreatePrivate(NULL, NULL, prefs, serviceID);
newPrivate->interface_type = oldPrivate->interface_type;
if (oldPrivate->interface != NULL) {
newPrivate->interface = (SCNetworkInterfaceRef)__SCNetworkInterfaceCreateCopy(NULL, // allocator
if (oldPrivate->path != NULL) {
newPrivate->path = CFRetain(oldPrivate->path);
}
+ newPrivate->entryID = oldPrivate->entryID;
if (oldPrivate->overrides != NULL) {
newPrivate->overrides = CFDictionaryCreateMutableCopy(NULL, 0, oldPrivate->overrides);
}
__private_extern__ CFMutableDictionaryRef
-_IOBSDNameMatching(mach_port_t masterPort, unsigned int options, const char *bsdName)
+_IOBSDNameMatching(mach_port_t masterPort, uint32_t options, const char *bsdName)
{
#undef IOBSDNameMatching
static typeof (IOBSDNameMatching) *dyfunc = NULL;
}
+__private_extern__ kern_return_t
+_IORegistryEntryGetRegistryEntryID(io_registry_entry_t entry, uint64_t *entryID)
+{
+ #undef IORegistryEntryGetRegistryEntryID
+ static typeof (IORegistryEntryGetRegistryEntryID) *dyfunc = NULL;
+ if (!dyfunc) {
+ void *image = __loadIOKit();
+ if (image) dyfunc = dlsym(image, "IORegistryEntryGetRegistryEntryID");
+ }
+ return dyfunc ? dyfunc(entry, entryID) : KERN_FAILURE;
+}
+
+
__private_extern__ CFTypeRef
_IORegistryEntrySearchCFProperty(io_registry_entry_t entry, const io_name_t plane, CFStringRef key, CFAllocatorRef allocator, IOOptionBits options)
{
CFMutableDictionaryRef
_IOBSDNameMatching (
mach_port_t masterPort,
- unsigned int options,
+ uint32_t options,
const char *bsdName
);
#define IOBSDNameMatching _IOBSDNameMatching
);
#define IORegistryEntryGetPath _IORegistryEntryGetPath
+kern_return_t
+_IORegistryEntryGetRegistryEntryID (
+ io_registry_entry_t entry,
+ uint64_t *entryID
+ );
+#define IORegistryEntryGetRegistryEntryID _IORegistryEntryGetRegistryEntryID
+
CFTypeRef
_IORegistryEntrySearchCFProperty (
io_registry_entry_t entry,