From f715d9467d5e87b8d8c63f8bb206034f6823ebcd Mon Sep 17 00:00:00 2001 From: Apple Date: Thu, 4 Oct 2018 22:48:36 +0000 Subject: [PATCH] configd-963.200.27.tar.gz --- EventFactory/EventFactory.h | 13 + EventFactory/EventFactory.m | 224 +++++ EventFactory/Info.plist | 30 + .../AWD/AWDIPMonitorGlobalEnums.h | 46 + .../AWD/AWDIPMonitorInterfaceAdvisoryReport.h | 81 ++ .../AWD/AWDIPMonitorInterfaceAdvisoryReport.m | 297 +++++++ IPMonitorControl/AWD/AWDMetricIds_IPMonitor.h | 32 + .../AWD/AwdMetadata-0x81-IPMonitor.bin | Bin 0 -> 548 bytes IPMonitorControl/IPMonitorAWDReport.h | 68 ++ IPMonitorControl/IPMonitorAWDReport.m | 180 ++++ IPMonitorControl/IPMonitorControl.c | 366 +++++--- IPMonitorControl/IPMonitorControl.h | 16 +- IPMonitorControl/IPMonitorControlPrivate.h | 27 + IPMonitorControl/IPMonitorControlServer.c | 542 ++++++++++-- IPMonitorControl/Makefile | 8 +- IPMonitorControl/awdgen.yaml | 4 + IPMonitorControl/main.c | 12 +- Plugins/IPMonitor/Makefile | 16 +- Plugins/IPMonitor/agent-monitor.h | 8 +- Plugins/IPMonitor/agent-monitor.m | 8 +- Plugins/IPMonitor/configAgent.h | 4 +- Plugins/IPMonitor/dns-configuration.c | 2 +- Plugins/IPMonitor/ip_plugin.c | 108 ++- Plugins/IPMonitor/ip_plugin.h | 2 +- Plugins/IPMonitor/nat64-configuration.c | 91 +- Plugins/InterfaceNamer/ifnamer.c | 792 ++++++++++++++++-- Plugins/KernelEventMonitor/ev_dlil.c | 120 ++- Plugins/KernelEventMonitor/ev_extra.m | 2 +- Plugins/KernelEventMonitor/ev_ipv6.c | 2 +- Plugins/KernelEventMonitor/eventmon.c | 6 +- Plugins/KernelEventMonitor/eventmon.h | 4 +- Plugins/LinkConfiguration/linkconfig.c | 6 +- Plugins/PreferencesMonitor/prefsmon.c | 244 ++++-- Plugins/QoSMarking/Info-Embedded.plist | 37 + Plugins/QoSMarking/Info.plist | 4 + Plugins/QoSMarking/qos-marking.m | 4 +- Plugins/SimulatorSupport/simulator_support.c | 9 +- Plugins/common/IPMonitorControlPrefs.c | 4 +- Plugins/common/InterfaceNamerControlPrefs.c | 2 +- Plugins/common/plugin_shared.h | 8 +- SCMonitor/monitor.c | 4 +- SystemConfiguration.fproj/BondConfiguration.c | 2 +- .../BridgeConfiguration.c | 2 +- SystemConfiguration.fproj/CaptiveNetwork.c | 116 ++- SystemConfiguration.fproj/CaptiveNetwork.h | 48 +- .../DHCPClientPreferences.h | 18 +- .../English.lproj/Localizable.strings | Bin 1492 -> 3482 bytes SystemConfiguration.fproj/LinkConfiguration.c | 2 +- SystemConfiguration.fproj/Makefile | 2 +- SystemConfiguration.fproj/SCD.c | 2 +- SystemConfiguration.fproj/SCD.h | 6 +- SystemConfiguration.fproj/SCDHostName.c | 4 +- .../SCDNotifierInformViaCallback.c | 311 ++++--- SystemConfiguration.fproj/SCDOpen.c | 4 +- SystemConfiguration.fproj/SCDPlugin.c | 4 +- SystemConfiguration.fproj/SCDPlugin.h | 10 +- SystemConfiguration.fproj/SCDPrivate.c | 38 +- SystemConfiguration.fproj/SCDynamicStore.h | 48 +- .../SCDynamicStoreCopyDHCPInfo.h | 22 +- .../SCDynamicStoreCopySpecific.h | 24 +- .../SCDynamicStoreCopySpecificPrivate.h | 30 +- .../SCDynamicStoreInternal.h | 12 +- SystemConfiguration.fproj/SCDynamicStoreKey.h | 34 +- .../SCDynamicStorePrivate.h | 8 +- .../SCDynamicStoreSetSpecificPrivate.h | 16 +- SystemConfiguration.fproj/SCLocation.c | 10 +- SystemConfiguration.fproj/SCNetwork.c | 2 +- SystemConfiguration.fproj/SCNetwork.h | 18 +- .../SCNetworkConfiguration.h | 325 ++++--- .../SCNetworkConfigurationInternal.c | 9 +- .../SCNetworkConfigurationInternal.h | 24 +- .../SCNetworkConfigurationPrivate.h | 268 ++++-- .../SCNetworkConnection.c | 86 +- .../SCNetworkConnection.h | 48 +- .../SCNetworkConnectionInternal.h | 4 +- .../SCNetworkConnectionPrivate.h | 100 +-- .../SCNetworkInterface.c | 169 +++- .../SCNetworkInterfaceProvider.c | 470 +++++++++++ .../SCNetworkInterfaceProvider.h | 111 +++ .../SCNetworkMigration.c | 18 +- .../SCNetworkReachability.c | 34 +- .../SCNetworkReachability.h | 54 +- .../SCNetworkReachabilityInternal.h | 12 +- .../SCNetworkReachabilityLogging.h | 4 +- .../SCNetworkSignature.c | 6 +- .../SCNetworkSignature.h | 16 +- SystemConfiguration.fproj/SCPCommit.c | 9 +- SystemConfiguration.fproj/SCPLock.c | 2 +- SystemConfiguration.fproj/SCPOpen.c | 21 +- SystemConfiguration.fproj/SCPreferences.h | 60 +- .../SCPreferencesInternal.h | 2 +- .../SCPreferencesKeychainPrivate.c | 4 +- .../SCPreferencesKeychainPrivate.h | 31 +- SystemConfiguration.fproj/SCPreferencesPath.h | 28 +- .../SCPreferencesPathKey.c | 18 +- .../SCPreferencesPathKey.h | 30 +- .../SCPreferencesPrivate.h | 14 +- .../SCPreferencesSetSpecific.h | 20 +- SystemConfiguration.fproj/SCPrivate.h | 17 +- .../SCSchemaDefinitions.c | 8 +- .../SCSchemaDefinitions.h | 543 ++++++------ .../SCSchemaDefinitionsPrivate.h | 411 +++++---- .../SystemConfiguration.h | 34 +- .../SystemConfigurationInternal.h | 53 ++ SystemConfiguration.fproj/VLANConfiguration.c | 2 +- .../VPNAppLayerPrivate.h | 2 +- SystemConfiguration.fproj/VPNConfiguration.c | 2 +- SystemConfiguration.fproj/VPNConfiguration.h | 2 +- SystemConfiguration.fproj/VPNFlow.h | 2 +- SystemConfiguration.fproj/VPNPrivate.c | 2 +- SystemConfiguration.fproj/VPNPrivate.h | 2 +- SystemConfiguration.fproj/VPNTunnel.h | 2 +- SystemConfiguration.fproj/VPNTunnelPrivate.h | 2 +- SystemConfiguration.fproj/config_types.h | 10 +- SystemConfiguration.fproj/dy_framework.c | 4 +- SystemConfiguration.fproj/dy_framework.h | 28 +- SystemConfiguration.fproj/genSCPreferences.c | 150 ++-- .../helper/SCHelper_client.c | 3 +- .../helper/SCHelper_client.h | 12 +- .../helper/SCHelper_server.c | 12 +- .../restore-temporary-headers | 51 ++ SystemConfiguration.fproj/scprefs_observer.c | 2 +- SystemConfiguration.fproj/scprefs_observer.h | 12 +- SystemConfiguration.fproj/update-headers | 168 ---- config-agent-info/config_agent_info.h | 28 +- configd.tproj/_SCD.c | 2 +- configd.tproj/_SCD.h | 2 +- configd.tproj/_snapshot.c | 2 +- configd.tproj/configd.h | 4 +- configd.tproj/configd.m | 8 +- configd.tproj/entitlements-ios.plist | 6 + configd.tproj/plugin_support.c | 44 +- configd.tproj/session.c | 2 +- configd.tproj/session.h | 12 +- configd.xcodeproj/project.pbxproj | 530 ++++++++++-- dnsinfo/dnsinfo.h | 12 +- dnsinfo/dnsinfo_create.c | 2 +- dnsinfo/dnsinfo_create.h | 44 +- dnsinfo/dnsinfo_internal.h | 7 +- dnsinfo/dnsinfo_logging.h | 4 +- dnsinfo/dnsinfo_private.h | 4 +- get-mobility-info | 6 +- get-network-info | 1 + .../libSystemConfiguration_client.c | 11 +- .../libSystemConfiguration_client.h | 24 +- .../libSystemConfiguration_internal.h | 47 ++ .../libSystemConfiguration_server.c | 4 +- .../libSystemConfiguration_server.h | 12 +- logging/liblog_SystemConfiguration_internal.h | 62 ++ nwi/network_information.c | 17 +- nwi/network_information.h | 14 +- nwi/network_information_internal.h | 38 + nwi/network_information_server.c | 19 +- nwi/network_state_information_logging.h | 12 +- nwi/network_state_information_priv.c | 2 +- nwi/network_state_information_priv.h | 6 +- sctest/SCTestUtils.h | 4 +- scutil.tproj/cache.h | 12 +- scutil.tproj/nc.c | 18 +- scutil.tproj/notifications.c | 2 +- scutil.tproj/prefs.c | 4 - scutil.tproj/scutil.c | 14 +- scutil.tproj/scutil.h | 2 +- scutil.tproj/tests.c | 131 ++- scutil.tproj/tests.h | 3 +- tests/ReachabilityTester.c | 2 +- update-sanitizer-dylib-references | 3 + 167 files changed, 6685 insertions(+), 2257 deletions(-) create mode 100644 EventFactory/EventFactory.h create mode 100644 EventFactory/EventFactory.m create mode 100644 EventFactory/Info.plist create mode 100644 IPMonitorControl/AWD/AWDIPMonitorGlobalEnums.h create mode 100644 IPMonitorControl/AWD/AWDIPMonitorInterfaceAdvisoryReport.h create mode 100644 IPMonitorControl/AWD/AWDIPMonitorInterfaceAdvisoryReport.m create mode 100644 IPMonitorControl/AWD/AWDMetricIds_IPMonitor.h create mode 100644 IPMonitorControl/AWD/AwdMetadata-0x81-IPMonitor.bin create mode 100644 IPMonitorControl/IPMonitorAWDReport.h create mode 100644 IPMonitorControl/IPMonitorAWDReport.m create mode 100644 IPMonitorControl/awdgen.yaml create mode 100644 Plugins/QoSMarking/Info-Embedded.plist create mode 100644 SystemConfiguration.fproj/SCNetworkInterfaceProvider.c create mode 100644 SystemConfiguration.fproj/SCNetworkInterfaceProvider.h create mode 100644 SystemConfiguration.fproj/SystemConfigurationInternal.h create mode 100755 SystemConfiguration.fproj/restore-temporary-headers delete mode 100755 SystemConfiguration.fproj/update-headers create mode 100644 libSystemConfiguration/libSystemConfiguration_internal.h create mode 100644 logging/liblog_SystemConfiguration_internal.h create mode 100644 nwi/network_information_internal.h diff --git a/EventFactory/EventFactory.h b/EventFactory/EventFactory.h new file mode 100644 index 0000000..5ccf3b9 --- /dev/null +++ b/EventFactory/EventFactory.h @@ -0,0 +1,13 @@ +// +// EventFactory.h +// SystemConfigurationNetworkEventFactory +// +// Created by Allan Nathanson on 11/15/17. +// +// + +#import + +@interface EventFactory : EFEventFactory + +@end diff --git a/EventFactory/EventFactory.m b/EventFactory/EventFactory.m new file mode 100644 index 0000000..1886b5d --- /dev/null +++ b/EventFactory/EventFactory.m @@ -0,0 +1,224 @@ +// +// EventFactory.m +// SystemConfigurationNetworkEventFactory +// +// Created by Allan Nathanson on 11/15/17. +// +// + +#import "EventFactory.h" +#import + +#pragma mark - +#pragma mark Logging + +static os_log_t +__log_Spectacles(void) +{ + static os_log_t log = NULL; + + if (log == NULL) { + log = os_log_create("com.apple.spectacles", "SystemConfiguration"); + } + + return log; +} + +#define specs_log_err(format, ...) os_log_error(__log_Spectacles(), format, ##__VA_ARGS__) +#define specs_log_notice(format, ...) os_log (__log_Spectacles(), format, ##__VA_ARGS__) +#define specs_log_info(format, ...) os_log_info (__log_Spectacles(), format, ##__VA_ARGS__) +#define specs_log_debug(format, ...) os_log_debug(__log_Spectacles(), format, ##__VA_ARGS__) + +#pragma mark - +#pragma mark Matching + +#define REMatched(re_matches, args) \ + ((re_matches != nil) && (re_matches.count == 1) && (re_matches[0].numberOfRanges == (args + 1))) + +#define REMatchRange(re_matches, arg) \ + [re_matches[0] rangeAtIndex:arg] + +#pragma mark - +#pragma mark SystemConfiguratioin Network Event Factory + +@interface EventFactory () + +@property (readonly, nonatomic) NSRegularExpression *kevExpressionInterfaceAttach; +@property (readonly, nonatomic) NSRegularExpression *kevExpressionLink; +@property (readonly, nonatomic) NSRegularExpression *kevExpressionLinkQuality; + +@end + +@implementation EventFactory + +- (instancetype)init +{ + self = [super init]; + if (self) { + NSError *expressionError; + + expressionError = nil; + _kevExpressionInterfaceAttach = [[NSRegularExpression alloc] initWithPattern:@"Process interface (attach|detach): (\\w+)" options:0 error:&expressionError]; + if (expressionError != nil) { + specs_log_info("Failed to create a regular expression: %@", expressionError); + } + + expressionError = nil; + _kevExpressionLink = [[NSRegularExpression alloc] initWithPattern:@"Process interface link (down|up): (\\w+)" options:0 error:&expressionError]; + if (expressionError != nil) { + specs_log_info("Failed to create a regular expression: %@", expressionError); + } + + expressionError = nil; + _kevExpressionLinkQuality = [[NSRegularExpression alloc] initWithPattern:@"Process interface quality: (\\w+) \\(q=([-\\d]+)\\)" options:0 error:&expressionError]; + if (expressionError != nil) { + specs_log_info("Failed to create a regular expression: %@", expressionError); + } + } + + return self; +} + +- (void)startWithLogSourceAttributes:(NSDictionary *)attributes +{ + // + // Prepare for parsing logs + // + specs_log_info("Event factory is starting with attributes: %@", attributes); +} + +- (void)handleLogEvent:(EFLogEvent *)logEvent completionHandler:(void (^)(NSArray * _Nullable))completionHandler +{ + NSString *category; + NSString *message; + EFNetworkControlPathEvent *newNetworkEvent = nil; + + message = logEvent.eventMessage; + if (message == nil) { + return; + } + + // + // Parse logEvent and continue constructing SpectaclesNetworkEvent objects + // + // Note: if one or more NetworkEvent objects are complete, send them to the + // app in the completion handler block. + // + + + category = logEvent.category; + if ([category isEqualToString:@"InterfaceNamer"]) { + + do { + } while (false); + + specs_log_debug("Skipped [%@] message: %@", category, message); + + } else if ([category isEqualToString:@"IPMonitor"]) { + + do { + } while (false); + + specs_log_debug("Skipped [%@] message: %@", category, message); + + } else if ([category isEqualToString:@"KernelEventMonitor"]) { + + do { + NSArray *matches; + NSRange range = NSMakeRange(0, message.length); + + // + // interface attach/detach + // + matches = [_kevExpressionInterfaceAttach matchesInString:message + options:NSMatchingReportProgress + range:range]; + if (REMatched(matches, 2)) { + NSString *event; + NSString *interface; + + interface = [message substringWithRange:REMatchRange(matches, 2)]; + event = [message substringWithRange:REMatchRange(matches, 1)]; + specs_log_debug("interface attach/detach: %@ --> %@", interface, event); + + newNetworkEvent = [[EFNetworkControlPathEvent alloc] initWithLogEvent:logEvent subsystemIdentifier:[[NSData alloc] init]]; + newNetworkEvent.interfaceBSDName = interface; + newNetworkEvent.interfaceStatus = [event isEqualToString:@"attach"] ? @"interface attached" : @"interface detached"; + break; + } + + // + // interface link up/down + // + matches = [_kevExpressionLink matchesInString:message + options:NSMatchingReportProgress + range:range]; + if (REMatched(matches, 2)) { + NSString *event; + NSString *interface; + + interface = [message substringWithRange:REMatchRange(matches, 2)]; + event = [message substringWithRange:REMatchRange(matches, 1)]; + specs_log_debug("link change: %@ --> %@", interface, event); + + newNetworkEvent = [[EFNetworkControlPathEvent alloc] initWithLogEvent:logEvent subsystemIdentifier:[[NSData alloc] init]]; + newNetworkEvent.interfaceBSDName = interface; + newNetworkEvent.interfaceStatus = [event isEqualToString:@"up"] ? @"link up" : @"link down"; + break; + } + + // + // interface link quality + // + matches = [_kevExpressionLinkQuality matchesInString:message + options:NSMatchingReportProgress + range:range]; + if (REMatched(matches, 2)) { + NSString *interface; + NSString *quality; + + interface = [message substringWithRange:REMatchRange(matches, 1)]; + quality = [message substringWithRange:REMatchRange(matches, 2)]; + specs_log_debug("link quality: %@ --> %@", interface, quality); + + newNetworkEvent = [[EFNetworkControlPathEvent alloc] initWithLogEvent:logEvent subsystemIdentifier:[[NSData alloc] init]]; + newNetworkEvent.interfaceBSDName = interface; + newNetworkEvent.interfaceStatus = [NSString stringWithFormat:@"link quality = %@", quality]; + break; + } + + specs_log_debug("Skipped [%@] message: %@", category, message); + } while (false); + + } else if ([category isEqualToString:@"PreferencesMonitor"]) { + + do { + } while (false); + + specs_log_debug("Skipped [%@] message: %@", category, message); + + } else { + // if we have no handler for this category + specs_log_debug("Skipped [%@] message: %@", category, message); + } + + if (newNetworkEvent != nil) { + completionHandler(@[ newNetworkEvent ]); + } else { + completionHandler(nil); + } +} + +- (void)finishWithCompletionHandler:(void (^)(NSArray * _Nullable))completionHandler +{ + // + // Clean up + // + // Note: if one or more SpectaclesNetworkEvent objects are in the process of + // being built, return them in the completion handler block. + // + specs_log_notice("Event factory is finishing"); + completionHandler(nil); +} + +@end diff --git a/EventFactory/Info.plist b/EventFactory/Info.plist new file mode 100644 index 0000000..8978e66 --- /dev/null +++ b/EventFactory/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2017 Apple Inc. All rights reserved. + NSPrincipalClass + EventFactory + LogEventPredicate + subsystem == "com.apple.SystemConfiguration" + + diff --git a/IPMonitorControl/AWD/AWDIPMonitorGlobalEnums.h b/IPMonitorControl/AWD/AWDIPMonitorGlobalEnums.h new file mode 100644 index 0000000..e45d965 --- /dev/null +++ b/IPMonitorControl/AWD/AWDIPMonitorGlobalEnums.h @@ -0,0 +1,46 @@ +// This file was automatically generated by protocompiler +// DO NOT EDIT! +// Compiled from stdin + +#include +#ifdef __OBJC__ +#include +#endif + +#ifndef NS_ENUM +#if (__cplusplus && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!__cplusplus && __has_feature(objc_fixed_enum)) +#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type +#else +#define NS_ENUM(_type, _name) _type _name; enum +#endif +#endif // !defined(NS_ENUM) + +typedef NS_ENUM(int32_t, AWDIPMonitorInterfaceType) { + AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_OTHER = 0, + AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_WIFI = 1, + AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_CELLULAR = 2, + AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_WIRED = 3, +}; +#ifdef __OBJC__ +NS_INLINE NSString *AWDIPMonitorInterfaceTypeAsString(AWDIPMonitorInterfaceType value) +{ + switch (value) + { + case AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_OTHER: return @"IPMONITOR_INTERFACE_TYPE_OTHER"; + case AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_WIFI: return @"IPMONITOR_INTERFACE_TYPE_WIFI"; + case AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_CELLULAR: return @"IPMONITOR_INTERFACE_TYPE_CELLULAR"; + case AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_WIRED: return @"IPMONITOR_INTERFACE_TYPE_WIRED"; + default: return [NSString stringWithFormat:@"(unknown: %i)", value]; + } +} +#endif /* __OBJC__ */ +#ifdef __OBJC__ +NS_INLINE AWDIPMonitorInterfaceType StringAsAWDIPMonitorInterfaceType(NSString *value) +{ + if ([value isEqualToString:@"IPMONITOR_INTERFACE_TYPE_OTHER"]) return AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_OTHER; + if ([value isEqualToString:@"IPMONITOR_INTERFACE_TYPE_WIFI"]) return AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_WIFI; + if ([value isEqualToString:@"IPMONITOR_INTERFACE_TYPE_CELLULAR"]) return AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_CELLULAR; + if ([value isEqualToString:@"IPMONITOR_INTERFACE_TYPE_WIRED"]) return AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_WIRED; + return AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_OTHER; +} +#endif /* __OBJC__ */ diff --git a/IPMonitorControl/AWD/AWDIPMonitorInterfaceAdvisoryReport.h b/IPMonitorControl/AWD/AWDIPMonitorInterfaceAdvisoryReport.h new file mode 100644 index 0000000..f1dca4f --- /dev/null +++ b/IPMonitorControl/AWD/AWDIPMonitorInterfaceAdvisoryReport.h @@ -0,0 +1,81 @@ +// This file was automatically generated by protocompiler +// DO NOT EDIT! +// Compiled from stdin + +#import +#import + +#import "AWDIPMonitorGlobalEnums.h" + +typedef NS_ENUM(int32_t, AWDIPMonitorInterfaceAdvisoryReport_Flags) { + AWDIPMonitorInterfaceAdvisoryReport_Flags_LINK_LAYER_ISSUE = 1, + AWDIPMonitorInterfaceAdvisoryReport_Flags_UPLINK_ISSUE = 2, +}; +#ifdef __OBJC__ +NS_INLINE NSString *AWDIPMonitorInterfaceAdvisoryReport_FlagsAsString(AWDIPMonitorInterfaceAdvisoryReport_Flags value) +{ + switch (value) + { + case AWDIPMonitorInterfaceAdvisoryReport_Flags_LINK_LAYER_ISSUE: return @"LINK_LAYER_ISSUE"; + case AWDIPMonitorInterfaceAdvisoryReport_Flags_UPLINK_ISSUE: return @"UPLINK_ISSUE"; + default: return [NSString stringWithFormat:@"(unknown: %i)", value]; + } +} +#endif /* __OBJC__ */ +#ifdef __OBJC__ +NS_INLINE AWDIPMonitorInterfaceAdvisoryReport_Flags StringAsAWDIPMonitorInterfaceAdvisoryReport_Flags(NSString *value) +{ + if ([value isEqualToString:@"LINK_LAYER_ISSUE"]) return AWDIPMonitorInterfaceAdvisoryReport_Flags_LINK_LAYER_ISSUE; + if ([value isEqualToString:@"UPLINK_ISSUE"]) return AWDIPMonitorInterfaceAdvisoryReport_Flags_UPLINK_ISSUE; + return AWDIPMonitorInterfaceAdvisoryReport_Flags_LINK_LAYER_ISSUE; +} +#endif /* __OBJC__ */ + +#ifdef __cplusplus +#define AWDIPMONITORINTERFACEADVISORYREPORT_FUNCTION extern "C" +#else +#define AWDIPMONITORINTERFACEADVISORYREPORT_FUNCTION extern +#endif + +@interface AWDIPMonitorInterfaceAdvisoryReport : PBCodable +{ + uint64_t _timestamp; + uint32_t _advisoryCount; + uint32_t _flags; + AWDIPMonitorInterfaceType _interfaceType; + struct { + int timestamp:1; + int advisoryCount:1; + int flags:1; + int interfaceType:1; + } _has; +} + + +@property (nonatomic) BOOL hasTimestamp; +@property (nonatomic) uint64_t timestamp; + +@property (nonatomic) BOOL hasInterfaceType; +@property (nonatomic) AWDIPMonitorInterfaceType interfaceType; +- (NSString *)interfaceTypeAsString:(AWDIPMonitorInterfaceType)value; +- (AWDIPMonitorInterfaceType)StringAsInterfaceType:(NSString *)str; + +@property (nonatomic) BOOL hasFlags; +@property (nonatomic) uint32_t flags; + +@property (nonatomic) BOOL hasAdvisoryCount; +@property (nonatomic) uint32_t advisoryCount; + +// Performs a shallow copy into other +- (void)copyTo:(AWDIPMonitorInterfaceAdvisoryReport *)other; + +// Performs a deep merge from other into self +// If set in other, singular values in self are replaced in self +// Singular composite values are recursively merged +// Repeated values from other are appended to repeated values in self +- (void)mergeFrom:(AWDIPMonitorInterfaceAdvisoryReport *)other; + +AWDIPMONITORINTERFACEADVISORYREPORT_FUNCTION BOOL AWDIPMonitorInterfaceAdvisoryReportReadFrom(AWDIPMonitorInterfaceAdvisoryReport *self, PBDataReader *reader); + +@end + diff --git a/IPMonitorControl/AWD/AWDIPMonitorInterfaceAdvisoryReport.m b/IPMonitorControl/AWD/AWDIPMonitorInterfaceAdvisoryReport.m new file mode 100644 index 0000000..89a5d21 --- /dev/null +++ b/IPMonitorControl/AWD/AWDIPMonitorInterfaceAdvisoryReport.m @@ -0,0 +1,297 @@ +// This file was automatically generated by protocompiler +// DO NOT EDIT! +// Compiled from stdin + +#import "AWDIPMonitorInterfaceAdvisoryReport.h" +#import +#import +#import + +@implementation AWDIPMonitorInterfaceAdvisoryReport + +@synthesize timestamp = _timestamp; +- (void)setTimestamp:(uint64_t)v +{ + _has.timestamp = YES; + _timestamp = v; +} +- (void)setHasTimestamp:(BOOL)f +{ + _has.timestamp = f; +} +- (BOOL)hasTimestamp +{ + return _has.timestamp; +} +@synthesize interfaceType = _interfaceType; +- (AWDIPMonitorInterfaceType)interfaceType +{ + return _has.interfaceType ? _interfaceType : AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_OTHER; +} +- (void)setInterfaceType:(AWDIPMonitorInterfaceType)v +{ + _has.interfaceType = YES; + _interfaceType = v; +} +- (void)setHasInterfaceType:(BOOL)f +{ + _has.interfaceType = f; +} +- (BOOL)hasInterfaceType +{ + return _has.interfaceType; +} +- (NSString *)interfaceTypeAsString:(AWDIPMonitorInterfaceType)value +{ + return AWDIPMonitorInterfaceTypeAsString(value); +} +- (AWDIPMonitorInterfaceType)StringAsInterfaceType:(NSString *)str +{ + return StringAsAWDIPMonitorInterfaceType(str); +} +@synthesize flags = _flags; +- (void)setFlags:(uint32_t)v +{ + _has.flags = YES; + _flags = v; +} +- (void)setHasFlags:(BOOL)f +{ + _has.flags = f; +} +- (BOOL)hasFlags +{ + return _has.flags; +} +@synthesize advisoryCount = _advisoryCount; +- (void)setAdvisoryCount:(uint32_t)v +{ + _has.advisoryCount = YES; + _advisoryCount = v; +} +- (void)setHasAdvisoryCount:(BOOL)f +{ + _has.advisoryCount = f; +} +- (BOOL)hasAdvisoryCount +{ + return _has.advisoryCount; +} + +- (NSString *)description +{ + return [NSString stringWithFormat:@"%@ %@", [super description], [self dictionaryRepresentation]]; +} + +- (NSDictionary *)dictionaryRepresentation +{ + NSMutableDictionary *dict = [NSMutableDictionary dictionary]; + if (self->_has.timestamp) + { + [dict setObject:[NSNumber numberWithUnsignedLongLong:self->_timestamp] forKey:@"timestamp"]; + } + if (self->_has.interfaceType) + { + [dict setObject:AWDIPMonitorInterfaceTypeAsString(self->_interfaceType) forKey:@"interface_type"]; + } + if (self->_has.flags) + { + [dict setObject:[NSNumber numberWithUnsignedInt:self->_flags] forKey:@"flags"]; + } + if (self->_has.advisoryCount) + { + [dict setObject:[NSNumber numberWithUnsignedInt:self->_advisoryCount] forKey:@"advisory_count"]; + } + return dict; +} + +BOOL AWDIPMonitorInterfaceAdvisoryReportReadFrom(AWDIPMonitorInterfaceAdvisoryReport *self, PBDataReader *reader) { + while (PBReaderHasMoreData(reader)) { + uint32_t tag = 0; + uint8_t aType = 0; + + PBReaderReadTag32AndType(reader, &tag, &aType); + + if (PBReaderHasError(reader)) + break; + + if (aType == TYPE_END_GROUP) { + break; + } + + switch (tag) { + + case 1 /* timestamp */: + { + self->_has.timestamp = YES; + self->_timestamp = PBReaderReadUint64(reader); + } + break; + case 2 /* interfaceType */: + { + self->_has.interfaceType = YES; + self->_interfaceType = PBReaderReadInt32(reader); + } + break; + case 3 /* flags */: + { + self->_has.flags = YES; + self->_flags = PBReaderReadUint32(reader); + } + break; + case 4 /* advisoryCount */: + { + self->_has.advisoryCount = YES; + self->_advisoryCount = PBReaderReadUint32(reader); + } + break; + default: + if (!PBReaderSkipValueWithTag(reader, tag, aType)) + return NO; + break; + } + } + return !PBReaderHasError(reader); +} + +- (BOOL)readFrom:(PBDataReader *)reader +{ + return AWDIPMonitorInterfaceAdvisoryReportReadFrom(self, reader); +} +- (void)writeTo:(PBDataWriter *)writer +{ + /* timestamp */ + { + if (self->_has.timestamp) + { + PBDataWriterWriteUint64Field(writer, self->_timestamp, 1); + } + } + /* interfaceType */ + { + if (self->_has.interfaceType) + { + PBDataWriterWriteInt32Field(writer, self->_interfaceType, 2); + } + } + /* flags */ + { + if (self->_has.flags) + { + PBDataWriterWriteUint32Field(writer, self->_flags, 3); + } + } + /* advisoryCount */ + { + if (self->_has.advisoryCount) + { + PBDataWriterWriteUint32Field(writer, self->_advisoryCount, 4); + } + } +} + +- (void)copyTo:(AWDIPMonitorInterfaceAdvisoryReport *)other +{ + if (self->_has.timestamp) + { + other->_timestamp = _timestamp; + other->_has.timestamp = YES; + } + if (self->_has.interfaceType) + { + other->_interfaceType = _interfaceType; + other->_has.interfaceType = YES; + } + if (self->_has.flags) + { + other->_flags = _flags; + other->_has.flags = YES; + } + if (self->_has.advisoryCount) + { + other->_advisoryCount = _advisoryCount; + other->_has.advisoryCount = YES; + } +} + +- (id)copyWithZone:(NSZone *)zone +{ + AWDIPMonitorInterfaceAdvisoryReport *copy = [[[self class] allocWithZone:zone] init]; + if (self->_has.timestamp) + { + copy->_timestamp = _timestamp; + copy->_has.timestamp = YES; + } + if (self->_has.interfaceType) + { + copy->_interfaceType = _interfaceType; + copy->_has.interfaceType = YES; + } + if (self->_has.flags) + { + copy->_flags = _flags; + copy->_has.flags = YES; + } + if (self->_has.advisoryCount) + { + copy->_advisoryCount = _advisoryCount; + copy->_has.advisoryCount = YES; + } + return copy; +} + +- (BOOL)isEqual:(id)object +{ + AWDIPMonitorInterfaceAdvisoryReport *other = (AWDIPMonitorInterfaceAdvisoryReport *)object; + return [other isMemberOfClass:[self class]] + && + ((self->_has.timestamp && other->_has.timestamp && self->_timestamp == other->_timestamp) || (!self->_has.timestamp && !other->_has.timestamp)) + && + ((self->_has.interfaceType && other->_has.interfaceType && self->_interfaceType == other->_interfaceType) || (!self->_has.interfaceType && !other->_has.interfaceType)) + && + ((self->_has.flags && other->_has.flags && self->_flags == other->_flags) || (!self->_has.flags && !other->_has.flags)) + && + ((self->_has.advisoryCount && other->_has.advisoryCount && self->_advisoryCount == other->_advisoryCount) || (!self->_has.advisoryCount && !other->_has.advisoryCount)) + ; +} + +- (NSUInteger)hash +{ + return 0 + ^ + (self->_has.timestamp ? PBHashInt((NSUInteger)self->_timestamp) : 0) + ^ + (self->_has.interfaceType ? PBHashInt((NSUInteger)self->_interfaceType) : 0) + ^ + (self->_has.flags ? PBHashInt((NSUInteger)self->_flags) : 0) + ^ + (self->_has.advisoryCount ? PBHashInt((NSUInteger)self->_advisoryCount) : 0) + ; +} + +- (void)mergeFrom:(AWDIPMonitorInterfaceAdvisoryReport *)other +{ + if (other->_has.timestamp) + { + self->_timestamp = other->_timestamp; + self->_has.timestamp = YES; + } + if (other->_has.interfaceType) + { + self->_interfaceType = other->_interfaceType; + self->_has.interfaceType = YES; + } + if (other->_has.flags) + { + self->_flags = other->_flags; + self->_has.flags = YES; + } + if (other->_has.advisoryCount) + { + self->_advisoryCount = other->_advisoryCount; + self->_has.advisoryCount = YES; + } +} + +@end + diff --git a/IPMonitorControl/AWD/AWDMetricIds_IPMonitor.h b/IPMonitorControl/AWD/AWDMetricIds_IPMonitor.h new file mode 100644 index 0000000..36f2d8b --- /dev/null +++ b/IPMonitorControl/AWD/AWDMetricIds_IPMonitor.h @@ -0,0 +1,32 @@ +// +// AWDMetricIds_IPMonitor.h +// AppleWirelessDiagnostics +// +// WARNING :: DO NOT MODIFY THIS FILE! +// +// This file is auto-generated! Do not modify it or your changes will get overwritten! +// + +#ifndef AWD_MetricId_HeaderGuard_IPMonitor +#define AWD_MetricId_HeaderGuard_IPMonitor + +// Component Id: +// --------------- +// Use this value for any API requesting the "component id" for your component. +enum { + AWDComponentId_IPMonitor = 0x81 +}; + + +// Simple Metrics: +// --------------- +// This component currently has no metrics compatible with the 'simple metric' API. + + +// General Metrics: +// ---------------- +enum { + AWDMetricId_IPMonitor_InterfaceAdvisoryReport = 0x810000 +}; + +#endif // AWD_MetricId_HeaderGuard_IPMonitor diff --git a/IPMonitorControl/AWD/AwdMetadata-0x81-IPMonitor.bin b/IPMonitorControl/AWD/AwdMetadata-0x81-IPMonitor.bin new file mode 100644 index 0000000000000000000000000000000000000000..abe88872bbc4734ddc52957d4df36323f67465c2 GIT binary patch literal 548 zcmZ<^ckyLpU}RusU|?WkU}0zk(k?)34#cq?H-9rj#j1h)7)Az$wvGEjSb!?81KGYn zF%aMq6yoP-XlP*(kd|PyU<_bPVB}H~;^1HuV3A<(U=(8GU=rY#U;xt00_&%#SarEJ$@=5aNZnONlitCo#QPNQ?vQJSDzFsQvND z`K5U!LaP|L#4xQ60h%GC#3cum@%Qr#@ehjk^b2tfa&vTcjSq$Nl|8Uv95)wnXaX7I!v#`gu6>m HAJPE;h5LzA literal 0 HcmV?d00001 diff --git a/IPMonitorControl/IPMonitorAWDReport.h b/IPMonitorControl/IPMonitorAWDReport.h new file mode 100644 index 0000000..3f39951 --- /dev/null +++ b/IPMonitorControl/IPMonitorAWDReport.h @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2018 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * IPMonitorAWDReport.h + * - C shim layer to interact with AWD to generate and submit a metric + */ + +#ifndef _S_IPMONITOR_AWD_REPORT_H +#define _S_IPMONITOR_AWD_REPORT_H + +/* + * Modification History + * + * June 21, 2018 Dieter Siegmund (dieter@apple.com) + * - created + */ + +#include +#ifndef NS_ENUM +#define NS_ENUM CF_ENUM +#endif + +#include "AWDIPMonitorGlobalEnums.h" + +/* ugh, duplicate */ +#ifndef __OBJC__ +typedef NS_ENUM(int32_t, AWDIPMonitorInterfaceAdvisoryReport_Flags) { + AWDIPMonitorInterfaceAdvisoryReport_Flags_LINK_LAYER_ISSUE = 1, + AWDIPMonitorInterfaceAdvisoryReport_Flags_UPLINK_ISSUE = 2, +}; +#endif + +typedef CFTypeRef InterfaceAdvisoryReportRef; + +InterfaceAdvisoryReportRef +InterfaceAdvisoryReportCreate(AWDIPMonitorInterfaceType type); + +void +InterfaceAdvisoryReportSubmit(InterfaceAdvisoryReportRef report); + +void +InterfaceAdvisoryReportSetFlags(InterfaceAdvisoryReportRef report, + AWDIPMonitorInterfaceAdvisoryReport_Flags flags); +void +InterfaceAdvisoryReportSetAdvisoryCount(InterfaceAdvisoryReportRef report, + uint32_t count); +#endif /* _S_IPMONITOR_AWD_REPORT_H */ diff --git a/IPMonitorControl/IPMonitorAWDReport.m b/IPMonitorControl/IPMonitorAWDReport.m new file mode 100644 index 0000000..7c5ded5 --- /dev/null +++ b/IPMonitorControl/IPMonitorAWDReport.m @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2018 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * IPMonitorAWDReport.m + * - C shim layer to interact with AWD to generate and submit a metric + */ + + +#import +#import "AWDMetricIds_IPMonitor.h" +#import "AWDIPMonitorInterfaceAdvisoryReport.h" +#import "IPMonitorAWDReport.h" +#import + +#include "symbol_scope.h" + +#if defined(TEST_IPMONITOR_AWD_REPORT) || defined(TEST_IPMONITOR_CONTROL) + +#define my_log(__level, __format, ...) SCPrint(TRUE, stdout, CFSTR(__format "\n"), ## __VA_ARGS__) + +#else /* TEST_IPMONITOR_AWD_REPORT || TEST_IPMONITOR_CONTROL */ + +#define my_log(__level, __format, ...) SC_log(__level, __format, ## __VA_ARGS__) + +#endif /* TEST_IPMONITOR_AWD_REPORT || TEST_IPMONITOR_CONTROL */ + + +STATIC AWDServerConnection * +IPMonitorAWDServerConnection(void) +{ + AWDServerConnection * server; + + if ([AWDServerConnection class] == nil) { + return (nil); + } + server = [[AWDServerConnection alloc] + initWithComponentId:AWDComponentId_IPMonitor]; + if (server == NULL) { + my_log(LOG_NOTICE, "Failed to create AWD server connection"); + } + return (server); +} + +STATIC InterfaceAdvisoryReportRef +_InterfaceAdvisoryReportCreate(AWDIPMonitorInterfaceType type) +{ + AWDIPMonitorInterfaceAdvisoryReport * metric; + + if ([AWDServerConnection class] == nil) { + return (NULL); + } + metric = [[AWDIPMonitorInterfaceAdvisoryReport alloc] init]; + metric.interfaceType = type; + + /* default to zero values */ + metric.flags = 0; + metric.advisoryCount = 0; + + return ((InterfaceAdvisoryReportRef)metric); +} + +PRIVATE_EXTERN InterfaceAdvisoryReportRef +InterfaceAdvisoryReportCreate(AWDIPMonitorInterfaceType type) +{ + InterfaceAdvisoryReportRef report; + + @autoreleasepool { + report = _InterfaceAdvisoryReportCreate(type); + } + return (report); +} + +STATIC void +_InterfaceAdvisoryReportSubmit(InterfaceAdvisoryReportRef report) +{ + AWDMetricContainer * container; + AWDServerConnection * server; + + server = IPMonitorAWDServerConnection(); + if (server == NULL) { + return; + } + container = [server newMetricContainerWithIdentifier: + AWDMetricId_IPMonitor_InterfaceAdvisoryReport]; + [container setMetric:(AWDIPMonitorInterfaceAdvisoryReport *)report]; + [server submitMetric:container]; + [server release]; + [container release]; + return; +} + +PRIVATE_EXTERN void +InterfaceAdvisoryReportSubmit(InterfaceAdvisoryReportRef report) +{ + @autoreleasepool { + _InterfaceAdvisoryReportSubmit(report); + } +} + +#define INTERFACE_ADVISORY_REPORT_SET_PROP(report, name, value) \ + @autoreleasepool { \ + AWDIPMonitorInterfaceAdvisoryReport * metric; \ + \ + metric = (AWDIPMonitorInterfaceAdvisoryReport *)report; \ + metric.name = value; \ + } + +void +InterfaceAdvisoryReportSetFlags(InterfaceAdvisoryReportRef report, + AWDIPMonitorInterfaceAdvisoryReport_Flags flags) +{ + INTERFACE_ADVISORY_REPORT_SET_PROP(report, flags, flags); +} + +void +InterfaceAdvisoryReportSetAdvisoryCount(InterfaceAdvisoryReportRef report, + uint32_t count) +{ + INTERFACE_ADVISORY_REPORT_SET_PROP(report, advisoryCount, count); +} + +#ifdef TEST_IPMONITOR_AWD_REPORT + +int +main(int argc, char * argv[]) +{ + InterfaceAdvisoryReportRef report; + AWDIPMonitorInterfaceType type; + + type = AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_WIFI; + report = InterfaceAdvisoryReportCreate(type); + if (report == NULL) { + fprintf(stderr, "WirelessDiagnostics framework not available\n"); + exit(1); + } + printf("Before setting values:\n"); + CFShow(report); + fflush(stdout); + + + /* set values */ + InterfaceAdvisoryReportSetFlags(report, + AWDIPMonitorInterfaceAdvisoryReport_Flags_LINK_LAYER_ISSUE + | AWDIPMonitorInterfaceAdvisoryReport_Flags_UPLINK_ISSUE); + InterfaceAdvisoryReportSetAdvisoryCount(report, 2); + + printf("After setting values:\n"); + CFShow(report); + fflush(stdout); + + InterfaceAdvisoryReportSubmit(report); + CFRelease(report); + if (argc > 1) { + fprintf(stderr, "pid is %d\n", getpid()); + sleep(120); + } +} + +#endif /* TEST_IPMONITOR_AWD_REPORT */ diff --git a/IPMonitorControl/IPMonitorControl.c b/IPMonitorControl/IPMonitorControl.c index 8336eb0..39950ce 100644 --- a/IPMonitorControl/IPMonitorControl.c +++ b/IPMonitorControl/IPMonitorControl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2017 Apple Inc. All rights reserved. + * Copyright (c) 2013-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -51,7 +51,7 @@ #define my_log(__level, __format, ...) SC_log(__level, __format, ## __VA_ARGS__) -#endif /* TEST_IPMONITOR_CONTROL */ +#endif /* TEST_IPMONITOR_CONTROL */ /** ** IPMonitorControl CF object glue @@ -60,12 +60,11 @@ struct IPMonitorControl { CFRuntimeBase cf_base; -#ifdef VERBOSE_ACTIVITY_LOGGING - os_activity_t activity; -#endif // VERBOSE_ACTIVITY_LOGGING dispatch_queue_t queue; xpc_connection_t connection; + CFMutableDictionaryRef assertions; /* ifname = rank */ + CFMutableDictionaryRef advisories; /* ifname = adv */ }; STATIC CFStringRef __IPMonitorControlCopyDebugDesc(CFTypeRef cf); @@ -104,14 +103,11 @@ __IPMonitorControlDeallocate(CFTypeRef cf) if (control->connection != NULL) { xpc_release(control->connection); } -#ifdef VERBOSE_ACTIVITY_LOGGING - if (control->activity != NULL) { - os_release(control->activity); - } -#endif // VERBOSE_ACTIVITY_LOGGING if (control->queue != NULL) { - xpc_release(control->queue); + dispatch_release(control->queue); } + my_CFRelease(&control->advisories); + my_CFRelease(&control->assertions); return; } @@ -144,6 +140,22 @@ __IPMonitorControlAllocate(CFAllocatorRef allocator) return (control); } +STATIC xpc_object_t +create_request_dictionary(void) +{ + const char * progname; + xpc_object_t request; + + request = xpc_dictionary_create(NULL, NULL, 0); + progname = getprogname(); + if (progname != NULL) { + xpc_dictionary_set_string(request, + kIPMonitorControlRequestKeyProcessName, + progname); + } + return (request); +} + STATIC Boolean IPMonitorControlHandleResponse(xpc_object_t event, Boolean async, Boolean * retry_p) @@ -167,7 +179,7 @@ IPMonitorControlHandleResponse(xpc_object_t event, Boolean async, success = FALSE; #ifdef TEST_IPMONITOR_CONTROL my_log(LOG_NOTICE, "failure code %lld", error); -#endif /* TEST_IPMONITOR_CONTROL */ +#endif /* TEST_IPMONITOR_CONTROL */ } else { success = TRUE; @@ -178,7 +190,7 @@ IPMonitorControlHandleResponse(xpc_object_t event, Boolean async, if (event == XPC_ERROR_CONNECTION_INTERRUPTED) { #ifdef TEST_IPMONITOR_CONTROL my_log(LOG_NOTICE, "can retry"); -#endif /* TEST_IPMONITOR_CONTROL */ +#endif /* TEST_IPMONITOR_CONTROL */ retry = TRUE; } else { @@ -199,9 +211,9 @@ IPMonitorControlHandleResponse(xpc_object_t event, Boolean async, STATIC void -IPMonitorControlSetInterfaceRank(IPMonitorControlRef control, - CFStringRef ifname_cf, - SCNetworkServicePrimaryRank rank) +_IPMonitorControlSetInterfacePrimaryRank(IPMonitorControlRef control, + CFStringRef ifname_cf, + SCNetworkServicePrimaryRank rank) { if (control->assertions == NULL) { if (rank == kSCNetworkServicePrimaryRankDefault) { @@ -216,8 +228,7 @@ IPMonitorControlSetInterfaceRank(IPMonitorControlRef control, if (rank == kSCNetworkServicePrimaryRankDefault) { CFDictionaryRemoveValue(control->assertions, ifname_cf); if (CFDictionaryGetCount(control->assertions) == 0) { - CFRelease(control->assertions); - control->assertions = NULL; + my_CFRelease(&control->assertions); } } else { @@ -245,7 +256,7 @@ ApplyInterfaceRank(const void * key, const void * value, void * context) if (!CFNumberGetValue(value, kCFNumberSInt32Type, &rank)) { return; } - request = xpc_dictionary_create(NULL, NULL, 0); + request = create_request_dictionary(); xpc_dictionary_set_uint64(request, kIPMonitorControlRequestKeyType, kIPMonitorControlRequestTypeSetInterfaceRank); @@ -261,6 +272,68 @@ ApplyInterfaceRank(const void * key, const void * value, void * context) } +STATIC void +_IPMonitorControlSetInterfaceAdvisory(IPMonitorControlRef control, + CFStringRef ifname_cf, + SCNetworkInterfaceAdvisory advisory) +{ + if (control->advisories == NULL) { + if (advisory == kSCNetworkInterfaceAdvisoryNone) { + /* no advisories, no need to store advisory */ + return; + } + control->advisories + = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + } + if (advisory == kSCNetworkInterfaceAdvisoryNone) { + CFDictionaryRemoveValue(control->advisories, ifname_cf); + if (CFDictionaryGetCount(control->advisories) == 0) { + my_CFRelease(&control->advisories); + } + } + else { + CFNumberRef advisory_cf; + + advisory_cf = CFNumberCreate(NULL, kCFNumberSInt32Type, &advisory); + CFDictionarySetValue(control->advisories, ifname_cf, advisory_cf); + CFRelease(advisory_cf); + } + return; +} + +STATIC void +ApplyInterfaceAdvisory(const void * key, const void * value, void * context) +{ + xpc_connection_t connection = (xpc_connection_t)context; + char ifname[IF_NAMESIZE]; + SCNetworkInterfaceAdvisory advisory; + xpc_object_t request; + + if (!CFStringGetCString(key, ifname, sizeof(ifname), + kCFStringEncodingUTF8)) { + return; + } + if (!CFNumberGetValue(value, kCFNumberSInt32Type, &advisory)) { + return; + } + request = create_request_dictionary(); + xpc_dictionary_set_uint64(request, + kIPMonitorControlRequestKeyType, + kIPMonitorControlRequestTypeSetInterfaceAdvisory); + xpc_dictionary_set_string(request, + kIPMonitorControlRequestKeyInterfaceName, + ifname); + xpc_dictionary_set_uint64(request, + kIPMonitorControlRequestKeyAdvisory, + advisory); + xpc_connection_send_message(connection, request); + xpc_release(request); + return; +} + + /** ** IPMonitorControl SPI **/ @@ -279,41 +352,68 @@ IPMonitorControlCreate(void) = xpc_connection_create_mach_service(kIPMonitorControlServerName, queue, flags); handler = ^(xpc_object_t event) { - os_activity_t activity; Boolean retry; - activity = os_activity_create("processing IPMonitor [rank] reply", - OS_ACTIVITY_CURRENT, - OS_ACTIVITY_FLAG_DEFAULT); - os_activity_scope(activity); - (void)IPMonitorControlHandleResponse(event, TRUE, &retry); - if (retry && control->assertions != NULL) { - CFDictionaryApplyFunction(control->assertions, - ApplyInterfaceRank, - control->connection); + if (retry) { + if (control->assertions != NULL) { + CFDictionaryApplyFunction(control->assertions, + ApplyInterfaceRank, + control->connection); + } + if (control->advisories != NULL) { + CFDictionaryApplyFunction(control->advisories, + ApplyInterfaceAdvisory, + control->connection); + } } - - os_release(activity); }; xpc_connection_set_event_handler(connection, handler); -#ifdef VERBOSE_ACTIVITY_LOGGING - control->activity = os_activity_create("accessing IPMonitor [rank] controls", - OS_ACTIVITY_CURRENT, - OS_ACTIVITY_FLAG_DEFAULT); -#endif // VERBOSE_ACTIVITY_LOGGING control->connection = connection; control->queue = queue; xpc_connection_resume(connection); return (control); } +STATIC xpc_object_t +IPMonitorControlSendRequest(IPMonitorControlRef control, + xpc_object_t request) +{ + xpc_object_t reply; + + while (TRUE) { + Boolean retry_on_error = FALSE; + Boolean success; + + reply = xpc_connection_send_message_with_reply_sync(control->connection, + request); + if (reply == NULL) { + my_log(LOG_NOTICE, "failed to send message"); + break; + } + success = IPMonitorControlHandleResponse(reply, FALSE, + &retry_on_error); + if (success) { + break; + } + xpc_release(reply); + reply = NULL; + if (retry_on_error) { + continue; + } + my_log(LOG_NOTICE, "fatal error"); + break; + } + return (reply); +} + PRIVATE_EXTERN Boolean IPMonitorControlSetInterfacePrimaryRank(IPMonitorControlRef control, CFStringRef ifname_cf, SCNetworkServicePrimaryRank rank) { char ifname[IF_NAMESIZE]; + xpc_object_t reply; xpc_object_t request; Boolean success = FALSE; @@ -322,11 +422,7 @@ IPMonitorControlSetInterfacePrimaryRank(IPMonitorControlRef control, return (FALSE); } -#ifdef VERBOSE_ACTIVITY_LOGGING - os_activity_scope(control->activity); -#endif // VERBOSE_ACTIVITY_LOGGING - - request = xpc_dictionary_create(NULL, NULL, 0); + request = create_request_dictionary(); xpc_dictionary_set_uint64(request, kIPMonitorControlRequestKeyType, kIPMonitorControlRequestTypeSetInterfaceRank); @@ -336,38 +432,20 @@ IPMonitorControlSetInterfacePrimaryRank(IPMonitorControlRef control, xpc_dictionary_set_uint64(request, kIPMonitorControlRequestKeyPrimaryRank, rank); - while (TRUE) { - xpc_object_t reply; - Boolean retry_on_error = FALSE; - - reply = xpc_connection_send_message_with_reply_sync(control->connection, - request); - if (reply == NULL) { - my_log(LOG_NOTICE, "failed to send message"); - break; - } - success = IPMonitorControlHandleResponse(reply, FALSE, - &retry_on_error); - xpc_release(reply); - if (success) { - break; - } - if (retry_on_error) { - continue; - } - my_log(LOG_NOTICE, "fatal error"); - break; - } + reply = IPMonitorControlSendRequest(control, request); xpc_release(request); - if (success) { + if (reply != NULL) { + success = TRUE; + xpc_release(reply); + /* sync our state */ CFRetain(ifname_cf); CFRetain(control); dispatch_async(control->queue, ^{ - IPMonitorControlSetInterfaceRank(control, - ifname_cf, - rank); + _IPMonitorControlSetInterfacePrimaryRank(control, + ifname_cf, + rank); CFRelease(ifname_cf); CFRelease(control); }); @@ -375,12 +453,13 @@ IPMonitorControlSetInterfacePrimaryRank(IPMonitorControlRef control, return (success); } -SCNetworkServicePrimaryRank +PRIVATE_EXTERN SCNetworkServicePrimaryRank IPMonitorControlGetInterfacePrimaryRank(IPMonitorControlRef control, CFStringRef ifname_cf) { char ifname[IF_NAMESIZE]; SCNetworkServicePrimaryRank rank; + xpc_object_t reply; xpc_object_t request; rank = kSCNetworkServicePrimaryRankDefault; @@ -389,45 +468,138 @@ IPMonitorControlGetInterfacePrimaryRank(IPMonitorControlRef control, return rank; } -#ifdef VERBOSE_ACTIVITY_LOGGING - os_activity_scope(control->activity); -#endif // VERBOSE_ACTIVITY_LOGGING - - request = xpc_dictionary_create(NULL, NULL, 0); + request = create_request_dictionary(); xpc_dictionary_set_uint64(request, kIPMonitorControlRequestKeyType, kIPMonitorControlRequestTypeGetInterfaceRank); xpc_dictionary_set_string(request, kIPMonitorControlRequestKeyInterfaceName, ifname); - while (TRUE) { - xpc_object_t reply; - Boolean retry_on_error = FALSE; - Boolean success; + reply = IPMonitorControlSendRequest(control, request); + if (reply != NULL) { + rank = (SCNetworkServicePrimaryRank) + xpc_dictionary_get_uint64(reply, + kIPMonitorControlResponseKeyPrimaryRank); + xpc_release(reply); + } + xpc_release(request); + return (rank); +} - reply = xpc_connection_send_message_with_reply_sync(control->connection, - request); - if (reply == NULL) { - my_log(LOG_NOTICE, "failed to send message"); - break; - } - success = IPMonitorControlHandleResponse(reply, FALSE, &retry_on_error); - if (success) { - rank = (SCNetworkServicePrimaryRank) - xpc_dictionary_get_uint64(reply, - kIPMonitorControlResponseKeyPrimaryRank); - } +PRIVATE_EXTERN Boolean +IPMonitorControlSetInterfaceAdvisory(IPMonitorControlRef control, + CFStringRef ifname_cf, + SCNetworkInterfaceAdvisory advisory, + CFStringRef reason) +{ + char ifname[IF_NAMESIZE]; + char * reason_str = NULL; + xpc_object_t reply; + xpc_object_t request; + Boolean success = FALSE; + + if (!CFStringGetCString(ifname_cf, ifname, sizeof(ifname), + kCFStringEncodingUTF8)) { + return (FALSE); + } + if (reason != NULL) { + reason_str + = _SC_cfstring_to_cstring(reason, NULL, 0, kCFStringEncodingUTF8); + } + request = create_request_dictionary(); + xpc_dictionary_set_uint64(request, + kIPMonitorControlRequestKeyType, + kIPMonitorControlRequestTypeSetInterfaceAdvisory); + xpc_dictionary_set_string(request, + kIPMonitorControlRequestKeyInterfaceName, + ifname); + xpc_dictionary_set_uint64(request, + kIPMonitorControlRequestKeyAdvisory, + advisory); + if (reason_str != NULL) { + xpc_dictionary_set_string(request, + kIPMonitorControlRequestKeyReason, + reason_str); + CFAllocatorDeallocate(NULL, reason_str); + } + reply = IPMonitorControlSendRequest(control, request); + xpc_release(request); + if (reply != NULL) { xpc_release(reply); - if (success) { - break; - } - if (retry_on_error) { - continue; - } - break; + success = TRUE; + + /* sync our state */ + CFRetain(ifname_cf); + CFRetain(control); + dispatch_async(control->queue, + ^{ + _IPMonitorControlSetInterfaceAdvisory(control, + ifname_cf, + advisory); + CFRelease(ifname_cf); + CFRelease(control); + }); + } + return (success); +} + +PRIVATE_EXTERN Boolean +IPMonitorControlInterfaceAdvisoryIsSet(IPMonitorControlRef control, + CFStringRef ifname_cf) +{ + char ifname[IF_NAMESIZE]; + xpc_object_t reply; + xpc_object_t request; + Boolean is_set = FALSE; + + if (!CFStringGetCString(ifname_cf, ifname, sizeof(ifname), + kCFStringEncodingUTF8)) { + return (FALSE); } + request = create_request_dictionary(); + xpc_dictionary_set_uint64(request, + kIPMonitorControlRequestKeyType, + kIPMonitorControlRequestTypeInterfaceAdvisoryIsSet); + xpc_dictionary_set_string(request, + kIPMonitorControlRequestKeyInterfaceName, + ifname); + reply = IPMonitorControlSendRequest(control, request); xpc_release(request); + if (reply != NULL) { + if (xpc_dictionary_get_bool(reply, + kIPMonitorControlResponseKeyAdvisoryIsSet)) { + is_set = TRUE; + } + xpc_release(reply); + } + return (is_set); +} - return (rank); +PRIVATE_EXTERN Boolean +IPMonitorControlAnyInterfaceAdvisoryIsSet(IPMonitorControlRef control) +{ + xpc_object_t reply; + xpc_object_t request; + Boolean is_set = FALSE; + + request = create_request_dictionary(); + xpc_dictionary_set_uint64(request, + kIPMonitorControlRequestKeyType, + kIPMonitorControlRequestTypeAnyInterfaceAdvisoryIsSet); + reply = IPMonitorControlSendRequest(control, request); + xpc_release(request); + if (reply != NULL) { + if (xpc_dictionary_get_bool(reply, + kIPMonitorControlResponseKeyAdvisoryIsSet)) { + is_set = TRUE; + } + xpc_release(reply); + } + return (is_set); } +PRIVATE_EXTERN CFStringRef +IPMonitorControlCopyInterfaceAdvisoryNotificationKey(CFStringRef ifname) +{ + return (_IPMonitorControlCopyInterfaceAdvisoryNotificationKey(ifname)); +} diff --git a/IPMonitorControl/IPMonitorControl.h b/IPMonitorControl/IPMonitorControl.h index 2442a0e..64052fd 100644 --- a/IPMonitorControl/IPMonitorControl.h +++ b/IPMonitorControl/IPMonitorControl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Apple Inc. All rights reserved. + * Copyright (c) 2013-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -52,4 +52,18 @@ SCNetworkServicePrimaryRank IPMonitorControlGetInterfacePrimaryRank(IPMonitorControlRef control, CFStringRef ifname); +Boolean +IPMonitorControlSetInterfaceAdvisory(IPMonitorControlRef control, + CFStringRef ifname, + SCNetworkInterfaceAdvisory advisory, + CFStringRef reason); +Boolean +IPMonitorControlInterfaceAdvisoryIsSet(IPMonitorControlRef control, + CFStringRef ifname); +Boolean +IPMonitorControlAnyInterfaceAdvisoryIsSet(IPMonitorControlRef control); + +CFStringRef +IPMonitorControlCopyInterfaceAdvisoryNotificationKey(CFStringRef ifname); + #endif /* _IPMONITOR_CONTROL_H */ diff --git a/IPMonitorControl/IPMonitorControlPrivate.h b/IPMonitorControl/IPMonitorControlPrivate.h index 5e23a5e..cd048fb 100644 --- a/IPMonitorControl/IPMonitorControlPrivate.h +++ b/IPMonitorControl/IPMonitorControlPrivate.h @@ -9,6 +9,9 @@ typedef CF_ENUM(uint32_t, IPMonitorControlRequestType) { kIPMonitorControlRequestTypeNone = 0, kIPMonitorControlRequestTypeSetInterfaceRank = 1, kIPMonitorControlRequestTypeGetInterfaceRank = 2, + kIPMonitorControlRequestTypeSetInterfaceAdvisory = 3, + kIPMonitorControlRequestTypeInterfaceAdvisoryIsSet = 4, + kIPMonitorControlRequestTypeAnyInterfaceAdvisoryIsSet = 5, }; /* @@ -16,8 +19,11 @@ typedef CF_ENUM(uint32_t, IPMonitorControlRequestType) { * - keys used to communicate a request to the server */ #define kIPMonitorControlRequestKeyType "Type" +#define kIPMonitorControlRequestKeyProcessName "ProcessName" #define kIPMonitorControlRequestKeyInterfaceName "InterfaceName" #define kIPMonitorControlRequestKeyPrimaryRank "PrimaryRank" +#define kIPMonitorControlRequestKeyAdvisory "Advisory" +#define kIPMonitorControlRequestKeyReason "Reason" /* * kIPMonitorControlResponseKey* @@ -25,5 +31,26 @@ typedef CF_ENUM(uint32_t, IPMonitorControlRequestType) { */ #define kIPMonitorControlResponseKeyError "Error" #define kIPMonitorControlResponseKeyPrimaryRank "PrimaryRank" +#define kIPMonitorControlResponseKeyAdvisoryIsSet "AdvisoryIsSet" + +static inline CFStringRef +_IPMonitorControlCopyInterfaceAdvisoryNotificationKey(CFStringRef ifname) +{ + return SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, + kSCDynamicStoreDomainState, + ifname, + CFSTR("Advisory")); +} + +static inline void +my_CFRelease(void * t) +{ + void * * obj = (void * *)t; + if (obj && *obj) { + CFRelease(*obj); + *obj = NULL; + } + return; +} #endif /* _IPMONITOR_CONTROL_PRIVATE_H */ diff --git a/IPMonitorControl/IPMonitorControlServer.c b/IPMonitorControl/IPMonitorControlServer.c index b4563fc..cbdd9dc 100644 --- a/IPMonitorControl/IPMonitorControlServer.c +++ b/IPMonitorControl/IPMonitorControlServer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2017 Apple Inc. All rights reserved. + * Copyright (c) 2013-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -40,10 +40,11 @@ #include #include #include +#include #include "IPMonitorControlServer.h" #include "symbol_scope.h" #include "IPMonitorControlPrivate.h" -#include +#include "IPMonitorAWDReport.h" #ifdef TEST_IPMONITOR_CONTROL #define my_log(__level, __format, ...) SCPrint(TRUE, stdout, CFSTR(__format "\n"), ## __VA_ARGS__) @@ -63,7 +64,9 @@ LIST_HEAD_ControlSession S_ControlSessions; struct ControlSession { LIST_ENTRY_ControlSession link; xpc_connection_t connection; + CFMutableDictionaryRef assertions; /* ifname = rank */ + CFMutableDictionaryRef advisories; /* ifname = advisory */ }; /** @@ -72,6 +75,20 @@ struct ControlSession { STATIC CFMutableArrayRef S_if_changes; STATIC CFRange S_if_changes_range; +STATIC CFNumberRef +RankLastNumberGet(void) +{ + STATIC CFNumberRef rank_last; + + if (rank_last == NULL) { + SCNetworkServicePrimaryRank rank; + + rank = kSCNetworkServicePrimaryRankLast; + rank_last = CFNumberCreate(NULL, kCFNumberSInt32Type, &rank); + } + return (rank_last); +} + STATIC void InterfaceChangedListAddInterface(CFStringRef ifname) { @@ -122,6 +139,34 @@ InterfaceRankAssertionAdd(const void * key, const void * value, void * context) return; } +STATIC void +InterfaceAdvisoryAdd(const void * key, const void * value, void * context) +{ +#pragma unused(value) + CFMutableDictionaryRef * assertions_p; + CFNumberRef existing_rank; + CFNumberRef rank; + + /* an interface advisory implies RankLast */ + rank = RankLastNumberGet(); + assertions_p = (CFMutableDictionaryRef *)context; + if (*assertions_p == NULL) { + *assertions_p + = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + CFDictionarySetValue(*assertions_p, key, rank); + return; + } + existing_rank = CFDictionaryGetValue(*assertions_p, key); + if (existing_rank == NULL + || (CFNumberCompare(rank, existing_rank, NULL) + == kCFCompareGreaterThan)) { + CFDictionarySetValue(*assertions_p, key, rank); + } + return; +} + STATIC CFDictionaryRef InterfaceRankAssertionsCopy(void) { @@ -129,16 +174,101 @@ InterfaceRankAssertionsCopy(void) ControlSessionRef session; LIST_FOREACH(session, &S_ControlSessions, link) { - if (session->assertions == NULL) { - continue; + if (session->advisories != NULL) { + CFDictionaryApplyFunction(session->advisories, + InterfaceAdvisoryAdd, + &assertions); + } + if (session->assertions != NULL) { + CFDictionaryApplyFunction(session->assertions, + InterfaceRankAssertionAdd, + &assertions); } - CFDictionaryApplyFunction(session->assertions, - InterfaceRankAssertionAdd, - &assertions); } return (assertions); } +STATIC Boolean +InterfaceHasAdvisories(CFStringRef ifname) +{ + ControlSessionRef session; + + LIST_FOREACH(session, &S_ControlSessions, link) { + if (session->advisories != NULL + && CFDictionaryContainsKey(session->advisories, ifname)) { + return (TRUE); + } + } + return (FALSE); +} + + +STATIC AWDIPMonitorInterfaceAdvisoryReport_Flags +advisory_to_flags(SCNetworkInterfaceAdvisory advisory) +{ + AWDIPMonitorInterfaceAdvisoryReport_Flags flags; + + switch (advisory) { + case kSCNetworkInterfaceAdvisoryNone: + default: + flags = 0; + break; + case kSCNetworkInterfaceAdvisoryLinkLayerIssue: + flags = AWDIPMonitorInterfaceAdvisoryReport_Flags_LINK_LAYER_ISSUE; + break; + case kSCNetworkInterfaceAdvisoryUplinkIssue: + flags = AWDIPMonitorInterfaceAdvisoryReport_Flags_UPLINK_ISSUE; + break; + } + return (flags); +} + +STATIC AWDIPMonitorInterfaceAdvisoryReport_Flags +InterfaceGetAdvisoryFlags(CFStringRef ifname, + ControlSessionRef exclude_session, + uint32_t * ret_count) +{ + uint32_t count; + AWDIPMonitorInterfaceAdvisoryReport_Flags flags = 0; + ControlSessionRef session; + + count = 0; + LIST_FOREACH(session, &S_ControlSessions, link) { + SCNetworkInterfaceAdvisory advisory = 0; + CFNumberRef advisory_cf; + + if (session->advisories == NULL) { + continue; + } + if (exclude_session != NULL && exclude_session == session) { + continue; + } + advisory_cf = CFDictionaryGetValue(session->advisories, ifname); + if (advisory_cf == NULL) { + /* session has no advisories for this interface */ + continue; + } + (void)CFNumberGetValue(advisory_cf, kCFNumberSInt32Type, &advisory); + flags |= advisory_to_flags(advisory); + count++; + } + *ret_count = count; + return (flags); +} + +STATIC Boolean +AnyInterfaceHasAdvisories(void) +{ + ControlSessionRef session; + + LIST_FOREACH(session, &S_ControlSessions, link) { + if (session->advisories != NULL) { + return (TRUE); + } + } + return (FALSE); +} + STATIC CFRunLoopRef S_runloop; STATIC CFRunLoopSourceRef S_signal_source; @@ -151,7 +281,7 @@ SetNotificationInfo(CFRunLoopRef runloop, CFRunLoopSourceRef rls) } STATIC void -GenerateNotification(void) +NotifyIPMonitor(void) { if (S_signal_source != NULL) { CFRunLoopSourceSignal(S_signal_source); @@ -162,6 +292,43 @@ GenerateNotification(void) return; } +STATIC void +NotifyInterfaceAdvisory(CFStringRef ifname) +{ + CFStringRef key; + + key = _IPMonitorControlCopyInterfaceAdvisoryNotificationKey(ifname); + SCDynamicStoreNotifyValue(NULL, key); + CFRelease(key); + return; +} + +STATIC void +SubmitInterfaceAdvisoryMetric(CFStringRef ifname, + AWDIPMonitorInterfaceAdvisoryReport_Flags flags, + uint32_t count) +{ + InterfaceAdvisoryReportRef report; + AWDIPMonitorInterfaceType type; + + /* XXX need to actually figure out what the interface type is */ + if (CFStringHasPrefix(ifname, CFSTR("pdp"))) { + type = AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_CELLULAR; + } + else { + type = AWDIPMonitorInterfaceType_IPMONITOR_INTERFACE_TYPE_WIFI; + } + report = InterfaceAdvisoryReportCreate(type); + if (report == NULL) { + return; + } + InterfaceAdvisoryReportSetFlags(report, flags); + InterfaceAdvisoryReportSetAdvisoryCount(report, count); + InterfaceAdvisoryReportSubmit(report); + my_log(LOG_NOTICE, "%@: submitted AWD report %@", ifname, report); + CFRelease(report); +} + /** ** ControlSession **/ @@ -174,22 +341,79 @@ AddChangedInterface(const void * key, const void * value, void * context) return; } +STATIC void +AddChangedInterfaceNotify(const void * key, const void * value, void * context) +{ +#pragma unused(value) +#pragma unused(context) + InterfaceChangedListAddInterface((CFStringRef)key); + NotifyInterfaceAdvisory((CFStringRef)key); + return; +} + +STATIC void +GenerateMetricForInterfaceAtSessionClose(const void * key, const void * value, + void * context) +{ + uint32_t count_after; + uint32_t count_before; + AWDIPMonitorInterfaceAdvisoryReport_Flags flags_after; + AWDIPMonitorInterfaceAdvisoryReport_Flags flags_before; + CFStringRef ifname = (CFStringRef)key; + ControlSessionRef session = (ControlSessionRef)context; + +#pragma unused(value) + /* + * Get the flags and count including this session, then again + * excluding this session. If either flags or count are different, + * generate the metric. + */ + flags_before = InterfaceGetAdvisoryFlags(ifname, NULL, &count_before); + flags_after = InterfaceGetAdvisoryFlags(ifname, session, &count_after); + if (flags_before != flags_after || count_before != count_after) { + SubmitInterfaceAdvisoryMetric(ifname, flags_after, count_after); + } + return; +} + +STATIC void +ControlSessionGenerateMetricsAtClose(ControlSessionRef session) +{ + if (session->advisories == NULL) { + return; + } + CFDictionaryApplyFunction(session->advisories, + GenerateMetricForInterfaceAtSessionClose, + session); +} + STATIC void ControlSessionInvalidate(ControlSessionRef session) { my_log(LOG_DEBUG, "Invalidating %p", session); + ControlSessionGenerateMetricsAtClose(session); LIST_REMOVE(session, link); - if (session->assertions != NULL) { - my_log(LOG_DEBUG, - "IPMonitorControlServer: %p pid %d removing assertions %@", - session->connection, - xpc_connection_get_pid(session->connection), - session->assertions); - CFDictionaryApplyFunction(session->assertions, AddChangedInterface, - NULL); - CFRelease(session->assertions); - session->assertions = NULL; - GenerateNotification(); + if (session->assertions != NULL || session->advisories != NULL) { + if (session->advisories != NULL) { + my_log(LOG_NOTICE, + "pid %d removing advisories %@", + xpc_connection_get_pid(session->connection), + session->advisories); + CFDictionaryApplyFunction(session->advisories, + AddChangedInterfaceNotify, + NULL); + my_CFRelease(&session->advisories); + } + if (session->assertions != NULL) { + my_log(LOG_NOTICE, + "pid %d removing assertions %@", + xpc_connection_get_pid(session->connection), + session->assertions); + CFDictionaryApplyFunction(session->assertions, AddChangedInterface, + NULL); + my_CFRelease(&session->assertions); + } + NotifyIPMonitor(); } return; } @@ -214,7 +438,7 @@ ControlSessionCreate(xpc_connection_t connection) ControlSessionRef session; session = (ControlSessionRef)malloc(sizeof(*session)); - bzero(session, sizeof(*session)); + memset(session, 0, sizeof(*session)); session->connection = connection; xpc_connection_set_finalizer_f(connection, ControlSessionRelease); xpc_connection_set_context(connection, session); @@ -224,7 +448,7 @@ ControlSessionCreate(xpc_connection_t connection) } STATIC ControlSessionRef -ControlSessionGet(xpc_connection_t connection) +ControlSessionForConnection(xpc_connection_t connection) { ControlSessionRef session; @@ -270,7 +494,7 @@ ControlSessionSetInterfaceRank(ControlSessionRef session, CFRelease(rank_cf); } InterfaceChangedListAddInterface(ifname_cf); - GenerateNotification(); + NotifyIPMonitor(); CFRelease(ifname_cf); return; } @@ -296,11 +520,75 @@ ControlSessionGetInterfaceRank(ControlSessionRef session, return (rank); } +STATIC void +ControlSessionSetInterfaceAdvisory(ControlSessionRef session, + const char * ifname, + SCNetworkInterfaceAdvisory advisory) +{ + uint32_t count_after; + uint32_t count_before; + AWDIPMonitorInterfaceAdvisoryReport_Flags flags_after; + AWDIPMonitorInterfaceAdvisoryReport_Flags flags_before; + CFStringRef ifname_cf; + + if (session->advisories == NULL) { + if (advisory == kSCNetworkInterfaceAdvisoryNone) { + /* no advisories, no need to store advisory */ + return; + } + session->advisories + = CFDictionaryCreateMutable(NULL, 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + } + ifname_cf = CFStringCreateWithCString(NULL, ifname, + kCFStringEncodingUTF8); + flags_before = InterfaceGetAdvisoryFlags(ifname_cf, NULL, &count_before); + if (advisory == kSCNetworkInterfaceAdvisoryNone) { + CFDictionaryRemoveValue(session->advisories, ifname_cf); + if (CFDictionaryGetCount(session->advisories) == 0) { + CFRelease(session->advisories); + session->advisories = NULL; + } + } + else { + CFNumberRef advisory_cf; + + advisory_cf = CFNumberCreate(NULL, kCFNumberSInt32Type, &advisory); + CFDictionarySetValue(session->advisories, ifname_cf, advisory_cf); + CFRelease(advisory_cf); + } + flags_after = InterfaceGetAdvisoryFlags(ifname_cf, NULL, &count_after); + if (flags_before != flags_after || count_before != count_after) { + SubmitInterfaceAdvisoryMetric(ifname_cf, flags_after, count_after); + } + InterfaceChangedListAddInterface(ifname_cf); + NotifyInterfaceAdvisory(ifname_cf); + NotifyIPMonitor(); + CFRelease(ifname_cf); + return; +} + /** ** IPMonitorControlServer **/ + +STATIC const char * +get_process_name(xpc_object_t request) +{ + const char * process_name; + + process_name + = xpc_dictionary_get_string(request, + kIPMonitorControlRequestKeyProcessName); + if (process_name == NULL) { + process_name = ""; + } + return (process_name); +} + STATIC Boolean -IPMonitorControlServerValidateConnection(xpc_connection_t connection) +IPMonitorControlServerConnectionIsRoot(xpc_connection_t connection) { uid_t uid; @@ -308,17 +596,62 @@ IPMonitorControlServerValidateConnection(xpc_connection_t connection) return (uid == 0); } +STATIC Boolean +IPMonitorControlServerConnectionHasEntitlement(xpc_connection_t connection, + const char * entitlement) +{ + Boolean entitled = FALSE; + xpc_object_t val; + + val = xpc_connection_copy_entitlement_value(connection, entitlement); + if (val != NULL) { + if (xpc_get_type(val) == XPC_TYPE_BOOL) { + entitled = xpc_bool_get_value(val); + } + xpc_release(val); + } + return (entitled); +} + +STATIC const char * +get_rank_str(SCNetworkServicePrimaryRank rank) +{ + const char * str = NULL; + + switch (rank) { + case kSCNetworkServicePrimaryRankDefault: + str = "Default"; + break; + case kSCNetworkServicePrimaryRankFirst: + str = "First"; + break; + case kSCNetworkServicePrimaryRankLast: + str = "Last"; + break; + case kSCNetworkServicePrimaryRankNever: + str = "Never"; + break; + case kSCNetworkServicePrimaryRankScoped: + str = "Scoped"; + break; + default: + break; + } + return (str); +} + STATIC int -IPMonitorControlServerHandleSetInterfaceRank(xpc_connection_t connection, - xpc_object_t request, - xpc_object_t reply) +HandleSetInterfaceRank(xpc_connection_t connection, + xpc_object_t request, + xpc_object_t reply) { #pragma unused(reply) const char * ifname; SCNetworkServicePrimaryRank rank; + const char * rank_str; ControlSessionRef session; - if (!IPMonitorControlServerValidateConnection(connection)) { + if (!IPMonitorControlServerConnectionIsRoot(connection)) { my_log(LOG_INFO, "connection %p pid %d permission denied", connection, xpc_connection_get_pid(connection)); return (EPERM); @@ -332,27 +665,22 @@ IPMonitorControlServerHandleSetInterfaceRank(xpc_connection_t connection, rank = (SCNetworkServicePrimaryRank) xpc_dictionary_get_uint64(request, kIPMonitorControlRequestKeyPrimaryRank); - switch (rank) { - case kSCNetworkServicePrimaryRankDefault: - case kSCNetworkServicePrimaryRankFirst: - case kSCNetworkServicePrimaryRankLast: - case kSCNetworkServicePrimaryRankNever: - case kSCNetworkServicePrimaryRankScoped: - break; - default: + rank_str = get_rank_str(rank); + if (rank_str == NULL) { return (EINVAL); } - session = ControlSessionGet(connection); + session = ControlSessionForConnection(connection); ControlSessionSetInterfaceRank(session, ifname, rank); - my_log(LOG_INFO, "connection %p pid %d set %s %u", - connection, xpc_connection_get_pid(connection), ifname, rank); + my_log(LOG_NOTICE, "%s[%d] SetInterfaceRank(%s) = %s (%u)", + get_process_name(request), + xpc_connection_get_pid(connection), ifname, rank_str, rank); return (0); } STATIC int -IPMonitorControlServerHandleGetInterfaceRank(xpc_connection_t connection, - xpc_object_t request, - xpc_object_t reply) +HandleGetInterfaceRank(xpc_connection_t connection, + xpc_object_t request, + xpc_object_t reply) { const char * ifname; SCNetworkServicePrimaryRank rank; @@ -379,12 +707,125 @@ IPMonitorControlServerHandleGetInterfaceRank(xpc_connection_t connection, return (0); } +STATIC const char * +get_advisory_str(SCNetworkInterfaceAdvisory advisory) +{ + const char * str = NULL; + + switch (advisory) { + case kSCNetworkInterfaceAdvisoryNone: + str = "None"; + break; + case kSCNetworkInterfaceAdvisoryLinkLayerIssue: + str = "LinkLayerIssue"; + break; + case kSCNetworkInterfaceAdvisoryUplinkIssue: + str = "UplinkIssue"; + break; + default: + break; + } + return (str); +} + +STATIC int +HandleSetInterfaceAdvisory(xpc_connection_t connection, + xpc_object_t request, + xpc_object_t reply) +{ +#pragma unused(reply) + SCNetworkInterfaceAdvisory advisory; + const char * advisory_str; + const char * ifname; + const char * reason; + ControlSessionRef session; + +#define ENTITLEMENT "com.apple.SystemConfiguration.SCNetworkInterfaceSetAdvisory" + if (!IPMonitorControlServerConnectionIsRoot(connection) + && !IPMonitorControlServerConnectionHasEntitlement(connection, + ENTITLEMENT)) { + my_log(LOG_INFO, "connection %p pid %d permission denied", + connection, xpc_connection_get_pid(connection)); + return (EPERM); + } + ifname + = xpc_dictionary_get_string(request, + kIPMonitorControlRequestKeyInterfaceName); + if (ifname == NULL) { + return (EINVAL); + } + reason + = xpc_dictionary_get_string(request, + kIPMonitorControlRequestKeyReason); + advisory = (SCNetworkInterfaceAdvisory) + xpc_dictionary_get_uint64(request, kIPMonitorControlRequestKeyAdvisory); + + /* validate the advisory code */ + advisory_str = get_advisory_str(advisory); + if (advisory_str == NULL) { + return (EINVAL); + } + session = ControlSessionForConnection(connection); + ControlSessionSetInterfaceAdvisory(session, ifname, advisory); + my_log(LOG_NOTICE, "%s[%d] SetInterfaceAdvisory(%s) = %s (%u) reason='%s'", + get_process_name(request), + xpc_connection_get_pid(connection), ifname, advisory_str, advisory, + reason != NULL ? reason : "" ); + return (0); +} + +STATIC int +HandleInterfaceAdvisoryIsSet(xpc_connection_t connection, + xpc_object_t request, + xpc_object_t reply) +{ +#pragma unused(connection) + const char * ifname; + CFStringRef ifname_cf; + + if (reply == NULL) { + /* no point in processing the request if we can't provide an answer */ + return (EINVAL); + } + ifname + = xpc_dictionary_get_string(request, + kIPMonitorControlRequestKeyInterfaceName); + if (ifname == NULL) { + return (EINVAL); + } + ifname_cf = CFStringCreateWithCString(NULL, ifname, + kCFStringEncodingUTF8); + xpc_dictionary_set_bool(reply, + kIPMonitorControlResponseKeyAdvisoryIsSet, + InterfaceHasAdvisories(ifname_cf)); + CFRelease(ifname_cf); + return (0); +} + +STATIC int +HandleAnyInterfaceAdvisoryIsSet(xpc_connection_t connection, + xpc_object_t request, + xpc_object_t reply) +{ +#pragma unused(connection) +#pragma unused(request) + if (reply == NULL) { + /* no point in processing the request if we can't provide an answer */ + return (EINVAL); + } + xpc_dictionary_set_bool(reply, + kIPMonitorControlResponseKeyAdvisoryIsSet, + AnyInterfaceHasAdvisories()); + return (0); +} + STATIC void IPMonitorControlServerHandleDisconnect(xpc_connection_t connection) { ControlSessionRef session; - my_log(LOG_DEBUG, "IPMonitorControlServer: client %p went away", connection); + my_log(LOG_DEBUG, "IPMonitorControlServer: client %p went away", + connection); session = ControlSessionLookup(connection); if (session == NULL) { /* never asserted anything */ @@ -413,14 +854,19 @@ IPMonitorControlServerHandleRequest(xpc_connection_t connection, reply = xpc_dictionary_create_reply(request); switch (request_type) { case kIPMonitorControlRequestTypeSetInterfaceRank: - error = IPMonitorControlServerHandleSetInterfaceRank(connection, - request, - reply); + error = HandleSetInterfaceRank(connection, request, reply); break; case kIPMonitorControlRequestTypeGetInterfaceRank: - error = IPMonitorControlServerHandleGetInterfaceRank(connection, - request, - reply); + error = HandleGetInterfaceRank(connection, request, reply); + break; + case kIPMonitorControlRequestTypeSetInterfaceAdvisory: + error = HandleSetInterfaceAdvisory(connection, request, reply); + break; + case kIPMonitorControlRequestTypeInterfaceAdvisoryIsSet: + error = HandleInterfaceAdvisoryIsSet(connection, request, reply); + break; + case kIPMonitorControlRequestTypeAnyInterfaceAdvisoryIsSet: + error = HandleAnyInterfaceAdvisoryIsSet(connection, request, reply); break; default: error = EINVAL; diff --git a/IPMonitorControl/Makefile b/IPMonitorControl/Makefile index 3830ae6..7119dcc 100644 --- a/IPMonitorControl/Makefile +++ b/IPMonitorControl/Makefile @@ -5,7 +5,7 @@ ifeq ($(PLATFORM),iphoneos) # iOS internal SDK CORETELEPHONY=-framework CoreTelephony -ARCHS=armv7 +ARCHS=arm64 endif ifeq ($(PLATFORM),macosx) @@ -29,11 +29,13 @@ CC = xcrun -sdk $(SDK) cc PF_INC = -F$(SYSROOT)/System/Library/PrivateFrameworks endif -SC_PRIV=-DUSE_SYSTEMCONFIGURATION_PRIVATE_HEADERS ARCH_FLAGS=$(foreach a,$(ARCHS),-arch $(a)) if_rank_assert: IPMonitorControlServer.c IPMonitorControl.c main.c - $(CC) $(SC_PRIV) -DTEST_IPMONITOR_CONTROL -I$(SYSROOT)/System/Library/Frameworks/System.framework/PrivateHeaders $(ARCH_FLAGS) -isysroot $(SYSROOT) $(PF_INC) -framework CoreFoundation -framework SystemConfiguration -Wall -g -o $@ $^ + $(CC) -DTEST_IPMONITOR_CONTROL -I$(SYSROOT)/System/Library/Frameworks/System.framework/PrivateHeaders $(ARCH_FLAGS) -isysroot $(SYSROOT) $(PF_INC) -framework CoreFoundation -framework SystemConfiguration -Wall -g -o $@ $^ + +IPMonitorAWDReportTest: IPMonitorAWDReport.m + $(CC) -isysroot $(SYSROOT) $(ARCH_FLAGS) -g -Wall -DTEST_IPMONITOR_AWD_REPORT -framework Foundation -weak_framework WirelessDiagnostics -framework CoreFoundation -framework SystemConfiguration -framework ProtocolBuffer $(PF_INC) -I AWD AWD/AWDIPMonitorInterfaceAdvisoryReport.m -o $@ $^ clean: rm -rf *.dSYM *~ *.o if_rank_assert diff --git a/IPMonitorControl/awdgen.yaml b/IPMonitorControl/awdgen.yaml new file mode 100644 index 0000000..43c2cee --- /dev/null +++ b/IPMonitorControl/awdgen.yaml @@ -0,0 +1,4 @@ +component: IPMonitor +output_directory: IPMonitorControl/AWD +package: AWD +language: objc-no-arc diff --git a/IPMonitorControl/main.c b/IPMonitorControl/main.c index 150b2b1..9b227e3 100644 --- a/IPMonitorControl/main.c +++ b/IPMonitorControl/main.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2013, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2013, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -41,7 +41,7 @@ #include "IPMonitorControlServer.h" #include "symbol_scope.h" -STATIC void +STATIC void AssertionsChanged(void * info) { CFDictionaryRef assertions = NULL; @@ -130,7 +130,7 @@ main(int argc, char * argv[]) CFRunLoopSourceRef rls; STATIC Boolean verbose = TRUE; - bzero(&context, sizeof(context)); + memset(&context, 0, sizeof(context)); context.info = (void *)NULL; context.perform = AssertionsChanged; rls = CFRunLoopSourceCreate(NULL, 0, &context); diff --git a/Plugins/IPMonitor/Makefile b/Plugins/IPMonitor/Makefile index 96fa4e4..7517809 100644 --- a/Plugins/IPMonitor/Makefile +++ b/Plugins/IPMonitor/Makefile @@ -94,7 +94,7 @@ dns-configurationX.o: Makefile dns-configuration.h dns-configuration.c dnsinfo_c $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -DMAIN ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o dns-configurationX.o dns-configuration.c test_dns: ip_pluginX.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configurationX.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o - $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o test_dns ip_pluginX.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configurationX.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension + $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o test_dns ip_pluginX.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configurationX.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -lnetwork -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension # ---------- @@ -102,7 +102,7 @@ proxy-configurationX.o: Makefile proxy-configuration.h proxy-configuration.c $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -DMAIN ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o proxy-configurationX.o proxy-configuration.c test_proxy: ip_pluginX.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configurationX.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o - $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o test_proxy ip_pluginX.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configurationX.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension + $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o test_proxy ip_pluginX.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configurationX.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -lnetwork -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension # ---------- @@ -110,7 +110,7 @@ set-hostnameX.o: Makefile set-hostname.h set-hostname.c $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -DMAIN -DDEBUG ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o set-hostnameX.o set-hostname.c test_hostname: ip_pluginX.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostnameX.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o - $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o test_hostname ip_pluginX.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostnameX.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension + $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o test_hostname ip_pluginX.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostnameX.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -lnetwork -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension # ---------- @@ -118,7 +118,7 @@ smb-configurationX.o: smb-configuration.h smb-configuration.c $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -DMAIN -DDEBUG ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o smb-configurationX.o smb-configuration.c test_smb: ip_pluginX.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configurationX.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o - $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o test_smb ip_pluginX.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configurationX.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension + $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o test_smb ip_pluginX.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configurationX.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -lnetwork -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension # ---------- @@ -126,7 +126,7 @@ test_dns_order.o: ip_plugin.c $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -DTEST_DNS_ORDER ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o $@ $^ test_dns_order: test_dns_order.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o - $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o test_dns_order test_dns_order.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension + $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o test_dns_order test_dns_order.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -lnetwork -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension # ---------- @@ -134,7 +134,7 @@ test_ipv4_routelist.o: ip_plugin.c $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -DTEST_IPV4_ROUTELIST ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o $@ $^ test_ipv4_routelist: test_ipv4_routelist.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o - $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o test_ipv4_routelist test_ipv4_routelist.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension + $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o test_ipv4_routelist test_ipv4_routelist.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -lnetwork -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension test_ipv4_routelist_reference.txt: test_ipv4_routelist sh $(REFERENCE_OUTPUT) create test_ipv4_routelist test_ipv4_routelist_reference.txt routelist_output_filter.sh @@ -151,7 +151,7 @@ test_ipv6_routelist.o: ip_plugin.c $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -DTEST_IPV6_ROUTELIST ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o $@ $^ test_ipv6_routelist: test_ipv6_routelist.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o - $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o test_ipv6_routelist test_ipv6_routelist.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension + $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o test_ipv6_routelist test_ipv6_routelist.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -lnetwork -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension test_ipv6_routelist_reference.txt: test_ipv6_routelist sh $(REFERENCE_OUTPUT) create test_ipv6_routelist test_ipv6_routelist_reference.txt routelist_output_filter.sh @@ -168,7 +168,7 @@ IPMonitor.o: ip_plugin.c $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -DTEST_IPMONITOR ${TEST_INCLUDE} ${EXTRA_CFLAGS} -Wall -O0 -g -c -o IPMonitor.o ip_plugin.c IPMonitor: IPMonitor.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o - $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o IPMonitor IPMonitor.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension + $(CC) $(PF_INC) $(ARCH_FLAGS) -isysroot $(SYSROOT) -Wall -O0 -g -o IPMonitor IPMonitor.o IPMonitorControlPrefs.o agent-monitor.o configAgent.o controller.o dnsAgent.o proxyAgent.o dnsinfo_create.o dnsinfo_flatfile.o dnsinfo_server.o network_state_information_priv.o network_information_server.o dns-configuration.o proxy-configuration.o set-hostname.o smb-configuration.o IPMonitorControlServer.o libSystemConfiguration_client.o libSystemConfiguration_server.o ${EXTRA_CFLAGS} -lnetwork -framework SystemConfiguration -framework CoreFoundation -framework Foundation -framework Network -framework NetworkExtension # ---------- diff --git a/Plugins/IPMonitor/agent-monitor.h b/Plugins/IPMonitor/agent-monitor.h index 0f13738..31ad4ae 100644 --- a/Plugins/IPMonitor/agent-monitor.h +++ b/Plugins/IPMonitor/agent-monitor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016 Apple Inc. All rights reserved. + * Copyright (c) 2015-2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -29,9 +29,9 @@ __BEGIN_DECLS -void process_AgentMonitor(); -void process_AgentMonitor_DNS(); -void process_AgentMonitor_Proxy(); +void process_AgentMonitor(void); +void process_AgentMonitor_DNS(void); +void process_AgentMonitor_Proxy(void); const void * copy_proxy_information_for_agent_uuid(uuid_t uuid, uint64_t *length); const void * copy_dns_information_for_agent_uuid(uuid_t uuid, uint64_t *length); diff --git a/Plugins/IPMonitor/agent-monitor.m b/Plugins/IPMonitor/agent-monitor.m index 6239870..e53d3a6 100644 --- a/Plugins/IPMonitor/agent-monitor.m +++ b/Plugins/IPMonitor/agent-monitor.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016 Apple Inc. All rights reserved. + * Copyright (c) 2015-2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,7 +24,7 @@ #import "controller.h" void -process_AgentMonitor() +process_AgentMonitor(void) { SC_log(LOG_DEBUG, "Triggering AgentMonitor"); @autoreleasepool { @@ -44,7 +44,7 @@ process_AgentMonitor() } void -process_AgentMonitor_DNS() +process_AgentMonitor_DNS(void) { SC_log(LOG_DEBUG, "Triggering AgentMonitor for DNS"); @autoreleasepool { @@ -63,7 +63,7 @@ process_AgentMonitor_DNS() } void -process_AgentMonitor_Proxy() +process_AgentMonitor_Proxy(void) { SC_log(LOG_DEBUG, "Triggering AgentMonitor for Proxy"); @autoreleasepool { diff --git a/Plugins/IPMonitor/configAgent.h b/Plugins/IPMonitor/configAgent.h index 9a9b53a..29bdb6e 100644 --- a/Plugins/IPMonitor/configAgent.h +++ b/Plugins/IPMonitor/configAgent.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016 Apple Inc. All rights reserved. + * Copyright (c) 2015-2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -60,7 +60,7 @@ typedef NS_ENUM(NSUInteger, AgentSubType) { kAgentSubTypeGlobal, }; -os_log_t __log_IPMonitor(); +os_log_t __log_IPMonitor(void); /* Parameters */ #define kEntityName "EntityName" diff --git a/Plugins/IPMonitor/dns-configuration.c b/Plugins/IPMonitor/dns-configuration.c index b958f11..8fc79cc 100644 --- a/Plugins/IPMonitor/dns-configuration.c +++ b/Plugins/IPMonitor/dns-configuration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2017 Apple Inc. All rights reserved. + * Copyright (c) 2004-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/Plugins/IPMonitor/ip_plugin.c b/Plugins/IPMonitor/ip_plugin.c index dcb359d..7f5f479 100644 --- a/Plugins/IPMonitor/ip_plugin.c +++ b/Plugins/IPMonitor/ip_plugin.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2017 Apple Inc. All Rights Reserved. + * Copyright (c) 2000-2018 Apple Inc. All Rights Reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -86,7 +86,11 @@ #include #include #include +#if __has_include() +#include +#else // __has_include() #include +#endif // __has_include() #include #include #include @@ -157,7 +161,7 @@ enum { typedef unsigned int IFIndex; -static dispatch_queue_t __network_change_queue(); +static dispatch_queue_t __network_change_queue(void); #pragma mark - @@ -165,7 +169,7 @@ static dispatch_queue_t __network_change_queue(); __private_extern__ os_log_t -__log_IPMonitor() +__log_IPMonitor(void) { static os_log_t log = NULL; @@ -4003,6 +4007,29 @@ service_copy_interface(CFStringRef serviceID, CFDictionaryRef new_service) } #endif /* !TARGET_OS_SIMULATOR */ +static boolean_t +service_has_clat46_address(CFStringRef serviceID) +{ + CFDictionaryRef ip_dict; + + ip_dict = service_dict_get(serviceID, kSCEntNetIPv4); + if (ip_dict != NULL) { + CFBooleanRef clat46 = NULL; + CFDictionaryRef ipv4; + + ipv4 = ipdict_get_service(ip_dict); + if (isA_CFDictionary(ipv4) && + CFDictionaryGetValueIfPresent(ipv4, + kSCPropNetIPv4CLAT46, + (const void **)&clat46) && + isA_CFBoolean(clat46)) { + return CFBooleanGetValue(clat46); + } + } + + return FALSE; +} + #ifndef kSCPropNetHostname #define kSCPropNetHostname CFSTR("Hostname") #endif @@ -4476,8 +4503,20 @@ get_ipv6_changes(CFStringRef serviceID, CFDictionaryRef state_dict, #if !TARGET_OS_SIMULATOR if (interface != NULL) { if (changed) { - // IPv6 configuration changed for this interface, poke NAT64 - my_CFSetAddValue_async(__network_change_queue(), &S_nat64_prefix_changes, interface); + CFBooleanRef needs_plat = NULL; + + if ((state_dict != NULL) && + CFDictionaryGetValueIfPresent(state_dict, + kSCPropNetIPv6PerformPLATDiscovery, + (const void **)&needs_plat) && + isA_CFBoolean(needs_plat) && + CFBooleanGetValue(needs_plat)) { + // perform PLAT discovery + my_CFSetAddValue_async(__network_change_queue(), &S_nat64_prefix_requests, interface); + } else { + // IPv6 configuration changed for this interface, poke NAT64 + my_CFSetAddValue_async(__network_change_queue(), &S_nat64_prefix_changes, interface); + } } CFRelease(interface); } @@ -4627,8 +4666,13 @@ order_dns_servers(CFArrayRef servers, ProtocolFlags active_protos) if (((proto == kProtocolFlagsIPv4) && (v4_n == 1)) || ((proto == kProtocolFlagsIPv6) && (v6_n == 1))) { /* if we now have the 1st server address of another protocol */ +#if __has_include() + favor_v4 = (si_destination_compare_no_dependencies((struct sockaddr *)&v4_dns1, + (struct sockaddr *)&v6_dns1) >= 0); +#else // __has_include() favor_v4 = (sa_dst_compare_no_dependencies((struct sockaddr *)&v4_dns1, (struct sockaddr *)&v6_dns1) >= 0); +#endif // __has_include() #ifdef TEST_DNS_ORDER char v4_buf[INET_ADDRSTRLEN]; char v6_buf[INET6_ADDRSTRLEN]; @@ -6887,6 +6931,10 @@ ElectionResultsCopy(int af, CFArrayRef order) * Check whether the given candidate requires demotion. A candidate * might need to be demoted if its IPv4 and IPv6 services must be coupled * but a higher ranked service has IPv4 or IPv6. + * + * The converse is also true: if the given candidate has lower rank than + * the other candidate and the other candidate is coupled, this candidate + * needs to be demoted. */ static Boolean ElectionResultsCandidateNeedsDemotion(CandidateRef other_candidate, @@ -6894,9 +6942,20 @@ ElectionResultsCandidateNeedsDemotion(CandidateRef other_candidate, { Boolean ret = FALSE; - if (other_candidate == NULL - || !candidate->ip_is_coupled - || RANK_ASSERTION_MASK(candidate->rank) == kRankAssertionNever) { + if (other_candidate == NULL) { + /* no other candidate */ + goto done; + } + if (other_candidate->ineligible) { + /* other candidate can't become primary */ + goto done; + } + if (RANK_ASSERTION_MASK(other_candidate->rank) == kRankAssertionNever) { + /* the other candidate can't become primary */ + goto done; + } + if (!candidate->ip_is_coupled && !other_candidate->ip_is_coupled) { + /* neither candidate is coupled */ goto done; } if (CFEqual(other_candidate->if_name, candidate->if_name)) { @@ -6907,17 +6966,26 @@ ElectionResultsCandidateNeedsDemotion(CandidateRef other_candidate, /* avoid creating a feedback loop */ goto done; } - if (RANK_ASSERTION_MASK(other_candidate->rank) == kRankAssertionNever) { - /* the other candidate isn't eligible to become primary, ignore */ - goto done; - } if (candidate->rank < other_candidate->rank) { /* we're higher ranked than the other candidate, ignore */ goto done; } - if (candidate->rank == other_candidate->rank - && other_candidate->ip_is_coupled) { - /* same rank as another service that is coupled, ignore */ + if (candidate->ip_is_coupled) { + if (other_candidate->ip_is_coupled + && candidate->rank == other_candidate->rank) { + /* same rank as another service that is coupled, ignore */ + goto done; + } + } + else if (other_candidate->ip_is_coupled) { /* must be true */ + if (candidate->rank == other_candidate->rank) { + /* other candidate will be demoted, so we don't need to */ + goto done; + } + /* we're lower rank and need to be demoted */ + } + else { /* can't happen, we already tested for this above */ + /* neither candidate is coupled */ goto done; } ret = TRUE; @@ -6975,6 +7043,9 @@ add_candidate_to_nwi_state(nwi_state_t nwi_state, int af, if (service_dict_get(candidate->serviceID, kSCEntNetDNS) != NULL) { flags |= NWI_IFSTATE_FLAGS_HAS_DNS; } + if ((af == AF_INET) && service_has_clat46_address(candidate->serviceID)) { + flags |= NWI_IFSTATE_FLAGS_HAS_CLAT46; + } CFStringGetCString(candidate->if_name, ifname, sizeof(ifname), kCFStringEncodingASCII); if ((S_IPMonitor_debug & kDebugFlag2) != 0) { @@ -7095,8 +7166,11 @@ ElectionResultsGetPrimary(ElectionResultsRef results, scan)) { /* demote the service */ my_log(LOG_NOTICE, - "IPv%c over %@ demoted: not primary for IPv%c", - ipvx_char(af), scan->if_name, ipvx_other_char(af)); + "IPv%c over %@ (rank 0x%x) demoted: " + "primary IPv%c %@ (rank 0x%x)", + ipvx_char(af), scan->if_name, scan->rank, + ipvx_other_char(af), other_candidate->if_name, + other_candidate->rank); deferred[deferred_count++] = scan; skip = TRUE; } diff --git a/Plugins/IPMonitor/ip_plugin.h b/Plugins/IPMonitor/ip_plugin.h index 78da7e3..bf0b54b 100644 --- a/Plugins/IPMonitor/ip_plugin.h +++ b/Plugins/IPMonitor/ip_plugin.h @@ -57,7 +57,7 @@ #endif // !my_log os_log_t -__log_IPMonitor(); +__log_IPMonitor(void); boolean_t cfstring_to_ip(CFStringRef str, struct in_addr * ip_p); diff --git a/Plugins/IPMonitor/nat64-configuration.c b/Plugins/IPMonitor/nat64-configuration.c index 182a532..80ec61d 100644 --- a/Plugins/IPMonitor/nat64-configuration.c +++ b/Plugins/IPMonitor/nat64-configuration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Apple Inc. All rights reserved. + * Copyright (c) 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -44,7 +44,11 @@ #include #include #include +#if __has_include() +#include +#else // __has_include() #include +#endif // __has_include() static CFMutableSetRef nat64_prefix_requests = NULL; @@ -64,16 +68,16 @@ nat64_dispatch_queue() } -static __inline__ void -_nat64_prefix_request_complete(const char *if_name, - int32_t num_prefixes, - nw_nat64_prefix_t *prefixes) +static Boolean +_nat64_prefix_set(const char *if_name, + int32_t num_prefixes, + nw_nat64_prefix_t *prefixes) { struct if_nat64req req; int ret; int s; - SC_log(LOG_DEBUG, "%s: _nat64_prefix_request_complete", if_name); + SC_log(LOG_DEBUG, "%s: _nat64_prefix_set", if_name); // pass NAT64 prefixes to the kernel bzero(&req, sizeof(req)); @@ -100,7 +104,7 @@ _nat64_prefix_request_complete(const char *if_name, s = socket(AF_INET, SOCK_DGRAM, 0); if (s == -1) { SC_log(LOG_ERR, "socket() failed: %s", strerror(errno)); - return; + return (FALSE); } ret = ioctl(s, SIOCSIFNAT64PREFIX, &req); close(s); @@ -108,10 +112,73 @@ _nat64_prefix_request_complete(const char *if_name, if ((errno != ENOENT) || (num_prefixes != 0)) { SC_log(LOG_ERR, "%s: ioctl(SIOCSIFNAT64PREFIX) failed: %s", if_name, strerror(errno)); } - return; + return (FALSE); } SC_log(LOG_INFO, "%s: nat64 prefix%s updated", if_name, (num_prefixes != 1) ? "es" : ""); + return (TRUE); +} + + +static void +_nat64_prefix_post(CFStringRef interface, + int32_t num_prefixes, + nw_nat64_prefix_t *prefixes, + CFAbsoluteTime start_time) +{ + CFStringRef key; + + key = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, + kSCDynamicStoreDomainState, + interface, + kSCEntNetNAT64); + if (num_prefixes >= 0) { + CFDateRef date; + CFMutableDictionaryRef plat_dict; + + plat_dict = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + /* prefixes (if available) */ + if (num_prefixes > 0) { + CFMutableArrayRef prefix_array; + + prefix_array = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + for (int32_t i = 0; i < num_prefixes; i++) { + char prefix_str[NW_NAT64_PREFIX_STR_LENGTH] = {0}; + CFStringRef str; + + nw_nat64_write_prefix_to_string(&prefixes[i], prefix_str, sizeof(prefix_str)); + str = CFStringCreateWithCString(NULL, prefix_str, kCFStringEncodingASCII); + CFArrayAppendValue(prefix_array, str); + CFRelease(str); + } + CFDictionarySetValue(plat_dict, kSCPropNetNAT64PrefixList, prefix_array); + CFRelease(prefix_array); + } + /* start time */ + date = CFDateCreate(NULL, start_time); + CFDictionarySetValue(plat_dict, + kSCPropNetNAT64PLATDiscoveryStartTime, + date); + CFRelease(date); + + /* completion time */ + date = CFDateCreate(NULL, CFAbsoluteTimeGetCurrent()); + CFDictionarySetValue(plat_dict, + kSCPropNetNAT64PLATDiscoveryCompletionTime, + date); + CFRelease(date); + + (void)SCDynamicStoreSetValue(NULL, key, plat_dict); + SC_log(LOG_INFO, "%@: PLAT discovery complete %@", + interface, plat_dict); + CFRelease(plat_dict); + } else { + (void)SCDynamicStoreRemoveValue(NULL, key); + } + CFRelease(key); return; } @@ -123,6 +190,7 @@ _nat64_prefix_request_start(const void *value) char *if_name; CFStringRef interface = (CFStringRef)value; bool ok; + CFAbsoluteTime start_time; SC_log(LOG_DEBUG, "%@: _nat64_prefix_request_start", interface); @@ -143,12 +211,15 @@ _nat64_prefix_request_start(const void *value) CFSetAddValue(nat64_prefix_requests, interface); CFRetain(interface); + start_time = CFAbsoluteTimeGetCurrent(); ok = nw_nat64_copy_prefixes_async(&if_index, nat64_dispatch_queue(), ^(int32_t num_prefixes, nw_nat64_prefix_t *prefixes) { if (num_prefixes >= 0) { // update interface - _nat64_prefix_request_complete(if_name, num_prefixes, prefixes); + if (!_nat64_prefix_set(if_name, num_prefixes, prefixes)) { + num_prefixes = -1; + } } else { SC_log(LOG_ERR, "%s: nw_nat64_copy_prefixes_async() num_prefixes(%d) < 0", @@ -161,6 +232,8 @@ _nat64_prefix_request_start(const void *value) CFSetRemoveValue(nat64_prefix_requests, interface); } + _nat64_prefix_post(interface, num_prefixes, prefixes, start_time); + // cleanup CFRelease(interface); CFAllocatorDeallocate(NULL, if_name); diff --git a/Plugins/InterfaceNamer/ifnamer.c b/Plugins/InterfaceNamer/ifnamer.c index 398f5c3..52f4a7a 100644 --- a/Plugins/InterfaceNamer/ifnamer.c +++ b/Plugins/InterfaceNamer/ifnamer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2017 Apple Inc. All rights reserved. + * Copyright (c) 2001-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -57,11 +57,16 @@ * to give persistent interface names */ +#include #include #include #include #include #include +#if TARGET_OS_IPHONE +#include +#include +#endif // TARGET_OS_IPHONE #include #include #include @@ -79,6 +84,7 @@ #include #include #include +#include "SCNetworkConfigurationInternal.h" #include "plugin_shared.h" #if !TARGET_OS_IPHONE #include "InterfaceNamerControlPrefs.h" @@ -108,9 +114,10 @@ enum { }; #endif // !USE_REGISTRY_ENTRY_ID +#define kSCNetworkInterfaceActive "Active" #define kSCNetworkInterfaceInfo "SCNetworkInterfaceInfo" #define kSCNetworkInterfaceType "SCNetworkInterfaceType" -#define kSCNetworkInterfaceActive "Active" +#define kSCNetworkInterfaceMatchingMACs "MatchingMACs" #define MY_PLUGIN_NAME "InterfaceNamer" #define MY_PLUGIN_ID CFSTR("com.apple.SystemConfiguration." MY_PLUGIN_NAME) @@ -148,6 +155,16 @@ static CFMutableArrayRef S_iflist = NULL; */ static io_iterator_t S_iter = MACH_PORT_NULL; +#if !TARGET_OS_IPHONE +/* + * S_locked + * An array of CFData(WatchedInfo) objects representing those + * interfaces that have been connected to the system while + * locked. + */ +static CFMutableArrayRef S_locked = NULL; +#endif // !TARGET_OS_IPHONE + /* * S_notify * notification object for receiving IOKit notifications of @@ -192,6 +209,22 @@ static io_iterator_t S_stack = MACH_PORT_NULL; */ static CFMutableDictionaryRef S_state = NULL; +#if TARGET_OS_IPHONE +/* + * S_trustedHostAttached + * + * Note: this global must only be updated on trustRequired_queue() + */ +static Boolean S_trustedHostAttached = FALSE; + +/* + * S_trustRequired + * An array of CFData(WatchedInfo) objects representing those + * interfaces that require [lockdownd] trust. + */ +static CFMutableArrayRef S_trustRequired = NULL; +#endif // TARGET_OS_IPHONE + /* * S_timer * CFRunLoopTimer tracking how long we are willing to wait @@ -225,7 +258,7 @@ static CFArrayRef S_vlans = NULL; */ __private_extern__ os_log_t -__log_InterfaceNamer() +__log_InterfaceNamer(void) { static os_log_t log = NULL; @@ -290,7 +323,7 @@ writeInterfaceList(CFArrayRef if_list) return; } - prefs = SCPreferencesCreate(NULL, MY_PLUGIN_ID, NETWORK_INTERFACES_PREFS); + prefs = SCPreferencesCreate(NULL, CFSTR(MY_PLUGIN_NAME ":writeInterfaceList"), NETWORK_INTERFACES_PREFS); if (prefs == NULL) { SC_log(LOG_NOTICE, "SCPreferencesCreate() failed: %s", SCErrorString(SCError())); return; @@ -384,7 +417,7 @@ readInterfaceList() CFMutableArrayRef plist = NULL; SCPreferencesRef prefs = NULL; - prefs = SCPreferencesCreate(NULL, MY_PLUGIN_ID, NETWORK_INTERFACES_PREFS); + prefs = SCPreferencesCreate(NULL, CFSTR(MY_PLUGIN_NAME ":readInterfaceList"), NETWORK_INTERFACES_PREFS); if (prefs == NULL) { SC_log(LOG_NOTICE, "SCPreferencesCreate() failed: %s", SCErrorString(SCError())); return (NULL); @@ -469,8 +502,7 @@ updateStore(void) { CFStringRef key; - key = SCDynamicStoreKeyCreate(NULL, CFSTR("%@" MY_PLUGIN_NAME), - kSCDynamicStoreDomainPlugin); + key = SCDynamicStoreKeyCreate(NULL, CFSTR("%@" MY_PLUGIN_NAME), kSCDynamicStoreDomainPlugin); (void)SCDynamicStoreSetValue(NULL, key, S_state); CFRelease(key); @@ -611,7 +643,7 @@ updateVirtualNetworkInterfaceConfiguration(SCPreferencesRef prefs, return; } -#if !TARGET_OS_EMBEDDED +#if TARGET_OS_OSX static void updateBTPANInformation(const void *value, void *context) @@ -650,10 +682,10 @@ updateBTPANInformation(const void *value, void *context) return; } -#endif // !TARGET_OS_EMBEDDED +#endif // TARGET_OS_OSX static CFDictionaryRef -createInterfaceDict(SCNetworkInterfaceRef interface) +createInterfaceDict(SCNetworkInterfaceRef interface, CFArrayRef matchingMACs) { CFMutableDictionaryRef new_if; CFTypeRef val; @@ -710,6 +742,10 @@ createInterfaceDict(SCNetworkInterfaceRef interface) CFDictionarySetValue(new_if, CFSTR(kSCNetworkInterfaceActive), kCFBooleanTrue); + if (matchingMACs != NULL) { + CFDictionarySetValue(new_if, CFSTR(kSCNetworkInterfaceMatchingMACs), matchingMACs); + } + return new_if; } @@ -952,9 +988,9 @@ interfaceExists(CFStringRef prefix, CFNumberRef unit) io_registry_entry_t entry = MACH_PORT_NULL; - io_iterator_t iterator = MACH_PORT_NULL; - kern_return_t kr; - mach_port_t masterPort = MACH_PORT_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) { @@ -1110,14 +1146,15 @@ lookupMatchingInterface(SCNetworkInterfaceRef interface, } static void -insertInterface(CFMutableArrayRef db_list, SCNetworkInterfaceRef interface) +insertInterface(CFMutableArrayRef db_list, SCNetworkInterfaceRef interface, CFDictionaryRef db_dict_match) { CFIndex i; CFDictionaryRef if_dict; CFStringRef if_name; CFNumberRef if_type; CFNumberRef if_unit; - CFIndex n = CFArrayGetCount(db_list); + CFArrayRef matchingMACs = NULL; + CFIndex n = CFArrayGetCount(db_list); CFComparisonResult res; if_name = SCNetworkInterfaceGetBSDName(interface); @@ -1125,7 +1162,56 @@ insertInterface(CFMutableArrayRef db_list, SCNetworkInterfaceRef interface) addTimestamp(S_state, if_name); } - if_dict = createInterfaceDict(interface); + if (!_SCNetworkInterfaceIsBuiltin(interface) && (db_dict_match != NULL)) { + CFDataRef addr_cur; + CFDataRef addr_old; + + matchingMACs = CFDictionaryGetValue(db_dict_match, CFSTR(kSCNetworkInterfaceMatchingMACs)); + if (matchingMACs != NULL) { + CFRetain(matchingMACs); + } + + addr_old = CFDictionaryGetValue(db_dict_match, CFSTR(kIOMACAddress)); + addr_cur = _SCNetworkInterfaceGetHardwareAddress(interface); + if ((addr_old != NULL) && (addr_cur != NULL) && !CFEqual(addr_old, addr_cur)) { + CFMutableArrayRef matching_new; + + // if MAC address changed, add previous MAC to history + if (matchingMACs != NULL) { + matching_new = CFArrayCreateMutableCopy(NULL, 0, matchingMACs); + CFRelease(matchingMACs); + + // remove duplicates of the now current MAC from history + i = CFArrayGetFirstIndexOfValue(matching_new, CFRangeMake(0, CFArrayGetCount(matching_new)), addr_cur); + if (i != kCFNotFound) { + CFArrayRemoveValueAtIndex(matching_new, i); + } + + // remove duplicates of the previous MAC from history before re-inserting + i = CFArrayGetFirstIndexOfValue(matching_new, CFRangeMake(0, CFArrayGetCount(matching_new)), addr_old); + if (i != kCFNotFound) { + CFArrayRemoveValueAtIndex(matching_new, i); + } + } else { + matching_new = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + } + CFArrayInsertValueAtIndex(matching_new, 0, addr_old); + + // limit history size +#define MATCHING_HISTORY_MAXLEN 32 + for (i = CFArrayGetCount(matching_new); i > MATCHING_HISTORY_MAXLEN; i--) { + CFArrayRemoveValueAtIndex(matching_new, i - 1); + } + + matchingMACs = matching_new; + } + } + + if_dict = createInterfaceDict(interface, matchingMACs); + if (matchingMACs != NULL) { + CFRelease(matchingMACs); + } + if_type = _SCNetworkInterfaceGetIOInterfaceType(interface); if_unit = _SCNetworkInterfaceGetIOInterfaceUnit(interface); if ((if_type == NULL) || (if_unit == NULL)) { @@ -1153,9 +1239,9 @@ insertInterface(CFMutableArrayRef db_list, SCNetworkInterfaceRef interface) CFArrayAppendValue(S_dblist, if_dict); -#if !TARGET_OS_EMBEDDED +#if TARGET_OS_OSX updateBTPANInformation(if_dict, NULL); -#endif // !TARGET_OS_EMBEDDED +#endif // TARGET_OS_OSX CFRelease(if_dict); return; @@ -1164,24 +1250,46 @@ insertInterface(CFMutableArrayRef db_list, SCNetworkInterfaceRef interface) static void replaceInterface(SCNetworkInterfaceRef interface) { - int n = 0; - CFIndex where; + CFDictionaryRef db_dict; + CFDictionaryRef db_dict_match = NULL; + int n = 0; + CFIndex where; if (S_dblist == NULL) { S_dblist = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); } + // remove any dict that has our type/addr - while (lookupInterfaceByAddress(S_dblist, interface, &where) != NULL) { + while (TRUE) { + db_dict = lookupInterfaceByAddress(S_dblist, interface, &where); + if (db_dict == NULL) { + break; + } + if (db_dict_match == NULL) { + db_dict_match = CFRetain(db_dict); + } CFArrayRemoveValueAtIndex(S_dblist, where); n++; } + // remove any dict that has the same type/unit - while (lookupInterfaceByUnit(S_dblist, interface, &where) != NULL) { + while (TRUE) { + db_dict = lookupInterfaceByUnit(S_dblist, interface, &where); + if (db_dict == NULL) { + break; + } + if (db_dict_match == NULL) { + db_dict_match = CFRetain(db_dict); + } CFArrayRemoveValueAtIndex(S_dblist, where); n++; } - insertInterface(S_dblist, interface); + + insertInterface(S_dblist, interface, db_dict_match); + if (db_dict_match != NULL) { + CFRelease(db_dict_match); + } if (n > 1) { SC_log(LOG_ERR, "Multiple interfaces updated (n = %d, %@)", n, interface); @@ -1418,7 +1526,7 @@ displayInterface(SCNetworkInterfaceRef interface) (unit != NULL) ? "Unit: " : "", (unit != NULL) ? (CFTypeRef)unit : (CFTypeRef)CFSTR(""), (unit != NULL) ? ", " : "", - addr); + (addr != NULL) ? addr : CFSTR("?")); } static Boolean @@ -1513,7 +1621,7 @@ updateWatchedInterface(void *refCon, io_service_t service, natural_t messageType #pragma unused(service) #pragma unused(messageArgument) switch (messageType) { - case kIOMessageServiceIsTerminated : { // if [locked] interface yanked + case kIOMessageServiceIsTerminated : { // if [watched] interface yanked CFDataRef watched = (CFDataRef)refCon; WatchedInfo *watchedInfo = (WatchedInfo *)(void *)CFDataGetBytePtr(watched); @@ -1550,7 +1658,7 @@ watcherCreate(SCNetworkInterfaceRef interface, InterfaceUpdateCallBack callback) return NULL; } - // create [locked] interface watcher + // create [locked/trusted] interface watcher watched = CFDataCreateMutable(NULL, sizeof(WatchedInfo)); CFDataSetLength(watched, sizeof(WatchedInfo)); watchedInfo = (WatchedInfo *)(void *)CFDataGetBytePtr(watched); @@ -1615,6 +1723,47 @@ watcherRelease(CFDataRef watched) #if !TARGET_OS_IPHONE +static void +shareLocked(void) +{ + CFIndex n; + + n = (S_locked != NULL) ? CFArrayGetCount(S_locked) : 0; + if (n > 0) { + CFMutableArrayRef locked; + + locked = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + for (CFIndex i = 0; i < n; i++) { + CFStringRef addr; + CFStringRef name; + CFStringRef path; + CFStringRef str; + CFDataRef watched = CFArrayGetValueAtIndex(S_locked, i); + WatchedInfo *watchedInfo = (WatchedInfo *)(void *)CFDataGetBytePtr(watched); + + name = SCNetworkInterfaceGetLocalizedDisplayName(watchedInfo->interface); + addr = SCNetworkInterfaceGetHardwareAddressString(watchedInfo->interface); + path = _SCNetworkInterfaceGetIOPath(watchedInfo->interface); + str = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@: %@: %@"), + (name != NULL) ? name : CFSTR("?"), + (addr != NULL) ? addr : CFSTR("?"), + path); + CFArrayAppendValue(locked, str); + CFRelease(str); + } + + CFDictionarySetValue(S_state, kInterfaceNamerKey_LockedInterfaces, locked); + CFRelease(locked); + } else { + CFDictionaryRemoveValue(S_state, kInterfaceNamerKey_LockedInterfaces); + } + + updateStore(); + + return; +} + static boolean_t blockNewInterfaces() { @@ -1628,7 +1777,6 @@ blockNewInterfaces() return !allow; } - static boolean_t isConsoleLocked() { @@ -1702,9 +1850,518 @@ isConsoleLocked() return locked; } + +//#define ENABLE_LOCKED_CONSOLE_INTERFACE_NOTIFICATIONS +#ifdef ENABLE_LOCKED_CONSOLE_INTERFACE_NOTIFICATIONS + +static CFUserNotificationRef userNotification; +static CFRunLoopSourceRef userRls; + +static void +lockedNotification_remove(void) +{ + if (userRls != NULL) { + CFRunLoopSourceInvalidate(userRls); + userRls = NULL; + } + + if (userNotification != NULL) { + SInt32 status; + + status = CFUserNotificationCancel(userNotification); + if (status != 0) { + SC_log(LOG_ERR, + "CFUserNotificationCancel() failed, status=%d", + (int)status); + } + CFRelease(userNotification); + userNotification = NULL; + } + + return; +} + +#define MY_ICON_PATH "/System/Library/PreferencePanes/Network.prefPane/Contents/Resources/Network.icns" + +static void +lockedNotification_reply(CFUserNotificationRef userNotification, CFOptionFlags response_flags) +{ +#pragma unused(userNotification) + + os_activity_t activity; + CFIndex n; + + activity = os_activity_create("process locked interface notification", + OS_ACTIVITY_CURRENT, + OS_ACTIVITY_FLAG_DEFAULT); + os_activity_scope(activity); + + n = (S_locked != NULL) ? CFArrayGetCount(S_locked) : 0; + for (CFIndex i = 0; i < n; i++) { + CFDataRef watched = CFArrayGetValueAtIndex(S_locked, i); + WatchedInfo *watchedInfo = (WatchedInfo *)(void *)CFDataGetBytePtr(watched); + + // process user response + switch (response_flags & 0x3) { + case kCFUserNotificationDefaultResponse: { + // if OK'd, [re-]process new interfaces + if (i == 0) { + SC_log(LOG_INFO, "Reprocessing %ld [locked] interface%s", n, n == 1 ? "" : "s"); + + if (S_iflist == NULL) { + S_iflist = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + } + } + + // add the interface to those newly discovered + CFArrayAppendValue(S_iflist, watchedInfo->interface); + break; + } + default: { + // if cancelled, ignore [remaining] new interfaces + SC_log(LOG_INFO, "[locked] interface ignored"); + SC_log(LOG_INFO, " path = %@", _SCNetworkInterfaceGetIOPath(watchedInfo->interface)); + break; + } + } + + // stop watching + watcherRelease(watched); + } + + if (S_locked != NULL) { + CFRelease(S_locked); + S_locked = NULL; + } + + lockedNotification_remove(); + + if (S_iflist != NULL) { + updateInterfaces(); + } + + os_release(activity); + + return; +} + +static void +lockedNotification_add(void) +{ + CFBundleRef bundle; + CFMutableDictionaryRef dict; + SInt32 error = 0; + CFMutableArrayRef message; + CFIndex n; + CFURLRef url = NULL; + + n = (S_locked != NULL) ? CFArrayGetCount(S_locked) : 0; + if (n == 0) { + // no locked interfaces, no notification needed + return; + } + + dict = CFDictionaryCreateMutable(NULL, + 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + + // set localization URL + bundle = _SC_CFBundleGet(); + if (bundle != NULL) { + url = CFBundleCopyBundleURL(bundle); + } + if (url != NULL) { + // set URL + CFDictionarySetValue(dict, kCFUserNotificationLocalizationURLKey, url); + CFRelease(url); + } else { + SC_log(LOG_ERR, "can't find bundle"); + goto done; + } + + // set icon URL + url = CFURLCreateFromFileSystemRepresentation(NULL, + (const UInt8 *)MY_ICON_PATH, + sizeof(MY_ICON_PATH) - 1, + FALSE); + if (url != NULL) { + CFDictionarySetValue(dict, kCFUserNotificationIconURLKey, url); + CFRelease(url); + } + + // header + CFDictionarySetValue(dict, + kCFUserNotificationAlertHeaderKey, + (n == 1) ? CFSTR("LOCKED_SINGLE_INTERFACE_HEADER") + : CFSTR("LOCKED_MULTIPLE_INTERFACES_HEADER")); + + // message + message = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + CFArrayAppendValue(message, + (n == 1) ? CFSTR("LOCKED_SINGLE_INTERFACE_MESSAGE") + : CFSTR("LOCKED_MULTIPLE_INTERFACES_MESSAGE")); + for (CFIndex i = 0; i < n; i++) { + CFStringRef name; + CFStringRef str; + CFDataRef watched = CFArrayGetValueAtIndex(S_locked, i); + WatchedInfo *watchedInfo = (WatchedInfo *)(void *)CFDataGetBytePtr(watched); + + name = SCNetworkInterfaceGetLocalizedDisplayName(watchedInfo->interface); + str = CFStringCreateWithFormat(NULL, NULL, CFSTR("\r\t%@"), name); + CFArrayAppendValue(message, str); + CFRelease(str); + } + CFDictionarySetValue(dict, kCFUserNotificationAlertMessageKey, message); + CFRelease(message); + + // button titles + CFDictionarySetValue(dict, + kCFUserNotificationDefaultButtonTitleKey, + CFSTR("LOCKED_INTERFACES_IGNORE")); + CFDictionarySetValue(dict, + kCFUserNotificationAlternateButtonTitleKey, + (n == 1) ? CFSTR("LOCKED_SINGLE_INTERFACE_ADD") + : CFSTR("LOCKED_MULTIPLE_INTERFACES_ADD")); + + // create and post notification + userNotification = CFUserNotificationCreate(NULL, + 0, + kCFUserNotificationNoteAlertLevel, + &error, + dict); + if (userNotification == NULL) { + SC_log(LOG_ERR, "CFUserNotificationCreate() failed: %d", (int)error); + goto done; + } + + // establish callback + userRls = CFUserNotificationCreateRunLoopSource(NULL, + userNotification, + lockedNotification_reply, + 0); + if (userRls == NULL) { + SC_log(LOG_ERR, "CFUserNotificationCreateRunLoopSource() failed"); + CFRelease(userNotification); + userNotification = NULL; + goto done; + } + CFRunLoopAddSource(CFRunLoopGetCurrent(), userRls, kCFRunLoopDefaultMode); + + done : + + if (dict != NULL) CFRelease(dict); + return; +} + +static void +lockedNotification_update(void) +{ + // if present, remove current notification + lockedNotification_remove(); + + // post notification (if needed) + lockedNotification_add(); + + return; +} + +#endif // ENABLE_LOCKED_CONSOLE_INTERFACE_NOTIFICATIONS + +static void +lockedInterfaceUpdated(CFDataRef watched, natural_t messageType, void *messageArgument) +{ +#pragma unused(messageArgument) + Boolean updated = FALSE; + WatchedInfo *watchedInfo = (WatchedInfo *)(void *)CFDataGetBytePtr(watched); + + switch (messageType) { + case kIOMessageServiceIsTerminated : { // if [locked] interface yanked + SC_log(LOG_INFO, "[locked] interface removed"); + SC_log(LOG_INFO, " path = %@", _SCNetworkInterfaceGetIOPath(watchedInfo->interface)); + + if (S_locked != NULL) { + CFIndex i; + CFIndex n = CFArrayGetCount(S_locked); + + i = CFArrayGetFirstIndexOfValue(S_locked, CFRangeMake(0, n), watched); + if (i != kCFNotFound) { + CFArrayRemoveValueAtIndex(S_locked, i); + if (CFArrayGetCount(S_locked) == 0) { + CFRelease(S_locked); + S_locked = NULL; + } + updated = TRUE; + } + } + + break; + } + + default : + return; + } + + if (updated) { +#ifdef ENABLE_LOCKED_CONSOLE_INTERFACE_NOTIFICATIONS + // update user notification after interface removed + lockedNotification_update(); +#endif // ENABLE_LOCKED_CONSOLE_INTERFACE_NOTIFICATIONS + + // post info about interfaces not added because the console is locked + shareLocked(); + } + + return; +} + +static void +watchLockedInterface(SCNetworkInterfaceRef interface) +{ + Boolean updated = FALSE; + CFDataRef watched; + + watched = watcherCreate(interface, lockedInterfaceUpdated); + if (watched != NULL) { + SC_log(LOG_INFO, "watching [locked] interface"); + SC_log(LOG_INFO, " path = %@", _SCNetworkInterfaceGetIOPath(interface)); + + if (S_locked == NULL) { + S_locked = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + } + CFArrayAppendValue(S_locked, watched); + updated = TRUE; + } + + if (updated) { + // post info about interfaces not added because the console is locked + shareLocked(); + +#ifdef ENABLE_LOCKED_CONSOLE_INTERFACE_NOTIFICATIONS + // post/update user notification with new interface + lockedNotification_update(); +#endif // ENABLE_LOCKED_CONSOLE_INTERFACE_NOTIFICATIONS + } + + return; +} #endif // !TARGET_OS_IPHONE +#pragma mark - +#pragma mark Trust required support [iOS] + + +#if TARGET_OS_IPHONE +static void +shareExcluded() +{ + CFMutableArrayRef excluded = NULL; + CFIndex n; + + n = (S_trustRequired != NULL) ? CFArrayGetCount(S_trustRequired) : 0; + if ((n > 0) && !S_trustedHostAttached) { + // if we have interfaces that require not [yet] granted "trust". + + excluded = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + + for (CFIndex i = 0; i < n; i++) { + CFStringRef bsdName; + CFDataRef watched = CFArrayGetValueAtIndex(S_trustRequired, i); + WatchedInfo *watchedInfo = (WatchedInfo *)(void *)CFDataGetBytePtr(watched); + + bsdName = SCNetworkInterfaceGetBSDName(watchedInfo->interface); + if (bsdName == NULL) { + SC_log(LOG_NOTICE, "[trust required] excluded interface w/no BSD name"); + SC_log(LOG_NOTICE, " interface = %@", watchedInfo->interface); + continue; + } + CFArrayAppendValue(excluded, bsdName); + } + } + + if (excluded != NULL) { + CFDictionarySetValue(S_state, kInterfaceNamerKey_ExcludedInterfaces, excluded); + CFRelease(excluded); + } else { + CFDictionaryRemoveValue(S_state, kInterfaceNamerKey_ExcludedInterfaces); + } + + updateStore(); + + return; +} + +static dispatch_queue_t +trustRequired_queue() +{ + static dispatch_once_t once; + static dispatch_queue_t q; + + dispatch_once(&once, ^{ + q = dispatch_queue_create("Trust Required queue", NULL); + }); + + return q; + +} + +// runs on "Trust Required" dispatch queue +static void +trustRequiredNotification_update(CFRunLoopRef rl, CFStringRef reason) +{ + Boolean curTrusted = FALSE; + CFBooleanRef trusted; + + trusted = lockdown_copy_trustedHostAttached(); + if (trusted != NULL) { + curTrusted = isA_CFBoolean(trusted) && CFBooleanGetValue(trusted); + CFRelease(trusted); + } + + SC_log(LOG_INFO, "%@, trusted = %s", reason, curTrusted ? "Yes" : "No"); + + if (S_trustedHostAttached != curTrusted) { + S_trustedHostAttached = curTrusted; + CFRunLoopPerformBlock(rl, kCFRunLoopDefaultMode, ^{ + shareExcluded(); + }); + CFRunLoopWakeUp(rl); + } + + return; +} + +static void +trustRequiredInterfaceUpdated(CFDataRef watched, natural_t messageType, void *messageArgument) +{ +#pragma unused(messageArgument) + Boolean updated = FALSE; + WatchedInfo *watchedInfo = (WatchedInfo *)(void *)CFDataGetBytePtr(watched); + + switch (messageType) { + case kIOMessageServiceIsTerminated : { // if [locked] interface yanked + SC_log(LOG_INFO, "[trust required] interface removed"); + SC_log(LOG_INFO, " path = %@", _SCNetworkInterfaceGetIOPath(watchedInfo->interface)); + + if (S_trustRequired != NULL) { + CFIndex i; + CFIndex n = CFArrayGetCount(S_trustRequired); + + i = CFArrayGetFirstIndexOfValue(S_trustRequired, CFRangeMake(0, n), watched); + if (i != kCFNotFound) { + CFArrayRemoveValueAtIndex(S_trustRequired, i); + if (CFArrayGetCount(S_trustRequired) == 0) { + CFRelease(S_trustRequired); + S_trustRequired = NULL; + } + updated = TRUE; + } + } + + break; + } + + default : + return; + } + + if (updated) { + CFRunLoopRef rl = CFRunLoopGetCurrent(); + + CFRetain(rl); + dispatch_async(trustRequired_queue(), ^{ + trustRequiredNotification_update(rl, CFSTR("TrustRequired interface removed")); + CFRelease(rl); + }); + } + + return; +} + +static void +watchTrustedStatus(CFStringRef notification, CFStringRef reason) +{ + const char * key; + int notify_token = -1; + uint32_t ret; + CFRunLoopRef rl = CFRunLoopGetCurrent(); + + key = CFStringGetCStringPtr(notification, kCFStringEncodingUTF8); + assert(key != NULL); + + CFRetain(rl); + CFRetain(reason); + ret = notify_register_dispatch(key, + ¬ify_token, + trustRequired_queue(), + ^(int token){ +#pragma unused(token) + trustRequiredNotification_update(rl, reason); + }); + if (ret != NOTIFY_STATUS_OK) { + SC_log(LOG_ERR, "notify_register_dispatch(%@) failed: %u", notification, ret); + CFRelease(rl); + CFRelease(reason); + } + + return; +} + +static void +updateTrustRequiredInterfaces(CFArrayRef interfaces) +{ + CFIndex n; + Boolean updated = FALSE; + + n = (interfaces != NULL) ? CFArrayGetCount(interfaces) : 0; + for (CFIndex i = 0; i < n; i++) { + SCNetworkInterfaceRef interface; + + interface = CFArrayGetValueAtIndex(interfaces, i); + if (_SCNetworkInterfaceIsTrustRequired(interface)) { + CFDataRef watched; + + watched = watcherCreate(interface, trustRequiredInterfaceUpdated); + if (watched != NULL) { + SC_log(LOG_INFO, "watching [trust required] interface: %@", + SCNetworkInterfaceGetBSDName(interface)); + + if (S_trustRequired == NULL) { + S_trustRequired = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + } + CFArrayAppendValue(S_trustRequired, watched); + updated = TRUE; + } + } + } + + if (updated) { + static dispatch_once_t once; + CFRunLoopRef rl = CFRunLoopGetCurrent(); + + dispatch_once(&once, ^{ + // watch for "Trusted host attached" + watchTrustedStatus(kLockdownNotificationTrustedHostAttached, + CFSTR("Trusted Host attached")); + + // watch for "Host detached" + watchTrustedStatus(kLockdownNotificationHostDetached, + CFSTR("Host detached")); + }); + + CFRetain(rl); + dispatch_async(trustRequired_queue(), ^{ + trustRequiredNotification_update(rl, CFSTR("TrustRequired interface added")); + CFRelease(rl); + }); + } + + return; +} +#endif // TARGET_OS_IPHONE + + #pragma mark - #pragma mark Interface naming @@ -1715,6 +2372,28 @@ isQuiet(void) return (S_quiet == MACH_PORT_NULL); } +static Boolean +wasPreviouslyUsedInterface(CFDictionaryRef dbdict, SCNetworkInterfaceRef interface) +{ + CFArrayRef matchingMACs; + + matchingMACs = CFDictionaryGetValue(dbdict, CFSTR(kSCNetworkInterfaceMatchingMACs)); + if (matchingMACs != NULL) { + CFDataRef addr; + + addr = _SCNetworkInterfaceGetHardwareAddress(interface); + if (addr != NULL) { + if (CFArrayContainsValue(matchingMACs, + CFRangeMake(0, CFArrayGetCount(matchingMACs)), + addr)) { + return TRUE; + } + } + } + + return FALSE; +} + static void nameInterfaces(CFMutableArrayRef if_list) { @@ -1756,7 +2435,7 @@ nameInterfaces(CFMutableArrayRef if_list) CFDictionaryRef dbdict; boolean_t is_builtin; kern_return_t kr; - int retries = 0; + int retries = 0; dbdict = lookupInterfaceByAddress(S_dblist, interface, NULL); if (dbdict != NULL) { @@ -1781,30 +2460,38 @@ nameInterfaces(CFMutableArrayRef if_list) i + 1, is_builtin ? kCFBooleanTrue : kCFBooleanFalse); + if ((dbdict != NULL) && wasPreviouslyUsedInterface(dbdict, interface)) { + unit = CFDictionaryGetValue(dbdict, CFSTR(kIOInterfaceUnit)); + CFRetain(unit); + + SC_log(LOG_INFO, "Interface assigned unit %@ (updating database w/previously used interface)", unit); + } + #if !TARGET_OS_IPHONE - if (!is_builtin && + if ((unit == NULL) && + !is_builtin && (dbdict != NULL) && blockNewInterfaces() && !_SCNetworkInterfaceIsApplePreconfigured(interface) && isConsoleLocked()) { - CFDataRef addr; + CFStringRef addr; // if new (but matching) interface and console locked, ignore + addr = SCNetworkInterfaceGetHardwareAddressString(interface); SC_log(LOG_NOTICE, "Console locked, network interface* ignored"); - SC_log(LOG_INFO, " path = %@", path); - addr = _SCNetworkInterfaceGetHardwareAddress(interface); - if (addr != NULL) { - SC_log(LOG_INFO, " addr = %@", addr); - } + SC_log(LOG_INFO, " path = %@, addr = %@", + path, + (addr != NULL) ? addr : CFSTR("?")); + watchLockedInterface(interface); continue; } #endif // !TARGET_OS_IPHONE - if (dbdict != NULL) { + if ((unit == NULL) && (dbdict != NULL)) { unit = CFDictionaryGetValue(dbdict, CFSTR(kIOInterfaceUnit)); CFRetain(unit); - SC_log(LOG_INFO, "Interface assigned unit %@ (updating database)", unit); + SC_log(LOG_INFO, "Interface assigned unit %@ (updating database w/new interface)", unit); } } @@ -1848,15 +2535,15 @@ nameInterfaces(CFMutableArrayRef if_list) blockNewInterfaces() && !_SCNetworkInterfaceIsApplePreconfigured(interface) && isConsoleLocked()) { - CFDataRef addr; + CFStringRef addr; // if new interface and console locked, ignore + addr = SCNetworkInterfaceGetHardwareAddressString(interface); SC_log(LOG_NOTICE, "Console locked, network interface ignored"); - SC_log(LOG_INFO, " path = %@", path); - addr = _SCNetworkInterfaceGetHardwareAddress(interface); - if (addr != NULL) { - SC_log(LOG_INFO, " addr = %@", addr); - } + SC_log(LOG_INFO, " path = %@, addr = %@", + path, + (addr != NULL) ? addr : CFSTR("?")); + watchLockedInterface(interface); continue; } #endif // !TARGET_OS_IPHONE @@ -2018,7 +2705,11 @@ updateNetworkConfiguration(CFArrayRef if_list) SCPreferencesRef prefs = NULL; SCNetworkSetRef set = NULL; - prefs = SCPreferencesCreate(NULL, CFSTR("InterfaceNamer:updateNetworkConfiguration"), NULL); + prefs = SCPreferencesCreate(NULL, CFSTR(MY_PLUGIN_NAME ":updateNetworkConfiguration"), NULL); + if (prefs == NULL) { + SC_log(LOG_NOTICE, "SCPreferencesCreate() failed: %s", SCErrorString(SCError())); + return; + } set = SCNetworkSetCopyCurrent(prefs); if (set == NULL) { @@ -2204,6 +2895,13 @@ updateInterfaces() */ updatePreConfiguredInterfaces(S_iflist); +#if TARGET_OS_IPHONE + /* + * Update the list of "trust required" interfaces + */ + updateTrustRequiredInterfaces(S_iflist); +#endif // TARGET_OS_IPHONE + if (isQuiet()) { /* * The registry [matching] has quiesced so let's @@ -2730,7 +3428,7 @@ setup_IOKit(CFBundleRef bundle) } #endif /* WAIT_PREVIOUS_BOOT_INTERFACES_OR_QUIET */ -#if !TARGET_OS_EMBEDDED +#if TARGET_OS_OSX if (S_dblist != NULL) { // apply special handling for the BT-PAN interface (if present) CFArrayApplyFunction(S_dblist, @@ -2738,7 +3436,7 @@ setup_IOKit(CFBundleRef bundle) updateBTPANInformation, NULL); } -#endif // !TARGET_OS_EMBEDDED +#endif // TARGET_OS_OSX ok = TRUE; @@ -2758,7 +3456,7 @@ setup_Virtual(CFBundleRef bundle) { #pragma unused(bundle) // open a SCPreferences session - S_prefs = SCPreferencesCreate(NULL, CFSTR(MY_PLUGIN_NAME), NULL); + S_prefs = SCPreferencesCreate(NULL, CFSTR(MY_PLUGIN_NAME ":setup_Virtual"), NULL); if (S_prefs == NULL) { SC_log(LOG_ERR, "SCPreferencesCreate() failed: %s", SCErrorString(SCError())); diff --git a/Plugins/KernelEventMonitor/ev_dlil.c b/Plugins/KernelEventMonitor/ev_dlil.c index 2e759d5..dd45883 100644 --- a/Plugins/KernelEventMonitor/ev_dlil.c +++ b/Plugins/KernelEventMonitor/ev_dlil.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2017 Apple Inc. All rights reserved. + * Copyright (c) 2002-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -38,17 +38,24 @@ #endif /* kSCEntNetIdleRoute */ static CFStringRef -create_interface_key(const char * if_name) +create_interface_cfstring(const char * if_name) +{ + CFStringRef interface; + + interface = CFStringCreateWithCString(NULL, if_name, + kCFStringEncodingUTF8); + return (interface); +} + +static CFStringRef +create_interface_key(CFStringRef interface) { - CFStringRef interface; CFStringRef key; - interface = CFStringCreateWithCString(NULL, if_name, kCFStringEncodingMacRoman); key = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, kSCDynamicStoreDomainState, interface, kSCEntNetLink); - CFRelease(interface); return (key); } @@ -87,6 +94,7 @@ copy_entity(CFStringRef key) static void interface_update_status(const char *if_name, + CFStringRef interface, CFBooleanRef active, boolean_t attach, CFBooleanRef expensive, boolean_t only_if_different) { @@ -94,7 +102,7 @@ interface_update_status(const char *if_name, CFMutableDictionaryRef newDict; CFDictionaryRef oldDict; - key = create_interface_key(if_name); + key = create_interface_key(interface); oldDict = cache_SCDynamicStoreCopyValue(store, key); if (oldDict != NULL && isA_CFDictionary(oldDict) == NULL) { CFRelease(oldDict); @@ -148,17 +156,14 @@ interface_update_status(const char *if_name, #ifdef KEV_DL_LINK_QUALITY_METRIC_CHANGED static CFStringRef -create_linkquality_key(const char * if_name) +create_linkquality_key(CFStringRef interface) { - CFStringRef interface; CFStringRef key; - interface = CFStringCreateWithCString(NULL, if_name, kCFStringEncodingMacRoman); key = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, kSCDynamicStoreDomainState, interface, kSCEntNetLinkQuality); - CFRelease(interface); return (key); } @@ -168,14 +173,17 @@ void interface_update_quality_metric(const char *if_name, int quality) { - CFStringRef key = NULL; - CFMutableDictionaryRef newDict = NULL; - CFNumberRef linkquality = NULL; + CFStringRef key; + CFStringRef interface; + CFMutableDictionaryRef newDict; - key = create_linkquality_key(if_name); + interface = create_interface_cfstring(if_name); + key = create_linkquality_key(interface); newDict = copy_entity(key); if (quality != IFNET_LQM_THRESH_UNKNOWN) { + CFNumberRef linkquality; + linkquality = CFNumberCreate(NULL, kCFNumberIntType, &quality); CFDictionarySetValue(newDict, kSCPropNetLinkQuality, linkquality); CFRelease(linkquality); @@ -192,6 +200,7 @@ interface_update_quality_metric(const char *if_name, cache_SCDynamicStoreRemoveValue(store, key); } + CFRelease(interface); CFRelease(key); CFRelease(newDict); return; @@ -233,17 +242,14 @@ link_update_quality_metric(const char *if_name) #ifdef KEV_DL_ISSUES static CFStringRef -create_link_issues_key(const char * if_name) +create_link_issues_key(CFStringRef interface) { - CFStringRef interface; CFStringRef key; - interface = CFStringCreateWithCString(NULL, if_name, kCFStringEncodingMacRoman); key = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, kSCDynamicStoreDomainState, interface, kSCEntNetLinkIssues); - CFRelease(interface); return (key); } @@ -258,12 +264,14 @@ interface_update_link_issues(const char *if_name, size_t info_size) { CFDataRef infoData; + CFStringRef interface; CFStringRef key; CFDataRef modidData; CFMutableDictionaryRef newDict; CFDateRef timeStamp; - key = create_link_issues_key(if_name); + interface = create_interface_cfstring(if_name); + key = create_link_issues_key(interface); newDict = copy_entity(key); @@ -285,6 +293,7 @@ interface_update_link_issues(const char *if_name, SC_log(LOG_DEBUG, "Update interface link issues: %s: %@", if_name, newDict); cache_SCDynamicStoreSetValue(store, key, newDict); + CFRelease(interface); CFRelease(newDict); CFRelease(key); return; @@ -296,52 +305,74 @@ __private_extern__ void interface_detaching(const char *if_name) { + CFStringRef interface; CFStringRef key; CFMutableDictionaryRef newDict; SC_log(LOG_DEBUG, "Detach interface: %s", if_name); - key = create_interface_key(if_name); + interface = create_interface_cfstring(if_name); + key = create_interface_key(interface); newDict = copy_entity(key); CFDictionarySetValue(newDict, kSCPropNetLinkDetaching, kCFBooleanTrue); cache_SCDynamicStoreSetValue(store, key, newDict); + CFRelease(interface); CFRelease(newDict); CFRelease(key); return; } +static CFStringRef +create_nat64_key(CFStringRef interface) +{ + CFStringRef key; + + key = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, + kSCDynamicStoreDomainState, + interface, + kSCEntNetNAT64); + return (key); +} + static void interface_remove(const char *if_name) { + CFStringRef interface; CFStringRef key; SC_log(LOG_DEBUG, "Remove interface: %s", if_name); - key = create_interface_key(if_name); + interface = create_interface_cfstring(if_name); + + key = create_interface_key(interface); + cache_SCDynamicStoreRemoveValue(store, key); + CFRelease(key); + + key = create_nat64_key(interface); cache_SCDynamicStoreRemoveValue(store, key); CFRelease(key); #ifdef KEV_DL_LINK_QUALITY_METRIC_CHANGED - key = create_linkquality_key(if_name); + key = create_linkquality_key(interface); cache_SCDynamicStoreRemoveValue(store, key); CFRelease(key); #endif /* KEV_DL_LINK_QUALITY_METRIC_CHANGED */ #ifdef KEV_DL_ISSUES - key = create_link_issues_key(if_name); + key = create_link_issues_key(interface); cache_SCDynamicStoreRemoveValue(store, key); CFRelease(key); #endif /* KEV_DL_ISSUES */ + CFRelease(interface); return; } -__private_extern__ -void -link_update_status(const char *if_name, boolean_t attach, boolean_t only_if_different) +static void +S_link_update_status(const char *if_name, CFStringRef interface, boolean_t attach, boolean_t only_if_different) { CFBooleanRef active = NULL; CFBooleanRef expensive = NULL; @@ -389,27 +420,40 @@ link_update_status(const char *if_name, boolean_t attach, boolean_t only_if_diff } /* update status */ - interface_update_status(if_name, active, attach, expensive, only_if_different); + interface_update_status(if_name, interface, active, attach, expensive, only_if_different); close(sock); return; } +__private_extern__ +void +link_update_status(const char *if_name, boolean_t attach, boolean_t only_if_different) +{ + CFStringRef interface; + + interface = create_interface_cfstring(if_name); + S_link_update_status(if_name, interface, attach, only_if_different); + CFRelease(interface); +} + __private_extern__ void link_update_status_if_missing(const char * if_name) { + CFStringRef interface; CFStringRef key; CFDictionaryRef dict; - key = create_interface_key(if_name); + interface = create_interface_cfstring(if_name); + key = create_interface_key(interface); dict = cache_SCDynamicStoreCopyValue(store, key); if (dict != NULL) { /* it's already present, don't update */ CFRelease(dict); goto done; } - link_update_status(if_name, FALSE, FALSE); + S_link_update_status(if_name, interface, FALSE, FALSE); dict = cache_SCDynamicStoreCopyValue(store, key); if (dict != NULL) { /* our action made it appear */ @@ -417,6 +461,7 @@ link_update_status_if_missing(const char * if_name) CFRelease(dict); } done: + CFRelease(interface); CFRelease(key); return; } @@ -497,7 +542,7 @@ interfaceListAddInterface(CFMutableArrayRef ifList, const char * if_name) Boolean added = FALSE; CFStringRef interface; - interface = CFStringCreateWithCString(NULL, if_name, kCFStringEncodingMacRoman); + interface = create_interface_cfstring(if_name); if (!CFArrayContainsValue(ifList, CFRangeMake(0, CFArrayGetCount(ifList)), interface)) { @@ -524,7 +569,7 @@ interfaceListRemoveInterface(CFMutableArrayRef ifList, const char * if_name) CFStringRef interface; CFIndex where; - interface = CFStringCreateWithCString(NULL, if_name, kCFStringEncodingMacRoman); + interface = create_interface_cfstring(if_name); where = CFArrayGetFirstIndexOfValue(ifList, CFRangeMake(0, CFArrayGetCount(ifList)), interface); @@ -602,29 +647,26 @@ __private_extern__ void interface_update_idle_state(const char *if_name) { - CFStringRef if_name_cf; + CFStringRef interface; CFStringRef key; int ref; - /* We will only update the SCDynamicStore if the idle ref count - * is still 0 */ + /* only update the SCDynamicStore if the idle ref count is still 0 */ ref = socket_reference_count(if_name); if (ref != 0) { return; } - if_name_cf = CFStringCreateWithCString(NULL, if_name, - kCFStringEncodingASCII); - + interface = create_interface_cfstring(if_name); key = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, kSCDynamicStoreDomainState, - if_name_cf, + interface, kSCEntNetIdleRoute); SC_log(LOG_DEBUG, "Post interface idle: %s", if_name); cache_SCDynamicStoreNotifyValue(store, key); CFRelease(key); - CFRelease(if_name_cf); + CFRelease(interface); return; } #endif // KEV_DL_IF_IDLE_ROUTE_REFCNT diff --git a/Plugins/KernelEventMonitor/ev_extra.m b/Plugins/KernelEventMonitor/ev_extra.m index cfd0163..5c42ec3 100644 --- a/Plugins/KernelEventMonitor/ev_extra.m +++ b/Plugins/KernelEventMonitor/ev_extra.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016 Apple Inc. All rights reserved. + * Copyright (c) 2013-2016, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/Plugins/KernelEventMonitor/ev_ipv6.c b/Plugins/KernelEventMonitor/ev_ipv6.c index 6d8f6f9..5ab6bdb 100644 --- a/Plugins/KernelEventMonitor/ev_ipv6.c +++ b/Plugins/KernelEventMonitor/ev_ipv6.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2007, 2011, 2013, 2015, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2002-2007, 2011, 2013, 2015, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/Plugins/KernelEventMonitor/eventmon.c b/Plugins/KernelEventMonitor/eventmon.c index efb8c8c..9c3d7b4 100644 --- a/Plugins/KernelEventMonitor/eventmon.c +++ b/Plugins/KernelEventMonitor/eventmon.c @@ -61,7 +61,11 @@ #include #include #include +#if __has_include() +#include +#else // __has_include() #include +#endif // __has_include() #include static dispatch_queue_t S_kev_queue; @@ -72,7 +76,7 @@ __private_extern__ Boolean _verbose = FALSE; __private_extern__ os_log_t -__log_KernelEventMonitor() +__log_KernelEventMonitor(void) { static os_log_t log = NULL; diff --git a/Plugins/KernelEventMonitor/eventmon.h b/Plugins/KernelEventMonitor/eventmon.h index 0098bae..4990682 100644 --- a/Plugins/KernelEventMonitor/eventmon.h +++ b/Plugins/KernelEventMonitor/eventmon.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2016 Apple Inc. All rights reserved. + * Copyright (c) 2002-2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -64,7 +64,7 @@ extern Boolean _verbose; __BEGIN_DECLS os_log_t -__log_KernelEventMonitor (); +__log_KernelEventMonitor (void); int dgram_socket (int domain); diff --git a/Plugins/LinkConfiguration/linkconfig.c b/Plugins/LinkConfiguration/linkconfig.c index 0da7db8..16fe3c4 100644 --- a/Plugins/LinkConfiguration/linkconfig.c +++ b/Plugins/LinkConfiguration/linkconfig.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2007, 2011, 2013, 2015-2017 Apple Inc. All rights reserved. + * Copyright (c) 2002-2007, 2011, 2013, 2015-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -55,7 +55,7 @@ static CFMutableDictionaryRef wantSettings = NULL; static os_log_t -__log_LinkConfiguration() +__log_LinkConfiguration(void) { static os_log_t log = NULL; @@ -780,6 +780,7 @@ load_LinkConfiguration(CFBundleRef bundle, Boolean bundleVerbose) CFArrayAppendValue(patterns, key); CFRelease(key); +#if TARGET_OS_OSX /* ...watch for (per-interface) FireWire configuration changes */ key = SCDynamicStoreKeyCreateNetworkInterfaceEntity(NULL, kSCDynamicStoreDomainSetup, @@ -787,6 +788,7 @@ load_LinkConfiguration(CFBundleRef bundle, Boolean bundleVerbose) kSCEntNetFireWire); CFArrayAppendValue(patterns, key); CFRelease(key); +#endif // TARGET_OS_OSX /* register the keys/patterns */ ok = SCDynamicStoreSetNotificationKeys(store, keys, patterns); diff --git a/Plugins/PreferencesMonitor/prefsmon.c b/Plugins/PreferencesMonitor/prefsmon.c index 84e9476..a8d8ef0 100644 --- a/Plugins/PreferencesMonitor/prefsmon.c +++ b/Plugins/PreferencesMonitor/prefsmon.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2008, 2010, 2012-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2008, 2010, 2012-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -59,10 +59,12 @@ static SCPreferencesRef prefs = NULL; static SCDynamicStoreRef store = NULL; /* InterfaceNamer[.plugin] monitoring globals */ +static CFMutableArrayRef excluded_interfaces = NULL; // of SCNetworkInterfaceRef +static CFMutableArrayRef excluded_names = NULL; // of CFStringRef (BSD name) Boolean haveConfiguration = FALSE; static CFStringRef namerKey = NULL; -static CFMutableArrayRef preconfigured_names = NULL; // of CFStringRef (BSD name) static CFMutableArrayRef preconfigured_interfaces= NULL; // of SCNetworkInterfaceRef +static CFMutableArrayRef preconfigured_names = NULL; // of CFStringRef (BSD name) /* KernelEventMonitor[.plugin] monitoring globals */ static CFStringRef interfacesKey = NULL; @@ -87,7 +89,7 @@ updateConfiguration(SCPreferencesRef prefs, static os_log_t -__log_PreferencesMonitor() +__log_PreferencesMonitor(void) { static os_log_t log = NULL; @@ -408,6 +410,76 @@ done: } +static Boolean +findInterfaces(CFArrayRef interfaces, CFMutableArrayRef *matched_interfaces, CFMutableArrayRef *matched_names) +{ + CFIndex n; + CFIndex nx = 0; + Boolean updated = FALSE; + + // start clean + if (*matched_interfaces != NULL) { + CFRelease(*matched_interfaces); + *matched_interfaces = NULL; + } + if (*matched_names != NULL) { + nx = CFArrayGetCount(*matched_names); + CFRelease(*matched_names); + *matched_names = NULL; + } + + n = (interfaces != NULL) ? CFArrayGetCount(interfaces) : 0; + for (CFIndex i = 0; i < n; i++) { + CFStringRef bsdName = CFArrayGetValueAtIndex(interfaces, i); + SCNetworkInterfaceRef interface; + + for (int retry = 0; retry < 10; retry++) { + if (retry != 0) { + // add short delay (before retry) + usleep(20 * 1000); // 20ms + } + + interface = _SCNetworkInterfaceCreateWithBSDName(NULL, bsdName, kIncludeNoVirtualInterfaces); + if (interface == NULL) { + SC_log(LOG_ERR, "could not create network interface for %@", bsdName); + } else if (_SCNetworkInterfaceGetIOPath(interface) == NULL) { + SC_log(LOG_ERR, "could not get IOPath for %@", bsdName); + CFRelease(interface); + interface = NULL; + } + + if (interface == NULL) { + // if SCNetworkInterface not [currently] available + continue; + } + + // keep track of the interface name (quicker than having to iterate the list + // of SCNetworkInterfaces, extract the name, and compare). + if (*matched_names == NULL) { + *matched_names = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + } + CFArrayAppendValue(*matched_names, bsdName); + + if (*matched_interfaces == NULL) { + *matched_interfaces = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + } + CFArrayAppendValue(*matched_interfaces, interface); + CFRelease(interface); + + updated = TRUE; + } + } + + // check if all interfaces were detached + n = (*matched_names != NULL) ? CFArrayGetCount(*matched_names) : 0; + if ((nx > 0) && (n == 0)) { + updated = TRUE; + } + + return updated; +} + + static void storeCallback(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) { @@ -420,11 +492,14 @@ storeCallback(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) /* * Capture/process InterfaceNamer[.bundle] info * 1. check if IORegistry "quiet", "timeout" - * 2. update list of named pre-configured interfaces + * 2. update list of excluded interfaces (e.g. those requiring that + * the attached host be trusted) + * 3. update list of named pre-configured interfaces */ dict = SCDynamicStoreCopyValue(store, namerKey); if (dict != NULL) { if (isA_CFDictionary(dict)) { + CFArrayRef excluded; CFArrayRef preconfigured; if (CFDictionaryContainsKey(dict, kInterfaceNamerKey_Quiet)) { @@ -434,78 +509,35 @@ storeCallback(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) timeout = TRUE; } - preconfigured = CFDictionaryGetValue(dict, kInterfaceNamerKey_PreConfiguredInterfaces); - preconfigured = isA_CFArray(preconfigured); - if (!_SC_CFEqual(preconfigured, preconfigured_names)) { - CFIndex n; - CFIndex nx = 0; - - // start clean - if (preconfigured_names != NULL) { - nx = CFArrayGetCount(preconfigured_names); - CFRelease(preconfigured_names); - preconfigured_names = NULL; - } - if (preconfigured_interfaces != NULL) { - CFRelease(preconfigured_interfaces); - preconfigured_interfaces = NULL; - } + excluded = CFDictionaryGetValue(dict, kInterfaceNamerKey_ExcludedInterfaces); + excluded = isA_CFArray(excluded); + if (!_SC_CFEqual(excluded, excluded_names)) { + Boolean excluded_updated; - // add pre-configured interfaces - n = (preconfigured != NULL) ? CFArrayGetCount(preconfigured) : 0; - for (CFIndex i = 0; i < n; i++) { - CFStringRef bsdName = CFArrayGetValueAtIndex(preconfigured, i); - SCNetworkInterfaceRef interface; - - for (int retry = 0; retry < 10; retry++) { - if (retry != 0) { - // add short delay (before retry) - usleep(20 * 1000); // 20ms - } - - interface = _SCNetworkInterfaceCreateWithBSDName(NULL, bsdName, kIncludeNoVirtualInterfaces); - if (interface == NULL) { - SC_log(LOG_ERR, "could not create network interface for %@", bsdName); - } else if (_SCNetworkInterfaceGetIOPath(interface) == NULL) { - SC_log(LOG_ERR, "could not get IOPath for %@", bsdName); - CFRelease(interface); - interface = NULL; - } - - if (interface != NULL) { - // if we have an interface - break; - } - } - - if (interface == NULL) { - // if SCNetworkInterface not [currently] available - continue; - } - - // keep track of the interface name (quicker than having to iterate the list - // of SCNetworkInterfaces, extract the name, and compare). - if (preconfigured_names == NULL) { - preconfigured_names = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); - } - CFArrayAppendValue(preconfigured_names, bsdName); + excluded_updated = findInterfaces(excluded, &excluded_interfaces, &excluded_names); + if (excluded_updated) { + CFStringRef interfaces = CFSTR(""); - if (preconfigured_interfaces == NULL) { - preconfigured_interfaces = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + // report [updated] pre-configured interfaces + if (excluded_names != NULL) { + interfaces = CFStringCreateByCombiningStrings(NULL, excluded_names, CFSTR(",")); + } else { + CFRetain(interfaces); } - CFArrayAppendValue(preconfigured_interfaces, interface); - CFRelease(interface); + SC_log(LOG_INFO, "excluded interface list changed: %@", interfaces); + CFRelease(interfaces); updated = TRUE; } + } - // check if all pre-configured interfaces were detached - n = (preconfigured_names != NULL) ? CFArrayGetCount(preconfigured_names) : 0; - if ((nx > 0) && (n == 0)) { - updated = TRUE; - } + preconfigured = CFDictionaryGetValue(dict, kInterfaceNamerKey_PreConfiguredInterfaces); + preconfigured = isA_CFArray(preconfigured); + if (!_SC_CFEqual(preconfigured, preconfigured_names)) { + Boolean preconfigured_updated; - if (updated) { + preconfigured_updated = findInterfaces(preconfigured, &preconfigured_interfaces, &preconfigured_names); + if (preconfigured_updated) { CFStringRef interfaces = CFSTR(""); // report [updated] pre-configured interfaces @@ -516,6 +548,8 @@ storeCallback(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) } SC_log(LOG_INFO, "pre-configured interface list changed: %@", interfaces); CFRelease(interfaces); + + updated = TRUE; } } } @@ -716,6 +750,77 @@ copyInterfaceUUID(CFStringRef bsdName) } +static void +excludeConfigurations(SCPreferencesRef prefs) +{ + Boolean ok; + CFRange range; + CFArrayRef services; + SCNetworkSetRef set; + + range = CFRangeMake(0, + (excluded_names != NULL) ? CFArrayGetCount(excluded_names) : 0); + if (range.length == 0) { + // if no [excluded] interfaces + return; + } + + set = SCNetworkSetCopyCurrent(prefs); + if (set == NULL) { + // if no current set + return; + } + + /* + * Check for (and remove) any network services associated with + * an excluded interface from the prefs. + */ + services = SCNetworkSetCopyServices(set); + if (services != NULL) { + CFIndex n; + + n = CFArrayGetCount(services); + for (CFIndex i = 0; i < n; i++) { + CFStringRef bsdName; + SCNetworkInterfaceRef interface; + SCNetworkServiceRef service; + + service = CFArrayGetValueAtIndex(services, i); + + interface = SCNetworkServiceGetInterface(service); + if (interface == NULL) { + // if no interface + continue; + } + + bsdName = SCNetworkInterfaceGetBSDName(interface); + if (bsdName == NULL) { + // if no interface name + continue; + } + + if (!CFArrayContainsValue(excluded_names, range, bsdName)) { + // if not excluded + continue; + } + + // remove [excluded] network service from the prefs + SC_log(LOG_NOTICE, "removing network service for %@", bsdName); + ok = SCNetworkSetRemoveService(set, service); + if (!ok) { + SC_log(LOG_ERR, "SCNetworkSetRemoveService() failed: %s", + SCErrorString(SCError())); + } + } + + CFRelease(services); + } + + CFRelease(set); + return; +} + + static void updatePreConfiguredConfiguration(SCPreferencesRef prefs) { @@ -1086,6 +1191,9 @@ updateConfiguration(SCPreferencesRef prefs, /* add any [Apple] pre-configured network services */ updatePreConfiguredConfiguration(prefs); + /* remove any excluded network services */ + excludeConfigurations(prefs); + /* update SCDynamicStore (Setup:) */ updateSCDynamicStore(prefs); diff --git a/Plugins/QoSMarking/Info-Embedded.plist b/Plugins/QoSMarking/Info-Embedded.plist new file mode 100644 index 0000000..a50488c --- /dev/null +++ b/Plugins/QoSMarking/Info-Embedded.plist @@ -0,0 +1,37 @@ + + + + + Builtin + + CFBundleDevelopmentRegion + English + CFBundleExecutable + QoSMarking + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + com.apple.SystemConfiguration.QoSMarking + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.17 + CFBundleSignature + ???? + CFBundleVersion + 1.17 + QoSMarking_AppleAudioVideoCalls_BundleIDs + + com.apple.datausage.telephony.ims + com.apple.facetime + com.apple.siri + + Requires + + com.apple.SystemConfiguration.InterfaceNamer + com.apple.SystemConfiguration.PreferencesMonitor + + + diff --git a/Plugins/QoSMarking/Info.plist b/Plugins/QoSMarking/Info.plist index a50488c..93d8733 100644 --- a/Plugins/QoSMarking/Info.plist +++ b/Plugins/QoSMarking/Info.plist @@ -28,6 +28,10 @@ com.apple.facetime com.apple.siri + QoSMarking_AppleAudioVideoCalls_ExecutablePaths + + /System/Library/PrivateFrameworks/IDS.framework/identityservicesd.app/Contents/MacOS/identityservicesd + Requires com.apple.SystemConfiguration.InterfaceNamer diff --git a/Plugins/QoSMarking/qos-marking.m b/Plugins/QoSMarking/qos-marking.m index 6c3f953..07b42c1 100644 --- a/Plugins/QoSMarking/qos-marking.m +++ b/Plugins/QoSMarking/qos-marking.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2016-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -72,7 +72,7 @@ static NSArray * qosMarkingAudioVideoCalls_executablePaths = nil; __private_extern__ os_log_t -__log_QoSMarking() +__log_QoSMarking(void) { static os_log_t log = NULL; diff --git a/Plugins/SimulatorSupport/simulator_support.c b/Plugins/SimulatorSupport/simulator_support.c index 3a8def0..8c953a4 100644 --- a/Plugins/SimulatorSupport/simulator_support.c +++ b/Plugins/SimulatorSupport/simulator_support.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015-2017 Apple Inc. All rights reserved. + * Copyright (c) 2013, 2015-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -29,6 +29,7 @@ */ +#include #include #include #include @@ -38,6 +39,8 @@ #include "cache.h" +#if TARGET_OS_SIMULATOR && !TARGET_OS_IOSMAC + static CFMutableArrayRef mirror_keys = NULL; static CFMutableArrayRef mirror_patterns = NULL; @@ -53,7 +56,7 @@ static SCDynamicStoreRef store_sim = NULL; * Logging */ __private_extern__ os_log_t -__log_SimulatorSupport() +__log_SimulatorSupport(void) { static os_log_t log = NULL; @@ -321,3 +324,5 @@ main(int argc, char **argv) return 0; } #endif + +#endif // TARGET_OS_SIMULATOR && !TARGET_OS_IOSMAC diff --git a/Plugins/common/IPMonitorControlPrefs.c b/Plugins/common/IPMonitorControlPrefs.c index d6eddca..cf441b0 100644 --- a/Plugins/common/IPMonitorControlPrefs.c +++ b/Plugins/common/IPMonitorControlPrefs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015-2017 Apple Inc. All rights reserved. + * Copyright (c) 2013, 2015-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -39,7 +39,7 @@ #include #include "IPMonitorControlPrefs.h" -os_log_t __log_IPMonitor(); +os_log_t __log_IPMonitor(void); /* * kIPMonitorControlPrefsID diff --git a/Plugins/common/InterfaceNamerControlPrefs.c b/Plugins/common/InterfaceNamerControlPrefs.c index 2fa9dd4..bb119fa 100644 --- a/Plugins/common/InterfaceNamerControlPrefs.c +++ b/Plugins/common/InterfaceNamerControlPrefs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Apple Inc. All rights reserved. + * Copyright (c) 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/Plugins/common/plugin_shared.h b/Plugins/common/plugin_shared.h index bc2a7f3..0816b57 100644 --- a/Plugins/common/plugin_shared.h +++ b/Plugins/common/plugin_shared.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2016, 2018 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -47,6 +47,12 @@ #define kInterfaceNamerKey_Quiet CFSTR("*QUIET*") #define kInterfaceNamerKey_Timeout CFSTR("*TIMEOUT*") +// Configuration excluded network interfaces +#define kInterfaceNamerKey_ExcludedInterfaces CFSTR("_Excluded_") + +// Network interfaces that have not yet been made available because the console is "locked" +#define kInterfaceNamerKey_LockedInterfaces CFSTR("_Locked_") + // [Apple] pre-configured network interfaces #define kInterfaceNamerKey_PreConfiguredInterfaces CFSTR("_PreConfigured_") diff --git a/SCMonitor/monitor.c b/SCMonitor/monitor.c index e54134a..220b188 100644 --- a/SCMonitor/monitor.c +++ b/SCMonitor/monitor.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007-2017 Apple Inc. All rights reserved. + * Copyright (c) 2007-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -116,7 +116,7 @@ static CFMutableDictionaryRef notify_to_instance = NULL; * Logging */ static os_log_t -__log_SCMonitor() +__log_SCMonitor(void) { static os_log_t log = NULL; diff --git a/SystemConfiguration.fproj/BondConfiguration.c b/SystemConfiguration.fproj/BondConfiguration.c index dc16ad5..f6a566f 100644 --- a/SystemConfiguration.fproj/BondConfiguration.c +++ b/SystemConfiguration.fproj/BondConfiguration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2017 Apple Inc. All rights reserved. + * Copyright (c) 2004-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/SystemConfiguration.fproj/BridgeConfiguration.c b/SystemConfiguration.fproj/BridgeConfiguration.c index 55da5cf..2624382 100644 --- a/SystemConfiguration.fproj/BridgeConfiguration.c +++ b/SystemConfiguration.fproj/BridgeConfiguration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2017 Apple Inc. All rights reserved. + * Copyright (c) 2009-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/SystemConfiguration.fproj/CaptiveNetwork.c b/SystemConfiguration.fproj/CaptiveNetwork.c index 8ed2fd4..5caac04 100644 --- a/SystemConfiguration.fproj/CaptiveNetwork.c +++ b/SystemConfiguration.fproj/CaptiveNetwork.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, 2012, 2013, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2009, 2010, 2012, 2013, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include #include @@ -35,11 +37,9 @@ #pragma mark CaptiveNetwork.framework APIs (exported through the SystemConfiguration.framework) -#if TARGET_OS_IPHONE const CFStringRef kCNNetworkInfoKeySSIDData = CFSTR("SSIDDATA"); const CFStringRef kCNNetworkInfoKeySSID = CFSTR("SSID"); const CFStringRef kCNNetworkInfoKeyBSSID = CFSTR("BSSID"); -#endif // TARGET_OS_IPHONE static void * @@ -101,16 +101,122 @@ CNCopySupportedInterfaces(void) return dyfunc ? dyfunc() : NULL; } - #if TARGET_OS_IPHONE + +#define CN_COPY_ENTITLEMENT CFSTR("com.apple.developer.networking.wifi-info") + +static CFDictionaryRef +__CopyEntitlementsForPID(pid_t pid) +{ + uint8_t *buffer = NULL; + size_t bufferlen = 0L; + int64_t datalen = 0L; + CFDataRef cfdata = NULL; + struct csheader { + uint32_t magic; + uint32_t length; + } csheader = { 0, 0 }; + int error = -1; + CFPropertyListRef plist = NULL; + + /* + * Get the length of the actual entitlement data + */ + error = csops(pid, CS_OPS_ENTITLEMENTS_BLOB, &csheader, sizeof(csheader)); + + if (error == -1 && errno == ERANGE) { + bufferlen = ntohl(csheader.length); + if (bufferlen > 1024 * 1024 || bufferlen < 8) { + errno = EINVAL; + goto out; + } + buffer = malloc(bufferlen); + if (buffer == NULL) { + goto out; + } + error = csops(pid, CS_OPS_ENTITLEMENTS_BLOB, buffer, bufferlen); + if (error < 0) { + goto out; + } + } + + datalen = bufferlen - sizeof(csheader); + + if (error == 0 && buffer && datalen > 0) { + cfdata = CFDataCreateWithBytesNoCopy(kCFAllocatorDefault, buffer + sizeof(csheader), datalen, kCFAllocatorNull); + if (cfdata == NULL) { + goto out; + } + + plist = CFPropertyListCreateWithData(NULL, cfdata, kCFPropertyListImmutable, NULL, NULL); + if (!plist) { + SC_log(LOG_ERR, "Could not decode entitlements for pid %d", pid); + } + } + else { + SC_log(LOG_ERR, "Could not get valid codesigning data for pid %d. Error %d", pid, error); + } +out: + if (error < 0) { + SC_log(LOG_ERR, "Error getting entitlements for pid %d: %s", pid, strerror(errno)); + } + if (cfdata != NULL) { + CFRelease(cfdata); + } + if (buffer != NULL) { + free(buffer); + } + if (plist && !isA_CFDictionary(plist)) { + SC_log(LOG_ERR, "Could not decode entitlements for pid %d as a dictionary.", pid); + CFRelease(plist); + plist = NULL; + } + + return plist; +} + +static Boolean +__isApplicationEntitled(void) +{ + if (dyld_get_program_sdk_version() >= DYLD_IOS_VERSION_12_0) { + /* application is linked on or after iOS 12.0 SDK so it must have the entitlement */ + CFTypeRef entitlement = NULL; + CFDictionaryRef entitlements = __CopyEntitlementsForPID(getpid()); + if (entitlements != NULL) { + Boolean entitled = FALSE; + entitlement = CFDictionaryGetValue(entitlements, CN_COPY_ENTITLEMENT); + if(isA_CFBoolean(entitlement)) { + entitled = CFBooleanGetValue(entitlement); + } + CFRelease(entitlements); + return entitled; + } + /* application is linked on or after iOS 12.0 SDK but missing entitlement */ + return FALSE; + } + /* application is linked before iOS 12.0 SDK */ + return TRUE; +} + +#endif /* TARGET_OS_IPHONE */ + CFDictionaryRef CNCopyCurrentNetworkInfo(CFStringRef interfaceName) { +#if TARGET_OS_IPHONE && !TARGET_OS_IOSMAC + if (__isApplicationEntitled() == FALSE) { + SC_log(LOG_DEBUG, "Application does not have %@ entitlement", CN_COPY_ENTITLEMENT); + return NULL; + } static typeof (CNCopyCurrentNetworkInfo) *dyfunc = NULL; if (!dyfunc) { void *image = __loadCaptiveNetwork(); if (image) dyfunc = dlsym(image, "__CNCopyCurrentNetworkInfo"); } return dyfunc ? dyfunc(interfaceName) : NULL; +#else // TARGET_OS_IPHONE && !TARGET_OS_IOSMAC +#pragma unused(interfaceName) + return NULL; +#endif // TARGET_OS_IPHONE && !TARGET_OS_IOSMAC } -#endif // TARGET_OS_IPHONE + diff --git a/SystemConfiguration.fproj/CaptiveNetwork.h b/SystemConfiguration.fproj/CaptiveNetwork.h index b7ffb27..38c49ca 100644 --- a/SystemConfiguration.fproj/CaptiveNetwork.h +++ b/SystemConfiguration.fproj/CaptiveNetwork.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2009-2016 Apple Inc. All rights reserved. + * Copyright (c) 2009-2016, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,14 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _CAPTIVENETWORK_H #define _CAPTIVENETWORK_H -#include +#include #include #include @@ -75,9 +75,9 @@ __BEGIN_DECLS */ Boolean CNSetSupportedSSIDs (CFArrayRef ssidArray) - __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_8, __MAC_NA, - __IPHONE_4_0, __IPHONE_9_0, - "Replaced by "); + API_AVAILABLE(macos(10.8)) + API_DEPRECATED_WITH_REPLACEMENT("Replaced by ", ios(4.0,9.0)) + SPI_AVAILABLE(tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function CNMarkPortalOnline @@ -90,9 +90,9 @@ CNSetSupportedSSIDs (CFArrayRef ssidArray) */ Boolean CNMarkPortalOnline (CFStringRef interfaceName) - __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_8, __MAC_NA, - __IPHONE_4_0, __IPHONE_9_0, - "Replaced by "); + API_AVAILABLE(macos(10.8)) + API_DEPRECATED_WITH_REPLACEMENT("Replaced by ", ios(4.0,9.0)) + SPI_AVAILABLE(tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function CNMarkPortalOffline @@ -103,9 +103,9 @@ CNMarkPortalOnline (CFStringRef interfaceName) */ Boolean CNMarkPortalOffline (CFStringRef interfaceName) - __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_8, __MAC_NA, - __IPHONE_4_0, __IPHONE_9_0, - "Replaced by "); + API_AVAILABLE(macos(10.8)) + API_DEPRECATED_WITH_REPLACEMENT("Replaced by ", ios(4.0,9.0)) + SPI_AVAILABLE(tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function CNCopySupportedInterfaces @@ -115,25 +115,33 @@ CNMarkPortalOffline (CFStringRef interfaceName) You MUST release the returned value. */ CFArrayRef __nullable -CNCopySupportedInterfaces (void) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_4_1); +CNCopySupportedInterfaces (void) + API_AVAILABLE(macos(10.8), ios(4.1)) + SPI_AVAILABLE(tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @constant kCNNetworkInfoKeySSIDData @discussion NetworkInfo Dictionary key for SSID in CFData format */ -extern const CFStringRef kCNNetworkInfoKeySSIDData __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_1); +extern const CFStringRef kCNNetworkInfoKeySSIDData + API_AVAILABLE(ios(4.1)) + SPI_AVAILABLE(macos(10.6), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @constant kCNNetworkInfoKeySSID @discussion NetworkInfo Dictionary key for SSID in CFString format */ -extern const CFStringRef kCNNetworkInfoKeySSID __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_1); +extern const CFStringRef kCNNetworkInfoKeySSID + API_AVAILABLE(ios(4.1)) + SPI_AVAILABLE(macos(10.6), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @constant kCNNetworkInfoKeyBSSID @discussion NetworkInfo Dictionary key for BSSID in CFString format */ -extern const CFStringRef kCNNetworkInfoKeyBSSID __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_1); +extern const CFStringRef kCNNetworkInfoKeyBSSID + API_AVAILABLE(ios(4.1)) + SPI_AVAILABLE(macos(10.6), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function CNCopyCurrentNetworkInfo @@ -155,7 +163,9 @@ extern const CFStringRef kCNNetworkInfoKeyBSSID __OSX_AVAILABLE_STARTING(__MAC_ You MUST release the returned value. */ CFDictionaryRef __nullable -CNCopyCurrentNetworkInfo (CFStringRef interfaceName) __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_1); +CNCopyCurrentNetworkInfo (CFStringRef interfaceName) + API_AVAILABLE(ios(4.1)) + SPI_AVAILABLE(macos(10.6), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS diff --git a/SystemConfiguration.fproj/DHCPClientPreferences.h b/SystemConfiguration.fproj/DHCPClientPreferences.h index 7010d0f..e3fab40 100644 --- a/SystemConfiguration.fproj/DHCPClientPreferences.h +++ b/SystemConfiguration.fproj/DHCPClientPreferences.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2001, 2004, 2005, 2008, 2015, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2001, 2004, 2005, 2008, 2015, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,17 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _DHCPCLIENTPREFERENCES_H -#ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -#include -#else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #define _DHCPCLIENTPREFERENCES_H -#include +#include #include #include @@ -59,7 +56,7 @@ __BEGIN_DECLS Boolean DHCPClientPreferencesSetApplicationOptions (CFStringRef applicationID, const UInt8 * __nullable options, - CFIndex count) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + CFIndex count) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function DHCPClientPreferencesCopyApplicationOptions @@ -76,12 +73,11 @@ DHCPClientPreferencesSetApplicationOptions (CFStringRef applicationID, UInt8 * __nullable DHCPClientPreferencesCopyApplicationOptions (CFStringRef applicationID, - CFIndex *count) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + CFIndex *count) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS CF_ASSUME_NONNULL_END CF_IMPLICIT_BRIDGING_DISABLED -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #endif /* _DHCPCLIENTPREFERENCES_H */ diff --git a/SystemConfiguration.fproj/English.lproj/Localizable.strings b/SystemConfiguration.fproj/English.lproj/Localizable.strings index 49e8abe7369bcfa1883f96e0239946f2a13b9f56..f930b18cb482aff42fe8234b21246eb50a41a981 100644 GIT binary patch literal 3482 zcmchaYflqF6o$`N`4y8UCTfhRpG=I2O|8-Zh0vlHHDqlo5K2qB)rLQ>KJUzqyGt)_ zQOJhQWzU|=JLf%T`1NzcHtmsZnB&)3+XgnZnT>5?=d5d%`kfl{2R3BCX9*H#%trQ* z-IUdY^~g?`2R)mNHG5-Cduw$&v>of(v2|E$Y_qq^TsmKQ8+H4Rma$!Ax_i8PiH@>w zpU`mS?G2Fp!k63lc7;c$d?yc__1Q_;kw=$*{7iZC&Bx?y-#<1!;|Stat2#?b!iua^Hi5^d?wNGwk}e7(okL9pdbj&|Vcq_@YUSIt9gfK+K9y zXVUPiZXu@Jf+PO#Sp#b8&fX%=A(w3g#nw0wl!Lo#5?|F9lcH;N-ooZ{sU(M(A%;!kR?z~s10#A{hP-_#aleDUK#IE4%D|PR*5s>sWAb#0-cj$Lt5xf|J7XBH#8j=kd0xkdkH z9(Tnw<NDd_BhxAAE^rU6@stiTE6U-JuVsJ! zg`>-uc>#h$P}7|!Fl9ZShU$>m4-hHxhTHjJs`+Rb^Vu+Yq-ZXsAuM&E2X|m2tXj2B&s&4p)sZGFdzh sPq+aU*{psUdq!Ss)2w>vKb~@BoWEHq=UQ}#w*N1pc+)D@q);J#10T#EV*mgE delta 7 OcmbOweT93&6;=QY>;oPE diff --git a/SystemConfiguration.fproj/LinkConfiguration.c b/SystemConfiguration.fproj/LinkConfiguration.c index bbbc281..0f17586 100644 --- a/SystemConfiguration.fproj/LinkConfiguration.c +++ b/SystemConfiguration.fproj/LinkConfiguration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2007, 2010, 2011, 2013, 2015-2017 Apple Inc. All rights reserved. + * Copyright (c) 2002-2007, 2010, 2011, 2013, 2015-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/SystemConfiguration.fproj/Makefile b/SystemConfiguration.fproj/Makefile index 26856fa..2e84966 100644 --- a/SystemConfiguration.fproj/Makefile +++ b/SystemConfiguration.fproj/Makefile @@ -5,7 +5,7 @@ all: SCSchemaDefinitions.h SCSchemaDefinitionsPrivate.h SCSchemaDefinitions.c /tmp/genSCPreferences: genSCPreferences.c Makefile - cc -g -o /tmp/genSCPreferences genSCPreferences.c + xcrun --sdk macosx.internal cc -g -o /tmp/genSCPreferences genSCPreferences.c SCSchemaDefinitions.h: /tmp/genSCPreferences /tmp/genSCPreferences header > SCSchemaDefinitions.h diff --git a/SystemConfiguration.fproj/SCD.c b/SystemConfiguration.fproj/SCD.c index 9212a21..c195cff 100644 --- a/SystemConfiguration.fproj/SCD.c +++ b/SystemConfiguration.fproj/SCD.c @@ -388,7 +388,7 @@ _SC_isInstallEnvironment() { os_log_t -_SC_LOG_DEFAULT() +_SC_LOG_DEFAULT(void) { static os_log_t log = NULL; diff --git a/SystemConfiguration.fproj/SCD.h b/SystemConfiguration.fproj/SCD.h index 45f9a54..c9feb4b 100644 --- a/SystemConfiguration.fproj/SCD.h +++ b/SystemConfiguration.fproj/SCD.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2016, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2011, 2016-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,7 +24,7 @@ #ifndef _SCD_H #define _SCD_H -#include +#include #include #include #include @@ -93,4 +93,4 @@ _SC_cfstring_to_cstring_ext (CFStringRef cfstr, __END_DECLS -#endif /* _SCD_H */ +#endif /* _SCD_H */ diff --git a/SystemConfiguration.fproj/SCDHostName.c b/SystemConfiguration.fproj/SCDHostName.c index 9d47b51..7fabbb6 100644 --- a/SystemConfiguration.fproj/SCDHostName.c +++ b/SystemConfiguration.fproj/SCDHostName.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2008, 2011, 2013-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2008, 2011, 2013-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -352,7 +352,7 @@ SCPreferencesSetHostName(SCPreferencesRef prefs, #pragma mark LocalHostName -__private_extern__ CFStringRef +CFStringRef _SCPreferencesCopyLocalHostName(SCPreferencesRef prefs) { CFDictionaryRef dict; diff --git a/SystemConfiguration.fproj/SCDNotifierInformViaCallback.c b/SystemConfiguration.fproj/SCDNotifierInformViaCallback.c index 4c8812b..484fd64 100644 --- a/SystemConfiguration.fproj/SCDNotifierInformViaCallback.c +++ b/SystemConfiguration.fproj/SCDNotifierInformViaCallback.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2005, 2008-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2008-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -35,11 +35,133 @@ #include "config.h" /* MiG generated file */ #include "SCD.h" -#if !TARGET_OS_SIMULATOR || (defined(IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED) && (IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED >= 1090)) +#if !TARGET_OS_SIMULATOR || (defined(IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED) && (IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED >= 1090)) #define HAVE_MACHPORT_GUARDS #endif +static mach_port_t +acquireNotifyPort(SCDynamicStoreRef store) +{ + kern_return_t kr; + mach_port_t oldNotify; +#ifdef HAVE_MACHPORT_GUARDS + mach_port_options_t opts; +#endif // HAVE_MACHPORT_GUARDS + mach_port_t port; + int sc_status; + SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; + + /* allocate a mach port for the SCDynamicStore notifications */ + + retry_allocate : + +#ifdef HAVE_MACHPORT_GUARDS + memset(&opts, 0, sizeof(opts)); + opts.flags = MPO_CONTEXT_AS_GUARD|MPO_INSERT_SEND_RIGHT; + + kr = mach_port_construct(mach_task_self(), &opts, (mach_port_context_t)store, &port); +#else // HAVE_MACHPORT_GUARDS + kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port); +#endif // HAVE_MACHPORT_GUARDS + + if (kr != KERN_SUCCESS) { + SC_log(LOG_NOTICE, "could not allocate mach port: %s", mach_error_string(kr)); + if ((kr == KERN_NO_SPACE) || (kr == KERN_RESOURCE_SHORTAGE)) { + sleep(1); + goto retry_allocate; + } else { + return MACH_PORT_NULL; + } + } + +#ifndef HAVE_MACHPORT_GUARDS + kr = mach_port_insert_right(mach_task_self(), + port, + port, + MACH_MSG_TYPE_MAKE_SEND); + if (kr != KERN_SUCCESS) { + /* + * We can't insert a send right into our own port! This should + * only happen if someone stomped on OUR port (so let's leave + * the port alone). + */ + SC_log(LOG_NOTICE, "mach_port_insert_right() failed: %s", mach_error_string(kr)); + return MACH_PORT_NULL; + } +#endif // HAVE_MACHPORT_GUARDS + + /* Request a notification when/if the server dies */ + kr = mach_port_request_notification(mach_task_self(), + port, + MACH_NOTIFY_NO_SENDERS, + 1, + port, + MACH_MSG_TYPE_MAKE_SEND_ONCE, + &oldNotify); + if (kr != KERN_SUCCESS) { + /* + * We can't request a notification for our own port! This should + * only happen if someone stomped on OUR port (so let's leave + * the port alone). + */ + SC_log(LOG_NOTICE, "mach_port_request_notification() failed: %s", mach_error_string(kr)); + return MACH_PORT_NULL; + } + + if (oldNotify != MACH_PORT_NULL) { + SC_log(LOG_NOTICE, "oldNotify != MACH_PORT_NULL"); + } + +#ifdef DEBUG + SC_log(LOG_DEBUG, " establish notification request with SCDynamicStore server"); +#endif /* DEBUG */ + +#ifdef VERBOSE_ACTIVITY_LOGGING + os_activity_scope(storePrivate->activity); +#endif // VERBOSE_ACTIVITY_LOGGING + + retry : + + __MACH_PORT_DEBUG(TRUE, "*** rlsSchedule", port); + kr = notifyviaport(storePrivate->server, port, 0, (int *)&sc_status); + + if (__SCDynamicStoreCheckRetryAndHandleError(store, + kr, + &sc_status, + "rlsSchedule notifyviaport()")) { + goto retry; + } + + if (kr != KERN_SUCCESS) { + if ((kr == MACH_SEND_INVALID_DEST) || (kr == MIG_SERVER_DIED)) { + /* remove the send right that we tried (but failed) to pass to the server */ + (void) mach_port_deallocate(mach_task_self(), port); + } + + /* remove our receive right */ +#ifdef HAVE_MACHPORT_GUARDS + (void) mach_port_destruct(mach_task_self(), port, 0, (mach_port_context_t)store); +#else // HAVE_MACHPORT_GUARDS + (void) mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_RECEIVE, -1); +#endif // HAVE_MACHPORT_GUARDS + return MACH_PORT_NULL; + } + + if (sc_status != kSCStatusOK) { + /* something [else] didn't work, remove our receive right */ +#ifdef HAVE_MACHPORT_GUARDS + (void) mach_port_destruct(mach_task_self(), port, 0, (mach_port_context_t)store); +#else // HAVE_MACHPORT_GUARDS + (void) mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_RECEIVE, -1); +#endif // HAVE_MACHPORT_GUARDS + return MACH_PORT_NULL; + } + + return port; +} + + static CFStringRef notifyMPCopyDescription(const void *info) { @@ -55,6 +177,9 @@ notifyMPCopyDescription(const void *info) static void rlsCallback(CFMachPortRef port, void *msg, CFIndex size, void *info) { +#ifndef DEBUG +#pragma unused(port) +#endif /* DEBUG */ #pragma unused(size) mach_no_senders_notification_t *buf = msg; mach_msg_id_t msgid = buf->not_header.msgh_id; @@ -97,8 +222,7 @@ rlsSchedule(void *info, CFRunLoopRef rl, CFStringRef mode) SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; #ifdef DEBUG - SC_log(LOG_DEBUG, "schedule notifications for mode %@", - (rl != NULL) ? mode : CFSTR("libdispatch")); + SC_log(LOG_DEBUG, "schedule notifications for mode %@", mode); #endif /* DEBUG */ if (storePrivate->rlsNotifyPort == NULL) { @@ -108,121 +232,14 @@ rlsSchedule(void *info, CFRunLoopRef rl, CFStringRef mode) , CFRelease , notifyMPCopyDescription }; - kern_return_t kr; - mach_port_t oldNotify; -#ifdef HAVE_MACHPORT_GUARDS - mach_port_options_t opts; -#endif // HAVE_MACHPORT_GUARDS mach_port_t port; - int sc_status; #ifdef DEBUG SC_log(LOG_DEBUG, " activate callback runloop source"); #endif /* DEBUG */ - /* allocate a mach port for the SCDynamicStore notifications */ - - retry_allocate : - -#ifdef HAVE_MACHPORT_GUARDS - bzero(&opts, sizeof(opts)); - opts.flags = MPO_CONTEXT_AS_GUARD|MPO_INSERT_SEND_RIGHT; - - kr = mach_port_construct(mach_task_self(), &opts, (mach_port_context_t)store, &port); -#else // HAVE_MACHPORT_GUARDS - kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port); -#endif // HAVE_MACHPORT_GUARDS - - if (kr != KERN_SUCCESS) { - SC_log(LOG_NOTICE, "could not allocate mach port: %s", mach_error_string(kr)); - if ((kr == KERN_NO_SPACE) || (kr == KERN_RESOURCE_SHORTAGE)) { - sleep(1); - goto retry_allocate; - } else { - return; - } - } - -#ifndef HAVE_MACHPORT_GUARDS - kr = mach_port_insert_right(mach_task_self(), - port, - port, - MACH_MSG_TYPE_MAKE_SEND); - if (kr != KERN_SUCCESS) { - /* - * We can't insert a send right into our own port! This should - * only happen if someone stomped on OUR port (so let's leave - * the port alone). - */ - SC_log(LOG_NOTICE, "mach_port_insert_right() failed: %s", mach_error_string(kr)); - return; - } -#endif // HAVE_MACHPORT_GUARDS - - /* Request a notification when/if the server dies */ - kr = mach_port_request_notification(mach_task_self(), - port, - MACH_NOTIFY_NO_SENDERS, - 1, - port, - MACH_MSG_TYPE_MAKE_SEND_ONCE, - &oldNotify); - if (kr != KERN_SUCCESS) { - /* - * We can't request a notification for our own port! This should - * only happen if someone stomped on OUR port (so let's leave - * the port alone). - */ - SC_log(LOG_NOTICE, "mach_port_request_notification() failed: %s", mach_error_string(kr)); - return; - } - - if (oldNotify != MACH_PORT_NULL) { - SC_log(LOG_NOTICE, "oldNotify != MACH_PORT_NULL"); - } - -#ifdef DEBUG - SC_log(LOG_DEBUG, " establish notification request with SCDynamicStore server"); -#endif /* DEBUG */ - -#ifdef VERBOSE_ACTIVITY_LOGGING - os_activity_scope(storePrivate->activity); -#endif // VERBOSE_ACTIVITY_LOGGING - - retry : - - __MACH_PORT_DEBUG(TRUE, "*** rlsSchedule", port); - kr = notifyviaport(storePrivate->server, port, 0, (int *)&sc_status); - - if (__SCDynamicStoreCheckRetryAndHandleError(store, - kr, - &sc_status, - "rlsSchedule notifyviaport()")) { - goto retry; - } - - if (kr != KERN_SUCCESS) { - if ((kr == MACH_SEND_INVALID_DEST) || (kr == MIG_SERVER_DIED)) { - /* remove the send right that we tried (but failed) to pass to the server */ - (void) mach_port_deallocate(mach_task_self(), port); - } - - /* remove our receive right */ -#ifdef HAVE_MACHPORT_GUARDS - (void) mach_port_destruct(mach_task_self(), port, 0, (mach_port_context_t)store); -#else // HAVE_MACHPORT_GUARDS - (void) mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_RECEIVE, -1); -#endif // HAVE_MACHPORT_GUARDS - return; - } - - if (sc_status != kSCStatusOK) { - /* something [else] didn't work, remove our receive right */ -#ifdef HAVE_MACHPORT_GUARDS - (void) mach_port_destruct(mach_task_self(), port, 0, (mach_port_context_t)store); -#else // HAVE_MACHPORT_GUARDS - (void) mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_RECEIVE, -1); -#endif // HAVE_MACHPORT_GUARDS + port = acquireNotifyPort(store); + if (port == MACH_PORT_NULL) { return; } @@ -238,7 +255,7 @@ rlsSchedule(void *info, CFRunLoopRef rl, CFStringRef mode) } } - if ((rl != NULL) && (storePrivate->rlsNotifyRLS != NULL)) { + if (storePrivate->rlsNotifyRLS != NULL) { /* set notifier active */ storePrivate->notifyStatus = Using_NotifierInformViaRunLoop; @@ -265,11 +282,10 @@ rlsCancel(void *info, CFRunLoopRef rl, CFStringRef mode) SCDynamicStorePrivateRef storePrivate = (SCDynamicStorePrivateRef)store; #ifdef DEBUG - SC_log(LOG_DEBUG, "cancel notifications for mode %@", - (rl != NULL) ? mode : CFSTR("libdispatch")); + SC_log(LOG_DEBUG, "cancel notifications for mode %@", mode); #endif /* DEBUG */ - if ((rl != NULL) && (storePrivate->rlsNotifyRLS != NULL)) { + if (storePrivate->rlsNotifyRLS != NULL) { if (_SC_unschedule(store, rl, mode, storePrivate->rlList, FALSE)) { /* * if currently scheduled on this runLoop / runLoopMode @@ -530,6 +546,7 @@ SCDynamicStoreSetDispatchQueue(SCDynamicStoreRef store, dispatch_queue_t queue) if (queue == NULL) { if (storePrivate->dispatchQueue == NULL) { + // if not scheduled _SCErrorSet(kSCStatusInvalidArgument); return FALSE; } @@ -544,26 +561,28 @@ SCDynamicStoreSetDispatchQueue(SCDynamicStoreRef store, dispatch_queue_t queue) return FALSE; } - if ((storePrivate->dispatchQueue != NULL) || (storePrivate->rls != NULL)) { - _SCErrorSet(kSCStatusInvalidArgument); - return FALSE; - } - - if (storePrivate->notifyStatus != NotifierNotRegistered) { - // sorry, you can only have one notification registered at once... + if ((storePrivate->dispatchQueue != NULL) || + (storePrivate->rls != NULL) || + (storePrivate->notifyStatus != NotifierNotRegistered)) { + // if already scheduled _SCErrorSet(kSCStatusNotifierActive); return FALSE; } - /* - * mark our using of the SCDynamicStore notifications, create and schedule - * the notification port (storePrivate->rlsNotifyPort), and a bunch of other - * "setup" - */ +#ifdef DEBUG + SC_log(LOG_DEBUG, "schedule notifications for dispatch queue"); +#endif /* DEBUG */ + + // + // mark our using of the SCDynamicStore notifications, create and schedule + // the notification source/port (storePrivate->dispatchSource), and a bunch + // of other "setup" + // storePrivate->notifyStatus = Using_NotifierInformViaDispatch; - rlsSchedule((void*)store, NULL, NULL); - if (storePrivate->rlsNotifyPort == NULL) { - /* if we could not schedule the notification */ + + mp = acquireNotifyPort(store); + if (mp == MACH_PORT_NULL) { + // if we could not schedule the notification _SCErrorSet(kSCStatusFailed); goto cleanup; } @@ -588,10 +607,17 @@ SCDynamicStoreSetDispatchQueue(SCDynamicStoreRef store, dispatch_queue_t queue) dispatch_set_finalizer_f(storePrivate->dispatchGroup, (dispatch_function_t)CFRelease); // create a dispatch source for the mach notifications - mp = CFMachPortGetPort(storePrivate->rlsNotifyPort); source = dispatch_source_create(DISPATCH_SOURCE_TYPE_MACH_RECV, mp, 0, queue); if (source == NULL) { SC_log(LOG_NOTICE, "dispatch_source_create() failed"); + + // remove our receive right +#ifdef HAVE_MACHPORT_GUARDS + (void) mach_port_destruct(mach_task_self(), mp, 0, (mach_port_context_t)store); +#else // HAVE_MACHPORT_GUARDS + (void) mach_port_mod_refs(mach_task_self(), mp, MACH_PORT_RIGHT_RECEIVE, -1); +#endif // HAVE_MACHPORT_GUARDS + _SCErrorSet(kSCStatusFailed); goto cleanup; } @@ -618,6 +644,7 @@ SCDynamicStoreSetDispatchQueue(SCDynamicStoreRef store, dispatch_queue_t queue) } msgid = notify_msg.msg.header.msgh_id; + mach_msg_destroy(¬ify_msg.msg.header); #ifdef DEBUG SC_log(LOG_DEBUG, "dispatch source callback, queue rlsPerform"); @@ -635,6 +662,18 @@ SCDynamicStoreSetDispatchQueue(SCDynamicStoreRef store, dispatch_queue_t queue) }); dispatch_source_set_cancel_handler(source, ^{ + __MACH_PORT_DEBUG((storePrivate->rlsNotifyPort != NULL), + "*** SCDynamicStoreSetDispatchQueue (before releasing source/port)", + mp); + + // remove our receive right +#ifdef HAVE_MACHPORT_GUARDS + (void) mach_port_destruct(mach_task_self(), mp, 0, (mach_port_context_t)store); +#else // HAVE_MACHPORT_GUARDS + (void) mach_port_mod_refs(mach_task_self(), mp, MACH_PORT_RIGHT_RECEIVE, -1); +#endif // HAVE_MACHPORT_GUARDS + + // release source dispatch_release(source); }); @@ -645,6 +684,10 @@ SCDynamicStoreSetDispatchQueue(SCDynamicStoreRef store, dispatch_queue_t queue) cleanup : +#ifdef DEBUG + SC_log(LOG_DEBUG, "cancel notifications for dispatch queue"); +#endif /* DEBUG */ + CFRetain(store); if (storePrivate->dispatchSource != NULL) { @@ -656,8 +699,6 @@ SCDynamicStoreSetDispatchQueue(SCDynamicStoreRef store, dispatch_queue_t queue) drainQueue = storePrivate->dispatchQueue; storePrivate->dispatchQueue = NULL; - rlsCancel((void*)store, NULL, NULL); - if ((drainGroup != NULL) && (drainQueue != NULL)) { dispatch_group_notify(drainGroup, drainQueue, ^{ // release group/queue references diff --git a/SystemConfiguration.fproj/SCDOpen.c b/SystemConfiguration.fproj/SCDOpen.c index ae2825b..f6347cc 100644 --- a/SystemConfiguration.fproj/SCDOpen.c +++ b/SystemConfiguration.fproj/SCDOpen.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006, 2008-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2006, 2008-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -62,7 +62,7 @@ static const char *notifyType[] = { __private_extern__ os_log_t -__log_SCDynamicStore() +__log_SCDynamicStore(void) { static os_log_t log = NULL; diff --git a/SystemConfiguration.fproj/SCDPlugin.c b/SystemConfiguration.fproj/SCDPlugin.c index 44d7a7e..a8e244a 100644 --- a/SystemConfiguration.fproj/SCDPlugin.c +++ b/SystemConfiguration.fproj/SCDPlugin.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2006, 2013, 2015, 2017 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2002-2006, 2013, 2015, 2017, 2018 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -225,7 +225,7 @@ childReapedMPCopyDescription(const void *info) void -_SCDPluginExecInit() +_SCDPluginExecInit(void) { struct sigaction act; CFMachPortContext context = { 0 diff --git a/SystemConfiguration.fproj/SCDPlugin.h b/SystemConfiguration.fproj/SCDPlugin.h index f64ac13..edb9d14 100644 --- a/SystemConfiguration.fproj/SCDPlugin.h +++ b/SystemConfiguration.fproj/SCDPlugin.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004, 2006 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2004, 2006, 2017, 2018 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -71,7 +71,7 @@ @param bundleVerbose A boolean value indicating whether verbose logging has been enabled for this bundle. */ -typedef void (*SCDynamicStoreBundleLoadFunction) (CFBundleRef bundle, +typedef void SCDynamicStoreBundleLoadFunction (CFBundleRef bundle, Boolean bundleVerbose); /*! @@ -84,7 +84,7 @@ typedef void (*SCDynamicStoreBundleLoadFunction) (CFBundleRef bundle, @param bundleName The name of the plug-in / bundle. @param bundlePath The path name associated with the plug-in / bundle. */ -typedef void (*SCDynamicStoreBundleStartFunction) (const char *bundleName, +typedef void SCDynamicStoreBundleStartFunction (const char *bundleName, const char *bundlePath); /*! @@ -95,7 +95,7 @@ typedef void (*SCDynamicStoreBundleStartFunction) (const char *bundleName, be used to initialize any configuration information and/or state in the store. */ -typedef void (*SCDynamicStoreBundlePrimeFunction) (void); +typedef void SCDynamicStoreBundlePrimeFunction (void); /*! @@ -108,7 +108,7 @@ typedef void (*SCDynamicStoreBundlePrimeFunction) (void); Note: a plugin can delay shut down of the daemon by no more than 30 seconds. */ -typedef void (*SCDynamicStoreBundleStopFunction) (CFRunLoopSourceRef stopRls); +typedef void SCDynamicStoreBundleStopFunction (CFRunLoopSourceRef stopRls); /*! diff --git a/SystemConfiguration.fproj/SCDPrivate.c b/SystemConfiguration.fproj/SCDPrivate.c index 1cb9577..2d38a9a 100644 --- a/SystemConfiguration.fproj/SCDPrivate.c +++ b/SystemConfiguration.fproj/SCDPrivate.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -31,9 +31,6 @@ * - initial revision */ -//#define DO_NOT_CRASH -//#define DO_NOT_INFORM - #define SC_LOG_HANDLE _SC_LOG_DEFAULT() #include #include @@ -60,9 +57,12 @@ #include -#if TARGET_OS_EMBEDDED && !defined(DO_NOT_INFORM) +#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR && !defined(DO_NOT_INFORM) #include -#endif // TARGET_OS_EMBEDDED && !defined(DO_NOT_INFORM) +#endif // TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR && !defined(DO_NOT_INFORM) + +/* CrashReporter "Application Specific Information" */ +#include #define N_QUICK 32 @@ -1522,22 +1522,13 @@ _SC_copyBacktrace() } -/* CrashReporter info */ -#if !TARGET_OS_IPHONE -#include -#else // !TARGET_OS_IPHONE -const char *__crashreporter_info__ = NULL; -asm(".desc ___crashreporter_info__, 0x10"); -#endif // !TARGET_OS_IPHONE - - static Boolean _SC_SimulateCrash(const char *crash_info, CFStringRef notifyHeader, CFStringRef notifyMessage) { -#if !TARGET_OS_EMBEDDED || defined(DO_NOT_INFORM) +#if !defined(DO_NOT_INFORM) #pragma unused(notifyHeader) #pragma unused(notifyMessage) -#endif // !TARGET_OS_EMBEDDED || defined(DO_NOT_INFORM) +#endif // !defined(DO_NOT_INFORM) #if TARGET_OS_SIMULATOR #pragma unused(crash_info) #endif // TARGET_OS_SIMULATOR @@ -1563,7 +1554,7 @@ _SC_SimulateCrash(const char *crash_info, CFStringRef notifyHeader, CFStringRef CFRelease(str); } -#if TARGET_OS_EMBEDDED && !defined(DO_NOT_INFORM) +#if !defined(DO_NOT_INFORM) if (ok && (notifyHeader != NULL) && (notifyMessage != NULL)) { static Boolean warned = FALSE; @@ -1586,7 +1577,7 @@ _SC_SimulateCrash(const char *crash_info, CFStringRef notifyHeader, CFStringRef warned = TRUE; } } -#endif // TARGET_OS_EMBEDDED && !defined(DO_NOT_INFORM) +#endif // !defined(DO_NOT_INFORM) #endif // !TARGET_OS_SIMULATOR return ok; @@ -1599,12 +1590,7 @@ _SC_crash(const char *crash_info, CFStringRef notifyHeader, CFStringRef notifyMe Boolean ok = FALSE; if (crash_info != NULL) { -#if !TARGET_OS_IPHONE CRSetCrashLogMessage(crash_info); -#else // !TARGET_OS_IPHONE - __crashreporter_info__ = crash_info; -#endif // !TARGET_OS_IPHONE - SC_log(LOG_NOTICE, "%s", crash_info); } @@ -1619,11 +1605,7 @@ _SC_crash(const char *crash_info, CFStringRef notifyHeader, CFStringRef notifyMe #endif // DO_NOT_CRASH } -#if !TARGET_OS_IPHONE CRSetCrashLogMessage(NULL); -#else // !TARGET_OS_IPHONE - __crashreporter_info__ = NULL; -#endif // !TARGET_OS_IPHONE return; } diff --git a/SystemConfiguration.fproj/SCDynamicStore.h b/SystemConfiguration.fproj/SCDynamicStore.h index d6caf33..3fd8c00 100644 --- a/SystemConfiguration.fproj/SCDynamicStore.h +++ b/SystemConfiguration.fproj/SCDynamicStore.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003-2005, 2008-2010, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2005, 2008-2010, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,17 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCDYNAMICSTORE_H -#ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -#include -#else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #define _SCDYNAMICSTORE_H -#include +#include #include #include #include @@ -122,7 +119,7 @@ __BEGIN_DECLS @discussion Returns the type identifier of all SCDynamicStore instances. */ CFTypeID -SCDynamicStoreGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +SCDynamicStoreGetTypeID (void) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -150,7 +147,7 @@ SCDynamicStoreCreate ( CFStringRef name, SCDynamicStoreCallBack __nullable callout, SCDynamicStoreContext * __nullable context - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreCreateWithOptions @@ -196,9 +193,9 @@ SCDynamicStoreCreateWithOptions ( CFDictionaryRef __nullable storeOptions, SCDynamicStoreCallBack __nullable callout, SCDynamicStoreContext * __nullable context - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); -extern const CFStringRef kSCDynamicStoreUseSessionKeys __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); /* CFBoolean */ +extern const CFStringRef kSCDynamicStoreUseSessionKeys API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /* CFBoolean */ /*! @function SCDynamicStoreCreateRunLoopSource @@ -228,7 +225,7 @@ SCDynamicStoreCreateRunLoopSource ( CFAllocatorRef __nullable allocator, SCDynamicStoreRef store, CFIndex order - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreSetDispatchQueue @@ -244,7 +241,7 @@ Boolean SCDynamicStoreSetDispatchQueue ( SCDynamicStoreRef store, dispatch_queue_t __nullable queue - ) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_4_0/*SPI*/); + ) API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreCopyKeyList @@ -261,7 +258,7 @@ CFArrayRef __nullable SCDynamicStoreCopyKeyList ( SCDynamicStoreRef __nullable store, CFStringRef pattern - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreAddValue @@ -278,7 +275,7 @@ SCDynamicStoreAddValue ( SCDynamicStoreRef __nullable store, CFStringRef key, CFPropertyListRef value - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreAddTemporaryValue @@ -297,7 +294,7 @@ SCDynamicStoreAddTemporaryValue ( SCDynamicStoreRef store, CFStringRef key, CFPropertyListRef value - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreCopyValue @@ -312,7 +309,7 @@ CFPropertyListRef __nullable SCDynamicStoreCopyValue ( SCDynamicStoreRef __nullable store, CFStringRef key - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreCopyMultiple @@ -332,7 +329,7 @@ SCDynamicStoreCopyMultiple ( SCDynamicStoreRef __nullable store, CFArrayRef __nullable keys, CFArrayRef __nullable patterns - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreSetValue @@ -348,7 +345,7 @@ SCDynamicStoreSetValue ( SCDynamicStoreRef __nullable store, CFStringRef key, CFPropertyListRef value - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreSetMultiple @@ -365,7 +362,7 @@ SCDynamicStoreSetMultiple ( CFDictionaryRef __nullable keysToSet, CFArrayRef __nullable keysToRemove, CFArrayRef __nullable keysToNotify - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreRemoveValue @@ -380,7 +377,7 @@ Boolean SCDynamicStoreRemoveValue ( SCDynamicStoreRef __nullable store, CFStringRef key - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreNotifyValue @@ -396,7 +393,7 @@ Boolean SCDynamicStoreNotifyValue ( SCDynamicStoreRef __nullable store, CFStringRef key - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreSetNotificationKeys @@ -415,7 +412,7 @@ SCDynamicStoreSetNotificationKeys ( SCDynamicStoreRef store, CFArrayRef __nullable keys, CFArrayRef __nullable patterns - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreCopyNotifiedKeys @@ -432,12 +429,11 @@ SCDynamicStoreSetNotificationKeys ( CFArrayRef __nullable SCDynamicStoreCopyNotifiedKeys ( SCDynamicStoreRef store - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS CF_ASSUME_NONNULL_END CF_IMPLICIT_BRIDGING_DISABLED -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #endif /* _SCDYNAMICSTORE_H */ diff --git a/SystemConfiguration.fproj/SCDynamicStoreCopyDHCPInfo.h b/SystemConfiguration.fproj/SCDynamicStoreCopyDHCPInfo.h index 794c50f..8750ee8 100644 --- a/SystemConfiguration.fproj/SCDynamicStoreCopyDHCPInfo.h +++ b/SystemConfiguration.fproj/SCDynamicStoreCopyDHCPInfo.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2001, 2002, 2004, 2005, 2008, 2012, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2001, 2002, 2004, 2005, 2008, 2012, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,17 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCDYNAMICSTORECOPYDHCPINFO_H -#ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -#include -#else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #define _SCDYNAMICSTORECOPYDHCPINFO_H -#include +#include #include #include #include @@ -63,7 +60,7 @@ __BEGIN_DECLS */ CFDictionaryRef __nullable SCDynamicStoreCopyDHCPInfo (SCDynamicStoreRef __nullable store, - CFStringRef __nullable serviceID) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + CFStringRef __nullable serviceID) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function DHCPInfoGetOptionData @@ -80,7 +77,7 @@ SCDynamicStoreCopyDHCPInfo (SCDynamicStoreRef __nullable store, */ CFDataRef __nullable DHCPInfoGetOptionData (CFDictionaryRef info, - UInt8 code) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + UInt8 code) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function DHCPInfoGetLeaseStartTime @@ -95,7 +92,7 @@ DHCPInfoGetOptionData (CFDictionaryRef info, The return value must NOT be released. */ CFDateRef __nullable -DHCPInfoGetLeaseStartTime (CFDictionaryRef info) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +DHCPInfoGetLeaseStartTime (CFDictionaryRef info) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -112,12 +109,11 @@ DHCPInfoGetLeaseStartTime (CFDictionaryRef info) __OSX_AVAILABLE_STARTING(__MAC The return value must NOT be released. */ CFDateRef __nullable -DHCPInfoGetLeaseExpirationTime (CFDictionaryRef info) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/); +DHCPInfoGetLeaseExpirationTime (CFDictionaryRef info) API_AVAILABLE(macos(10.8)) SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS CF_ASSUME_NONNULL_END CF_IMPLICIT_BRIDGING_DISABLED -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #endif /* _SCDYNAMICSTORECOPYDHCPINFO_H */ diff --git a/SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h b/SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h index 126b471..886e731 100644 --- a/SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h +++ b/SystemConfiguration.fproj/SCDynamicStoreCopySpecific.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2005, 2008, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2008, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,17 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCDYNAMICSTORECOPYSPECIFIC_H -#ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -#include -#else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #define _SCDYNAMICSTORECOPYSPECIFIC_H -#include +#include #include #include #include @@ -64,7 +61,7 @@ CFStringRef __nullable SCDynamicStoreCopyComputerName ( SCDynamicStoreRef __nullable store, CFStringEncoding * __nullable nameEncoding - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreCopyConsoleUser @@ -93,7 +90,7 @@ SCDynamicStoreCopyConsoleUser ( SCDynamicStoreRef __nullable store, uid_t * __nullable uid, gid_t * __nullable gid - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_NA); + ) API_AVAILABLE(macos(10.1)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCDynamicStoreCopyLocalHostName @@ -108,7 +105,7 @@ SCDynamicStoreCopyConsoleUser ( CFStringRef __nullable SCDynamicStoreCopyLocalHostName ( SCDynamicStoreRef __nullable store - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreCopyLocation @@ -124,7 +121,7 @@ SCDynamicStoreCopyLocalHostName ( CFStringRef __nullable SCDynamicStoreCopyLocation ( SCDynamicStoreRef __nullable store - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_NA); + ) API_AVAILABLE(macos(10.1)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCDynamicStoreCopyProxies @@ -209,12 +206,11 @@ SCDynamicStoreCopyLocation ( CFDictionaryRef __nullable SCDynamicStoreCopyProxies ( SCDynamicStoreRef __nullable store - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS CF_ASSUME_NONNULL_END CF_IMPLICIT_BRIDGING_DISABLED -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #endif /* _SCDYNAMICSTORECOPYSPECIFIC_H */ diff --git a/SystemConfiguration.fproj/SCDynamicStoreCopySpecificPrivate.h b/SystemConfiguration.fproj/SCDynamicStoreCopySpecificPrivate.h index b3bc351..648afea 100644 --- a/SystemConfiguration.fproj/SCDynamicStoreCopySpecificPrivate.h +++ b/SystemConfiguration.fproj/SCDynamicStoreCopySpecificPrivate.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2003-2005, 2008 Apple Inc. All rights reserved. + * Copyright (c) 2003-2005, 2008, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,14 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCDYNAMICSTORECOPYSPECIFICPRIVATE_H #define _SCDYNAMICSTORECOPYSPECIFICPRIVATE_H -#include +#include #include #include #include @@ -43,21 +43,21 @@ __BEGIN_DECLS * Predefined keys for the console session dictionaries */ extern const CFStringRef kSCConsoleSessionID /* value is CFNumber */ - __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA); + API_AVAILABLE(macos(10.3)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); extern const CFStringRef kSCConsoleSessionUserName /* value is CFString */ - __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA); + API_AVAILABLE(macos(10.3)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); extern const CFStringRef kSCConsoleSessionUID /* value is CFNumber (a uid_t) */ - __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA); + API_AVAILABLE(macos(10.3)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); extern const CFStringRef kSCConsoleSessionConsoleSet /* value is CFNumber */ - __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA); + API_AVAILABLE(macos(10.3)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); extern const CFStringRef kSCConsoleSessionOnConsole /* value is CFBoolean */ - __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA); + API_AVAILABLE(macos(10.3)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); extern const CFStringRef kSCConsoleSessionLoginDone /* value is CFBoolean */ - __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA); + API_AVAILABLE(macos(10.3)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); extern const CFStringRef kSCConsoleSessionSystemSafeBoot /* value is CFBoolean */ - __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA); + API_AVAILABLE(macos(10.3)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); extern const CFStringRef kSCConsoleSessionLoginwindowSafeLogin /* value is CFBoolean */ - __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA); + API_AVAILABLE(macos(10.3)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCDynamicStoreCopyConsoleInformation @@ -77,9 +77,9 @@ extern const CFStringRef kSCConsoleSessionLoginwindowSafeLogin /* value is CFBoo CFArrayRef SCDynamicStoreCopyConsoleInformation ( SCDynamicStoreRef store - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA); + ) API_AVAILABLE(macos(10.3)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); __END_DECLS -#endif /* _SCDYNAMICSTORECOPYSPECIFICPRIVATE_H */ +#endif /* _SCDYNAMICSTORECOPYSPECIFICPRIVATE_H */ diff --git a/SystemConfiguration.fproj/SCDynamicStoreInternal.h b/SystemConfiguration.fproj/SCDynamicStoreInternal.h index 04f9293..3879f31 100644 --- a/SystemConfiguration.fproj/SCDynamicStoreInternal.h +++ b/SystemConfiguration.fproj/SCDynamicStoreInternal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004, 2006, 2009-2011, 2013, 2015-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2004, 2006, 2009-2011, 2013, 2015-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,7 +24,7 @@ #ifndef _SCDYNAMICSTOREINTERNAL_H #define _SCDYNAMICSTOREINTERNAL_H -#include +#include #include #include #include @@ -121,8 +121,9 @@ typedef struct { __BEGIN_DECLS +__private_extern__ os_log_t -__log_SCDynamicStore (); +__log_SCDynamicStore (void); SCDynamicStorePrivateRef __SCDynamicStoreCreatePrivate (CFAllocatorRef allocator, @@ -130,18 +131,21 @@ __SCDynamicStoreCreatePrivate (CFAllocatorRef allocator, SCDynamicStoreCallBack callout, SCDynamicStoreContext *context); +__private_extern__ SCDynamicStoreRef __SCDynamicStoreNullSession (void); +__private_extern__ Boolean __SCDynamicStoreCheckRetryAndHandleError(SCDynamicStoreRef store, kern_return_t status, int *sc_status, const char *func); +__private_extern__ Boolean __SCDynamicStoreReconnectNotifications (SCDynamicStoreRef store); __END_DECLS -#endif /* _SCDYNAMICSTOREINTERNAL_H */ +#endif /* _SCDYNAMICSTOREINTERNAL_H */ diff --git a/SystemConfiguration.fproj/SCDynamicStoreKey.h b/SystemConfiguration.fproj/SCDynamicStoreKey.h index f53bfa2..aa28274 100644 --- a/SystemConfiguration.fproj/SCDynamicStoreKey.h +++ b/SystemConfiguration.fproj/SCDynamicStoreKey.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2002, 2004, 2005, 2008, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2000-2002, 2004, 2005, 2008, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,17 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCDYNAMICSTOREKEY_H -#ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -#include -#else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #define _SCDYNAMICSTOREKEY_H -#include +#include #include #include @@ -67,7 +64,7 @@ SCDynamicStoreKeyCreate ( CFAllocatorRef __nullable allocator, CFStringRef fmt, ... - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateNetworkGlobalEntity @@ -92,7 +89,7 @@ SCDynamicStoreKeyCreateNetworkGlobalEntity ( CFAllocatorRef __nullable allocator, CFStringRef domain, CFStringRef entity - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateNetworkInterface @@ -114,7 +111,7 @@ CFStringRef SCDynamicStoreKeyCreateNetworkInterface ( CFAllocatorRef __nullable allocator, CFStringRef domain - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateNetworkInterfaceEntity @@ -142,7 +139,7 @@ SCDynamicStoreKeyCreateNetworkInterfaceEntity ( CFStringRef domain, CFStringRef ifname, CFStringRef __nullable entity - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateNetworkServiceEntity @@ -171,7 +168,7 @@ SCDynamicStoreKeyCreateNetworkServiceEntity ( CFStringRef domain, CFStringRef serviceID, CFStringRef __nullable entity - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateComputerName @@ -189,7 +186,7 @@ SCDynamicStoreKeyCreateNetworkServiceEntity ( CFStringRef SCDynamicStoreKeyCreateComputerName ( CFAllocatorRef __nullable allocator - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateConsoleUser @@ -206,7 +203,7 @@ SCDynamicStoreKeyCreateComputerName ( CFStringRef SCDynamicStoreKeyCreateConsoleUser ( CFAllocatorRef __nullable allocator - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_NA); + ) API_AVAILABLE(macos(10.1)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCDynamicStoreKeyCreateHostNames @@ -224,7 +221,7 @@ SCDynamicStoreKeyCreateConsoleUser ( CFStringRef SCDynamicStoreKeyCreateHostNames ( CFAllocatorRef __nullable allocator - ) __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateLocation @@ -242,7 +239,7 @@ SCDynamicStoreKeyCreateHostNames ( CFStringRef SCDynamicStoreKeyCreateLocation ( CFAllocatorRef __nullable allocator - ) __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCDynamicStoreKeyCreateProxies @@ -260,12 +257,11 @@ SCDynamicStoreKeyCreateLocation ( CFStringRef SCDynamicStoreKeyCreateProxies ( CFAllocatorRef __nullable allocator - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS CF_ASSUME_NONNULL_END CF_IMPLICIT_BRIDGING_DISABLED -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #endif /* _SCDYNAMICSTOREKEY_H */ diff --git a/SystemConfiguration.fproj/SCDynamicStorePrivate.h b/SystemConfiguration.fproj/SCDynamicStorePrivate.h index fa8b010..43a98d9 100644 --- a/SystemConfiguration.fproj/SCDynamicStorePrivate.h +++ b/SystemConfiguration.fproj/SCDynamicStorePrivate.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2004, 2005, 2010, 2011, 2013, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2004, 2005, 2010, 2011, 2013, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,6 +24,8 @@ #ifndef _SCDYNAMICSTOREPRIVATE_H #define _SCDYNAMICSTOREPRIVATE_H +#include +#include #include #include #include @@ -223,11 +225,11 @@ Boolean SCDynamicStoreSetDisconnectCallBack ( SCDynamicStoreRef store, SCDynamicStoreDisconnectCallBack callout - ) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); + ) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); Boolean SCDynamicStoreSnapshot (SCDynamicStoreRef store); __END_DECLS -#endif /* _SCDYNAMICSTOREPRIVATE_H */ +#endif /* _SCDYNAMICSTOREPRIVATE_H */ diff --git a/SystemConfiguration.fproj/SCDynamicStoreSetSpecificPrivate.h b/SystemConfiguration.fproj/SCDynamicStoreSetSpecificPrivate.h index 668ae5c..bbf1f20 100644 --- a/SystemConfiguration.fproj/SCDynamicStoreSetSpecificPrivate.h +++ b/SystemConfiguration.fproj/SCDynamicStoreSetSpecificPrivate.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2001, 2003-2005, 2008 Apple Inc. All rights reserved. + * Copyright (c) 2001, 2003-2005, 2008, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,14 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCDYNAMICSTORESETSPECIFICPRIVATE_H #define _SCDYNAMICSTORESETSPECIFICPRIVATE_H -#include +#include #include #include @@ -62,7 +62,7 @@ SCDynamicStoreSetConsoleInformation ( uid_t uid, gid_t gid, CFArrayRef sessions - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA); + ) API_AVAILABLE(macos(10.3)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCDynamicStoreSetConsoleUser @@ -84,8 +84,8 @@ SCDynamicStoreSetConsoleUser ( const char *user, uid_t uid, gid_t gid - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_NA); + ) API_AVAILABLE(macos(10.1)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); __END_DECLS -#endif /* _SCDYNAMICSTORESETSPECIFICPRIVATE_H */ +#endif /* _SCDYNAMICSTORESETSPECIFICPRIVATE_H */ diff --git a/SystemConfiguration.fproj/SCLocation.c b/SystemConfiguration.fproj/SCLocation.c index b554fbb..13af773 100644 --- a/SystemConfiguration.fproj/SCLocation.c +++ b/SystemConfiguration.fproj/SCLocation.c @@ -1,15 +1,15 @@ /* - * Copyright (c) 2002, 2004, 2006, 2010, 2011, 2015, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2002, 2004, 2006, 2010, 2011, 2015, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -41,6 +41,7 @@ SCDynamicStoreKeyCreateLocation(CFAllocatorRef allocator) } +#if !TARGET_OS_IPHONE CFStringRef SCDynamicStoreCopyLocation(SCDynamicStoreRef store) { @@ -71,3 +72,4 @@ SCDynamicStoreCopyLocation(SCDynamicStoreRef store) return location; } +#endif // !TARGET_OS_IPHONE diff --git a/SystemConfiguration.fproj/SCNetwork.c b/SystemConfiguration.fproj/SCNetwork.c index 96ae844..06ce43f 100644 --- a/SystemConfiguration.fproj/SCNetwork.c +++ b/SystemConfiguration.fproj/SCNetwork.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2003-2007 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2007, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/SystemConfiguration.fproj/SCNetwork.h b/SystemConfiguration.fproj/SCNetwork.h index 0a0ba43..4bdeb7c 100644 --- a/SystemConfiguration.fproj/SCNetwork.h +++ b/SystemConfiguration.fproj/SCNetwork.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2003-2009, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2009, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,14 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCNETWORK_H #define _SCNETWORK_H -#include +#include #include #include #include @@ -146,7 +146,7 @@ SCNetworkCheckReachabilityByAddress ( const struct sockaddr *address, socklen_t addrlen, SCNetworkConnectionFlags *flags - ) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA); + ) API_DEPRECATED("No longer supported", macos(10.1,10.6)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCNetworkCheckReachabilityByName @@ -177,7 +177,7 @@ Boolean SCNetworkCheckReachabilityByName ( const char *nodename, SCNetworkConnectionFlags *flags - ) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_6,__IPHONE_NA,__IPHONE_NA); + ) API_DEPRECATED("No longer supported", macos(10.1,10.6)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCNetworkInterfaceRefreshConfiguration @@ -194,11 +194,11 @@ SCNetworkCheckReachabilityByName ( Boolean SCNetworkInterfaceRefreshConfiguration ( CFStringRef ifName - ) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA); + ) API_DEPRECATED("No longer supported", macos(10.1,10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); __END_DECLS CF_ASSUME_NONNULL_END CF_IMPLICIT_BRIDGING_DISABLED -#endif /* _SCNETWORK_H */ +#endif /* _SCNETWORK_H */ diff --git a/SystemConfiguration.fproj/SCNetworkConfiguration.h b/SystemConfiguration.fproj/SCNetworkConfiguration.h index 0de6096..f6c92ab 100644 --- a/SystemConfiguration.fproj/SCNetworkConfiguration.h +++ b/SystemConfiguration.fproj/SCNetworkConfiguration.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004-2011, 2015, 2016 Apple Inc. All rights reserved. + * Copyright (c) 2004-2011, 2015, 2016, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,17 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCNETWORKCONFIGURATION_H -#ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -#include -#else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #define _SCNETWORKCONFIGURATION_H -#include +#include #include #include #include @@ -68,84 +65,101 @@ typedef const struct CF_BRIDGED_TYPE(id) __SCNetworkInterface * SCNetworkInterfa /*! @const kSCNetworkInterfaceType6to4 */ -extern const CFStringRef kSCNetworkInterfaceType6to4 __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceType6to4 API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceTypeBluetooth */ -extern const CFStringRef kSCNetworkInterfaceTypeBluetooth __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeBluetooth API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceTypeBond */ -extern const CFStringRef kSCNetworkInterfaceTypeBond __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeBond API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceTypeEthernet */ -extern const CFStringRef kSCNetworkInterfaceTypeEthernet __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeEthernet API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceTypeFireWire */ -extern const CFStringRef kSCNetworkInterfaceTypeFireWire __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeFireWire API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceTypeIEEE80211 */ -extern const CFStringRef kSCNetworkInterfaceTypeIEEE80211 __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); // IEEE 802.11, AirPort +extern const CFStringRef kSCNetworkInterfaceTypeIEEE80211 API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); // IEEE 802.11, AirPort /*! @const kSCNetworkInterfaceTypeIPSec */ -extern const CFStringRef kSCNetworkInterfaceTypeIPSec __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeIPSec API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceTypeIrDA */ -extern const CFStringRef kSCNetworkInterfaceTypeIrDA __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeIrDA API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceTypeL2TP */ -extern const CFStringRef kSCNetworkInterfaceTypeL2TP __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeL2TP API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceTypeModem */ -extern const CFStringRef kSCNetworkInterfaceTypeModem __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeModem API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceTypePPP */ -extern const CFStringRef kSCNetworkInterfaceTypePPP __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypePPP API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceTypePPTP */ -extern const CFStringRef kSCNetworkInterfaceTypePPTP __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4,__MAC_10_12,__IPHONE_2_0/*SPI*/,__IPHONE_10_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypePPTP API_DEPRECATED("No longer supported", macos(10.4,10.12)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); + /*! @const kSCNetworkInterfaceTypeSerial */ -extern const CFStringRef kSCNetworkInterfaceTypeSerial __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeSerial API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceTypeVLAN */ -extern const CFStringRef kSCNetworkInterfaceTypeVLAN __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeVLAN API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceTypeWWAN */ -extern const CFStringRef kSCNetworkInterfaceTypeWWAN __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeWWAN API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /* special network interfaces (and types) */ /*! @const kSCNetworkInterfaceTypeIPv4 */ -extern const CFStringRef kSCNetworkInterfaceTypeIPv4 __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeIPv4 API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceIPv4 @@ -153,7 +167,8 @@ extern const CFStringRef kSCNetworkInterfaceTypeIPv4 __OSX_AVAILABLE_STARTI interfaces (e.g. 6to4, IPSec, PPTP, L2TP) over an existing IPv4 network. */ -extern const SCNetworkInterfaceRef kSCNetworkInterfaceIPv4 __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const SCNetworkInterfaceRef kSCNetworkInterfaceIPv4 API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @group Interface configuration (Bond) @@ -195,17 +210,17 @@ enum { /*! @const kSCBondStatusDeviceAggregationStatus */ -extern const CFStringRef kSCBondStatusDeviceAggregationStatus /* CFNumber */ __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCBondStatusDeviceAggregationStatus /* CFNumber */ API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @const kSCBondStatusDeviceCollecting */ -extern const CFStringRef kSCBondStatusDeviceCollecting /* CFNumber (0 or 1) */ __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCBondStatusDeviceCollecting /* CFNumber (0 or 1) */ API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @const kSCBondStatusDeviceDistributing */ -extern const CFStringRef kSCBondStatusDeviceDistributing /* CFNumber (0 or 1) */ __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCBondStatusDeviceDistributing /* CFNumber (0 or 1) */ API_AVAILABLE(macos(10.4)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @group Interface configuration (VLAN) @@ -240,27 +255,31 @@ typedef const struct CF_BRIDGED_TYPE(id) __SCNetworkProtocol * SCNetworkProtocol /*! @const kSCNetworkProtocolTypeDNS */ -extern const CFStringRef kSCNetworkProtocolTypeDNS __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkProtocolTypeDNS API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkProtocolTypeIPv4 */ -extern const CFStringRef kSCNetworkProtocolTypeIPv4 __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkProtocolTypeIPv4 API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkProtocolTypeIPv6 */ -extern const CFStringRef kSCNetworkProtocolTypeIPv6 __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkProtocolTypeIPv6 API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkProtocolTypeProxies */ -extern const CFStringRef kSCNetworkProtocolTypeProxies __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCNetworkProtocolTypeProxies API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkProtocolTypeSMB */ -extern const CFStringRef kSCNetworkProtocolTypeSMB __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_NA); +extern const CFStringRef kSCNetworkProtocolTypeSMB API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @group Service configuration @@ -311,7 +330,8 @@ __BEGIN_DECLS @discussion Returns the type identifier of all SCNetworkInterface instances. */ CFTypeID -SCNetworkInterfaceGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkInterfaceGetTypeID (void) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceCopyAll @@ -320,7 +340,8 @@ SCNetworkInterfaceGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_4,__ You must release the returned value. */ CFArrayRef /* of SCNetworkInterfaceRef's */ -SCNetworkInterfaceCopyAll (void) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkInterfaceCopyAll (void) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceGetSupportedInterfaceTypes @@ -331,7 +352,8 @@ SCNetworkInterfaceCopyAll (void) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IP NULL if no interface types are supported. */ CFArrayRef /* of kSCNetworkInterfaceTypeXXX CFStringRef's */ __nullable -SCNetworkInterfaceGetSupportedInterfaceTypes (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkInterfaceGetSupportedInterfaceTypes (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceGetSupportedProtocolTypes @@ -342,7 +364,8 @@ SCNetworkInterfaceGetSupportedInterfaceTypes (SCNetworkInterfaceRef interface) NULL if no protocol types are supported. */ CFArrayRef /* of kSCNetworkProtocolTypeXXX CFStringRef's */ __nullable -SCNetworkInterfaceGetSupportedProtocolTypes (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkInterfaceGetSupportedProtocolTypes (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceCreateWithInterface @@ -357,7 +380,8 @@ SCNetworkInterfaceGetSupportedProtocolTypes (SCNetworkInterfaceRef interface) _ */ SCNetworkInterfaceRef __nullable SCNetworkInterfaceCreateWithInterface (SCNetworkInterfaceRef interface, - CFStringRef interfaceType) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + CFStringRef interfaceType) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceGetBSDName @@ -368,7 +392,8 @@ SCNetworkInterfaceCreateWithInterface (SCNetworkInterfaceRef interface, NULL if no BSD name is available. */ CFStringRef __nullable -SCNetworkInterfaceGetBSDName (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkInterfaceGetBSDName (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceGetConfiguration @@ -379,7 +404,8 @@ SCNetworkInterfaceGetBSDName (SCNetworkInterfaceRef interface) __OSX_AVAILABL or an error was encountered. */ CFDictionaryRef __nullable -SCNetworkInterfaceGetConfiguration (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkInterfaceGetConfiguration (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceGetExtendedConfiguration @@ -392,7 +418,8 @@ SCNetworkInterfaceGetConfiguration (SCNetworkInterfaceRef interface) __OSX_AVA */ CFDictionaryRef __nullable SCNetworkInterfaceGetExtendedConfiguration (SCNetworkInterfaceRef interface, - CFStringRef extendedType) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); + CFStringRef extendedType) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceGetHardwareAddressString @@ -401,7 +428,8 @@ SCNetworkInterfaceGetExtendedConfiguration (SCNetworkInterfaceRef interface, @result A string representing the hardware (MAC) address for the interface. */ CFStringRef __nullable -SCNetworkInterfaceGetHardwareAddressString (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkInterfaceGetHardwareAddressString (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceGetInterface @@ -411,7 +439,8 @@ SCNetworkInterfaceGetHardwareAddressString (SCNetworkInterfaceRef interface) __ NULL if this is a leaf interface. */ SCNetworkInterfaceRef __nullable -SCNetworkInterfaceGetInterface (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkInterfaceGetInterface (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceGetInterfaceType @@ -420,7 +449,8 @@ SCNetworkInterfaceGetInterface (SCNetworkInterfaceRef interface) __OSX_AVAILA @result The interface type. */ CFStringRef __nullable -SCNetworkInterfaceGetInterfaceType (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkInterfaceGetInterfaceType (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceGetLocalizedDisplayName @@ -431,7 +461,8 @@ SCNetworkInterfaceGetInterfaceType (SCNetworkInterfaceRef interface) __OSX_AVA NULL if no name is available. */ CFStringRef __nullable -SCNetworkInterfaceGetLocalizedDisplayName (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkInterfaceGetLocalizedDisplayName (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceSetConfiguration @@ -442,7 +473,8 @@ SCNetworkInterfaceGetLocalizedDisplayName (SCNetworkInterfaceRef interface) __O */ Boolean SCNetworkInterfaceSetConfiguration (SCNetworkInterfaceRef interface, - CFDictionaryRef __nullable config) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + CFDictionaryRef __nullable config) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceSetExtendedConfiguration @@ -454,7 +486,8 @@ SCNetworkInterfaceSetConfiguration (SCNetworkInterfaceRef interface, Boolean SCNetworkInterfaceSetExtendedConfiguration (SCNetworkInterfaceRef interface, CFStringRef extendedType, - CFDictionaryRef __nullable config) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); + CFDictionaryRef __nullable config) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #pragma mark - @@ -483,7 +516,8 @@ SCNetworkInterfaceCopyMediaOptions (SCNetworkInterfaceRef interface, CFDictionaryRef __nullable * __nullable current, CFDictionaryRef __nullable * __nullable active, CFArrayRef __nullable * __nullable available, - Boolean filter) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); + Boolean filter) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceCopyMediaSubTypes @@ -495,7 +529,8 @@ SCNetworkInterfaceCopyMediaOptions (SCNetworkInterfaceRef interface, 100baseTX, etc). NULL if no subtypes are available. */ CFArrayRef __nullable -SCNetworkInterfaceCopyMediaSubTypes (CFArrayRef available) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +SCNetworkInterfaceCopyMediaSubTypes (CFArrayRef available) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceCopyMediaSubTypeOptions @@ -510,7 +545,8 @@ SCNetworkInterfaceCopyMediaSubTypes (CFArrayRef available) __OSX_AVAILABLE_ST */ CFArrayRef __nullable SCNetworkInterfaceCopyMediaSubTypeOptions (CFArrayRef available, - CFStringRef subType) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); + CFStringRef subType) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceCopyMTU @@ -529,10 +565,11 @@ SCNetworkInterfaceCopyMediaSubTypeOptions (CFArrayRef available, @result TRUE if requested information has been returned. */ Boolean -SCNetworkInterfaceCopyMTU (SCNetworkInterfaceRef interface, - int * __nullable mtu_cur, - int * __nullable mtu_min, - int * __nullable mtu_max) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +SCNetworkInterfaceCopyMTU (SCNetworkInterfaceRef interface, + int * __nullable mtu_cur, + int * __nullable mtu_min, + int * __nullable mtu_max) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceSetMediaOptions @@ -546,7 +583,8 @@ SCNetworkInterfaceCopyMTU (SCNetworkInterfaceRef interface, Boolean SCNetworkInterfaceSetMediaOptions (SCNetworkInterfaceRef interface, CFStringRef subtype, - CFArrayRef options) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); + CFArrayRef options) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceSetMTU @@ -558,7 +596,8 @@ SCNetworkInterfaceSetMediaOptions (SCNetworkInterfaceRef interface, */ Boolean SCNetworkInterfaceSetMTU (SCNetworkInterfaceRef interface, - int mtu) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); + int mtu) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceForceConfigurationRefresh @@ -581,7 +620,8 @@ SCNetworkInterfaceSetMTU (SCNetworkInterfaceRef interface, @result Returns TRUE if the notification was sent; FALSE otherwise. */ Boolean -SCNetworkInterfaceForceConfigurationRefresh (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +SCNetworkInterfaceForceConfigurationRefresh (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @group Interface configuration (Bond) @@ -598,7 +638,7 @@ SCNetworkInterfaceForceConfigurationRefresh (SCNetworkInterfaceRef interface) _ You must release the returned value. */ CFArrayRef /* of SCBondInterfaceRef's */ -SCBondInterfaceCopyAll (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCBondInterfaceCopyAll (SCPreferencesRef prefs) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCBondInterfaceCopyAvailableMemberInterfaces @@ -609,7 +649,7 @@ SCBondInterfaceCopyAll (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__ You must release the returned value. */ CFArrayRef /* of SCNetworkInterfaceRef's */ -SCBondInterfaceCopyAvailableMemberInterfaces (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCBondInterfaceCopyAvailableMemberInterfaces (SCPreferencesRef prefs) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCBondInterfaceCreate @@ -619,7 +659,7 @@ SCBondInterfaceCopyAvailableMemberInterfaces (SCPreferencesRef prefs) __OSX_AV You must release the returned value. */ SCBondInterfaceRef __nullable -SCBondInterfaceCreate (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCBondInterfaceCreate (SCPreferencesRef prefs) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCBondInterfaceRemove @@ -628,7 +668,7 @@ SCBondInterfaceCreate (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__M @result TRUE if the interface was removed; FALSE if an error was encountered. */ Boolean -SCBondInterfaceRemove (SCBondInterfaceRef bond) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCBondInterfaceRemove (SCBondInterfaceRef bond) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCBondInterfaceGetMemberInterfaces @@ -637,7 +677,7 @@ SCBondInterfaceRemove (SCBondInterfaceRef bond) __OSX_AVAILABLE_STARTING(__ @result The list of interfaces. */ CFArrayRef /* of SCNetworkInterfaceRef's */ __nullable -SCBondInterfaceGetMemberInterfaces (SCBondInterfaceRef bond) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCBondInterfaceGetMemberInterfaces (SCBondInterfaceRef bond) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCBondInterfaceGetOptions @@ -647,7 +687,7 @@ SCBondInterfaceGetMemberInterfaces (SCBondInterfaceRef bond) __OSX_AVAILABLE_ NULL if no changes to the default configuration have been saved. */ CFDictionaryRef __nullable -SCBondInterfaceGetOptions (SCBondInterfaceRef bond) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCBondInterfaceGetOptions (SCBondInterfaceRef bond) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCBondInterfaceSetMemberInterfaces @@ -659,7 +699,7 @@ SCBondInterfaceGetOptions (SCBondInterfaceRef bond) __OSX_AVAILABLE_STARTING Boolean SCBondInterfaceSetMemberInterfaces (SCBondInterfaceRef bond, CFArrayRef members) /* of SCNetworkInterfaceRef's */ - __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); + API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCBondInterfaceSetLocalizedDisplayName @@ -670,7 +710,7 @@ SCBondInterfaceSetMemberInterfaces (SCBondInterfaceRef bond, */ Boolean SCBondInterfaceSetLocalizedDisplayName (SCBondInterfaceRef bond, - CFStringRef newName) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); + CFStringRef newName) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCBondInterfaceSetOptions @@ -681,7 +721,7 @@ SCBondInterfaceSetLocalizedDisplayName (SCBondInterfaceRef bond, */ Boolean SCBondInterfaceSetOptions (SCBondInterfaceRef bond, - CFDictionaryRef newOptions) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); + CFDictionaryRef newOptions) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #pragma mark - @@ -693,14 +733,14 @@ SCBondInterfaceSetOptions (SCBondInterfaceRef bond, You must release the returned value. */ SCBondStatusRef __nullable -SCBondInterfaceCopyStatus (SCBondInterfaceRef bond) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCBondInterfaceCopyStatus (SCBondInterfaceRef bond) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCBondStatusGetTypeID @discussion Returns the type identifier of all SCBondStatus instances. */ CFTypeID -SCBondStatusGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCBondStatusGetTypeID (void) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCBondStatusGetMemberInterfaces @@ -710,7 +750,7 @@ SCBondStatusGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHON @result The list of interfaces. */ CFArrayRef __nullable /* of SCNetworkInterfaceRef's */ -SCBondStatusGetMemberInterfaces (SCBondStatusRef bondStatus) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCBondStatusGetMemberInterfaces (SCBondStatusRef bondStatus) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCBondStatusGetInterfaceStatus @@ -727,7 +767,7 @@ SCBondStatusGetMemberInterfaces (SCBondStatusRef bondStatus) __OSX_AVAILABLE_ */ CFDictionaryRef __nullable SCBondStatusGetInterfaceStatus (SCBondStatusRef bondStatus, - SCNetworkInterfaceRef __nullable interface) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); + SCNetworkInterfaceRef __nullable interface) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @group Interface configuration (VLAN) @@ -743,7 +783,8 @@ SCBondStatusGetInterfaceStatus (SCBondStatusRef bondStatus, You must release the returned value. */ CFArrayRef /* of SCVLANInterfaceRef's */ -SCVLANInterfaceCopyAll (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCVLANInterfaceCopyAll (SCPreferencesRef prefs) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCVLANInterfaceCopyAvailablePhysicalInterfaces @@ -753,7 +794,8 @@ SCVLANInterfaceCopyAll (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__ You must release the returned value. */ CFArrayRef /* of SCNetworkInterfaceRef's */ -SCVLANInterfaceCopyAvailablePhysicalInterfaces (void) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCVLANInterfaceCopyAvailablePhysicalInterfaces (void) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCVLANInterfaceCreate @@ -769,7 +811,8 @@ SCVLANInterfaceCopyAvailablePhysicalInterfaces (void) __OSX_AVAILABLE_START SCVLANInterfaceRef __nullable SCVLANInterfaceCreate (SCPreferencesRef prefs, SCNetworkInterfaceRef physical, - CFNumberRef tag) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); + CFNumberRef tag) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCVLANInterfaceRemove @@ -778,7 +821,8 @@ SCVLANInterfaceCreate (SCPreferencesRef prefs, @result TRUE if the interface was removed; FALSE if an error was encountered. */ Boolean -SCVLANInterfaceRemove (SCVLANInterfaceRef vlan) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCVLANInterfaceRemove (SCVLANInterfaceRef vlan) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCVLANInterfaceGetPhysicalInterface @@ -787,7 +831,8 @@ SCVLANInterfaceRemove (SCVLANInterfaceRef vlan) __OSX_AVAILABLE_STARTING(__ @result The list of interfaces. */ SCNetworkInterfaceRef __nullable -SCVLANInterfaceGetPhysicalInterface (SCVLANInterfaceRef vlan) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCVLANInterfaceGetPhysicalInterface (SCVLANInterfaceRef vlan) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCVLANInterfaceGetTag @@ -796,7 +841,8 @@ SCVLANInterfaceGetPhysicalInterface (SCVLANInterfaceRef vlan) __OSX_AVAILABLE @result The tag. */ CFNumberRef __nullable -SCVLANInterfaceGetTag (SCVLANInterfaceRef vlan) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCVLANInterfaceGetTag (SCVLANInterfaceRef vlan) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCVLANInterfaceGetOptions @@ -806,7 +852,8 @@ SCVLANInterfaceGetTag (SCVLANInterfaceRef vlan) __OSX_AVAILABLE_STARTING(__ NULL if no changes to the default configuration have been saved. */ CFDictionaryRef __nullable -SCVLANInterfaceGetOptions (SCVLANInterfaceRef vlan) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCVLANInterfaceGetOptions (SCVLANInterfaceRef vlan) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCVLANInterfaceSetPhysicalInterfaceAndTag @@ -821,7 +868,8 @@ SCVLANInterfaceGetOptions (SCVLANInterfaceRef vlan) __OSX_AVAILABLE_STARTING Boolean SCVLANInterfaceSetPhysicalInterfaceAndTag (SCVLANInterfaceRef vlan, SCNetworkInterfaceRef physical, - CFNumberRef tag) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); + CFNumberRef tag) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCVLANInterfaceSetLocalizedDisplayName @@ -832,7 +880,8 @@ SCVLANInterfaceSetPhysicalInterfaceAndTag (SCVLANInterfaceRef vlan, */ Boolean SCVLANInterfaceSetLocalizedDisplayName (SCVLANInterfaceRef vlan, - CFStringRef newName) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); + CFStringRef newName) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCVLANInterfaceSetOptions @@ -843,7 +892,8 @@ SCVLANInterfaceSetLocalizedDisplayName (SCVLANInterfaceRef vlan, */ Boolean SCVLANInterfaceSetOptions (SCVLANInterfaceRef vlan, - CFDictionaryRef newOptions) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); + CFDictionaryRef newOptions) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /* -------------------------------------------------------------------------------- @@ -862,7 +912,8 @@ SCVLANInterfaceSetOptions (SCVLANInterfaceRef vlan, @discussion Returns the type identifier of all SCNetworkProtocol instances. */ CFTypeID -SCNetworkProtocolGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkProtocolGetTypeID (void) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkProtocolGetConfiguration @@ -873,7 +924,8 @@ SCNetworkProtocolGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_4,__I or an error was encountered. */ CFDictionaryRef __nullable -SCNetworkProtocolGetConfiguration (SCNetworkProtocolRef protocol) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkProtocolGetConfiguration (SCNetworkProtocolRef protocol) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkProtocolGetEnabled @@ -882,7 +934,8 @@ SCNetworkProtocolGetConfiguration (SCNetworkProtocolRef protocol) __OSX_AVAILA @result TRUE if the protocol is enabled. */ Boolean -SCNetworkProtocolGetEnabled (SCNetworkProtocolRef protocol) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkProtocolGetEnabled (SCNetworkProtocolRef protocol) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkProtocolGetProtocolType @@ -891,7 +944,8 @@ SCNetworkProtocolGetEnabled (SCNetworkProtocolRef protocol) __OSX_AVAILABLE_S @result The protocol type. */ CFStringRef __nullable -SCNetworkProtocolGetProtocolType (SCNetworkProtocolRef protocol) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkProtocolGetProtocolType (SCNetworkProtocolRef protocol) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkProtocolSetConfiguration @@ -902,7 +956,8 @@ SCNetworkProtocolGetProtocolType (SCNetworkProtocolRef protocol) __OSX_AVAILAB */ Boolean SCNetworkProtocolSetConfiguration (SCNetworkProtocolRef protocol, - CFDictionaryRef __nullable config) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + CFDictionaryRef __nullable config) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkProtocolSetEnabled @@ -913,7 +968,8 @@ SCNetworkProtocolSetConfiguration (SCNetworkProtocolRef protocol, */ Boolean SCNetworkProtocolSetEnabled (SCNetworkProtocolRef protocol, - Boolean enabled) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + Boolean enabled) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /* -------------------------------------------------------------------------------- * SERVICES @@ -931,7 +987,8 @@ SCNetworkProtocolSetEnabled (SCNetworkProtocolRef protocol, @discussion Returns the type identifier of all SCNetworkService instances. */ CFTypeID -SCNetworkServiceGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkServiceGetTypeID (void) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceAddProtocolType @@ -946,7 +1003,8 @@ SCNetworkServiceGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IP */ Boolean SCNetworkServiceAddProtocolType (SCNetworkServiceRef service, - CFStringRef protocolType) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + CFStringRef protocolType) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceCopyAll @@ -956,7 +1014,8 @@ SCNetworkServiceAddProtocolType (SCNetworkServiceRef service, You must release the returned value. */ CFArrayRef /* of SCNetworkServiceRef's */ __nullable -SCNetworkServiceCopyAll (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkServiceCopyAll (SCPreferencesRef prefs) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceCopyProtocols @@ -966,7 +1025,8 @@ SCNetworkServiceCopyAll (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(_ You must release the returned value. */ CFArrayRef /* of SCNetworkProtocolRef's */ __nullable -SCNetworkServiceCopyProtocols (SCNetworkServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkServiceCopyProtocols (SCNetworkServiceRef service) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceCreate @@ -978,7 +1038,8 @@ SCNetworkServiceCopyProtocols (SCNetworkServiceRef service) __OSX_AVAILABLE_S */ SCNetworkServiceRef __nullable SCNetworkServiceCreate (SCPreferencesRef prefs, - SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceCopy @@ -992,7 +1053,8 @@ SCNetworkServiceCreate (SCPreferencesRef prefs, */ SCNetworkServiceRef __nullable SCNetworkServiceCopy (SCPreferencesRef prefs, - CFStringRef serviceID) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + CFStringRef serviceID) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceEstablishDefaultConfiguration @@ -1004,7 +1066,8 @@ SCNetworkServiceCopy (SCPreferencesRef prefs, @result TRUE if the configuration was updated; FALSE if an error was encountered. */ Boolean -SCNetworkServiceEstablishDefaultConfiguration (SCNetworkServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +SCNetworkServiceEstablishDefaultConfiguration (SCNetworkServiceRef service) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceGetEnabled @@ -1013,7 +1076,8 @@ SCNetworkServiceEstablishDefaultConfiguration (SCNetworkServiceRef service) __O @result TRUE if the service is enabled. */ Boolean -SCNetworkServiceGetEnabled (SCNetworkServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkServiceGetEnabled (SCNetworkServiceRef service) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceGetInterface @@ -1023,7 +1087,8 @@ SCNetworkServiceGetEnabled (SCNetworkServiceRef service) __OSX_AVAILABLE_STAR NULL if an error was encountered. */ SCNetworkInterfaceRef __nullable -SCNetworkServiceGetInterface (SCNetworkServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkServiceGetInterface (SCNetworkServiceRef service) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceGetName @@ -1032,7 +1097,8 @@ SCNetworkServiceGetInterface (SCNetworkServiceRef service) __OSX_AVAILABLE_ST @result The [user specified] name. */ CFStringRef __nullable -SCNetworkServiceGetName (SCNetworkServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkServiceGetName (SCNetworkServiceRef service) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceCopyProtocol @@ -1045,7 +1111,8 @@ SCNetworkServiceGetName (SCNetworkServiceRef service) __OSX_AVAILABLE_STARTI */ SCNetworkProtocolRef __nullable SCNetworkServiceCopyProtocol (SCNetworkServiceRef service, - CFStringRef protocolType) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + CFStringRef protocolType) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceGetServiceID @@ -1054,7 +1121,8 @@ SCNetworkServiceCopyProtocol (SCNetworkServiceRef service, @result The service identifier. */ CFStringRef __nullable -SCNetworkServiceGetServiceID (SCNetworkServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkServiceGetServiceID (SCNetworkServiceRef service) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceRemove @@ -1063,7 +1131,8 @@ SCNetworkServiceGetServiceID (SCNetworkServiceRef service) __OSX_AVAILABLE_ST @result TRUE if the service was removed; FALSE if an error was encountered. */ Boolean -SCNetworkServiceRemove (SCNetworkServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkServiceRemove (SCNetworkServiceRef service) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceRemoveProtocolType @@ -1075,7 +1144,8 @@ SCNetworkServiceRemove (SCNetworkServiceRef service) __OSX_AVAILABLE_STARTIN */ Boolean SCNetworkServiceRemoveProtocolType (SCNetworkServiceRef service, - CFStringRef protocolType) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + CFStringRef protocolType) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceSetEnabled @@ -1086,7 +1156,8 @@ SCNetworkServiceRemoveProtocolType (SCNetworkServiceRef service, */ Boolean SCNetworkServiceSetEnabled (SCNetworkServiceRef service, - Boolean enabled) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + Boolean enabled) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkServiceSetName @@ -1102,7 +1173,8 @@ SCNetworkServiceSetEnabled (SCNetworkServiceRef service, */ Boolean SCNetworkServiceSetName (SCNetworkServiceRef service, - CFStringRef __nullable name) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + CFStringRef __nullable name) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /* -------------------------------------------------------------------------------- @@ -1121,7 +1193,8 @@ SCNetworkServiceSetName (SCNetworkServiceRef service, @discussion Returns the type identifier of all SCNetworkSet instances. */ CFTypeID -SCNetworkSetGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkSetGetTypeID (void) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetAddService @@ -1138,7 +1211,8 @@ SCNetworkSetGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHON */ Boolean SCNetworkSetAddService (SCNetworkSetRef set, - SCNetworkServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + SCNetworkServiceRef service) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetContainsInterface @@ -1150,7 +1224,8 @@ SCNetworkSetAddService (SCNetworkSetRef set, */ Boolean SCNetworkSetContainsInterface (SCNetworkSetRef set, - SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); + SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.5)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetCopyAll @@ -1160,7 +1235,8 @@ SCNetworkSetContainsInterface (SCNetworkSetRef set, You must release the returned value. */ CFArrayRef /* of SCNetworkSetRef's */ __nullable -SCNetworkSetCopyAll (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkSetCopyAll (SCPreferencesRef prefs) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetCopyCurrent @@ -1169,7 +1245,8 @@ SCNetworkSetCopyAll (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC @result The current set; NULL if no current set has been defined. */ SCNetworkSetRef __nullable -SCNetworkSetCopyCurrent (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkSetCopyCurrent (SCPreferencesRef prefs) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetCopyServices @@ -1179,7 +1256,8 @@ SCNetworkSetCopyCurrent (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(_ You must release the returned value. */ CFArrayRef /* of SCNetworkServiceRef's */ __nullable -SCNetworkSetCopyServices (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkSetCopyServices (SCNetworkSetRef set) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetCreate @@ -1189,7 +1267,8 @@ SCNetworkSetCopyServices (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MA You must release the returned value. */ SCNetworkSetRef __nullable -SCNetworkSetCreate (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkSetCreate (SCPreferencesRef prefs) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetCopy @@ -1203,7 +1282,8 @@ SCNetworkSetCreate (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_ */ SCNetworkSetRef __nullable SCNetworkSetCopy (SCPreferencesRef prefs, - CFStringRef setID) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + CFStringRef setID) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetGetName @@ -1212,7 +1292,8 @@ SCNetworkSetCopy (SCPreferencesRef prefs, @result The [user specified] name. */ CFStringRef __nullable -SCNetworkSetGetName (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkSetGetName (SCNetworkSetRef set) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetGetSetID @@ -1221,7 +1302,8 @@ SCNetworkSetGetName (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MAC_10 @result The set identifier. */ CFStringRef __nullable -SCNetworkSetGetSetID (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkSetGetSetID (SCNetworkSetRef set) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetGetServiceOrder @@ -1234,7 +1316,8 @@ SCNetworkSetGetSetID (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MAC_1 was encountered. */ CFArrayRef /* of serviceID CFStringRef's */ __nullable -SCNetworkSetGetServiceOrder (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkSetGetServiceOrder (SCNetworkSetRef set) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetRemove @@ -1243,7 +1326,8 @@ SCNetworkSetGetServiceOrder (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(_ @result TRUE if the set was removed; FALSE if an error was encountered. */ Boolean -SCNetworkSetRemove (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkSetRemove (SCNetworkSetRef set) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetRemoveService @@ -1255,7 +1339,8 @@ SCNetworkSetRemove (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MAC_10_ */ Boolean SCNetworkSetRemoveService (SCNetworkSetRef set, - SCNetworkServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + SCNetworkServiceRef service) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetSetCurrent @@ -1265,7 +1350,8 @@ SCNetworkSetRemoveService (SCNetworkSetRef set, FALSE if an error was encountered. */ Boolean -SCNetworkSetSetCurrent (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +SCNetworkSetSetCurrent (SCNetworkSetRef set) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetSetName @@ -1280,7 +1366,8 @@ SCNetworkSetSetCurrent (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MAC */ Boolean SCNetworkSetSetName (SCNetworkSetRef set, - CFStringRef __nullable name) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + CFStringRef __nullable name) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSetSetServiceOrder @@ -1291,7 +1378,8 @@ SCNetworkSetSetName (SCNetworkSetRef set, */ Boolean SCNetworkSetSetServiceOrder (SCNetworkSetRef set, - CFArrayRef newOrder) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); /* serviceID CFStringRef's */ + CFArrayRef newOrder) API_AVAILABLE(macos(10.4)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /* serviceID CFStringRef's */ __END_DECLS @@ -1299,5 +1387,4 @@ __END_DECLS CF_ASSUME_NONNULL_END CF_IMPLICIT_BRIDGING_DISABLED -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #endif /* _SCNETWORKCONFIGURATION_H */ diff --git a/SystemConfiguration.fproj/SCNetworkConfigurationInternal.c b/SystemConfiguration.fproj/SCNetworkConfigurationInternal.c index f1a5fc1..f5b888c 100644 --- a/SystemConfiguration.fproj/SCNetworkConfigurationInternal.c +++ b/SystemConfiguration.fproj/SCNetworkConfigurationInternal.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2007, 2009, 2010-2013, 2015, 2016 Apple Inc. All rights reserved. + * Copyright (c) 2004-2007, 2009, 2010-2013, 2015-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -29,6 +29,7 @@ */ +#include "SCPreferencesInternal.h" #include "SCNetworkConfigurationInternal.h" #include @@ -36,7 +37,7 @@ __private_extern__ os_log_t -__log_SCNetworkConfiguration() +__log_SCNetworkConfiguration(void) { static os_log_t log = NULL; @@ -200,11 +201,11 @@ __setPrefsEnabled(SCPreferencesRef prefs, return ok; } -#if !TARGET_OS_EMBEDDED +#if TARGET_OS_OSX #define SYSTEMCONFIGURATION_RESOURCES_PATH SYSTEMCONFIGURATION_FRAMEWORK_PATH "/Resources" #else #define SYSTEMCONFIGURATION_RESOURCES_PATH SYSTEMCONFIGURATION_FRAMEWORK_PATH -#endif // !TARGET_OS_EMBEDDED +#endif // TARGET_OS_OSX #define NETWORKCONFIGURATION_RESOURCE_FILE "NetworkConfiguration.plist" diff --git a/SystemConfiguration.fproj/SCNetworkConfigurationInternal.h b/SystemConfiguration.fproj/SCNetworkConfigurationInternal.h index 60d5e24..ddabf4d 100644 --- a/SystemConfiguration.fproj/SCNetworkConfigurationInternal.h +++ b/SystemConfiguration.fproj/SCNetworkConfigurationInternal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2017 Apple Inc. All rights reserved. + * Copyright (c) 2004-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -34,7 +34,7 @@ #include #include #include -#include +#include "SCPreferencesPathKey.h" #include #if !TARGET_OS_SIMULATOR @@ -157,6 +157,7 @@ typedef struct { uint64_t entryID; CFMutableDictionaryRef overrides; CFStringRef prefix; + Boolean trustRequired; CFNumberRef type; CFNumberRef unit; CFNumberRef family; @@ -291,15 +292,6 @@ CFStringRef __SCNetworkInterfaceCopyXNonLocalizedDisplayName(SCNetworkInterfaceRef interface); #endif // !TARGET_OS_IPHONE -int -__SCNetworkInterfaceCreateCapabilities (SCNetworkInterfaceRef interface, - int capability_base, - CFDictionaryRef capability_options); - -int -__SCNetworkInterfaceCreateMediaOptions (SCNetworkInterfaceRef interface, - CFDictionaryRef media_options); - CFStringRef __SCNetworkInterfaceGetDefaultConfigurationType (SCNetworkInterfaceRef interface); @@ -312,10 +304,6 @@ __SCNetworkInterfaceGetEntityType (SCNetworkInterfaceRef interface); CFStringRef __SCNetworkInterfaceGetNonLocalizedDisplayName (SCNetworkInterfaceRef interface); -Boolean -__SCNetworkInterfaceSetDisableUntilNeededValue (SCNetworkInterfaceRef interface, - CFTypeRef disable); - void __SCNetworkInterfaceSetUserDefinedName(SCNetworkInterfaceRef interface, CFStringRef name); @@ -413,10 +401,10 @@ __SCBridgeInterfaceSetMemberInterfaces (SCBridgeInterfaceRef bridge, CFArrayRef members); void -_SCNetworkInterfaceCacheOpen(); +_SCNetworkInterfaceCacheOpen(void); void -_SCNetworkInterfaceCacheClose(); +_SCNetworkInterfaceCacheClose(void); #pragma mark - #pragma mark SCNetworkProtocol configuration (internal) @@ -493,7 +481,7 @@ __SCNetworkServiceAddProtocolToService (SCNetworkServiceRef service, os_log_t -__log_SCNetworkConfiguration (); +__log_SCNetworkConfiguration (void); #pragma mark - diff --git a/SystemConfiguration.fproj/SCNetworkConfigurationPrivate.h b/SystemConfiguration.fproj/SCNetworkConfigurationPrivate.h index 37791a1..025b7a5 100644 --- a/SystemConfiguration.fproj/SCNetworkConfigurationPrivate.h +++ b/SystemConfiguration.fproj/SCNetworkConfigurationPrivate.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005-2017 Apple Inc. All rights reserved. + * Copyright (c) 2005-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,7 +24,7 @@ #ifndef _SCNETWORKCONFIGURATIONPRIVATE_H #define _SCNETWORKCONFIGURATIONPRIVATE_H -#include +#include #include #include #include @@ -49,25 +49,25 @@ __BEGIN_DECLS /*! @const kSCNetworkInterfaceTypeBridge */ -extern const CFStringRef kSCNetworkInterfaceTypeBridge __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeBridge API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceTypeLoopback */ -extern const CFStringRef kSCNetworkInterfaceTypeLoopback __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeLoopback API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceLoopback @discussion A network interface representing the loopback interface (lo0). */ -extern const SCNetworkInterfaceRef kSCNetworkInterfaceLoopback __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const SCNetworkInterfaceRef kSCNetworkInterfaceLoopback API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @const kSCNetworkInterfaceTypeVPN */ -extern const CFStringRef kSCNetworkInterfaceTypeVPN __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCNetworkInterfaceTypeVPN API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @group Interface configuration (Bridge) @@ -169,7 +169,7 @@ isA_SCVLANInterface(CFTypeRef obj) CFComparisonResult _SCNetworkInterfaceCompare (const void *val1, const void *val2, - void *context) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + void *context) API_AVAILABLE(macos(10.5), ios(2.0)); /*! @function _SCNetworkInterfaceCopyActive @@ -181,7 +181,7 @@ _SCNetworkInterfaceCompare (const void *val1, */ SCNetworkInterfaceRef _SCNetworkInterfaceCopyActive (SCDynamicStoreRef store, - CFStringRef bsdName) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_5_0); + CFStringRef bsdName) API_AVAILABLE(macos(10.8), ios(5.0)); /*! @function _SCNetworkInterfaceCopyAllWithPreferences @@ -191,7 +191,7 @@ _SCNetworkInterfaceCopyActive (SCDynamicStoreRef store, You must release the returned value. */ CFArrayRef /* of SCNetworkInterfaceRef's */ -_SCNetworkInterfaceCopyAllWithPreferences (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +_SCNetworkInterfaceCopyAllWithPreferences (SCPreferencesRef prefs) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function _SCNetworkInterfaceCopyBTPANInterface @@ -199,7 +199,7 @@ _SCNetworkInterfaceCopyAllWithPreferences (SCPreferencesRef prefs) __OSX_AVAI @result The BT-PAN interface; NULL if the interface is not (yet) known. */ SCNetworkInterfaceRef -_SCNetworkInterfaceCopyBTPANInterface (void) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_NA); +_SCNetworkInterfaceCopyBTPANInterface (void) API_AVAILABLE(macos(10.9)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function _SCNetworkInterfaceCopySlashDevPath @@ -209,7 +209,7 @@ _SCNetworkInterfaceCopyBTPANInterface (void) __OSX_AVAILABLE_STARTING(__M NULL if no path is available. */ CFStringRef -_SCNetworkInterfaceCopySlashDevPath (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0); +_SCNetworkInterfaceCopySlashDevPath (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.6), ios(3.0)); #define kIncludeNoVirtualInterfaces 0x0 #define kIncludeVLANInterfaces 0x1 @@ -231,7 +231,7 @@ _SCNetworkInterfaceCopySlashDevPath (SCNetworkInterfaceRef interface) __OSX_A SCNetworkInterfaceRef _SCNetworkInterfaceCreateWithBSDName (CFAllocatorRef allocator, CFStringRef bsdName, - UInt32 flags) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + UInt32 flags) API_AVAILABLE(macos(10.5), ios(2.0)); /*! @function _SCNetworkInterfaceCreateWithEntity @@ -245,7 +245,7 @@ _SCNetworkInterfaceCreateWithBSDName (CFAllocatorRef allocator, SCNetworkInterfaceRef _SCNetworkInterfaceCreateWithEntity (CFAllocatorRef allocator, CFDictionaryRef interface_entity, - SCNetworkServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + SCNetworkServiceRef service) API_AVAILABLE(macos(10.5), ios(2.0)); /*! @function _SCNetworkInterfaceCreateWithIONetworkInterfaceObject @@ -256,7 +256,7 @@ _SCNetworkInterfaceCreateWithEntity (CFAllocatorRef allocator, You must release the returned value. */ SCNetworkInterfaceRef -_SCNetworkInterfaceCreateWithIONetworkInterfaceObject (io_object_t if_obj) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +_SCNetworkInterfaceCreateWithIONetworkInterfaceObject (io_object_t if_obj) API_AVAILABLE(macos(10.5), ios(2.0)); /*! @function SCNetworkInterfaceGetPrimaryRank @@ -265,7 +265,7 @@ _SCNetworkInterfaceCreateWithIONetworkInterfaceObject (io_object_t if_obj) __ @result SCNetworkServicePrimaryRank */ SCNetworkServicePrimaryRank -SCNetworkInterfaceGetPrimaryRank (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_5_0); +SCNetworkInterfaceGetPrimaryRank (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.8), ios(5.0)); /*! @function SCNetworkInterfaceSetPrimaryRank @@ -278,7 +278,60 @@ SCNetworkInterfaceGetPrimaryRank (SCNetworkInterfaceRef interface) __OSX_AVAI */ Boolean SCNetworkInterfaceSetPrimaryRank (SCNetworkInterfaceRef interface, - SCNetworkServicePrimaryRank newRank) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_5_0); + SCNetworkServicePrimaryRank newRank) API_AVAILABLE(macos(10.8), ios(5.0)); + +/** + ** SCNetworkInterfaceAdvisory + **/ + +typedef CF_ENUM(uint32_t, SCNetworkInterfaceAdvisory) { + kSCNetworkInterfaceAdvisoryNone = 0, + kSCNetworkInterfaceAdvisoryLinkLayerIssue = 1, + kSCNetworkInterfaceAdvisoryUplinkIssue = 2, +}; + +/*! + @function SCNetworkInterfaceSetAdvisory + @discussion Advise the system of some condition on the network interface + that warrants changing how the interface is used for IP networking, + and to clear a previously set advisory. + Calling this function requires root or having the boolean entitlement + "com.apple.SystemConfiguration.SCNetworkInterfaceSetAdvisory" = true. + @param interface The interface to assert the advisory on. + @param advisory The advisory to indicate on the interface, use + kSCNetworkInterfaceAdvisoryNone to clear advisory. + @param reason A string indicating the reason for setting the advisory, + used to aid debugging. + @result TRUE if the advisory change was successful; FALSE otherwise. +*/ +Boolean +SCNetworkInterfaceSetAdvisory(SCNetworkInterfaceRef interface, + SCNetworkInterfaceAdvisory advisory, + CFStringRef reason) + API_AVAILABLE(macos(10.14), ios(12.0)); + +/*! + @function SCNetworkInterfaceAdvisoryIsSet + @discussion Find out if there is an advisory set on the interface. + @param interface The interface to check for an advisory. + @result TRUE if an advisory is set; FALSE otherwise. +*/ +Boolean +SCNetworkInterfaceAdvisoryIsSet(SCNetworkInterfaceRef interface) + API_AVAILABLE(macos(10.14), ios(12.0)); + +/*! + @function SCNetworkInterfaceCopyAdvisoryNotificationKey + @discussion Get the SCDynamicStore notication key for advisory changes + made on the interface. + @param interface The interface for which to get the notification key. + @result Key used to receive advisory change notifications on the + interface. +*/ +CFStringRef +SCNetworkInterfaceCopyAdvisoryNotificationKey(SCNetworkInterfaceRef interface) + API_AVAILABLE(macos(10.14), ios(12.0)); + #define kSCNetworkInterfaceConfigurationActionKey CFSTR("New Interface Detected Action") #define kSCNetworkInterfaceConfigurationActionValueNone CFSTR("None") @@ -293,6 +346,9 @@ SCNetworkInterfaceSetPrimaryRank (SCNetworkInterfaceRef interface, // IORegistry property to indicate that a [WWAN] interface is not yet ready #define kSCNetworkInterfaceInitializingKey CFSTR("Initializing") +// IORegistry property to indicate that the attached host should be trusted before use +#define kSCNetworkInterfaceTrustRequiredKey CFSTR("TrustRequired") + /*! @function _SCNetworkInterfaceCopyInterfaceInfo @discussion Returns interface details @@ -300,7 +356,7 @@ SCNetworkInterfaceSetPrimaryRank (SCNetworkInterfaceRef interface, @result A dictionary with details about the network interface. */ CFDictionaryRef -_SCNetworkInterfaceCopyInterfaceInfo (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0); +_SCNetworkInterfaceCopyInterfaceInfo (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.6), ios(3.0)); /*! @function _SCNetworkInterfaceGetConfigurationAction @@ -310,7 +366,7 @@ _SCNetworkInterfaceCopyInterfaceInfo (SCNetworkInterfaceRef interface) __OSX_ NULL if the default action should be used. */ CFStringRef -_SCNetworkInterfaceGetConfigurationAction (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0); +_SCNetworkInterfaceGetConfigurationAction (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.6), ios(2.0)); /*! @function _SCNetworkInterfaceGetFamilyType @@ -320,7 +376,7 @@ _SCNetworkInterfaceGetConfigurationAction (SCNetworkInterfaceRef interface) __ NULL if no family type is available. */ CFNumberRef -_SCNetworkInterfaceGetFamilyType (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_12,__IPHONE_10_0); +_SCNetworkInterfaceGetFamilyType (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.12), ios(10.0)); /*! @function _SCNetworkInterfaceGetFamilySubType @@ -330,7 +386,7 @@ _SCNetworkInterfaceGetFamilyType (SCNetworkInterfaceRef interface) __OSX_AVAI NULL if no family subtype is available. */ CFNumberRef -_SCNetworkInterfaceGetFamilySubType (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_12,__IPHONE_10_0); +_SCNetworkInterfaceGetFamilySubType (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.12), ios(10.0)); /*! @function _SCNetworkInterfaceGetHardwareAddress @@ -340,7 +396,7 @@ _SCNetworkInterfaceGetFamilySubType (SCNetworkInterfaceRef interface) __OSX_A NULL if no hardware address is available. */ CFDataRef -_SCNetworkInterfaceGetHardwareAddress (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +_SCNetworkInterfaceGetHardwareAddress (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.5), ios(2.0)); /*! @function _SCNetworkInterfaceGetIOInterfaceNamePrefix @@ -350,7 +406,7 @@ _SCNetworkInterfaceGetHardwareAddress (SCNetworkInterfaceRef interface) __OSX NULL if no IOInterfaceNamePrefix is available. */ CFStringRef -_SCNetworkInterfaceGetIOInterfaceNamePrefix (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0); +_SCNetworkInterfaceGetIOInterfaceNamePrefix (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.8), ios(6.0)); /*! @function _SCNetworkInterfaceGetIOInterfaceType @@ -359,7 +415,7 @@ _SCNetworkInterfaceGetIOInterfaceNamePrefix (SCNetworkInterfaceRef interface) @result The IOInterfaceType associated with the interface */ CFNumberRef -_SCNetworkInterfaceGetIOInterfaceType (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +_SCNetworkInterfaceGetIOInterfaceType (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.5), ios(2.0)); /*! @function _SCNetworkInterfaceGetIOInterfaceUnit @@ -369,7 +425,7 @@ _SCNetworkInterfaceGetIOInterfaceType (SCNetworkInterfaceRef interface) __OSX NULL if no IOInterfaceUnit is available. */ CFNumberRef -_SCNetworkInterfaceGetIOInterfaceUnit (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +_SCNetworkInterfaceGetIOInterfaceUnit (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.5), ios(2.0)); /*! @function _SCNetworkInterfaceGetIOPath @@ -379,7 +435,7 @@ _SCNetworkInterfaceGetIOInterfaceUnit (SCNetworkInterfaceRef interface) __OSX NULL if no IOPath is available. */ CFStringRef -_SCNetworkInterfaceGetIOPath (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +_SCNetworkInterfaceGetIOPath (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.5), ios(2.0)); /*! @function _SCNetworkInterfaceGetIORegistryEntryID @@ -389,7 +445,7 @@ _SCNetworkInterfaceGetIOPath (SCNetworkInterfaceRef interface) __OSX_AVAILAB Zero if no entry ID is available. */ uint64_t -_SCNetworkInterfaceGetIORegistryEntryID (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_5_0); +_SCNetworkInterfaceGetIORegistryEntryID (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.8), ios(5.0)); /*! @function _SCNetworkInterfaceIsApplePreconfigured @@ -398,7 +454,7 @@ _SCNetworkInterfaceGetIORegistryEntryID (SCNetworkInterfaceRef interface) __O @result TRUE if the interface is an internal/pre-configured. */ Boolean -_SCNetworkInterfaceIsApplePreconfigured (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_12,__IPHONE_10_0); +_SCNetworkInterfaceIsApplePreconfigured (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.12), ios(10.0)); /*! @function _SCNetworkInterfaceIsBluetoothPAN @@ -407,7 +463,7 @@ _SCNetworkInterfaceIsApplePreconfigured (SCNetworkInterfaceRef interface) __O @result TRUE if the interface is a Bluetooth PAN device. */ Boolean -_SCNetworkInterfaceIsBluetoothPAN (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0); +_SCNetworkInterfaceIsBluetoothPAN (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.6), ios(3.0)); /*! @function _SCNetworkInterfaceIsBluetoothPAN_NAP @@ -416,7 +472,7 @@ _SCNetworkInterfaceIsBluetoothPAN (SCNetworkInterfaceRef interface) __OSX_AVA @result TRUE if the interface is a Bluetooth PAN-NAP device. */ Boolean -_SCNetworkInterfaceIsBluetoothPAN_NAP (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0); +_SCNetworkInterfaceIsBluetoothPAN_NAP (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.7), ios(5.0)); /*! @function _SCNetworkInterfaceIsBluetoothP2P @@ -425,7 +481,7 @@ _SCNetworkInterfaceIsBluetoothPAN_NAP (SCNetworkInterfaceRef interface) __OSX @result TRUE if the interface is a Bluetooth P2P device. */ Boolean -_SCNetworkInterfaceIsBluetoothP2P (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0); +_SCNetworkInterfaceIsBluetoothP2P (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.7), ios(5.0)); /*! @function _SCNetworkInterfaceIsBuiltin @@ -434,7 +490,7 @@ _SCNetworkInterfaceIsBluetoothP2P (SCNetworkInterfaceRef interface) __OSX_AVA @result TRUE if the interface is "built-in". */ Boolean -_SCNetworkInterfaceIsBuiltin (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +_SCNetworkInterfaceIsBuiltin (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.5), ios(2.0)); /*! @function _SCNetworkInterfaceIsHiddenConfiguration @@ -444,7 +500,7 @@ _SCNetworkInterfaceIsBuiltin (SCNetworkInterfaceRef interface) __OSX_AVAILAB @result TRUE if the interface configuration should be hidden. */ Boolean -_SCNetworkInterfaceIsHiddenConfiguration (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0); +_SCNetworkInterfaceIsHiddenConfiguration (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.7), ios(4.0)); /*! @function _SCNetworkInterfaceIsTethered @@ -453,7 +509,7 @@ _SCNetworkInterfaceIsHiddenConfiguration (SCNetworkInterfaceRef interface) __O @result TRUE if the interface is a tethered device. */ Boolean -_SCNetworkInterfaceIsTethered (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0); +_SCNetworkInterfaceIsTethered (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.6), ios(3.0)); /*! @function _SCNetworkInterfaceIsThunderbolt @@ -462,7 +518,17 @@ _SCNetworkInterfaceIsTethered (SCNetworkInterfaceRef interface) __OSX_AVAILA @result TRUE if the interface is a Thunderbolt device. */ Boolean -_SCNetworkInterfaceIsThunderbolt (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); +_SCNetworkInterfaceIsThunderbolt (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.9), ios(7.0)); + +/*! + @function _SCNetworkInterfaceIsTrustRequired + @discussion Identifies if a network interface requires that the + associated host be trusted. + @param interface The network interface. + @result TRUE if the interface requires trust. + */ +Boolean +_SCNetworkInterfaceIsTrustRequired (SCNetworkInterfaceRef interface) SPI_AVAILABLE(macos(10.14)) API_AVAILABLE(ios(12.0)); /*! @function _SCNetworkInterfaceIsPhysicalEthernet @@ -471,7 +537,7 @@ _SCNetworkInterfaceIsThunderbolt (SCNetworkInterfaceRef interface) __OSX_AVAI @result TRUE if the interface is a real ethernet interface. */ Boolean -_SCNetworkInterfaceIsPhysicalEthernet (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0); +_SCNetworkInterfaceIsPhysicalEthernet (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.7), ios(5.0)); /*! @function _SCNetworkInterfaceForceConfigurationRefresh @@ -481,7 +547,7 @@ _SCNetworkInterfaceIsPhysicalEthernet (SCNetworkInterfaceRef interface) __OSX @result TRUE if the refresh was successfully posted. */ Boolean -_SCNetworkInterfaceForceConfigurationRefresh (CFStringRef ifName) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +_SCNetworkInterfaceForceConfigurationRefresh (CFStringRef ifName) API_AVAILABLE(macos(10.5), ios(2.0)); /*! @function SCNetworkInterfaceCopyCapability @@ -499,7 +565,7 @@ _SCNetworkInterfaceForceConfigurationRefresh (CFStringRef ifName) __OSX_AVAI */ CFTypeRef SCNetworkInterfaceCopyCapability (SCNetworkInterfaceRef interface, - CFStringRef capability) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); + CFStringRef capability) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkInterfaceSetCapability @@ -514,7 +580,22 @@ SCNetworkInterfaceCopyCapability (SCNetworkInterfaceRef interface, Boolean SCNetworkInterfaceSetCapability (SCNetworkInterfaceRef interface, CFStringRef capability, - CFTypeRef newValue) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); + CFTypeRef newValue) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); + +Boolean +__SCNetworkInterfaceSetDisableUntilNeededValue (SCNetworkInterfaceRef interface, + CFTypeRef disable) API_AVAILABLE(macos(10.11)) SPI_AVAILABLE(ios(9.0), tvos(9.0), watchos(2.0), bridgeos(2.0)); + + +int +__SCNetworkInterfaceCreateCapabilities (SCNetworkInterfaceRef interface, + int capability_base, + CFDictionaryRef capability_options) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); + +int +__SCNetworkInterfaceCreateMediaOptions (SCNetworkInterfaceRef interface, + CFDictionaryRef media_options) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); + #pragma mark - #pragma mark SCBondInterface configuration (SPIs) @@ -526,7 +607,7 @@ SCNetworkInterfaceSetCapability (SCNetworkInterfaceRef interface, You must release the returned value. */ CFArrayRef -_SCBondInterfaceCopyActive (void) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +_SCBondInterfaceCopyActive (void) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function _SCBondInterfaceUpdateConfiguration @@ -536,7 +617,7 @@ _SCBondInterfaceCopyActive (void) __OSX_AVAILABLE_STARTING(__MAC_10_5,__ an error was encountered. */ Boolean -_SCBondInterfaceUpdateConfiguration (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +_SCBondInterfaceUpdateConfiguration (SCPreferencesRef prefs) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCBondInterfaceGetMode @@ -545,7 +626,7 @@ _SCBondInterfaceUpdateConfiguration (SCPreferencesRef prefs) __OSX_AVAILABLE @result A CFNumberRef containing the mode (IF_BOND_MODE_{LACP,STATIC}). */ CFNumberRef -SCBondInterfaceGetMode (SCBondInterfaceRef bond) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +SCBondInterfaceGetMode (SCBondInterfaceRef bond) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); /*! @function SCBondInterfaceSetMode @@ -556,7 +637,7 @@ SCBondInterfaceGetMode (SCBondInterfaceRef bond) __OSX_AVAILABLE_STARTING( */ Boolean SCBondInterfaceSetMode (SCBondInterfaceRef bond, - CFNumberRef mode) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); + CFNumberRef mode) API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #pragma mark - #pragma mark SCBridgeInterface configuration (SPIs) @@ -569,7 +650,7 @@ SCBondInterfaceSetMode (SCBondInterfaceRef bond, You must release the returned value. */ CFArrayRef /* of SCBridgeInterfaceRef's */ -SCBridgeInterfaceCopyAll (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +SCBridgeInterfaceCopyAll (SCPreferencesRef prefs) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCBridgeInterfaceCopyAvailableMemberInterfaces @@ -580,7 +661,7 @@ SCBridgeInterfaceCopyAll (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING( You must release the returned value. */ CFArrayRef /* of SCNetworkInterfaceRef's */ -SCBridgeInterfaceCopyAvailableMemberInterfaces (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +SCBridgeInterfaceCopyAvailableMemberInterfaces (SCPreferencesRef prefs) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCBridgeInterfaceCreate @@ -590,7 +671,7 @@ SCBridgeInterfaceCopyAvailableMemberInterfaces (SCPreferencesRef prefs) __OSX You must release the returned value. */ SCBridgeInterfaceRef -SCBridgeInterfaceCreate (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +SCBridgeInterfaceCreate (SCPreferencesRef prefs) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCBridgeInterfaceRemove @@ -599,7 +680,7 @@ SCBridgeInterfaceCreate (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING( @result TRUE if the interface was removed; FALSE if an error was encountered. */ Boolean -SCBridgeInterfaceRemove (SCBridgeInterfaceRef bridge) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +SCBridgeInterfaceRemove (SCBridgeInterfaceRef bridge) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCBridgeInterfaceGetMemberInterfaces @@ -608,7 +689,7 @@ SCBridgeInterfaceRemove (SCBridgeInterfaceRef bridge) __OSX_AVAILABLE_STAR @result The list of interfaces. */ CFArrayRef /* of SCNetworkInterfaceRef's */ -SCBridgeInterfaceGetMemberInterfaces (SCBridgeInterfaceRef bridge) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +SCBridgeInterfaceGetMemberInterfaces (SCBridgeInterfaceRef bridge) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCBridgeInterfaceGetOptions @@ -618,7 +699,7 @@ SCBridgeInterfaceGetMemberInterfaces (SCBridgeInterfaceRef bridge) __OSX_AVA NULL if no changes to the default configuration have been saved. */ CFDictionaryRef -SCBridgeInterfaceGetOptions (SCBridgeInterfaceRef bridge) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +SCBridgeInterfaceGetOptions (SCBridgeInterfaceRef bridge) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCBridgeInterfaceSetMemberInterfaces @@ -630,7 +711,7 @@ SCBridgeInterfaceGetOptions (SCBridgeInterfaceRef bridge) __OSX_AVAILABLE_S Boolean SCBridgeInterfaceSetMemberInterfaces (SCBridgeInterfaceRef bridge, CFArrayRef members) /* of SCNetworkInterfaceRef's */ - __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); + API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCBridgeInterfaceSetLocalizedDisplayName @@ -641,7 +722,7 @@ SCBridgeInterfaceSetMemberInterfaces (SCBridgeInterfaceRef bridge, */ Boolean SCBridgeInterfaceSetLocalizedDisplayName (SCBridgeInterfaceRef bridge, - CFStringRef newName) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); + CFStringRef newName) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCBridgeInterfaceSetOptions @@ -652,7 +733,7 @@ SCBridgeInterfaceSetLocalizedDisplayName (SCBridgeInterfaceRef bridge, */ Boolean SCBridgeInterfaceSetOptions (SCBridgeInterfaceRef bridge, - CFDictionaryRef newOptions) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); + CFDictionaryRef newOptions) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #pragma mark - @@ -663,7 +744,7 @@ SCBridgeInterfaceSetOptions (SCBridgeInterfaceRef bridge, You must release the returned value. */ CFArrayRef -_SCBridgeInterfaceCopyActive (void) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +_SCBridgeInterfaceCopyActive (void) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function _SCBridgeInterfaceUpdateConfiguration @@ -673,7 +754,7 @@ _SCBridgeInterfaceCopyActive (void) __OSX_AVAILABLE_STARTING(__MAC_10_7, an error was encountered. */ Boolean -_SCBridgeInterfaceUpdateConfiguration (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +_SCBridgeInterfaceUpdateConfiguration (SCPreferencesRef prefs) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #pragma mark - @@ -686,7 +767,7 @@ _SCBridgeInterfaceUpdateConfiguration (SCPreferencesRef prefs) __OSX_AVAILAB You must release the returned value. */ CFArrayRef -_SCVLANInterfaceCopyActive (void) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +_SCVLANInterfaceCopyActive (void) API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function _SCVLANInterfaceUpdateConfiguration @@ -696,7 +777,7 @@ _SCVLANInterfaceCopyActive (void) __OSX_AVAILABLE_STARTING(__MAC_10_5,__ an error was encountered. */ Boolean -_SCVLANInterfaceUpdateConfiguration (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0/*SPI*/); +_SCVLANInterfaceUpdateConfiguration (SCPreferencesRef prefs) API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #pragma mark - @@ -714,37 +795,37 @@ typedef uint32_t SCNetworkInterfacePasswordType; Boolean SCNetworkInterfaceCheckPassword (SCNetworkInterfaceRef interface, - SCNetworkInterfacePasswordType passwordType) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + SCNetworkInterfacePasswordType passwordType) API_AVAILABLE(macos(10.5), ios(2.0)); CFDataRef SCNetworkInterfaceCopyPassword (SCNetworkInterfaceRef interface, - SCNetworkInterfacePasswordType passwordType) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + SCNetworkInterfacePasswordType passwordType) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean SCNetworkInterfaceRemovePassword (SCNetworkInterfaceRef interface, - SCNetworkInterfacePasswordType passwordType) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + SCNetworkInterfacePasswordType passwordType) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean SCNetworkInterfaceSetPassword (SCNetworkInterfaceRef interface, SCNetworkInterfacePasswordType passwordType, CFDataRef password, - CFDictionaryRef options) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + CFDictionaryRef options) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean -SCNetworkInterfaceGetDisableUntilNeeded (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_11,__IPHONE_9_0); +SCNetworkInterfaceGetDisableUntilNeeded (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.11), ios(9.0)); Boolean SCNetworkInterfaceSetDisableUntilNeeded (SCNetworkInterfaceRef interface, - Boolean disable) __OSX_AVAILABLE_STARTING(__MAC_10_11,__IPHONE_9_0); + Boolean disable) API_AVAILABLE(macos(10.11), ios(9.0)); CFDictionaryRef -SCNetworkInterfaceGetQoSMarkingPolicy (SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_10_0); +SCNetworkInterfaceGetQoSMarkingPolicy (SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.13), ios(10.0)); Boolean SCNetworkInterfaceSetQoSMarkingPolicy (SCNetworkInterfaceRef interface, - CFDictionaryRef policy) __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_10_0); + CFDictionaryRef policy) API_AVAILABLE(macos(10.13), ios(10.0)); #pragma mark - @@ -773,7 +854,7 @@ isA_SCNetworkProtocol(CFTypeRef obj) CFComparisonResult _SCNetworkProtocolCompare (const void *val1, const void *val2, - void *context) __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0); + void *context) API_AVAILABLE(macos(10.13), ios(11.0)); #pragma mark - @@ -802,7 +883,7 @@ isA_SCNetworkService(CFTypeRef obj) CFComparisonResult _SCNetworkServiceCompare (const void *val1, const void *val2, - void *context) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0); + void *context) API_AVAILABLE(macos(10.7), ios(4.0)); /*! @function _SCNetworkServiceCopyActive @@ -821,7 +902,7 @@ _SCNetworkServiceCompare (const void *val1, */ SCNetworkServiceRef _SCNetworkServiceCopyActive (SCDynamicStoreRef store, - CFStringRef serviceID) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_1); + CFStringRef serviceID) API_AVAILABLE(macos(10.6), ios(2.1)); /*! @function SCNetworkServiceGetPrimaryRank @@ -832,7 +913,7 @@ _SCNetworkServiceCopyActive (SCDynamicStoreRef store, application or an error was encountered. */ SCNetworkServicePrimaryRank -SCNetworkServiceGetPrimaryRank (SCNetworkServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0); +SCNetworkServiceGetPrimaryRank (SCNetworkServiceRef service) API_AVAILABLE(macos(10.6), ios(2.0)); /*! @function SCNetworkServiceSetPrimaryRank @@ -847,7 +928,7 @@ SCNetworkServiceGetPrimaryRank (SCNetworkServiceRef service) __OSX_AVAILABLE */ Boolean SCNetworkServiceSetPrimaryRank (SCNetworkServiceRef service, - SCNetworkServicePrimaryRank newRank) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0); + SCNetworkServicePrimaryRank newRank) API_AVAILABLE(macos(10.6), ios(2.0)); /*! @function _SCNetworkServiceIsVPN @@ -856,7 +937,7 @@ SCNetworkServiceSetPrimaryRank (SCNetworkServiceRef service, @result TRUE if the service is a VPN. */ Boolean -_SCNetworkServiceIsVPN (SCNetworkServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0); +_SCNetworkServiceIsVPN (SCNetworkServiceRef service) API_AVAILABLE(macos(10.7), ios(4.0)); /*! @function SCNetworkServiceSetExternalID @@ -891,7 +972,7 @@ SCNetworkServiceCopyExternalID (SCNetworkServiceRef service, */ Boolean _SCNetworkServiceSetServiceID (SCNetworkServiceRef service, - CFStringRef newServiceID) __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0); + CFStringRef newServiceID) API_AVAILABLE(macos(10.10), ios(8.0)); #pragma mark - #pragma mark SCNetworkSet configuration (SPI) @@ -920,7 +1001,7 @@ isA_SCNetworkSet(CFTypeRef obj) CFComparisonResult _SCNetworkSetCompare (const void *val1, const void *val2, - void *context) __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0); + void *context) API_AVAILABLE(macos(10.13), ios(11.0)); /*! @function SCNetworkSetCopyAvailableInterfaces @@ -931,7 +1012,7 @@ _SCNetworkSetCompare (const void *val1, You must release the returned value. */ CFArrayRef -SCNetworkSetCopyAvailableInterfaces (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +SCNetworkSetCopyAvailableInterfaces (SCNetworkSetRef set) API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function _SCNetworkSetCreateDefault @@ -941,7 +1022,7 @@ SCNetworkSetCopyAvailableInterfaces (SCNetworkSetRef set) __OSX_AVAILABLE_ST You must release the returned value. */ SCNetworkSetRef -_SCNetworkSetCreateDefault (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_12,__IPHONE_10_0/*SPI*/); +_SCNetworkSetCreateDefault (SCPreferencesRef prefs) API_AVAILABLE(macos(10.12)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(3.0)); /*! @function SCNetworkSetEstablishDefaultConfiguration @@ -960,7 +1041,7 @@ _SCNetworkSetCreateDefault (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTIN changes were required or if an error was encountered. */ Boolean -SCNetworkSetEstablishDefaultConfiguration (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +SCNetworkSetEstablishDefaultConfiguration (SCNetworkSetRef set) API_AVAILABLE(macos(10.5), ios(2.0)); /*! @function SCNetworkSetEstablishDefaultInterfaceConfiguration @@ -981,7 +1062,7 @@ SCNetworkSetEstablishDefaultConfiguration (SCNetworkSetRef set) __OSX_AVAILAB */ Boolean SCNetworkSetEstablishDefaultInterfaceConfiguration (SCNetworkSetRef set, - SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.5), ios(2.0)); /*! @function SCNetworkSetCopySelectedVPNService @@ -994,7 +1075,7 @@ SCNetworkSetEstablishDefaultInterfaceConfiguration (SCNetworkSetRef set, You must release the returned value. */ SCNetworkServiceRef -SCNetworkSetCopySelectedVPNService (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0); +SCNetworkSetCopySelectedVPNService (SCNetworkSetRef set) API_AVAILABLE(macos(10.7), ios(4.0)); /*! @function SCNetworkSetSetSelectedVPNService @@ -1007,11 +1088,11 @@ SCNetworkSetCopySelectedVPNService (SCNetworkSetRef set) __OSX_AVAILABLE_STA */ Boolean SCNetworkSetSetSelectedVPNService (SCNetworkSetRef set, - SCNetworkServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0); + SCNetworkServiceRef service) API_AVAILABLE(macos(10.7), ios(4.0)); Boolean _SCNetworkSetSetSetID (SCNetworkSetRef set, - CFStringRef setID) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); + CFStringRef setID) API_AVAILABLE(macos(10.10), ios(8.0)); /*! @group VPN Service configuration @@ -1033,7 +1114,7 @@ typedef SCNetworkServiceRef VPNServiceRef; CFArrayRef VPNServiceCopyAllMatchingExternalID (SCPreferencesRef prefs, CFStringRef identifierDomain, - CFStringRef identifier) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); + CFStringRef identifier) API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function VPNServiceCopyAll @@ -1042,7 +1123,7 @@ VPNServiceCopyAllMatchingExternalID (SCPreferencesRef prefs, @result An array containing VPNServiceRefs for all the VPN services. */ CFArrayRef -VPNServiceCopyAll (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +VPNServiceCopyAll (SCPreferencesRef prefs) API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function VPNServiceCopyAppRuleIDs @@ -1051,7 +1132,7 @@ VPNServiceCopyAll (SCPreferencesRef prefs) __OSX_AVAILABLE_STARTING(__MAC_10 @result An array of CFStringRefs, each string containing the identifier of a app rule in the given service. */ CFArrayRef -VPNServiceCopyAppRuleIDs (VPNServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +VPNServiceCopyAppRuleIDs (VPNServiceRef service) API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function VPNServiceSetAppRule @@ -1069,7 +1150,7 @@ VPNServiceCopyAppRuleIDs (VPNServiceRef service) __OSX_AVAILABLE_STARTING(__ Boolean VPNServiceSetAppRule (VPNServiceRef service, CFStringRef ruleIdentifier, - CFDictionaryRef ruleSettings) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); + CFDictionaryRef ruleSettings) API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function VPNServiceCopyAppRule @@ -1080,7 +1161,7 @@ VPNServiceSetAppRule (VPNServiceRef service, */ CFDictionaryRef VPNServiceCopyAppRule (VPNServiceRef service, - CFStringRef ruleIdentifier) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); + CFStringRef ruleIdentifier) API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function VPNServiceRemoveAppRule @@ -1091,7 +1172,7 @@ VPNServiceCopyAppRule (VPNServiceRef service, */ Boolean VPNServiceRemoveAppRule (VPNServiceRef service, - CFStringRef ruleIdentifier) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); + CFStringRef ruleIdentifier) API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function VPNServiceIsManagedAppVPN @@ -1100,7 +1181,7 @@ VPNServiceRemoveAppRule (VPNServiceRef service, @result Returns TRUE if the service is a managed App VPN service; FALSE otherwise. */ Boolean -VPNServiceIsManagedAppVPN (VPNServiceRef service) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +VPNServiceIsManagedAppVPN (VPNServiceRef service) API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @group Migration SPI @@ -1108,9 +1189,9 @@ VPNServiceIsManagedAppVPN (VPNServiceRef service) __OSX_AVAILABLE_STARTING(_ #pragma mark - #pragma mark Migration SPI -extern const CFStringRef kSCNetworkConfigurationRepair /* CFBoolean */ __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); +extern const CFStringRef kSCNetworkConfigurationRepair /* CFBoolean */ API_AVAILABLE(macos(10.10), ios(8.0)); -extern const CFStringRef kSCNetworkConfigurationMigrationActionKey /* CFNumber */ __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0); +extern const CFStringRef kSCNetworkConfigurationMigrationActionKey /* CFNumber */ API_AVAILABLE(macos(10.10), ios(8.0)); typedef CF_ENUM(uint32_t, SCNetworkConfigurationMigrationAction) { kSCNetworkConfigurationMigrationAction_CleanInstall = 0, @@ -1123,7 +1204,7 @@ typedef CF_ENUM(uint32_t, SCNetworkConfigurationMigrationAction) { @result Returns an array of paths that we would need from the source */ CFArrayRef -_SCNetworkConfigurationCopyMigrationPaths(CFDictionaryRef options) __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0); +_SCNetworkConfigurationCopyMigrationPaths(CFDictionaryRef options) API_AVAILABLE(macos(10.10), ios(8.0)); /*! @function _SCNetworkConfigurationPerformMigration @@ -1150,7 +1231,7 @@ CFArrayRef _SCNetworkConfigurationPerformMigration (CFURLRef sourceDir, CFURLRef currentDir, CFURLRef targetDir, - CFDictionaryRef options) __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0); + CFDictionaryRef options) API_AVAILABLE(macos(10.10), ios(8.0)); /*! @@ -1165,7 +1246,7 @@ _SCNetworkConfigurationPerformMigration (CFURLRef sourceDir, Boolean _SCNetworkConfigurationCheckValidity (CFURLRef configDir, - CFDictionaryRef options) __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0); + CFDictionaryRef options) API_AVAILABLE(macos(10.10), ios(8.0)); /*! @@ -1181,7 +1262,7 @@ Boolean _SCNetworkConfigurationCheckValidityWithPreferences (SCPreferencesRef prefs, SCPreferencesRef ni_prefs, - CFDictionaryRef options) __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_9_0); + CFDictionaryRef options) API_AVAILABLE(macos(10.11), ios(9.0)); /*! @@ -1200,7 +1281,7 @@ _SCNetworkConfigurationCheckValidityWithPreferences Boolean _SCNetworkMigrationAreConfigurationsIdentical (CFURLRef configurationURL, - CFURLRef expectedConfigurationURL) __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0); + CFURLRef expectedConfigurationURL) API_AVAILABLE(macos(10.10), ios(8.0)); /*! @function _SCNetworkConfigurationCopyMigrationRemovePaths @@ -1213,7 +1294,8 @@ _SCNetworkMigrationAreConfigurationsIdentical (CFURLRef configurationURL, CFArrayRef // of CFURLRef's _SCNetworkConfigurationCopyMigrationRemovePaths (CFArrayRef targetPaths, - CFURLRef targetDir) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); + CFURLRef targetDir) API_AVAILABLE(macos(10.10), ios(8.0)); __END_DECLS + #endif /* _SCNETWORKCONFIGURATIONPRIVATE_H */ diff --git a/SystemConfiguration.fproj/SCNetworkConnection.c b/SystemConfiguration.fproj/SCNetworkConnection.c index c34e3c4..00f9d4f 100644 --- a/SystemConfiguration.fproj/SCNetworkConnection.c +++ b/SystemConfiguration.fproj/SCNetworkConnection.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2017 Apple Inc. All rights reserved. + * Copyright (c) 2003-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -35,7 +35,7 @@ //#define DEBUG_MACH_PORT_ALLOCATIONS -#include +#include #include #include #include @@ -137,15 +137,15 @@ typedef struct { /* Flow Divert support info */ CFDictionaryRef flow_divert_token_params; -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR /* NetworkExtension data structures */ ne_session_t ne_session; -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ } SCNetworkConnectionPrivate, *SCNetworkConnectionPrivateRef; __private_extern__ os_log_t -__log_SCNetworkConnection() +__log_SCNetworkConnection(void) { static os_log_t log = NULL; @@ -164,8 +164,8 @@ isA_SCNetworkConnection(CFTypeRef obj) } -#if !TARGET_OS_SIMULATOR -Boolean +#if !TARGET_OS_SIMULATOR +static Boolean __SCNetworkConnectionUseNetworkExtension(SCNetworkConnectionPrivateRef connectionPrivate) { Boolean result = FALSE; @@ -213,18 +213,18 @@ __SCNetworkConnectionUseNetworkExtension(SCNetworkConnectionPrivateRef connectio return result; } -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ -Boolean +static Boolean __SCNetworkConnectionUsingNetworkExtension(SCNetworkConnectionPrivateRef connectionPrivate) { -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR return (connectionPrivate->ne_session != NULL); #else #pragma unused(connectionPrivate) return FALSE; -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ } @@ -320,12 +320,12 @@ __SCNetworkConnectionDeallocate(CFTypeRef cf) CFRelease(connectionPrivate->flow_divert_token_params); } -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR if (connectionPrivate->ne_session != NULL) { ne_session_set_event_handler(connectionPrivate->ne_session, NULL, NULL); ne_session_release(connectionPrivate->ne_session); } -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ return; } @@ -502,7 +502,7 @@ __SCNetworkConnectionCallBack(void *connection) context_release = NULL; } -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { pthread_mutex_unlock(&connectionPrivate->lock); @@ -511,7 +511,7 @@ __SCNetworkConnectionCallBack(void *connection) CFRelease(connection); /* This releases the reference that we took in the NESessionEventStatusChanged event handler */ return; } -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ // Do we need to spin a new thread? (either we are running on the main // dispatch queue or main runloop) @@ -644,7 +644,7 @@ __SCNetworkConnectionCreatePrivate(CFAllocatorRef allocator, } connectionPrivate->type = kSCNetworkConnectionTypeUnknown; -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR if (__SCNetworkConnectionUseNetworkExtension(connectionPrivate)) { CFStringRef serviceID = SCNetworkServiceGetServiceID(connectionPrivate->service); if (serviceID != NULL) { @@ -664,7 +664,7 @@ __SCNetworkConnectionCreatePrivate(CFAllocatorRef allocator, goto fail; } } -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ /* success, return the connection reference */ return connectionPrivate; @@ -1444,7 +1444,7 @@ SCNetworkConnectionCopyStatistics(SCNetworkConnectionRef connection) pthread_mutex_lock(&connectionPrivate->lock); -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { __block xpc_object_t xstats = NULL; ne_session_t ne_session = connectionPrivate->ne_session; @@ -1472,7 +1472,7 @@ SCNetworkConnectionCopyStatistics(SCNetworkConnectionRef connection) return statistics; } -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ retry : @@ -1557,7 +1557,7 @@ SCNetworkConnectionGetStatus(SCNetworkConnectionRef connection) pthread_mutex_lock(&connectionPrivate->lock); -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { __block ne_session_status_t ne_status; ne_session_t ne_session = connectionPrivate->ne_session; @@ -1576,7 +1576,7 @@ SCNetworkConnectionGetStatus(SCNetworkConnectionRef connection) return SCNetworkConnectionGetStatusFromNEStatus(ne_status); } -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ retry : @@ -1648,7 +1648,7 @@ SCNetworkConnectionCopyExtendedStatus(SCNetworkConnectionRef connection) pthread_mutex_lock(&connectionPrivate->lock); -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { __block CFDictionaryRef statusDictionary = NULL; ne_session_t ne_session = connectionPrivate->ne_session; @@ -1848,7 +1848,7 @@ SCNetworkConnectionStart(SCNetworkConnectionRef connection, connectionPrivate->flow_divert_token_params = NULL; } -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { xpc_object_t xuser_options = NULL; @@ -1857,7 +1857,7 @@ SCNetworkConnectionStart(SCNetworkConnectionRef connection, } if (connectionPrivate->client_bootstrap_port != MACH_PORT_NULL) { -#if NE_SESSION_VERSION > 2 +#if NE_SESSION_VERSION > 2 ne_session_start_on_behalf_of(connectionPrivate->ne_session, xuser_options, connectionPrivate->client_bootstrap_port, @@ -1887,7 +1887,7 @@ SCNetworkConnectionStart(SCNetworkConnectionRef connection, ok = TRUE; goto done; } -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ if (userOptions && !_SCSerialize(userOptions, &dataref, &data, &datalen)) { goto done; @@ -1954,7 +1954,7 @@ SCNetworkConnectionStop(SCNetworkConnectionRef connection, pthread_mutex_lock(&connectionPrivate->lock); -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { ne_session_stop(connectionPrivate->ne_session); /* make sure the xpc_message goes through */ @@ -1962,7 +1962,7 @@ SCNetworkConnectionStop(SCNetworkConnectionRef connection, ok = TRUE; goto done; } -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ retry : @@ -2018,13 +2018,13 @@ SCNetworkConnectionSuspend(SCNetworkConnectionRef connection) pthread_mutex_lock(&connectionPrivate->lock); -#if !!TARGET_OS_SIMULATOR +#if !!TARGET_OS_SIMULATOR if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { /* Suspend only applies to PPPSerial and PPPoE */ ok = TRUE; goto done; } -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ retry : @@ -2080,13 +2080,13 @@ SCNetworkConnectionResume(SCNetworkConnectionRef connection) pthread_mutex_lock(&connectionPrivate->lock); -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { /* Resume only applies to PPPSerial and PPPoE */ ok = TRUE; goto done; } -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ retry : @@ -2215,7 +2215,7 @@ SCNetworkConnectionCopyUserOptions(SCNetworkConnectionRef connection) pthread_mutex_lock(&connectionPrivate->lock); -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { __block xpc_object_t config = NULL; ne_session_t ne_session = connectionPrivate->ne_session; @@ -2243,7 +2243,7 @@ SCNetworkConnectionCopyUserOptions(SCNetworkConnectionRef connection) } return userOptions; } -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ retry : @@ -2462,7 +2462,7 @@ __SCNetworkConnectionScheduleWithRunLoop(SCNetworkConnectionRef connection, _SC_schedule(connection, runLoop, runLoopMode, connectionPrivate->rlList); } -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { CFRetain(connection); ne_session_set_event_handler(connectionPrivate->ne_session, __SCNetworkConnectionQueue(), ^(ne_session_event_t event, void *event_data) { @@ -2484,7 +2484,7 @@ __SCNetworkConnectionScheduleWithRunLoop(SCNetworkConnectionRef connection, } }); } -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ ok = TRUE; @@ -2575,9 +2575,9 @@ __SCNetworkConnectionUnscheduleFromRunLoop(SCNetworkConnectionRef connection, connectionPrivate->scheduled = FALSE; if (__SCNetworkConnectionUsingNetworkExtension(connectionPrivate)) { -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR ne_session_cancel(connectionPrivate->ne_session); -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ } else { mach_port_t session_port = __SCNetworkConnectionSessionPort(connectionPrivate); if (session_port == MACH_PORT_NULL) { @@ -2703,7 +2703,7 @@ SCNetworkConnectionTriggerOnDemandIfNeeded (CFStringRef hostName, int timeout, int trafficClass) { -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR __block Boolean triggeredOnDemand = FALSE; struct proc_uniqidentifierinfo procu; void *policy_match = NULL; @@ -2955,7 +2955,7 @@ SCNetworkConnectionGetServiceIdentifier (SCNetworkConnectionRef connection) } -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR SCNetworkConnectionStatus SCNetworkConnectionGetStatusFromNEStatus(ne_session_status_t status) { @@ -2975,7 +2975,7 @@ SCNetworkConnectionGetStatusFromNEStatus(ne_session_status_t status) return kSCNetworkConnectionInvalid; } -#endif /* !TARGET_OS_SIMULATOR */ +#endif /* !TARGET_OS_SIMULATOR */ #pragma mark - @@ -4055,7 +4055,7 @@ SCNetworkConnectionOnDemandShouldRetryOnFailure (SCNetworkConnectionRef connecti // Mask is optional in routes dictionary; if not present, whole addresses are matched -Boolean +static Boolean __SCNetworkConnectionIPv4AddressMatchesRoutes (struct sockaddr_in *addr_in, CFDictionaryRef routes) { CFIndex count; @@ -4104,7 +4104,7 @@ __SCNetworkConnectionIPv4AddressMatchesRoutes (struct sockaddr_in *addr_in, CFDi } -void +static void __SCNetworkConnectionMaskIPv6Address(struct in6_addr *addr, struct in6_addr *mask) { for (size_t i = 0; i < sizeof(struct in6_addr); i++) @@ -4113,7 +4113,7 @@ __SCNetworkConnectionMaskIPv6Address(struct in6_addr *addr, struct in6_addr *mas // Mask is optional in routes dictionary; if not present, whole addresses are matched -Boolean +static Boolean __SCNetworkConnectionIPv6AddressMatchesRoutes (struct sockaddr_in6 *addr_in6, CFDictionaryRef routes) { CFIndex count; diff --git a/SystemConfiguration.fproj/SCNetworkConnection.h b/SystemConfiguration.fproj/SCNetworkConnection.h index 83d6602..7f05886 100644 --- a/SystemConfiguration.fproj/SCNetworkConnection.h +++ b/SystemConfiguration.fproj/SCNetworkConnection.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2003-2006, 2008-2010, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2003-2006, 2008-2010, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,17 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCNETWORKCONNECTION_H -#ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -#include -#else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #define _SCNETWORKCONNECTION_H -#include +#include #include #include #include @@ -216,7 +213,8 @@ typedef void (*SCNetworkConnectionCallBack) ( "best" SCNetworkConnection. */ #define kSCNetworkConnectionSelectionOptionOnDemandHostName CFSTR("OnDemandHostName") // CFString - // __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/) + // API_AVAILABLE(macos(4.0)) + // SPI_AVAILABLE(ios(3.0), tvos(9.0), watchos(1.0), bridgeos(1.0)) /*! @define kSCNetworkConnectionSelectionOptionOnDemandRetry @@ -224,7 +222,8 @@ typedef void (*SCNetworkConnectionCallBack) ( already been issued for the specified OnDemand host name. */ #define kSCNetworkConnectionSelectionOptionOnDemandRetry CFSTR("OnDemandRetry") // CFBoolean - // __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/) + // API_AVAILABLE(macos(4.0)) + // SPI_AVAILABLE(ios(3.0), tvos(9.0), watchos(1.0), bridgeos(1.0)) __BEGIN_DECLS @@ -234,7 +233,7 @@ __BEGIN_DECLS instances. */ CFTypeID -SCNetworkConnectionGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +SCNetworkConnectionGetTypeID (void) API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -257,7 +256,7 @@ SCNetworkConnectionCopyUserPreferences ( CFDictionaryRef __nullable selectionOptions, CFStringRef __nonnull * __nullable serviceID, CFDictionaryRef __nonnull * __nullable userOptions - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -287,7 +286,7 @@ SCNetworkConnectionCreateWithServiceID ( CFStringRef serviceID, SCNetworkConnectionCallBack __nullable callout, SCNetworkConnectionContext * __nullable context - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -299,7 +298,7 @@ SCNetworkConnectionCreateWithServiceID ( CFStringRef __nullable SCNetworkConnectionCopyServiceID ( SCNetworkConnectionRef connection - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -322,7 +321,7 @@ SCNetworkConnectionCopyServiceID ( SCNetworkConnectionStatus SCNetworkConnectionGetStatus ( SCNetworkConnectionRef connection - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -370,7 +369,7 @@ SCNetworkConnectionGetStatus ( CFDictionaryRef __nullable SCNetworkConnectionCopyExtendedStatus ( SCNetworkConnectionRef connection - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -412,7 +411,7 @@ SCNetworkConnectionCopyExtendedStatus ( CFDictionaryRef __nullable SCNetworkConnectionCopyStatistics ( SCNetworkConnectionRef connection - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -464,7 +463,7 @@ SCNetworkConnectionStart ( SCNetworkConnectionRef connection, CFDictionaryRef __nullable userOptions, Boolean linger - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -490,7 +489,7 @@ Boolean SCNetworkConnectionStop ( SCNetworkConnectionRef connection, Boolean forceDisconnect - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -506,7 +505,7 @@ SCNetworkConnectionStop ( CFDictionaryRef __nullable SCNetworkConnectionCopyUserOptions ( SCNetworkConnectionRef connection - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -524,7 +523,7 @@ SCNetworkConnectionScheduleWithRunLoop ( SCNetworkConnectionRef connection, CFRunLoopRef runLoop, CFStringRef runLoopMode - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -542,7 +541,7 @@ SCNetworkConnectionUnscheduleFromRunLoop ( SCNetworkConnectionRef connection, CFRunLoopRef runLoop, CFStringRef runLoopMode - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -559,12 +558,11 @@ Boolean SCNetworkConnectionSetDispatchQueue ( SCNetworkConnectionRef connection, dispatch_queue_t __nullable queue - ) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_4_0/*SPI*/); + ) API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS CF_ASSUME_NONNULL_END CF_IMPLICIT_BRIDGING_DISABLED -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ -#endif /* _SCNETWORKCONNECTION_H */ +#endif /* _SCNETWORKCONNECTION_H */ diff --git a/SystemConfiguration.fproj/SCNetworkConnectionInternal.h b/SystemConfiguration.fproj/SCNetworkConnectionInternal.h index 08ccc60..a34f296 100644 --- a/SystemConfiguration.fproj/SCNetworkConnectionInternal.h +++ b/SystemConfiguration.fproj/SCNetworkConnectionInternal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 2016 Apple Inc. All rights reserved. + * Copyright (c) 2012, 2013, 2016, 2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -39,7 +39,7 @@ __BEGIN_DECLS -os_log_t __log_SCNetworkConnection(); +os_log_t __log_SCNetworkConnection(void); void __SCNetworkConnectionForceOnDemandConfigurationRefresh(void); char * __SCNetworkConnectionGetControllerPortName(void); CFDictionaryRef __SCNetworkConnectionCopyTokenParameters(SCNetworkConnectionRef connection); diff --git a/SystemConfiguration.fproj/SCNetworkConnectionPrivate.h b/SystemConfiguration.fproj/SCNetworkConnectionPrivate.h index 5160314..6de0e2f 100644 --- a/SystemConfiguration.fproj/SCNetworkConnectionPrivate.h +++ b/SystemConfiguration.fproj/SCNetworkConnectionPrivate.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2008, 2009, 2011-2015 Apple Inc. All rights reserved. + * Copyright (c) 2006, 2008, 2009, 2011-2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,12 +24,12 @@ #ifndef _SCNETWORKCONNECTIONPRIVATE_H #define _SCNETWORKCONNECTIONPRIVATE_H -#include +#include #include #include -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR #include -#endif +#endif // !TARGET_OS_SIMULATOR #include #include #include @@ -45,41 +45,43 @@ __BEGIN_DECLS #pragma mark SCNetworkConnection SPIs CFArrayRef /* of SCNetworkServiceRef's */ -SCNetworkConnectionCopyAvailableServices (SCNetworkSetRef set) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +SCNetworkConnectionCopyAvailableServices (SCNetworkSetRef set) API_AVAILABLE(macos(10.5), ios(2.0)); SCNetworkConnectionRef SCNetworkConnectionCreateWithService (CFAllocatorRef allocator, SCNetworkServiceRef service, SCNetworkConnectionCallBack callout, - SCNetworkConnectionContext *context) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + SCNetworkConnectionContext *context) API_AVAILABLE(macos(10.5), ios(2.0)); SCNetworkServiceRef -SCNetworkConnectionGetService (SCNetworkConnectionRef connection) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +SCNetworkConnectionGetService (SCNetworkConnectionRef connection) API_AVAILABLE(macos(10.5), ios(2.0)); CFArrayRef /* of SCUserPreferencesRef's */ -SCNetworkConnectionCopyAllUserPreferences (SCNetworkConnectionRef connection) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +SCNetworkConnectionCopyAllUserPreferences (SCNetworkConnectionRef connection) API_AVAILABLE(macos(10.5), ios(2.0)); SCUserPreferencesRef -SCNetworkConnectionCopyCurrentUserPreferences (SCNetworkConnectionRef connection) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +SCNetworkConnectionCopyCurrentUserPreferences (SCNetworkConnectionRef connection) API_AVAILABLE(macos(10.5), ios(2.0)); SCUserPreferencesRef -SCNetworkConnectionCreateUserPreferences (SCNetworkConnectionRef connection) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +SCNetworkConnectionCreateUserPreferences (SCNetworkConnectionRef connection) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean -SCNetworkConnectionSuspend (SCNetworkConnectionRef connection) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0); +SCNetworkConnectionSuspend (SCNetworkConnectionRef connection) API_AVAILABLE(macos(10.3), ios(2.0)); Boolean -SCNetworkConnectionResume (SCNetworkConnectionRef connection) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0); +SCNetworkConnectionResume (SCNetworkConnectionRef connection) API_AVAILABLE(macos(10.3), ios(2.0)); +#if !TARGET_OS_SIMULATOR Boolean -SCNetworkConnectionRefreshOnDemandState (SCNetworkConnectionRef connection) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); +SCNetworkConnectionRefreshOnDemandState (SCNetworkConnectionRef connection) API_AVAILABLE(macos(10.9), ios(7.0)); +#endif // !TARGET_OS_SIMULATOR Boolean SCNetworkConnectionSetClientInfo (SCNetworkConnectionRef connection, mach_port_t client_audit_session, uid_t client_uid, gid_t client_gid, - pid_t client_pid) __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_5_0); + pid_t client_pid) API_AVAILABLE(macos(10.8), ios(5.0)); /*! @function SCNetworkConnectionCreate @@ -101,7 +103,7 @@ SCNetworkConnectionSetClientInfo (SCNetworkConnectionRef connection, SCNetworkConnectionRef SCNetworkConnectionCreate (CFAllocatorRef allocator, SCNetworkConnectionCallBack callout, - SCNetworkConnectionContext *context) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); + SCNetworkConnectionContext *context) API_AVAILABLE(macos(10.9), ios(7.0)); /*! @function SCNetworkConnectionSetClientAuditInfo @@ -123,7 +125,7 @@ SCNetworkConnectionSetClientAuditInfo (SCNetworkConnectionRef connection, mach_port_t bootstrap_port, pid_t pid, const uuid_t uuid, - const char *bundle_id) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); + const char *bundle_id) API_AVAILABLE(macos(10.9), ios(7.0)); /*! @defined kSCNetworkConnectionSelectionOptionNoUserPrefs @@ -137,7 +139,9 @@ SCNetworkConnectionSetClientAuditInfo (SCNetworkConnectionRef connection, @abstract The traffic class that is attempting to trigger OnDemand. */ #define kSCNetworkConnectionSelectionOptionOnDemandTrafficClass CFSTR("OnDemandTrafficClass") // CFNumber - // __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/) + // API_AVAILABLE(macos(9.0)) + // SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)) + /*! @define kSCNetworkConnectionSelectionOptionOnDemandAccountIdentifier @abstract The account identifier that is attempting to trigger OnDemand. @@ -188,7 +192,7 @@ SCNetworkConnectionSetClientAuditInfo (SCNetworkConnectionRef connection, */ Boolean SCNetworkConnectionSelectServiceWithOptions (SCNetworkConnectionRef connection, - CFDictionaryRef selectionOptions) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); + CFDictionaryRef selectionOptions) API_AVAILABLE(macos(10.9), ios(7.0)); /*! @function SCNetworkConnectionOnDemandShouldRetryOnFailure @@ -200,7 +204,7 @@ SCNetworkConnectionSelectServiceWithOptions (SCNetworkConnectionRef connection, failure, FALSE otherwise. */ Boolean -SCNetworkConnectionOnDemandShouldRetryOnFailure (SCNetworkConnectionRef connection) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); +SCNetworkConnectionOnDemandShouldRetryOnFailure (SCNetworkConnectionRef connection) API_AVAILABLE(macos(10.9), ios(7.0)); /*! @function SCNetworkConnectionCanTunnelAddress @@ -218,7 +222,7 @@ SCNetworkConnectionOnDemandShouldRetryOnFailure (SCNetworkConnectionRef connect Boolean SCNetworkConnectionCanTunnelAddress (SCNetworkConnectionRef connection, const struct sockaddr *address, - Boolean *startImmediately) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); + Boolean *startImmediately) API_AVAILABLE(macos(10.9), ios(7.0)); /*! @function SCNetworkConnectionIsOnDemandSuspended @@ -228,7 +232,7 @@ SCNetworkConnectionCanTunnelAddress (SCNetworkConnectionRef connection, @return TRUE if the On Demand connection is suspended, FALSE otherwise. */ Boolean -SCNetworkConnectionIsOnDemandSuspended (SCNetworkConnectionRef connection) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); +SCNetworkConnectionIsOnDemandSuspended (SCNetworkConnectionRef connection) API_AVAILABLE(macos(10.9), ios(7.0)); /*! @function SCNetworkConnectionCopyOnDemandInfo @@ -244,7 +248,7 @@ SCNetworkConnectionIsOnDemandSuspended (SCNetworkConnectionRef connection) __ Boolean SCNetworkConnectionCopyOnDemandInfo (SCNetworkConnectionRef connection, CFStringRef *onDemandRemoteAddress, - SCNetworkConnectionStatus *onDemandConnectionStatus) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); + SCNetworkConnectionStatus *onDemandConnectionStatus) API_AVAILABLE(macos(10.9), ios(7.0)); /*! @function SCNetworkConnectionTriggerOnDemandIfNeeded @@ -265,7 +269,7 @@ Boolean SCNetworkConnectionTriggerOnDemandIfNeeded (CFStringRef hostName, Boolean afterDNSFail, int timeout, - int trafficClass) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); + int trafficClass) API_AVAILABLE(macos(10.9), ios(7.0)); /*! @function SCNetworkConnectionGetReachabilityInfo @@ -280,7 +284,7 @@ SCNetworkConnectionTriggerOnDemandIfNeeded (CFStringRef hostName, Boolean SCNetworkConnectionGetReachabilityInfo (SCNetworkConnectionRef connection, SCNetworkReachabilityFlags *reach_flags, - unsigned int *reach_if_index) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); + unsigned int *reach_if_index) API_AVAILABLE(macos(10.9), ios(7.0)); /*! @@ -311,7 +315,7 @@ typedef int SCNetworkConnectionType; @return The type of the network connection. */ SCNetworkConnectionType -SCNetworkConnectionGetType (SCNetworkConnectionRef connection) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); +SCNetworkConnectionGetType (SCNetworkConnectionRef connection) API_AVAILABLE(macos(10.9), ios(7.0)); /*! @defined kSCNetworkConnectionFlowPropertyHostName @@ -344,7 +348,7 @@ SCNetworkConnectionGetType (SCNetworkConnectionRef connection) __OSX_AVAILAB */ CFDataRef SCNetworkConnectionCopyFlowDivertToken (SCNetworkConnectionRef connection, - CFDictionaryRef flowProperties) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); + CFDictionaryRef flowProperties) API_AVAILABLE(macos(10.9), ios(7.0)); #define kSCNetworkConnectionAppPropertyRuleID CFSTR("RuleID") #define kSCNetworkConnectionAppPropertyCodeDirHash CFSTR("CodeDirHash") @@ -354,7 +358,7 @@ SCNetworkConnectionCopyFlowDivertToken (SCNetworkConnectionRef connection, #define kSCNetworkConnectionAppPropertyUUID CFSTR("UUID") int -SCNetworkConnectionGetServiceIdentifier (SCNetworkConnectionRef connection) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); +SCNetworkConnectionGetServiceIdentifier (SCNetworkConnectionRef connection) API_AVAILABLE(macos(10.9), ios(7.0)); #pragma mark - #pragma mark SCNetworkConnection "VPN on Demand" SPIs @@ -486,65 +490,65 @@ __SCNetworkConnectionCopyOnDemandInfoWithName (SCDynamicStoreRef *storeP, Boolean onDemandRetry, CFStringRef *connectionServiceID, SCNetworkConnectionStatus *connectionStatus, - CFStringRef *vpnRemoteAddress) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0); + CFStringRef *vpnRemoteAddress) API_AVAILABLE(macos(10.6), ios(2.0)); -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR SCNetworkConnectionStatus -SCNetworkConnectionGetStatusFromNEStatus (ne_session_status_t status) __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0); -#endif /* !TARGET_OS_SIMULATOR */ +SCNetworkConnectionGetStatusFromNEStatus (ne_session_status_t status) API_AVAILABLE(macos(10.10), ios(8.0)); +#endif /* !TARGET_OS_SIMULATOR */ #pragma mark - #pragma mark SCUserPreferences SPIs Boolean -SCUserPreferencesRemove (SCUserPreferencesRef userPreferences) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +SCUserPreferencesRemove (SCUserPreferencesRef userPreferences) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean -SCUserPreferencesSetCurrent (SCUserPreferencesRef userPreferences) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +SCUserPreferencesSetCurrent (SCUserPreferencesRef userPreferences) API_AVAILABLE(macos(10.5), ios(2.0)); CFStringRef -SCUserPreferencesCopyName (SCUserPreferencesRef userPreferences) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +SCUserPreferencesCopyName (SCUserPreferencesRef userPreferences) API_AVAILABLE(macos(10.5), ios(2.0)); CFTypeID -SCUserPreferencesGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +SCUserPreferencesGetTypeID (void) API_AVAILABLE(macos(10.5), ios(2.0)); CFStringRef -SCUserPreferencesGetUniqueID (SCUserPreferencesRef userPreferences) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +SCUserPreferencesGetUniqueID (SCUserPreferencesRef userPreferences) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean -SCUserPreferencesIsForced (SCUserPreferencesRef userPreferences) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +SCUserPreferencesIsForced (SCUserPreferencesRef userPreferences) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean SCUserPreferencesSetName (SCUserPreferencesRef userPreferences, - CFStringRef newName) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + CFStringRef newName) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean SCNetworkConnectionStartWithUserPreferences (SCNetworkConnectionRef connection, SCUserPreferencesRef userPreferences, - Boolean linger) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + Boolean linger) API_AVAILABLE(macos(10.5), ios(2.0)); CFDictionaryRef SCUserPreferencesCopyInterfaceConfiguration (SCUserPreferencesRef userPreferences, - SCNetworkInterfaceRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + SCNetworkInterfaceRef interface) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean SCUserPreferencesSetInterfaceConfiguration (SCUserPreferencesRef userPreferences, SCNetworkInterfaceRef interface, - CFDictionaryRef newOptions) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + CFDictionaryRef newOptions) API_AVAILABLE(macos(10.5), ios(2.0)); CFDictionaryRef SCUserPreferencesCopyExtendedInterfaceConfiguration (SCUserPreferencesRef userPreferences, SCNetworkInterfaceRef interface, - CFStringRef extendedType) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + CFStringRef extendedType) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean SCUserPreferencesSetExtendedInterfaceConfiguration (SCUserPreferencesRef userPreferences, SCNetworkInterfaceRef interface, CFStringRef extendedType, - CFDictionaryRef newOptions) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + CFDictionaryRef newOptions) API_AVAILABLE(macos(10.5), ios(2.0)); #pragma mark - @@ -554,25 +558,25 @@ SCUserPreferencesSetExtendedInterfaceConfiguration Boolean SCUserPreferencesCheckInterfacePassword (SCUserPreferencesRef userPreferences, SCNetworkInterfaceRef interface, - SCNetworkInterfacePasswordType passwordType) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + SCNetworkInterfacePasswordType passwordType) API_AVAILABLE(macos(10.5), ios(2.0)); CFDataRef SCUserPreferencesCopyInterfacePassword (SCUserPreferencesRef userPreferences, SCNetworkInterfaceRef interface, - SCNetworkInterfacePasswordType passwordType) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + SCNetworkInterfacePasswordType passwordType) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean SCUserPreferencesRemoveInterfacePassword (SCUserPreferencesRef userPreferences, SCNetworkInterfaceRef interface, - SCNetworkInterfacePasswordType passwordType) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + SCNetworkInterfacePasswordType passwordType) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean SCUserPreferencesSetInterfacePassword (SCUserPreferencesRef userPreferences, SCNetworkInterfaceRef interface, SCNetworkInterfacePasswordType passwordType, CFDataRef password, - CFDictionaryRef options) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + CFDictionaryRef options) API_AVAILABLE(macos(10.5), ios(2.0)); __END_DECLS -#endif /* _SCNETWORKCONNECTIONPRIVATE_H */ +#endif /* _SCNETWORKCONNECTIONPRIVATE_H */ diff --git a/SystemConfiguration.fproj/SCNetworkInterface.c b/SystemConfiguration.fproj/SCNetworkInterface.c index ae1622a..f4e2521 100644 --- a/SystemConfiguration.fproj/SCNetworkInterface.c +++ b/SystemConfiguration.fproj/SCNetworkInterface.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2017 Apple Inc. All rights reserved. + * Copyright (c) 2004-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -33,7 +33,7 @@ */ -#include +#include #include #include #include @@ -103,7 +103,7 @@ static void __SCNetworkInterfaceDeallocate (CFTypeRef cf); static Boolean __SCNetworkInterfaceEqual (CFTypeRef cf1, CFTypeRef cf2); static CFHashCode __SCNetworkInterfaceHash (CFTypeRef cf); static void __SCNetworkInterfaceCacheAdd (CFStringRef bsdName, CFArrayRef matchingInterfaces); -static Boolean __SCNetworkInterfaceCacheIsOpen (); +static Boolean __SCNetworkInterfaceCacheIsOpen (void); static CFArrayRef __SCNetworkInterfaceCacheCopy (CFStringRef bsdName); @@ -333,6 +333,11 @@ __SCNetworkInterfaceCopyFormattingDescription(CFTypeRef cf, CFDictionaryRef form if (interfacePrivate->hidden) { CFStringAppendFormat(result, NULL, CFSTR(", hidden = TRUE")); } +#if TARGET_OS_IPHONE + if (interfacePrivate->trustRequired) { + CFStringAppendFormat(result, NULL, CFSTR(", trust required = TRUE")); + } +#endif // TARGET_OS_IPHONE if (interfacePrivate->location != NULL) { CFStringAppendFormat(result, NULL, CFSTR(", location = %@"), interfacePrivate->location); } @@ -2653,6 +2658,21 @@ createInterface(io_registry_entry_t interface, processInterface func, interfacePrivate->hidden = TRUE; CFRelease(val); } + +#if TARGET_OS_IPHONE + // get TrustRequired preference + val = IORegistryEntrySearchCFProperty(interface, + kIOServicePlane, + kSCNetworkInterfaceTrustRequiredKey, + NULL, + kIORegistryIterateRecursively | kIORegistryIterateParents); + if (val != NULL) { + if (isA_CFBoolean(val)) { + interfacePrivate->trustRequired = CFBooleanGetValue(val); + } + CFRelease(val); + } +#endif // TARGET_OS_IPHONE } else { CFRelease(interfacePrivate); interfacePrivate = NULL; @@ -3125,6 +3145,13 @@ __SCNetworkInterfaceCopyInterfaceEntity(SCNetworkInterfaceRef interface) kSCNetworkInterfaceHiddenConfigurationKey, kCFBooleanTrue); } +#if TARGET_OS_IPHONE + if (interfacePrivate->trustRequired) { + CFDictionarySetValue(entity, + kSCNetworkInterfaceTrustRequiredKey, + kCFBooleanTrue); + } +#endif // TARGET_OS_IPHONE // match the "hardware" with the lowest layer while (TRUE) { @@ -3846,8 +3873,9 @@ done: } +__private_extern__ void -_SCNetworkInterfaceCacheOpen() +_SCNetworkInterfaceCacheOpen(void) { if (!__SCNetworkInterfaceCacheIsOpen()) { S_interface_cache = CFDictionaryCreateMutable(NULL, @@ -3859,8 +3887,9 @@ _SCNetworkInterfaceCacheOpen() } +__private_extern__ void -_SCNetworkInterfaceCacheClose() +_SCNetworkInterfaceCacheClose(void) { if (__SCNetworkInterfaceCacheIsOpen()) { SC_log(LOG_DEBUG, "SCNetworkInterface cache (%p): close", S_interface_cache); @@ -3883,7 +3912,7 @@ __SCNetworkInterfaceCacheAdd(CFStringRef bsdName, CFArrayRef matchingInterfaces) static inline Boolean -__SCNetworkInterfaceCacheIsOpen() +__SCNetworkInterfaceCacheIsOpen(void) { return (S_interface_cache != NULL); } @@ -4259,7 +4288,7 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef allocator, (((virtualInterface = findBridgeInterface(servicePref, ifDevice)) != NULL) || #if !TARGET_OS_IPHONE ((virtualInterface = findBondInterface(servicePref, ifDevice)) != NULL) || -#endif +#endif // !TARGET_OS_IPHONE ((virtualInterface = findVLANInterface(servicePref, ifDevice)) != NULL))) { CFRelease(interfacePrivate); interfacePrivate = (SCNetworkInterfacePrivateRef)virtualInterface; @@ -4380,6 +4409,11 @@ _SCNetworkInterfaceCreateWithEntity(CFAllocatorRef allocator, if (CFDictionaryContainsKey(interface_entity, kSCNetworkInterfaceHiddenConfigurationKey)) { interfacePrivate->hidden = TRUE; } +#if TARGET_OS_IPHONE + if (CFDictionaryContainsKey(interface_entity, kSCNetworkInterfaceTrustRequiredKey)) { + interfacePrivate->trustRequired = TRUE; + } +#endif // TARGET_OS_IPHONE } if (service != NULL) { @@ -4998,6 +5032,10 @@ SCNetworkInterfaceCreateWithInterface(SCNetworkInterfaceRef child, CFStringRef i parentPrivate->hidden = childPrivate->hidden; +#if TARGET_OS_IPHONE + parentPrivate->trustRequired = childPrivate->trustRequired; +#endif // TARGET_OS_IPHONE + if (childPrivate->overrides != NULL) { parentPrivate->overrides = CFDictionaryCreateMutableCopy(NULL, 0, childPrivate->overrides); } @@ -5328,10 +5366,10 @@ copy_interface_string(CFBundleRef bundle, CFStringRef key, Boolean localized) knownStrKey, localized); -#if TARGET_OS_IPHONE +#if TARGET_OS_IPHONE /* ...and we want to know about it! */ _SC_crash("Failed to retrieve interface string", NULL, NULL); -#endif //TARGET_OS_IPHONE +#endif //TARGET_OS_IPHONE reported = TRUE; } @@ -5888,11 +5926,13 @@ SCNetworkInterfaceForceConfigurationRefresh(SCNetworkInterfaceRef interface) } +#if !TARGET_OS_IPHONE Boolean SCNetworkInterfaceRefreshConfiguration(CFStringRef ifName) { return _SCNetworkInterfaceForceConfigurationRefresh(ifName); } +#endif // !TARGET_OS_IPHONE #pragma mark - @@ -6963,6 +7003,101 @@ SCNetworkInterfaceSetPassword(SCNetworkInterfaceRef interface, return ok; } +#pragma mark - +#pragma mark SCNetworkInterface [Advisory] SPIs +#if TARGET_OS_SIMULATOR +Boolean +SCNetworkInterfaceSetAdvisory(SCNetworkInterfaceRef interface, + SCNetworkInterfaceAdvisory advisory, + CFStringRef reason) +{ +#pragma unused(interface, advisory, reason) + return (FALSE); +} + +Boolean +SCNetworkInterfaceAdvisoryIsSet(SCNetworkInterfaceRef interface) +{ +#pragma unused(interface) + return (FALSE); +} + +CFStringRef +SCNetworkInterfaceCopyAdvisoryNotificationKey(SCNetworkInterfaceRef interface) +{ +#pragma unused(interface) + return (NULL); +} + +#else /* TARGET_OS_SIMULATOR */ +Boolean +SCNetworkInterfaceSetAdvisory(SCNetworkInterfaceRef interface, + SCNetworkInterfaceAdvisory advisory, + CFStringRef reason) +{ + IPMonitorControlRef control; + SCNetworkInterfacePrivateRef interfacePrivate = + (SCNetworkInterfacePrivateRef)interface; + CFStringRef ifName; + + ifName = SCNetworkInterfaceGetBSDName(interface); + if (ifName == NULL) { + _SCErrorSet(kSCStatusInvalidArgument); + return (FALSE); + } + control = interfacePrivate->IPMonitorControl; + if (control == NULL) { + control = IPMonitorControlCreate(); + if (control == NULL) { + _SCErrorSet(kSCStatusFailed); + return (FALSE); + } + interfacePrivate->IPMonitorControl = control; + } + return IPMonitorControlSetInterfaceAdvisory(control, + ifName, + advisory, + reason); +} + +Boolean +SCNetworkInterfaceAdvisoryIsSet(SCNetworkInterfaceRef interface) +{ + IPMonitorControlRef control; + SCNetworkInterfacePrivateRef interfacePrivate = + (SCNetworkInterfacePrivateRef)interface; + CFStringRef ifName; + + ifName = SCNetworkInterfaceGetBSDName(interface); + if (ifName == NULL) { + _SCErrorSet(kSCStatusInvalidArgument); + return (FALSE); + } + control = interfacePrivate->IPMonitorControl; + if (control == NULL) { + control = IPMonitorControlCreate(); + if (control == NULL) { + _SCErrorSet(kSCStatusFailed); + return (FALSE); + } + interfacePrivate->IPMonitorControl = control; + } + return IPMonitorControlInterfaceAdvisoryIsSet(control, ifName); +} + +CFStringRef +SCNetworkInterfaceCopyAdvisoryNotificationKey(SCNetworkInterfaceRef interface) +{ + CFStringRef ifName; + + ifName = SCNetworkInterfaceGetBSDName(interface); + if (ifName == NULL) { + _SCErrorSet(kSCStatusInvalidArgument); + return (NULL); + } + return IPMonitorControlCopyInterfaceAdvisoryNotificationKey(ifName); +} +#endif /* TARGET_OS_SIMULATOR */ #pragma mark - #pragma mark SCNetworkInterface [InterfaceNamer] SPIs @@ -7181,11 +7316,20 @@ _SCNetworkInterfaceIsBuiltin(SCNetworkInterfaceRef interface) } +Boolean +_SCNetworkInterfaceIsTrustRequired(SCNetworkInterfaceRef interface) +{ + SCNetworkInterfacePrivateRef interfacePrivate = (SCNetworkInterfacePrivateRef)interface; + + return interfacePrivate->trustRequired; +} + + #pragma mark - #pragma mark SCNetworkInterface SPIs -#if !TARGET_OS_EMBEDDED +#if TARGET_OS_OSX SCNetworkInterfaceRef _SCNetworkInterfaceCopyBTPANInterface(void) @@ -7242,7 +7386,7 @@ _SCNetworkInterfaceCopyBTPANInterface(void) return interface; } -#endif // !TARGET_OS_EMBEDDED +#endif // TARGET_OS_OSX CFStringRef @@ -7598,6 +7742,9 @@ __SCNetworkInterfaceCreateCopy(CFAllocatorRef allocator, newPrivate->configurationAction = CFRetain(oldPrivate->configurationAction); } newPrivate->hidden = oldPrivate->hidden; +#if TARGET_OS_IPHONE + newPrivate->trustRequired = oldPrivate->trustRequired; +#endif // TARGET_OS_IPHONE if (oldPrivate->location != NULL) { newPrivate->location = CFRetain(oldPrivate->location); } diff --git a/SystemConfiguration.fproj/SCNetworkInterfaceProvider.c b/SystemConfiguration.fproj/SCNetworkInterfaceProvider.c new file mode 100644 index 0000000..65074b2 --- /dev/null +++ b/SystemConfiguration.fproj/SCNetworkInterfaceProvider.c @@ -0,0 +1,470 @@ +/* + * Copyright (c) 2018 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/* + * Modification History + * + * January 17, 2018 Dieter Siegmund (dieter@apple.com) + * - initial revision + */ + +/* + * SCNetworkInterfaceProvider.c + */ + +#include +#include +#include +#include "SCNetworkConfigurationPrivate.h" +#include "SCNetworkConfigurationInternal.h" +#include "SCNetworkInterfaceProvider.h" + +static void +my_CFRelease(void * t) +{ + void * * obj = (void * *)t; + if (obj && *obj) { + CFRelease(*obj); + *obj = NULL; + } + return; +} + +/** + ** ObjectWrapper + **/ + +typedef struct { + const void * obj; + int32_t retain_count; +} ObjectWrapper, * ObjectWrapperRef; + +static const void * +ObjectWrapperRetain(const void * info) +{ + ObjectWrapperRef wrapper = (ObjectWrapperRef)info; + + (void)OSAtomicIncrement32(&wrapper->retain_count); + return (info); +} + +static ObjectWrapperRef +ObjectWrapperAllocate(const void * obj) +{ + ObjectWrapperRef wrapper; + + wrapper = (ObjectWrapperRef)malloc(sizeof(*wrapper)); + wrapper->obj = obj; + wrapper->retain_count = 1; + return (wrapper); +} + +static void +ObjectWrapperRelease(const void * info) +{ + int32_t new_val; + ObjectWrapperRef wrapper = (ObjectWrapperRef)info; + + new_val = OSAtomicDecrement32(&wrapper->retain_count); + if (new_val == 0) { + free(wrapper); + } + else { + assert(new_val > 0); + } + return; +} + +static void +ObjectWrapperSetObject(ObjectWrapperRef wrapper, const void * obj) +{ + wrapper->obj = obj; +} + +static const void * +ObjectWrapperGetObject(ObjectWrapperRef wrapper) +{ + return (wrapper->obj); +} + +static SCDynamicStoreRef +StoreObjectWrapperAllocate(const void * obj, + CFStringRef name, + SCDynamicStoreCallBack handler, + CFArrayRef keys, + CFArrayRef patterns, + dispatch_queue_t queue, + ObjectWrapperRef * ret_wrapper) +{ + SCDynamicStoreContext context = { + .version = 0, + .info = NULL, + .retain = ObjectWrapperRetain, + .release = ObjectWrapperRelease, + .copyDescription = NULL + }; + SCDynamicStoreRef store; + ObjectWrapperRef wrapper; + + wrapper = ObjectWrapperAllocate(obj); + context.info = wrapper; + store = SCDynamicStoreCreate(NULL, name, handler, &context); + if (store == NULL) { + SC_log(LOG_NOTICE, + "%@: SCDynamicStoreCreate failed", name); + } + else if (!SCDynamicStoreSetNotificationKeys(store, keys, patterns)) { + SC_log(LOG_NOTICE, + "%@: SCDynamicStoreSetNoticationKeys failed", name); + CFRelease(store); + store = NULL; + } + else if (queue != NULL + && !SCDynamicStoreSetDispatchQueue(store, queue)) { + SC_log(LOG_NOTICE, + "%@: SCDynamicStoreSetDispatchQueue failed", name); + CFRelease(store); + store = NULL; + } + if (store == NULL) { + ObjectWrapperRelease(wrapper); + wrapper = NULL; + } + *ret_wrapper = wrapper; + return (store); +} + +/** + ** CF object glue code + **/ +static CFStringRef __SCNetworkInterfaceProviderCopyDebugDesc(CFTypeRef cf); +static void __SCNetworkInterfaceProviderDeallocate(CFTypeRef cf); + +static CFTypeID __kSCNetworkInterfaceProviderTypeID = _kCFRuntimeNotATypeID; + +static const CFRuntimeClass __SCNetworkInterfaceProviderClass = { + 0, /* version */ + "SCNetworkInterfaceProvider", /* className */ + NULL, /* init */ + NULL, /* copy */ + __SCNetworkInterfaceProviderDeallocate, /* deallocate */ + NULL, /* equal */ + NULL, /* hash */ + NULL, /* copyFormattingDesc */ + __SCNetworkInterfaceProviderCopyDebugDesc /* copyDebugDesc */ +}; + +struct __SCNetworkInterfaceProvider { + CFRuntimeBase cf_base; + + IPMonitorControlRef control; + SCDynamicStoreRef store; + ObjectWrapperRef wrapper; + dispatch_queue_t queue; + + SCNetworkInterfaceProviderEventHandler handler; + CFStringRef if_name; + SCNetworkInterfaceRef if_type; + Boolean enabled; + Boolean needed; +}; + + +static CFStringRef +__SCNetworkInterfaceProviderCopyDebugDesc(CFTypeRef cf) +{ + CFAllocatorRef allocator = CFGetAllocator(cf); + SCNetworkInterfaceProviderRef provider = (SCNetworkInterfaceProviderRef)cf; + CFMutableStringRef result; + + result = CFStringCreateMutable(allocator, 0); + CFStringAppendFormat(result, NULL, + CFSTR(""), + provider->if_type, provider->if_name, cf); + return (result); +} + +static void +SCNetworkInterfaceProviderDeallocate(SCNetworkInterfaceProviderRef provider) +{ + provider->enabled = FALSE; + my_CFRelease(&provider->control); + if (provider->wrapper != NULL) { + ObjectWrapperSetObject(provider->wrapper, NULL); + ObjectWrapperRelease(provider->wrapper); + provider->wrapper = NULL; + } + if (provider->store != NULL) { + SCDynamicStoreSetDispatchQueue(provider->store, NULL); + my_CFRelease(&provider->store); + } + if (provider->queue != NULL) { + dispatch_release(provider->queue); + provider->queue = NULL; + } + if (provider->handler != NULL) { + Block_release(provider->handler); + provider->handler = NULL; + } + my_CFRelease(&provider->if_name); + my_CFRelease(&provider->if_type); +} + +static void +__SCNetworkInterfaceProviderDeallocate(CFTypeRef cf) +{ + SCNetworkInterfaceProviderRef provider = (SCNetworkInterfaceProviderRef)cf; + + if (provider->queue != NULL) { + dispatch_sync(provider->queue, ^{ + SCNetworkInterfaceProviderDeallocate(provider); + }); + } + else { + SCNetworkInterfaceProviderDeallocate(provider); + } + return; +} + +/** + ** Supporting Functions + **/ +static void +__SCNetworkInterfaceProviderRegisterClass(void) +{ + static dispatch_once_t once; + dispatch_block_t once_block; + + once_block = ^{ + __kSCNetworkInterfaceProviderTypeID + = _CFRuntimeRegisterClass(&__SCNetworkInterfaceProviderClass); + }; + dispatch_once(&once, once_block); + return; +} + +static SCNetworkInterfaceProviderRef +__SCNetworkInterfaceProviderAllocate(CFAllocatorRef allocator) +{ + SCNetworkInterfaceProviderRef provider; + int size; + + __SCNetworkInterfaceProviderRegisterClass(); + size = sizeof(*provider) - sizeof(CFRuntimeBase); + provider = (SCNetworkInterfaceProviderRef) + _CFRuntimeCreateInstance(allocator, + __kSCNetworkInterfaceProviderTypeID, + size, NULL); + memset(((void *)provider) + sizeof(CFRuntimeBase), 0, size); + return (provider); +} + +static void +SCNetworkInterfaceProviderCheck(SCNetworkInterfaceProviderRef provider) +{ + Boolean advisory_set; + + if (!provider->enabled || provider->handler == NULL) { + return; + } + advisory_set + = IPMonitorControlAnyInterfaceAdvisoryIsSet(provider->control); + if (provider->needed != advisory_set) { + SCNetworkInterfaceProviderEvent event; + + event = advisory_set + ? kSCNetworkInterfaceProviderEventActivationRequested + : kSCNetworkInterfaceProviderEventActivationNoLongerRequested; + (provider->handler)(event, NULL); + provider->needed = advisory_set; + } + return; +} + +static void +StoreHandleChanges(SCDynamicStoreRef store, CFArrayRef changes, void * info) +{ +#pragma unused(store) +#pragma unused(changes) + SCNetworkInterfaceProviderRef provider; + ObjectWrapperRef wrapper = (ObjectWrapperRef)info; + + provider = (SCNetworkInterfaceProviderRef)ObjectWrapperGetObject(wrapper); + if (provider == NULL) { + /* provider has been deallocated */ + return; + } + SCNetworkInterfaceProviderCheck(provider); + return; +} + + +/** + ** SCNetworkInterfaceProvider SPI + **/ +SCNetworkInterfaceProviderRef +SCNetworkInterfaceProviderCreate(CFStringRef type, + CFStringRef ifname, + CFDictionaryRef options) +{ + IPMonitorControlRef control; + CFStringRef pattern; + CFArrayRef patterns; + SCNetworkInterfaceProviderRef provider; + dispatch_queue_t queue; + SCDynamicStoreRef store = NULL; + ObjectWrapperRef wrapper = NULL; + + if (options != NULL || ifname == NULL || type == NULL) { + _SCErrorSet(kSCStatusInvalidArgument); + return (NULL); + } + control = IPMonitorControlCreate(); + if (control == NULL) { + _SCErrorSet(kSCStatusFailed); + return (NULL); + } + pattern + = IPMonitorControlCopyInterfaceAdvisoryNotificationKey(kSCCompAnyRegex); + patterns = CFArrayCreate(NULL, (const void * *)&pattern, 1, + &kCFTypeArrayCallBacks); + CFRelease(pattern); +#define OUR_NAME "SCNetworkInterfaceProvider" + queue = dispatch_queue_create(OUR_NAME, NULL); + provider = __SCNetworkInterfaceProviderAllocate(NULL); + store = StoreObjectWrapperAllocate(provider, + CFSTR(OUR_NAME), + StoreHandleChanges, + NULL, + patterns, + queue, + &wrapper); + CFRelease(patterns); + if (store == NULL) { + dispatch_release(queue); + CFRelease(provider); + provider = NULL; + CFRelease(control); + } + else { + provider->control = control; + provider->store = store; + provider->wrapper = wrapper; + provider->queue = queue; + provider->if_name = CFRetain(ifname); + provider->if_type = CFRetain(type); + } + return (provider); +} + +void +SCNetworkInterfaceProviderSetEventHandler(SCNetworkInterfaceProviderRef provider, + SCNetworkInterfaceProviderEventHandler handler) +{ + if (handler == NULL) { + /* can't clear handler once set */ + return; + } + dispatch_sync(provider->queue, ^{ + if (provider->enabled) { + /* enabling before setting the handler isn't allowed */ + SC_log(LOG_NOTICE, + "%s: call SCNetworkInterfaceSetEventHandler before " + " SCNetworkInterfaceProviderResume", __FUNCTION__); + return; + } + if (provider->handler != NULL) { + /* can't change the handler once set */ + SC_log(LOG_NOTICE, + "%s: ignoring second invocation of " + "SCNetworkInterfaceSetEventHandler", __FUNCTION__); + return; + } + provider->handler = Block_copy(handler); + }); + return; +} + +void +SCNetworkInterfaceProviderResume(SCNetworkInterfaceProviderRef provider) +{ + dispatch_async(provider->queue, ^{ + if (!provider->enabled) { + provider->enabled = TRUE; + SCNetworkInterfaceProviderCheck(provider); + } + }); + return; +} + +#if TEST_SCNetworkInterfaceProvider + +/* + xcrun -sdk iphoneos.internal cc -o scnip SCNetworkInterfaceProvider.c -DTEST_SCNetworkInterfaceProvider -framework CoreFoundation -framework SystemConfiguration -arch arm64 -I ../IPMonitorControl ../IPMonitorControl/IPMonitorControl.c -DSC_LOG_HANDLE=__log_SCNetworkInterfaceProvider +*/ + +__private_extern__ os_log_t +__log_SCNetworkInterfaceProvider(void) +{ + static os_log_t log = NULL; + + if (log == NULL) { + log = os_log_create("com.apple.SystemConfiguration", "SCNetworkConfiguration"); + } + + return log; +} + +static void +event_handler(SCNetworkInterfaceProviderRef provider, + SCNetworkInterfaceProviderEvent event, + CFDictionaryRef event_data) +{ + printf("<%p> event %d\n", provider, event); +} + +int +main(int argc, char * argv[]) +{ + SCNetworkInterfaceProviderEventHandler handler; + SCNetworkInterfaceProviderRef provider; + + provider + = SCNetworkInterfaceProviderCreate(kSCNetworkInterfaceTypeWWAN, + CFSTR("pdp_ip10"), + NULL); + if (provider == NULL) { + fprintf(stderr, "SCNetworkInterfaceProviderCreate failed\n"); + exit(1); + } + handler = ^(SCNetworkInterfaceProviderEvent event, + CFDictionaryRef event_data) { + event_handler(provider, event, event_data); + }; + SCNetworkInterfaceProviderSetEventHandler(provider, handler); + SCNetworkInterfaceProviderResume(provider); + dispatch_main(); + exit(0); + return (0); +} +#endif diff --git a/SystemConfiguration.fproj/SCNetworkInterfaceProvider.h b/SystemConfiguration.fproj/SCNetworkInterfaceProvider.h new file mode 100644 index 0000000..da5c9d6 --- /dev/null +++ b/SystemConfiguration.fproj/SCNetworkInterfaceProvider.h @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2018 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _SCNETWORKINTERFACEPROVIDER_H +#define _SCNETWORKINTERFACEPROVIDER_H + +/* + * Modification History + * + * January 17, 2018 Dieter Siegmund (dieter@apple.com) + * - initial revision + */ + +/* + * SCNetworkInterfaceProvider.h + */ + + +#include +#include +#include + +__BEGIN_DECLS + +typedef CF_ENUM(uint32_t, SCNetworkInterfaceProviderEvent) { + kSCNetworkInterfaceProviderEventActivationRequested = 1, + kSCNetworkInterfaceProviderEventActivationNoLongerRequested = 2, +}; + +typedef struct CF_BRIDGED_TYPE(id) __SCNetworkInterfaceProvider * +SCNetworkInterfaceProviderRef; + +/*! + @typedef SCNetworkInterfaceProviderEventHandler + @discussion Event handler callback to process SCNetworkInterfaceProvider + events. + @param event The event to handle. + @param event_data The event data, always NULL currently. + */ +typedef void +(^SCNetworkInterfaceProviderEventHandler)(SCNetworkInterfaceProviderEvent event, + CFDictionaryRef event_data); + +/*! + @function SCNetworkInterfaceProviderCreate + @discussion Create an interface provider for a single network + interface. The interface provider processes the events on the + interface and takes actions based on the specific event. + After calling this function, activate the event handler by calling + SCNetworkInterfaceProviderSetEventHandler() followed by + SCNetworkInterfaceProviderResume(). + Calling CFRelease() will free resources and deactivate the + SCNetworkInterfaceProvider callback. + @param interfaceType The kSCNetworkInterfaceType that the interface + provider handles e.g. kSCNetworkInterfaceTypeCellular. + @param interfaceName The name of the network interface, e.g. "pdp_ip0". + @param options NULL for now. + @result A non-NULL SCNetworkInterfaceProviderRef if the interface + provider was successfully registered, NULL otherwise. + */ +SCNetworkInterfaceProviderRef +SCNetworkInterfaceProviderCreate(CFStringRef interfaceType, + CFStringRef interfaceName, + CFDictionaryRef options) + API_AVAILABLE(macos(10.14), ios(12.0)); + +/*! + @function SCNetworkInterfaceProviderSetEventHandler + @discussion Set the event handler to process events for the + SCNetworkInterfaceProvider object. + @param provider The SCNetworkInterfaceProvider to set the callback for. + @param handler The event handler to process events. Invoking this + function more than once or with a NULL handler is not valid. + */ +void +SCNetworkInterfaceProviderSetEventHandler(SCNetworkInterfaceProviderRef provider, + SCNetworkInterfaceProviderEventHandler handler) + API_AVAILABLE(macos(10.14), ios(12.0)); + +/*! + @function SCNetworkInterfaceProviderResume + @discussion Activate the interface provider so that its event handler + will get called. + @param provider The provider object to enable events on. + */ +void +SCNetworkInterfaceProviderResume(SCNetworkInterfaceProviderRef provider) + API_AVAILABLE(macos(10.14), ios(12.0)); + +__END_DECLS +#endif /* _SCNETWORKINTERFACEPROVIDER_H */ diff --git a/SystemConfiguration.fproj/SCNetworkMigration.c b/SystemConfiguration.fproj/SCNetworkMigration.c index 3116811..6874469 100644 --- a/SystemConfiguration.fproj/SCNetworkMigration.c +++ b/SystemConfiguration.fproj/SCNetworkMigration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2017 Apple Inc. All rights reserved. + * Copyright (c) 2014-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -57,6 +57,7 @@ const CFStringRef kSCNetworkConfigurationMigrationActionKey = CFSTR("MigrationActionKey"); const CFStringRef kSCNetworkConfigurationRepair = CFSTR("ConfigurationRepair"); + #if !TARGET_OS_IPHONE static CFDictionaryRef _SCNetworkMigrationCopyMappingBSDNameToBridgeServices(SCPreferencesRef prefs); @@ -66,7 +67,8 @@ _SCNetworkMigrationCopyMappingBSDNameToBondServices(SCPreferencesRef prefs); static CFDictionaryRef _SCNetworkMigrationCopyMappingBSDNameToVLANServices(SCPreferencesRef prefs); -#endif +#endif // !TARGET_OS_IPHONE + static Boolean _SCNetworkConfigurationIsInterfaceNamerMappable(SCNetworkInterfaceRef interface1, SCNetworkInterfaceRef interface2, Boolean bypassActive); @@ -1432,7 +1434,7 @@ validate_bond(const void *value, void *context) } CFRelease(memberInterfacesMutable); } -#endif +#endif // !TARGET_OS_IPHONE static void validate_vlan(const void *value, void *context) @@ -1560,7 +1562,7 @@ _SCNetworkConfigurationCheckValidityWithPreferences(SCPreferencesRef prefs, bsdNameToBridgeServices = _SCNetworkMigrationCopyMappingBSDNameToBridgeServices(prefs); bsdNameToBondServices = _SCNetworkMigrationCopyMappingBSDNameToBondServices(prefs); bsdNameToVLANServices = _SCNetworkMigrationCopyMappingBSDNameToVLANServices(prefs); -#endif +#endif // !TARGET_OS_IPHONE } context.interfaceMapping = mappingBSDNameToInterface; context.isValid = &isValid; @@ -1668,7 +1670,7 @@ _SCNetworkConfigurationCheckValidityWithPreferences(SCPreferencesRef prefs, CFArrayApplyFunction(bonds, CFRangeMake(0, CFArrayGetCount(bonds)), validate_bond, (void*)ni_prefs); CFRelease(bonds); } -#endif +#endif // !TARGET_OS_IPHONE CFArrayRef vlans = SCVLANInterfaceCopyAll(prefs); if (vlans != NULL) { CFArrayApplyFunction(vlans, CFRangeMake(0, CFArrayGetCount(vlans)), validate_vlan, (void*)ni_prefs); @@ -1699,7 +1701,7 @@ done: if (bsdNameToVLANServices != NULL) { CFRelease(bsdNameToVLANServices); } -#endif +#endif // !TARGET_OS_IPHONE if (setServices != NULL) { CFRelease(setServices); } @@ -3091,7 +3093,7 @@ _SCNetworkMigrationDoVirtualNetworkInterfaceMigration(SCPreferencesRef sourcePre } return TRUE; } -#endif +#endif // !TARGET_OS_IPHONE typedef struct { SCPreferencesRef prefs; @@ -3493,7 +3495,7 @@ _SCNetworkConfigurationMigrateConfiguration(CFURLRef sourceDir, CFURLRef targetD bsdNameMapping, setMapping, sourceServiceSetMapping)) { SC_log(LOG_INFO, "_SCNetworkMigrationDoVirtualNetworkInterfaceMigration: failed to complete successfully"); } -#endif +#endif // !TARGET_OS_IPHONE // Migrate Service Order if (!_SCNetworkMigrationDoServiceOrderMigration(sourcePrefs, targetPrefs, setMapping)) { SC_log(LOG_INFO, "_SCNetworkMigrationDoServiceOrderMigration: failed to complete successfully"); diff --git a/SystemConfiguration.fproj/SCNetworkReachability.c b/SystemConfiguration.fproj/SCNetworkReachability.c index 6792525..436077c 100644 --- a/SystemConfiguration.fproj/SCNetworkReachability.c +++ b/SystemConfiguration.fproj/SCNetworkReachability.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2017 Apple Inc. All rights reserved. + * Copyright (c) 2003-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -34,7 +34,7 @@ * - add advanced reachability APIs */ -#include +#include #include #include #include @@ -69,7 +69,11 @@ +#if __has_include() +#include +#else // __has_include() #include +#endif // __has_include() #define DEBUG_REACHABILITY_TYPE_NAME "create w/name" #define DEBUG_REACHABILITY_TYPE_NAME_OPTIONS " + options" @@ -159,7 +163,7 @@ _callback_queue() } static os_log_t -__log_SCNetworkReachability() +__log_SCNetworkReachability(void) { static os_log_t log = NULL; @@ -181,7 +185,7 @@ isA_SCNetworkReachability(CFTypeRef obj) return (isA_CFType(obj, SCNetworkReachabilityGetTypeID())); } -CFStringRef +static CFStringRef _SCNetworkReachabilityCopyTargetDescription(SCNetworkReachabilityRef target) { CFAllocatorRef allocator = CFGetAllocator(target); @@ -237,8 +241,8 @@ _SCNetworkReachabilityCopyTargetDescription(SCNetworkReachabilityRef target) } -CFStringRef -_SCNetworkReachabilityCopyTargetFlags(SCNetworkReachabilityRef target) +static CFStringRef +__SCNetworkReachabilityCopyTargetFlags(SCNetworkReachabilityRef target) { CFAllocatorRef allocator = CFGetAllocator(target); CFStringRef str; @@ -314,7 +318,7 @@ __SCNetworkReachabilityCopyDescription(CFTypeRef cf) // add flags if (targetPrivate->scheduled) { - str = _SCNetworkReachabilityCopyTargetFlags(target); + str = __SCNetworkReachabilityCopyTargetFlags(target); CFStringAppendFormat(result, NULL, CFSTR(", %@"), str); CFRelease(str); } @@ -1100,12 +1104,12 @@ __SCNetworkReachabilityGetFlagsFromPath(nw_path_t path, __block bool checkDNSFlags = TRUE; flags = kSCNetworkReachabilityFlagsReachable; why = "nw_path_status_satisfied"; -#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR +#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR if (nw_path_uses_interface_type(path, nw_interface_type_cellular)) { flags |= (kSCNetworkReachabilityFlagsTransientConnection | kSCNetworkReachabilityFlagsIsWWAN); why = "nw_path_status_satisfied, cellular"; } -#endif +#endif // TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR xpc_object_t agent_dictionary = nw_path_copy_netagent_dictionary(path); if (agent_dictionary != NULL) { if (xpc_dictionary_get_count(agent_dictionary) > 0) { @@ -1159,12 +1163,12 @@ __SCNetworkReachabilityGetFlagsFromPath(nw_path_t path, } else if (status == nw_path_status_unsatisfied) { flags = 0; why = "nw_path_status_unsatisfied"; -#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR +#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR if (nw_path_uses_interface_type(path, nw_interface_type_cellular)) { flags |= kSCNetworkReachabilityFlagsIsWWAN; why = "nw_path_status_unsatisfied, WWAN"; } -#endif +#endif // TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR } else if (status == nw_path_status_satisfiable) { flags = (kSCNetworkReachabilityFlagsReachable | kSCNetworkReachabilityFlagsConnectionRequired | kSCNetworkReachabilityFlagsTransientConnection); why = "nw_path_status_satisfiable"; @@ -1173,12 +1177,12 @@ __SCNetworkReachabilityGetFlagsFromPath(nw_path_t path, flags |= kSCNetworkReachabilityFlagsConnectionOnDemand; why = "nw_path_status_satisfiable, OnDemand"; } -#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR +#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR else if (nw_path_uses_interface_type(path, nw_interface_type_cellular)) { flags |= kSCNetworkReachabilityFlagsIsWWAN; why = "nw_path_status_satisfiable, WWAN"; } -#endif +#endif // TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR } } SC_log(LOG_DEBUG, "__SCNetworkReachabilityGetFlagsFromPath, flags = 0x%08x, %s", flags, why); @@ -1270,7 +1274,11 @@ __SCNetworkReachabilityCreateCrazyIvan46Path(nw_path_t path, nw_endpoint_t endpo struct sockaddr_in6 synthesizedAddress = { .sin6_len = sizeof(struct sockaddr_in6), .sin6_family = AF_INET6, +#if defined(NW_PORT_HOST_BYTE_ORDER) && NW_PORT_HOST_BYTE_ORDER + .sin6_port = htons(nw_endpoint_get_port(endpoint)), +#else .sin6_port = nw_endpoint_get_port(endpoint), +#endif .sin6_flowinfo = 0, .sin6_scope_id = 0 }; diff --git a/SystemConfiguration.fproj/SCNetworkReachability.h b/SystemConfiguration.fproj/SCNetworkReachability.h index 0dc6266..b4301c8 100644 --- a/SystemConfiguration.fproj/SCNetworkReachability.h +++ b/SystemConfiguration.fproj/SCNetworkReachability.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2005, 2008-2010, 2015-2016 Apple Inc. All rights reserved. + * Copyright (c) 2003-2005, 2008-2010, 2015-2016, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,7 +24,7 @@ #ifndef _SCNETWORKREACHABILITY_H #define _SCNETWORKREACHABILITY_H -#include +#include #include #include #include @@ -49,7 +49,7 @@ CF_ASSUME_NONNULL_BEGIN computer. Note that reachability does not guarantee that the data packet will actually be received by the host. - + When reachability is used without scheduling updates on a runloop or dispatch queue, the system will not generate DNS traffic and will be optimistic about its reply - it will assume that the target @@ -57,7 +57,7 @@ CF_ASSUME_NONNULL_BEGIN needed to learn the address. When scheduled, the first callback will behave like an unscheduled call but subsequent calls will leverage DNS results. - + When used on IPv6-only (NAT64+DNS64) networks, reachability checks for IPv4 address literals (either a struct sockaddr_in * or textual representations such as "192.0.2.1") will automatically give the @@ -157,24 +157,22 @@ typedef struct { This flag indicates that network traffic to the specified nodename or address will not go through a gateway, but is routed directly to one of the interfaces in the system. -#if TARGET_OS_IPHONE @constant kSCNetworkReachabilityFlagsIsWWAN This flag indicates that the specified nodename or address can be reached via an EDGE, GPRS, or other "cell" connection. -#endif // TARGET_OS_IPHONE */ typedef CF_OPTIONS(uint32_t, SCNetworkReachabilityFlags) { - kSCNetworkReachabilityFlagsTransientConnection = 1<<0, - kSCNetworkReachabilityFlagsReachable = 1<<1, - kSCNetworkReachabilityFlagsConnectionRequired = 1<<2, - kSCNetworkReachabilityFlagsConnectionOnTraffic = 1<<3, - kSCNetworkReachabilityFlagsInterventionRequired = 1<<4, - kSCNetworkReachabilityFlagsConnectionOnDemand = 1<<5, // __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0) - kSCNetworkReachabilityFlagsIsLocalAddress = 1<<16, - kSCNetworkReachabilityFlagsIsDirect = 1<<17, -#if TARGET_OS_IPHONE - kSCNetworkReachabilityFlagsIsWWAN = 1<<18, -#endif // TARGET_OS_IPHONE + kSCNetworkReachabilityFlagsTransientConnection = 1<<0, + kSCNetworkReachabilityFlagsReachable = 1<<1, + kSCNetworkReachabilityFlagsConnectionRequired = 1<<2, + kSCNetworkReachabilityFlagsConnectionOnTraffic = 1<<3, + kSCNetworkReachabilityFlagsInterventionRequired = 1<<4, + kSCNetworkReachabilityFlagsConnectionOnDemand + API_AVAILABLE(macos(6.0),ios(3.0)) = 1<<5, + kSCNetworkReachabilityFlagsIsLocalAddress = 1<<16, + kSCNetworkReachabilityFlagsIsDirect = 1<<17, + kSCNetworkReachabilityFlagsIsWWAN + API_UNAVAILABLE(macos) API_AVAILABLE(ios(2.0)) = 1<<18, kSCNetworkReachabilityFlagsConnectionAutomatic = kSCNetworkReachabilityFlagsConnectionOnTraffic }; @@ -211,7 +209,7 @@ SCNetworkReachabilityRef __nullable SCNetworkReachabilityCreateWithAddress ( CFAllocatorRef __nullable allocator, const struct sockaddr *address - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.3), ios(2.0)); /*! @function SCNetworkReachabilityCreateWithAddressPair @@ -231,7 +229,7 @@ SCNetworkReachabilityCreateWithAddressPair ( CFAllocatorRef __nullable allocator, const struct sockaddr * __nullable localAddress, const struct sockaddr * __nullable remoteAddress - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.3), ios(2.0)); /*! @function SCNetworkReachabilityCreateWithName @@ -249,7 +247,7 @@ SCNetworkReachabilityRef __nullable SCNetworkReachabilityCreateWithName ( CFAllocatorRef __nullable allocator, const char *nodename - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.3), ios(2.0)); /*! @function SCNetworkReachabilityGetTypeID @@ -257,7 +255,7 @@ SCNetworkReachabilityCreateWithName ( instances. */ CFTypeID -SCNetworkReachabilityGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0); +SCNetworkReachabilityGetTypeID (void) API_AVAILABLE(macos(10.3), ios(2.0)); /*! @@ -276,7 +274,7 @@ Boolean SCNetworkReachabilityGetFlags ( SCNetworkReachabilityRef target, SCNetworkReachabilityFlags *flags - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.3), ios(2.0)); /*! @function SCNetworkReachabilitySetCallback @@ -296,7 +294,7 @@ SCNetworkReachabilitySetCallback ( SCNetworkReachabilityRef target, SCNetworkReachabilityCallBack __nullable callout, SCNetworkReachabilityContext * __nullable context - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.3), ios(2.0)); /*! @function SCNetworkReachabilityScheduleWithRunLoop @@ -315,7 +313,7 @@ SCNetworkReachabilityScheduleWithRunLoop ( SCNetworkReachabilityRef target, CFRunLoopRef runLoop, CFStringRef runLoopMode - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.3), ios(2.0)); /*! @function SCNetworkReachabilityUnscheduleFromRunLoop @@ -335,7 +333,7 @@ SCNetworkReachabilityUnscheduleFromRunLoop ( SCNetworkReachabilityRef target, CFRunLoopRef runLoop, CFStringRef runLoopMode - ) __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.3), ios(2.0)); /*! @function SCNetworkReachabilitySetDispatchQueue @@ -343,7 +341,7 @@ SCNetworkReachabilityUnscheduleFromRunLoop ( dispatch queue. @param target The address or name that is set up for asynchronous notifications. Must be non-NULL. - @param queue A libdispatch queue to run the callback on. + @param queue A libdispatch queue to run the callback on. Pass NULL to unschedule callbacks. @result Returns TRUE if the target is scheduled or unscheduled successfully; FALSE otherwise. @@ -352,11 +350,11 @@ Boolean SCNetworkReachabilitySetDispatchQueue ( SCNetworkReachabilityRef target, dispatch_queue_t __nullable queue - ) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_4_0); + ) API_AVAILABLE(macos(10.6), ios(4.0)); __END_DECLS CF_ASSUME_NONNULL_END CF_IMPLICIT_BRIDGING_DISABLED -#endif /* _SCNETWORKREACHABILITY_H */ +#endif /* _SCNETWORKREACHABILITY_H */ diff --git a/SystemConfiguration.fproj/SCNetworkReachabilityInternal.h b/SystemConfiguration.fproj/SCNetworkReachabilityInternal.h index 79c342c..85ecdb9 100644 --- a/SystemConfiguration.fproj/SCNetworkReachabilityInternal.h +++ b/SystemConfiguration.fproj/SCNetworkReachabilityInternal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2017 Apple Inc. All rights reserved. + * Copyright (c) 2003-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,7 +24,7 @@ #ifndef _SCNETWORKREACHABILITYINTERNAL_H #define _SCNETWORKREACHABILITYINTERNAL_H -#include +#include #include #include #include @@ -38,7 +38,11 @@ #include #include +#if __has_include() +#include +#else // __has_include() #include +#endif // __has_include() #pragma mark - #pragma mark SCNetworkReachability @@ -122,10 +126,6 @@ typedef struct { __BEGIN_DECLS -CFStringRef -_SCNetworkReachabilityCopyTargetDescription (SCNetworkReachabilityRef target); - - static __inline__ ReachabilityRankType __SCNetworkReachabilityRank(SCNetworkReachabilityFlags flags) { diff --git a/SystemConfiguration.fproj/SCNetworkReachabilityLogging.h b/SystemConfiguration.fproj/SCNetworkReachabilityLogging.h index 8c82764..c3cb87e 100644 --- a/SystemConfiguration.fproj/SCNetworkReachabilityLogging.h +++ b/SystemConfiguration.fproj/SCNetworkReachabilityLogging.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Apple Inc. All rights reserved. + * Copyright (c) 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,7 +24,7 @@ #ifndef _SCNETWORKREACHABILITYLOGGING_H #define _SCNETWORKREACHABILITYLOGGING_H -#include +#include #include #include #include diff --git a/SystemConfiguration.fproj/SCNetworkSignature.c b/SystemConfiguration.fproj/SCNetworkSignature.c index aa855e7..38b695c 100644 --- a/SystemConfiguration.fproj/SCNetworkSignature.c +++ b/SystemConfiguration.fproj/SCNetworkSignature.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2008, 2009, 2011-2015, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2006, 2008, 2009, 2011-2015, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -49,7 +49,11 @@ #include #include #include +#if __has_include() +#include +#else // __has_include() #include +#endif // __has_include() #pragma mark SCNetworkSignature Supporting APIs diff --git a/SystemConfiguration.fproj/SCNetworkSignature.h b/SystemConfiguration.fproj/SCNetworkSignature.h index 256ebda..974b9bc 100644 --- a/SystemConfiguration.fproj/SCNetworkSignature.h +++ b/SystemConfiguration.fproj/SCNetworkSignature.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2006, 2008, 2011, 2012, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2006, 2008, 2011, 2012, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,14 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCNETWORKSIGNATURE_H #define _SCNETWORKSIGNATURE_H -#include +#include #include #include #include @@ -55,7 +55,7 @@ __BEGIN_DECLS NULL if no networks are currently active. */ CFArrayRef /* of CFStringRef's */ -SCNetworkSignatureCopyActiveIdentifiers(CFAllocatorRef alloc) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +SCNetworkSignatureCopyActiveIdentifiers(CFAllocatorRef alloc) API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSignatureCopyActiveIdentifierForAddress @@ -75,7 +75,7 @@ SCNetworkSignatureCopyActiveIdentifiers(CFAllocatorRef alloc) __OSX_AVAILABLE_ */ CFStringRef SCNetworkSignatureCopyActiveIdentifierForAddress(CFAllocatorRef alloc, - const struct sockaddr * addr) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); + const struct sockaddr * addr) API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCNetworkSignatureCopyIdentifierForConnectedSocket @@ -93,7 +93,7 @@ SCNetworkSignatureCopyActiveIdentifierForAddress(CFAllocatorRef alloc, */ CFStringRef SCNetworkSignatureCopyIdentifierForConnectedSocket(CFAllocatorRef alloc, - int sock_fd) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); + int sock_fd) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS diff --git a/SystemConfiguration.fproj/SCPCommit.c b/SystemConfiguration.fproj/SCPCommit.c index 717c345..b311bdd 100644 --- a/SystemConfiguration.fproj/SCPCommit.c +++ b/SystemConfiguration.fproj/SCPCommit.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2008, 2010-2013, 2015-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2008, 2010-2013, 2015-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -197,9 +197,7 @@ SCPreferencesCommitChanges(SCPreferencesRef prefs) int fd; CFDataRef newPrefs; CFIndex pathLen; -#if TARGET_OS_EMBEDDED CFStringRef protectionClass; -#endif // TARGET_OS_EMBEDDED char * thePath; if (stat(prefsPrivate->path, &statBuf) == -1) { @@ -220,7 +218,6 @@ SCPreferencesCommitChanges(SCPreferencesRef prefs) thePath = CFAllocatorAllocate(NULL, pathLen, 0); snprintf(thePath, pathLen, "%s-new", path); -#if TARGET_OS_EMBEDDED if ((prefsPrivate->options != NULL) && CFDictionaryGetValueIfPresent(prefsPrivate->options, kSCPreferencesOptionProtectionClass, @@ -239,9 +236,9 @@ SCPreferencesCommitChanges(SCPreferencesRef prefs) pc = str[0] - 'A' + 1; // PROTECTION_CLASS_[ABCDEF] fd = open_dprotected_np(thePath, O_WRONLY|O_CREAT, pc, 0, statBuf.st_mode); - } else -#endif // TARGET_OS_EMBEDDED + } else { fd = open(thePath, O_WRONLY|O_CREAT, statBuf.st_mode); + } if (fd == -1) { _SCErrorSet(errno); diff --git a/SystemConfiguration.fproj/SCPLock.c b/SystemConfiguration.fproj/SCPLock.c index 4ec7564..cc1fca2 100644 --- a/SystemConfiguration.fproj/SCPLock.c +++ b/SystemConfiguration.fproj/SCPLock.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2010, 2013, 2015-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2010, 2013, 2015-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/SystemConfiguration.fproj/SCPOpen.c b/SystemConfiguration.fproj/SCPOpen.c index 91c9447..d800ce5 100644 --- a/SystemConfiguration.fproj/SCPOpen.c +++ b/SystemConfiguration.fproj/SCPOpen.c @@ -1,5 +1,5 @@ /* - * Copyright(c) 2000-2017 Apple Inc. All rights reserved. + * Copyright(c) 2000-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -34,7 +34,7 @@ * - initial revision */ -#include +#include #include #include #include @@ -54,7 +54,7 @@ const AuthorizationRef kSCPreferencesUseEntitlementAuthorization = (Authorizatio __private_extern__ os_log_t -__log_SCPreferences() +__log_SCPreferences(void) { static os_log_t log = NULL; @@ -82,9 +82,10 @@ __SCPreferencesCopyDescription(CFTypeRef cf) { result = CFStringCreateMutable(allocator, 0); CFStringAppendFormat(result, NULL, CFSTR(" {"), cf, allocator); CFStringAppendFormat(result, NULL, CFSTR("name = %@"), prefsPrivate->name); - CFStringAppendFormat(result, NULL, CFSTR(", id = %@"), prefsPrivate->prefsID); + CFStringAppendFormat(result, NULL, CFSTR(", id = %@"), + prefsPrivate->prefsID != NULL ? prefsPrivate->prefsID : CFSTR("[default]")); CFStringAppendFormat(result, NULL, CFSTR(", path = %s"), - prefsPrivate->newPath ? prefsPrivate->newPath : prefsPrivate->path); + prefsPrivate->newPath != NULL ? prefsPrivate->newPath : prefsPrivate->path); if (prefsPrivate->accessed) { CFStringAppendFormat(result, NULL, CFSTR(", accessed")); } @@ -683,7 +684,7 @@ SCPreferencesCreateWithOptions(CFAllocatorRef allocator, data); CFRelease(data); } -#endif +#endif // !TARGET_OS_IPHONE /* get the application/executable/bundle name */ bundle = CFBundleGetMainBundle(); @@ -780,13 +781,19 @@ prefsNotify(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) CFStringRef key; key = CFArrayGetValueAtIndex(changedKeys, i); + + // check if "commit" if (CFEqual(key, prefsPrivate->sessionKeyCommit)) { // if preferences have been saved notify |= kSCPreferencesNotificationCommit; + continue; } + + // check if "apply" if (CFEqual(key, prefsPrivate->sessionKeyApply)) { // if stored preferences should be applied to current configuration notify |= kSCPreferencesNotificationApply; + continue; } } @@ -813,7 +820,7 @@ prefsNotify(SCDynamicStoreRef store, CFArrayRef changedKeys, void *info) SC_log(LOG_DEBUG, "exec SCPreferences callout: %s%s%s", ((notify & kSCPreferencesNotificationCommit) != 0) ? "commit" : "", (((notify & kSCPreferencesNotificationCommit) != 0) && - ((notify & kSCPreferencesNotificationApply ) != 0)) ? ", " : "", + ((notify & kSCPreferencesNotificationApply ) != 0)) ? ", " : "", ((notify & kSCPreferencesNotificationApply) != 0) ? "apply" : ""); (*rlsFunction)(prefs, notify, context_info); } diff --git a/SystemConfiguration.fproj/SCPreferences.h b/SystemConfiguration.fproj/SCPreferences.h index de07f28..e1d639b 100644 --- a/SystemConfiguration.fproj/SCPreferences.h +++ b/SystemConfiguration.fproj/SCPreferences.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2004, 2005, 2007-2010, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2004, 2005, 2007-2010, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,17 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCPREFERENCES_H -#ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -#include -#else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #define _SCPREFERENCES_H -#include +#include #include #include #include @@ -86,8 +83,12 @@ typedef const struct CF_BRIDGED_TYPE(id) __SCPreferences * SCPreferencesRef; preferences to the active system configuration. */ typedef CF_OPTIONS(uint32_t, SCPreferencesNotification) { - kSCPreferencesNotificationCommit = 1<<0, // __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/) - kSCPreferencesNotificationApply = 1<<1 // __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/) + kSCPreferencesNotificationCommit + API_AVAILABLE(macos(4.0)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)) = 1<<0, + kSCPreferencesNotificationApply + API_AVAILABLE(macos(4.0)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)) = 1<<1 }; /*! @@ -140,7 +141,7 @@ __BEGIN_DECLS @discussion Returns the type identifier of all SCPreferences instances. */ CFTypeID -SCPreferencesGetTypeID (void) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +SCPreferencesGetTypeID (void) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesCreate @@ -164,7 +165,7 @@ SCPreferencesCreate ( CFAllocatorRef __nullable allocator, CFStringRef name, CFStringRef __nullable prefsID - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @@ -193,7 +194,7 @@ SCPreferencesCreateWithAuthorization ( CFStringRef name, CFStringRef __nullable prefsID, AuthorizationRef __nullable authorization - ) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesLock @@ -214,7 +215,7 @@ Boolean SCPreferencesLock ( SCPreferencesRef prefs, Boolean wait - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesCommitChanges @@ -236,7 +237,7 @@ SCPreferencesLock ( Boolean SCPreferencesCommitChanges ( SCPreferencesRef prefs - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesApplyChanges @@ -249,7 +250,7 @@ SCPreferencesCommitChanges ( Boolean SCPreferencesApplyChanges ( SCPreferencesRef prefs - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesUnlock @@ -265,7 +266,7 @@ SCPreferencesApplyChanges ( Boolean SCPreferencesUnlock ( SCPreferencesRef prefs - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesGetSignature @@ -278,7 +279,7 @@ SCPreferencesUnlock ( CFDataRef __nullable SCPreferencesGetSignature ( SCPreferencesRef prefs - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesCopyKeyList @@ -290,7 +291,7 @@ SCPreferencesGetSignature ( CFArrayRef __nullable SCPreferencesCopyKeyList ( SCPreferencesRef prefs - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesGetValue @@ -310,7 +311,7 @@ CFPropertyListRef __nullable SCPreferencesGetValue ( SCPreferencesRef prefs, CFStringRef key - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesAddValue @@ -332,7 +333,7 @@ SCPreferencesAddValue ( SCPreferencesRef prefs, CFStringRef key, CFPropertyListRef value - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesSetValue @@ -353,7 +354,7 @@ SCPreferencesSetValue ( SCPreferencesRef prefs, CFStringRef key, CFPropertyListRef value - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesRemoveValue @@ -371,7 +372,7 @@ Boolean SCPreferencesRemoveValue ( SCPreferencesRef prefs, CFStringRef key - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesSetCallback @@ -391,7 +392,7 @@ SCPreferencesSetCallback ( SCPreferencesRef prefs, SCPreferencesCallBack __nullable callout, SCPreferencesContext * __nullable context - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesScheduleWithRunLoop @@ -411,7 +412,7 @@ SCPreferencesScheduleWithRunLoop ( SCPreferencesRef prefs, CFRunLoopRef runLoop, CFStringRef runLoopMode - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesUnscheduleFromRunLoop @@ -431,7 +432,7 @@ SCPreferencesUnscheduleFromRunLoop ( SCPreferencesRef prefs, CFRunLoopRef runLoop, CFStringRef runLoopMode - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesSetDispatchQueue @@ -446,7 +447,7 @@ Boolean SCPreferencesSetDispatchQueue ( SCPreferencesRef prefs, dispatch_queue_t __nullable queue - ) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_4_0/*SPI*/); + ) API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesSynchronize @@ -462,12 +463,11 @@ SCPreferencesSetDispatchQueue ( void SCPreferencesSynchronize ( SCPreferencesRef prefs - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS CF_ASSUME_NONNULL_END CF_IMPLICIT_BRIDGING_DISABLED -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ -#endif /* _SCPREFERENCES_H */ +#endif /* _SCPREFERENCES_H */ diff --git a/SystemConfiguration.fproj/SCPreferencesInternal.h b/SystemConfiguration.fproj/SCPreferencesInternal.h index 22e6c44..95fb934 100644 --- a/SystemConfiguration.fproj/SCPreferencesInternal.h +++ b/SystemConfiguration.fproj/SCPreferencesInternal.h @@ -133,7 +133,7 @@ typedef struct { __BEGIN_DECLS os_log_t -__log_SCPreferences (); +__log_SCPreferences (void); Boolean __SCPreferencesCreate_helper (SCPreferencesRef prefs); diff --git a/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.c b/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.c index 83cc678..e39e0e5 100644 --- a/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.c +++ b/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, 2007, 2010, 2014, 2016, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2006, 2007, 2010, 2014, 2016-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -31,7 +31,7 @@ * - created (for EAP) */ -#include +#include #include #include #include diff --git a/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.h b/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.h index c45f48b..cb421e7 100644 --- a/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.h +++ b/SystemConfiguration.fproj/SCPreferencesKeychainPrivate.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2006, 2008 Apple Inc. All rights reserved. + * Copyright (c) 2006, 2008, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -29,7 +29,7 @@ * - routines to deal with keychain passwords */ -#include +#include #include #include #include @@ -37,7 +37,7 @@ #if !TARGET_OS_IPHONE #include #else // !TARGET_OS_IPHONE -typedef struct OpaqueSecKeychainRef *SecKeychainRef; +typedef struct CF_BRIDGED_TYPE(id) __SecKeychain *SecKeychainRef; #endif // !TARGET_OS_IPHONE #pragma mark - @@ -49,19 +49,19 @@ typedef struct OpaqueSecKeychainRef *SecKeychainRef; __BEGIN_DECLS SecKeychainRef -_SCSecKeychainCopySystemKeychain (void) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +_SCSecKeychainCopySystemKeychain (void) API_AVAILABLE(macos(10.5), ios(2.0)); CFDataRef _SCSecKeychainPasswordItemCopy (SecKeychainRef keychain, - CFStringRef unique_id) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + CFStringRef unique_id) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean _SCSecKeychainPasswordItemExists (SecKeychainRef keychain, - CFStringRef unique_id) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + CFStringRef unique_id) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean _SCSecKeychainPasswordItemRemove (SecKeychainRef keychain, - CFStringRef unique_id) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + CFStringRef unique_id) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean _SCSecKeychainPasswordItemSet (SecKeychainRef keychain, @@ -70,7 +70,7 @@ _SCSecKeychainPasswordItemSet (SecKeychainRef keychain, CFStringRef description, CFStringRef account, CFDataRef password, - CFDictionaryRef options) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + CFDictionaryRef options) API_AVAILABLE(macos(10.5), ios(2.0)); #pragma mark - @@ -79,15 +79,15 @@ _SCSecKeychainPasswordItemSet (SecKeychainRef keychain, CFDataRef _SCPreferencesSystemKeychainPasswordItemCopy (SCPreferencesRef prefs, - CFStringRef unique_id) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + CFStringRef unique_id) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean _SCPreferencesSystemKeychainPasswordItemExists (SCPreferencesRef prefs, - CFStringRef unique_id) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + CFStringRef unique_id) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean _SCPreferencesSystemKeychainPasswordItemRemove (SCPreferencesRef prefs, - CFStringRef unique_id) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + CFStringRef unique_id) API_AVAILABLE(macos(10.5), ios(2.0)); Boolean _SCPreferencesSystemKeychainPasswordItemSet (SCPreferencesRef prefs, @@ -96,9 +96,8 @@ _SCPreferencesSystemKeychainPasswordItemSet (SCPreferencesRef prefs, CFStringRef description, CFStringRef account, CFDataRef password, - CFDictionaryRef options) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); + CFDictionaryRef options) API_AVAILABLE(macos(10.5), ios(2.0)); __END_DECLS #endif // _SCPREFERENCESKEYCHAINPRIVATE_H - diff --git a/SystemConfiguration.fproj/SCPreferencesPath.h b/SystemConfiguration.fproj/SCPreferencesPath.h index c219d2f..b965eab 100644 --- a/SystemConfiguration.fproj/SCPreferencesPath.h +++ b/SystemConfiguration.fproj/SCPreferencesPath.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2004, 2005, 2008, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2004, 2005, 2008, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,17 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCPREFERENCESPATH_H -#ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -#include -#else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #define _SCPREFERENCESPATH_H -#include +#include #include #include #include @@ -96,7 +93,7 @@ CFStringRef __nullable SCPreferencesPathCreateUniqueChild ( SCPreferencesRef prefs, CFStringRef prefix - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesPathGetValue @@ -111,7 +108,7 @@ CFDictionaryRef __nullable SCPreferencesPathGetValue ( SCPreferencesRef prefs, CFStringRef path - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesPathGetLink @@ -126,7 +123,7 @@ CFStringRef __nullable SCPreferencesPathGetLink ( SCPreferencesRef prefs, CFStringRef path - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesPathSetValue @@ -142,7 +139,7 @@ SCPreferencesPathSetValue ( SCPreferencesRef prefs, CFStringRef path, CFDictionaryRef value - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesPathSetLink @@ -159,7 +156,7 @@ SCPreferencesPathSetLink ( SCPreferencesRef prefs, CFStringRef path, CFStringRef link - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesPathRemoveValue @@ -172,12 +169,11 @@ Boolean SCPreferencesPathRemoveValue ( SCPreferencesRef prefs, CFStringRef path - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS CF_ASSUME_NONNULL_END CF_IMPLICIT_BRIDGING_DISABLED -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ -#endif /* _SCPREFERENCESPATH_H */ +#endif /* _SCPREFERENCESPATH_H */ diff --git a/SystemConfiguration.fproj/SCPreferencesPathKey.c b/SystemConfiguration.fproj/SCPreferencesPathKey.c index d1ffeb9..159b9ea 100644 --- a/SystemConfiguration.fproj/SCPreferencesPathKey.c +++ b/SystemConfiguration.fproj/SCPreferencesPathKey.c @@ -32,7 +32,7 @@ #include -__private_extern__ CFStringRef +CFStringRef SCPreferencesPathKeyCreate(CFAllocatorRef allocator, CFStringRef fmt, ...) @@ -51,7 +51,7 @@ SCPreferencesPathKeyCreate(CFAllocatorRef allocator, } -__private_extern__ CFStringRef +CFStringRef SCPreferencesPathKeyCreateNetworkServices(CFAllocatorRef allocator) { /* @@ -64,7 +64,7 @@ SCPreferencesPathKeyCreateNetworkServices(CFAllocatorRef allocator) } -__private_extern__ CFStringRef +CFStringRef SCPreferencesPathKeyCreateNetworkServiceEntity(CFAllocatorRef allocator, CFStringRef service, CFStringRef entity) @@ -96,7 +96,7 @@ SCPreferencesPathKeyCreateNetworkServiceEntity(CFAllocatorRef allocator, } -__private_extern__ CFStringRef +CFStringRef SCPreferencesPathKeyCreateSets(CFAllocatorRef allocator) { /* @@ -109,7 +109,7 @@ SCPreferencesPathKeyCreateSets(CFAllocatorRef allocator) } -__private_extern__ CFStringRef +CFStringRef SCPreferencesPathKeyCreateSet(CFAllocatorRef allocator, CFStringRef set) { @@ -124,7 +124,7 @@ SCPreferencesPathKeyCreateSet(CFAllocatorRef allocator, } -__private_extern__ CFStringRef +CFStringRef SCPreferencesPathKeyCreateSetNetworkGlobalEntity(CFAllocatorRef allocator, CFStringRef set, CFStringRef entity) @@ -143,7 +143,7 @@ SCPreferencesPathKeyCreateSetNetworkGlobalEntity(CFAllocatorRef allocator, } -__private_extern__ CFStringRef +CFStringRef SCPreferencesPathKeyCreateSetNetworkInterfaceEntity(CFAllocatorRef allocator, CFStringRef set, CFStringRef ifname, @@ -174,7 +174,7 @@ SCPreferencesPathKeyCreateSetNetworkInterfaceEntity(CFAllocatorRef allocator, } -__private_extern__ CFStringRef +CFStringRef SCPreferencesPathKeyCreateSetNetworkService(CFAllocatorRef allocator, CFStringRef set, CFStringRef service) @@ -210,7 +210,7 @@ SCPreferencesPathKeyCreateSetNetworkService(CFAllocatorRef allocator, } -__private_extern__ CFStringRef +CFStringRef SCPreferencesPathKeyCreateSetNetworkServiceEntity(CFAllocatorRef allocator, CFStringRef set, CFStringRef service, diff --git a/SystemConfiguration.fproj/SCPreferencesPathKey.h b/SystemConfiguration.fproj/SCPreferencesPathKey.h index e74945c..3d0f540 100644 --- a/SystemConfiguration.fproj/SCPreferencesPathKey.h +++ b/SystemConfiguration.fproj/SCPreferencesPathKey.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2004, 2005, 2008 Apple Inc. All rights reserved. + * Copyright (c) 2004, 2005, 2008, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,14 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCPREFERENCESPATHKEY_H #define _SCPREFERENCESPATHKEY_H -#include +#include #include #include @@ -48,7 +48,7 @@ SCPreferencesPathKeyCreate ( CFAllocatorRef allocator, CFStringRef fmt, ... - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.4), ios(2.0)); /*! @function SCPreferencesPathKeyCreateNetworkServices @@ -56,7 +56,7 @@ SCPreferencesPathKeyCreate ( CFStringRef SCPreferencesPathKeyCreateNetworkServices ( CFAllocatorRef allocator - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.4), ios(2.0)); /*! @function SCPreferencesPathKeyCreateNetworkServiceEntity @@ -66,7 +66,7 @@ SCPreferencesPathKeyCreateNetworkServiceEntity ( CFAllocatorRef allocator, CFStringRef service, CFStringRef entity - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.4), ios(2.0)); /*! @function SCPreferencesPathKeyCreateSets @@ -74,7 +74,7 @@ SCPreferencesPathKeyCreateNetworkServiceEntity ( CFStringRef SCPreferencesPathKeyCreateSets ( CFAllocatorRef allocator - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.4), ios(2.0)); /*! @function SCPreferencesPathKeyCreateSet @@ -83,7 +83,7 @@ CFStringRef SCPreferencesPathKeyCreateSet ( CFAllocatorRef allocator, CFStringRef set - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.4), ios(2.0)); /*! @function SCPreferencesPathKeyCreateSetNetworkInterfaceEntity @@ -94,7 +94,7 @@ SCPreferencesPathKeyCreateSetNetworkInterfaceEntity( CFStringRef set, CFStringRef ifname, CFStringRef entity - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.4), ios(2.0)); /*! @function SCPreferencesPathKeyCreateSetNetworkGlobalEntity @@ -104,7 +104,7 @@ SCPreferencesPathKeyCreateSetNetworkGlobalEntity( CFAllocatorRef allocator, CFStringRef set, CFStringRef entity - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.4), ios(2.0)); /*! @function SCPreferencesPathKeyCreateSetNetworkService @@ -114,7 +114,7 @@ SCPreferencesPathKeyCreateSetNetworkService ( CFAllocatorRef allocator, CFStringRef set, CFStringRef service - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.4), ios(2.0)); /*! @function SCPreferencesPathKeyCreateSetNetworkServiceEntity @@ -125,8 +125,8 @@ SCPreferencesPathKeyCreateSetNetworkServiceEntity( CFStringRef set, CFStringRef service, CFStringRef entity - ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + ) API_AVAILABLE(macos(10.4), ios(2.0)); __END_DECLS -#endif /* _SCPREFERENCESPATHKEY_H */ +#endif /* _SCPREFERENCESPATHKEY_H */ diff --git a/SystemConfiguration.fproj/SCPreferencesPrivate.h b/SystemConfiguration.fproj/SCPreferencesPrivate.h index 0767e50..eabdba3 100644 --- a/SystemConfiguration.fproj/SCPreferencesPrivate.h +++ b/SystemConfiguration.fproj/SCPreferencesPrivate.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2005, 2007-2009, 2011, 2012, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2007-2009, 2011, 2012, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -25,7 +25,7 @@ #define _SCPREFERENCESPRIVATE_H -#include +#include #include #include #include @@ -43,14 +43,12 @@ */ #define kSCPreferencesOptionChangeNetworkSet CFSTR("change-network-set") // CFBooleanRef -#if TARGET_OS_EMBEDDED /*! @defined kSCPreferencesOptionProtectionClass @abstract The SCPreferences "option" used to indicate the file protection class of the .plist. */ #define kSCPreferencesOptionProtectionClass CFSTR("ProtectionClass") // CFStringRef["A"-"F"] -#endif // TARGET_OS_EMBEDDED /*! @defined kSCPreferencesOptionRemoveWhenEmpty @@ -122,7 +120,7 @@ SCDynamicStoreKeyCreatePreferences ( CFAllocatorRef allocator, CFStringRef prefsID, SCPreferencesKeyType keyType - ) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_2_0,__IPHONE_2_0); + ) API_DEPRECATED("No longer supported", macos(10.1,10.4), ios(2.0,2.0)); /*! @function SCPreferencesCreateWithOptions @@ -154,7 +152,7 @@ SCPreferencesCreateWithOptions ( CFStringRef prefsID, AuthorizationRef authorization, CFDictionaryRef options - ) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); + ) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesRemoveAllValues @@ -170,8 +168,8 @@ SCPreferencesCreateWithOptions ( Boolean SCPreferencesRemoveAllValues ( SCPreferencesRef prefs - ) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); + ) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS -#endif /* _SCPREFERENCESPRIVATE_H */ +#endif /* _SCPREFERENCESPRIVATE_H */ diff --git a/SystemConfiguration.fproj/SCPreferencesSetSpecific.h b/SystemConfiguration.fproj/SCPreferencesSetSpecific.h index 647c808..2c6028a 100644 --- a/SystemConfiguration.fproj/SCPreferencesSetSpecific.h +++ b/SystemConfiguration.fproj/SCPreferencesSetSpecific.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2002, 2004, 2005, 2008, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2000-2002, 2004, 2005, 2008, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,17 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCPREFERENCESSETSPECIFIC_H -#ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -#include -#else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #define _SCPREFERENCESSETSPECIFIC_H -#include +#include #include #include #include @@ -67,7 +64,7 @@ SCPreferencesSetComputerName ( SCPreferencesRef prefs, CFStringRef __nullable name, CFStringEncoding nameEncoding - ) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); /*! @function SCPreferencesSetLocalHostName @@ -88,12 +85,11 @@ Boolean SCPreferencesSetLocalHostName ( SCPreferencesRef prefs, CFStringRef __nullable name - ) __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); + ) API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); __END_DECLS CF_ASSUME_NONNULL_END CF_IMPLICIT_BRIDGING_DISABLED -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ -#endif /* _SCPREFERENCESSETSPECIFIC_H */ +#endif /* _SCPREFERENCESSETSPECIFIC_H */ diff --git a/SystemConfiguration.fproj/SCPrivate.h b/SystemConfiguration.fproj/SCPrivate.h index aa34c5d..2a71f97 100644 --- a/SystemConfiguration.fproj/SCPrivate.h +++ b/SystemConfiguration.fproj/SCPrivate.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -86,7 +86,7 @@ /* get-network-info script path */ -#if !TARGET_OS_EMBEDDED +#if TARGET_OS_OSX #define SYSTEMCONFIGURATION_GET_NETWORK_INFO_PATH SYSTEMCONFIGURATION_FRAMEWORK_PATH "/Resources/get-network-info" #else #define SYSTEMCONFIGURATION_GET_NETWORK_INFO_PATH SYSTEMCONFIGURATION_FRAMEWORK_PATH "/get-network-info" @@ -94,7 +94,7 @@ /* crash report(s) directory path */ -#if !TARGET_OS_EMBEDDED +#if TARGET_OS_OSX #define _SC_CRASH_DIR "/Library/Logs/DiagnosticReports" #else #define _SC_CRASH_DIR "/Library/Logs/CrashReporter" @@ -426,7 +426,7 @@ void _SC_sendMachMessage (mach_port_t port, used for [SystemConfiguration] logging. @result The os_log_t object */ -os_log_t _SC_LOG_DEFAULT (); +os_log_t _SC_LOG_DEFAULT (void); /*! @@ -578,7 +578,7 @@ void SCPrint (Boolean condition, CFArrayRef SCNetworkProxiesCopyMatching (CFDictionaryRef globalConfiguration, CFStringRef server, - CFStringRef interface) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); + CFStringRef interface) API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCProxiesMatchServer CFSTR("Server") /* CFString */ #define kSCProxiesMatchInterface CFSTR("Interface") /* CFString */ @@ -611,7 +611,7 @@ SCNetworkProxiesCopyMatching (CFDictionaryRef globalConfiguration, */ CFArrayRef SCNetworkProxiesCopyMatchingWithOptions (CFDictionaryRef globalConfiguration, - CFDictionaryRef options) __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/); + CFDictionaryRef options) API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(8.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); extern const CFStringRef kSCProxiesNoGlobal; @@ -625,7 +625,7 @@ extern const CFStringRef kSCProxiesNoGlobal; You must release the returned value. */ CFDataRef -SCNetworkProxiesCreateProxyAgentData(CFDictionaryRef proxyConfig) __OSX_AVAILABLE_STARTING(__MAC_10_12,__IPHONE_10_0/*SPI*/); +SCNetworkProxiesCreateProxyAgentData (CFDictionaryRef proxyConfig) API_AVAILABLE(macos(10.12)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(3.0)); /*! @function SCDynamicStoreCopyProxiesWithOptions @@ -646,7 +646,8 @@ SCNetworkProxiesCreateProxyAgentData(CFDictionaryRef proxyConfig) __OSX_AVAILABL You must release the returned value. */ CFDictionaryRef -SCDynamicStoreCopyProxiesWithOptions(SCDynamicStoreRef store, CFDictionaryRef options) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +SCDynamicStoreCopyProxiesWithOptions (SCDynamicStoreRef store, + CFDictionaryRef options) API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #pragma mark - #pragma mark Reachability diff --git a/SystemConfiguration.fproj/SCSchemaDefinitions.c b/SystemConfiguration.fproj/SCSchemaDefinitions.c index 683f4e5..b975b4f 100644 --- a/SystemConfiguration.fproj/SCSchemaDefinitions.c +++ b/SystemConfiguration.fproj/SCSchemaDefinitions.c @@ -3,7 +3,7 @@ * DO NOT EDIT! */ -#include +#include #include #include @@ -74,6 +74,7 @@ const CFStringRef kSCEntNetIPv6RouterExpired = CFSTR("IPv6 const CFStringRef kSCEntNetLinkIssues = CFSTR("LinkIssues"); const CFStringRef kSCEntNetLinkQuality = CFSTR("LinkQuality"); const CFStringRef kSCEntNetLoopback = CFSTR("Loopback"); +const CFStringRef kSCEntNetNAT64 = CFSTR("NAT64"); const CFStringRef kSCEntNetNAT64PrefixRequest = CFSTR("NAT64PrefixRequest"); const CFStringRef kSCEntNetOnDemand = CFSTR("OnDemand"); const CFStringRef kSCEntNetQoSMarkingPolicy = CFSTR("QoSMarkingPolicy"); @@ -194,6 +195,7 @@ const CFStringRef kSCValNetIPv4ConfigMethodLinkLocal = CFSTR("Link const CFStringRef kSCValNetIPv4ConfigMethodManual = CFSTR("Manual"); const CFStringRef kSCValNetIPv4ConfigMethodPPP = CFSTR("PPP"); const CFStringRef kSCPropNetIPv4AdditionalRoutes = CFSTR("AdditionalRoutes"); +const CFStringRef kSCPropNetIPv4CLAT46 = CFSTR("CLAT46"); const CFStringRef kSCPropNetIPv4ExcludedRoutes = CFSTR("ExcludedRoutes"); const CFStringRef kSCPropNetIPv4IncludedRoutes = CFSTR("IncludedRoutes"); const CFStringRef kSCValNetIPv4ConfigMethodFailover = CFSTR("Failover"); @@ -218,6 +220,7 @@ const CFStringRef kSCPropNetIPv6AdditionalRoutes = CFSTR("Addi const CFStringRef kSCPropNetIPv6EnableCGA = CFSTR("EnableCGA"); const CFStringRef kSCPropNetIPv6ExcludedRoutes = CFSTR("ExcludedRoutes"); const CFStringRef kSCPropNetIPv6IncludedRoutes = CFSTR("IncludedRoutes"); +const CFStringRef kSCPropNetIPv6PerformPLATDiscovery = CFSTR("PerformPLATDiscovery"); const CFStringRef kSCPropNetIPv6RouteDestinationAddress = CFSTR("DestinationAddress"); const CFStringRef kSCPropNetIPv6RoutePrefixLength = CFSTR("PrefixLength"); const CFStringRef kSCPropNetIPv6RouteGatewayAddress = CFSTR("GatewayAddress"); @@ -332,6 +335,9 @@ const CFStringRef kSCPropNetL2TPTransport = CFSTR("Tran const CFStringRef kSCValNetL2TPIPSecSharedSecretEncryptionKeychain = CFSTR("Keychain"); const CFStringRef kSCValNetL2TPTransportIP = CFSTR("IP"); const CFStringRef kSCValNetL2TPTransportIPSec = CFSTR("IPSec"); +const CFStringRef kSCPropNetNAT64PrefixList = CFSTR("PrefixList"); +const CFStringRef kSCPropNetNAT64PLATDiscoveryStartTime = CFSTR("PLATDiscoveryStartTime"); +const CFStringRef kSCPropNetNAT64PLATDiscoveryCompletionTime = CFSTR("PLATDiscoveryCompletionTime"); const CFStringRef kSCPropNetProxiesExceptionsList = CFSTR("ExceptionsList"); const CFStringRef kSCPropNetProxiesExcludeSimpleHostnames = CFSTR("ExcludeSimpleHostnames"); const CFStringRef kSCPropNetProxiesFTPEnable = CFSTR("FTPEnable"); diff --git a/SystemConfiguration.fproj/SCSchemaDefinitions.h b/SystemConfiguration.fproj/SCSchemaDefinitions.h index ea059e1..236eaa3 100644 --- a/SystemConfiguration.fproj/SCSchemaDefinitions.h +++ b/SystemConfiguration.fproj/SCSchemaDefinitions.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -412,12 +412,9 @@ #ifndef _SCSCHEMADEFINITIONS_H -#ifdef USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS -#include -#else /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #define _SCSCHEMADEFINITIONS_H -#include +#include #include #include @@ -425,7 +422,6 @@ * @header SCSchemaDefinitions */ -#define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_FUTURE __AVAILABILITY_INTERNAL__IPHONE_2_0/*SPI*/ CF_ASSUME_NONNULL_BEGIN @@ -433,41 +429,41 @@ CF_ASSUME_NONNULL_BEGIN @const kSCResvLink @discussion Value is a CFString */ -extern const CFStringRef kSCResvLink __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCResvLink API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCResvLink kSCResvLink /*! @const kSCResvInactive */ -extern const CFStringRef kSCResvInactive __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCResvInactive API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCResvInactive kSCResvInactive /*! @const kSCPropInterfaceName @discussion Value is a CFString */ -extern const CFStringRef kSCPropInterfaceName __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropInterfaceName API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropInterfaceName kSCPropInterfaceName /*! @const kSCPropMACAddress @discussion Value is a CFString */ -extern const CFStringRef kSCPropMACAddress __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropMACAddress API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropMACAddress kSCPropMACAddress /*! @const kSCPropUserDefinedName @discussion Value is a CFString */ -extern const CFStringRef kSCPropUserDefinedName __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropUserDefinedName API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropUserDefinedName kSCPropUserDefinedName /*! @const kSCPropVersion @discussion Value is a CFString */ -extern const CFStringRef kSCPropVersion __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropVersion API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropVersion kSCPropVersion /*! @@ -478,28 +474,28 @@ extern const CFStringRef kSCPropVersion __OS @const kSCPrefCurrentSet @discussion Value is a CFString */ -extern const CFStringRef kSCPrefCurrentSet __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPrefCurrentSet API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPrefCurrentSet kSCPrefCurrentSet /*! @const kSCPrefNetworkServices @discussion Value is a CFDictionary */ -extern const CFStringRef kSCPrefNetworkServices __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPrefNetworkServices API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPrefNetworkServices kSCPrefNetworkServices /*! @const kSCPrefSets @discussion Value is a CFDictionary */ -extern const CFStringRef kSCPrefSets __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPrefSets API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPrefSets kSCPrefSets /*! @const kSCPrefSystem @discussion Value is a CFDictionary */ -extern const CFStringRef kSCPrefSystem __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPrefSystem API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPrefSystem kSCPrefSystem /*! @@ -509,49 +505,49 @@ extern const CFStringRef kSCPrefSystem __OS /*! @const kSCCompNetwork */ -extern const CFStringRef kSCCompNetwork __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCCompNetwork API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCCompNetwork kSCCompNetwork /*! @const kSCCompService */ -extern const CFStringRef kSCCompService __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCCompService API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCCompService kSCCompService /*! @const kSCCompGlobal */ -extern const CFStringRef kSCCompGlobal __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCCompGlobal API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCCompGlobal kSCCompGlobal /*! @const kSCCompHostNames */ -extern const CFStringRef kSCCompHostNames __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCCompHostNames API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCCompHostNames kSCCompHostNames /*! @const kSCCompInterface */ -extern const CFStringRef kSCCompInterface __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCCompInterface API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCCompInterface kSCCompInterface /*! @const kSCCompSystem */ -extern const CFStringRef kSCCompSystem __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCCompSystem API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCCompSystem kSCCompSystem /*! @const kSCCompUsers */ -extern const CFStringRef kSCCompUsers __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCCompUsers API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCCompUsers kSCCompUsers /*! @const kSCCompAnyRegex */ -extern const CFStringRef kSCCompAnyRegex __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCCompAnyRegex API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCCompAnyRegex kSCCompAnyRegex /*! @@ -562,133 +558,133 @@ extern const CFStringRef kSCCompAnyRegex __OS @const kSCEntNetAirPort @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetAirPort __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetAirPort API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetAirPort kSCEntNetAirPort /*! @const kSCEntNetDHCP @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetDHCP __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetDHCP API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetDHCP kSCEntNetDHCP /*! @const kSCEntNetDNS @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetDNS __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetDNS API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetDNS kSCEntNetDNS /*! @const kSCEntNetEthernet @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetEthernet __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetEthernet API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetEthernet kSCEntNetEthernet /*! @const kSCEntNetFireWire @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetFireWire __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetFireWire API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetFireWire kSCEntNetFireWire /*! @const kSCEntNetInterface @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetInterface __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetInterface API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetInterface kSCEntNetInterface /*! @const kSCEntNetIPSec @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetIPSec __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetIPSec API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetIPSec kSCEntNetIPSec /*! @const kSCEntNetIPv4 @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetIPv4 __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetIPv4 API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetIPv4 kSCEntNetIPv4 /*! @const kSCEntNetIPv6 @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetIPv6 __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetIPv6 API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetIPv6 kSCEntNetIPv6 /*! @const kSCEntNetL2TP @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetL2TP __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetL2TP API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetL2TP kSCEntNetL2TP /*! @const kSCEntNetLink @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetLink __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetLink API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetLink kSCEntNetLink /*! @const kSCEntNetModem @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetModem __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetModem API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetModem kSCEntNetModem /*! @const kSCEntNetPPP @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetPPP __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetPPP API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetPPP kSCEntNetPPP /*! @const kSCEntNetPPPoE @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetPPPoE __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetPPPoE API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetPPPoE kSCEntNetPPPoE /*! @const kSCEntNetPPPSerial @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetPPPSerial __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetPPPSerial API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetPPPSerial kSCEntNetPPPSerial /*! @const kSCEntNetPPTP @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetPPTP __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_12,__IPHONE_2_0/*SPI*/,__IPHONE_10_0/*SPI*/); +extern const CFStringRef kSCEntNetPPTP API_DEPRECATED("No longer supported", macos(10.3,10.12)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetPPTP kSCEntNetPPTP /*! @const kSCEntNetProxies @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetProxies __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetProxies API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetProxies kSCEntNetProxies /*! @const kSCEntNetSMB @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetSMB __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetSMB API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #define kSCEntNetSMB kSCEntNetSMB /*! @const kSCEntNet6to4 @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNet6to4 __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNet6to4 API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNet6to4 kSCEntNet6to4 /*! @@ -699,21 +695,21 @@ extern const CFStringRef kSCEntNet6to4 __OS @const kSCPropNetOverridePrimary @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetOverridePrimary __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetOverridePrimary API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetOverridePrimary kSCPropNetOverridePrimary /*! @const kSCPropNetServiceOrder @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetServiceOrder __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetServiceOrder API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetServiceOrder kSCPropNetServiceOrder /*! @const kSCPropNetPPPOverridePrimary @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPOverridePrimary __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPOverridePrimary API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPOverridePrimary kSCPropNetPPPOverridePrimary /*! @@ -724,7 +720,7 @@ extern const CFStringRef kSCPropNetPPPOverridePrimary __OS @const kSCPropNetInterfaces @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetInterfaces __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetInterfaces API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetInterfaces kSCPropNetInterfaces /*! @@ -735,7 +731,7 @@ extern const CFStringRef kSCPropNetInterfaces __OS @const kSCPropNetLocalHostName @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetLocalHostName __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetLocalHostName API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetLocalHostName kSCPropNetLocalHostName /*! @@ -746,85 +742,85 @@ extern const CFStringRef kSCPropNetLocalHostName __OS @const kSCPropNetAirPortAllowNetCreation @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetAirPortAllowNetCreation __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/); +extern const CFStringRef kSCPropNetAirPortAllowNetCreation API_DEPRECATED("No longer supported", macos(10.2,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetAirPortAllowNetCreation kSCPropNetAirPortAllowNetCreation /*! @const kSCPropNetAirPortAuthPassword @discussion Value is a CFData */ -extern const CFStringRef kSCPropNetAirPortAuthPassword __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/); +extern const CFStringRef kSCPropNetAirPortAuthPassword API_DEPRECATED("No longer supported", macos(10.1,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetAirPortAuthPassword kSCPropNetAirPortAuthPassword /*! @const kSCPropNetAirPortAuthPasswordEncryption @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetAirPortAuthPasswordEncryption __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/); +extern const CFStringRef kSCPropNetAirPortAuthPasswordEncryption API_DEPRECATED("No longer supported", macos(10.1,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetAirPortAuthPasswordEncryption kSCPropNetAirPortAuthPasswordEncryption /*! @const kSCPropNetAirPortJoinMode @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetAirPortJoinMode __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/); +extern const CFStringRef kSCPropNetAirPortJoinMode API_DEPRECATED("No longer supported", macos(10.2,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetAirPortJoinMode kSCPropNetAirPortJoinMode /*! @const kSCPropNetAirPortPowerEnabled @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetAirPortPowerEnabled __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/); +extern const CFStringRef kSCPropNetAirPortPowerEnabled API_DEPRECATED("No longer supported", macos(10.1,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetAirPortPowerEnabled kSCPropNetAirPortPowerEnabled /*! @const kSCPropNetAirPortPreferredNetwork @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetAirPortPreferredNetwork __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/); +extern const CFStringRef kSCPropNetAirPortPreferredNetwork API_DEPRECATED("No longer supported", macos(10.1,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetAirPortPreferredNetwork kSCPropNetAirPortPreferredNetwork /*! @const kSCPropNetAirPortSavePasswords @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetAirPortSavePasswords __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/); +extern const CFStringRef kSCPropNetAirPortSavePasswords API_DEPRECATED("No longer supported", macos(10.2,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetAirPortSavePasswords kSCPropNetAirPortSavePasswords /*! @const kSCValNetAirPortJoinModeAutomatic */ -extern const CFStringRef kSCValNetAirPortJoinModeAutomatic __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/); +extern const CFStringRef kSCValNetAirPortJoinModeAutomatic API_DEPRECATED("No longer supported", macos(10.3,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetAirPortJoinModeAutomatic kSCValNetAirPortJoinModeAutomatic /*! @const kSCValNetAirPortJoinModePreferred */ -extern const CFStringRef kSCValNetAirPortJoinModePreferred __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/); +extern const CFStringRef kSCValNetAirPortJoinModePreferred API_DEPRECATED("No longer supported", macos(10.2,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetAirPortJoinModePreferred kSCValNetAirPortJoinModePreferred /*! @const kSCValNetAirPortJoinModeRanked */ -extern const CFStringRef kSCValNetAirPortJoinModeRanked __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/); +extern const CFStringRef kSCValNetAirPortJoinModeRanked API_DEPRECATED("No longer supported", macos(10.4,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetAirPortJoinModeRanked kSCValNetAirPortJoinModeRanked /*! @const kSCValNetAirPortJoinModeRecent */ -extern const CFStringRef kSCValNetAirPortJoinModeRecent __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/); +extern const CFStringRef kSCValNetAirPortJoinModeRecent API_DEPRECATED("No longer supported", macos(10.2,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetAirPortJoinModeRecent kSCValNetAirPortJoinModeRecent /*! @const kSCValNetAirPortJoinModeStrongest */ -extern const CFStringRef kSCValNetAirPortJoinModeStrongest __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/); +extern const CFStringRef kSCValNetAirPortJoinModeStrongest API_DEPRECATED("No longer supported", macos(10.2,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetAirPortJoinModeStrongest kSCValNetAirPortJoinModeStrongest /*! @const kSCValNetAirPortAuthPasswordEncryptionKeychain */ -extern const CFStringRef kSCValNetAirPortAuthPasswordEncryptionKeychain __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/); +extern const CFStringRef kSCValNetAirPortAuthPasswordEncryptionKeychain API_DEPRECATED("No longer supported", macos(10.3,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetAirPortAuthPasswordEncryptionKeychain kSCValNetAirPortAuthPasswordEncryptionKeychain /*! @@ -835,70 +831,70 @@ extern const CFStringRef kSCValNetAirPortAuthPasswordEncryptionKeychain __OS @const kSCPropNetDNSDomainName @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetDNSDomainName __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetDNSDomainName API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetDNSDomainName kSCPropNetDNSDomainName /*! @const kSCPropNetDNSOptions @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetDNSOptions __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetDNSOptions API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetDNSOptions kSCPropNetDNSOptions /*! @const kSCPropNetDNSSearchDomains @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetDNSSearchDomains __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetDNSSearchDomains API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetDNSSearchDomains kSCPropNetDNSSearchDomains /*! @const kSCPropNetDNSSearchOrder @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetDNSSearchOrder __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetDNSSearchOrder API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetDNSSearchOrder kSCPropNetDNSSearchOrder /*! @const kSCPropNetDNSServerAddresses @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetDNSServerAddresses __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetDNSServerAddresses API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetDNSServerAddresses kSCPropNetDNSServerAddresses /*! @const kSCPropNetDNSServerPort @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetDNSServerPort __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetDNSServerPort API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetDNSServerPort kSCPropNetDNSServerPort /*! @const kSCPropNetDNSServerTimeout @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetDNSServerTimeout __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetDNSServerTimeout API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetDNSServerTimeout kSCPropNetDNSServerTimeout /*! @const kSCPropNetDNSSortList @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetDNSSortList __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetDNSSortList API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetDNSSortList kSCPropNetDNSSortList /*! @const kSCPropNetDNSSupplementalMatchDomains @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetDNSSupplementalMatchDomains __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetDNSSupplementalMatchDomains API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetDNSSupplementalMatchDomains kSCPropNetDNSSupplementalMatchDomains /*! @const kSCPropNetDNSSupplementalMatchOrders @discussion Value is a CFArray[CFNumber] */ -extern const CFStringRef kSCPropNetDNSSupplementalMatchOrders __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetDNSSupplementalMatchOrders API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetDNSSupplementalMatchOrders kSCPropNetDNSSupplementalMatchOrders /*! @@ -909,21 +905,21 @@ extern const CFStringRef kSCPropNetDNSSupplementalMatchOrders __OS @const kSCPropNetEthernetMediaSubType @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetEthernetMediaSubType __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetEthernetMediaSubType API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetEthernetMediaSubType kSCPropNetEthernetMediaSubType /*! @const kSCPropNetEthernetMediaOptions @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetEthernetMediaOptions __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetEthernetMediaOptions API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetEthernetMediaOptions kSCPropNetEthernetMediaOptions /*! @const kSCPropNetEthernetMTU @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetEthernetMTU __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetEthernetMTU API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetEthernetMTU kSCPropNetEthernetMTU /*! @@ -938,89 +934,89 @@ extern const CFStringRef kSCPropNetEthernetMTU __OS @const kSCPropNetInterfaceDeviceName @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetInterfaceDeviceName __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetInterfaceDeviceName API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetInterfaceDeviceName kSCPropNetInterfaceDeviceName /*! @const kSCPropNetInterfaceHardware @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetInterfaceHardware __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetInterfaceHardware API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetInterfaceHardware kSCPropNetInterfaceHardware /*! @const kSCPropNetInterfaceType @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetInterfaceType __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetInterfaceType API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetInterfaceType kSCPropNetInterfaceType /*! @const kSCPropNetInterfaceSubType @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetInterfaceSubType __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetInterfaceSubType API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetInterfaceSubType kSCPropNetInterfaceSubType /*! @const kSCPropNetInterfaceSupportsModemOnHold @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetInterfaceSupportsModemOnHold __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_13,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/); +extern const CFStringRef kSCPropNetInterfaceSupportsModemOnHold API_DEPRECATED("No longer supported", macos(10.2,10.13)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetInterfaceSupportsModemOnHold kSCPropNetInterfaceSupportsModemOnHold /*! @const kSCValNetInterfaceTypeEthernet */ -extern const CFStringRef kSCValNetInterfaceTypeEthernet __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetInterfaceTypeEthernet API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetInterfaceTypeEthernet kSCValNetInterfaceTypeEthernet /*! @const kSCValNetInterfaceTypeFireWire */ -extern const CFStringRef kSCValNetInterfaceTypeFireWire __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetInterfaceTypeFireWire API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetInterfaceTypeFireWire kSCValNetInterfaceTypeFireWire /*! @const kSCValNetInterfaceTypePPP */ -extern const CFStringRef kSCValNetInterfaceTypePPP __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetInterfaceTypePPP API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetInterfaceTypePPP kSCValNetInterfaceTypePPP /*! @const kSCValNetInterfaceType6to4 */ -extern const CFStringRef kSCValNetInterfaceType6to4 __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetInterfaceType6to4 API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetInterfaceType6to4 kSCValNetInterfaceType6to4 /*! @const kSCValNetInterfaceTypeIPSec */ -extern const CFStringRef kSCValNetInterfaceTypeIPSec __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetInterfaceTypeIPSec API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetInterfaceTypeIPSec kSCValNetInterfaceTypeIPSec /*! @const kSCValNetInterfaceSubTypePPPoE */ -extern const CFStringRef kSCValNetInterfaceSubTypePPPoE __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetInterfaceSubTypePPPoE API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetInterfaceSubTypePPPoE kSCValNetInterfaceSubTypePPPoE /*! @const kSCValNetInterfaceSubTypePPPSerial */ -extern const CFStringRef kSCValNetInterfaceSubTypePPPSerial __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetInterfaceSubTypePPPSerial API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetInterfaceSubTypePPPSerial kSCValNetInterfaceSubTypePPPSerial /*! @const kSCValNetInterfaceSubTypePPTP */ -extern const CFStringRef kSCValNetInterfaceSubTypePPTP __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_12,__IPHONE_2_0/*SPI*/,__IPHONE_10_0/*SPI*/); +extern const CFStringRef kSCValNetInterfaceSubTypePPTP API_DEPRECATED("No longer supported", macos(10.2,10.12)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetInterfaceSubTypePPTP kSCValNetInterfaceSubTypePPTP /*! @const kSCValNetInterfaceSubTypeL2TP */ -extern const CFStringRef kSCValNetInterfaceSubTypeL2TP __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetInterfaceSubTypeL2TP API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetInterfaceSubTypeL2TP kSCValNetInterfaceSubTypeL2TP /*! @@ -1031,133 +1027,133 @@ extern const CFStringRef kSCValNetInterfaceSubTypeL2TP __OS @const kSCPropNetIPSecAuthenticationMethod @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPSecAuthenticationMethod __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecAuthenticationMethod API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecAuthenticationMethod kSCPropNetIPSecAuthenticationMethod /*! @const kSCPropNetIPSecLocalCertificate @discussion Value is a CFData */ -extern const CFStringRef kSCPropNetIPSecLocalCertificate __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecLocalCertificate API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecLocalCertificate kSCPropNetIPSecLocalCertificate /*! @const kSCPropNetIPSecLocalIdentifier @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPSecLocalIdentifier __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecLocalIdentifier API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecLocalIdentifier kSCPropNetIPSecLocalIdentifier /*! @const kSCPropNetIPSecLocalIdentifierType @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPSecLocalIdentifierType __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecLocalIdentifierType API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecLocalIdentifierType kSCPropNetIPSecLocalIdentifierType /*! @const kSCPropNetIPSecSharedSecret @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPSecSharedSecret __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecSharedSecret API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecSharedSecret kSCPropNetIPSecSharedSecret /*! @const kSCPropNetIPSecSharedSecretEncryption @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPSecSharedSecretEncryption __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecSharedSecretEncryption API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecSharedSecretEncryption kSCPropNetIPSecSharedSecretEncryption /*! @const kSCPropNetIPSecConnectTime @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetIPSecConnectTime __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecConnectTime API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecConnectTime kSCPropNetIPSecConnectTime /*! @const kSCPropNetIPSecRemoteAddress @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPSecRemoteAddress __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecRemoteAddress API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecRemoteAddress kSCPropNetIPSecRemoteAddress /*! @const kSCPropNetIPSecStatus @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetIPSecStatus __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecStatus API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecStatus kSCPropNetIPSecStatus /*! @const kSCPropNetIPSecXAuthEnabled @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetIPSecXAuthEnabled __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecXAuthEnabled API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecXAuthEnabled kSCPropNetIPSecXAuthEnabled /*! @const kSCPropNetIPSecXAuthName @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPSecXAuthName __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecXAuthName API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecXAuthName kSCPropNetIPSecXAuthName /*! @const kSCPropNetIPSecXAuthPassword @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPSecXAuthPassword __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecXAuthPassword API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecXAuthPassword kSCPropNetIPSecXAuthPassword /*! @const kSCPropNetIPSecXAuthPasswordEncryption @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPSecXAuthPasswordEncryption __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecXAuthPasswordEncryption API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecXAuthPasswordEncryption kSCPropNetIPSecXAuthPasswordEncryption /*! @const kSCValNetIPSecAuthenticationMethodSharedSecret */ -extern const CFStringRef kSCValNetIPSecAuthenticationMethodSharedSecret __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPSecAuthenticationMethodSharedSecret API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPSecAuthenticationMethodSharedSecret kSCValNetIPSecAuthenticationMethodSharedSecret /*! @const kSCValNetIPSecAuthenticationMethodCertificate */ -extern const CFStringRef kSCValNetIPSecAuthenticationMethodCertificate __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPSecAuthenticationMethodCertificate API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPSecAuthenticationMethodCertificate kSCValNetIPSecAuthenticationMethodCertificate /*! @const kSCValNetIPSecAuthenticationMethodHybrid */ -extern const CFStringRef kSCValNetIPSecAuthenticationMethodHybrid __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPSecAuthenticationMethodHybrid API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPSecAuthenticationMethodHybrid kSCValNetIPSecAuthenticationMethodHybrid /*! @const kSCValNetIPSecLocalIdentifierTypeKeyID */ -extern const CFStringRef kSCValNetIPSecLocalIdentifierTypeKeyID __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPSecLocalIdentifierTypeKeyID API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPSecLocalIdentifierTypeKeyID kSCValNetIPSecLocalIdentifierTypeKeyID /*! @const kSCValNetIPSecSharedSecretEncryptionKeychain */ -extern const CFStringRef kSCValNetIPSecSharedSecretEncryptionKeychain __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPSecSharedSecretEncryptionKeychain API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPSecSharedSecretEncryptionKeychain kSCValNetIPSecSharedSecretEncryptionKeychain /*! @const kSCValNetIPSecXAuthPasswordEncryptionKeychain */ -extern const CFStringRef kSCValNetIPSecXAuthPasswordEncryptionKeychain __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPSecXAuthPasswordEncryptionKeychain API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPSecXAuthPasswordEncryptionKeychain kSCValNetIPSecXAuthPasswordEncryptionKeychain /*! @const kSCValNetIPSecXAuthPasswordEncryptionPrompt */ -extern const CFStringRef kSCValNetIPSecXAuthPasswordEncryptionPrompt __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/); +extern const CFStringRef kSCValNetIPSecXAuthPasswordEncryptionPrompt API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(3.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPSecXAuthPasswordEncryptionPrompt kSCValNetIPSecXAuthPasswordEncryptionPrompt /*! @@ -1168,91 +1164,91 @@ extern const CFStringRef kSCValNetIPSecXAuthPasswordEncryptionPrompt __OS @const kSCPropNetIPv4Addresses @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetIPv4Addresses __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4Addresses API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4Addresses kSCPropNetIPv4Addresses /*! @const kSCPropNetIPv4ConfigMethod @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPv4ConfigMethod __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4ConfigMethod API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4ConfigMethod kSCPropNetIPv4ConfigMethod /*! @const kSCPropNetIPv4DHCPClientID @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPv4DHCPClientID __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4DHCPClientID API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4DHCPClientID kSCPropNetIPv4DHCPClientID /*! @const kSCPropNetIPv4Router @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPv4Router __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4Router API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4Router kSCPropNetIPv4Router /*! @const kSCPropNetIPv4SubnetMasks @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetIPv4SubnetMasks __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4SubnetMasks API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4SubnetMasks kSCPropNetIPv4SubnetMasks /*! @const kSCPropNetIPv4DestAddresses @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetIPv4DestAddresses __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4DestAddresses API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4DestAddresses kSCPropNetIPv4DestAddresses /*! @const kSCPropNetIPv4BroadcastAddresses @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetIPv4BroadcastAddresses __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4BroadcastAddresses API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4BroadcastAddresses kSCPropNetIPv4BroadcastAddresses /*! @const kSCValNetIPv4ConfigMethodAutomatic */ -extern const CFStringRef kSCValNetIPv4ConfigMethodAutomatic __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPv4ConfigMethodAutomatic API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPv4ConfigMethodAutomatic kSCValNetIPv4ConfigMethodAutomatic /*! @const kSCValNetIPv4ConfigMethodBOOTP */ -extern const CFStringRef kSCValNetIPv4ConfigMethodBOOTP __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPv4ConfigMethodBOOTP API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPv4ConfigMethodBOOTP kSCValNetIPv4ConfigMethodBOOTP /*! @const kSCValNetIPv4ConfigMethodDHCP */ -extern const CFStringRef kSCValNetIPv4ConfigMethodDHCP __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPv4ConfigMethodDHCP API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPv4ConfigMethodDHCP kSCValNetIPv4ConfigMethodDHCP /*! @const kSCValNetIPv4ConfigMethodINFORM */ -extern const CFStringRef kSCValNetIPv4ConfigMethodINFORM __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPv4ConfigMethodINFORM API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPv4ConfigMethodINFORM kSCValNetIPv4ConfigMethodINFORM /*! @const kSCValNetIPv4ConfigMethodLinkLocal */ -extern const CFStringRef kSCValNetIPv4ConfigMethodLinkLocal __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPv4ConfigMethodLinkLocal API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPv4ConfigMethodLinkLocal kSCValNetIPv4ConfigMethodLinkLocal /*! @const kSCValNetIPv4ConfigMethodManual */ -extern const CFStringRef kSCValNetIPv4ConfigMethodManual __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPv4ConfigMethodManual API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPv4ConfigMethodManual kSCValNetIPv4ConfigMethodManual /*! @const kSCValNetIPv4ConfigMethodPPP */ -extern const CFStringRef kSCValNetIPv4ConfigMethodPPP __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPv4ConfigMethodPPP API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPv4ConfigMethodPPP kSCValNetIPv4ConfigMethodPPP /*! @@ -1263,72 +1259,72 @@ extern const CFStringRef kSCValNetIPv4ConfigMethodPPP __OS @const kSCPropNetIPv6Addresses @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetIPv6Addresses __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv6Addresses API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv6Addresses kSCPropNetIPv6Addresses /*! @const kSCPropNetIPv6ConfigMethod @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPv6ConfigMethod __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv6ConfigMethod API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv6ConfigMethod kSCPropNetIPv6ConfigMethod /*! @const kSCPropNetIPv6DestAddresses @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetIPv6DestAddresses __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv6DestAddresses API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv6DestAddresses kSCPropNetIPv6DestAddresses /*! @const kSCPropNetIPv6Flags @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetIPv6Flags __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv6Flags API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv6Flags kSCPropNetIPv6Flags /*! @const kSCPropNetIPv6PrefixLength @discussion Value is a CFArray[CFNumber] */ -extern const CFStringRef kSCPropNetIPv6PrefixLength __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv6PrefixLength API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv6PrefixLength kSCPropNetIPv6PrefixLength /*! @const kSCPropNetIPv6Router @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPv6Router __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv6Router API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv6Router kSCPropNetIPv6Router /*! @const kSCValNetIPv6ConfigMethodAutomatic */ -extern const CFStringRef kSCValNetIPv6ConfigMethodAutomatic __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPv6ConfigMethodAutomatic API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPv6ConfigMethodAutomatic kSCValNetIPv6ConfigMethodAutomatic /*! @const kSCValNetIPv6ConfigMethodLinkLocal */ -extern const CFStringRef kSCValNetIPv6ConfigMethodLinkLocal __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCValNetIPv6ConfigMethodLinkLocal API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPv6ConfigMethodLinkLocal kSCValNetIPv6ConfigMethodLinkLocal /*! @const kSCValNetIPv6ConfigMethodManual */ -extern const CFStringRef kSCValNetIPv6ConfigMethodManual __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPv6ConfigMethodManual API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPv6ConfigMethodManual kSCValNetIPv6ConfigMethodManual /*! @const kSCValNetIPv6ConfigMethodRouterAdvertisement */ -extern const CFStringRef kSCValNetIPv6ConfigMethodRouterAdvertisement __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPv6ConfigMethodRouterAdvertisement API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPv6ConfigMethodRouterAdvertisement kSCValNetIPv6ConfigMethodRouterAdvertisement /*! @const kSCValNetIPv6ConfigMethod6to4 */ -extern const CFStringRef kSCValNetIPv6ConfigMethod6to4 __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPv6ConfigMethod6to4 API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPv6ConfigMethod6to4 kSCValNetIPv6ConfigMethod6to4 /*! @@ -1339,7 +1335,7 @@ extern const CFStringRef kSCValNetIPv6ConfigMethod6to4 __OS @const kSCPropNet6to4Relay @discussion Value is a CFString */ -extern const CFStringRef kSCPropNet6to4Relay __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNet6to4Relay API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNet6to4Relay kSCPropNet6to4Relay /*! @@ -1350,14 +1346,14 @@ extern const CFStringRef kSCPropNet6to4Relay __OS @const kSCPropNetLinkActive @discussion Value is a CFBoolean */ -extern const CFStringRef kSCPropNetLinkActive __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetLinkActive API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetLinkActive kSCPropNetLinkActive /*! @const kSCPropNetLinkDetaching @discussion Value is a CFBoolean */ -extern const CFStringRef kSCPropNetLinkDetaching __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetLinkDetaching API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetLinkDetaching kSCPropNetLinkDetaching /*! @@ -1368,151 +1364,151 @@ extern const CFStringRef kSCPropNetLinkDetaching __OS @const kSCPropNetModemAccessPointName @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetModemAccessPointName __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemAccessPointName API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemAccessPointName kSCPropNetModemAccessPointName /*! @const kSCPropNetModemConnectionPersonality @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetModemConnectionPersonality __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemConnectionPersonality API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemConnectionPersonality kSCPropNetModemConnectionPersonality /*! @const kSCPropNetModemConnectionScript @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetModemConnectionScript __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemConnectionScript API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemConnectionScript kSCPropNetModemConnectionScript /*! @const kSCPropNetModemConnectSpeed @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetModemConnectSpeed __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemConnectSpeed API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemConnectSpeed kSCPropNetModemConnectSpeed /*! @const kSCPropNetModemDataCompression @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetModemDataCompression __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemDataCompression API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemDataCompression kSCPropNetModemDataCompression /*! @const kSCPropNetModemDeviceContextID @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetModemDeviceContextID __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemDeviceContextID API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemDeviceContextID kSCPropNetModemDeviceContextID /*! @const kSCPropNetModemDeviceModel @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetModemDeviceModel __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemDeviceModel API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemDeviceModel kSCPropNetModemDeviceModel /*! @const kSCPropNetModemDeviceVendor @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetModemDeviceVendor __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemDeviceVendor API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemDeviceVendor kSCPropNetModemDeviceVendor /*! @const kSCPropNetModemDialMode @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetModemDialMode __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemDialMode API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemDialMode kSCPropNetModemDialMode /*! @const kSCPropNetModemErrorCorrection @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetModemErrorCorrection __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemErrorCorrection API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemErrorCorrection kSCPropNetModemErrorCorrection /*! @const kSCPropNetModemHoldCallWaitingAudibleAlert @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetModemHoldCallWaitingAudibleAlert __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemHoldCallWaitingAudibleAlert API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemHoldCallWaitingAudibleAlert kSCPropNetModemHoldCallWaitingAudibleAlert /*! @const kSCPropNetModemHoldDisconnectOnAnswer @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetModemHoldDisconnectOnAnswer __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemHoldDisconnectOnAnswer API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemHoldDisconnectOnAnswer kSCPropNetModemHoldDisconnectOnAnswer /*! @const kSCPropNetModemHoldEnabled @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetModemHoldEnabled __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemHoldEnabled API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemHoldEnabled kSCPropNetModemHoldEnabled /*! @const kSCPropNetModemHoldReminder @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetModemHoldReminder __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemHoldReminder API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemHoldReminder kSCPropNetModemHoldReminder /*! @const kSCPropNetModemHoldReminderTime @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetModemHoldReminderTime __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemHoldReminderTime API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemHoldReminderTime kSCPropNetModemHoldReminderTime /*! @const kSCPropNetModemNote @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetModemNote __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemNote API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemNote kSCPropNetModemNote /*! @const kSCPropNetModemPulseDial @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetModemPulseDial __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemPulseDial API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemPulseDial kSCPropNetModemPulseDial /*! @const kSCPropNetModemSpeaker @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetModemSpeaker __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemSpeaker API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemSpeaker kSCPropNetModemSpeaker /*! @const kSCPropNetModemSpeed @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetModemSpeed __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetModemSpeed API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetModemSpeed kSCPropNetModemSpeed /*! @const kSCValNetModemDialModeIgnoreDialTone */ -extern const CFStringRef kSCValNetModemDialModeIgnoreDialTone __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetModemDialModeIgnoreDialTone API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetModemDialModeIgnoreDialTone kSCValNetModemDialModeIgnoreDialTone /*! @const kSCValNetModemDialModeManual */ -extern const CFStringRef kSCValNetModemDialModeManual __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetModemDialModeManual API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetModemDialModeManual kSCValNetModemDialModeManual /*! @const kSCValNetModemDialModeWaitForDialTone */ -extern const CFStringRef kSCValNetModemDialModeWaitForDialTone __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetModemDialModeWaitForDialTone API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetModemDialModeWaitForDialTone kSCValNetModemDialModeWaitForDialTone /*! @@ -1523,404 +1519,404 @@ extern const CFStringRef kSCValNetModemDialModeWaitForDialTone __OS @const kSCPropNetPPPACSPEnabled @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPACSPEnabled __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPACSPEnabled API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPACSPEnabled kSCPropNetPPPACSPEnabled /*! @const kSCPropNetPPPConnectTime @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPConnectTime __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPConnectTime API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPConnectTime kSCPropNetPPPConnectTime /*! @const kSCPropNetPPPDeviceLastCause @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPDeviceLastCause __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPDeviceLastCause API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPDeviceLastCause kSCPropNetPPPDeviceLastCause /*! @const kSCPropNetPPPDialOnDemand @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPDialOnDemand __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPDialOnDemand API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPDialOnDemand kSCPropNetPPPDialOnDemand /*! @const kSCPropNetPPPDisconnectOnFastUserSwitch @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPDisconnectOnFastUserSwitch __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPDisconnectOnFastUserSwitch API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPDisconnectOnFastUserSwitch kSCPropNetPPPDisconnectOnFastUserSwitch /*! @const kSCPropNetPPPDisconnectOnIdle @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPDisconnectOnIdle __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPDisconnectOnIdle API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPDisconnectOnIdle kSCPropNetPPPDisconnectOnIdle /*! @const kSCPropNetPPPDisconnectOnIdleTimer @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPDisconnectOnIdleTimer __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPDisconnectOnIdleTimer API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPDisconnectOnIdleTimer kSCPropNetPPPDisconnectOnIdleTimer /*! @const kSCPropNetPPPDisconnectOnLogout @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPDisconnectOnLogout __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPDisconnectOnLogout API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPDisconnectOnLogout kSCPropNetPPPDisconnectOnLogout /*! @const kSCPropNetPPPDisconnectOnSleep @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPDisconnectOnSleep __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPDisconnectOnSleep API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPDisconnectOnSleep kSCPropNetPPPDisconnectOnSleep /*! @const kSCPropNetPPPDisconnectTime @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPDisconnectTime __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPDisconnectTime API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPDisconnectTime kSCPropNetPPPDisconnectTime /*! @const kSCPropNetPPPIdleReminderTimer @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPIdleReminderTimer __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPIdleReminderTimer API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPIdleReminderTimer kSCPropNetPPPIdleReminderTimer /*! @const kSCPropNetPPPIdleReminder @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPIdleReminder __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPIdleReminder API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPIdleReminder kSCPropNetPPPIdleReminder /*! @const kSCPropNetPPPLastCause @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPLastCause __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPLastCause API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPLastCause kSCPropNetPPPLastCause /*! @const kSCPropNetPPPLogfile @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetPPPLogfile __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPLogfile API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPLogfile kSCPropNetPPPLogfile /*! @const kSCPropNetPPPPlugins @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetPPPPlugins __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPPlugins API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPPlugins kSCPropNetPPPPlugins /*! @const kSCPropNetPPPRetryConnectTime @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPRetryConnectTime __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPRetryConnectTime API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPRetryConnectTime kSCPropNetPPPRetryConnectTime /*! @const kSCPropNetPPPSessionTimer @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPSessionTimer __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPSessionTimer API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPSessionTimer kSCPropNetPPPSessionTimer /*! @const kSCPropNetPPPStatus @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPStatus __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPStatus API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPStatus kSCPropNetPPPStatus /*! @const kSCPropNetPPPUseSessionTimer @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPUseSessionTimer __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPUseSessionTimer API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPUseSessionTimer kSCPropNetPPPUseSessionTimer /*! @const kSCPropNetPPPVerboseLogging @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPVerboseLogging __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPVerboseLogging API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPVerboseLogging kSCPropNetPPPVerboseLogging /*! @const kSCPropNetPPPAuthEAPPlugins @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetPPPAuthEAPPlugins __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPAuthEAPPlugins API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPAuthEAPPlugins kSCPropNetPPPAuthEAPPlugins /*! @const kSCPropNetPPPAuthName @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetPPPAuthName __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPAuthName API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPAuthName kSCPropNetPPPAuthName /*! @const kSCPropNetPPPAuthPassword @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetPPPAuthPassword __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPAuthPassword API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPAuthPassword kSCPropNetPPPAuthPassword /*! @const kSCPropNetPPPAuthPasswordEncryption @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetPPPAuthPasswordEncryption __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPAuthPasswordEncryption API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPAuthPasswordEncryption kSCPropNetPPPAuthPasswordEncryption /*! @const kSCPropNetPPPAuthPrompt @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetPPPAuthPrompt __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPAuthPrompt API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPAuthPrompt kSCPropNetPPPAuthPrompt /*! @const kSCPropNetPPPAuthProtocol @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetPPPAuthProtocol __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPAuthProtocol API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPAuthProtocol kSCPropNetPPPAuthProtocol /*! @const kSCValNetPPPAuthPasswordEncryptionKeychain */ -extern const CFStringRef kSCValNetPPPAuthPasswordEncryptionKeychain __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPAuthPasswordEncryptionKeychain API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPAuthPasswordEncryptionKeychain kSCValNetPPPAuthPasswordEncryptionKeychain /*! @const kSCValNetPPPAuthPasswordEncryptionToken */ -extern const CFStringRef kSCValNetPPPAuthPasswordEncryptionToken __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPAuthPasswordEncryptionToken API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPAuthPasswordEncryptionToken kSCValNetPPPAuthPasswordEncryptionToken /*! @const kSCValNetPPPAuthPromptBefore @discussion Value is a CFString */ -extern const CFStringRef kSCValNetPPPAuthPromptBefore __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPAuthPromptBefore API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPAuthPromptBefore kSCValNetPPPAuthPromptBefore /*! @const kSCValNetPPPAuthPromptAfter @discussion Value is a CFString */ -extern const CFStringRef kSCValNetPPPAuthPromptAfter __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPAuthPromptAfter API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPAuthPromptAfter kSCValNetPPPAuthPromptAfter /*! @const kSCValNetPPPAuthProtocolCHAP @discussion Value is a CFString */ -extern const CFStringRef kSCValNetPPPAuthProtocolCHAP __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPAuthProtocolCHAP API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPAuthProtocolCHAP kSCValNetPPPAuthProtocolCHAP /*! @const kSCValNetPPPAuthProtocolEAP @discussion Value is a CFString */ -extern const CFStringRef kSCValNetPPPAuthProtocolEAP __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPAuthProtocolEAP API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPAuthProtocolEAP kSCValNetPPPAuthProtocolEAP /*! @const kSCValNetPPPAuthProtocolMSCHAP1 @discussion Value is a CFString */ -extern const CFStringRef kSCValNetPPPAuthProtocolMSCHAP1 __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPAuthProtocolMSCHAP1 API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPAuthProtocolMSCHAP1 kSCValNetPPPAuthProtocolMSCHAP1 /*! @const kSCValNetPPPAuthProtocolMSCHAP2 @discussion Value is a CFString */ -extern const CFStringRef kSCValNetPPPAuthProtocolMSCHAP2 __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPAuthProtocolMSCHAP2 API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPAuthProtocolMSCHAP2 kSCValNetPPPAuthProtocolMSCHAP2 /*! @const kSCValNetPPPAuthProtocolPAP @discussion Value is a CFString */ -extern const CFStringRef kSCValNetPPPAuthProtocolPAP __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPAuthProtocolPAP API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPAuthProtocolPAP kSCValNetPPPAuthProtocolPAP /*! @const kSCPropNetPPPCommAlternateRemoteAddress @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetPPPCommAlternateRemoteAddress __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPCommAlternateRemoteAddress API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPCommAlternateRemoteAddress kSCPropNetPPPCommAlternateRemoteAddress /*! @const kSCPropNetPPPCommConnectDelay @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPCommConnectDelay __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPCommConnectDelay API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPCommConnectDelay kSCPropNetPPPCommConnectDelay /*! @const kSCPropNetPPPCommDisplayTerminalWindow @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPCommDisplayTerminalWindow __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPCommDisplayTerminalWindow API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPCommDisplayTerminalWindow kSCPropNetPPPCommDisplayTerminalWindow /*! @const kSCPropNetPPPCommRedialCount @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPCommRedialCount __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPCommRedialCount API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPCommRedialCount kSCPropNetPPPCommRedialCount /*! @const kSCPropNetPPPCommRedialEnabled @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPCommRedialEnabled __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPCommRedialEnabled API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPCommRedialEnabled kSCPropNetPPPCommRedialEnabled /*! @const kSCPropNetPPPCommRedialInterval @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPCommRedialInterval __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPCommRedialInterval API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPCommRedialInterval kSCPropNetPPPCommRedialInterval /*! @const kSCPropNetPPPCommRemoteAddress @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetPPPCommRemoteAddress __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPCommRemoteAddress API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPCommRemoteAddress kSCPropNetPPPCommRemoteAddress /*! @const kSCPropNetPPPCommTerminalScript @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetPPPCommTerminalScript __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPCommTerminalScript API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPCommTerminalScript kSCPropNetPPPCommTerminalScript /*! @const kSCPropNetPPPCommUseTerminalScript @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPCommUseTerminalScript __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPCommUseTerminalScript API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPCommUseTerminalScript kSCPropNetPPPCommUseTerminalScript /*! @const kSCPropNetPPPCCPEnabled @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPCCPEnabled __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPCCPEnabled API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPCCPEnabled kSCPropNetPPPCCPEnabled /*! @const kSCPropNetPPPCCPMPPE40Enabled @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPCCPMPPE40Enabled __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPCCPMPPE40Enabled API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPCCPMPPE40Enabled kSCPropNetPPPCCPMPPE40Enabled /*! @const kSCPropNetPPPCCPMPPE128Enabled @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPCCPMPPE128Enabled __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPCCPMPPE128Enabled API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPCCPMPPE128Enabled kSCPropNetPPPCCPMPPE128Enabled /*! @const kSCPropNetPPPIPCPCompressionVJ @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPIPCPCompressionVJ __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPIPCPCompressionVJ API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPIPCPCompressionVJ kSCPropNetPPPIPCPCompressionVJ /*! @const kSCPropNetPPPIPCPUsePeerDNS @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPIPCPUsePeerDNS __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPIPCPUsePeerDNS API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPIPCPUsePeerDNS kSCPropNetPPPIPCPUsePeerDNS /*! @const kSCPropNetPPPLCPEchoEnabled @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPLCPEchoEnabled __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPLCPEchoEnabled API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPLCPEchoEnabled kSCPropNetPPPLCPEchoEnabled /*! @const kSCPropNetPPPLCPEchoFailure @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPLCPEchoFailure __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPLCPEchoFailure API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPLCPEchoFailure kSCPropNetPPPLCPEchoFailure /*! @const kSCPropNetPPPLCPEchoInterval @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPLCPEchoInterval __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPLCPEchoInterval API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPLCPEchoInterval kSCPropNetPPPLCPEchoInterval /*! @const kSCPropNetPPPLCPCompressionACField @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPLCPCompressionACField __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPLCPCompressionACField API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPLCPCompressionACField kSCPropNetPPPLCPCompressionACField /*! @const kSCPropNetPPPLCPCompressionPField @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPLCPCompressionPField __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPLCPCompressionPField API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPLCPCompressionPField kSCPropNetPPPLCPCompressionPField /*! @const kSCPropNetPPPLCPMRU @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPLCPMRU __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPLCPMRU API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPLCPMRU kSCPropNetPPPLCPMRU /*! @const kSCPropNetPPPLCPMTU @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPLCPMTU __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPLCPMTU API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPLCPMTU kSCPropNetPPPLCPMTU /*! @const kSCPropNetPPPLCPReceiveACCM @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPLCPReceiveACCM __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPLCPReceiveACCM API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPLCPReceiveACCM kSCPropNetPPPLCPReceiveACCM /*! @const kSCPropNetPPPLCPTransmitACCM @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPLCPTransmitACCM __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPLCPTransmitACCM API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPLCPTransmitACCM kSCPropNetPPPLCPTransmitACCM /*! @@ -1939,39 +1935,39 @@ extern const CFStringRef kSCPropNetPPPLCPTransmitACCM __OS @const kSCPropNetL2TPIPSecSharedSecret @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetL2TPIPSecSharedSecret __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetL2TPIPSecSharedSecret API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetL2TPIPSecSharedSecret kSCPropNetL2TPIPSecSharedSecret /*! @const kSCPropNetL2TPIPSecSharedSecretEncryption @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetL2TPIPSecSharedSecretEncryption __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetL2TPIPSecSharedSecretEncryption API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetL2TPIPSecSharedSecretEncryption kSCPropNetL2TPIPSecSharedSecretEncryption /*! @const kSCPropNetL2TPTransport @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetL2TPTransport __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetL2TPTransport API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetL2TPTransport kSCPropNetL2TPTransport /*! @const kSCValNetL2TPIPSecSharedSecretEncryptionKeychain */ -extern const CFStringRef kSCValNetL2TPIPSecSharedSecretEncryptionKeychain __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetL2TPIPSecSharedSecretEncryptionKeychain API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetL2TPIPSecSharedSecretEncryptionKeychain kSCValNetL2TPIPSecSharedSecretEncryptionKeychain /*! @const kSCValNetL2TPTransportIP */ -extern const CFStringRef kSCValNetL2TPTransportIP __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetL2TPTransportIP API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetL2TPTransportIP kSCValNetL2TPTransportIP /*! @const kSCValNetL2TPTransportIPSec */ -extern const CFStringRef kSCValNetL2TPTransportIPSec __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetL2TPTransportIPSec API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetL2TPTransportIPSec kSCValNetL2TPTransportIPSec /*! @@ -1982,175 +1978,175 @@ extern const CFStringRef kSCValNetL2TPTransportIPSec __OS @const kSCPropNetProxiesExceptionsList @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetProxiesExceptionsList __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesExceptionsList API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesExceptionsList kSCPropNetProxiesExceptionsList /*! @const kSCPropNetProxiesExcludeSimpleHostnames @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetProxiesExcludeSimpleHostnames __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesExcludeSimpleHostnames API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesExcludeSimpleHostnames kSCPropNetProxiesExcludeSimpleHostnames /*! @const kSCPropNetProxiesFTPEnable @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetProxiesFTPEnable __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesFTPEnable API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesFTPEnable kSCPropNetProxiesFTPEnable /*! @const kSCPropNetProxiesFTPPassive @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetProxiesFTPPassive __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesFTPPassive API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesFTPPassive kSCPropNetProxiesFTPPassive /*! @const kSCPropNetProxiesFTPPort @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetProxiesFTPPort __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesFTPPort API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesFTPPort kSCPropNetProxiesFTPPort /*! @const kSCPropNetProxiesFTPProxy @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetProxiesFTPProxy __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesFTPProxy API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesFTPProxy kSCPropNetProxiesFTPProxy /*! @const kSCPropNetProxiesGopherEnable @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetProxiesGopherEnable __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesGopherEnable API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesGopherEnable kSCPropNetProxiesGopherEnable /*! @const kSCPropNetProxiesGopherPort @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetProxiesGopherPort __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesGopherPort API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesGopherPort kSCPropNetProxiesGopherPort /*! @const kSCPropNetProxiesGopherProxy @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetProxiesGopherProxy __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesGopherProxy API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesGopherProxy kSCPropNetProxiesGopherProxy /*! @const kSCPropNetProxiesHTTPEnable @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetProxiesHTTPEnable __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesHTTPEnable API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesHTTPEnable kSCPropNetProxiesHTTPEnable /*! @const kSCPropNetProxiesHTTPPort @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetProxiesHTTPPort __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesHTTPPort API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesHTTPPort kSCPropNetProxiesHTTPPort /*! @const kSCPropNetProxiesHTTPProxy @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetProxiesHTTPProxy __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesHTTPProxy API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesHTTPProxy kSCPropNetProxiesHTTPProxy /*! @const kSCPropNetProxiesHTTPSEnable @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetProxiesHTTPSEnable __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesHTTPSEnable API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesHTTPSEnable kSCPropNetProxiesHTTPSEnable /*! @const kSCPropNetProxiesHTTPSPort @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetProxiesHTTPSPort __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesHTTPSPort API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesHTTPSPort kSCPropNetProxiesHTTPSPort /*! @const kSCPropNetProxiesHTTPSProxy @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetProxiesHTTPSProxy __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesHTTPSProxy API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesHTTPSProxy kSCPropNetProxiesHTTPSProxy /*! @const kSCPropNetProxiesRTSPEnable @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetProxiesRTSPEnable __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesRTSPEnable API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesRTSPEnable kSCPropNetProxiesRTSPEnable /*! @const kSCPropNetProxiesRTSPPort @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetProxiesRTSPPort __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesRTSPPort API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesRTSPPort kSCPropNetProxiesRTSPPort /*! @const kSCPropNetProxiesRTSPProxy @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetProxiesRTSPProxy __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesRTSPProxy API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesRTSPProxy kSCPropNetProxiesRTSPProxy /*! @const kSCPropNetProxiesSOCKSEnable @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetProxiesSOCKSEnable __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesSOCKSEnable API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesSOCKSEnable kSCPropNetProxiesSOCKSEnable /*! @const kSCPropNetProxiesSOCKSPort @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetProxiesSOCKSPort __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesSOCKSPort API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesSOCKSPort kSCPropNetProxiesSOCKSPort /*! @const kSCPropNetProxiesSOCKSProxy @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetProxiesSOCKSProxy __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesSOCKSProxy API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesSOCKSProxy kSCPropNetProxiesSOCKSProxy /*! @const kSCPropNetProxiesProxyAutoConfigEnable @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetProxiesProxyAutoConfigEnable __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesProxyAutoConfigEnable API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesProxyAutoConfigEnable kSCPropNetProxiesProxyAutoConfigEnable /*! @const kSCPropNetProxiesProxyAutoConfigJavaScript @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetProxiesProxyAutoConfigJavaScript __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesProxyAutoConfigJavaScript API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesProxyAutoConfigJavaScript kSCPropNetProxiesProxyAutoConfigJavaScript /*! @const kSCPropNetProxiesProxyAutoConfigURLString @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetProxiesProxyAutoConfigURLString __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesProxyAutoConfigURLString API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesProxyAutoConfigURLString kSCPropNetProxiesProxyAutoConfigURLString /*! @const kSCPropNetProxiesProxyAutoDiscoveryEnable @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetProxiesProxyAutoDiscoveryEnable __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesProxyAutoDiscoveryEnable API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesProxyAutoDiscoveryEnable kSCPropNetProxiesProxyAutoDiscoveryEnable /*! @@ -2161,59 +2157,59 @@ extern const CFStringRef kSCPropNetProxiesProxyAutoDiscoveryEnable __OS @const kSCPropNetSMBNetBIOSName @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetSMBNetBIOSName __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetSMBNetBIOSName API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #define kSCPropNetSMBNetBIOSName kSCPropNetSMBNetBIOSName /*! @const kSCPropNetSMBNetBIOSNodeType @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetSMBNetBIOSNodeType __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetSMBNetBIOSNodeType API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #define kSCPropNetSMBNetBIOSNodeType kSCPropNetSMBNetBIOSNodeType /*! @const kSCPropNetSMBNetBIOSScope @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetSMBNetBIOSScope __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_7,__IPHONE_NA,__IPHONE_NA); +extern const CFStringRef kSCPropNetSMBNetBIOSScope API_DEPRECATED("No longer supported", macos(10.5,10.7)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #define kSCPropNetSMBNetBIOSScope kSCPropNetSMBNetBIOSScope /*! @const kSCPropNetSMBWINSAddresses @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetSMBWINSAddresses __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetSMBWINSAddresses API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #define kSCPropNetSMBWINSAddresses kSCPropNetSMBWINSAddresses /*! @const kSCPropNetSMBWorkgroup @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetSMBWorkgroup __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetSMBWorkgroup API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #define kSCPropNetSMBWorkgroup kSCPropNetSMBWorkgroup /*! @const kSCValNetSMBNetBIOSNodeTypeBroadcast */ -extern const CFStringRef kSCValNetSMBNetBIOSNodeTypeBroadcast __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetSMBNetBIOSNodeTypeBroadcast API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #define kSCValNetSMBNetBIOSNodeTypeBroadcast kSCValNetSMBNetBIOSNodeTypeBroadcast /*! @const kSCValNetSMBNetBIOSNodeTypePeer */ -extern const CFStringRef kSCValNetSMBNetBIOSNodeTypePeer __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetSMBNetBIOSNodeTypePeer API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #define kSCValNetSMBNetBIOSNodeTypePeer kSCValNetSMBNetBIOSNodeTypePeer /*! @const kSCValNetSMBNetBIOSNodeTypeMixed */ -extern const CFStringRef kSCValNetSMBNetBIOSNodeTypeMixed __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetSMBNetBIOSNodeTypeMixed API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #define kSCValNetSMBNetBIOSNodeTypeMixed kSCValNetSMBNetBIOSNodeTypeMixed /*! @const kSCValNetSMBNetBIOSNodeTypeHybrid */ -extern const CFStringRef kSCValNetSMBNetBIOSNodeTypeHybrid __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetSMBNetBIOSNodeTypeHybrid API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #define kSCValNetSMBNetBIOSNodeTypeHybrid kSCValNetSMBNetBIOSNodeTypeHybrid /*! @@ -2223,7 +2219,7 @@ extern const CFStringRef kSCValNetSMBNetBIOSNodeTypeHybrid __OS /*! @const kSCEntUsersConsoleUser */ -extern const CFStringRef kSCEntUsersConsoleUser __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntUsersConsoleUser API_AVAILABLE(macos(10.1)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #define kSCEntUsersConsoleUser kSCEntUsersConsoleUser /*! @@ -2234,14 +2230,14 @@ extern const CFStringRef kSCEntUsersConsoleUser __OS @const kSCPropSystemComputerName @discussion Value is a CFString */ -extern const CFStringRef kSCPropSystemComputerName __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropSystemComputerName API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropSystemComputerName kSCPropSystemComputerName /*! @const kSCPropSystemComputerNameEncoding @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropSystemComputerNameEncoding __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropSystemComputerNameEncoding API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropSystemComputerNameEncoding kSCPropSystemComputerNameEncoding /*! @@ -2251,31 +2247,31 @@ extern const CFStringRef kSCPropSystemComputerNameEncoding __OS /*! @const kSCDynamicStoreDomainFile */ -extern const CFStringRef kSCDynamicStoreDomainFile __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCDynamicStoreDomainFile API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCDynamicStoreDomainFile kSCDynamicStoreDomainFile /*! @const kSCDynamicStoreDomainPlugin */ -extern const CFStringRef kSCDynamicStoreDomainPlugin __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCDynamicStoreDomainPlugin API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCDynamicStoreDomainPlugin kSCDynamicStoreDomainPlugin /*! @const kSCDynamicStoreDomainSetup */ -extern const CFStringRef kSCDynamicStoreDomainSetup __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCDynamicStoreDomainSetup API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCDynamicStoreDomainSetup kSCDynamicStoreDomainSetup /*! @const kSCDynamicStoreDomainState */ -extern const CFStringRef kSCDynamicStoreDomainState __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCDynamicStoreDomainState API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCDynamicStoreDomainState kSCDynamicStoreDomainState /*! @const kSCDynamicStoreDomainPrefs */ -extern const CFStringRef kSCDynamicStoreDomainPrefs __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCDynamicStoreDomainPrefs API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCDynamicStoreDomainPrefs kSCDynamicStoreDomainPrefs /*! @@ -2286,13 +2282,13 @@ extern const CFStringRef kSCDynamicStoreDomainPrefs __OS @const kSCDynamicStorePropSetupCurrentSet @discussion Value is a CFString */ -extern const CFStringRef kSCDynamicStorePropSetupCurrentSet __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCDynamicStorePropSetupCurrentSet API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCDynamicStorePropSetupCurrentSet kSCDynamicStorePropSetupCurrentSet /*! @const kSCDynamicStorePropSetupLastUpdated */ -extern const CFStringRef kSCDynamicStorePropSetupLastUpdated __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCDynamicStorePropSetupLastUpdated API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCDynamicStorePropSetupLastUpdated kSCDynamicStorePropSetupLastUpdated /*! @@ -2303,52 +2299,51 @@ extern const CFStringRef kSCDynamicStorePropSetupLastUpdated __OS @const kSCDynamicStorePropNetInterfaces @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCDynamicStorePropNetInterfaces __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCDynamicStorePropNetInterfaces API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCDynamicStorePropNetInterfaces kSCDynamicStorePropNetInterfaces /*! @const kSCDynamicStorePropNetPrimaryInterface @discussion Value is a CFString */ -extern const CFStringRef kSCDynamicStorePropNetPrimaryInterface __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCDynamicStorePropNetPrimaryInterface API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCDynamicStorePropNetPrimaryInterface kSCDynamicStorePropNetPrimaryInterface /*! @const kSCDynamicStorePropNetPrimaryService @discussion Value is a CFString */ -extern const CFStringRef kSCDynamicStorePropNetPrimaryService __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCDynamicStorePropNetPrimaryService API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCDynamicStorePropNetPrimaryService kSCDynamicStorePropNetPrimaryService /*! @const kSCDynamicStorePropNetServiceIDs @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCDynamicStorePropNetServiceIDs __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCDynamicStorePropNetServiceIDs API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCDynamicStorePropNetServiceIDs kSCDynamicStorePropNetServiceIDs /*! @const kSCPropUsersConsoleUserName @discussion Value is a CFString */ -extern const CFStringRef kSCPropUsersConsoleUserName __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); +extern const CFStringRef kSCPropUsersConsoleUserName API_DEPRECATED("No longer supported", macos(10.1,10.4)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #define kSCPropUsersConsoleUserName kSCPropUsersConsoleUserName /*! @const kSCPropUsersConsoleUserUID @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropUsersConsoleUserUID __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); +extern const CFStringRef kSCPropUsersConsoleUserUID API_DEPRECATED("No longer supported", macos(10.1,10.4)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #define kSCPropUsersConsoleUserUID kSCPropUsersConsoleUserUID /*! @const kSCPropUsersConsoleUserGID @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropUsersConsoleUserGID __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA); +extern const CFStringRef kSCPropUsersConsoleUserGID API_DEPRECATED("No longer supported", macos(10.1,10.4)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #define kSCPropUsersConsoleUserGID kSCPropUsersConsoleUserGID CF_ASSUME_NONNULL_END -#endif /* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */ #endif /* _SCSCHEMADEFINITIONS_H */ diff --git a/SystemConfiguration.fproj/SCSchemaDefinitionsPrivate.h b/SystemConfiguration.fproj/SCSchemaDefinitionsPrivate.h index 6f31a42..7691229 100644 --- a/SystemConfiguration.fproj/SCSchemaDefinitionsPrivate.h +++ b/SystemConfiguration.fproj/SCSchemaDefinitionsPrivate.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -50,6 +50,7 @@ * kSCEntNetLinkIssues "LinkIssues" CFDictionary * kSCEntNetLinkQuality "LinkQuality" CFDictionary * kSCEntNetLoopback "Loopback" CFDictionary + * kSCEntNetNAT64 "NAT64" CFDictionary * kSCEntNetNAT64PrefixRequest "NAT64PrefixRequest" * kSCEntNetOnDemand "OnDemand" CFDictionary * kSCEntNetQoSMarkingPolicy "QoSMarkingPolicy" CFDictionary @@ -102,6 +103,7 @@ * kSCEntNetIPv4 Entity Keys * * kSCPropNetIPv4AdditionalRoutes "AdditionalRoutes" CFArray[CFDictionary] + * kSCPropNetIPv4CLAT46 "CLAT46" CFBoolean * kSCPropNetIPv4ExcludedRoutes "ExcludedRoutes" CFArray[CFDictionary] * kSCPropNetIPv4IncludedRoutes "IncludedRoutes" CFArray[CFDictionary] * @@ -123,6 +125,7 @@ * kSCPropNetIPv6EnableCGA "EnableCGA" CFNumber (0 or 1) * kSCPropNetIPv6ExcludedRoutes "ExcludedRoutes" CFArray[CFDictionary] * kSCPropNetIPv6IncludedRoutes "IncludedRoutes" CFArray[CFDictionary] + * kSCPropNetIPv6PerformPLATDiscovery "PerformPLATDiscovery" CFBoolean * * --- kSCPropNetIPv6AdditionalRoutes, kSCPropNetIPv6IncludedRoutes, kSCPropNetIPv6ExcludedRoutes [CFDictionary] keys --- * kSCPropNetIPv6RouteDestinationAddress "DestinationAddress" CFString @@ -168,6 +171,12 @@ * kSCValNetPPPOnDemandPriorityHigh "High" * kSCValNetPPPOnDemandPriorityLow "Low" * + * kSCEntNetNAT64 Entity Keys + * + * kSCPropNetNAT64PrefixList "PrefixList" CFArray[CFString] + * kSCPropNetNAT64PLATDiscoveryStartTime "PLATDiscoveryStartTime" CFDate + * kSCPropNetNAT64PLATDiscoveryCompletionTime "PLATDiscoveryCompletionTime" CFDate + * * kSCEntNetProxies Entity Keys * * kSCPropNetProxiesBypassAllowed "BypassAllowed" CFNumber (0 or 1) @@ -319,21 +328,21 @@ @const kSCPropNetIgnoreLinkStatus @discussion Value is a CFBoolean */ -extern const CFStringRef kSCPropNetIgnoreLinkStatus __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetIgnoreLinkStatus API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIgnoreLinkStatus kSCPropNetIgnoreLinkStatus /*! @const kSCPropConfirmedInterfaceName @discussion Value is a CFString */ -extern const CFStringRef kSCPropConfirmedInterfaceName __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/); +extern const CFStringRef kSCPropConfirmedInterfaceName API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(8.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropConfirmedInterfaceName kSCPropConfirmedInterfaceName /*! @const kSCPropDisableUntilNeeded @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropDisableUntilNeeded __OSX_AVAILABLE_STARTING(__MAC_10_11,__IPHONE_9_0/*SPI*/); +extern const CFStringRef kSCPropDisableUntilNeeded API_AVAILABLE(macos(10.11)) SPI_AVAILABLE(ios(9.0), tvos(9.0), watchos(2.0), bridgeos(2.0)); #define kSCPropDisableUntilNeeded kSCPropDisableUntilNeeded /*! @@ -344,7 +353,7 @@ extern const CFStringRef kSCPropDisableUntilNeeded __OS @const kSCPrefVirtualNetworkInterfaces @discussion Value is a CFDictionary */ -extern const CFStringRef kSCPrefVirtualNetworkInterfaces __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPrefVirtualNetworkInterfaces API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPrefVirtualNetworkInterfaces kSCPrefVirtualNetworkInterfaces /*! @@ -355,108 +364,115 @@ extern const CFStringRef kSCPrefVirtualNetworkInterfaces __OS @const kSCEntNetActiveDuringSleepRequested @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetActiveDuringSleepRequested __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCEntNetActiveDuringSleepRequested API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetActiveDuringSleepRequested kSCEntNetActiveDuringSleepRequested /*! @const kSCEntNetActiveDuringSleepSupported @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetActiveDuringSleepSupported __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCEntNetActiveDuringSleepSupported API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetActiveDuringSleepSupported kSCEntNetActiveDuringSleepSupported /*! @const kSCEntNetAppLayer @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetAppLayer __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCEntNetAppLayer API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetAppLayer kSCEntNetAppLayer /*! @const kSCEntNetCommCenter @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetCommCenter __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetCommCenter SPI_AVAILABLE(macos(10.6), ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetCommCenter kSCEntNetCommCenter /*! @const kSCEntNetEAPOL @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetEAPOL __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetEAPOL API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetEAPOL kSCEntNetEAPOL /*! @const kSCEntNetIPv4RouterARPFailure */ -extern const CFStringRef kSCEntNetIPv4RouterARPFailure __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/); +extern const CFStringRef kSCEntNetIPv4RouterARPFailure API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(8.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetIPv4RouterARPFailure kSCEntNetIPv4RouterARPFailure /*! @const kSCEntNetIPv4RouterARPAlive */ -extern const CFStringRef kSCEntNetIPv4RouterARPAlive __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/); +extern const CFStringRef kSCEntNetIPv4RouterARPAlive API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(8.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetIPv4RouterARPAlive kSCEntNetIPv4RouterARPAlive /*! @const kSCEntNetIPv6RouterExpired */ -extern const CFStringRef kSCEntNetIPv6RouterExpired __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0/*SPI*/); +extern const CFStringRef kSCEntNetIPv6RouterExpired API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(11.0), tvos(11.0), watchos(4.0), bridgeos(4.0)); #define kSCEntNetIPv6RouterExpired kSCEntNetIPv6RouterExpired /*! @const kSCEntNetLinkIssues @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetLinkIssues __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCEntNetLinkIssues API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetLinkIssues kSCEntNetLinkIssues /*! @const kSCEntNetLinkQuality @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetLinkQuality __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCEntNetLinkQuality API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetLinkQuality kSCEntNetLinkQuality /*! @const kSCEntNetLoopback @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetLoopback __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCEntNetLoopback API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetLoopback kSCEntNetLoopback +/*! + @const kSCEntNetNAT64 + @discussion Value is a CFDictionary + */ +extern const CFStringRef kSCEntNetNAT64 API_AVAILABLE(macos(10.14)) SPI_AVAILABLE(ios(12.0), tvos(12.0), watchos(5.0), bridgeos(5.0)); +#define kSCEntNetNAT64 kSCEntNetNAT64 + /*! @const kSCEntNetNAT64PrefixRequest */ -extern const CFStringRef kSCEntNetNAT64PrefixRequest __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0/*SPI*/); +extern const CFStringRef kSCEntNetNAT64PrefixRequest API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(11.0), tvos(11.0), watchos(4.0), bridgeos(4.0)); #define kSCEntNetNAT64PrefixRequest kSCEntNetNAT64PrefixRequest /*! @const kSCEntNetOnDemand @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetOnDemand __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/); +extern const CFStringRef kSCEntNetOnDemand API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(3.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetOnDemand kSCEntNetOnDemand /*! @const kSCEntNetQoSMarkingPolicy @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetQoSMarkingPolicy __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_10_0/*SPI*/); +extern const CFStringRef kSCEntNetQoSMarkingPolicy API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(3.0)); #define kSCEntNetQoSMarkingPolicy kSCEntNetQoSMarkingPolicy /*! @const kSCEntNetService @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetService __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCEntNetService API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetService kSCEntNetService /*! @const kSCEntNetVPN @discussion Value is a CFDictionary */ -extern const CFStringRef kSCEntNetVPN __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCEntNetVPN API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCEntNetVPN kSCEntNetVPN /*! @@ -467,14 +483,14 @@ extern const CFStringRef kSCEntNetVPN __OS @const kSCPropNetCommCenterAllowNetworkAccess @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetCommCenterAllowNetworkAccess __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetCommCenterAllowNetworkAccess SPI_AVAILABLE(macos(10.6), ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetCommCenterAllowNetworkAccess kSCPropNetCommCenterAllowNetworkAccess /*! @const kSCPropNetCommCenterAvailable @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetCommCenterAvailable __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetCommCenterAvailable SPI_AVAILABLE(macos(10.6), ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetCommCenterAvailable kSCPropNetCommCenterAvailable /*! @@ -485,21 +501,21 @@ extern const CFStringRef kSCPropNetCommCenterAvailable __OS @const kSCPropNetDNSConfirmedServiceID @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetDNSConfirmedServiceID __OSX_AVAILABLE_STARTING(__MAC_10_11,__IPHONE_9_0/*SPI*/); +extern const CFStringRef kSCPropNetDNSConfirmedServiceID API_AVAILABLE(macos(10.11)) SPI_AVAILABLE(ios(9.0), tvos(9.0), watchos(2.0), bridgeos(2.0)); #define kSCPropNetDNSConfirmedServiceID kSCPropNetDNSConfirmedServiceID /*! @const kSCPropNetDNSServiceIdentifier @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetDNSServiceIdentifier __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetDNSServiceIdentifier API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetDNSServiceIdentifier kSCPropNetDNSServiceIdentifier /*! @const kSCPropNetDNSSupplementalMatchDomainsNoSearch @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetDNSSupplementalMatchDomainsNoSearch __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetDNSSupplementalMatchDomainsNoSearch API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetDNSSupplementalMatchDomainsNoSearch kSCPropNetDNSSupplementalMatchDomainsNoSearch /*! @@ -510,70 +526,70 @@ extern const CFStringRef kSCPropNetDNSSupplementalMatchDomainsNoSearch __OS @const kSCPropNetEthernetCapabilityAV @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetEthernetCapabilityAV __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetEthernetCapabilityAV API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetEthernetCapabilityAV kSCPropNetEthernetCapabilityAV /*! @const kSCPropNetEthernetCapabilityJUMBO_MTU @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetEthernetCapabilityJUMBO_MTU __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetEthernetCapabilityJUMBO_MTU API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetEthernetCapabilityJUMBO_MTU kSCPropNetEthernetCapabilityJUMBO_MTU /*! @const kSCPropNetEthernetCapabilityLRO @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetEthernetCapabilityLRO __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetEthernetCapabilityLRO API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetEthernetCapabilityLRO kSCPropNetEthernetCapabilityLRO /*! @const kSCPropNetEthernetCapabilityRXCSUM @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetEthernetCapabilityRXCSUM __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetEthernetCapabilityRXCSUM API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetEthernetCapabilityRXCSUM kSCPropNetEthernetCapabilityRXCSUM /*! @const kSCPropNetEthernetCapabilityTSO @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetEthernetCapabilityTSO __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetEthernetCapabilityTSO API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetEthernetCapabilityTSO kSCPropNetEthernetCapabilityTSO /*! @const kSCPropNetEthernetCapabilityTSO4 @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetEthernetCapabilityTSO4 __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetEthernetCapabilityTSO4 API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetEthernetCapabilityTSO4 kSCPropNetEthernetCapabilityTSO4 /*! @const kSCPropNetEthernetCapabilityTSO6 @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetEthernetCapabilityTSO6 __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetEthernetCapabilityTSO6 API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetEthernetCapabilityTSO6 kSCPropNetEthernetCapabilityTSO6 /*! @const kSCPropNetEthernetCapabilityTXCSUM @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetEthernetCapabilityTXCSUM __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetEthernetCapabilityTXCSUM API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetEthernetCapabilityTXCSUM kSCPropNetEthernetCapabilityTXCSUM /*! @const kSCPropNetEthernetCapabilityVLAN_HWTAGGING @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetEthernetCapabilityVLAN_HWTAGGING __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetEthernetCapabilityVLAN_HWTAGGING API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetEthernetCapabilityVLAN_HWTAGGING kSCPropNetEthernetCapabilityVLAN_HWTAGGING /*! @const kSCPropNetEthernetCapabilityVLAN_MTU @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetEthernetCapabilityVLAN_MTU __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetEthernetCapabilityVLAN_MTU API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetEthernetCapabilityVLAN_MTU kSCPropNetEthernetCapabilityVLAN_MTU /*! @@ -583,33 +599,33 @@ extern const CFStringRef kSCPropNetEthernetCapabilityVLAN_MTU __OS /*! @const kSCValNetInterfaceTypeCellular */ -extern const CFStringRef kSCValNetInterfaceTypeCellular __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/); +extern const CFStringRef kSCValNetInterfaceTypeCellular SPI_AVAILABLE(macos(10.0), ios(8.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetInterfaceTypeCellular kSCValNetInterfaceTypeCellular /*! @const kSCValNetInterfaceTypeLoopback */ -extern const CFStringRef kSCValNetInterfaceTypeLoopback __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCValNetInterfaceTypeLoopback API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetInterfaceTypeLoopback kSCValNetInterfaceTypeLoopback /*! @const kSCValNetInterfaceTypeVPN */ -extern const CFStringRef kSCValNetInterfaceTypeVPN __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCValNetInterfaceTypeVPN API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetInterfaceTypeVPN kSCValNetInterfaceTypeVPN /*! @const kSCPropNetIPSecDisconnectOnWake @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetIPSecDisconnectOnWake __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecDisconnectOnWake API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecDisconnectOnWake kSCPropNetIPSecDisconnectOnWake /*! @const kSCPropNetIPSecDisconnectOnWakeTimer @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetIPSecDisconnectOnWakeTimer __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecDisconnectOnWakeTimer API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecDisconnectOnWakeTimer kSCPropNetIPSecDisconnectOnWakeTimer /*! @@ -620,35 +636,35 @@ extern const CFStringRef kSCPropNetIPSecDisconnectOnWakeTimer __OS @const kSCPropNetIPSecLastCause @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetIPSecLastCause __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecLastCause API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(3.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecLastCause kSCPropNetIPSecLastCause /*! @const kSCPropNetIPSecOnDemandEnabled @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetIPSecOnDemandEnabled __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecOnDemandEnabled API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(3.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecOnDemandEnabled kSCPropNetIPSecOnDemandEnabled /*! @const kSCPropNetIPSecOnDemandMatchDomainsAlways @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetIPSecOnDemandMatchDomainsAlways __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecOnDemandMatchDomainsAlways API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(3.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecOnDemandMatchDomainsAlways kSCPropNetIPSecOnDemandMatchDomainsAlways /*! @const kSCPropNetIPSecOnDemandMatchDomainsOnRetry @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetIPSecOnDemandMatchDomainsOnRetry __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecOnDemandMatchDomainsOnRetry API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(3.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecOnDemandMatchDomainsOnRetry kSCPropNetIPSecOnDemandMatchDomainsOnRetry /*! @const kSCPropNetIPSecOnDemandMatchDomainsNever @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetIPSecOnDemandMatchDomainsNever __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/); +extern const CFStringRef kSCPropNetIPSecOnDemandMatchDomainsNever API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(3.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPSecOnDemandMatchDomainsNever kSCPropNetIPSecOnDemandMatchDomainsNever /*! @@ -659,69 +675,76 @@ extern const CFStringRef kSCPropNetIPSecOnDemandMatchDomainsNever __OS @const kSCPropNetIPv4AdditionalRoutes @discussion Value is a CFArray[CFDictionary] */ -extern const CFStringRef kSCPropNetIPv4AdditionalRoutes __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4AdditionalRoutes API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(8.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4AdditionalRoutes kSCPropNetIPv4AdditionalRoutes +/*! + @const kSCPropNetIPv4CLAT46 + @discussion Value is a CFBoolean + */ +extern const CFStringRef kSCPropNetIPv4CLAT46 API_AVAILABLE(macos(10.14)) SPI_AVAILABLE(ios(12.0), tvos(12.0), watchos(5.0), bridgeos(5.0)); +#define kSCPropNetIPv4CLAT46 kSCPropNetIPv4CLAT46 + /*! @const kSCPropNetIPv4ExcludedRoutes @discussion Value is a CFArray[CFDictionary] */ -extern const CFStringRef kSCPropNetIPv4ExcludedRoutes __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4ExcludedRoutes API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4ExcludedRoutes kSCPropNetIPv4ExcludedRoutes /*! @const kSCPropNetIPv4IncludedRoutes @discussion Value is a CFArray[CFDictionary] */ -extern const CFStringRef kSCPropNetIPv4IncludedRoutes __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4IncludedRoutes API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4IncludedRoutes kSCPropNetIPv4IncludedRoutes /*! @const kSCValNetIPv4ConfigMethodFailover */ -extern const CFStringRef kSCValNetIPv4ConfigMethodFailover __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetIPv4ConfigMethodFailover API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetIPv4ConfigMethodFailover kSCValNetIPv4ConfigMethodFailover /*! @const kSCPropNetIPv4RouteDestinationAddress @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPv4RouteDestinationAddress __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4RouteDestinationAddress API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4RouteDestinationAddress kSCPropNetIPv4RouteDestinationAddress /*! @const kSCPropNetIPv4RouteSubnetMask @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPv4RouteSubnetMask __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4RouteSubnetMask API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4RouteSubnetMask kSCPropNetIPv4RouteSubnetMask /*! @const kSCPropNetIPv4RouteGatewayAddress @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPv4RouteGatewayAddress __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4RouteGatewayAddress API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4RouteGatewayAddress kSCPropNetIPv4RouteGatewayAddress /*! @const kSCPropNetIPv4RouteInterfaceName @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPv4RouteInterfaceName __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4RouteInterfaceName API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(8.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4RouteInterfaceName kSCPropNetIPv4RouteInterfaceName /*! @const kSCPropNetIPv4ARPResolvedHardwareAddress @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPv4ARPResolvedHardwareAddress __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4ARPResolvedHardwareAddress API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4ARPResolvedHardwareAddress kSCPropNetIPv4ARPResolvedHardwareAddress /*! @const kSCPropNetIPv4ARPResolvedIPAddress @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPv4ARPResolvedIPAddress __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv4ARPResolvedIPAddress API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv4ARPResolvedIPAddress kSCPropNetIPv4ARPResolvedIPAddress /*! @@ -732,56 +755,63 @@ extern const CFStringRef kSCPropNetIPv4ARPResolvedIPAddress __OS @const kSCPropNetIPv6AdditionalRoutes @discussion Value is a CFArray[CFDictionary] */ -extern const CFStringRef kSCPropNetIPv6AdditionalRoutes __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv6AdditionalRoutes API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(8.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv6AdditionalRoutes kSCPropNetIPv6AdditionalRoutes /*! @const kSCPropNetIPv6EnableCGA @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetIPv6EnableCGA __OSX_AVAILABLE_STARTING(__MAC_10_12,__IPHONE_10_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv6EnableCGA API_AVAILABLE(macos(10.12)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(3.0)); #define kSCPropNetIPv6EnableCGA kSCPropNetIPv6EnableCGA /*! @const kSCPropNetIPv6ExcludedRoutes @discussion Value is a CFArray[CFDictionary] */ -extern const CFStringRef kSCPropNetIPv6ExcludedRoutes __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv6ExcludedRoutes API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv6ExcludedRoutes kSCPropNetIPv6ExcludedRoutes /*! @const kSCPropNetIPv6IncludedRoutes @discussion Value is a CFArray[CFDictionary] */ -extern const CFStringRef kSCPropNetIPv6IncludedRoutes __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv6IncludedRoutes API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv6IncludedRoutes kSCPropNetIPv6IncludedRoutes +/*! + @const kSCPropNetIPv6PerformPLATDiscovery + @discussion Value is a CFBoolean + */ +extern const CFStringRef kSCPropNetIPv6PerformPLATDiscovery API_AVAILABLE(macos(10.14)) SPI_AVAILABLE(ios(12.0), tvos(12.0), watchos(5.0), bridgeos(5.0)); +#define kSCPropNetIPv6PerformPLATDiscovery kSCPropNetIPv6PerformPLATDiscovery + /*! @const kSCPropNetIPv6RouteDestinationAddress @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPv6RouteDestinationAddress __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv6RouteDestinationAddress API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv6RouteDestinationAddress kSCPropNetIPv6RouteDestinationAddress /*! @const kSCPropNetIPv6RoutePrefixLength @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetIPv6RoutePrefixLength __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv6RoutePrefixLength API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv6RoutePrefixLength kSCPropNetIPv6RoutePrefixLength /*! @const kSCPropNetIPv6RouteGatewayAddress @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPv6RouteGatewayAddress __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv6RouteGatewayAddress API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv6RouteGatewayAddress kSCPropNetIPv6RouteGatewayAddress /*! @const kSCPropNetIPv6RouteInterfaceName @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetIPv6RouteInterfaceName __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/); +extern const CFStringRef kSCPropNetIPv6RouteInterfaceName API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(8.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetIPv6RouteInterfaceName kSCPropNetIPv6RouteInterfaceName /*! @@ -792,7 +822,7 @@ extern const CFStringRef kSCPropNetIPv6RouteInterfaceName __OS @const kSCPropNetLinkExpensive @discussion Value is a CFBoolean */ -extern const CFStringRef kSCPropNetLinkExpensive __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/); +extern const CFStringRef kSCPropNetLinkExpensive API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(8.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetLinkExpensive kSCPropNetLinkExpensive /*! @@ -803,21 +833,21 @@ extern const CFStringRef kSCPropNetLinkExpensive __OS @const kSCPropNetLinkIssuesModuleID @discussion Value is a CFData */ -extern const CFStringRef kSCPropNetLinkIssuesModuleID __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetLinkIssuesModuleID API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetLinkIssuesModuleID kSCPropNetLinkIssuesModuleID /*! @const kSCPropNetLinkIssuesInfo @discussion Value is a CFData */ -extern const CFStringRef kSCPropNetLinkIssuesInfo __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetLinkIssuesInfo API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetLinkIssuesInfo kSCPropNetLinkIssuesInfo /*! @const kSCPropNetLinkIssuesTimeStamp @discussion Value is a CFDate */ -extern const CFStringRef kSCPropNetLinkIssuesTimeStamp __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetLinkIssuesTimeStamp API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetLinkIssuesTimeStamp kSCPropNetLinkIssuesTimeStamp /*! @@ -828,21 +858,21 @@ extern const CFStringRef kSCPropNetLinkIssuesTimeStamp __OS @const kSCPropNetLinkQuality @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetLinkQuality __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetLinkQuality API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetLinkQuality kSCPropNetLinkQuality /*! @const kSCPropNetPPPDisconnectOnWake @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPDisconnectOnWake __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPDisconnectOnWake API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPDisconnectOnWake kSCPropNetPPPDisconnectOnWake /*! @const kSCPropNetPPPDisconnectOnWakeTimer @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetPPPDisconnectOnWakeTimer __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPDisconnectOnWakeTimer API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPDisconnectOnWakeTimer kSCPropNetPPPDisconnectOnWakeTimer /*! @@ -853,94 +883,119 @@ extern const CFStringRef kSCPropNetPPPDisconnectOnWakeTimer __OS @const kSCPropNetPPPOnDemandDomains @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetPPPOnDemandDomains __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPOnDemandDomains API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPOnDemandDomains kSCPropNetPPPOnDemandDomains /*! @const kSCPropNetPPPOnDemandEnabled @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetPPPOnDemandEnabled __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPOnDemandEnabled API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPOnDemandEnabled kSCPropNetPPPOnDemandEnabled /*! @const kSCPropNetPPPOnDemandHostName @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetPPPOnDemandHostName __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPOnDemandHostName API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPOnDemandHostName kSCPropNetPPPOnDemandHostName /*! @const kSCPropNetPPPOnDemandMatchDomainsAlways @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetPPPOnDemandMatchDomainsAlways __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPOnDemandMatchDomainsAlways API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPOnDemandMatchDomainsAlways kSCPropNetPPPOnDemandMatchDomainsAlways /*! @const kSCPropNetPPPOnDemandMatchDomainsOnRetry @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetPPPOnDemandMatchDomainsOnRetry __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPOnDemandMatchDomainsOnRetry API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPOnDemandMatchDomainsOnRetry kSCPropNetPPPOnDemandMatchDomainsOnRetry /*! @const kSCPropNetPPPOnDemandMatchDomainsNever @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetPPPOnDemandMatchDomainsNever __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPOnDemandMatchDomainsNever API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPOnDemandMatchDomainsNever kSCPropNetPPPOnDemandMatchDomainsNever /*! @const kSCPropNetPPPOnDemandMode @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetPPPOnDemandMode __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPOnDemandMode API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPOnDemandMode kSCPropNetPPPOnDemandMode /*! @const kSCPropNetPPPOnDemandPriority @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetPPPOnDemandPriority __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetPPPOnDemandPriority API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetPPPOnDemandPriority kSCPropNetPPPOnDemandPriority /*! @const kSCValNetPPPOnDemandModeAggressive */ -extern const CFStringRef kSCValNetPPPOnDemandModeAggressive __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPOnDemandModeAggressive API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPOnDemandModeAggressive kSCValNetPPPOnDemandModeAggressive /*! @const kSCValNetPPPOnDemandModeConservative */ -extern const CFStringRef kSCValNetPPPOnDemandModeConservative __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPOnDemandModeConservative API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPOnDemandModeConservative kSCValNetPPPOnDemandModeConservative /*! @const kSCValNetPPPOnDemandModeCompatible */ -extern const CFStringRef kSCValNetPPPOnDemandModeCompatible __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPOnDemandModeCompatible API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPOnDemandModeCompatible kSCValNetPPPOnDemandModeCompatible /*! @const kSCValNetPPPOnDemandPriorityDefault */ -extern const CFStringRef kSCValNetPPPOnDemandPriorityDefault __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPOnDemandPriorityDefault API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPOnDemandPriorityDefault kSCValNetPPPOnDemandPriorityDefault /*! @const kSCValNetPPPOnDemandPriorityHigh */ -extern const CFStringRef kSCValNetPPPOnDemandPriorityHigh __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPOnDemandPriorityHigh API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPOnDemandPriorityHigh kSCValNetPPPOnDemandPriorityHigh /*! @const kSCValNetPPPOnDemandPriorityLow */ -extern const CFStringRef kSCValNetPPPOnDemandPriorityLow __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetPPPOnDemandPriorityLow API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetPPPOnDemandPriorityLow kSCValNetPPPOnDemandPriorityLow +/*! + @group kSCEntNetNAT64 Entity Keys + */ + +/*! + @const kSCPropNetNAT64PrefixList + @discussion Value is a CFArray[CFString] + */ +extern const CFStringRef kSCPropNetNAT64PrefixList API_AVAILABLE(macos(10.14)) SPI_AVAILABLE(ios(12.0), tvos(12.0), watchos(5.0), bridgeos(5.0)); +#define kSCPropNetNAT64PrefixList kSCPropNetNAT64PrefixList + +/*! + @const kSCPropNetNAT64PLATDiscoveryStartTime + @discussion Value is a CFDate + */ +extern const CFStringRef kSCPropNetNAT64PLATDiscoveryStartTime API_AVAILABLE(macos(10.14)) SPI_AVAILABLE(ios(12.0), tvos(12.0), watchos(5.0), bridgeos(5.0)); +#define kSCPropNetNAT64PLATDiscoveryStartTime kSCPropNetNAT64PLATDiscoveryStartTime + +/*! + @const kSCPropNetNAT64PLATDiscoveryCompletionTime + @discussion Value is a CFDate + */ +extern const CFStringRef kSCPropNetNAT64PLATDiscoveryCompletionTime API_AVAILABLE(macos(10.14)) SPI_AVAILABLE(ios(12.0), tvos(12.0), watchos(5.0), bridgeos(5.0)); +#define kSCPropNetNAT64PLATDiscoveryCompletionTime kSCPropNetNAT64PLATDiscoveryCompletionTime + /*! @group kSCEntNetProxies Entity Keys */ @@ -949,63 +1004,63 @@ extern const CFStringRef kSCValNetPPPOnDemandPriorityLow __OS @const kSCPropNetProxiesBypassAllowed @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetProxiesBypassAllowed __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesBypassAllowed API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesBypassAllowed kSCPropNetProxiesBypassAllowed /*! @const kSCPropNetProxiesFallBackAllowed @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetProxiesFallBackAllowed __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_6_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesFallBackAllowed API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesFallBackAllowed kSCPropNetProxiesFallBackAllowed /*! @const kSCPropNetProxiesSupplementalMatchDomains @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetProxiesSupplementalMatchDomains __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesSupplementalMatchDomains API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesSupplementalMatchDomains kSCPropNetProxiesSupplementalMatchDomains /*! @const kSCPropNetProxiesSupplementalMatchOrders @discussion Value is a CFArray[CFNumber] */ -extern const CFStringRef kSCPropNetProxiesSupplementalMatchOrders __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesSupplementalMatchOrders API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesSupplementalMatchOrders kSCPropNetProxiesSupplementalMatchOrders /*! @const kSCPropNetProxiesServiceSpecific @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetProxiesServiceSpecific __OSX_AVAILABLE_STARTING(__MAC_10_11,__IPHONE_9_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesServiceSpecific API_AVAILABLE(macos(10.11)) SPI_AVAILABLE(ios(9.0), tvos(9.0), watchos(2.0), bridgeos(2.0)); #define kSCPropNetProxiesServiceSpecific kSCPropNetProxiesServiceSpecific /*! @const kSCPropNetProxiesScoped @discussion Value is a CFDictionary */ -extern const CFStringRef kSCPropNetProxiesScoped __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesScoped API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesScoped kSCPropNetProxiesScoped /*! @const kSCPropNetProxiesServices @discussion Value is a CFDictionary */ -extern const CFStringRef kSCPropNetProxiesServices __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesServices API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesServices kSCPropNetProxiesServices /*! @const kSCPropNetProxiesSupplemental @discussion Value is a CFArray[CFDictionary] */ -extern const CFStringRef kSCPropNetProxiesSupplemental __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesSupplemental API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesSupplemental kSCPropNetProxiesSupplemental /*! @const kSCPropNetProxiesSupplementalMatchDomain @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetProxiesSupplementalMatchDomain __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/); +extern const CFStringRef kSCPropNetProxiesSupplementalMatchDomain API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetProxiesSupplementalMatchDomain kSCPropNetProxiesSupplementalMatchDomain /*! @@ -1016,21 +1071,21 @@ extern const CFStringRef kSCPropNetProxiesSupplementalMatchDomain __OS @const kSCPropNetQoSMarkingAppleAudioVideoCalls @discussion Value is a CFBoolean */ -extern const CFStringRef kSCPropNetQoSMarkingAppleAudioVideoCalls __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_10_0/*SPI*/); +extern const CFStringRef kSCPropNetQoSMarkingAppleAudioVideoCalls API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(3.0)); #define kSCPropNetQoSMarkingAppleAudioVideoCalls kSCPropNetQoSMarkingAppleAudioVideoCalls /*! @const kSCPropNetQoSMarkingEnabled @discussion Value is a CFBoolean */ -extern const CFStringRef kSCPropNetQoSMarkingEnabled __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_10_0/*SPI*/); +extern const CFStringRef kSCPropNetQoSMarkingEnabled API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(3.0)); #define kSCPropNetQoSMarkingEnabled kSCPropNetQoSMarkingEnabled /*! @const kSCPropNetQoSMarkingWhitelistedAppIdentifiers @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetQoSMarkingWhitelistedAppIdentifiers __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_10_0/*SPI*/); +extern const CFStringRef kSCPropNetQoSMarkingWhitelistedAppIdentifiers API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(3.0)); #define kSCPropNetQoSMarkingWhitelistedAppIdentifiers kSCPropNetQoSMarkingWhitelistedAppIdentifiers /*! @@ -1041,45 +1096,45 @@ extern const CFStringRef kSCPropNetQoSMarkingWhitelistedAppIdentifiers __OS @const kSCPropNetServicePrimaryRank @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetServicePrimaryRank __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetServicePrimaryRank API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetServicePrimaryRank kSCPropNetServicePrimaryRank /*! @const kSCPropNetServiceServiceIndex @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetServiceServiceIndex __OSX_AVAILABLE_STARTING(__MAC_10_12,__IPHONE_10_0/*SPI*/); +extern const CFStringRef kSCPropNetServiceServiceIndex API_AVAILABLE(macos(10.12)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(3.0)); #define kSCPropNetServiceServiceIndex kSCPropNetServiceServiceIndex /*! @const kSCPropNetServiceUserDefinedName @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetServiceUserDefinedName __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropNetServiceUserDefinedName API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetServiceUserDefinedName kSCPropNetServiceUserDefinedName /*! @const kSCValNetServicePrimaryRankFirst */ -extern const CFStringRef kSCValNetServicePrimaryRankFirst __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetServicePrimaryRankFirst API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetServicePrimaryRankFirst kSCValNetServicePrimaryRankFirst /*! @const kSCValNetServicePrimaryRankLast */ -extern const CFStringRef kSCValNetServicePrimaryRankLast __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetServicePrimaryRankLast API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetServicePrimaryRankLast kSCValNetServicePrimaryRankLast /*! @const kSCValNetServicePrimaryRankNever */ -extern const CFStringRef kSCValNetServicePrimaryRankNever __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCValNetServicePrimaryRankNever API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetServicePrimaryRankNever kSCValNetServicePrimaryRankNever /*! @const kSCValNetServicePrimaryRankScoped */ -extern const CFStringRef kSCValNetServicePrimaryRankScoped __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/); +extern const CFStringRef kSCValNetServicePrimaryRankScoped API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(8.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetServicePrimaryRankScoped kSCValNetServicePrimaryRankScoped /*! @@ -1090,431 +1145,431 @@ extern const CFStringRef kSCValNetServicePrimaryRankScoped __OS @const kSCPropNetVPNAppRules @discussion Value is a CFArray[CFDictionary] */ -extern const CFStringRef kSCPropNetVPNAppRules __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNAppRules API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNAppRules kSCPropNetVPNAppRules /*! @const kSCPropNetVPNAuthCredentialPassword @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNAuthCredentialPassword __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNAuthCredentialPassword API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNAuthCredentialPassword kSCPropNetVPNAuthCredentialPassword /*! @const kSCPropNetVPNAuthName @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNAuthName __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNAuthName API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNAuthName kSCPropNetVPNAuthName /*! @const kSCPropNetVPNAuthPassword @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNAuthPassword __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNAuthPassword API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNAuthPassword kSCPropNetVPNAuthPassword /*! @const kSCPropNetVPNAuthPasswordEncryption @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNAuthPasswordEncryption __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNAuthPasswordEncryption API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNAuthPasswordEncryption kSCPropNetVPNAuthPasswordEncryption /*! @const kSCPropNetVPNAuthPasswordPluginType @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNAuthPasswordPluginType __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNAuthPasswordPluginType API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNAuthPasswordPluginType kSCPropNetVPNAuthPasswordPluginType /*! @const kSCPropNetVPNAuthenticationMethod @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNAuthenticationMethod __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNAuthenticationMethod API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNAuthenticationMethod kSCPropNetVPNAuthenticationMethod /*! @const kSCPropNetVPNConnectTime @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNConnectTime __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNConnectTime API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNConnectTime kSCPropNetVPNConnectTime /*! @const kSCPropNetVPNDisconnectOnFastUserSwitch @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetVPNDisconnectOnFastUserSwitch __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNDisconnectOnFastUserSwitch API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNDisconnectOnFastUserSwitch kSCPropNetVPNDisconnectOnFastUserSwitch /*! @const kSCPropNetVPNDisconnectOnIdle @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetVPNDisconnectOnIdle __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNDisconnectOnIdle API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNDisconnectOnIdle kSCPropNetVPNDisconnectOnIdle /*! @const kSCPropNetVPNDisconnectOnIdleTimer @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetVPNDisconnectOnIdleTimer __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNDisconnectOnIdleTimer API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNDisconnectOnIdleTimer kSCPropNetVPNDisconnectOnIdleTimer /*! @const kSCPropNetVPNDisconnectOnLogout @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetVPNDisconnectOnLogout __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNDisconnectOnLogout API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNDisconnectOnLogout kSCPropNetVPNDisconnectOnLogout /*! @const kSCPropNetVPNDisconnectOnSleep @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetVPNDisconnectOnSleep __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNDisconnectOnSleep API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNDisconnectOnSleep kSCPropNetVPNDisconnectOnSleep /*! @const kSCPropNetVPNDisconnectOnWake @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetVPNDisconnectOnWake __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNDisconnectOnWake API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNDisconnectOnWake kSCPropNetVPNDisconnectOnWake /*! @const kSCPropNetVPNDisconnectOnWakeTimer @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetVPNDisconnectOnWakeTimer __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNDisconnectOnWakeTimer API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNDisconnectOnWakeTimer kSCPropNetVPNDisconnectOnWakeTimer /*! @const kSCPropNetVPNLocalCertificate @discussion Value is a CFData */ -extern const CFStringRef kSCPropNetVPNLocalCertificate __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNLocalCertificate API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNLocalCertificate kSCPropNetVPNLocalCertificate /*! @const kSCPropNetVPNLogfile @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNLogfile __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNLogfile API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNLogfile kSCPropNetVPNLogfile /*! @const kSCPropNetVPNMTU @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetVPNMTU __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNMTU API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNMTU kSCPropNetVPNMTU /*! @const kSCPropNetVPNOnDemandEnabled @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetVPNOnDemandEnabled __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandEnabled API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandEnabled kSCPropNetVPNOnDemandEnabled /*! @const kSCPropNetVPNOnDemandMatchAppEnabled @discussion Value is a CFBoolean */ -extern const CFStringRef kSCPropNetVPNOnDemandMatchAppEnabled __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandMatchAppEnabled API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandMatchAppEnabled kSCPropNetVPNOnDemandMatchAppEnabled /*! @const kSCPropNetVPNOnDemandMatchDomainsAlways @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetVPNOnDemandMatchDomainsAlways __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandMatchDomainsAlways API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandMatchDomainsAlways kSCPropNetVPNOnDemandMatchDomainsAlways /*! @const kSCPropNetVPNOnDemandMatchDomainsOnRetry @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetVPNOnDemandMatchDomainsOnRetry __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandMatchDomainsOnRetry API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandMatchDomainsOnRetry kSCPropNetVPNOnDemandMatchDomainsOnRetry /*! @const kSCPropNetVPNOnDemandMatchDomainsNever @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetVPNOnDemandMatchDomainsNever __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandMatchDomainsNever API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandMatchDomainsNever kSCPropNetVPNOnDemandMatchDomainsNever /*! @const kSCPropNetVPNOnDemandRules @discussion Value is a CFArray[CFDictionary] */ -extern const CFStringRef kSCPropNetVPNOnDemandRules __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandRules API_AVAILABLE(macos(10.8)) SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandRules kSCPropNetVPNOnDemandRules /*! @const kSCPropNetVPNOnDemandSuspended @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetVPNOnDemandSuspended __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandSuspended API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandSuspended kSCPropNetVPNOnDemandSuspended /*! @const kSCPropNetVPNPluginCapability @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNPluginCapability __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNPluginCapability API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNPluginCapability kSCPropNetVPNPluginCapability /*! @const kSCPropNetVPNRemoteAddress @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNRemoteAddress __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNRemoteAddress API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNRemoteAddress kSCPropNetVPNRemoteAddress /*! @const kSCPropNetVPNStatus @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropNetVPNStatus __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNStatus API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNStatus kSCPropNetVPNStatus /*! @const kSCPropNetVPNVerboseLogging @discussion Value is a CFNumber (0 or 1) */ -extern const CFStringRef kSCPropNetVPNVerboseLogging __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNVerboseLogging API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNVerboseLogging kSCPropNetVPNVerboseLogging /*! @const kSCValNetVPNAppRuleAccountIdentifierMatch @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCValNetVPNAppRuleAccountIdentifierMatch __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNAppRuleAccountIdentifierMatch API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNAppRuleAccountIdentifierMatch kSCValNetVPNAppRuleAccountIdentifierMatch /*! @const kSCValNetVPNAppRuleDNSDomainMatch @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCValNetVPNAppRuleDNSDomainMatch __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNAppRuleDNSDomainMatch API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNAppRuleDNSDomainMatch kSCValNetVPNAppRuleDNSDomainMatch /*! @const kSCValNetVPNAppRuleExecutableMatch @discussion Value is a CFArray[CFDictionary] */ -extern const CFStringRef kSCValNetVPNAppRuleExecutableMatch __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNAppRuleExecutableMatch API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNAppRuleExecutableMatch kSCValNetVPNAppRuleExecutableMatch /*! @const kSCValNetVPNAppRuleIdentifier @discussion Value is a CFString */ -extern const CFStringRef kSCValNetVPNAppRuleIdentifier __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNAppRuleIdentifier API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNAppRuleIdentifier kSCValNetVPNAppRuleIdentifier /*! @const kSCValNetVPNAppRuleExecutableDesignatedRequirement @discussion Value is a CFString */ -extern const CFStringRef kSCValNetVPNAppRuleExecutableDesignatedRequirement __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNAppRuleExecutableDesignatedRequirement API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNAppRuleExecutableDesignatedRequirement kSCValNetVPNAppRuleExecutableDesignatedRequirement /*! @const kSCValNetVPNAppRuleExecutableSigningIdentifier @discussion Value is a CFString */ -extern const CFStringRef kSCValNetVPNAppRuleExecutableSigningIdentifier __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNAppRuleExecutableSigningIdentifier API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNAppRuleExecutableSigningIdentifier kSCValNetVPNAppRuleExecutableSigningIdentifier /*! @const kSCValNetVPNAppRuleExecutableUUID @discussion Value is a CFString */ -extern const CFStringRef kSCValNetVPNAppRuleExecutableUUID __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNAppRuleExecutableUUID API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNAppRuleExecutableUUID kSCValNetVPNAppRuleExecutableUUID /*! @const kSCValNetVPNAuthenticationMethodPassword */ -extern const CFStringRef kSCValNetVPNAuthenticationMethodPassword __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCValNetVPNAuthenticationMethodPassword API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNAuthenticationMethodPassword kSCValNetVPNAuthenticationMethodPassword /*! @const kSCValNetVPNAuthenticationMethodCertificate */ -extern const CFStringRef kSCValNetVPNAuthenticationMethodCertificate __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCValNetVPNAuthenticationMethodCertificate API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNAuthenticationMethodCertificate kSCValNetVPNAuthenticationMethodCertificate /*! @const kSCValNetVPNAuthPasswordEncryptionExternal */ -extern const CFStringRef kSCValNetVPNAuthPasswordEncryptionExternal __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNAuthPasswordEncryptionExternal API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNAuthPasswordEncryptionExternal kSCValNetVPNAuthPasswordEncryptionExternal /*! @const kSCValNetVPNAuthPasswordEncryptionKeychain */ -extern const CFStringRef kSCValNetVPNAuthPasswordEncryptionKeychain __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCValNetVPNAuthPasswordEncryptionKeychain API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNAuthPasswordEncryptionKeychain kSCValNetVPNAuthPasswordEncryptionKeychain /*! @const kSCValNetVPNAuthPasswordEncryptionPrompt */ -extern const CFStringRef kSCValNetVPNAuthPasswordEncryptionPrompt __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCValNetVPNAuthPasswordEncryptionPrompt API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNAuthPasswordEncryptionPrompt kSCValNetVPNAuthPasswordEncryptionPrompt /*! @const kSCPropNetVPNOnDemandRuleAction @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNOnDemandRuleAction __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandRuleAction API_AVAILABLE(macos(10.8)) SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandRuleAction kSCPropNetVPNOnDemandRuleAction /*! @const kSCPropNetVPNOnDemandRuleActionParameters @discussion Value is a CFArray[CFDictionary] */ -extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParameters __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParameters API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandRuleActionParameters kSCPropNetVPNOnDemandRuleActionParameters /*! @const kSCPropNetVPNOnDemandRuleDNSDomainMatch @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetVPNOnDemandRuleDNSDomainMatch __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandRuleDNSDomainMatch API_AVAILABLE(macos(10.8)) SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandRuleDNSDomainMatch kSCPropNetVPNOnDemandRuleDNSDomainMatch /*! @const kSCPropNetVPNOnDemandRuleDNSServerAddressMatch @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetVPNOnDemandRuleDNSServerAddressMatch __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandRuleDNSServerAddressMatch API_AVAILABLE(macos(10.8)) SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandRuleDNSServerAddressMatch kSCPropNetVPNOnDemandRuleDNSServerAddressMatch /*! @const kSCPropNetVPNOnDemandRuleSSIDMatch @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetVPNOnDemandRuleSSIDMatch __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandRuleSSIDMatch API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandRuleSSIDMatch kSCPropNetVPNOnDemandRuleSSIDMatch /*! @const kSCPropNetVPNOnDemandRuleInterfaceTypeMatch @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNOnDemandRuleInterfaceTypeMatch __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandRuleInterfaceTypeMatch API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandRuleInterfaceTypeMatch kSCPropNetVPNOnDemandRuleInterfaceTypeMatch /*! @const kSCPropNetVPNOnDemandRuleURLStringProbe @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNOnDemandRuleURLStringProbe __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandRuleURLStringProbe API_AVAILABLE(macos(10.8)) SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandRuleURLStringProbe kSCPropNetVPNOnDemandRuleURLStringProbe /*! @const kSCValNetVPNOnDemandRuleActionAllow */ -extern const CFStringRef kSCValNetVPNOnDemandRuleActionAllow __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/); +extern const CFStringRef kSCValNetVPNOnDemandRuleActionAllow API_AVAILABLE(macos(10.8)) SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNOnDemandRuleActionAllow kSCValNetVPNOnDemandRuleActionAllow /*! @const kSCValNetVPNOnDemandRuleActionIgnore */ -extern const CFStringRef kSCValNetVPNOnDemandRuleActionIgnore __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/); +extern const CFStringRef kSCValNetVPNOnDemandRuleActionIgnore API_AVAILABLE(macos(10.8)) SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNOnDemandRuleActionIgnore kSCValNetVPNOnDemandRuleActionIgnore /*! @const kSCValNetVPNOnDemandRuleActionConnect */ -extern const CFStringRef kSCValNetVPNOnDemandRuleActionConnect __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/); +extern const CFStringRef kSCValNetVPNOnDemandRuleActionConnect API_AVAILABLE(macos(10.8)) SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNOnDemandRuleActionConnect kSCValNetVPNOnDemandRuleActionConnect /*! @const kSCValNetVPNOnDemandRuleActionDisconnect */ -extern const CFStringRef kSCValNetVPNOnDemandRuleActionDisconnect __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/); +extern const CFStringRef kSCValNetVPNOnDemandRuleActionDisconnect API_AVAILABLE(macos(10.8)) SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNOnDemandRuleActionDisconnect kSCValNetVPNOnDemandRuleActionDisconnect /*! @const kSCValNetVPNOnDemandRuleActionEvaluateConnection */ -extern const CFStringRef kSCValNetVPNOnDemandRuleActionEvaluateConnection __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNOnDemandRuleActionEvaluateConnection API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNOnDemandRuleActionEvaluateConnection kSCValNetVPNOnDemandRuleActionEvaluateConnection /*! @const kSCPropNetVPNOnDemandRuleActionParametersDomainAction @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParametersDomainAction __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParametersDomainAction API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandRuleActionParametersDomainAction kSCPropNetVPNOnDemandRuleActionParametersDomainAction /*! @const kSCPropNetVPNOnDemandRuleActionParametersDomains @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParametersDomains __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParametersDomains API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandRuleActionParametersDomains kSCPropNetVPNOnDemandRuleActionParametersDomains /*! @const kSCPropNetVPNOnDemandRuleActionParametersRequiredDNSServers @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParametersRequiredDNSServers __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParametersRequiredDNSServers API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandRuleActionParametersRequiredDNSServers kSCPropNetVPNOnDemandRuleActionParametersRequiredDNSServers /*! @const kSCPropNetVPNOnDemandRuleActionParametersRequiredURLStringProbe @discussion Value is a CFString */ -extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParametersRequiredURLStringProbe __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCPropNetVPNOnDemandRuleActionParametersRequiredURLStringProbe API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropNetVPNOnDemandRuleActionParametersRequiredURLStringProbe kSCPropNetVPNOnDemandRuleActionParametersRequiredURLStringProbe /*! @const kSCValNetVPNOnDemandRuleActionParametersDomainActionConnectIfNeeded */ -extern const CFStringRef kSCValNetVPNOnDemandRuleActionParametersDomainActionConnectIfNeeded __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNOnDemandRuleActionParametersDomainActionConnectIfNeeded API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNOnDemandRuleActionParametersDomainActionConnectIfNeeded kSCValNetVPNOnDemandRuleActionParametersDomainActionConnectIfNeeded /*! @const kSCValNetVPNOnDemandRuleActionParametersDomainActionNeverConnect */ -extern const CFStringRef kSCValNetVPNOnDemandRuleActionParametersDomainActionNeverConnect __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNOnDemandRuleActionParametersDomainActionNeverConnect API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNOnDemandRuleActionParametersDomainActionNeverConnect kSCValNetVPNOnDemandRuleActionParametersDomainActionNeverConnect /*! @const kSCValNetVPNOnDemandRuleInterfaceTypeMatchCellular */ -extern const CFStringRef kSCValNetVPNOnDemandRuleInterfaceTypeMatchCellular __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNOnDemandRuleInterfaceTypeMatchCellular SPI_AVAILABLE(macos(9.0), ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNOnDemandRuleInterfaceTypeMatchCellular kSCValNetVPNOnDemandRuleInterfaceTypeMatchCellular /*! @const kSCValNetVPNOnDemandRuleInterfaceTypeMatchEthernet */ -extern const CFStringRef kSCValNetVPNOnDemandRuleInterfaceTypeMatchEthernet __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNOnDemandRuleInterfaceTypeMatchEthernet API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNOnDemandRuleInterfaceTypeMatchEthernet kSCValNetVPNOnDemandRuleInterfaceTypeMatchEthernet /*! @const kSCValNetVPNOnDemandRuleInterfaceTypeMatchWiFi */ -extern const CFStringRef kSCValNetVPNOnDemandRuleInterfaceTypeMatchWiFi __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNOnDemandRuleInterfaceTypeMatchWiFi API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNOnDemandRuleInterfaceTypeMatchWiFi kSCValNetVPNOnDemandRuleInterfaceTypeMatchWiFi /*! @const kSCValNetVPNPluginCapabilityAuth */ -extern const CFStringRef kSCValNetVPNPluginCapabilityAuth __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNPluginCapabilityAuth API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNPluginCapabilityAuth kSCValNetVPNPluginCapabilityAuth /*! @const kSCValNetVPNPluginCapabilityConnect */ -extern const CFStringRef kSCValNetVPNPluginCapabilityConnect __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/); +extern const CFStringRef kSCValNetVPNPluginCapabilityConnect API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCValNetVPNPluginCapabilityConnect kSCValNetVPNPluginCapabilityConnect /*! @@ -1525,14 +1580,14 @@ extern const CFStringRef kSCValNetVPNPluginCapabilityConnect __OS @const kSCPropSystemComputerNameRegion @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropSystemComputerNameRegion __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropSystemComputerNameRegion API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropSystemComputerNameRegion kSCPropSystemComputerNameRegion /*! @const kSCPropSystemHostName @discussion Value is a CFString */ -extern const CFStringRef kSCPropSystemHostName __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropSystemHostName API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropSystemHostName kSCPropSystemHostName /*! @@ -1543,56 +1598,56 @@ extern const CFStringRef kSCPropSystemHostName __OS @const kSCPropVirtualNetworkInterfacesBondInterfaces @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropVirtualNetworkInterfacesBondInterfaces __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropVirtualNetworkInterfacesBondInterfaces API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropVirtualNetworkInterfacesBondInterfaces kSCPropVirtualNetworkInterfacesBondInterfaces /*! @const kSCPropVirtualNetworkInterfacesBondMode @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropVirtualNetworkInterfacesBondMode __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropVirtualNetworkInterfacesBondMode API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropVirtualNetworkInterfacesBondMode kSCPropVirtualNetworkInterfacesBondMode /*! @const kSCPropVirtualNetworkInterfacesBondOptions @discussion Value is a CFDictionary */ -extern const CFStringRef kSCPropVirtualNetworkInterfacesBondOptions __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropVirtualNetworkInterfacesBondOptions API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropVirtualNetworkInterfacesBondOptions kSCPropVirtualNetworkInterfacesBondOptions /*! @const kSCPropVirtualNetworkInterfacesBridgeInterfaces @discussion Value is a CFArray[CFString] */ -extern const CFStringRef kSCPropVirtualNetworkInterfacesBridgeInterfaces __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropVirtualNetworkInterfacesBridgeInterfaces API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropVirtualNetworkInterfacesBridgeInterfaces kSCPropVirtualNetworkInterfacesBridgeInterfaces /*! @const kSCPropVirtualNetworkInterfacesBridgeOptions @discussion Value is a CFDictionary */ -extern const CFStringRef kSCPropVirtualNetworkInterfacesBridgeOptions __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/); +extern const CFStringRef kSCPropVirtualNetworkInterfacesBridgeOptions API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropVirtualNetworkInterfacesBridgeOptions kSCPropVirtualNetworkInterfacesBridgeOptions /*! @const kSCPropVirtualNetworkInterfacesVLANInterface @discussion Value is a CFString */ -extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANInterface __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANInterface API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropVirtualNetworkInterfacesVLANInterface kSCPropVirtualNetworkInterfacesVLANInterface /*! @const kSCPropVirtualNetworkInterfacesVLANTag @discussion Value is a CFNumber */ -extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANTag __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANTag API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropVirtualNetworkInterfacesVLANTag kSCPropVirtualNetworkInterfacesVLANTag /*! @const kSCPropVirtualNetworkInterfacesVLANOptions @discussion Value is a CFDictionary */ -extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANOptions __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/); +extern const CFStringRef kSCPropVirtualNetworkInterfacesVLANOptions API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)); #define kSCPropVirtualNetworkInterfacesVLANOptions kSCPropVirtualNetworkInterfacesVLANOptions diff --git a/SystemConfiguration.fproj/SystemConfiguration.h b/SystemConfiguration.fproj/SystemConfiguration.h index 70044ab..c30a683 100644 --- a/SystemConfiguration.fproj/SystemConfiguration.h +++ b/SystemConfiguration.fproj/SystemConfiguration.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000-2004, 2006, 2008-2010, 2012, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2000-2004, 2006, 2008-2010, 2012, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,14 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SYSTEMCONFIGURATION_H #define _SYSTEMCONFIGURATION_H -#include +#include #include #include @@ -106,12 +106,14 @@ enum { /* * SCNetworkConnection error codes */ - kSCStatusConnectionNoService = 5001, /* Network service for connection not available - __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0) - */ - kSCStatusConnectionIgnore = 5002, /* Network connection information not available at this time - __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_6_0) - */ + kSCStatusConnectionNoService + API_AVAILABLE(macos(6.0)) + SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0)) + = 5001, /* Network service for connection not available */ + kSCStatusConnectionIgnore + API_AVAILABLE(macos(9.0)) + SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0)) + = 5002, /* Network connection information not available at this time */ }; @@ -144,7 +146,7 @@ CF_ASSUME_NONNULL_BEGIN @discussion CFError domain associated with errors reported by the SystemConfiguration.framework. */ -extern const CFStringRef kCFErrorDomainSystemConfiguration __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +extern const CFStringRef kCFErrorDomainSystemConfiguration API_AVAILABLE(macos(10.5), ios(2.0)); __BEGIN_DECLS @@ -154,7 +156,7 @@ __BEGIN_DECLS as the result of calling a System Configuration framework API. @result Returns the last error encountered. */ -CFErrorRef SCCopyLastError (void) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); +CFErrorRef SCCopyLastError (void) API_AVAILABLE(macos(10.5), ios(2.0)); /*! @function SCError @@ -162,7 +164,7 @@ CFErrorRef SCCopyLastError (void) __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHO as the result of calling a System Configuration framework API. @result Returns the last error encountered. */ -int SCError (void) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0); +int SCError (void) API_AVAILABLE(macos(10.1), ios(2.0)); /*! @function SCErrorString @@ -171,11 +173,11 @@ int SCError (void) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0); @param status The SCDynamicStoreStatus to be returned. @result Returns a pointer to the error message string. */ -const char * SCErrorString (int status) __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0); +const char * SCErrorString (int status) API_AVAILABLE(macos(10.1), ios(2.0)); __END_DECLS CF_ASSUME_NONNULL_END CF_IMPLICIT_BRIDGING_DISABLED -#endif /* _SYSTEMCONFIGURATION_H */ +#endif /* _SYSTEMCONFIGURATION_H */ diff --git a/SystemConfiguration.fproj/SystemConfigurationInternal.h b/SystemConfiguration.fproj/SystemConfigurationInternal.h new file mode 100644 index 0000000..1c9e1f3 --- /dev/null +++ b/SystemConfiguration.fproj/SystemConfigurationInternal.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2018 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _SYSTEMCONFIGURATIONINTERNAL_H +#define _SYSTEMCONFIGURATIONINTERNAL_H + +#include +#include +#include + +#include "SCDynamicStoreInternal.h" + +extern const unsigned char * SystemConfigurationVersionString; +extern const double SystemConfigurationVersionNumber; + +#if !TARGET_OS_IPHONE +extern const CFStringRef kSCEntNetAppleTalk; +extern const CFStringRef kSCEntNetNetInfo; +extern const CFStringRef kSCPropNetAppleTalkConfigMethod; +extern const CFStringRef kSCPropNetAppleTalkDefaultZone; +extern const CFStringRef kSCPropNetAppleTalkNetworkID; +extern const CFStringRef kSCPropNetAppleTalkNodeID; +extern const CFStringRef kSCValNetAppleTalkConfigMethodNode; +#endif // !TARGET_OS_IPHONE + +__BEGIN_DECLS + +void +_SCDPluginExecInit (void); + +__END_DECLS + +#endif // _SYSTEMCONFIGURATIONINTERNAL_H diff --git a/SystemConfiguration.fproj/VLANConfiguration.c b/SystemConfiguration.fproj/VLANConfiguration.c index d0d9c30..cd6cdf8 100644 --- a/SystemConfiguration.fproj/VLANConfiguration.c +++ b/SystemConfiguration.fproj/VLANConfiguration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2013, 2015-2017 Apple Inc. All rights reserved. + * Copyright (c) 2003-2013, 2015-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/SystemConfiguration.fproj/VPNAppLayerPrivate.h b/SystemConfiguration.fproj/VPNAppLayerPrivate.h index 991a54e..b8ad741 100644 --- a/SystemConfiguration.fproj/VPNAppLayerPrivate.h +++ b/SystemConfiguration.fproj/VPNAppLayerPrivate.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015 Apple Inc. + * Copyright (c) 2012-2015, 2018 Apple Inc. * All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNConfiguration.c b/SystemConfiguration.fproj/VPNConfiguration.c index 77dfa20..f5cfcb9 100644 --- a/SystemConfiguration.fproj/VPNConfiguration.c +++ b/SystemConfiguration.fproj/VPNConfiguration.c @@ -1,4 +1,4 @@ /* - * Copyright (c) 2009-2017 Apple Inc. All rights reserved. + * Copyright (c) 2009-2018 Apple Inc. All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNConfiguration.h b/SystemConfiguration.fproj/VPNConfiguration.h index e1b450e..b86cebd 100644 --- a/SystemConfiguration.fproj/VPNConfiguration.h +++ b/SystemConfiguration.fproj/VPNConfiguration.h @@ -1,4 +1,4 @@ /* - * Copyright (c) 2009-2011, 2013-2015 Apple Inc. All rights reserved. + * Copyright (c) 2009-2011, 2013-2015, 2017, 2018 Apple Inc. All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNFlow.h b/SystemConfiguration.fproj/VPNFlow.h index c40b5d5..1164810 100644 --- a/SystemConfiguration.fproj/VPNFlow.h +++ b/SystemConfiguration.fproj/VPNFlow.h @@ -1,4 +1,4 @@ /* - * Copyright (c) 2012-2015, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2012-2015, 2017, 2018 Apple Inc. All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNPrivate.c b/SystemConfiguration.fproj/VPNPrivate.c index f9604ea..0bd84d5 100644 --- a/SystemConfiguration.fproj/VPNPrivate.c +++ b/SystemConfiguration.fproj/VPNPrivate.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2017 Apple Inc. All rights reserved. + * Copyright (c) 2009-2018 Apple Inc. All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNPrivate.h b/SystemConfiguration.fproj/VPNPrivate.h index b22496f..7803a4a 100644 --- a/SystemConfiguration.fproj/VPNPrivate.h +++ b/SystemConfiguration.fproj/VPNPrivate.h @@ -1,4 +1,4 @@ /* - * Copyright (c) 2009-2011, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2009-2011, 2014, 2018 Apple Inc. All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNTunnel.h b/SystemConfiguration.fproj/VPNTunnel.h index 58acb55..ceb63ff 100644 --- a/SystemConfiguration.fproj/VPNTunnel.h +++ b/SystemConfiguration.fproj/VPNTunnel.h @@ -1,4 +1,4 @@ /* - * Copyright (c) 2009-2013 Apple Inc. All rights reserved. + * Copyright (c) 2009-2013, 2018 Apple Inc. All rights reserved. */ diff --git a/SystemConfiguration.fproj/VPNTunnelPrivate.h b/SystemConfiguration.fproj/VPNTunnelPrivate.h index f111c3e..9e9a693 100644 --- a/SystemConfiguration.fproj/VPNTunnelPrivate.h +++ b/SystemConfiguration.fproj/VPNTunnelPrivate.h @@ -1,4 +1,4 @@ /* - * Copyright (c) 2009-2013, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2009-2013, 2015, 2018 Apple Inc. All rights reserved. */ diff --git a/SystemConfiguration.fproj/config_types.h b/SystemConfiguration.fproj/config_types.h index 2979730..22a7053 100644 --- a/SystemConfiguration.fproj/config_types.h +++ b/SystemConfiguration.fproj/config_types.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2003, 2005, 2007, 2013, 2015 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003, 2005, 2007, 2013, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -41,12 +41,12 @@ /* * Mach server port name */ -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC #define SCD_SERVER "com.apple.SystemConfiguration.configd" -#else // !TARGET_OS_SIMULATOR +#else // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC #define SCD_SERVER_HOST "com.apple.SystemConfiguration.configd" #define SCD_SERVER "com.apple.SystemConfiguration.configd_sim" -#endif // !TARGET_OS_SIMULATOR +#endif // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC /* * Input arguments: serialized key's, list delimiters, ... @@ -59,4 +59,4 @@ typedef const char * xmlData_t; */ typedef char * xmlDataOut_t; -#endif /* !_CONFIG_TYPES_H */ +#endif /* !_CONFIG_TYPES_H */ diff --git a/SystemConfiguration.fproj/dy_framework.c b/SystemConfiguration.fproj/dy_framework.c index 47863d6..ba030bc 100644 --- a/SystemConfiguration.fproj/dy_framework.c +++ b/SystemConfiguration.fproj/dy_framework.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008, 2010-2015 Apple Inc. All rights reserved. + * Copyright (c) 2002-2008, 2010-2015, 2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -425,7 +425,7 @@ __loadSecurity(void) { #define SECURITY_FRAMEWORK_EXTERN(t, s) \ __private_extern__ t \ - _ ## s() \ + _ ## s(void) \ { \ static t *dysym = NULL; \ if (!dysym) { \ diff --git a/SystemConfiguration.fproj/dy_framework.h b/SystemConfiguration.fproj/dy_framework.h index d781b38..6bbf287 100644 --- a/SystemConfiguration.fproj/dy_framework.h +++ b/SystemConfiguration.fproj/dy_framework.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008, 2010-2015 Apple Inc. All rights reserved. + * Copyright (c) 2002-2008, 2010-2015, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -25,7 +25,7 @@ #ifndef _DY_FRAMEWORK_H #define _DY_FRAMEWORK_H -#include +#include #include #include #include @@ -231,34 +231,34 @@ _IOServiceMatching ( #if !TARGET_OS_IPHONE -CFTypeRef _kSecAttrService(); +CFTypeRef _kSecAttrService(void); #define kSecAttrService _kSecAttrService() -CFTypeRef _kSecClass(); +CFTypeRef _kSecClass(void); #define kSecClass _kSecClass() -CFTypeRef _kSecClassGenericPassword(); +CFTypeRef _kSecClassGenericPassword(void); #define kSecClassGenericPassword _kSecClassGenericPassword() -CFTypeRef _kSecMatchLimit(); +CFTypeRef _kSecMatchLimit(void); #define kSecMatchLimit _kSecMatchLimit() -CFTypeRef _kSecMatchLimitAll(); +CFTypeRef _kSecMatchLimitAll(void); #define kSecMatchLimitAll _kSecMatchLimitAll() -CFTypeRef _kSecMatchSearchList(); +CFTypeRef _kSecMatchSearchList(void); #define kSecMatchSearchList _kSecMatchSearchList() -CFTypeRef _kSecReturnRef(); +CFTypeRef _kSecReturnRef(void); #define kSecReturnRef _kSecReturnRef() -CFTypeRef _kSecGuestAttributePid(); +CFTypeRef _kSecGuestAttributePid(void); #define kSecGuestAttributePid _kSecGuestAttributePid() -CFTypeRef _kSecCodeInfoIdentifier(); +CFTypeRef _kSecCodeInfoIdentifier(void); #define kSecCodeInfoIdentifier _kSecCodeInfoIdentifier() -CFTypeRef _kSecCodeInfoUnique(); +CFTypeRef _kSecCodeInfoUnique(void); #define kSecCodeInfoUnique _kSecCodeInfoUnique() OSStatus @@ -379,10 +379,10 @@ _SecTrustedApplicationCreateFromPath ( #else // TARGET_OS_IPHONE -CFStringRef _kSecPropertyKeyValue(); +CFStringRef _kSecPropertyKeyValue(void); #define kSecPropertyKeyValue _kSecPropertyKeyValue() -CFStringRef _kSecPropertyKeyLabel(); +CFStringRef _kSecPropertyKeyLabel(void); #define kSecPropertyKeyLabel _kSecPropertyKeyLabel() CFArrayRef diff --git a/SystemConfiguration.fproj/genSCPreferences.c b/SystemConfiguration.fproj/genSCPreferences.c index edeb1ec..e8c6d94 100644 --- a/SystemConfiguration.fproj/genSCPreferences.c +++ b/SystemConfiguration.fproj/genSCPreferences.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -62,7 +62,7 @@ char copyright_string[] = "/*\n" -" * Copyright (c) 2000-2017 Apple Inc. All rights reserved.\n" +" * Copyright (c) 2000-2018 Apple Inc. All rights reserved.\n" " *\n" " * @APPLE_LICENSE_HEADER_START@\n" " *\n" @@ -91,12 +91,14 @@ typedef enum { COMMENT, GROUP, SC_10_1, + SC_10_1_IPHONE_NA, SC_10_2, SC_10_3, SC_10_1_10_4, // deprecated in 10.4 SC_10_4, SC_10_5, - SC_10_5_10_7, // deprecated in 10.7 + SC_10_5_IPHONE_NA, + SC_10_5_10_7_IPHONE_NA, // deprecated in 10.7 SC_10_1_10_9, // deprecated in 10.9 SC_10_2_10_9, // deprecated in 10.9 SC_10_2_10_13, // deprecated in 10.13 @@ -123,7 +125,10 @@ typedef enum { SC_10_12_IPHONE_10_0_PRIVATE, SC_10_13_IPHONE_10_0_PRIVATE, SC_10_13_IPHONE_11_0_PRIVATE, + SC_10_14_IPHONE_12_0_PRIVATE, SC_IPHONE_2_0_PRIVATE, + SC_IPHONE_7_0_PRIVATE, + SC_IPHONE_8_0_PRIVATE, COMMENT_DEPRECATED, GROUP_DEPRECATED, COMMENT_DEPRECATED_NO_HEADER, @@ -212,12 +217,14 @@ typedef enum { #define CERTIFICATE "Certificate" #define CGA "CGA" #define CHAP "CHAP" +#define CLAT46 "CLAT46" #define COMM "Comm" #define COMPATIBLE "Compatible" #define COMPRESSIONACFIELD "CompressionACField" #define COMPRESSIONPFIELD "CompressionPField" #define COMPRESSIONVJ "CompressionVJ" #define COMPUTERNAME "ComputerName" +#define COMPLETIONTIME "CompletionTime" #define CONFIGMETHOD "ConfigMethod" #define CONFIRMED "Confirmed" #define CONNECT "Connect" @@ -254,6 +261,7 @@ typedef enum { #define DISCONNECTONWAKE "DisconnectOnWake" #define DISCONNECTONWAKETIMER "DisconnectOnWakeTimer" #define DISCONNECTTIME "DisconnectTime" +#define DISCOVERY "Discovery" #define DISPLAYTERMINALWINDOW "DisplayTerminalWindow" #define DNS "DNS" #define DOMAIN "Domain" @@ -377,7 +385,9 @@ typedef enum { #define PASSIVE "Passive" #define PASSWORD "Password" #define PEER "Peer" +#define PERFORM "Perform" #define PERSONALITY "Personality" +#define PLAT "PLAT" #define PLUGIN "Plugin" #define PLUGINS "Plugins" #define POLICY "Policy" @@ -390,6 +400,7 @@ typedef enum { #define PREFERRED "Preferred" #define PREFIX "Prefix" #define PREFIXLENGTH "PrefixLength" +#define PREFIXLIST "PrefixList" #define PREFS "Prefs" #define PRIMARYINTERFACE "PrimaryInterface" #define PRIMARYRANK "PrimaryRank" @@ -455,6 +466,7 @@ typedef enum { #define SPECIFIC "Specific" #define SPEED "Speed" #define SSID "SSID" +#define STARTTIME "StartTime" #define STATE "State" #define STATUS "Status" #define STF "6to4" @@ -587,7 +599,7 @@ static schemaDefinition names[] = { { SC_10_3_10_12_IPHONE_2_0_10_0, NETENT, PPTP, NULL, CFDICTIONARY }, { SC_10_1, NETENT, PROXIES, NULL, CFDICTIONARY }, { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL }, - { SC_10_5, NETENT, SMB, NULL, CFDICTIONARY }, + { SC_10_5_IPHONE_NA, NETENT, SMB, NULL, CFDICTIONARY }, { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL }, { SC_10_3, NETENT, STF, NULL, CFDICTIONARY }, { COMMENT, "", NULL, NULL, NULL }, @@ -604,6 +616,7 @@ static schemaDefinition names[] = { { SC_10_9_IPHONE_7_0_PRIVATE, NETENT, LINKISSUES, NULL, CFDICTIONARY}, { SC_10_7_IPHONE_5_0_PRIVATE, NETENT, LINKQUALITY, NULL, CFDICTIONARY}, { SC_10_7_IPHONE_4_0_PRIVATE, NETENT, LOOPBACK, NULL, CFDICTIONARY }, + { SC_10_14_IPHONE_12_0_PRIVATE, NETENT, NAT64, NULL, CFDICTIONARY }, { SC_10_13_IPHONE_11_0_PRIVATE, NETENT, NAT64 PREFIX REQUEST, NULL, NULL}, { SC_10_6_IPHONE_3_0_PRIVATE, NETENT, ONDEMAND, NULL, CFDICTIONARY }, { SC_10_13_IPHONE_10_0_PRIVATE, NETENT, QOSMARKING POLICY, NULL, CFDICTIONARY }, @@ -813,6 +826,7 @@ static schemaDefinition names[] = { { GROUP_PRIVATE, NETPROP IPV4, KEY_PREFIX NETENT IPV4 " Entity Keys", NULL, NULL }, { SC_10_10_IPHONE_8_0_PRIVATE, NETPROP IPV4, ADDITIONAL ROUTES, NULL, CFARRAY_CFDICTIONARY }, + { SC_10_14_IPHONE_12_0_PRIVATE, NETPROP IPV4, CLAT46, NULL, CFBOOLEAN }, { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV4, EXCLUDED ROUTES, NULL, CFARRAY_CFDICTIONARY }, { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV4, INCLUDED ROUTES, NULL, CFARRAY_CFDICTIONARY }, { COMMENT_PRIVATE, "", NULL, NULL, NULL }, @@ -856,6 +870,7 @@ static schemaDefinition names[] = { { SC_10_12_IPHONE_10_0_PRIVATE, NETPROP IPV6, ENABLE CGA, NULL, CFNUMBER_BOOL }, { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV6, EXCLUDED ROUTES, NULL, CFARRAY_CFDICTIONARY }, { SC_10_7_IPHONE_4_0_PRIVATE, NETPROP IPV6, INCLUDED ROUTES, NULL, CFARRAY_CFDICTIONARY }, + { SC_10_14_IPHONE_12_0_PRIVATE, NETPROP IPV6, PERFORM PLAT DISCOVERY, NULL, CFBOOLEAN }, { COMMENT_PRIVATE, "", NULL, NULL, NULL }, { COMMENT_PRIVATE, "--- " @@ -1074,6 +1089,13 @@ static schemaDefinition names[] = { { SC_10_3, NETVAL L2TP TRANSPORT, IPSEC, NULL, NULL }, { COMMENT, "", NULL, NULL, NULL }, + { GROUP_PRIVATE, NETPROP LINK, KEY_PREFIX NETENT NAT64 " Entity Keys", NULL, NULL }, + + { SC_10_14_IPHONE_12_0_PRIVATE, NETPROP NAT64, PREFIXLIST, NULL, CFARRAY_CFSTRING }, + { SC_10_14_IPHONE_12_0_PRIVATE, NETPROP NAT64, PLAT DISCOVERY STARTTIME, NULL, CFDATE }, + { SC_10_14_IPHONE_12_0_PRIVATE, NETPROP NAT64, PLAT DISCOVERY COMPLETIONTIME, NULL, CFDATE }, + { COMMENT_PRIVATE, "", NULL, NULL, NULL }, + { GROUP, NETPROP PROXIES, KEY_PREFIX NETENT PROXIES " Entity Keys", NULL, NULL }, { SC_10_1, NETPROP PROXIES, EXCEPTIONSLIST, NULL, CFARRAY_CFSTRING }, @@ -1146,17 +1168,17 @@ static schemaDefinition names[] = { { GROUP, NETPROP SMB, KEY_PREFIX NETENT SMB " Entity Keys", NULL, NULL }, { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL }, - { SC_10_5, NETPROP SMB, NETBIOS NAME, NULL, CFSTRING }, - { SC_10_5, NETPROP SMB, NETBIOS NODE TYPE, NULL, CFSTRING }, - { SC_10_5_10_7, NETPROP SMB, NETBIOS SCOPE, NULL, CFSTRING }, - { SC_10_5, NETPROP SMB, WINS ADDRESSES, NULL, CFARRAY_CFSTRING }, - { SC_10_5, NETPROP SMB, WORKGROUP, NULL, CFSTRING }, + { SC_10_5_IPHONE_NA, NETPROP SMB, NETBIOS NAME, NULL, CFSTRING }, + { SC_10_5_IPHONE_NA, NETPROP SMB, NETBIOS NODE TYPE, NULL, CFSTRING }, + { SC_10_5_10_7_IPHONE_NA, NETPROP SMB, NETBIOS SCOPE, NULL, CFSTRING }, + { SC_10_5_IPHONE_NA, NETPROP SMB, WINS ADDRESSES, NULL, CFARRAY_CFSTRING }, + { SC_10_5_IPHONE_NA, NETPROP SMB, WORKGROUP, NULL, CFSTRING }, { COMMENT, "", NULL, NULL, NULL }, { COMMENT, "--- " KEY_PREFIX NETPROP SMB NETBIOS NODE TYPE " values ---", NULL, NULL, NULL }, - { SC_10_5, NETVAL SMB NETBIOS NODE TYPE, BROADCAST, NULL }, - { SC_10_5, NETVAL SMB NETBIOS NODE TYPE, PEER, NULL }, - { SC_10_5, NETVAL SMB NETBIOS NODE TYPE, MIXED, NULL }, - { SC_10_5, NETVAL SMB NETBIOS NODE TYPE, HYBRID, NULL }, + { SC_10_5_IPHONE_NA, NETVAL SMB NETBIOS NODE TYPE, BROADCAST, NULL }, + { SC_10_5_IPHONE_NA, NETVAL SMB NETBIOS NODE TYPE, PEER, NULL }, + { SC_10_5_IPHONE_NA, NETVAL SMB NETBIOS NODE TYPE, MIXED, NULL }, + { SC_10_5_IPHONE_NA, NETVAL SMB NETBIOS NODE TYPE, HYBRID, NULL }, { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL }, { COMMENT, "", NULL, NULL, NULL }, @@ -1250,7 +1272,7 @@ static schemaDefinition names[] = { { GROUP, USERSENT CONSOLEUSER, KEY_PREFIX COMP USERS " Entity Keys", NULL, NULL }, { DEFINE, "#if", "!TARGET_OS_IPHONE", NULL, NULL }, - { SC_10_1, USERSENT, CONSOLEUSER, NULL, NULL }, + { SC_10_1_IPHONE_NA, USERSENT, CONSOLEUSER, NULL, NULL }, { DEFINE, "#endif", "// !TARGET_OS_IPHONE", NULL, NULL }, { COMMENT, "", NULL, NULL, NULL }, @@ -1375,94 +1397,113 @@ print_headerdoc(schemaDefinition *def) printf("extern const CFStringRef %-49s", kbuf); switch (def->control) { case SC_10_1: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_1,__IPHONE_2_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.1)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); + break; + case SC_10_1_IPHONE_NA: + printf(" API_AVAILABLE(macos(10.1)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);\n"); break; case SC_10_2: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_2,__IPHONE_2_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.2)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_3: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_2_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.3)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_1_10_4: - printf(" __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_4,__IPHONE_NA,__IPHONE_NA);\n"); + printf(" API_DEPRECATED(\"No longer supported\", macos(10.1,10.4)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);\n"); break; case SC_10_4: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.4)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_5: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); + break; + case SC_10_5_IPHONE_NA: + printf(" API_AVAILABLE(macos(10.5)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);\n"); break; - case SC_10_5_10_7: - printf(" __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5,__MAC_10_7,__IPHONE_NA,__IPHONE_NA);\n"); + case SC_10_5_10_7_IPHONE_NA: + printf(" API_DEPRECATED(\"No longer supported\", macos(10.5,10.7)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos);\n"); break; case SC_10_5_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.5)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_1_10_9: - printf(" __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/);\n"); + printf(" API_DEPRECATED(\"No longer supported\", macos(10.1,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_2_10_9: - printf(" __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/);\n"); + printf(" API_DEPRECATED(\"No longer supported\", macos(10.2,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_2_10_13: - printf(" __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_13,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/);\n"); + printf(" API_DEPRECATED(\"No longer supported\", macos(10.2,10.13)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_3_10_9: - printf(" __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/);\n"); + printf(" API_DEPRECATED(\"No longer supported\", macos(10.3,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_4_10_9: - printf(" __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4,__MAC_10_9,__IPHONE_2_0/*SPI*/,__IPHONE_FUTURE/*SPI*/);\n"); + printf(" API_DEPRECATED(\"No longer supported\", macos(10.4,10.9)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_2_10_12_IPHONE_2_0_10_0: - printf(" __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2,__MAC_10_12,__IPHONE_2_0/*SPI*/,__IPHONE_10_0/*SPI*/);\n"); + printf(" " + " API_DEPRECATED(\"No longer supported\", macos(10.2,10.12))" + " SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); // Note: really want SPI_DEPRECATED break; case SC_10_3_10_12_IPHONE_2_0_10_0: - printf(" __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3,__MAC_10_12,__IPHONE_2_0/*SPI*/,__IPHONE_10_0/*SPI*/);\n"); + printf(" " + " API_DEPRECATED(\"No longer supported\", macos(10.3,10.12))" + " SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); // Note: really want SPI_DEPRECATED break; case SC_10_6_IPHONE_2_0: case SC_10_6_IPHONE_2_0_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_2_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_6_IPHONE_3_0: case SC_10_6_IPHONE_3_0_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_3_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.6)) SPI_AVAILABLE(ios(3.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_7_IPHONE_4_0: case SC_10_7_IPHONE_4_0_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(4.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_7_IPHONE_5_0_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.7)) SPI_AVAILABLE(ios(5.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_8_IPHONE_6_0_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_8,__IPHONE_6_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.8)) SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_9_IPHONE_6_0_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_6_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(6.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_9_IPHONE_7_0_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.9)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_10_IPHONE_7_0_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_7_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_10_IPHONE_8_0_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.10)) SPI_AVAILABLE(ios(8.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; case SC_10_11_IPHONE_9_0_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_11,__IPHONE_9_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.11)) SPI_AVAILABLE(ios(9.0), tvos(9.0), watchos(2.0), bridgeos(2.0));\n"); break; case SC_10_12_IPHONE_10_0_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_12,__IPHONE_10_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.12)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(3.0));\n"); break; case SC_10_13_IPHONE_10_0_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_10_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(10.0), tvos(10.0), watchos(3.0), bridgeos(3.0));\n"); break; case SC_10_13_IPHONE_11_0_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0/*SPI*/);\n"); + printf(" API_AVAILABLE(macos(10.13)) SPI_AVAILABLE(ios(11.0), tvos(11.0), watchos(4.0), bridgeos(4.0));\n"); + break; + case SC_10_14_IPHONE_12_0_PRIVATE: + printf(" API_AVAILABLE(macos(10.14)) SPI_AVAILABLE(ios(12.0), tvos(12.0), watchos(5.0), bridgeos(5.0));\n"); break; case SC_IPHONE_2_0_PRIVATE: - printf(" __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_2_0/*SPI*/);\n"); + printf(" SPI_AVAILABLE(macos(10.6), ios(2.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); + break; + case SC_IPHONE_7_0_PRIVATE: + printf(" SPI_AVAILABLE(macos(9.0), ios(7.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); + break; + case SC_IPHONE_8_0_PRIVATE: + printf(" SPI_AVAILABLE(macos(10.0), ios(8.0), tvos(9.0), watchos(1.0), bridgeos(1.0));\n"); break; default: printf("\n"); @@ -1639,7 +1680,10 @@ dump_names(int type) case SC_10_12_IPHONE_10_0_PRIVATE: case SC_10_13_IPHONE_10_0_PRIVATE: case SC_10_13_IPHONE_11_0_PRIVATE: + case SC_10_14_IPHONE_12_0_PRIVATE: case SC_IPHONE_2_0_PRIVATE: + case SC_IPHONE_7_0_PRIVATE: + case SC_IPHONE_8_0_PRIVATE: // don't report private definitions break; default: @@ -1672,7 +1716,10 @@ dump_names(int type) case SC_10_12_IPHONE_10_0_PRIVATE: case SC_10_13_IPHONE_10_0_PRIVATE: case SC_10_13_IPHONE_11_0_PRIVATE: + case SC_10_14_IPHONE_12_0_PRIVATE: case SC_IPHONE_2_0_PRIVATE: + case SC_IPHONE_7_0_PRIVATE: + case SC_IPHONE_8_0_PRIVATE: print_comment(&names[i]); break; default: @@ -1698,7 +1745,10 @@ dump_names(int type) case SC_10_12_IPHONE_10_0_PRIVATE: case SC_10_13_IPHONE_10_0_PRIVATE: case SC_10_13_IPHONE_11_0_PRIVATE: + case SC_10_14_IPHONE_12_0_PRIVATE: case SC_IPHONE_2_0_PRIVATE: + case SC_IPHONE_7_0_PRIVATE: + case SC_IPHONE_8_0_PRIVATE: // don't report private definitions break; default: @@ -1722,7 +1772,10 @@ dump_names(int type) case SC_10_12_IPHONE_10_0_PRIVATE: case SC_10_13_IPHONE_10_0_PRIVATE: case SC_10_13_IPHONE_11_0_PRIVATE: + case SC_10_14_IPHONE_12_0_PRIVATE: case SC_IPHONE_2_0_PRIVATE: + case SC_IPHONE_7_0_PRIVATE: + case SC_IPHONE_8_0_PRIVATE: print_headerdoc(&names[i]); break; default: @@ -1769,13 +1822,10 @@ main(int argc, char * argv[]) printf(" */\n\n\n"); printf("#ifndef\t_SCSCHEMADEFINITIONS_H\n"); - printf("#ifdef\tUSE_SYSTEMCONFIGURATION_PRIVATE_HEADERS\n"); - printf("#include \n"); - printf("#else\t/* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */\n"); printf("#define\t_SCSCHEMADEFINITIONS_H\n"); printf("\n"); - printf("#include \n"); + printf("#include \n"); printf("#include \n"); printf("#include \n"); printf("\n"); @@ -1784,7 +1834,6 @@ main(int argc, char * argv[]) printf(" *\t@header SCSchemaDefinitions\n"); printf(" */\n\n"); - printf("\n"); printf("CF_ASSUME_NONNULL_BEGIN\n"); @@ -1794,7 +1843,6 @@ main(int argc, char * argv[]) printf("CF_ASSUME_NONNULL_END"); printf("\n\n"); - printf("#endif\t/* USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS */\n"); printf("#endif\t/* _SCSCHEMADEFINITIONS_H */\n"); } else if (strcmp(type, "private") == 0) { @@ -1825,7 +1873,7 @@ main(int argc, char * argv[]) printf(" * DO NOT EDIT!\n"); printf(" */\n"); printf("\n"); - printf("#include \n"); + printf("#include \n"); printf("#include \n"); printf("#include \n"); printf("\n"); diff --git a/SystemConfiguration.fproj/helper/SCHelper_client.c b/SystemConfiguration.fproj/helper/SCHelper_client.c index b3cc66d..e259b8d 100644 --- a/SystemConfiguration.fproj/helper/SCHelper_client.c +++ b/SystemConfiguration.fproj/helper/SCHelper_client.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005-2008, 2010, 2011, 2013, 2015, 2016 Apple Inc. All rights reserved. + * Copyright (c) 2005-2008, 2010, 2011, 2013, 2015, 2016, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -250,6 +250,7 @@ _SCHelperExecCopyBacktrace() } +__private_extern__ Boolean _SCHelperExec(mach_port_t port, uint32_t msgID, CFDataRef data, uint32_t *status, CFDataRef *reply) { diff --git a/SystemConfiguration.fproj/helper/SCHelper_client.h b/SystemConfiguration.fproj/helper/SCHelper_client.h index 0db8a11..1e7296a 100644 --- a/SystemConfiguration.fproj/helper/SCHelper_client.h +++ b/SystemConfiguration.fproj/helper/SCHelper_client.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2005-2007, 2010, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2005-2007, 2010, 2011, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -25,7 +25,7 @@ #define _SCHELPER_CLIENT_H #include -#include +#include #include #include @@ -83,5 +83,5 @@ void _SCHelperClose (mach_port_t *helper_port); __END_DECLS -#endif /* _SCHELPER_CLIENT_H */ +#endif /* _SCHELPER_CLIENT_H */ diff --git a/SystemConfiguration.fproj/helper/SCHelper_server.c b/SystemConfiguration.fproj/helper/SCHelper_server.c index 5413fea..a635076 100644 --- a/SystemConfiguration.fproj/helper/SCHelper_server.c +++ b/SystemConfiguration.fproj/helper/SCHelper_server.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005-2017 Apple Inc. All rights reserved. + * Copyright (c) 2005-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -122,7 +122,7 @@ static pthread_mutex_t sessions_lock = PTHREAD_MUTEX_INITIALIZER; static os_log_t -__log_SCHelper() +__log_SCHelper(void) { static os_log_t log = NULL; @@ -201,7 +201,7 @@ __SCHelperSessionSetAuthorization(SCHelperSessionRef session, CFTypeRef authoriz if (CFDataGetLength(authorizationData) == sizeof(extForm.bytes)) { OSStatus status; - bcopy(CFDataGetBytePtr(authorizationData), extForm.bytes, sizeof(extForm.bytes)); + memcpy(extForm.bytes, CFDataGetBytePtr(authorizationData), sizeof(extForm.bytes)); status = AuthorizationCreateFromExternalForm(&extForm, &sessionPrivate->authorization); if (status != errAuthorizationSuccess) { @@ -700,7 +700,7 @@ do_Auth(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status CFDictionaryRef authorizationDict; #if !TARGET_OS_IPHONE CFDataRef authorizationData = NULL; -#endif +#endif // !TARGET_OS_IPHONE Boolean ok = FALSE; if (!_SCUnserialize((CFPropertyListRef*)&authorizationDict, data, NULL, 0)) { @@ -721,7 +721,7 @@ do_Auth(SCHelperSessionRef session, void *info, CFDataRef data, uint32_t *status if (authorizationData != NULL && isA_CFData(authorizationData)) { ok = __SCHelperSessionSetAuthorization(session, authorizationData); } else -#endif +#endif // !TARGET_OS_IPHONE { CFStringRef authorizationInfo; @@ -2181,7 +2181,7 @@ _helperinit(mach_port_t server, pthread_attr_init(&tattr); pthread_attr_setscope(&tattr, PTHREAD_SCOPE_SYSTEM); pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED); - pthread_attr_setstacksize(&tattr, 96 * 1024); // each thread gets a 96K stack +// pthread_attr_setstacksize(&tattr, 96 * 1024); // each thread gets a 96K stack pthread_create(&tid, &tattr, newHelper, (void *)session); pthread_attr_destroy(&tattr); diff --git a/SystemConfiguration.fproj/restore-temporary-headers b/SystemConfiguration.fproj/restore-temporary-headers new file mode 100755 index 0000000..88657e1 --- /dev/null +++ b/SystemConfiguration.fproj/restore-temporary-headers @@ -0,0 +1,51 @@ +#!/bin/sh + +if [ -z "${INSTALL_DIR}" -o -z "${PRIVATE_HEADERS_FOLDER_PATH}" ]; then + echo "Cannot update headers, missing ENV vars" + exit 1 +fi + +SPI_BASE="${INSTALL_DIR}/${PRIVATE_HEADERS_FOLDER_PATH}" + +for H in \ + DHCPClientPreferences.h \ + SCDynamicStore.h \ + SCDynamicStoreCopyDHCPInfo.h \ + SCDynamicStoreCopySpecific.h \ + SCDynamicStoreKey.h \ + SCNetworkConfiguration.h \ + SCNetworkConnection.h \ + SCPreferences.h \ + SCPreferencesPath.h \ + SCPreferencesSetSpecific.h \ + SCSchemaDefinitions.h \ + SystemConfiguration.h \ + +do + HACK=$(echo "_DO_NOT_INCLUDE_${H}" | tr '[:lower:]' '[:upper:]' | sed -e 's/\./_/') + cat <<_END_OF_INPUT > "${SPI_BASE}/_${H}" +#ifndef ${HACK} +#define ${HACK} + +/* + * WARNING WARNING WARNING WARNING WARNING + * + * This is a PRIVATE/INTERNAL header file that is on the to-be-removed soon + * list. Please update your project to use : + * #include + * or : + * #include + * + * WARNING WARNING WARNING WARNING WARNING + */ +#ifndef NO_TAPI_WARNINGS +#warning "Please #include , NOT . See rdar://41937689 for details" +#endif // NO_TAPI_WARNINGS + +#endif // ${HACK} + +#include +_END_OF_INPUT +done + +exit diff --git a/SystemConfiguration.fproj/scprefs_observer.c b/SystemConfiguration.fproj/scprefs_observer.c index c7ae524..b3a708a 100644 --- a/SystemConfiguration.fproj/scprefs_observer.c +++ b/SystemConfiguration.fproj/scprefs_observer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 2015-2017 Apple Inc. All rights reserved. + * Copyright (c) 2012, 2013, 2015-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/SystemConfiguration.fproj/scprefs_observer.h b/SystemConfiguration.fproj/scprefs_observer.h index 00ce626..8319094 100644 --- a/SystemConfiguration.fproj/scprefs_observer.h +++ b/SystemConfiguration.fproj/scprefs_observer.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2012-2014, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2012-2014, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,14 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _SCPREFS_OBSERVER_H #define _SCPREFS_OBSERVER_H -#include +#include #include #include #include @@ -66,4 +66,4 @@ _scprefs_observer_cancel(scprefs_observer_t observer); __END_DECLS -#endif /* _SCPREFS_OBSERVER_H */ +#endif /* _SCPREFS_OBSERVER_H */ diff --git a/SystemConfiguration.fproj/update-headers b/SystemConfiguration.fproj/update-headers deleted file mode 100755 index 05b247d..0000000 --- a/SystemConfiguration.fproj/update-headers +++ /dev/null @@ -1,168 +0,0 @@ -#!/usr/bin/perl - -if (!$ENV{"INSTALL_DIR"} or !$ENV{"PUBLIC_HEADERS_FOLDER_PATH"} or !$ENV{"PRIVATE_HEADERS_FOLDER_PATH"}) { - die "Cannot update headers, missing ENV vars\n"; -} - -$DO_SPLIT = ($#ARGV >= 0 and $ARGV[0] eq "split"); - -$USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK = $ENV{"USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK"} eq "YES"; - -$API_BASE = $ENV{"INSTALL_DIR"} . "/" . $ENV{"PUBLIC_HEADERS_FOLDER_PATH"}; -$SPI_BASE = $ENV{"INSTALL_DIR"} . "/" . $ENV{"PRIVATE_HEADERS_FOLDER_PATH"}; - -sub clean_INC { - my ($inc) = @_; - - $inc =~ s/#ifdef\s+USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS\s*.*?\n#include\s+.*?\n#else.*?\n//; - $inc =~ s/#endif\s+.*?USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS.*?\n//; - - return $inc; -} - -sub clean_API { - my ($api) = @_; - my ($api_new); - - $api_new = $DO_SPLIT ? $api : clean_INC($api); - $api_new =~ s/(__MAC)_\w+\/\*SPI\*\//\1_NA/g; - $api_new =~ s/#define\t__AVAILABILITY_INTERNAL__.*FUTURE.*\/\*SPI\*\/\n//; - $api_new =~ s/(__IPHONE)_\w+\/\*SPI\*\//\1_NA/g; - - return $api_new; -} - -sub clean_SPI { - my ($spi) = @_; - my ($spi_new); - - $spi_new = clean_INC($spi); - $spi_new =~ s/(__MAC_\w+)\/\*SPI\*\//\1/g; - $spi_new =~ s/(#define\t__AVAILABILITY_INTERNAL__.*FUTURE.*)\/\*SPI\*\//\1/; - $spi_new =~ s/(__IPHONE_\w+)\/\*SPI\*\//\1/g; - - return $spi_new; -} - -sub create_STUB { - my ($api_header) = @_; - my ($stub_new); - - $stub_new = " -#warning \"Please #include instead of this file directly.\" -#include -"; - $stub_new =~ s/PUBLIC.h/$api_header/g; - - return $stub_new; -} - -# -# Update .../PrivateHeaders -# - -opendir(HEADERS, $SPI_BASE); -@headers = readdir(HEADERS); -closedir(HEADERS); - -undef $/; -for (@headers) { - next if ($_ eq '.'); - next if ($_ eq '..'); - - $spi_header = $_; - $spi_path = $SPI_BASE . "/" . $spi_header; - next if (! -f $spi_path); - - open(SPI, "<", $spi_path); - $spi = ; - close(SPI); - - $spi_new = clean_SPI($spi); - if ($spi ne $spi_new) { - printf "cleaning .../PrivateHeaders/%s\n", $spi_header; - open(SPI, ">", $spi_path); - print SPI $spi_new; - close(SPI); - } -} -$/ = "\n"; - -# -# Update .../Headers -# - -opendir(HEADERS, $API_BASE); -@headers = readdir(HEADERS); -closedir(HEADERS); - -undef $/; -for (@headers) { - next if ($_ eq '.'); - next if ($_ eq '..'); - - $api_header = $_; - $api_path = $API_BASE . "/" . $api_header; - next if (! -f $api_path); - - open(API, "<", $api_path); - $api = ; - close(API); - - $api_new = clean_API($api); - next if ($api eq $api_new); # if no tweaks needed - - if (!$USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK) { - printf "cleaning .../Headers/%s\n", $api_header; - open(API, ">", $api_path); - print API $api_new; - close(API); - - if ($DO_SPLIT) { - $spi_new = clean_SPI($api); - if ($api_new ne $spi_new) { - if ((($spi_header) = ($api =~ /#ifdef\s+USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS\s*.*?\n#include\s+\s*.*?\n/))) { - if ($api_header eq $spi_header) { - die "API & SPI header not unique: $api_header\n"; - } - } else { - die "Header missing #ifdef/#else/#endif: $api_header\n"; -# $spi_header = $api_header; -# $spi_header =~ s/\.h$/PRIVATE.h/; - } - - printf " adding .../PrivateHeaders/%s\n", $spi_header; - $spi_path = $SPI_BASE . "/" . $spi_header; - open(SPI, ">", $spi_path); - print SPI $spi_new; - close(SPI); - } - } - } else { - $spi_new = clean_SPI($api); - if ($api_new ne $spi_new) { - if ((($stub_header) = ($api =~ /#ifdef\s+USE_SYSTEMCONFIGURATION_PRIVATE_HEADERS\s*.*?\n#include\s+\s*.*?\n/))) { - if ($api_header eq $stub_header) { - die "API & STUB header not unique: $api_header\n"; - } - } else { - die "Header missing #ifdef/#else/#endif: $api_header\n"; - } - - printf "updating .../Headers/%s\n", $api_header; - open(API, ">", $api_path); - print API $spi_new; - close(API); - - printf " adding .../PrivateHeaders/%s (stub)\n", $stub_header; - $stub_path = $SPI_BASE . "/" . $stub_header; - $stub_new = create_STUB($api_header); - open(STUB, ">", $stub_path); - print STUB $stub_new; - close(STUB); - } - } -} -$/ = "\n"; - -exit 0; diff --git a/config-agent-info/config_agent_info.h b/config-agent-info/config_agent_info.h index 9b2fa45..63ed9cf 100644 --- a/config-agent-info/config_agent_info.h +++ b/config-agent-info/config_agent_info.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016 Apple Inc. All rights reserved. + * Copyright (c) 2015, 2016, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -35,69 +35,69 @@ __BEGIN_DECLS #define kConfigAgentTypeProxy "ProxyAgent" #define kConfigAgentTypeDNS "DNSAgent" -/* +/* Returns true for agent with type DNSAgent and domain SystemConfig */ boolean_t -is_config_agent_type_dns (const struct netagent *agent) __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_10_0); +is_config_agent_type_dns (const struct netagent *agent) API_AVAILABLE(macos(10.12), ios(10.0)); /* Returns true for agent with type ProxyAgent and domain SystemConfig */ boolean_t -is_config_agent_type_proxy (const struct netagent *agent) __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_10_0); +is_config_agent_type_proxy (const struct netagent *agent) API_AVAILABLE(macos(10.12), ios(10.0)); /* Returns xpc_object_t corresponding to the raw DNSAgent data NULL if the agent is NOT a DNSAgent */ xpc_object_t -config_agent_copy_dns_information (const struct netagent *agentStruct) __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_10_0); +config_agent_copy_dns_information (const struct netagent *agentStruct) API_AVAILABLE(macos(10.12), ios(10.0)); /* Returns xpc_object_t (XPC_TYPE_ARRAY) corresponding to the DNS nameservers NULL if the agent is NOT a DNSAgent */ xpc_object_t -config_agent_get_dns_nameservers (xpc_object_t resolver) __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_10_0); +config_agent_get_dns_nameservers (xpc_object_t resolver) API_AVAILABLE(macos(10.12), ios(10.0)); /* Returns xpc_object_t (XPC_TYPE_ARRAY) corresponding to the DNS search domains NULL if the agent is NOT a DNSAgent */ xpc_object_t -config_agent_get_dns_searchdomains (xpc_object_t resolver) __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_10_0); +config_agent_get_dns_searchdomains (xpc_object_t resolver) API_AVAILABLE(macos(10.12), ios(10.0)); /* Frees the xpc_object_t returned by config_agent_copy_dns_information() */ void -config_agent_free_dns_information (xpc_object_t resolver) __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_10_0); +config_agent_free_dns_information (xpc_object_t resolver) API_AVAILABLE(macos(10.12), ios(10.0)); /* Returns xpc_object_t corresponding to the raw ProxyAgent data NULL if the agent is NOT a ProxyAgent */ xpc_object_t -config_agent_copy_proxy_information (const struct netagent *agentStruct) __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_10_0); +config_agent_copy_proxy_information (const struct netagent *agentStruct) API_AVAILABLE(macos(10.12), ios(10.0)); /* - Updates the proxy config with PAC, if applicable. The proxyConfig MUST be + Updates the proxy config with PAC, if applicable. The proxyConfig MUST be of type XPC_TYPE_ARRAY containing a XPC_TYPE_DICTIONARY. This format is returned by config_agent_copy_proxy_information() - + Returns xpc_object_t to be freed by the caller. NULL if the the provided configuration does not need any update. */ xpc_object_t -config_agent_update_proxy_information (xpc_object_t proxyConfig) __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_10_0); +config_agent_update_proxy_information (xpc_object_t proxyConfig) API_AVAILABLE(macos(10.12), ios(10.0)); /* Frees the xpc_object_t returned by config_agent_copy_proxy_information() */ void -config_agent_free_proxy_information (xpc_object_t proxyConfig) __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_10_0); +config_agent_free_proxy_information (xpc_object_t proxyConfig) API_AVAILABLE(macos(10.12), ios(10.0)); __END_DECLS -#endif /* CONFIG_AGENT_INFO_H */ +#endif /* CONFIG_AGENT_INFO_H */ diff --git a/configd.tproj/_SCD.c b/configd.tproj/_SCD.c index e99272b..e9e4940 100644 --- a/configd.tproj/_SCD.c +++ b/configd.tproj/_SCD.c @@ -237,7 +237,7 @@ _removeWatcher(CFNumberRef sessionNum, CFStringRef watchedKey) __private_extern__ void -pushNotifications() +pushNotifications(void) { CFIndex notifyCnt; int server; diff --git a/configd.tproj/_SCD.h b/configd.tproj/_SCD.h index b3f01b7..8263ed2 100644 --- a/configd.tproj/_SCD.h +++ b/configd.tproj/_SCD.h @@ -191,7 +191,7 @@ _removeWatcher (CFNumberRef sessionNum, CFStringRef watchedKey); void -pushNotifications (); +pushNotifications (void); __END_DECLS diff --git a/configd.tproj/_snapshot.c b/configd.tproj/_snapshot.c index 2874345..9c506a1 100644 --- a/configd.tproj/_snapshot.c +++ b/configd.tproj/_snapshot.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2006, 2009-2011, 2015, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2006, 2009-2011, 2015, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/configd.tproj/configd.h b/configd.tproj/configd.h index 58228b7..78e658a 100644 --- a/configd.tproj/configd.h +++ b/configd.tproj/configd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2003, 2006, 2007, 2011, 2013, 2016 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003, 2006, 2007, 2011, 2013, 2016, 2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -59,7 +59,7 @@ extern CFMutableSetRef _plugins_verbose; /* bundle identifiers to enable verbos __BEGIN_DECLS os_log_t -__configd_SCDynamicStore (); +__configd_SCDynamicStore (void); __END_DECLS diff --git a/configd.tproj/configd.m b/configd.tproj/configd.m index 24f7df0..9e88ed5 100644 --- a/configd.tproj/configd.m +++ b/configd.tproj/configd.m @@ -55,9 +55,9 @@ #include "configd_server.h" #include "plugin_support.h" -#if TARGET_OS_EMBEDDED && !defined(DO_NOT_INFORM) +#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR && !defined(DO_NOT_INFORM) #include -#endif // TARGET_OS_EMBEDDED && !defined(DO_NOT_INFORM) +#endif // TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR && !defined(DO_NOT_INFORM) __private_extern__ Boolean _configd_verbose = FALSE; /* TRUE if verbose logging enabled */ @@ -348,7 +348,7 @@ main(int argc, char * const argv[]) /* check if we have been started by launchd */ vproc_swap_integer(NULL, VPROC_GSK_IS_MANAGED, NULL, &is_launchd_job); -#if TARGET_OS_EMBEDDED && !defined(DO_NOT_INFORM) +#if TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR && !defined(DO_NOT_INFORM) // if launchd job, check to see if we have been restarted if (is_launchd_job) { int64_t status = 0; @@ -373,7 +373,7 @@ main(int argc, char * const argv[]) } } } -#endif // TARGET_OS_EMBEDDED && !defined(DO_NOT_INFORM) +#endif // TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR && !defined(DO_NOT_INFORM) /* ensure that forked plugins behave */ if (testBundle != NULL) { diff --git a/configd.tproj/entitlements-ios.plist b/configd.tproj/entitlements-ios.plist index 29f49dc..f4da916 100644 --- a/configd.tproj/entitlements-ios.plist +++ b/configd.tproj/entitlements-ios.plist @@ -48,5 +48,11 @@ com.apple.private.usbdevice.setdescription + com.apple.carousel.modalappservice + + com.apple.private.lockdown.finegrained-get + + NULL/TrustedHostAttached + diff --git a/configd.tproj/plugin_support.c b/configd.tproj/plugin_support.c index 53cdc7c..ea172fd 100644 --- a/configd.tproj/plugin_support.c +++ b/configd.tproj/plugin_support.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -49,7 +49,7 @@ #include "configd.h" #include "configd_server.h" #include -void _SCDPluginExecInit(); +#include "SystemConfigurationInternal.h" /* @@ -93,10 +93,10 @@ typedef struct { Boolean enabled; Boolean forced; Boolean verbose; - SCDynamicStoreBundleLoadFunction load; - SCDynamicStoreBundleStartFunction start; - SCDynamicStoreBundlePrimeFunction prime; - SCDynamicStoreBundleStopFunction stop; + SCDynamicStoreBundleLoadFunction *load; + SCDynamicStoreBundleStartFunction *start; + SCDynamicStoreBundlePrimeFunction *prime; + SCDynamicStoreBundleStopFunction *stop; } *bundleInfoRef; @@ -125,54 +125,54 @@ extern SCDynamicStoreBundleLoadFunction load_QoSMarking; typedef struct { - const CFStringRef bundleID; - const void *load; // SCDynamicStoreBundleLoadFunction - const void *start; // SCDynamicStoreBundleStartFunction - const void *prime; // SCDynamicStoreBundlePrimeFunction - const void *stop; // SCDynamicStoreBundleStopFunction + const CFStringRef bundleID; + SCDynamicStoreBundleLoadFunction *load; + SCDynamicStoreBundleStartFunction *start; + SCDynamicStoreBundlePrimeFunction *prime; + SCDynamicStoreBundleStopFunction *stop; } builtin, *builtinRef; static const builtin builtin_plugins[] = { { CFSTR("com.apple.SystemConfiguration.IPMonitor"), - &load_IPMonitor, + load_IPMonitor, NULL, - &prime_IPMonitor, + prime_IPMonitor, NULL }, #if !TARGET_OS_SIMULATOR { CFSTR("com.apple.SystemConfiguration.InterfaceNamer"), - &load_InterfaceNamer, + load_InterfaceNamer, NULL, NULL, NULL }, { CFSTR("com.apple.SystemConfiguration.KernelEventMonitor"), - &load_KernelEventMonitor, + load_KernelEventMonitor, NULL, - &prime_KernelEventMonitor, + prime_KernelEventMonitor, NULL }, { CFSTR("com.apple.SystemConfiguration.LinkConfiguration"), - &load_LinkConfiguration, + load_LinkConfiguration, NULL, NULL, NULL }, { CFSTR("com.apple.SystemConfiguration.PreferencesMonitor"), - &load_PreferencesMonitor, + load_PreferencesMonitor, NULL, - &prime_PreferencesMonitor, + prime_PreferencesMonitor, NULL }, { CFSTR("com.apple.SystemConfiguration.QoSMarking"), - &load_QoSMarking, + load_QoSMarking, NULL, NULL, NULL @@ -906,7 +906,7 @@ plugin_exec(void *arg) CFArrayRef bundles; CFURLRef url; -#if TARGET_OS_SIMULATOR +#if TARGET_OS_SIMULATOR && !TARGET_OS_IOSMAC const char *path_sim_prefix; path_sim_prefix = getenv("IPHONE_SIMULATOR_ROOT"); @@ -919,7 +919,7 @@ plugin_exec(void *arg) } else { path[0] = '\0'; } -#endif // TARGET_OS_SIMULATOR +#endif // TARGET_OS_SIMULATOR && !TARGET_OS_IOSMAC /* load any available bundle */ strlcat(path, BUNDLE_DIRECTORY, sizeof(path)); diff --git a/configd.tproj/session.c b/configd.tproj/session.c index 9fc7103..8226211 100644 --- a/configd.tproj/session.c +++ b/configd.tproj/session.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2003-2005, 2007-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2005, 2007-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/configd.tproj/session.h b/configd.tproj/session.h index 18e8ae7..9a87c4f 100644 --- a/configd.tproj/session.h +++ b/configd.tproj/session.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2005-2007, 2009-2012, 2014, 2016, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2005-2007, 2009-2012, 2014, 2016-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -35,7 +35,7 @@ #define _S_SESSION_H #include -#include +#include #include @@ -125,4 +125,4 @@ Boolean hasPathAccess (serverSessionRef session, __END_DECLS -#endif /* !_S_SESSION_H */ +#endif /* !_S_SESSION_H */ diff --git a/configd.xcodeproj/project.pbxproj b/configd.xcodeproj/project.pbxproj index e00fa48..4f32631 100644 --- a/configd.xcodeproj/project.pbxproj +++ b/configd.xcodeproj/project.pbxproj @@ -51,6 +51,7 @@ D6DDAC3D147A24BC00A2E902 /* PBXTargetDependency */, 150ECB300D0042DA0065E94D /* PBXTargetDependency */, 72C12CB11D6EA2CA000EE61C /* PBXTargetDependency */, + C453EED22086992B00BF504E /* PBXTargetDependency */, ); name = configd_executables; productName = configd_executables; @@ -245,7 +246,6 @@ 152439E8180399D800D91708 /* CoreWLAN.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 152439E7180399D800D91708 /* CoreWLAN.framework */; }; 152439E91805CC6C00D91708 /* ev_extra.h in Headers */ = {isa = PBXBuildFile; fileRef = 152439E318038E5B00D91708 /* ev_extra.h */; }; 152439EA1805CC8400D91708 /* ev_extra.m in Sources */ = {isa = PBXBuildFile; fileRef = 152439E418038E5B00D91708 /* ev_extra.m */; }; - 152439EC180716ED00D91708 /* MobileWiFi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 152439EB180716ED00D91708 /* MobileWiFi.framework */; }; 152691DB1129EEA6006BD2D5 /* BridgeConfiguration.c in Sources */ = {isa = PBXBuildFile; fileRef = 15FD7B3B101E439200C56621 /* BridgeConfiguration.c */; }; 152691DC1129EEAD006BD2D5 /* BridgeConfiguration.c in Sources */ = {isa = PBXBuildFile; fileRef = 15FD7B3B101E439200C56621 /* BridgeConfiguration.c */; }; 152691DE1129EEC2006BD2D5 /* VLANConfiguration.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69B605C0722B0099E85F /* VLANConfiguration.c */; }; @@ -323,6 +323,7 @@ 155D223D0AF13A7300D52ED0 /* smb-configuration.h in Headers */ = {isa = PBXBuildFile; fileRef = 155D223A0AF13A7300D52ED0 /* smb-configuration.h */; }; 155F49A61C864FFC00E47D08 /* qos-marking.m in Sources */ = {isa = PBXBuildFile; fileRef = 155F49A51C864FE500E47D08 /* qos-marking.m */; }; 155F49A71C86500100E47D08 /* qos-marking.m in Sources */ = {isa = PBXBuildFile; fileRef = 155F49A51C864FE500E47D08 /* qos-marking.m */; }; + 1562569120856CCC00FCD61E /* liblockdown.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1562569020856CCC00FCD61E /* liblockdown.dylib */; }; 1565D85018B847590097062B /* SCNetworkMigration.c in Sources */ = {isa = PBXBuildFile; fileRef = 55A3DB9D183C2A8200ED3DB7 /* SCNetworkMigration.c */; }; 1565D85118B847F20097062B /* SCNetworkMigration.c in Sources */ = {isa = PBXBuildFile; fileRef = 55A3DB9D183C2A8200ED3DB7 /* SCNetworkMigration.c */; }; 156BD6BC07E0DFA9008698FF /* SCPreferencesSetSpecificPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 156BD6BB07E0DFA9008698FF /* SCPreferencesSetSpecificPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -409,7 +410,6 @@ 1572C5040CFB55B400E2776E /* SCPPath.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB699A05C0722B0099E85F /* SCPPath.c */; settings = {ATTRIBUTES = (); }; }; 1572C5060CFB55B400E2776E /* SCDHostName.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB699E05C0722B0099E85F /* SCDHostName.c */; settings = {ATTRIBUTES = (); }; }; 1572C5070CFB55B400E2776E /* SCLocation.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69A005C0722B0099E85F /* SCLocation.c */; settings = {ATTRIBUTES = (); }; }; - 1572C5080CFB55B400E2776E /* SCNetwork.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69A205C0722B0099E85F /* SCNetwork.c */; settings = {ATTRIBUTES = (); }; }; 1572C5090CFB55B400E2776E /* pppcontroller.defs in Sources */ = {isa = PBXBuildFile; fileRef = 23C1E2B8062DD45900835B54 /* pppcontroller.defs */; settings = {ATTRIBUTES = (Client, ); }; }; 1572C50A0CFB55B400E2776E /* SCNetworkConnection.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69A405C0722B0099E85F /* SCNetworkConnection.c */; settings = {ATTRIBUTES = (); }; }; 1572C50B0CFB55B400E2776E /* SCNetworkConnectionPrivate.c in Sources */ = {isa = PBXBuildFile; fileRef = 15A2972D0A13C08C009879B3 /* SCNetworkConnectionPrivate.c */; }; @@ -623,6 +623,25 @@ 158E595E1107CAE40062081E /* helper.defs in Sources */ = {isa = PBXBuildFile; fileRef = 152E0E7E10FE820E00E402F2 /* helper.defs */; }; 158E595F1107CAE80062081E /* helper.defs in Sources */ = {isa = PBXBuildFile; fileRef = 152E0E7E10FE820E00E402F2 /* helper.defs */; }; 158E59611107CAF40062081E /* helper.defs in Sources */ = {isa = PBXBuildFile; fileRef = 152E0E7E10FE820E00E402F2 /* helper.defs */; }; + 158FC7781FDA31E000B2493C /* network_config_agent_info_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = 720985431C580D9F00966D30 /* network_config_agent_info_priv.h */; }; + 158FC7791FDA31EA00B2493C /* network_config_agent_info_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = 720985431C580D9F00966D30 /* network_config_agent_info_priv.h */; }; + 158FC77B1FDADA5400B2493C /* libSystemConfiguration_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 158FC77A1FDAD9BC00B2493C /* libSystemConfiguration_internal.h */; }; + 158FC77C1FDADA5A00B2493C /* libSystemConfiguration_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 158FC77A1FDAD9BC00B2493C /* libSystemConfiguration_internal.h */; }; + 158FC77D1FDADA5E00B2493C /* libSystemConfiguration_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 158FC77A1FDAD9BC00B2493C /* libSystemConfiguration_internal.h */; }; + 158FC77F1FDAE32600B2493C /* SystemConfigurationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 158FC77E1FDAE27900B2493C /* SystemConfigurationInternal.h */; }; + 158FC7801FDAE32A00B2493C /* SystemConfigurationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 158FC77E1FDAE27900B2493C /* SystemConfigurationInternal.h */; }; + 158FC7811FDAE32E00B2493C /* SystemConfigurationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 158FC77E1FDAE27900B2493C /* SystemConfigurationInternal.h */; }; + 158FC7851FDAEF6600B2493C /* network_state_information_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = D6986A761368911E0091C931 /* network_state_information_priv.h */; }; + 158FC7861FDAEF7400B2493C /* network_state_information_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = D6986A761368911E0091C931 /* network_state_information_priv.h */; }; + 158FC7871FDAEF7900B2493C /* network_state_information_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = D6986A761368911E0091C931 /* network_state_information_priv.h */; }; + 158FC7891FDB186100B2493C /* network_information_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 158FC7881FDB184D00B2493C /* network_information_internal.h */; }; + 158FC78A1FDB186600B2493C /* network_information_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 158FC7881FDB184D00B2493C /* network_information_internal.h */; }; + 158FC78B1FDB187A00B2493C /* network_information_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 158FC7881FDB184D00B2493C /* network_information_internal.h */; }; + 158FC78D1FDB566D00B2493C /* liblog_SystemConfiguration_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 158FC78C1FDB566300B2493C /* liblog_SystemConfiguration_internal.h */; }; + 158FC78E1FDB567500B2493C /* liblog_SystemConfiguration_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 158FC78C1FDB566300B2493C /* liblog_SystemConfiguration_internal.h */; }; + 158FC78F1FDB567900B2493C /* liblog_SystemConfiguration_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 158FC78C1FDB566300B2493C /* liblog_SystemConfiguration_internal.h */; }; + 158FC7931FE08B3900B2493C /* libCrashReporterClient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15FBB54B17D6834C0035D752 /* libCrashReporterClient.a */; }; + 158FC7951FE08CC000B2493C /* libCrashReporterClient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15FBB54B17D6834C0035D752 /* libCrashReporterClient.a */; }; 1596A7B114EDB73D00798C39 /* libSystemConfiguration_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 1596A7AF14EDB73D00798C39 /* libSystemConfiguration_server.c */; }; 1596A7B214EDB73D00798C39 /* libSystemConfiguration_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 1596A7AF14EDB73D00798C39 /* libSystemConfiguration_server.c */; }; 1596A7B414EDB73D00798C39 /* libSystemConfiguration_server.h in Headers */ = {isa = PBXBuildFile; fileRef = 1596A7B014EDB73D00798C39 /* libSystemConfiguration_server.h */; }; @@ -773,7 +792,6 @@ 15A5A2430D5B94190087BDA0 /* SCPPath.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB699A05C0722B0099E85F /* SCPPath.c */; settings = {ATTRIBUTES = (); }; }; 15A5A2450D5B94190087BDA0 /* SCDHostName.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB699E05C0722B0099E85F /* SCDHostName.c */; settings = {ATTRIBUTES = (); }; }; 15A5A2460D5B94190087BDA0 /* SCLocation.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69A005C0722B0099E85F /* SCLocation.c */; settings = {ATTRIBUTES = (); }; }; - 15A5A2470D5B94190087BDA0 /* SCNetwork.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69A205C0722B0099E85F /* SCNetwork.c */; settings = {ATTRIBUTES = (); }; }; 15A5A2480D5B94190087BDA0 /* pppcontroller.defs in Sources */ = {isa = PBXBuildFile; fileRef = 23C1E2B8062DD45900835B54 /* pppcontroller.defs */; settings = {ATTRIBUTES = (Client, ); }; }; 15A5A2490D5B94190087BDA0 /* SCNetworkConnection.c in Sources */ = {isa = PBXBuildFile; fileRef = 15CB69A405C0722B0099E85F /* SCNetworkConnection.c */; settings = {ATTRIBUTES = (); }; }; 15A5A24A0D5B94190087BDA0 /* SCNetworkConnectionPrivate.c in Sources */ = {isa = PBXBuildFile; fileRef = 15A2972D0A13C08C009879B3 /* SCNetworkConnectionPrivate.c */; }; @@ -844,6 +862,14 @@ 15D8B22A1450D8450090CECF /* SCD.h in Headers */ = {isa = PBXBuildFile; fileRef = 15D8B2291450D8450090CECF /* SCD.h */; }; 15D8B22B1450D8450090CECF /* SCD.h in Headers */ = {isa = PBXBuildFile; fileRef = 15D8B2291450D8450090CECF /* SCD.h */; }; 15D8B22C1450D8450090CECF /* SCD.h in Headers */ = {isa = PBXBuildFile; fileRef = 15D8B2291450D8450090CECF /* SCD.h */; }; + 15D92B9E1FFC61F400DF2632 /* libnetwork.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 15D92B9D1FFC61F400DF2632 /* libnetwork.tbd */; }; + 15D92B9F1FFC640200DF2632 /* libnetwork.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 15D92B9D1FFC61F400DF2632 /* libnetwork.tbd */; }; + 15D92BA11FFC641500DF2632 /* libnetwork.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 15D92BA01FFC641500DF2632 /* libnetwork.tbd */; }; + 15D92BA21FFC646600DF2632 /* libnetwork.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 15D92BA01FFC641500DF2632 /* libnetwork.tbd */; }; + 15D92BA31FFC647800DF2632 /* libnetwork.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 15D92BA01FFC641500DF2632 /* libnetwork.tbd */; }; + 15D92BA41FFC648900DF2632 /* libnetwork.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 15D92B9D1FFC61F400DF2632 /* libnetwork.tbd */; }; + 15D92BA51FFC64DB00DF2632 /* libnetwork.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 15D92BA01FFC641500DF2632 /* libnetwork.tbd */; }; + 15D92BA71FFC669100DF2632 /* MobileWiFi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15D92BA61FFC669000DF2632 /* MobileWiFi.framework */; }; 15D9DCFB10DD90A1004E545D /* AppWorkaround.plist in AppWorkaround.plist */ = {isa = PBXBuildFile; fileRef = 15D9DCFA10DD90A1004E545D /* AppWorkaround.plist */; }; 15DAD5E1075913CE0084A6ED /* dnsinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B73F0905FD1B670096477F /* dnsinfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15DAD5E2075913CE0084A6ED /* dnsinfo_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 15B73F0C05FD1B670096477F /* dnsinfo_private.h */; }; @@ -936,7 +962,6 @@ 15DAF2E108466D4900D1B2BD /* SCHelper_server.c in Sources */ = {isa = PBXBuildFile; fileRef = 15DAF2D908466D4900D1B2BD /* SCHelper_server.c */; }; 15E1B04316EBAE3C00E5F06F /* dns-configuration.h in Headers */ = {isa = PBXBuildFile; fileRef = 155D22380AF13A7300D52ED0 /* dns-configuration.h */; }; 15E1B04416EBAE3C00E5F06F /* dnsinfo_create.h in Headers */ = {isa = PBXBuildFile; fileRef = 1532629006281C9D00B1C10C /* dnsinfo_create.h */; }; - 15E1B04516EBAE3C00E5F06F /* network_state_information_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = D6986A761368911E0091C931 /* network_state_information_priv.h */; }; 15E1B04616EBAE3C00E5F06F /* proxy-configuration.h in Headers */ = {isa = PBXBuildFile; fileRef = 1575FD2612CD15C60003D86E /* proxy-configuration.h */; }; 15E1B04816EBAE3C00E5F06F /* network_information_server.h in Headers */ = {isa = PBXBuildFile; fileRef = 153ACCA714E322D5005029A5 /* network_information_server.h */; }; 15E1B04916EBAE3C00E5F06F /* libSystemConfiguration_server.h in Headers */ = {isa = PBXBuildFile; fileRef = 1596A7B014EDB73D00798C39 /* libSystemConfiguration_server.h */; }; @@ -967,8 +992,6 @@ 15FEE81F0CD03E75001312F9 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 15FEE8180CD03CBB001312F9 /* Localizable.strings */; }; 15FF5C370CDF776200EEC8AA /* com.apple.SCHelper.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 15FF5C290CDF770500EEC8AA /* com.apple.SCHelper.plist */; }; 55A3DB9E183C2AD900ED3DB7 /* SCNetworkMigration.c in Sources */ = {isa = PBXBuildFile; fileRef = 55A3DB9D183C2A8200ED3DB7 /* SCNetworkMigration.c */; }; - 720985441C580D9F00966D30 /* network_config_agent_info_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = 720985431C580D9F00966D30 /* network_config_agent_info_priv.h */; }; - 720985451C580D9F00966D30 /* network_config_agent_info_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = 720985431C580D9F00966D30 /* network_config_agent_info_priv.h */; }; 720985471C5835DB00966D30 /* agent-monitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 728015931BE1697E009F4F60 /* agent-monitor.h */; }; 720A4C0A1C585C7D007436B8 /* configAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 728015781BE16833009F4F60 /* configAgent.h */; }; 720A4C0B1C585C93007436B8 /* controller.h in Headers */ = {isa = PBXBuildFile; fileRef = 7280157A1BE16833009F4F60 /* controller.h */; }; @@ -988,7 +1011,6 @@ 72573D401D67B2BE004975AD /* SCTestUnitTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D3F1D67B2BE004975AD /* SCTestUnitTest.m */; }; 72573D421D6B798A004975AD /* SCTestConfigAgents.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D411D6B7989004975AD /* SCTestConfigAgents.m */; }; 72573D441D6BA051004975AD /* Network.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 728015951BE16B6C009F4F60 /* Network.framework */; }; - 72573D451D6BA976004975AD /* libnetwork.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 90507AAF1CE2F55B0067D16B /* libnetwork.dylib */; }; 725CB7551BF439C6000C05A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 725CB7541BF439C6000C05A8 /* Foundation.framework */; }; 725CB7561BF439D2000C05A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 725CB7541BF439C6000C05A8 /* Foundation.framework */; }; 725CB7581BF514F2000C05A8 /* configAgentDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 725CB7571BF51476000C05A8 /* configAgentDefines.h */; }; @@ -1006,12 +1028,11 @@ 7271EA241D76600B0055B1AA /* SCTestConfigAgents.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D411D6B7989004975AD /* SCTestConfigAgents.m */; }; 7271EA251D76600B0055B1AA /* SCTestPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D3D1D669AA6004975AD /* SCTestPreferences.m */; }; 7271EA261D76600B0055B1AA /* SCTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 72573D2D1D6673B6004975AD /* SCTest.m */; }; - 7271EA281D76600B0055B1AA /* libnetwork.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 90507AAF1CE2F55B0067D16B /* libnetwork.dylib */; }; 7271EA291D76600B0055B1AA /* Network.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 728015951BE16B6C009F4F60 /* Network.framework */; }; 7271EA2A1D76600B0055B1AA /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72573D331D66800C004975AD /* SystemConfiguration.framework */; }; 7271EA2B1D76600B0055B1AA /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 728015961BE16B6C009F4F60 /* NetworkExtension.framework */; }; 7271EA2D1D76600B0055B1AA /* npt_configd.plist in npt_configd.plist */ = {isa = PBXBuildFile; fileRef = 72C12CAA1D6E9ED4000EE61C /* npt_configd.plist */; }; - 727AF25419138699009AB153 /* VPNAppLayerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B0A88CA616397A1200A60B3A /* VPNAppLayerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 727AF25419138699009AB153 /* VPNAppLayerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B0A88CA616397A1200A60B3A /* VPNAppLayerPrivate.h */; }; 727AF255191386A0009AB153 /* VPNFlow.h in Headers */ = {isa = PBXBuildFile; fileRef = C4CDB8111631933400819B44 /* VPNFlow.h */; settings = {ATTRIBUTES = (Private, ); }; }; 727AF257191386DA009AB153 /* VPNTunnel.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AAA7F2108E310700C2A607 /* VPNTunnel.h */; settings = {ATTRIBUTES = (Private, ); }; }; 727AF258191386E3009AB153 /* VPNTunnelPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15AAA7F1108E310700C2A607 /* VPNTunnelPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -1044,17 +1065,15 @@ 72C12CAB1D6E9F45000EE61C /* npt_configd.plist in npt_configd.plist */ = {isa = PBXBuildFile; fileRef = 72C12CAA1D6E9ED4000EE61C /* npt_configd.plist */; }; 72D3E6611AE6EA3A00DB4C69 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72D3E6601AE6EA3A00DB4C69 /* main.swift */; }; 72D3E66C1AE6EAF600DB4C69 /* test-objC.m in Sources */ = {isa = PBXBuildFile; fileRef = 72D3E66B1AE6EAF600DB4C69 /* test-objC.m */; }; - 90507AB01CE2F55B0067D16B /* libnetwork.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 90507AAF1CE2F55B0067D16B /* libnetwork.dylib */; }; - 90507AB21CE2F5720067D16B /* libnetwork.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 90507AB11CE2F5720067D16B /* libnetwork.dylib */; }; - 90507AB31CE2F58A0067D16B /* libnetwork.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 90507AB11CE2F5720067D16B /* libnetwork.dylib */; }; + 78C951FE1F797B44000EA36B /* libnetwork.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C951FD1F797B43000EA36B /* libnetwork.tbd */; }; B03FEFB616376D2800A1B88F /* VPNAppLayer.c in Sources */ = {isa = PBXBuildFile; fileRef = B03FEFB516376D2800A1B88F /* VPNAppLayer.c */; }; B03FEFB716376D2800A1B88F /* VPNAppLayer.c in Sources */ = {isa = PBXBuildFile; fileRef = B03FEFB516376D2800A1B88F /* VPNAppLayer.c */; }; B03FEFBA16382C0700A1B88F /* libbsm.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 15BAA32207F0699A00D9EC95 /* libbsm.dylib */; }; B03FEFBB16382C1300A1B88F /* libbsm.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 15BAA32207F0699A00D9EC95 /* libbsm.dylib */; }; B084710F16385121006C92A3 /* SCNetworkConnectionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = B084710E16385121006C92A3 /* SCNetworkConnectionInternal.h */; }; B084711016385121006C92A3 /* SCNetworkConnectionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = B084710E16385121006C92A3 /* SCNetworkConnectionInternal.h */; }; - B0A88CA716397A1200A60B3A /* VPNAppLayerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B0A88CA616397A1200A60B3A /* VPNAppLayerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; - B0A88CA816397A1200A60B3A /* VPNAppLayerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B0A88CA616397A1200A60B3A /* VPNAppLayerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + B0A88CA716397A1200A60B3A /* VPNAppLayerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B0A88CA616397A1200A60B3A /* VPNAppLayerPrivate.h */; }; + B0A88CA816397A1200A60B3A /* VPNAppLayerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B0A88CA616397A1200A60B3A /* VPNAppLayerPrivate.h */; }; B0C967F817441F0E00889853 /* SNHelperPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = B0C967F717441F0E00889853 /* SNHelperPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; B0C9689C174426C600889853 /* SNHelper.c in Sources */ = {isa = PBXBuildFile; fileRef = B0C9689B174426C200889853 /* SNHelper.c */; }; B0C9689D174426D100889853 /* SNHelper.c in Sources */ = {isa = PBXBuildFile; fileRef = B0C9689B174426C200889853 /* SNHelper.c */; }; @@ -1062,6 +1081,8 @@ B0FEF41A164406F400174B99 /* libbsm.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 15BAA32207F0699A00D9EC95 /* libbsm.dylib */; }; B0FEF41B1644089200174B99 /* VPNAppLayer.c in Sources */ = {isa = PBXBuildFile; fileRef = B03FEFB516376D2800A1B88F /* VPNAppLayer.c */; }; C42633891A9E4991009F7AE4 /* VPNFlow.c in Sources */ = {isa = PBXBuildFile; fileRef = C4CDB8141631935700819B44 /* VPNFlow.c */; }; + C4666C72206ED01800247AB6 /* EventFactory.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15FA0F74203A390E00C7702F /* EventFactory.framework */; }; + C4666C7A206ED27800247AB6 /* EventFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 1597A9A41FBCECCD000FAA86 /* EventFactory.m */; }; C4CDB8151631935700819B44 /* VPNFlow.c in Sources */ = {isa = PBXBuildFile; fileRef = C4CDB8141631935700819B44 /* VPNFlow.c */; }; C4CDB8161631935700819B44 /* VPNFlow.c in Sources */ = {isa = PBXBuildFile; fileRef = C4CDB8141631935700819B44 /* VPNFlow.c */; }; C4CDB8171631938000819B44 /* VPNFlow.h in Headers */ = {isa = PBXBuildFile; fileRef = C4CDB8111631933400819B44 /* VPNFlow.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -1084,8 +1105,6 @@ D6986A79136891650091C931 /* network_information.c in Sources */ = {isa = PBXBuildFile; fileRef = D6986A77136891300091C931 /* network_information.c */; }; E49173E1137C4E4F0000089F /* network_state_information_priv.c in Sources */ = {isa = PBXBuildFile; fileRef = D6986A75136891120091C931 /* network_state_information_priv.c */; }; E4F211D3137B0AB900BBB915 /* network_state_information_priv.c in Sources */ = {isa = PBXBuildFile; fileRef = D6986A75136891120091C931 /* network_state_information_priv.c */; }; - E4F211D4137B0ABD00BBB915 /* network_state_information_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = D6986A761368911E0091C931 /* network_state_information_priv.h */; }; - E4F211D7137B0AF200BBB915 /* network_state_information_priv.h in Headers */ = {isa = PBXBuildFile; fileRef = D6986A761368911E0091C931 /* network_state_information_priv.h */; }; F9347FF7187C796E003D4178 /* IPMonitorControl.c in Sources */ = {isa = PBXBuildFile; fileRef = F9B7AE5C1862116500C78D18 /* IPMonitorControl.c */; }; F9347FF8187C7993003D4178 /* IPMonitorControl.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE5D1862116500C78D18 /* IPMonitorControl.h */; }; F9347FF9187C7993003D4178 /* IPMonitorControlPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE5E1862116500C78D18 /* IPMonitorControlPrivate.h */; }; @@ -1093,8 +1112,13 @@ F95B8A430B03E07A00993BA3 /* SCNetworkSignature.c in Sources */ = {isa = PBXBuildFile; fileRef = F95B8A420B03E07A00993BA3 /* SCNetworkSignature.c */; }; F95B8A460B03E09300993BA3 /* SCNetworkSignature.h in Headers */ = {isa = PBXBuildFile; fileRef = F95B8A440B03E09300993BA3 /* SCNetworkSignature.h */; settings = {ATTRIBUTES = (Private, ); }; }; F95B8A470B03E09300993BA3 /* SCNetworkSignaturePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = F95B8A450B03E09300993BA3 /* SCNetworkSignaturePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; + F97F9FC7202CBD5A0040BD50 /* SCNetworkInterfaceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = F97F9FC5202CBD130040BD50 /* SCNetworkInterfaceProvider.h */; settings = {ATTRIBUTES = (Private, ); }; }; + F97F9FC8202CBD600040BD50 /* SCNetworkInterfaceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = F97F9FC5202CBD130040BD50 /* SCNetworkInterfaceProvider.h */; settings = {ATTRIBUTES = (Private, ); }; }; + F97F9FC9202CBD710040BD50 /* SCNetworkInterfaceProvider.c in Sources */ = {isa = PBXBuildFile; fileRef = F97F9FC6202CBD230040BD50 /* SCNetworkInterfaceProvider.c */; }; + F999388920FE54DB005EE20D /* AwdMetadata-0x81-IPMonitor.bin in CopyFiles */ = {isa = PBXBuildFile; fileRef = F999388820FE54CB005EE20D /* AwdMetadata-0x81-IPMonitor.bin */; }; F9A3781016A4847700C57CDC /* IPMonitorControlPrefs.c in Sources */ = {isa = PBXBuildFile; fileRef = F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */; }; F9A3781116A4849100C57CDC /* IPMonitorControlPrefs.c in Sources */ = {isa = PBXBuildFile; fileRef = F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */; }; + F9AF76C1202CCD86008D3BEB /* SCNetworkInterfaceProvider.c in Sources */ = {isa = PBXBuildFile; fileRef = F97F9FC6202CBD230040BD50 /* SCNetworkInterfaceProvider.c */; }; F9B50FF316A4CBB200CA274E /* IPMonitorControlPrefs.c in Sources */ = {isa = PBXBuildFile; fileRef = F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */; }; F9B50FF416A4CBB800CA274E /* IPMonitorControlPrefs.c in Sources */ = {isa = PBXBuildFile; fileRef = F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */; }; F9B7AE641862119300C78D18 /* IPMonitorControl.c in Sources */ = {isa = PBXBuildFile; fileRef = F9B7AE5C1862116500C78D18 /* IPMonitorControl.c */; }; @@ -1109,6 +1133,14 @@ F9B7AE6D186211EA00C78D18 /* symbol_scope.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE631862116500C78D18 /* symbol_scope.h */; }; F9B7AE6E186211F000C78D18 /* symbol_scope.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE631862116500C78D18 /* symbol_scope.h */; }; F9B7AE6F186211F600C78D18 /* symbol_scope.h in Headers */ = {isa = PBXBuildFile; fileRef = F9B7AE631862116500C78D18 /* symbol_scope.h */; }; + F9D7304B20DDBE9900521181 /* AWDIPMonitorInterfaceAdvisoryReport.m in Sources */ = {isa = PBXBuildFile; fileRef = F9D7304920DD89C600521181 /* AWDIPMonitorInterfaceAdvisoryReport.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + F9D7304C20DDBEAB00521181 /* IPMonitorAWDReport.m in Sources */ = {isa = PBXBuildFile; fileRef = F9D7303D20DD894C00521181 /* IPMonitorAWDReport.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + F9D7304F20E41D9C00521181 /* ProtocolBuffer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F9D7304E20E41D9C00521181 /* ProtocolBuffer.framework */; }; + F9D7305120E41DD500521181 /* WirelessDiagnostics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F9D7305020E41DD500521181 /* WirelessDiagnostics.framework */; settings = {ATTRIBUTES = (Required, ); }; }; + F9D7305220E4211900521181 /* AWDIPMonitorInterfaceAdvisoryReport.m in Sources */ = {isa = PBXBuildFile; fileRef = F9D7304920DD89C600521181 /* AWDIPMonitorInterfaceAdvisoryReport.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + F9D7305320E4211900521181 /* IPMonitorAWDReport.m in Sources */ = {isa = PBXBuildFile; fileRef = F9D7303D20DD894C00521181 /* IPMonitorAWDReport.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + F9D7305420E4387A00521181 /* ProtocolBuffer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F9D7304E20E41D9C00521181 /* ProtocolBuffer.framework */; }; + F9D7305520E4389700521181 /* WirelessDiagnostics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F9D7305020E41DD500521181 /* WirelessDiagnostics.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -1595,6 +1627,13 @@ remoteGlobalIDString = 155847430754FDCD0046C2E9; remoteInfo = scutil; }; + C453EED12086992B00BF504E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; + proxyType = 1; + remoteGlobalIDString = C4666C70206ED01800247AB6; + remoteInfo = SystemConfigurationEventFactory; + }; D6DDAC3C147A24BC00A2E902 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 15CB6A7705C0722B0099E85F /* Project object */; @@ -1770,6 +1809,16 @@ ); runOnlyForDeploymentPostprocessing = 1; }; + F999388720FE546D005EE20D /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 8; + dstPath = /System/Library/AWD/Metadata; + dstSubfolderSpec = 0; + files = ( + F999388920FE54DB005EE20D /* AwdMetadata-0x81-IPMonitor.bin in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 1; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -1790,7 +1839,8 @@ 152439E318038E5B00D91708 /* ev_extra.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ev_extra.h; sourceTree = ""; }; 152439E418038E5B00D91708 /* ev_extra.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ev_extra.m; sourceTree = ""; }; 152439E7180399D800D91708 /* CoreWLAN.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreWLAN.framework; path = /System/Library/Frameworks/CoreWLAN.framework; sourceTree = ""; }; - 152439EB180716ED00D91708 /* MobileWiFi.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileWiFi.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.Internal.sdk/System/Library/PrivateFrameworks/MobileWiFi.framework; sourceTree = DEVELOPER_DIR; }; + 152439EB180716ED00D91708 /* MobileWiFi.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileWiFi.framework; path = System/Library/PrivateFrameworks/MobileWiFi.framework; sourceTree = SDKROOT; }; + 1524FE1920619BAF0010091E /* Info-Embedded.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Info-Embedded.plist"; path = "Plugins/QoSMarking/Info-Embedded.plist"; sourceTree = ""; }; 1528922C1EDE41ED00FCFE71 /* network_state_information_logging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = network_state_information_logging.h; path = nwi/network_state_information_logging.h; sourceTree = ""; }; 1528922D1EDE41ED00FCFE71 /* dnsinfo_logging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = dnsinfo_logging.h; path = dnsinfo/dnsinfo_logging.h; sourceTree = ""; }; 152CEED0070CF6640050F23C /* libedit.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libedit.dylib; path = /usr/lib/libedit.2.dylib; sourceTree = ""; }; @@ -1802,7 +1852,7 @@ 1532629006281C9D00B1C10C /* dnsinfo_create.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = dnsinfo_create.h; path = dnsinfo/dnsinfo_create.h; sourceTree = ""; }; 153338BA14BE7978004FCE22 /* libSystemConfiguration_client.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = libSystemConfiguration_client.c; path = libSystemConfiguration/libSystemConfiguration_client.c; sourceTree = ""; }; 153338BB14BE7978004FCE22 /* libSystemConfiguration_client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libSystemConfiguration_client.h; path = libSystemConfiguration/libSystemConfiguration_client.h; sourceTree = ""; }; - 153393E20D34994100FE74E7 /* update-headers */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = "update-headers"; sourceTree = ""; }; + 153393E20D34994100FE74E7 /* restore-temporary-headers */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = "restore-temporary-headers"; sourceTree = ""; }; 153ACCA614E322D5005029A5 /* network_information_server.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 0; name = network_information_server.c; path = nwi/network_information_server.c; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.c; }; 153ACCA714E322D5005029A5 /* network_information_server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = network_information_server.h; path = nwi/network_information_server.h; sourceTree = ""; }; 1540E3600987DA9500157C07 /* com.apple.configd.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = com.apple.configd.plist; sourceTree = ""; }; @@ -1831,6 +1881,7 @@ 155F49A21C864F5400E47D08 /* QoSMarking.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QoSMarking.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 155F49A41C864FE500E47D08 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Plugins/QoSMarking/Info.plist; sourceTree = ""; }; 155F49A51C864FE500E47D08 /* qos-marking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "qos-marking.m"; path = "Plugins/QoSMarking/qos-marking.m"; sourceTree = ""; }; + 1562569020856CCC00FCD61E /* liblockdown.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = liblockdown.dylib; path = /usr/lib/liblockdown.dylib; sourceTree = ""; }; 1567333E0DD1FD6500145179 /* entitlements-ios.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "entitlements-ios.plist"; sourceTree = ""; }; 156BD6BB07E0DFA9008698FF /* SCPreferencesSetSpecificPrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SCPreferencesSetSpecificPrivate.h; sourceTree = ""; }; 1572AA8B1D8234500021E093 /* plugin_shared.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = plugin_shared.h; sourceTree = ""; }; @@ -1858,14 +1909,20 @@ 158AD8C00754E3EF00124717 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 158AD9100754E40E00124717 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 158D6D871C974DBA00A08E78 /* com.apple.SystemConfiguration.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.SystemConfiguration.plist; sourceTree = ""; }; + 158FC77A1FDAD9BC00B2493C /* libSystemConfiguration_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = libSystemConfiguration_internal.h; path = libSystemConfiguration/libSystemConfiguration_internal.h; sourceTree = ""; }; + 158FC77E1FDAE27900B2493C /* SystemConfigurationInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SystemConfigurationInternal.h; sourceTree = ""; }; + 158FC7881FDB184D00B2493C /* network_information_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = network_information_internal.h; path = nwi/network_information_internal.h; sourceTree = ""; }; + 158FC78C1FDB566300B2493C /* liblog_SystemConfiguration_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = liblog_SystemConfiguration_internal.h; path = logging/liblog_SystemConfiguration_internal.h; sourceTree = ""; }; 1596A7AF14EDB73D00798C39 /* libSystemConfiguration_server.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; lineEnding = 0; name = libSystemConfiguration_server.c; path = libSystemConfiguration/libSystemConfiguration_server.c; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.c; }; 1596A7B014EDB73D00798C39 /* libSystemConfiguration_server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = libSystemConfiguration_server.h; path = libSystemConfiguration/libSystemConfiguration_server.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + 1597A9A31FBCECCD000FAA86 /* EventFactory.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = EventFactory.h; sourceTree = ""; tabWidth = 4; }; + 1597A9A41FBCECCD000FAA86 /* EventFactory.m */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = EventFactory.m; sourceTree = ""; tabWidth = 4; }; 159A7513107FEAA400A57EAB /* VPNPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VPNPrivate.h; sourceTree = ""; }; 159A7515107FEAA400A57EAB /* VPNConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VPNConfiguration.h; sourceTree = ""; }; 159A7517107FEAA400A57EAB /* VPNPrivate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = VPNPrivate.c; sourceTree = ""; }; 159A7519107FEAA400A57EAB /* VPNConfiguration.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = VPNConfiguration.c; sourceTree = ""; }; 159C9A8D17399609003DDA1D /* dnsinfo_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dnsinfo_internal.h; path = dnsinfo/dnsinfo_internal.h; sourceTree = ""; }; - 159D53A707528B36004F8947 /* ip_plugin.c */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = ip_plugin.c; sourceTree = ""; }; + 159D53A707528B36004F8947 /* ip_plugin.c */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 8; lastKnownFileType = sourcecode.c.c; path = ip_plugin.c; sourceTree = ""; tabWidth = 8; }; 159D53AA07528B36004F8947 /* dns-configuration.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "dns-configuration.c"; sourceTree = ""; }; 159D53AB07528B36004F8947 /* set-hostname.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "set-hostname.c"; sourceTree = ""; }; 159D53AE07528B36004F8947 /* ifnamer.c */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = ifnamer.c; sourceTree = ""; }; @@ -2040,6 +2097,10 @@ 15D3083816F3EB8600014F82 /* simulator_support.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = simulator_support.c; path = Plugins/SimulatorSupport/simulator_support.c; sourceTree = ""; }; 15D3083A16F4E6D900014F82 /* com.apple.configd_sim.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = com.apple.configd_sim.plist; sourceTree = ""; }; 15D8B2291450D8450090CECF /* SCD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCD.h; sourceTree = ""; }; + 15D92B9A1FFC5FA500DF2632 /* libnetwork.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libnetwork.tbd; path = usr/lib/libnetwork.tbd; sourceTree = SDKROOT; }; + 15D92B9D1FFC61F400DF2632 /* libnetwork.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libnetwork.tbd; path = usr/lib/libnetwork.tbd; sourceTree = SDKROOT; }; + 15D92BA01FFC641500DF2632 /* libnetwork.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libnetwork.tbd; path = usr/lib/libnetwork.tbd; sourceTree = SDKROOT; }; + 15D92BA61FFC669000DF2632 /* MobileWiFi.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileWiFi.framework; path = System/Library/PrivateFrameworks/MobileWiFi.framework; sourceTree = SDKROOT; }; 15D9DCFA10DD90A1004E545D /* AppWorkaround.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = AppWorkaround.plist; sourceTree = ""; }; 15DAD5EE075913CE0084A6ED /* libsystem_configuration.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libsystem_configuration.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 15DAF2D808466D4900D1B2BD /* SCHelper_client.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = SCHelper_client.c; path = helper/SCHelper_client.c; sourceTree = ""; }; @@ -2056,6 +2117,8 @@ 15E1B06116EBAE7800E5F06F /* IPMonitor.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IPMonitor.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 15F742E41EC6370000DA2E7A /* liblog_SystemConfiguration.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = liblog_SystemConfiguration.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; 15F742F11EC638D100DA2E7A /* liblog_SystemConfiguration.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = liblog_SystemConfiguration.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; + 15FA0F73203A379600C7702F /* EventFactory.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = EventFactory.framework; sourceTree = ""; }; + 15FA0F74203A390E00C7702F /* EventFactory.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = EventFactory.framework; path = System/Library/PrivateFrameworks/EventFactory.framework; sourceTree = SDKROOT; }; 15FB1F881E27E9A000B4F809 /* InterfaceNamerControlPrefs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = InterfaceNamerControlPrefs.c; sourceTree = ""; }; 15FB1F891E27E9A000B4F809 /* InterfaceNamerControlPrefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InterfaceNamerControlPrefs.h; sourceTree = ""; }; 15FBB54B17D6834C0035D752 /* libCrashReporterClient.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCrashReporterClient.a; path = /usr/local/lib/libCrashReporterClient.a; sourceTree = ""; }; @@ -2120,14 +2183,15 @@ 72D3E6601AE6EA3A00DB4C69 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; 72D3E6691AE6EAF600DB4C69 /* SCTest-ObjC */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "SCTest-ObjC"; sourceTree = BUILT_PRODUCTS_DIR; }; 72D3E66B1AE6EAF600DB4C69 /* test-objC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "test-objC.m"; sourceTree = ""; }; - 90507AAF1CE2F55B0067D16B /* libnetwork.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libnetwork.dylib; path = usr/lib/libnetwork.dylib; sourceTree = SDKROOT; }; - 90507AB11CE2F5720067D16B /* libnetwork.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libnetwork.dylib; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.Internal.sdk/usr/lib/libnetwork.dylib; sourceTree = DEVELOPER_DIR; }; + 78C951FD1F797B43000EA36B /* libnetwork.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libnetwork.tbd; path = usr/lib/libnetwork.tbd; sourceTree = SDKROOT; }; 9EE943F306AF409B00772EB5 /* BondConfiguration.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = BondConfiguration.c; sourceTree = ""; }; B03FEFB516376D2800A1B88F /* VPNAppLayer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = VPNAppLayer.c; sourceTree = ""; }; B084710E16385121006C92A3 /* SCNetworkConnectionInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCNetworkConnectionInternal.h; sourceTree = ""; }; B0A88CA616397A1200A60B3A /* VPNAppLayerPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = VPNAppLayerPrivate.h; sourceTree = ""; tabWidth = 4; }; B0C967F717441F0E00889853 /* SNHelperPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SNHelperPrivate.h; sourceTree = ""; }; B0C9689B174426C200889853 /* SNHelper.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = SNHelper.c; sourceTree = ""; }; + C4666C71206ED01800247AB6 /* SystemConfigurationEventFactory.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SystemConfigurationEventFactory.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + C4666C74206ED01800247AB6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; C4CDB8111631933400819B44 /* VPNFlow.h */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = VPNFlow.h; sourceTree = ""; tabWidth = 4; }; C4CDB8141631935700819B44 /* VPNFlow.c */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.c; path = VPNFlow.c; sourceTree = ""; tabWidth = 4; }; C4F1847F16237AFC00D97043 /* VPNService.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = VPNService.c; sourceTree = ""; }; @@ -2141,6 +2205,9 @@ F95B8A420B03E07A00993BA3 /* SCNetworkSignature.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SCNetworkSignature.c; sourceTree = ""; }; F95B8A440B03E09300993BA3 /* SCNetworkSignature.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SCNetworkSignature.h; sourceTree = ""; }; F95B8A450B03E09300993BA3 /* SCNetworkSignaturePrivate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SCNetworkSignaturePrivate.h; sourceTree = ""; }; + F97F9FC5202CBD130040BD50 /* SCNetworkInterfaceProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SCNetworkInterfaceProvider.h; sourceTree = ""; }; + F97F9FC6202CBD230040BD50 /* SCNetworkInterfaceProvider.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SCNetworkInterfaceProvider.c; sourceTree = ""; }; + F999388820FE54CB005EE20D /* AwdMetadata-0x81-IPMonitor.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; path = "AwdMetadata-0x81-IPMonitor.bin"; sourceTree = ""; }; F9A3780E16A4846E00C57CDC /* IPMonitorControlPrefs.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = IPMonitorControlPrefs.c; sourceTree = ""; }; F9A3780F16A4846E00C57CDC /* IPMonitorControlPrefs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IPMonitorControlPrefs.h; sourceTree = ""; }; F9B7AE5C1862116500C78D18 /* IPMonitorControl.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = IPMonitorControl.c; sourceTree = ""; }; @@ -2151,6 +2218,15 @@ F9B7AE611862116500C78D18 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; F9B7AE621862116500C78D18 /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = ""; }; F9B7AE631862116500C78D18 /* symbol_scope.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = symbol_scope.h; sourceTree = ""; }; + F9D7303C20DD894C00521181 /* IPMonitorAWDReport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IPMonitorAWDReport.h; sourceTree = ""; }; + F9D7303D20DD894C00521181 /* IPMonitorAWDReport.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IPMonitorAWDReport.m; sourceTree = ""; }; + F9D7304620DD89C600521181 /* AWDIPMonitorInterfaceAdvisoryReport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AWDIPMonitorInterfaceAdvisoryReport.h; sourceTree = ""; }; + F9D7304720DD89C600521181 /* AWDIPMonitorGlobalEnums.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AWDIPMonitorGlobalEnums.h; sourceTree = ""; }; + F9D7304820DD89C600521181 /* AWDMetricIds_IPMonitor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AWDMetricIds_IPMonitor.h; sourceTree = ""; }; + F9D7304920DD89C600521181 /* AWDIPMonitorInterfaceAdvisoryReport.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AWDIPMonitorInterfaceAdvisoryReport.m; sourceTree = ""; }; + F9D7304A20DDA59600521181 /* awdgen.yaml */ = {isa = PBXFileReference; lastKnownFileType = text; path = awdgen.yaml; sourceTree = ""; }; + F9D7304E20E41D9C00521181 /* ProtocolBuffer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ProtocolBuffer.framework; path = ../../../../../../../../SDKs/Peace16A315/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/PrivateFrameworks/ProtocolBuffer.framework; sourceTree = ""; }; + F9D7305020E41DD500521181 /* WirelessDiagnostics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WirelessDiagnostics.framework; path = ../../../../../../../../SDKs/Peace16A315/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/PrivateFrameworks/WirelessDiagnostics.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -2209,9 +2285,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 90507AB21CE2F5720067D16B /* libnetwork.dylib in Frameworks */, 1572C5240CFB55B400E2776E /* CoreFoundation.framework in Frameworks */, B03FEFBB16382C1300A1B88F /* libbsm.dylib in Frameworks */, + 15D92BA31FFC647800DF2632 /* libnetwork.tbd in Frameworks */, + 158FC7951FE08CC000B2493C /* libCrashReporterClient.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2224,6 +2301,7 @@ 15732A9E16EA503200F3AC4C /* IOKit.framework in Frameworks */, 15732A9F16EA503200F3AC4C /* Security.framework in Frameworks */, 15732AA016EA503200F3AC4C /* libbsm.dylib in Frameworks */, + 15D92B9E1FFC61F400DF2632 /* libnetwork.tbd in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2274,15 +2352,19 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + F9D7305120E41DD500521181 /* WirelessDiagnostics.framework in Frameworks */, + F9D7304F20E41D9C00521181 /* ProtocolBuffer.framework in Frameworks */, 725CB7561BF439D2000C05A8 /* Foundation.framework in Frameworks */, 7214BCE31BEB392000A8F056 /* Network.framework in Frameworks */, 7214BCE41BEB392300A8F056 /* NetworkExtension.framework in Frameworks */, 1583174C0CFB80A1006F62B9 /* CoreFoundation.framework in Frameworks */, 154707350D1F70C80075C28D /* SystemConfiguration.framework in Frameworks */, 1583174E0CFB80A1006F62B9 /* IOKit.framework in Frameworks */, - 152439EC180716ED00D91708 /* MobileWiFi.framework in Frameworks */, + 15D92BA71FFC669100DF2632 /* MobileWiFi.framework in Frameworks */, 159C32B60F583724008A72EE /* Security.framework in Frameworks */, 158317500CFB80A1006F62B9 /* libbsm.dylib in Frameworks */, + 1562569120856CCC00FCD61E /* liblockdown.dylib in Frameworks */, + 15D92BA51FFC64DB00DF2632 /* libnetwork.tbd in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2301,6 +2383,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + F9D7305520E4389700521181 /* WirelessDiagnostics.framework in Frameworks */, + F9D7305420E4387A00521181 /* ProtocolBuffer.framework in Frameworks */, 725CB7551BF439C6000C05A8 /* Foundation.framework in Frameworks */, 728015971BE16B6C009F4F60 /* Network.framework in Frameworks */, 728015981BE16B6C009F4F60 /* NetworkExtension.framework in Frameworks */, @@ -2310,6 +2394,7 @@ 1543636B0752D03C00A8EC6C /* IOKit.framework in Frameworks */, D6623873120B2AA7007F8E95 /* Security.framework in Frameworks */, 15BAA32307F0699A00D9EC95 /* libbsm.dylib in Frameworks */, + 78C951FE1F797B44000EA36B /* libnetwork.tbd in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2317,9 +2402,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 90507AB31CE2F58A0067D16B /* libnetwork.dylib in Frameworks */, 15A5A2630D5B94190087BDA0 /* CoreFoundation.framework in Frameworks */, B0FEF41A164406F400174B99 /* libbsm.dylib in Frameworks */, + 15D92BA21FFC646600DF2632 /* libnetwork.tbd in Frameworks */, + 158FC7931FE08B3900B2493C /* libCrashReporterClient.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2334,9 +2420,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 90507AB01CE2F55B0067D16B /* libnetwork.dylib in Frameworks */, 15DAD6AE07591A1A0084A6ED /* CoreFoundation.framework in Frameworks */, B03FEFBA16382C0700A1B88F /* libbsm.dylib in Frameworks */, + 15D92BA41FFC648900DF2632 /* libnetwork.tbd in Frameworks */, 15FBB54C17D6834C0035D752 /* libCrashReporterClient.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -2363,10 +2449,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 72573D451D6BA976004975AD /* libnetwork.dylib in Frameworks */, 72573D441D6BA051004975AD /* Network.framework in Frameworks */, 72573D351D6680AA004975AD /* SystemConfiguration.framework in Frameworks */, 728E0E971D70348D00E0613A /* NetworkExtension.framework in Frameworks */, + 15D92B9F1FFC640200DF2632 /* libnetwork.tbd in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2374,10 +2460,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7271EA281D76600B0055B1AA /* libnetwork.dylib in Frameworks */, 7271EA291D76600B0055B1AA /* Network.framework in Frameworks */, 7271EA2A1D76600B0055B1AA /* SystemConfiguration.framework in Frameworks */, 7271EA2B1D76600B0055B1AA /* NetworkExtension.framework in Frameworks */, + 15D92BA11FFC641500DF2632 /* libnetwork.tbd in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2395,6 +2481,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + C4666C6E206ED01800247AB6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C4666C72206ED01800247AB6 /* EventFactory.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -2409,6 +2503,7 @@ 151D060C1EC14C3900E02E48 /* Logging */ = { isa = PBXGroup; children = ( + 158FC78C1FDB566300B2493C /* liblog_SystemConfiguration_internal.h */, 151D060D1EC14C6700E02E48 /* liblog_SystemConfiguration.m */, ); name = Logging; @@ -2532,6 +2627,7 @@ children = ( 155F49A51C864FE500E47D08 /* qos-marking.m */, 155F49A41C864FE500E47D08 /* Info.plist */, + 1524FE1920619BAF0010091E /* Info-Embedded.plist */, ); name = QoSMarking; sourceTree = ""; @@ -2701,6 +2797,7 @@ 15B534AD14BE778800EA6522 /* libsystem_configuration */ = { isa = PBXGroup; children = ( + 158FC77A1FDAD9BC00B2493C /* libSystemConfiguration_internal.h */, 153338BB14BE7978004FCE22 /* libSystemConfiguration_client.h */, 153338BA14BE7978004FCE22 /* libSystemConfiguration_client.c */, 1596A7B014EDB73D00798C39 /* libSystemConfiguration_server.h */, @@ -2722,7 +2819,7 @@ 158D6D871C974DBA00A08E78 /* com.apple.SystemConfiguration.plist */, 15CFC229068B222F00123568 /* get-mobility-info */, 72499BA31AC9B7AB0090C49F /* get-network-info */, - 153393E20D34994100FE74E7 /* update-headers */, + 153393E20D34994100FE74E7 /* restore-temporary-headers */, ); name = "Supporting Files"; sourceTree = ""; @@ -2971,6 +3068,7 @@ 72D3E65F1AE6EA3A00DB4C69 /* SCTest-Swift */, 72D3E66A1AE6EAF600DB4C69 /* SCTest-ObjC */, 72573D271D667372004975AD /* sctest */, + C4666C73206ED01800247AB6 /* EventFactory */, 15CB690F05C0722B0099E85F /* Products */, 90507AAE1CE2F55B0067D16B /* Frameworks */, ); @@ -2989,6 +3087,7 @@ 1547002E084561B4006787CE /* SCHelper */, 15C330DB134B9B8B0028E36B /* SCNetworkConfiguration */, 15C330DE134B9C290028E36B /* SCNetworkConnection */, + F97F9FC2202CBCA00040BD50 /* SCNetworkInterfaceProvider */, 15C330B4134B91930028E36B /* SCNetworkReachability */, 15C330E1134B9C8E0028E36B /* VPN */, 15CB691205C0722B0099E85F /* Other Headers */, @@ -3024,6 +3123,7 @@ 151D060B1EC1491600E02E48 /* liblog_SystemConfiguration.dylib */, 15F742E41EC6370000DA2E7A /* liblog_SystemConfiguration.dylib */, 15F742F11EC638D100DA2E7A /* liblog_SystemConfiguration.dylib */, + C4666C71206ED01800247AB6 /* SystemConfigurationEventFactory.bundle */, ); name = Products; sourceTree = ""; @@ -3031,6 +3131,7 @@ 15CB691205C0722B0099E85F /* Other Headers */ = { isa = PBXGroup; children = ( + 158FC77E1FDAE27900B2493C /* SystemConfigurationInternal.h */, 15D8B2291450D8450090CECF /* SCD.h */, 15CB691305C0722B0099E85F /* SystemConfiguration.h */, 150607DE075A00A300B147BA /* SCSchemaDefinitions.h */, @@ -3233,6 +3334,7 @@ 15FEE80D0CCFD341001312F9 /* ApplicationServices.framework */, 15CB6A6F05C0722B0099E85F /* CoreFoundation.framework */, 152439E7180399D800D91708 /* CoreWLAN.framework */, + 15FA0F73203A379600C7702F /* EventFactory.framework */, 1543636A0752D03C00A8EC6C /* IOKit.framework */, 152439EB180716ED00D91708 /* MobileWiFi.framework */, 1520A3DE0846B2DC0010B584 /* Security.framework */, @@ -3351,13 +3453,30 @@ 90507AAE1CE2F55B0067D16B /* Frameworks */ = { isa = PBXGroup; children = ( + F9D7305020E41DD500521181 /* WirelessDiagnostics.framework */, + F9D7304E20E41D9C00521181 /* ProtocolBuffer.framework */, + 1562569020856CCC00FCD61E /* liblockdown.dylib */, + 15FA0F74203A390E00C7702F /* EventFactory.framework */, + 15D92BA61FFC669000DF2632 /* MobileWiFi.framework */, 72573D331D66800C004975AD /* SystemConfiguration.framework */, - 90507AB11CE2F5720067D16B /* libnetwork.dylib */, - 90507AAF1CE2F55B0067D16B /* libnetwork.dylib */, + 78C951FD1F797B43000EA36B /* libnetwork.tbd */, + 15D92B9A1FFC5FA500DF2632 /* libnetwork.tbd */, + 15D92B9D1FFC61F400DF2632 /* libnetwork.tbd */, + 15D92BA01FFC641500DF2632 /* libnetwork.tbd */, ); name = Frameworks; sourceTree = ""; }; + C4666C73206ED01800247AB6 /* EventFactory */ = { + isa = PBXGroup; + children = ( + 1597A9A31FBCECCD000FAA86 /* EventFactory.h */, + 1597A9A41FBCECCD000FAA86 /* EventFactory.m */, + C4666C74206ED01800247AB6 /* Info.plist */, + ); + path = EventFactory; + sourceTree = ""; + }; D6986A70136890B60091C931 /* NetworkInformation */ = { isa = PBXGroup; children = ( @@ -3371,6 +3490,7 @@ isa = PBXGroup; children = ( D6986A781368913C0091C931 /* network_information.h */, + 158FC7881FDB184D00B2493C /* network_information_internal.h */, 1528922C1EDE41ED00FCFE71 /* network_state_information_logging.h */, D6986A761368911E0091C931 /* network_state_information_priv.h */, 720985431C580D9F00966D30 /* network_config_agent_info_priv.h */, @@ -3389,9 +3509,38 @@ name = Sources; sourceTree = ""; }; + F97F9FC2202CBCA00040BD50 /* SCNetworkInterfaceProvider */ = { + isa = PBXGroup; + children = ( + F97F9FC4202CBCF50040BD50 /* Headers */, + F97F9FC3202CBCF10040BD50 /* Source */, + ); + name = SCNetworkInterfaceProvider; + sourceTree = ""; + }; + F97F9FC3202CBCF10040BD50 /* Source */ = { + isa = PBXGroup; + children = ( + F97F9FC6202CBD230040BD50 /* SCNetworkInterfaceProvider.c */, + ); + name = Source; + sourceTree = ""; + }; + F97F9FC4202CBCF50040BD50 /* Headers */ = { + isa = PBXGroup; + children = ( + F97F9FC5202CBD130040BD50 /* SCNetworkInterfaceProvider.h */, + ); + name = Headers; + sourceTree = ""; + }; F9B7AE5B1862116500C78D18 /* IPMonitorControl */ = { isa = PBXGroup; children = ( + F9D7304A20DDA59600521181 /* awdgen.yaml */, + F9D7304420DD89C600521181 /* AWD */, + F9D7303C20DD894C00521181 /* IPMonitorAWDReport.h */, + F9D7303D20DD894C00521181 /* IPMonitorAWDReport.m */, F9B7AE5C1862116500C78D18 /* IPMonitorControl.c */, F9B7AE5D1862116500C78D18 /* IPMonitorControl.h */, F9B7AE5E1862116500C78D18 /* IPMonitorControlPrivate.h */, @@ -3404,6 +3553,18 @@ path = IPMonitorControl; sourceTree = ""; }; + F9D7304420DD89C600521181 /* AWD */ = { + isa = PBXGroup; + children = ( + F999388820FE54CB005EE20D /* AwdMetadata-0x81-IPMonitor.bin */, + F9D7304620DD89C600521181 /* AWDIPMonitorInterfaceAdvisoryReport.h */, + F9D7304720DD89C600521181 /* AWDIPMonitorGlobalEnums.h */, + F9D7304820DD89C600521181 /* AWDMetricIds_IPMonitor.h */, + F9D7304920DD89C600521181 /* AWDIPMonitorInterfaceAdvisoryReport.m */, + ); + path = AWD; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -3411,9 +3572,11 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 158FC78D1FDB566D00B2493C /* liblog_SystemConfiguration_internal.h in Headers */, 15CB8F7A1EE4DD3E00726685 /* dnsinfo_logging.h in Headers */, 15CB8F721EE4DD0400726685 /* network_state_information_logging.h in Headers */, 15CB8F841EE4DE2600726685 /* SCNetworkReachabilityLogging.h in Headers */, + 158FC78A1FDB186600B2493C /* network_information_internal.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3500,6 +3663,7 @@ 1572C4B90CFB55B400E2776E /* SCNetworkConfiguration.h in Headers */, 1572C4BA0CFB55B400E2776E /* SCNetworkConfigurationInternal.h in Headers */, D61AAEB61522C9E60066B003 /* scprefs_observer.h in Headers */, + F97F9FC8202CBD600040BD50 /* SCNetworkInterfaceProvider.h in Headers */, 1572C4BB0CFB55B400E2776E /* SCNetwork.h in Headers */, 1572C4BC0CFB55B400E2776E /* SCNetworkConnection.h in Headers */, 1572C4BD0CFB55B400E2776E /* SCNetworkReachability.h in Headers */, @@ -3508,6 +3672,7 @@ 1572C4C00CFB55B400E2776E /* SCDynamicStoreCopyDHCPInfo.h in Headers */, 1572C4C50CFB55B400E2776E /* dy_framework.h in Headers */, 1572C4C70CFB55B400E2776E /* SCPreferencesPathKey.h in Headers */, + 158FC7801FDAE32A00B2493C /* SystemConfigurationInternal.h in Headers */, 1572C4CE0CFB55B400E2776E /* SCPreferencesSetSpecificPrivate.h in Headers */, C4CDB819163193AA00819B44 /* VPNFlow.h in Headers */, 1572C4CF0CFB55B400E2776E /* SCPreferencesGetSpecificPrivate.h in Headers */, @@ -3579,8 +3744,10 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 158FC77D1FDADA5E00B2493C /* libSystemConfiguration_internal.h in Headers */, 15732AD816EA6B6700F3AC4C /* dnsinfo.h in Headers */, 15732AD916EA6B6700F3AC4C /* network_information.h in Headers */, + 158FC78B1FDB187A00B2493C /* network_information_internal.h in Headers */, 15732ADA16EA6B6700F3AC4C /* dnsinfo_private.h in Headers */, 15732ADB16EA6B6700F3AC4C /* libSystemConfiguration_client.h in Headers */, ); @@ -3625,7 +3792,9 @@ buildActionMask = 2147483647; files = ( 157A84DA0D56C63900B6F1A0 /* dnsinfo.h in Headers */, + 158FC77C1FDADA5A00B2493C /* libSystemConfiguration_internal.h in Headers */, D661C2F21368BB720030B977 /* network_information.h in Headers */, + 158FC7791FDA31EA00B2493C /* network_config_agent_info_priv.h in Headers */, 157A84DB0D56C63900B6F1A0 /* dnsinfo_private.h in Headers */, 153338C014BE7978004FCE22 /* libSystemConfiguration_client.h in Headers */, 726DB2F61BEA80E5001B2C6C /* config_agent_info.h in Headers */, @@ -3645,10 +3814,9 @@ 15CB8F7C1EE4DD4300726685 /* dnsinfo_logging.h in Headers */, 157A84F60D56C7E800B6F1A0 /* dns-configuration.h in Headers */, 1596A7B514EDB73D00798C39 /* libSystemConfiguration_server.h in Headers */, - 720985451C580D9F00966D30 /* network_config_agent_info_priv.h in Headers */, 153ACCAC14E322D5005029A5 /* network_information_server.h in Headers */, 15CB8F731EE4DD0B00726685 /* network_state_information_logging.h in Headers */, - E4F211D4137B0ABD00BBB915 /* network_state_information_priv.h in Headers */, + 158FC7861FDAEF7400B2493C /* network_state_information_priv.h in Headers */, 720A4C0D1C585C9F007436B8 /* proxyAgent.h in Headers */, 1575FD2812CD15C60003D86E /* proxy-configuration.h in Headers */, 157A84F70D56C7E800B6F1A0 /* set-hostname.h in Headers */, @@ -3750,15 +3918,14 @@ 7280159C1BE1812B009F4F60 /* controller.h in Headers */, 7280159B1BE1812B009F4F60 /* configAgent.h in Headers */, 725CB7581BF514F2000C05A8 /* configAgentDefines.h in Headers */, + 158FC7851FDAEF6600B2493C /* network_state_information_priv.h in Headers */, 15D48EC00F67061700B4711E /* dnsinfo_create.h in Headers */, 15CB8F791EE4DD3B00726685 /* dnsinfo_logging.h in Headers */, 7280159D1BE1812B009F4F60 /* dnsAgent.h in Headers */, 155D223B0AF13A7300D52ED0 /* dns-configuration.h in Headers */, 1596A7B414EDB73D00798C39 /* libSystemConfiguration_server.h in Headers */, - 720985441C580D9F00966D30 /* network_config_agent_info_priv.h in Headers */, 153ACCAB14E322D5005029A5 /* network_information_server.h in Headers */, 15CB8F701EE4DCFC00726685 /* network_state_information_logging.h in Headers */, - E4F211D7137B0AF200BBB915 /* network_state_information_priv.h in Headers */, 7280159E1BE1812B009F4F60 /* proxyAgent.h in Headers */, 1575FD2A12CD15C60003D86E /* proxy-configuration.h in Headers */, 155D223C0AF13A7300D52ED0 /* set-hostname.h in Headers */, @@ -3834,6 +4001,7 @@ 15A5A1FD0D5B94190087BDA0 /* DHCPClientPreferences.h in Headers */, D61AAEB71522C9EF0066B003 /* scprefs_observer.h in Headers */, 15A5A1FE0D5B94190087BDA0 /* SCDynamicStoreCopyDHCPInfo.h in Headers */, + 158FC7811FDAE32E00B2493C /* SystemConfigurationInternal.h in Headers */, 727AF258191386E3009AB153 /* VPNTunnelPrivate.h in Headers */, 15A5A2030D5B94190087BDA0 /* dy_framework.h in Headers */, 15A5A2050D5B94190087BDA0 /* SCPreferencesPathKey.h in Headers */, @@ -3872,10 +4040,13 @@ buildActionMask = 2147483647; files = ( 15DAD5E1075913CE0084A6ED /* dnsinfo.h in Headers */, + 158FC77B1FDADA5400B2493C /* libSystemConfiguration_internal.h in Headers */, D661C2EF1368BB280030B977 /* network_information.h in Headers */, + 158FC7781FDA31E000B2493C /* network_config_agent_info_priv.h in Headers */, 15DAD5E2075913CE0084A6ED /* dnsinfo_private.h in Headers */, 153338BF14BE7978004FCE22 /* libSystemConfiguration_client.h in Headers */, 728CEB001BEA993100F13F92 /* config_agent_info.h in Headers */, + 158FC7891FDB186100B2493C /* network_information_internal.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3905,6 +4076,7 @@ 15DAD65107591A1A0084A6ED /* SCPreferencesSetSpecific.h in Headers */, 15DAD65207591A1A0084A6ED /* SCNetworkConfiguration.h in Headers */, D61AAEB51522C9D00066B003 /* scprefs_observer.h in Headers */, + F97F9FC7202CBD5A0040BD50 /* SCNetworkInterfaceProvider.h in Headers */, 15DAD65307591A1A0084A6ED /* SCNetworkConfigurationInternal.h in Headers */, F9B7AE66186211BE00C78D18 /* IPMonitorControlPrivate.h in Headers */, 15DAD65407591A1A0084A6ED /* SCNetwork.h in Headers */, @@ -3913,6 +4085,7 @@ 15DAD65607591A1A0084A6ED /* SCNetworkReachability.h in Headers */, F9B7AE6D186211EA00C78D18 /* symbol_scope.h in Headers */, 15DAD65707591A1A0084A6ED /* SCValidation.h in Headers */, + 158FC77F1FDAE32600B2493C /* SystemConfigurationInternal.h in Headers */, 15DAD65807591A1A0084A6ED /* DHCPClientPreferences.h in Headers */, 15DAD65907591A1A0084A6ED /* SCDynamicStoreCopyDHCPInfo.h in Headers */, 15DAD65E07591A1A0084A6ED /* dy_framework.h in Headers */, @@ -3948,9 +4121,9 @@ 15CB8F7F1EE4DD4B00726685 /* dnsinfo_logging.h in Headers */, 15E1B04316EBAE3C00E5F06F /* dns-configuration.h in Headers */, 15E1B04916EBAE3C00E5F06F /* libSystemConfiguration_server.h in Headers */, + 158FC7871FDAEF7900B2493C /* network_state_information_priv.h in Headers */, 15E1B04816EBAE3C00E5F06F /* network_information_server.h in Headers */, 15CB8F761EE4DD1600726685 /* network_state_information_logging.h in Headers */, - 15E1B04516EBAE3C00E5F06F /* network_state_information_priv.h in Headers */, 15E1B04616EBAE3C00E5F06F /* proxy-configuration.h in Headers */, 1581BCD81E2867BA00F69B1E /* IPMonitorControlPrefs.h in Headers */, 153E16A71EE5008F0027698E /* SCNetworkReachabilityInternal.h in Headers */, @@ -3962,6 +4135,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 158FC78E1FDB567500B2493C /* liblog_SystemConfiguration_internal.h in Headers */, 15CB8F7D1EE4DD4600726685 /* dnsinfo_logging.h in Headers */, 15CB8F741EE4DD1000726685 /* network_state_information_logging.h in Headers */, 15CB8F871EE4DE3000726685 /* SCNetworkReachabilityLogging.h in Headers */, @@ -3972,6 +4146,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 158FC78F1FDB567900B2493C /* liblog_SystemConfiguration_internal.h in Headers */, 15CB8F801EE4DD4D00726685 /* dnsinfo_logging.h in Headers */, 15CB8F781EE4DD1B00726685 /* network_state_information_logging.h in Headers */, 15CB8F891EE4DE3600726685 /* SCNetworkReachabilityLogging.h in Headers */, @@ -4163,7 +4338,7 @@ buildConfigurationList = 1572C5290CFB55B400E2776E /* Build configuration list for PBXNativeTarget "SystemConfiguration.framework-Embedded" */; buildPhases = ( 1572C4A80CFB55B400E2776E /* Headers */, - 153393E40D34999D00FE74E7 /* Update Headers */, + 153393E40D34999D00FE74E7 /* Restore temporary headers */, 1572C4DE0CFB55B400E2776E /* Sources */, 1572C5230CFB55B400E2776E /* Frameworks */, 1513C35C1F186BF90022398F /* Update "install_path" for address|thread sanitizers */, @@ -4303,6 +4478,7 @@ buildPhases = ( 157A84F50D56C7E800B6F1A0 /* Headers */, 157A84F90D56C7E800B6F1A0 /* Sources */, + F999388720FE546D005EE20D /* CopyFiles */, ); buildRules = ( ); @@ -4501,7 +4677,7 @@ 1583379F0CFB6B9E0033AB93 /* Frameworks */, 1513C35D1F186C0B0022398F /* Update "install_path" for address|thread sanitizers */, 158337A40CFB6B9E0033AB93 /* CopyFiles */, - 1595B4B81B0C02FA0087944E /* Update SCHelper launchd .plist */, + 1595B4B81B0C02FA0087944E /* Rename/update SCHelper launchd .plist */, ); buildRules = ( ); @@ -4620,7 +4796,7 @@ buildConfigurationList = 15A5A2660D5B94190087BDA0 /* Build configuration list for PBXNativeTarget "SystemConfiguration.framework-EmbeddedSimulator" */; buildPhases = ( 15A5A1E60D5B94190087BDA0 /* Headers */, - 15A5A2170D5B94190087BDA0 /* Update Headers */, + 15A5A2170D5B94190087BDA0 /* Restore temporary headers */, 15A5A21D0D5B94190087BDA0 /* Sources */, 15A5A2620D5B94190087BDA0 /* Frameworks */, 15A5A2180D5B94190087BDA0 /* Resources */, @@ -4694,7 +4870,6 @@ buildPhases = ( 15DAD6AC07591A1A0084A6ED /* SystemConfiguration.order */, 15DAD64107591A1A0084A6ED /* Headers */, - 15AC82480D376E2400A579D0 /* Update Headers */, 15DAD66C07591A1A0084A6ED /* Sources */, 15DAD6AD07591A1A0084A6ED /* Frameworks */, 15A66BB11F18177100F7253B /* Update "install_path" for address|thread sanitizers */, @@ -4920,13 +5095,30 @@ productReference = 72D3E6691AE6EAF600DB4C69 /* SCTest-ObjC */; productType = "com.apple.product-type.tool"; }; + C4666C70206ED01800247AB6 /* SystemConfigurationEventFactory */ = { + isa = PBXNativeTarget; + buildConfigurationList = C4666C77206ED01800247AB6 /* Build configuration list for PBXNativeTarget "SystemConfigurationEventFactory" */; + buildPhases = ( + C4666C6D206ED01800247AB6 /* Sources */, + C4666C6E206ED01800247AB6 /* Frameworks */, + C4666C6F206ED01800247AB6 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SystemConfigurationEventFactory; + productName = SCEventFactory; + productReference = C4666C71206ED01800247AB6 /* SystemConfigurationEventFactory.bundle */; + productType = "com.apple.product-type.bundle"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 15CB6A7705C0722B0099E85F /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0930; TargetAttributes = { 72573D251D667372004975AD = { CreatedOnToolsVersion = 8.0; @@ -4938,6 +5130,10 @@ 72D3E6681AE6EAF600DB4C69 = { CreatedOnToolsVersion = 7.0; }; + C4666C70206ED01800247AB6 = { + CreatedOnToolsVersion = 10.0; + ProvisioningStyle = Automatic; + }; }; }; buildConfigurationList = 156EB63E0905594A00EEF749 /* Build configuration list for PBXProject "configd" */; @@ -4981,6 +5177,7 @@ 155847430754FDCD0046C2E9 /* scutil */, 72573D251D667372004975AD /* sctest */, 151F5D990CCE98E50093AC3B /* SCMonitor */, + C4666C70206ED01800247AB6 /* SystemConfigurationEventFactory */, 151C1CC60CFB487000C5AFD6 /* All-Embedded */, 15C64A280F684C6B00D78394 /* configd_libSystem-Embedded */, 157A84D80D56C63900B6F1A0 /* libsystem_configuration-Embedded */, @@ -5168,6 +5365,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + C4666C6F206ED01800247AB6 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -5413,20 +5617,20 @@ shellPath = /bin/sh; shellScript = "echo ${BUILT_PRODUCTS_DIR}\ncc -o ${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME} ${SRCROOT}/SystemConfiguration.fproj/genSCPreferences.c || exit 1\n${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME} header > ${BUILT_PRODUCTS_DIR}/SCSchemaDefinitions.h || exit 1\n${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME} private > ${BUILT_PRODUCTS_DIR}/SCSchemaDefinitionsPrivate.h || exit 1\n${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME} cfile > ${BUILT_PRODUCTS_DIR}/SCSchemaDefinitions.c || exit 1\nexit 0"; }; - 153393E40D34999D00FE74E7 /* Update Headers */ = { + 153393E40D34999D00FE74E7 /* Restore temporary headers */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "$(SRCROOT)/SystemConfiguration.fproj/update-headers", + "$(SRCROOT)/SystemConfiguration.fproj/restore-temporary-headers", ); - name = "Update Headers"; + name = "Restore temporary headers"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n\t${SCRIPT_INPUT_FILE_0} split\nfi"; + shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n ${SCRIPT_INPUT_FILE_0}\nfi\n"; showEnvVarsInLog = 0; }; 1535FEDC1B0FDDCD00B2A3AD /* Add framework symlink (TEMPORARY) */ = { @@ -5489,35 +5693,35 @@ shellScript = "mkdir -p \"${DSTROOT}/usr/local/bin\"\nln -fs \"${INSTALL_PATH}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/get-mobility-info\" \"${DSTROOT}/usr/local/bin/\"\n"; showEnvVarsInLog = 0; }; - 1595B4B81B0C02FA0087944E /* Update SCHelper launchd .plist */ = { + 1595B4B81B0C02FA0087944E /* Rename/update SCHelper launchd .plist */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 8; files = ( ); inputPaths = ( ); - name = "Update SCHelper launchd .plist"; + name = "Rename/update SCHelper launchd .plist"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; - shellScript = "SCHELPER_LAUNCHD_PLIST=\"${DSTROOT}/System/Library/LaunchDaemons/com.apple.SCHelper-embedded.plist\"\n\nif [ -e \"${SCHELPER_LAUNCHD_PLIST}\" ]; then\n /usr/bin/plutil -replace Program -string \"${INSTALL_PATH}/SCHelper\" \"${SCHELPER_LAUNCHD_PLIST}\"\n /usr/bin/plutil -convert binary1 \"${SCHELPER_LAUNCHD_PLIST}\"\nfi"; + shellScript = "SCHELPER_LAUNCHD_PLIST_EMBEDDED=\"${DSTROOT}/System/Library/LaunchDaemons/com.apple.SCHelper-embedded.plist\"\nSCHELPER_LAUNCHD_PLIST=\"${DSTROOT}/System/Library/LaunchDaemons/com.apple.SCHelper.plist\"\n\nif [ -e \"${SCHELPER_LAUNCHD_PLIST_EMBEDDED}\" ]; then\n mv \"${SCHELPER_LAUNCHD_PLIST_EMBEDDED}\" \"${SCHELPER_LAUNCHD_PLIST}\"\nfi\n\nif [ -e \"${SCHELPER_LAUNCHD_PLIST}\" ]; then\n /usr/bin/plutil -replace Program -string \"${INSTALL_PATH}/SCHelper\" \"${SCHELPER_LAUNCHD_PLIST}\"\n /usr/bin/plutil -convert binary1 \"${SCHELPER_LAUNCHD_PLIST}\"\nfi"; showEnvVarsInLog = 0; }; - 15A5A2170D5B94190087BDA0 /* Update Headers */ = { + 15A5A2170D5B94190087BDA0 /* Restore temporary headers */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "$(SRCROOT)/SystemConfiguration.fproj/update-headers", + "$(SRCROOT)/SystemConfiguration.fproj/restore-temporary-headers", ); - name = "Update Headers"; + name = "Restore temporary headers"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n\t${SCRIPT_INPUT_FILE_0} split\nfi"; + shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n ${SCRIPT_INPUT_FILE_0}\nfi\n"; showEnvVarsInLog = 0; }; 15A66BB11F18177100F7253B /* Update "install_path" for address|thread sanitizers */ = { @@ -5550,22 +5754,6 @@ shellScript = "${SRCROOT}/update-sanitizer-dylib-references"; showEnvVarsInLog = 0; }; - 15AC82480D376E2400A579D0 /* Update Headers */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(SRCROOT)/SystemConfiguration.fproj/update-headers", - ); - name = "Update Headers"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if [ -x ${SCRIPT_INPUT_FILE_0} ]; then\n\t${SCRIPT_INPUT_FILE_0} clean\nfi\n"; - showEnvVarsInLog = 0; - }; 15AC9A4C1BE3ED87003071BD /* Move libsystem_configuration_(asan|tsan).dylib */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 8; @@ -5804,11 +5992,11 @@ 1572C5000CFB55B400E2776E /* SCPSet.c in Sources */, 1572C5010CFB55B400E2776E /* SCPRemove.c in Sources */, 1572C5020CFB55B400E2776E /* SCPCommit.c in Sources */, + F97F9FC9202CBD710040BD50 /* SCNetworkInterfaceProvider.c in Sources */, 1572C5040CFB55B400E2776E /* SCPPath.c in Sources */, 1572C5030CFB55B400E2776E /* SCPApply.c in Sources */, 1572C5060CFB55B400E2776E /* SCDHostName.c in Sources */, 1572C5070CFB55B400E2776E /* SCLocation.c in Sources */, - 1572C5080CFB55B400E2776E /* SCNetwork.c in Sources */, 1572C50A0CFB55B400E2776E /* SCNetworkConnection.c in Sources */, 1572C50B0CFB55B400E2776E /* SCNetworkConnectionPrivate.c in Sources */, 1572C50C0CFB55B400E2776E /* SCNetworkReachability.c in Sources */, @@ -5967,6 +6155,8 @@ 1596A7B214EDB73D00798C39 /* libSystemConfiguration_server.c in Sources */, D61AAEB11522C99C0066B003 /* scprefs_observer.c in Sources */, F9A3781116A4849100C57CDC /* IPMonitorControlPrefs.c in Sources */, + F9D7304C20DDBEAB00521181 /* IPMonitorAWDReport.m in Sources */, + F9D7304B20DDBE9900521181 /* AWDIPMonitorInterfaceAdvisoryReport.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -6094,6 +6284,8 @@ D61AAEAF1522C99C0066B003 /* scprefs_observer.c in Sources */, F9A3781016A4847700C57CDC /* IPMonitorControlPrefs.c in Sources */, F9B7AE6A186211D300C78D18 /* IPMonitorControlServer.c in Sources */, + F9D7305320E4211900521181 /* IPMonitorAWDReport.m in Sources */, + F9D7305220E4211900521181 /* AWDIPMonitorInterfaceAdvisoryReport.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -6188,7 +6380,6 @@ 15A5A2430D5B94190087BDA0 /* SCPPath.c in Sources */, 15A5A2450D5B94190087BDA0 /* SCDHostName.c in Sources */, 15A5A2460D5B94190087BDA0 /* SCLocation.c in Sources */, - 15A5A2470D5B94190087BDA0 /* SCNetwork.c in Sources */, 15A5A2490D5B94190087BDA0 /* SCNetworkConnection.c in Sources */, 15A5A24A0D5B94190087BDA0 /* SCNetworkConnectionPrivate.c in Sources */, 15A5A24B0D5B94190087BDA0 /* SCNetworkReachability.c in Sources */, @@ -6300,6 +6491,7 @@ 15DAD6A707591A1A0084A6ED /* SCNetworkInterface.c in Sources */, 15DAD6A807591A1A0084A6ED /* SCNetworkProtocol.c in Sources */, 15DAD6A907591A1A0084A6ED /* SCNetworkService.c in Sources */, + F9AF76C1202CCD86008D3BEB /* SCNetworkInterfaceProvider.c in Sources */, 15DAD6AA07591A1A0084A6ED /* SCNetworkSet.c in Sources */, 55A3DB9E183C2AD900ED3DB7 /* SCNetworkMigration.c in Sources */, 15DAD6AB07591A1A0084A6ED /* BondConfiguration.c in Sources */, @@ -6398,6 +6590,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + C4666C6D206ED01800247AB6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C4666C7A206ED27800247AB6 /* EventFactory.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -6746,6 +6946,11 @@ target = 155847430754FDCD0046C2E9 /* scutil */; targetProxy = 72C4A47F1BE44D19009D570E /* PBXContainerItemProxy */; }; + C453EED22086992B00BF504E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = C4666C70206ED01800247AB6 /* SystemConfigurationEventFactory */; + targetProxy = C453EED12086992B00BF504E /* PBXContainerItemProxy */; + }; D6DDAC3D147A24BC00A2E902 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 1547001808455B98006787CE /* SCHelper */; @@ -6806,13 +7011,16 @@ GENERATE_PROFILING_CODE_profile = YES; INSTALLHDRS_COPY_PHASE = YES; INSTALL_PATH = /usr/lib/log; + IS_ZIPPERED = YES; OTHER_CFLAGS_debug = "-O0"; + OTHER_TAPI_FLAGS = "$(inherited) --extra-private-header=$(PROJECT_DIR)/logging/liblog_SystemConfiguration_internal.h"; PRODUCT_NAME = SystemConfiguration; STRIP_INSTALLED_PRODUCT_asan = NO; STRIP_INSTALLED_PRODUCT_debug = NO; STRIP_INSTALLED_PRODUCT_normal = YES; STRIP_INSTALLED_PRODUCT_profile = NO; STRIP_INSTALLED_PRODUCT_tsan = NO; + VERSION_INFO_PREFIX = liblog_; }; name = Debug; }; @@ -6825,13 +7033,16 @@ GENERATE_PROFILING_CODE_profile = YES; INSTALLHDRS_COPY_PHASE = YES; INSTALL_PATH = /usr/lib/log; + IS_ZIPPERED = YES; OTHER_CFLAGS_debug = "-O0"; + OTHER_TAPI_FLAGS = "$(inherited) --extra-private-header=$(PROJECT_DIR)/logging/liblog_SystemConfiguration_internal.h"; PRODUCT_NAME = SystemConfiguration; STRIP_INSTALLED_PRODUCT_asan = NO; STRIP_INSTALLED_PRODUCT_debug = NO; STRIP_INSTALLED_PRODUCT_normal = YES; STRIP_INSTALLED_PRODUCT_profile = NO; STRIP_INSTALLED_PRODUCT_tsan = NO; + VERSION_INFO_PREFIX = liblog_; }; name = Release; }; @@ -6997,7 +7208,7 @@ 155F49A01C864F5400E47D08 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - INFOPLIST_FILE = Plugins/QoSMarking/Info.plist; + INFOPLIST_FILE = "Plugins/QoSMarking/Info-Embedded.plist"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.QoSMarking; PRODUCT_NAME = QoSMarking; @@ -7009,7 +7220,7 @@ 155F49A11C864F5400E47D08 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - INFOPLIST_FILE = Plugins/QoSMarking/Info.plist; + INFOPLIST_FILE = "Plugins/QoSMarking/Info-Embedded.plist"; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/SystemConfiguration"; PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration.QoSMarking; PRODUCT_NAME = QoSMarking; @@ -7047,6 +7258,7 @@ HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALLHDRS_COPY_PHASE = YES; INSTALL_PATH = /usr/lib/system; + IS_ZIPPERED = YES; LINK_WITH_STANDARD_LIBRARIES = NO; OTHER_CFLAGS_debug = "-O0"; OTHER_LDFLAGS = ( @@ -7082,6 +7294,7 @@ "OTHER_LDFLAGS_tsan[sdk=tvossimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_tvosossim_dynamic"; "OTHER_LDFLAGS_tsan[sdk=watchos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_watchos_dynamic"; "OTHER_LDFLAGS_tsan[sdk=watchsimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_watchossim_dynamic"; + OTHER_TAPI_FLAGS = "$(inherited) -umbrella System --extra-private-header=$(PROJECT_DIR)/libSystemConfiguration/libSystemConfiguration_internal.h --extra-private-header=$(PROJECT_DIR)/nwi/network_information_internal.h --extra-private-header=$(PROJECT_DIR)/nwi/network_config_agent_info_priv.h"; PRODUCT_NAME = libsystem_configuration; STRIP_INSTALLED_PRODUCT_asan = NO; STRIP_INSTALLED_PRODUCT_debug = NO; @@ -7104,6 +7317,7 @@ HEADER_SEARCH_PATHS = "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders"; INSTALLHDRS_COPY_PHASE = YES; INSTALL_PATH = /usr/lib/system; + IS_ZIPPERED = YES; LINK_WITH_STANDARD_LIBRARIES = NO; OTHER_CFLAGS_debug = "-O0"; OTHER_LDFLAGS = ( @@ -7139,6 +7353,7 @@ "OTHER_LDFLAGS_tsan[sdk=tvossimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_tvosossim_dynamic"; "OTHER_LDFLAGS_tsan[sdk=watchos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_watchos_dynamic"; "OTHER_LDFLAGS_tsan[sdk=watchsimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_watchossim_dynamic"; + OTHER_TAPI_FLAGS = "$(inherited) -umbrella System --extra-private-header=$(PROJECT_DIR)/libSystemConfiguration/libSystemConfiguration_internal.h --extra-private-header=$(PROJECT_DIR)/nwi/network_information_internal.h --extra-private-header=$(PROJECT_DIR)/nwi/network_config_agent_info_priv.h"; PRODUCT_NAME = libsystem_configuration; STRIP_INSTALLED_PRODUCT_asan = NO; STRIP_INSTALLED_PRODUCT_debug = NO; @@ -7163,13 +7378,18 @@ INFOPLIST_FILE = SystemConfiguration.fproj/Info.plist; INSTALLHDRS_SCRIPT_PHASE = YES; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(SYMROOT)"; + IS_ZIPPERED = YES; + LIBRARY_SEARCH_PATHS = ( + "$(SYMROOT)", + "$(SDKROOT)/usr/local/lib", + ); MODULEMAP_FILE = SystemConfiguration.fproj/Modules/sc_modules.modulemap; OTHER_CFLAGS = ( "$(inherited)", "-DSC_LOG_OR_PRINT", ); OTHER_CFLAGS_debug = "-O0"; + OTHER_TAPI_FLAGS = "$(inherited) -DEXCLUDE_VPN_TUNNEL_PLUGIN_FUNCTIONS -I$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders --extra-private-header=$(PROJECT_DIR)/SystemConfiguration.fproj/SystemConfigurationInternal.h --extra-private-header=$(PROJECT_DIR)/SystemConfiguration.fproj/SCDynamicStoreInternal.h"; PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration; PRODUCT_NAME = SystemConfiguration; WRAPPER_EXTENSION = framework; @@ -7191,13 +7411,18 @@ INFOPLIST_FILE = SystemConfiguration.fproj/Info.plist; INSTALLHDRS_SCRIPT_PHASE = YES; INSTALL_PATH = "$(SYSTEM_LIBRARY_DIR)/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(SYMROOT)"; + IS_ZIPPERED = YES; + LIBRARY_SEARCH_PATHS = ( + "$(SYMROOT)", + "$(SDKROOT)/usr/local/lib", + ); MODULEMAP_FILE = SystemConfiguration.fproj/Modules/sc_modules.modulemap; OTHER_CFLAGS = ( "$(inherited)", "-DSC_LOG_OR_PRINT", ); OTHER_CFLAGS_debug = "-O0"; + OTHER_TAPI_FLAGS = "$(inherited) -DEXCLUDE_VPN_TUNNEL_PLUGIN_FUNCTIONS -I$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders --extra-private-header=$(PROJECT_DIR)/SystemConfiguration.fproj/SystemConfigurationInternal.h --extra-private-header=$(PROJECT_DIR)/SystemConfiguration.fproj/SCDynamicStoreInternal.h"; PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration; PRODUCT_NAME = SystemConfiguration; SECTORDER_FLAGS = ( @@ -7635,13 +7860,18 @@ "${EXTRA_BUILD_VARIANT}", ); CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; @@ -7661,6 +7891,7 @@ "$(inherited)", "DEBUG=1", ); + GCC_TREAT_WARNINGS_AS_ERRORS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -7691,6 +7922,8 @@ RUN_CLANG_STATIC_ANALYZER = YES; SDKROOT = macosx.internal; SUPPORTED_PLATFORMS = macosx; + SUPPORTS_TEXT_BASED_API = YES; + TAPI_VERIFY_MODE = ErrorsAndWarnings; VERSIONING_SYSTEM = "apple-generic"; WARNING_CFLAGS = ( "-Wall", @@ -7713,13 +7946,18 @@ "${EXTRA_BUILD_VARIANT}", ); CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; @@ -7761,7 +7999,9 @@ PLIST_FILE_OUTPUT_FORMAT = binary; SDKROOT = macosx.internal; SUPPORTED_PLATFORMS = macosx; + SUPPORTS_TEXT_BASED_API = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TAPI_VERIFY_MODE = ErrorsAndWarnings; VERSIONING_SYSTEM = "apple-generic"; WARNING_CFLAGS = ( "-Wall", @@ -7788,17 +8028,23 @@ "INSTALL_PATH[sdk=appletv*]" = "$(SYSTEM_LIBRARY_DIR)/Frameworks"; "INSTALL_PATH[sdk=iphone*]" = "$(SYSTEM_LIBRARY_DIR)/Frameworks"; "INSTALL_PATH[sdk=watch*]" = "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; - LIBRARY_SEARCH_PATHS = "$(SYMROOT)"; + IS_ZIPPERED = YES; + LIBRARY_SEARCH_PATHS = ( + "$(SYMROOT)", + "$(SDKROOT)/usr/local/lib", + ); MODULEMAP_FILE = SystemConfiguration.fproj/Modules/sc_modules.modulemap; OTHER_CFLAGS = ( "$(inherited)", "-DSC_LOG_OR_PRINT", ); + OTHER_TAPI_FLAGS = "$(inherited) -DEXCLUDE_VPN_TUNNEL_PLUGIN_FUNCTIONS --extra-private-header=$(PROJECT_DIR)/SystemConfiguration.fproj/SystemConfigurationInternal.h --extra-private-header=$(PROJECT_DIR)/SystemConfiguration.fproj/SCDynamicStoreInternal.h -DNO_TAPI_WARNINGS"; PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration; PRODUCT_NAME = SystemConfiguration; SDKROOT = iphoneos.internal; SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=appletv*]" = NO; + "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=bridge*]" = NO; "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=iphone*]" = NO; "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=watch*]" = YES; WRAPPER_EXTENSION = framework; @@ -7818,17 +8064,23 @@ "INSTALL_PATH[sdk=appletv*]" = "$(SYSTEM_LIBRARY_DIR)/Frameworks"; "INSTALL_PATH[sdk=iphone*]" = "$(SYSTEM_LIBRARY_DIR)/Frameworks"; "INSTALL_PATH[sdk=watch*]" = "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; - LIBRARY_SEARCH_PATHS = "$(SYMROOT)"; + IS_ZIPPERED = YES; + LIBRARY_SEARCH_PATHS = ( + "$(SYMROOT)", + "$(SDKROOT)/usr/local/lib", + ); MODULEMAP_FILE = SystemConfiguration.fproj/Modules/sc_modules.modulemap; OTHER_CFLAGS = ( "$(inherited)", "-DSC_LOG_OR_PRINT", ); + OTHER_TAPI_FLAGS = "$(inherited) -DEXCLUDE_VPN_TUNNEL_PLUGIN_FUNCTIONS --extra-private-header=$(PROJECT_DIR)/SystemConfiguration.fproj/SystemConfigurationInternal.h --extra-private-header=$(PROJECT_DIR)/SystemConfiguration.fproj/SCDynamicStoreInternal.h -DNO_TAPI_WARNINGS"; PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration; PRODUCT_NAME = SystemConfiguration; SDKROOT = iphoneos.internal; SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=appletv*]" = NO; + "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=bridge*]" = NO; "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=iphone*]" = NO; "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=watch*]" = YES; WRAPPER_EXTENSION = framework; @@ -7923,6 +8175,7 @@ GENERATE_PROFILING_CODE_profile = YES; INSTALLHDRS_COPY_PHASE = YES; INSTALL_PATH = /usr/lib/system; + IS_ZIPPERED = YES; LINK_WITH_STANDARD_LIBRARIES = NO; OTHER_LDFLAGS = ( "-Wl,-umbrella,System", @@ -7941,6 +8194,7 @@ "-lsystem_trace", "-lxpc", ); + OTHER_TAPI_FLAGS = "$(inherited) -umbrella System --extra-private-header=$(PROJECT_DIR)/libSystemConfiguration/libSystemConfiguration_internal.h --extra-private-header=$(PROJECT_DIR)/nwi/network_information_internal.h"; PRIVATE_HEADERS_FOLDER_PATH = /usr/local/include; PRODUCT_NAME = libsystem_configuration; PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include; @@ -7958,6 +8212,7 @@ GENERATE_PROFILING_CODE_profile = YES; INSTALLHDRS_COPY_PHASE = YES; INSTALL_PATH = /usr/lib/system; + IS_ZIPPERED = YES; LINK_WITH_STANDARD_LIBRARIES = NO; OTHER_LDFLAGS = ( "-Wl,-umbrella,System", @@ -7976,6 +8231,7 @@ "-lsystem_trace", "-lxpc", ); + OTHER_TAPI_FLAGS = "$(inherited) -umbrella System --extra-private-header=$(PROJECT_DIR)/libSystemConfiguration/libSystemConfiguration_internal.h --extra-private-header=$(PROJECT_DIR)/nwi/network_information_internal.h"; PRIVATE_HEADERS_FOLDER_PATH = /usr/local/include; PRODUCT_NAME = libsystem_configuration; PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include; @@ -8052,6 +8308,7 @@ INSTALL_PATH = /usr/lib/system; INSTALL_PATH_asan = /usr/local/lib; INSTALL_PATH_tsan = /usr/local/lib; + IS_ZIPPERED = YES; LINK_WITH_STANDARD_LIBRARIES = NO; OTHER_LDFLAGS = ( "-Wl,-umbrella,System", @@ -8087,6 +8344,7 @@ "OTHER_LDFLAGS_tsan[sdk=tvossimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_tvosossim_dynamic"; "OTHER_LDFLAGS_tsan[sdk=watchos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_watchos_dynamic"; "OTHER_LDFLAGS_tsan[sdk=watchsimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_watchossim_dynamic"; + OTHER_TAPI_FLAGS = "$(inherited) -umbrella System --extra-private-header=$(PROJECT_DIR)/libSystemConfiguration/libSystemConfiguration_internal.h --extra-private-header=$(PROJECT_DIR)/nwi/network_information_internal.h --extra-private-header=$(PROJECT_DIR)/nwi/network_config_agent_info_priv.h"; PRODUCT_NAME = libsystem_configuration; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT_asan = NO; @@ -8105,6 +8363,7 @@ INSTALL_PATH = /usr/lib/system; INSTALL_PATH_asan = /usr/local/lib; INSTALL_PATH_tsan = /usr/local/lib; + IS_ZIPPERED = YES; LINK_WITH_STANDARD_LIBRARIES = NO; OTHER_LDFLAGS = ( "-Wl,-umbrella,System", @@ -8140,6 +8399,7 @@ "OTHER_LDFLAGS_tsan[sdk=tvossimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_tvosossim_dynamic"; "OTHER_LDFLAGS_tsan[sdk=watchos*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_watchos_dynamic"; "OTHER_LDFLAGS_tsan[sdk=watchsimulator*]" = "$(inherited) -L/usr/local/lib/sanitizers -lclang_rt.tsan_watchossim_dynamic"; + OTHER_TAPI_FLAGS = "$(inherited) -umbrella System --extra-private-header=$(PROJECT_DIR)/libSystemConfiguration/libSystemConfiguration_internal.h --extra-private-header=$(PROJECT_DIR)/nwi/network_information_internal.h --extra-private-header=$(PROJECT_DIR)/nwi/network_config_agent_info_priv.h"; PRODUCT_NAME = libsystem_configuration; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT_asan = NO; @@ -8593,7 +8853,11 @@ "INSTALL_PATH[sdk=appletv*]" = "$(SYSTEM_LIBRARY_DIR)/Frameworks"; "INSTALL_PATH[sdk=iphone*]" = "$(SYSTEM_LIBRARY_DIR)/Frameworks"; "INSTALL_PATH[sdk=watch*]" = "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; - LIBRARY_SEARCH_PATHS = "$(SYMROOT)"; + IS_ZIPPERED = YES; + LIBRARY_SEARCH_PATHS = ( + "$(SYMROOT)", + "$(SDKROOT)/usr/local/lib", + ); MODULEMAP_FILE = SystemConfiguration.fproj/Modules/sc_modules.modulemap; OTHER_CFLAGS = ( "$(inherited)", @@ -8601,11 +8865,13 @@ "$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders", "-DSC_LOG_OR_PRINT", ); + OTHER_TAPI_FLAGS = "$(inherited) -DEXCLUDE_VPN_TUNNEL_PLUGIN_FUNCTIONS --extra-private-header=$(PROJECT_DIR)/SystemConfiguration.fproj/SystemConfigurationInternal.h --extra-private-header=$(PROJECT_DIR)/SystemConfiguration.fproj/SCDynamicStoreInternal.h -DNO_TAPI_WARNINGS"; PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration; PRODUCT_NAME = SystemConfiguration; SDKROOT = iphoneos.internal; SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=appletv*]" = NO; + "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=bridge*]" = NO; "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=iphone*]" = NO; "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=watch*]" = YES; WRAPPER_EXTENSION = framework; @@ -8626,7 +8892,11 @@ "INSTALL_PATH[sdk=appletv*]" = "$(SYSTEM_LIBRARY_DIR)/Frameworks"; "INSTALL_PATH[sdk=iphone*]" = "$(SYSTEM_LIBRARY_DIR)/Frameworks"; "INSTALL_PATH[sdk=watch*]" = "$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks"; - LIBRARY_SEARCH_PATHS = "$(SYMROOT)"; + IS_ZIPPERED = YES; + LIBRARY_SEARCH_PATHS = ( + "$(SYMROOT)", + "$(SDKROOT)/usr/local/lib", + ); MODULEMAP_FILE = SystemConfiguration.fproj/Modules/sc_modules.modulemap; OTHER_CFLAGS = ( "$(inherited)", @@ -8634,11 +8904,13 @@ "$(SYSTEM_LIBRARY_DIR)/Frameworks/System.framework/PrivateHeaders", "-DSC_LOG_OR_PRINT", ); + OTHER_TAPI_FLAGS = "$(inherited) -DEXCLUDE_VPN_TUNNEL_PLUGIN_FUNCTIONS --extra-private-header=$(PROJECT_DIR)/SystemConfiguration.fproj/SystemConfigurationInternal.h --extra-private-header=$(PROJECT_DIR)/SystemConfiguration.fproj/SCDynamicStoreInternal.h -DNO_TAPI_WARNINGS"; PRODUCT_BUNDLE_IDENTIFIER = com.apple.SystemConfiguration; PRODUCT_NAME = SystemConfiguration; SDKROOT = iphoneos.internal; SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=appletv*]" = NO; + "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=bridge*]" = NO; "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=iphone*]" = NO; "USING_PRIVATE_SYSTEMCONFIGURATION_FRAMEWORK[sdk=watch*]" = YES; WRAPPER_EXTENSION = framework; @@ -8826,7 +9098,9 @@ GENERATE_PROFILING_CODE_profile = YES; INSTALLHDRS_COPY_PHASE = YES; INSTALL_PATH = /usr/lib/log; + IS_ZIPPERED = YES; OTHER_CFLAGS_debug = "-O0"; + OTHER_TAPI_FLAGS = "$(inherited) --extra-private-header=$(PROJECT_DIR)/logging/liblog_SystemConfiguration_internal.h"; PRODUCT_NAME = SystemConfiguration; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT_asan = NO; @@ -8835,6 +9109,7 @@ STRIP_INSTALLED_PRODUCT_profile = NO; STRIP_INSTALLED_PRODUCT_tsan = NO; SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; + VERSION_INFO_PREFIX = liblog_; }; name = Debug; }; @@ -8847,7 +9122,9 @@ GENERATE_PROFILING_CODE_profile = YES; INSTALLHDRS_COPY_PHASE = YES; INSTALL_PATH = /usr/lib/log; + IS_ZIPPERED = YES; OTHER_CFLAGS_debug = "-O0"; + OTHER_TAPI_FLAGS = "$(inherited) --extra-private-header=$(PROJECT_DIR)/logging/liblog_SystemConfiguration_internal.h"; PRODUCT_NAME = SystemConfiguration; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT_asan = NO; @@ -8856,6 +9133,7 @@ STRIP_INSTALLED_PRODUCT_profile = NO; STRIP_INSTALLED_PRODUCT_tsan = NO; SUPPORTED_PLATFORMS = "iphoneos tvos watchos bridgeos"; + VERSION_INFO_PREFIX = liblog_; }; name = Release; }; @@ -8868,7 +9146,9 @@ GENERATE_PROFILING_CODE_profile = YES; INSTALLHDRS_COPY_PHASE = YES; INSTALL_PATH = /usr/lib/log; + IS_ZIPPERED = YES; OTHER_CFLAGS_debug = "-O0"; + OTHER_TAPI_FLAGS = "$(inherited) --extra-private-header=$(PROJECT_DIR)/logging/liblog_SystemConfiguration_internal.h"; PRODUCT_NAME = SystemConfiguration; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT_asan = NO; @@ -8877,6 +9157,7 @@ STRIP_INSTALLED_PRODUCT_profile = NO; STRIP_INSTALLED_PRODUCT_tsan = NO; SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; + VERSION_INFO_PREFIX = liblog_; }; name = Debug; }; @@ -8889,7 +9170,9 @@ GENERATE_PROFILING_CODE_profile = YES; INSTALLHDRS_COPY_PHASE = YES; INSTALL_PATH = /usr/lib/log; + IS_ZIPPERED = YES; OTHER_CFLAGS_debug = "-O0"; + OTHER_TAPI_FLAGS = "$(inherited) --extra-private-header=$(PROJECT_DIR)/logging/liblog_SystemConfiguration_internal.h"; PRODUCT_NAME = SystemConfiguration; SDKROOT = iphoneos.internal; STRIP_INSTALLED_PRODUCT_asan = NO; @@ -8898,6 +9181,7 @@ STRIP_INSTALLED_PRODUCT_profile = NO; STRIP_INSTALLED_PRODUCT_tsan = NO; SUPPORTED_PLATFORMS = "iphonesimulator tvossimulator watchsimulator bridgesimulator"; + VERSION_INFO_PREFIX = liblog_; }; name = Release; }; @@ -9014,7 +9298,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -9051,7 +9334,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; @@ -9087,7 +9369,6 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -9123,13 +9404,91 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; }; name = Release; }; + C4666C75206ED01800247AB6 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + DEBUG_INFORMATION_FORMAT = dwarf; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", + "$(SDKROOT)$(APPLE_INTERNAL_LIBRARY_DIR)/Frameworks", + ); + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = EventFactory/Info.plist; + INSTALL_PATH = "$(APPLE_INTERNAL_LIBRARY_DIR)/Frameworks/EventFactory.framework/PlugIns"; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.apple.$(TARGET_NAME)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx.internal; + SKIP_INSTALL = NO; + }; + name = Debug; + }; + C4666C76206ED01800247AB6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks", + "$(SDKROOT)$(APPLE_INTERNAL_LIBRARY_DIR)/Frameworks", + ); + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = EventFactory/Info.plist; + INSTALL_PATH = "$(APPLE_INTERNAL_LIBRARY_DIR)/Frameworks/EventFactory.framework/PlugIns"; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "com.apple.$(TARGET_NAME)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx.internal; + SKIP_INSTALL = NO; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -9754,6 +10113,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + C4666C77206ED01800247AB6 /* Build configuration list for PBXNativeTarget "SystemConfigurationEventFactory" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C4666C75206ED01800247AB6 /* Debug */, + C4666C76206ED01800247AB6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 15CB6A7705C0722B0099E85F /* Project object */; diff --git a/dnsinfo/dnsinfo.h b/dnsinfo/dnsinfo.h index 83a76af..d5a0e70 100644 --- a/dnsinfo/dnsinfo.h +++ b/dnsinfo/dnsinfo.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2006, 2008, 2009, 2011-2013, 2015-2017 Apple Inc. All rights reserved. + * Copyright (c) 2004-2006, 2008, 2009, 2011-2013, 2015-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -28,7 +28,7 @@ * These routines provide access to the systems DNS configuration */ -#include +#include #include #include #include @@ -111,17 +111,17 @@ __BEGIN_DECLS * DNS configuration access APIs */ const char * -dns_configuration_notify_key () __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); +dns_configuration_notify_key (void) API_AVAILABLE(macos(10.4), ios(2.0)); dns_config_t * -dns_configuration_copy () __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); +dns_configuration_copy (void) API_AVAILABLE(macos(10.4), ios(2.0)); void -dns_configuration_free (dns_config_t *config) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); +dns_configuration_free (dns_config_t *config) API_AVAILABLE(macos(10.4), ios(2.0)); void _dns_configuration_ack (dns_config_t *config, - const char *bundle_id) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); + const char *bundle_id) API_AVAILABLE(macos(10.8), ios(6.0)); __END_DECLS diff --git a/dnsinfo/dnsinfo_create.c b/dnsinfo/dnsinfo_create.c index 2732434..26328a0 100644 --- a/dnsinfo/dnsinfo_create.c +++ b/dnsinfo/dnsinfo_create.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2006, 2009, 2011-2013, 2015-2017 Apple Inc. All rights reserved. + * Copyright (c) 2004-2006, 2009, 2011-2013, 2015-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/dnsinfo/dnsinfo_create.h b/dnsinfo/dnsinfo_create.h index f3d805a..d80a653 100644 --- a/dnsinfo/dnsinfo_create.h +++ b/dnsinfo/dnsinfo_create.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2006, 2008, 2009, 2011-2013, 2015, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2004-2006, 2008, 2009, 2011-2013, 2015, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -29,7 +29,7 @@ */ #include -#include +#include #include #include #include @@ -53,89 +53,89 @@ __BEGIN_DECLS * DNS configuration creation APIs */ dns_create_config_t -_dns_configuration_create (void) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); +_dns_configuration_create (void) API_AVAILABLE(macos(10.4), ios(2.0)); void _dns_configuration_add_resolver (dns_create_config_t *_config, - dns_create_resolver_t _resolver) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + dns_create_resolver_t _resolver) API_AVAILABLE(macos(10.4), ios(2.0)); void _dns_configuration_signature (dns_create_config_t *_config, unsigned char *signature, - size_t signature_len) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_5_0); // signature_len >= CC_SHA1_DIGEST_LENGTH + size_t signature_len) API_AVAILABLE(macos(10.7), ios(5.0)); // signature_len >= CC_SHA1_DIGEST_LENGTH void -_dns_configuration_free (dns_create_config_t *_config) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); +_dns_configuration_free (dns_create_config_t *_config) API_AVAILABLE(macos(10.4), ios(2.0)); /* * DNS [resolver] configuration creation APIs */ dns_create_resolver_t -_dns_resolver_create (void) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); +_dns_resolver_create (void) API_AVAILABLE(macos(10.4), ios(2.0)); void _dns_resolver_set_domain (dns_create_resolver_t *_resolver, - const char *domain) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + const char *domain) API_AVAILABLE(macos(10.4), ios(2.0)); void _dns_resolver_add_nameserver (dns_create_resolver_t *_resolver, - struct sockaddr *nameserver) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + struct sockaddr *nameserver) API_AVAILABLE(macos(10.4), ios(2.0)); void _dns_resolver_add_search (dns_create_resolver_t *_resolver, - const char *search) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + const char *search) API_AVAILABLE(macos(10.4), ios(2.0)); void _dns_resolver_add_sortaddr (dns_create_resolver_t *_resolver, - dns_sortaddr_t *sortaddr) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + dns_sortaddr_t *sortaddr) API_AVAILABLE(macos(10.4), ios(2.0)); void _dns_resolver_set_configuration_identifier (dns_create_resolver_t *_resolver, - const char *config_identifier) __OSX_AVAILABLE_STARTING(__MAC_10_11,__IPHONE_9_0); + const char *config_identifier) API_AVAILABLE(macos(10.11), ios(9.0)); void _dns_resolver_set_flags (dns_create_resolver_t *_resolver, - uint32_t flags) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0); + uint32_t flags) API_AVAILABLE(macos(10.7), ios(4.0)); void _dns_resolver_set_if_index (dns_create_resolver_t *_resolver, uint32_t if_index, - const char *if_name) __OSX_AVAILABLE_STARTING(__MAC_10_7,__IPHONE_4_0); + const char *if_name) API_AVAILABLE(macos(10.7), ios(4.0)); void _dns_resolver_set_options (dns_create_resolver_t *_resolver, - const char *options) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + const char *options) API_AVAILABLE(macos(10.4), ios(2.0)); void _dns_resolver_set_order (dns_create_resolver_t *_resolver, - uint32_t order) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + uint32_t order) API_AVAILABLE(macos(10.4), ios(2.0)); void _dns_resolver_set_port (dns_create_resolver_t *_resolver, - uint16_t port) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); // host byte order + uint16_t port) API_AVAILABLE(macos(10.4), ios(2.0)); // host byte order void _dns_resolver_set_timeout (dns_create_resolver_t *_resolver, - uint32_t timeout) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); + uint32_t timeout) API_AVAILABLE(macos(10.4), ios(2.0)); void _dns_resolver_set_service_identifier (dns_create_resolver_t *_resolver, - uint32_t service_identifier) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_7_0); + uint32_t service_identifier) API_AVAILABLE(macos(10.9), ios(7.0)); void -_dns_resolver_free (dns_create_resolver_t *_resolver) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_2_0); +_dns_resolver_free (dns_create_resolver_t *_resolver) API_AVAILABLE(macos(10.4), ios(2.0)); #if !TARGET_OS_IPHONE /* * DNS [resolver] flat-file configuration creation APIs */ void -_dnsinfo_flatfile_add_resolvers (dns_create_config_t *config) __OSX_AVAILABLE_STARTING(__MAC_10_6,__IPHONE_NA); +_dnsinfo_flatfile_add_resolvers (dns_create_config_t *config) API_AVAILABLE(macos(10.6)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); void -_dnsinfo_flatfile_set_flags (uint32_t flags) __OSX_AVAILABLE_STARTING(__MAC_10_9,__IPHONE_NA); +_dnsinfo_flatfile_set_flags (uint32_t flags) API_AVAILABLE(macos(10.9)) API_UNAVAILABLE(ios, tvos, watchos, bridgeos); #endif // !TARGET_OS_IPHONE __END_DECLS diff --git a/dnsinfo/dnsinfo_internal.h b/dnsinfo/dnsinfo_internal.h index c677213..c37e949 100644 --- a/dnsinfo/dnsinfo_internal.h +++ b/dnsinfo/dnsinfo_internal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2015-2017 Apple Inc. All rights reserved. + * Copyright (c) 2013, 2015-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,11 +24,10 @@ #ifndef _S_DNSINFO_INTERNAL_H #define _S_DNSINFO_INTERNAL_H -#include +#include #include #include -#include -#include +#include // for SC_log #include #include diff --git a/dnsinfo/dnsinfo_logging.h b/dnsinfo/dnsinfo_logging.h index 800b4b0..e103cde 100644 --- a/dnsinfo/dnsinfo_logging.h +++ b/dnsinfo/dnsinfo_logging.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Apple Inc. All rights reserved. + * Copyright (c) 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,7 +24,7 @@ #ifndef _S_DNSINFO_LOGGING_H #define _S_DNSINFO_LOGGING_H -#include +#include #include #include #include diff --git a/dnsinfo/dnsinfo_private.h b/dnsinfo/dnsinfo_private.h index ae9ed24..b1dfdab 100644 --- a/dnsinfo/dnsinfo_private.h +++ b/dnsinfo/dnsinfo_private.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2006, 2008, 2009, 2012, 2013, 2015, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2004-2006, 2008, 2009, 2012, 2013, 2015, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -25,7 +25,7 @@ #define __DNSINFO_PRIVATE_H__ -#include +#include #include #include #include diff --git a/get-mobility-info b/get-mobility-info index 0dd0052..92ae111 100755 --- a/get-mobility-info +++ b/get-mobility-info @@ -138,11 +138,11 @@ fi # get-network-info # if [ -x /System/Library/Frameworks/SystemConfiguration.framework/Resources/get-network-info ]; then - /System/Library/Frameworks/SystemConfiguration.framework/Resources/get-network-info -s -c -P "${WORKDIR}" + /bin/sh /System/Library/Frameworks/SystemConfiguration.framework/Resources/get-network-info -s -c -P "${WORKDIR}" elif [ -x /System/Library/Frameworks/SystemConfiguration.framework/get-network-info ]; then - /System/Library/Frameworks/SystemConfiguration.framework/get-network-info -s -c -P "${WORKDIR}" + /bin/sh /System/Library/Frameworks/SystemConfiguration.framework/get-network-info -s -c -P "${WORKDIR}" elif [ -x /System/Library/PrivateFrameworks/SystemConfiguration.framework/get-network-info ]; then - /System/Library/PrivateFrameworks/SystemConfiguration.framework/get-network-info -s -c -P "${WORKDIR}" + /bin/sh /System/Library/PrivateFrameworks/SystemConfiguration.framework/get-network-info -s -c -P "${WORKDIR}" fi # diff --git a/get-network-info b/get-network-info index f42023c..a3ca6d3 100755 --- a/get-network-info +++ b/get-network-info @@ -427,6 +427,7 @@ collect_configuration_files () { /Library/Preferences/com.apple.networkextension.control.plist \ /Library/Preferences/com.apple.networkextension.necp.plist \ /Library/Preferences/com.apple.networkextension.cache.plist \ + /Library/Preferences/com.apple.networkextension.uuidcache.plist \ /Library/Preferences/SystemConfiguration/com.apple.nat.plist \ /Library/Preferences/SystemConfiguration/com.apple.RemoteAccessServers.plist \ /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist \ diff --git a/libSystemConfiguration/libSystemConfiguration_client.c b/libSystemConfiguration/libSystemConfiguration_client.c index d315486..3860ad5 100644 --- a/libSystemConfiguration/libSystemConfiguration_client.c +++ b/libSystemConfiguration/libSystemConfiguration_client.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 2015, 2016 Apple Inc. All rights reserved. + * Copyright (c) 2012, 2013, 2015, 2016, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -21,7 +21,7 @@ * @APPLE_LICENSE_HEADER_END@ */ -#include +#include #include #include #include @@ -31,6 +31,7 @@ #include #include "libSystemConfiguration_client.h" +#include "libSystemConfiguration_internal.h" #pragma mark - @@ -106,11 +107,11 @@ libSC_info_client_create(dispatch_queue_t q, { xpc_connection_t c; libSC_info_client_t *client; -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC const uint64_t flags = XPC_CONNECTION_MACH_SERVICE_PRIVILEGED; -#else // !TARGET_OS_SIMULATOR +#else // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC const uint64_t flags = 0; -#endif // !TARGET_OS_SIMULATOR +#endif // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC if (!_available) { return NULL; diff --git a/libSystemConfiguration/libSystemConfiguration_client.h b/libSystemConfiguration/libSystemConfiguration_client.h index 785c9d5..082cef8 100644 --- a/libSystemConfiguration/libSystemConfiguration_client.h +++ b/libSystemConfiguration/libSystemConfiguration_client.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, 2015, 2016 Apple Inc. All rights reserved. + * Copyright (c) 2012, 2013, 2015-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,7 +24,7 @@ #ifndef _LIBSYSTEMCONFIGURATION_CLIENT_H #define _LIBSYSTEMCONFIGURATION_CLIENT_H -#include +#include #include #include #include @@ -37,11 +37,11 @@ #define DNSINFO_SERVER_VERSION 20130408 -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC #define DNSINFO_SERVICE_NAME "com.apple.SystemConfiguration.DNSConfiguration" -#else // !TARGET_OS_SIMULATOR +#else // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC #define DNSINFO_SERVICE_NAME "com.apple.SystemConfiguration.DNSConfiguration_sim" -#endif // !TARGET_OS_SIMULATOR +#endif // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC #define DNSINFO_PROC_NAME "proc_name" // string @@ -62,11 +62,11 @@ enum { #define NWI_SERVER_VERSION 20130408 -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC #define NWI_SERVICE_NAME "com.apple.SystemConfiguration.NetworkInformation" -#else // !TARGET_OS_SIMULATOR +#else // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC #define NWI_SERVICE_NAME "com.apple.SystemConfiguration.NetworkInformation_sim" -#endif // !TARGET_OS_SIMULATOR +#endif // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC #define NWI_PROC_NAME "proc_name" // string @@ -77,10 +77,10 @@ enum { NWI_STATE_REQUEST_COPY = 0x20001, NWI_STATE_REQUEST_ACKNOWLEDGE, -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC /* NWI config agent requests */ NWI_CONFIG_AGENT_REQUEST_COPY -#endif // !TARGET_OS_SIMULATOR +#endif // !TARGET_OS_SIMULATOR || TARGET_OS_IOSMAC }; #define NWI_CONFIGURATION "configuration" // data @@ -100,7 +100,7 @@ typedef struct { __BEGIN_DECLS _Bool -libSC_info_available (); +libSC_info_available (void); libSC_info_client_t * libSC_info_client_create ( @@ -122,4 +122,4 @@ libSC_send_message_with_reply_sync ( __END_DECLS -#endif // _LIBSYSTEMCONFIGURATION_CLIENT_H +#endif // _LIBSYSTEMCONFIGURATION_CLIENT_H diff --git a/libSystemConfiguration/libSystemConfiguration_internal.h b/libSystemConfiguration/libSystemConfiguration_internal.h new file mode 100644 index 0000000..ccd600e --- /dev/null +++ b/libSystemConfiguration/libSystemConfiguration_internal.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2018 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _LIBSYSTEMCONFIGURATION_INTERNAL_H +#define _LIBSYSTEMCONFIGURATION_INTERNAL_H + +#include +#include +#include + +extern const unsigned char * libsystem_configurationVersionString; +extern const double libsystem_configurationVersionNumber; + +__BEGIN_DECLS + +void +_libSC_info_fork_prepare (void); + +void +_libSC_info_fork_parent (void); + +void +_libSC_info_fork_child (void); + +__END_DECLS + +#endif // _LIBSYSTEMCONFIGURATION_INTERNAL_H diff --git a/libSystemConfiguration/libSystemConfiguration_server.c b/libSystemConfiguration/libSystemConfiguration_server.c index 13feb4f..3d8e43d 100644 --- a/libSystemConfiguration/libSystemConfiguration_server.c +++ b/libSystemConfiguration/libSystemConfiguration_server.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2016 Apple Inc. All rights reserved. + * Copyright (c) 2012-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -21,7 +21,7 @@ * @APPLE_LICENSE_HEADER_END@ */ -#include +#include #include #include #include diff --git a/libSystemConfiguration/libSystemConfiguration_server.h b/libSystemConfiguration/libSystemConfiguration_server.h index 4093bb7..acd6518 100644 --- a/libSystemConfiguration/libSystemConfiguration_server.h +++ b/libSystemConfiguration/libSystemConfiguration_server.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2012 Apple Inc. All rights reserved. + * Copyright (c) 2012, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,14 +17,14 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _LIBSYSTEMCONFIGURATION_SERVER_H #define _LIBSYSTEMCONFIGURATION_SERVER_H -#include +#include #include #include #include @@ -112,4 +112,4 @@ _libSC_info_server_close ( __END_DECLS -#endif // _LIBSYSTEMCONFIGURATION_SERVER_H +#endif // _LIBSYSTEMCONFIGURATION_SERVER_H diff --git a/logging/liblog_SystemConfiguration_internal.h b/logging/liblog_SystemConfiguration_internal.h new file mode 100644 index 0000000..81aed02 --- /dev/null +++ b/logging/liblog_SystemConfiguration_internal.h @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2018 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _LIBLOG_SYSTEMCONFIGURATION_INTERNAL_H +#define _LIBLOG_SYSTEMCONFIGURATION_INTERNAL_H + +#include +#include +#include +#include +#include + +extern const unsigned char * liblog_SystemConfigurationVersionString; +extern const double liblog_SystemConfigurationVersionNumber; + +// +#ifdef __OBJC__ +#import +#import +typedef NSAttributedString *(*os_log_copy_formatted_fn_t)(const char *type, + id value, os_log_type_info_t info); +OS_EXPORT NS_RETURNS_RETAINED +NSAttributedString * +OSLogCopyFormattedString(const char *type, id value, os_log_type_info_t info); +#endif + +// +#ifdef __OBJC__ +#import +typedef NSString * +(*os_state_create_string_fn_t)(const char *data_type, + uint32_t data_size, void *data); +OS_EXPORT NS_RETURNS_RETAINED +NSString * +OSStateCreateStringWithData(const char *data_type, uint32_t data_size, void *data); +#endif + +__BEGIN_DECLS + +__END_DECLS + +#endif // _LIBLOG_SYSTEMCONFIGURATION_INTERNAL_H diff --git a/nwi/network_information.c b/nwi/network_information.c index 1ef59cd..d6e7656 100644 --- a/nwi/network_information.c +++ b/nwi/network_information.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2017 Apple Inc. All rights reserved. + * Copyright (c) 2011-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -498,13 +498,18 @@ nwi_ifstate_get_flags(nwi_ifstate_t ifstate) flags |= flags_from_af(ifstate->af); if ((ifstate->flags & NWI_IFSTATE_FLAGS_HAS_DNS) != 0) { flags |= NWI_IFSTATE_FLAGS_HAS_DNS; - + } + if ((ifstate->flags & NWI_IFSTATE_FLAGS_HAS_CLAT46) != 0) { + flags |= NWI_IFSTATE_FLAGS_HAS_CLAT46; } if (alias != NULL) { flags |= flags_from_af(alias->af); if ((alias->flags & NWI_IFSTATE_FLAGS_HAS_DNS) != 0) { flags |= NWI_IFSTATE_FLAGS_HAS_DNS; } + if ((alias->flags & NWI_IFSTATE_FLAGS_HAS_CLAT46) != 0) { + flags |= NWI_IFSTATE_FLAGS_HAS_CLAT46; + } } return flags; } @@ -903,13 +908,15 @@ nwi_ifstate_print(nwi_ifstate_t ifstate) sizeof(vpn_ntopbuf)); } diff_str = nwi_ifstate_get_diff_str(ifstate); - printf("%s%s%s%s rank 0x%x iaddr %s%s%s reach_flags 0x%x\n", + printf("%s%s%s%s%s rank 0x%x iaddr %s%s%s reach_flags 0x%x\n", ifstate->ifname, diff_str, (ifstate->flags & NWI_IFSTATE_FLAGS_HAS_DNS) != 0 - ? " dns" : "", + ? " dns" : "", + (ifstate->flags & NWI_IFSTATE_FLAGS_HAS_CLAT46) != 0 + ? " clat46" : "", (ifstate->flags & NWI_IFSTATE_FLAGS_NOT_IN_LIST) != 0 - ? " never" : "", + ? " never" : "", ifstate->rank, addr_str, (vpn_addr_str != NULL) ? " vpn_server_addr: " : "", diff --git a/nwi/network_information.h b/nwi/network_information.h index 3bcb87a..944ce25 100644 --- a/nwi/network_information.h +++ b/nwi/network_information.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2011-2017 Apple Inc. All rights reserved. + * Copyright (c) 2011-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -25,9 +25,9 @@ #ifndef _NETWORK_INFORMATION_H_ #define _NETWORK_INFORMATION_H_ +#include #include #include -#include typedef struct _nwi_state * nwi_state_t; typedef struct _nwi_ifstate * nwi_ifstate_t; @@ -176,7 +176,7 @@ nwi_ifstate_compare_rank(nwi_ifstate_t ifstate1, nwi_ifstate_t ifstate2); */ void _nwi_state_ack(nwi_state_t state, const char *bundle_id) - __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); + API_AVAILABLE(macos(10.8), ios(6.0)); /* * Function: nwi_state_get_reachability_flags @@ -233,7 +233,7 @@ nwi_state_get_reachability_flags(nwi_state_t nwi_state, int af); */ unsigned int nwi_state_get_interface_names(nwi_state_t state, - const char * names[], + const char * names[], unsigned int names_count); /* diff --git a/nwi/network_information_internal.h b/nwi/network_information_internal.h new file mode 100644 index 0000000..f6cf206 --- /dev/null +++ b/nwi/network_information_internal.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2018 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +#ifndef _NETWORK_INFORMATION_INTERNAL_H +#define _NETWORK_INFORMATION_INTERNAL_H + +#include +#include +#include + +__BEGIN_DECLS + +void +_nwi_state_force_refresh (void); + +__END_DECLS + +#endif // _NETWORK_INFORMATION_INTERNAL_H diff --git a/nwi/network_information_server.c b/nwi/network_information_server.c index ffdc047..d50a930 100644 --- a/nwi/network_information_server.c +++ b/nwi/network_information_server.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2017 Apple Inc. All rights reserved. + * Copyright (c) 2012-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -40,14 +40,15 @@ #include "libSystemConfiguration_server.h" #include -#include "network_state_information_priv.h" +#include "network_information_internal.h" #include "network_information_server.h" +#include "network_state_information_priv.h" -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR #include "agent-monitor.h" #include "configAgentDefines.h" #include "network_config_agent_info_priv.h" -#endif // !TARGET_OS_SIMULATOR +#endif // !TARGET_OS_SIMULATOR #ifdef SC_LOG_HANDLE #include @@ -190,7 +191,7 @@ _nwi_state_acknowledge(xpc_connection_t connection, xpc_object_t request) return; } -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR /* * _nwi_config_agent_copy * @@ -259,7 +260,7 @@ done: return; } -#endif // !TARGET_OS_SIMULATOR +#endif // !TARGET_OS_SIMULATOR static void @@ -283,7 +284,7 @@ process_request(xpc_connection_t connection, xpc_object_t request) _nwi_state_acknowledge(connection, request); break; -#if !TARGET_OS_SIMULATOR +#if !TARGET_OS_SIMULATOR case NWI_CONFIG_AGENT_REQUEST_COPY : /* * Return the agent information @@ -291,7 +292,7 @@ process_request(xpc_connection_t connection, xpc_object_t request) _nwi_config_agent_copy(connection, request); break; -#endif // !TARGET_OS_SIMULATOR +#endif // !TARGET_OS_SIMULATOR default : SC_log(LOG_ERR, "<%p> unknown request : %lld", connection, @@ -587,4 +588,4 @@ main(int argc, char **argv) return 0; } -#endif /* MAIN */ +#endif /* MAIN */ diff --git a/nwi/network_state_information_logging.h b/nwi/network_state_information_logging.h index 1f593d2..d2c52b1 100644 --- a/nwi/network_state_information_logging.h +++ b/nwi/network_state_information_logging.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Apple Inc. All rights reserved. + * Copyright (c) 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -24,7 +24,7 @@ #ifndef _NETWORK_STATE_INFORMATION_LOGGING_H #define _NETWORK_STATE_INFORMATION_LOGGING_H -#include +#include #include #include #include @@ -95,6 +95,12 @@ _nwi_ifstate_flags_str(nwi_ifstate_flags flags, char *str, size_t len) remaining &= ~NWI_IFSTATE_FLAGS_HAS_DNS; } + if ((remaining & NWI_IFSTATE_FLAGS_HAS_CLAT46) && + (n < len) && ((len - n) > sizeof("CLAT46,"))) { + n = strlcat(str, "CLAT46,", len); + remaining &= ~NWI_IFSTATE_FLAGS_HAS_CLAT46; + } + if ((remaining & NWI_IFSTATE_FLAGS_NOT_IN_LIST) && (n < len) && ((len - n) > sizeof("NOT-IN-LIST,"))) { n = strlcat(str, "NOT-IN-LIST,", len); @@ -393,4 +399,4 @@ _nwi_state_log(nwi_state_t state, boolean_t debug, my_log_context_type my_log_co __END_DECLS -#endif // _NETWORK_STATE_INFORMATION_LOGGING_H +#endif // _NETWORK_STATE_INFORMATION_LOGGING_H diff --git a/nwi/network_state_information_priv.c b/nwi/network_state_information_priv.c index 63e8f8f..129732b 100644 --- a/nwi/network_state_information_priv.c +++ b/nwi/network_state_information_priv.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2015, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2011-2015, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/nwi/network_state_information_priv.h b/nwi/network_state_information_priv.h index 2c7da3f..23c9e7a 100644 --- a/nwi/network_state_information_priv.h +++ b/nwi/network_state_information_priv.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2013, 2016, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2011-2013, 2016-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -40,6 +40,7 @@ #define NWI_IFSTATE_FLAGS_NOT_IN_LIST 0x0008 #define NWI_IFSTATE_FLAGS_HAS_SIGNATURE 0x0010 #define NWI_IFSTATE_FLAGS_NOT_IN_IFLIST 0x0020 +#define NWI_IFSTATE_FLAGS_HAS_CLAT46 0x0040 /* has CLAT46 configured */ /* * NWI_IFSTATE_FLAGS_MASK @@ -347,9 +348,6 @@ nwi_ifstate_get_difference(nwi_ifstate_t diff_ifstate); void _nwi_state_update_interface_generations(nwi_state_t old_state, nwi_state_t state, nwi_state_t changes); -void -_nwi_state_force_refresh(); - void _nwi_state_compute_sha1_hash(nwi_state_t state, unsigned char hash[CC_SHA1_DIGEST_LENGTH]); diff --git a/sctest/SCTestUtils.h b/sctest/SCTestUtils.h index 2b02800..5b07145 100644 --- a/sctest/SCTestUtils.h +++ b/sctest/SCTestUtils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Apple Inc. All rights reserved. + * Copyright (c) 2016, 2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -55,7 +55,7 @@ void cpuStart(CPUUsageInfo *); void cpuEnd(CPUUsageInfo *); NSString * createUsageStringForCPU(CPUUsageInfo *cpu); -NSArray *getTestClasses(); +NSArray *getTestClasses(void); NSArray *getUnitTestListForClass(Class base); NSDictionary *getOptionsDictionary(int argc, const char **argv); diff --git a/scutil.tproj/cache.h b/scutil.tproj/cache.h index ef14ef2..5e32284 100644 --- a/scutil.tproj/cache.h +++ b/scutil.tproj/cache.h @@ -1,15 +1,15 @@ /* - * Copyright (c) 2000, 2001, 2011 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2011, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ - * + * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. - * + * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, @@ -17,7 +17,7 @@ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. - * + * * @APPLE_LICENSE_HEADER_END@ */ @@ -34,7 +34,7 @@ #ifndef _CACHE_H #define _CACHE_H -#include +#include #include #include @@ -54,4 +54,4 @@ void do_notify (int argc, char **argv); __END_DECLS -#endif /* !_CACHE_H */ +#endif /* !_CACHE_H */ diff --git a/scutil.tproj/nc.c b/scutil.tproj/nc.c index db52aa6..5460782 100644 --- a/scutil.tproj/nc.c +++ b/scutil.tproj/nc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2015, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2010-2015, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -937,7 +937,7 @@ done: exit(0); } -#endif +#endif // !TARGET_OS_IPHONE /* ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- */ @@ -964,7 +964,7 @@ nc_enablevpn(int argc, char **argv) nc_set_application_url(vendorType, argument); my_CFRelease(&argument); } -#endif +#endif // !TARGET_OS_IPHONE } exit_code = 0; @@ -996,7 +996,7 @@ nc_show(int argc, char **argv) Boolean isStale = FALSE; char *path = NULL; CFIndex path_len = 0; -#endif +#endif // !TARGET_OS_IPHONE service = nc_copy_service_from_arguments(argc, argv, NULL); if (service == NULL) { @@ -1049,7 +1049,7 @@ nc_show(int argc, char **argv) SCPrint(TRUE, stdout, CFSTR("ApplicationURL: %@\n"), directory); skipURL: -#endif +#endif // !TARGET_OS_IPHONE store = SCDynamicStoreCreate(NULL, CFSTR("scutil --nc"), NULL, NULL); if (store == NULL) { @@ -1120,13 +1120,13 @@ nc_select(int argc, char **argv) SCPrint(TRUE, stderr, CFSTR("Unable to enable service: %s\n"), SCErrorString(SCError())); goto done; } -#else +#else // !TARGET_OS_IPHONE status = SCNetworkSetSetSelectedVPNService(current_set, service); if (!status) { SCPrint(TRUE, stderr, CFSTR("Unable to select service: %s\n"), SCErrorString(SCError())); goto done; } -#endif +#endif // !TARGET_OS_IPHONE _prefs_save(); exit_code = 0; @@ -1185,11 +1185,11 @@ nc_help(int argc, char **argv) SCPrint(TRUE, stderr, CFSTR("\tenablevpn [path]\n")); SCPrint(TRUE, stderr, CFSTR("\t\tEnables the given VPN application type. Takes either a service or VPN type. Pass a path to set ApplicationURL\n")); SCPrint(TRUE, stderr, CFSTR("\n")); -#else +#else // !TARGET_OS_IPHONE SCPrint(TRUE, stderr, CFSTR("\tenablevpn \n")); SCPrint(TRUE, stderr, CFSTR("\t\tEnables the given VPN application type. Takes either a service or VPN type\n")); SCPrint(TRUE, stderr, CFSTR("\n")); -#endif +#endif // !TARGET_OS_IPHONE SCPrint(TRUE, stderr, CFSTR("\tdisablevpn \n")); SCPrint(TRUE, stderr, CFSTR("\t\tDisables the given VPN application type. Takes either a service or VPN type\n")); SCPrint(TRUE, stderr, CFSTR("\n")); diff --git a/scutil.tproj/notifications.c b/scutil.tproj/notifications.c index 2f19a45..fd0e539 100644 --- a/scutil.tproj/notifications.c +++ b/scutil.tproj/notifications.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2005, 2008-2015, 2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2008-2015, 2017, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/scutil.tproj/prefs.c b/scutil.tproj/prefs.c index 17b5578..a4df6a4 100644 --- a/scutil.tproj/prefs.c +++ b/scutil.tproj/prefs.c @@ -146,9 +146,7 @@ __private_extern__ Boolean _prefs_open(CFStringRef name, CFStringRef prefsID) { -#if TARGET_OS_EMBEDDED char *env = NULL; -#endif // TARGET_OS_EMBEDDED CFMutableDictionaryRef options = NULL; Boolean useHelper = FALSE; Boolean useOptions = FALSE; @@ -177,7 +175,6 @@ _prefs_open(CFStringRef name, CFStringRef prefsID) CFDictionarySetValue(options, kSCPreferencesOptionRemoveWhenEmpty, kCFBooleanTrue); } -#if TARGET_OS_EMBEDDED env = getenv("SCPREFERENCES_PROTECTION_CLASS"); if (env != NULL) { CFStringRef str; @@ -193,7 +190,6 @@ _prefs_open(CFStringRef name, CFStringRef prefsID) CFDictionarySetValue(options, kSCPreferencesOptionProtectionClass, str); CFRelease(str); } -#endif // TARGET_OS_EMBEDDED if (!useHelper && !useOptions) { // if no helper/options needed diff --git a/scutil.tproj/scutil.c b/scutil.tproj/scutil.c index b458640..a897d81 100644 --- a/scutil.tproj/scutil.c +++ b/scutil.tproj/scutil.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -108,6 +108,7 @@ static const struct option longopts[] = { { "password", required_argument, NULL, 0 }, { "secret", required_argument, NULL, 0 }, { "log", required_argument, NULL, 0 }, + { "advisory", required_argument, NULL, 0 }, #if !TARGET_OS_IPHONE { "allow-new-interfaces", no_argument, NULL, 0 }, #endif // !TARGET_OS_IPHONE @@ -407,6 +408,8 @@ main(int argc, char * const argv[]) Boolean allowNewInterfaces = FALSE; #endif // !TARGET_OS_IPHONE Boolean disableUntilNeeded = FALSE; + const char * advisoryInterface = NULL; + Boolean doAdvisory = FALSE; Boolean doDNS = FALSE; Boolean doNet = FALSE; Boolean doNWI = FALSE; @@ -513,6 +516,10 @@ main(int argc, char * const argv[]) password = CFStringCreateWithCString(NULL, optarg, kCFStringEncodingUTF8); } else if (strcmp(longopts[opti].name, "secret") == 0) { sharedsecret = CFStringCreateWithCString(NULL, optarg, kCFStringEncodingUTF8); + } else if (strcmp(longopts[opti].name, "advisory") == 0) { + doAdvisory = TRUE; + advisoryInterface = optarg; + xStore++; } break; case '?': @@ -577,6 +584,11 @@ main(int argc, char * const argv[]) exit(0); } + if (doAdvisory) { + do_advisory(advisoryInterface, watch, argc, (char**)argv); + /* NOT REACHED */ + } + /* are we translating error #'s to descriptive text */ if (error != NULL) { int sc_status = atoi(error); diff --git a/scutil.tproj/scutil.h b/scutil.tproj/scutil.h index 3de23a9..4be484d 100644 --- a/scutil.tproj/scutil.h +++ b/scutil.tproj/scutil.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2005, 2009, 2012, 2016 Apple Inc. All rights reserved. + * Copyright (c) 2000-2005, 2009, 2012, 2016, 2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * diff --git a/scutil.tproj/tests.c b/scutil.tproj/tests.c index 83022d3..876d766 100644 --- a/scutil.tproj/tests.c +++ b/scutil.tproj/tests.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2003-2017 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2003-2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -1122,6 +1122,135 @@ do_wait(char *waitKey, int timeout) CFRunLoopRun(); } +/** + ** "scutil --advisory [ set | -W ]" + **/ +void +timestamp_fprintf(FILE * f, const char * message, ...) +{ + struct timeval tv; + struct tm tm; + time_t t; + va_list ap; + + (void)gettimeofday(&tv, NULL); + t = tv.tv_sec; + (void)localtime_r(&t, &tm); + + va_start(ap, message); + fprintf(f, "%04d/%02d/%02d %2d:%02d:%02d.%06d ", + tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, + tm.tm_hour, tm.tm_min, tm.tm_sec, + tv.tv_usec); + vfprintf(f, message, ap); + va_end(ap); +} + +static void +advisoryCheck(SCNetworkInterfaceRef interface, Boolean show_timestamp) +{ + if (show_timestamp) { + timestamp_fprintf(stdout, ""); + } + printf("%sset\n", + SCNetworkInterfaceAdvisoryIsSet(interface) ? "" : "not "); +} + +static void +advisoryChanged(SCDynamicStoreRef session, CFArrayRef changes, + void * info) +{ +#pragma unused(session, changes) + SCNetworkInterfaceRef interface = (SCNetworkInterfaceRef)info; + + advisoryCheck(interface, TRUE); + return; +} + +static void +advisoryWatch(SCNetworkInterfaceRef interface) +{ + SCDynamicStoreContext context = { + .info = (void *)interface, + }; + CFStringRef key; + CFMutableArrayRef keys; + Boolean ok; + + store = SCDynamicStoreCreate(NULL, CFSTR("scutil (advisory)"), advisoryChanged, &context); + if (store == NULL) { + SCPrint(TRUE, stderr, + CFSTR("SCDynamicStoreCreate() failed: %s\n"), SCErrorString(SCError())); + exit(1); + } + key = SCNetworkInterfaceCopyAdvisoryNotificationKey(interface); + keys = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + CFArrayAppendValue(keys, key); + CFRelease(key); + ok = SCDynamicStoreSetNotificationKeys(store, keys, NULL); + CFRelease(keys); + if (!ok) { + SCPrint(TRUE, stderr, + CFSTR("SCDynamicStoreSetNotificationKeys() failed: %s\n"), SCErrorString(SCError())); + exit(1); + } + notifyRls = SCDynamicStoreCreateRunLoopSource(NULL, store, 0); + if (!notifyRls) { + SCPrint(TRUE, stderr, + CFSTR("SCDynamicStoreCreateRunLoopSource() failed: %s\n"), SCErrorString(SCError())); + exit(1); + } + CFRunLoopAddSource(CFRunLoopGetCurrent(), notifyRls, kCFRunLoopDefaultMode); +} + +__private_extern__ +void +do_advisory(const char * ifname, Boolean watch, int argc, char **argv) +{ + CFStringRef ifname_cf; + SCNetworkInterfaceRef interface; + + ifname_cf = CFStringCreateWithCString(NULL, ifname, kCFStringEncodingUTF8); + interface = _SCNetworkInterfaceCreateWithBSDName(NULL, ifname_cf, kIncludeAllVirtualInterfaces); + CFRelease(ifname_cf); + if (interface == NULL) { + fprintf(stderr, "Failed to instantiate SCNetworkInterfaceRef\n"); + exit(1); + } + if (argc >= 1) { + SCNetworkInterfaceAdvisory advisory = kSCNetworkInterfaceAdvisoryUplinkIssue; + + if (strcasecmp(argv[0], "set") != 0) { + fprintf(stderr, + "usage: scutil --advisory " + "[ set [ linklayer | uplink ] | -W ]\n"); + exit(1); + } + if (argc >= 2) { + if (strcasecmp(argv[1], "uplink") == 0) { + advisory = kSCNetworkInterfaceAdvisoryUplinkIssue; + } else if (strcasecmp(argv[1], "linklayer") == 0) { + advisory = kSCNetworkInterfaceAdvisoryLinkLayerIssue; + } else { + fprintf(stderr, + "Bad advisory '%s', must be either 'uplink' or 'linklayer'\n", + argv[1]); + exit(1); + } + } + SCNetworkInterfaceSetAdvisory(interface, advisory, CFSTR("Because")); + CFRunLoopRun(); + } else { + advisoryCheck(interface, watch); + if (watch) { + advisoryWatch(interface); + CFRunLoopRun(); + } + } + exit(0); +} + + #ifdef TEST_DNS_CONFIGURATION Boolean doDispatch = FALSE; diff --git a/scutil.tproj/tests.h b/scutil.tproj/tests.h index eb3852a..87d6a63 100644 --- a/scutil.tproj/tests.h +++ b/scutil.tproj/tests.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, 2004, 2007, 2011, 2012, 2014 Apple Inc. All rights reserved. + * Copyright (c) 2000, 2001, 2004, 2007, 2011, 2012, 2014, 2018 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -50,6 +50,7 @@ void do_snapshot (int argc, char **argv); void do_wait (char *waitKey, int timeout); void do_showNWI (int argc, char **argv); void do_watchNWI (int argc, char **argv); +void do_advisory (const char * interface, Boolean watch, int argc, char **argv); __END_DECLS diff --git a/tests/ReachabilityTester.c b/tests/ReachabilityTester.c index 41ee485..0824a67 100644 --- a/tests/ReachabilityTester.c +++ b/tests/ReachabilityTester.c @@ -82,7 +82,7 @@ printReachabilityFlags(const char *source, SCNetworkReachabilityFlags flags) if (flags & kSCNetworkReachabilityFlagsIsDirect) { printf("[%s] direct\n", source); } -#if TARGET_OS_EMBEDDED +#if TARGET_OS_IPHONE if (flags & kSCNetworkReachabilityFlagsIsWWAN) { printf("[%s] wwan\n", source); } diff --git a/update-sanitizer-dylib-references b/update-sanitizer-dylib-references index da32ed4..fbc331d 100755 --- a/update-sanitizer-dylib-references +++ b/update-sanitizer-dylib-references @@ -36,6 +36,9 @@ xsan_setup() { TSAN_DYLIB="clang_rt.tsan_watchossim_dynamic.dylib" ;; * ) + echo "" + echo "*** Unexpected PLATFORM_NAME \"${PLATFORM_NAME}\", using \"$(RC_PROJECT_COMPILATION_PLATFORM)\"" + echo "" ASAN_DYLIB="clang_rt.asan_$(RC_PROJECT_COMPILATION_PLATFORM)_dynamic.dylib" TSAN_DYLIB="clang_rt.tsan_$(RC_PROJECT_COMPILATION_PLATFORM)_dynamic.dylib" ;; -- 2.45.2