Boolean CNMarkPortalOffline(CFStringRef interfaceName) { static typeof (CNMarkPortalOffline) *dyfunc = NULL; if (!dyfunc) { void *image = __loadCaptiveNetwork(); if (image) dyfunc = dlsym(image, "__CNMarkPortalOffline"); } return dyfunc ? dyfunc(interfaceName) : FALSE; }
CFArrayRef CNCopySupportedInterfaces(void) { static typeof (CNCopySupportedInterfaces) *dyfunc = NULL; if (!dyfunc) { void *image = __loadCaptiveNetwork(); if (image) dyfunc = dlsym(image, "__CNCopySupportedInterfaces"); } return dyfunc ? dyfunc() : NULL; }
Boolean CNSetSupportedSSIDs(CFArrayRef ssidArray) { static typeof (CNSetSupportedSSIDs) *dyfunc = NULL; if (!dyfunc) { void *image = __loadCaptiveNetwork(); if (image) dyfunc = dlsym(image, "__CNSetSupportedSSIDs"); } return dyfunc ? dyfunc(ssidArray) : FALSE; }
CFDictionaryRef CNCopyCurrentNetworkInfo(CFStringRef interfaceName) { static typeof (CNCopyCurrentNetworkInfo) *dyfunc = NULL; if (!dyfunc) { void *image = __loadCaptiveNetwork(); if (image) dyfunc = dlsym(image, "__CNCopyCurrentNetworkInfo"); } return dyfunc ? dyfunc(interfaceName) : NULL; }
void __CFSetLastAllocationEventName(void *ptr, const char *classname) { static void (*dyfunc)(void *, const char *) = (void *)0xFFFFFFFF; if (!__CFOASafe) return; if ((void *)0xFFFFFFFF == dyfunc) { dyfunc = NULL; if (NSIsSymbolNameDefined("__OASetLastAllocationEventName")) dyfunc = (void *)NSAddressOfSymbol(NSLookupAndBindSymbol("__OASetLastAllocationEventName")); } if (NULL != dyfunc) { dyfunc(ptr, classname); } }
void __CFRecordAllocationEvent(int eventnum, void *ptr, int size, int data, const char *classname) { static void (*dyfunc)(int, void *, int, int, const char *) = (void *)0xFFFFFFFF; if (!__CFOASafe) return; if ((void *)0xFFFFFFFF == dyfunc) { dyfunc = NULL; if (NSIsSymbolNameDefined("__OARecordAllocationEvent")) dyfunc = (void *)NSAddressOfSymbol(NSLookupAndBindSymbol("__OARecordAllocationEvent")); } if (NULL != dyfunc) { dyfunc(eventnum, ptr, size, data, classname); } }
void __CFOAInitialize(void) { static void (*dyfunc)(void) = (void *)0xFFFFFFFF; if (NULL == getenv("OAKeepAllocationStatistics")) return; if ((void *)0xFFFFFFFF == dyfunc) { dyfunc = NULL; if (NSIsSymbolNameDefined("__OAInitialize")) dyfunc = (void *)NSAddressOfSymbol(NSLookupAndBindSymbol("__OAInitialize")); } if (NULL != dyfunc) { dyfunc(); __CFOASafe = true; } }